* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-green: #2ecc71;
    --primary-dark: #27ae60;
    --light-gray: #f5f5f5;
    --border-color: #e0e0e0;
    --text-dark: #333;
    --text-light: #666;
    --transition: all 0.3s ease;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #fafafa;
    color: var(--text-dark);
}

.container {
    display: flex;
    height: 100vh;
}

/* ============ SIDEBAR ============ */
.sidebar {
    width: 250px;
    background: white;
    border-right: 1px solid var(--border-color);
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.logo {
    margin-bottom: 40px;
    text-align: center;
}

.logo h1 {
    font-size: 24px;
    color: var(--primary-green);
    margin-bottom: 5px;
    font-weight: 700;
}

.logo p {
    font-size: 12px;
    color: var(--text-light);
    letter-spacing: 0.5px;
}

.categories {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.category-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-dark);
    transition: var(--transition);
    font-weight: 500;
}

.category-btn:hover {
    background-color: var(--light-gray);
    border-color: var(--primary-green);
}

.category-btn.active {
    background-color: var(--primary-green);
    color: white;
    border-color: var(--primary-green);
}

.category-btn i {
    font-size: 16px;
}

/* ============ HISTORY SECTION ============ */
.history-section {
    margin: 20px 0;
    padding: 0;
}

.history-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-dark);
    transition: var(--transition);
    font-weight: 500;
}

.history-btn:hover {
    background-color: var(--light-gray);
    border-color: var(--primary-green);
}

.history-btn i {
    font-size: 16px;
}

.history-list {
    margin-top: 10px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.history-list.show {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--light-gray);
}

.history-item {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition);
    background: white;
}

.history-item:hover {
    background-color: #f9f9f9;
}

.history-item:last-child {
    border-bottom: none;
}

.history-item-name {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 13px;
    margin-bottom: 4px;
}

.history-item-date {
    font-size: 11px;
    color: var(--text-light);
}

.history-item-price {
    font-size: 12px;
    color: var(--primary-green);
    font-weight: 600;
    margin-top: 4px;
}

.history-empty {
    padding: 20px 12px;
    text-align: center;
    font-size: 12px;
    color: var(--text-light);
}

.sidebar-footer {
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    text-align: center;
    font-size: 12px;
    margin-top: auto;
}

.contact-info {
    margin-bottom: 20px;
}

.contact-info p:first-child {
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 5px;
}

.contact-info p:last-child {
    color: var(--text-light);
    font-size: 0.9rem;
}

.project-credits {
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.project-credits p {
    margin: 4px 0;
    color: var(--text-light);
    font-size: 0.85rem;
    line-height: 1.4;
}

.project-credits p:first-child {
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 6px;
}

/* ============ MAIN CONTENT ============ */
.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 40px 50px;
}

.header {
    margin-bottom: 40px;
}

.header h2 {
    font-size: 32px;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.header p {
    color: var(--text-light);
    font-size: 14px;
}

.bikes-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

.bike-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
    cursor: pointer;
}

.bike-card:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
}

.bike-card-image {
    width: 100%;
    height: 200px;
    background-color: var(--light-gray);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bike-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bike-card-info {
    padding: 16px;
}

.bike-card-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.bike-card-brand {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 12px;
}

.bike-card-price {
    font-size: 18px;
    color: var(--primary-green);
    font-weight: 700;
}

.bike-card-price-label {
    font-size: 11px;
    color: var(--text-light);
}

/* ============ MODAL ============ */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-light);
    transition: var(--transition);
    z-index: 10;
}

.modal-close:hover {
    color: var(--text-dark);
}

/* ============ DETAIL MODAL ============ */
.modal-detail {
    width: 90%;
    max-width: 600px;
    display: flex;
    flex-direction: row;
    max-height: 85vh;
}

.detail-image {
    width: 40%;
    background-color: var(--light-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.detail-image img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
}

.detail-info {
    width: 60%;
    padding: 30px;
    overflow-y: auto;
}

.detail-info h3 {
    font-size: 24px;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.brand {
    color: var(--text-light);
    font-size: 13px;
    margin-bottom: 16px !important;
}

.detail-price {
    font-size: 28px;
    color: var(--primary-green);
    font-weight: 700;
    margin-bottom: 20px;
}

.detail-description h4,
.detail-outlets h4 {
    font-size: 14px;
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 10px;
    margin-top: 20px;
}

.detail-description p {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.6;
}

.detail-outlets ul {
    list-style: none;
    font-size: 13px;
    color: var(--text-light);
}

.detail-outlets li {
    padding: 6px 0;
    padding-left: 20px;
    position: relative;
}

.detail-outlets li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary-green);
}

.btn-sewa {
    width: 100%;
    padding: 14px;
    background-color: var(--primary-green);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 25px;
    transition: var(--transition);
}

.btn-sewa:hover {
    background-color: var(--primary-dark);
}

/* ============ RENTAL MODAL ============ */
.modal-rental {
    width: 90%;
    max-width: 450px;
    padding: 30px;
}

.modal-rental h3 {
    font-size: 22px;
    color: var(--text-dark);
    margin-bottom: 25px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.1);
}

.duration-input {
    display: flex;
    align-items: center;
    gap: 10px;
}

.duration-btn {
    width: 45px;
    height: 45px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: white;
    cursor: pointer;
    font-size: 18px;
    transition: var(--transition);
    color: var(--text-dark);
}

.duration-btn:hover {
    background-color: var(--light-gray);
    border-color: var(--primary-green);
}

.duration-input input {
    flex: 1;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
}

.payment-methods {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 10px;
}

.payment-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 15px 10px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: var(--transition);
    min-height: 90px;
}

.payment-btn img {
    width: 35px;
    height: 35px;
    object-fit: contain;
}

.payment-btn i {
    font-size: 28px;
    color: var(--text-light);
}

.payment-btn span {
    font-size: 11px;
    color: var(--text-dark);
    font-weight: 500;
    text-align: center;
}

.payment-btn:hover {
    border-color: var(--primary-green);
    background-color: var(--light-gray);
}

.payment-btn.active {
    border-color: var(--primary-green);
    background-color: rgba(46, 204, 113, 0.1);
}

.price-summary {
    background-color: var(--light-gray);
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    font-size: 13px;
}

/* ============ HISTORY DETAILS ============ */
.history-details {
    margin: 20px 0;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 13px;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-row .label {
    color: var(--text-light);
    font-weight: 500;
}

.detail-row span:not(.label) {
    color: var(--text-dark);
    font-weight: 600;
}

.detail-row.total-price {
    background-color: var(--light-gray);
    padding: 12px;
    border-radius: 6px;
    margin-top: 15px;
    font-size: 15px;
}

.detail-row.total-price .label {
    color: var(--text-dark);
}

.detail-row.total-price span:not(.label) {
    color: var(--primary-green);
    font-size: 18px;
}

.price-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    color: var(--text-light);
}

.price-row.total {
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
    margin-top: 12px;
    color: var(--text-dark);
    font-weight: 700;
    font-size: 15px;
}

.btn-bayar {
    width: 100%;
    padding: 14px;
    background-color: var(--primary-green);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-bayar:hover {
    background-color: var(--primary-dark);
}

/* ============ NOTIFICATION ============ */
.notification {
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--primary-green);
    color: white;
    padding: 16px 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 2000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    pointer-events: none;
}

.notification.show {
    opacity: 1;
    pointer-events: auto;
    animation: slideDown 0.4s ease;
}

/* ============ ERROR NOTIFICATION ============ */
.error-notification {
    background-color: #ff6b6b;
    color: white;
    padding: 12px 16px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 13px;
    animation: slideDown 0.3s ease;
    display: none;
}

.error-notification.show {
    display: flex;
}

.error-notification i {
    font-size: 16px;
    flex-shrink: 0;
}

.error-notification p {
    margin: 0;
}

@keyframes slideDown {
    from {
        transform: translateX(-50%) translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

.notification i {
    font-size: 20px;
}

.notification p {
    font-size: 14px;
    margin: 0;
}

/* ============ SCROLLBAR ============ */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #bbb;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
    .bikes-container {
        grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
        height: auto;
    }

    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        flex-direction: row;
        padding: 20px;
        overflow-x: auto;
        overflow-y: visible;
    }

    .logo {
        margin-bottom: 0;
        margin-right: 30px;
        white-space: nowrap;
    }

    .categories {
        flex-direction: row;
        gap: 8px;
        flex: 1;
    }

    .category-btn {
        white-space: nowrap;
    }

    .main-content {
        padding: 30px 20px;
    }

    .header h2 {
        font-size: 24px;
    }

    .bikes-container {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }

    .modal-detail {
        flex-direction: column;
        width: 95%;
    }

    .detail-image {
        width: 100%;
        height: 250px;
    }

    .detail-info {
        width: 100%;
    }

    .payment-methods {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .sidebar {
        flex-direction: column;
        max-height: auto;
    }

    .logo {
        margin-bottom: 15px;
        margin-right: 0;
    }

    .categories {
        flex-direction: column;
    }

    .main-content {
        padding: 20px 15px;
    }

    .header h2 {
        font-size: 20px;
    }

    .bikes-container {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 10px;
    }

    .modal-rental {
        width: 95%;
        max-width: 100%;
        padding: 20px;
    }

    .payment-methods {
        grid-template-columns: repeat(2, 1fr);
    }
}
