* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #f7f9fc;
    color: #1e293b;
    line-height: 1.5;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Navbar */
.navbar {
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
}

.logo {
    font-size: 24px;
    font-weight: 800;
    background: linear-gradient(135deg, #0f172a, #1e293b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    text-decoration: none;
    color: #475569;
    padding: 8px 16px;
    border-radius: 10px;
    transition: all 0.2s;
    font-weight: 500;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link:hover {
    background: #f1f5f9;
    color: #0f172a;
}

/* Dropdown */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 10px;
}

.dropdown-toggle:hover {
    background: #f1f5f9;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1);
    min-width: 240px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s;
    z-index: 100;
    border: 1px solid #e2e8f0;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #334155;
    text-decoration: none;
    font-size: 16px;
}

.dropdown-menu a:hover {
    background: #f8fafc;
}

.dropdown-header {
    padding: 12px 20px;
    border-bottom: 1px solid #e2e8f0;
}

.profile-photo {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e2e8f0;
}

.balance-badge {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 6px 14px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.badge-owner {
    background: #0f172a;
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: #0f172a;
    color: white;
}

.btn-primary:hover {
    background: #1e293b;
    transform: translateY(-1px);
}

.btn-danger {
    background: #fee2e2;
    color: #dc2626;
}

.btn-danger:hover {
    background: #dc2626;
    color: white;
}

.btn-success {
    background: #dcfce7;
    color: #16a34a;
}

.btn-warning {
    background: #fef3c7;
    color: #d97706;
}

.btn-outline {
    background: transparent;
    color: #1e293b;
    border: 1px solid #e2e8f0;
}

.btn-outline:hover {
    background: #f8f9fa;
    border-color: #0f172a;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* Cards */
.card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 24px;
}

/* Equipment Grid */
.equipment-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

@media (min-width: 769px) {
    .equipment-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }
}

@media (min-width: 1024px) {
    .equipment-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.equipment-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.2s;
    position: relative;
}

.equipment-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.equipment-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: #f1f5f9;
}

.equipment-image-placeholder {
    width: 100%;
    height: 180px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: #94a3b8;
}

.equipment-info {
    padding: 12px;
}

.equipment-name {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 4px;
}

.equipment-price {
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
    margin: 8px 0;
}

.equipment-price small {
    font-size: 10px;
    font-weight: normal;
    color: #64748b;
}

/* Stores Grid */
.stores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
    margin-bottom: 40px;
}

.store-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
}

.store-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.store-card-banner {
    width: 100%;
    height: 140px;
    object-fit: cover;
}

.store-card-banner-placeholder {
    width: 100%;
    height: 140px;
    background: linear-gradient(135deg, #0f172a, #1e293b);
}

.store-card-info {
    padding: 20px;
    position: relative;
}

.store-card-logo {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    object-fit: cover;
    margin-top: -44px;
    border: 3px solid white;
    background: white;
}

.store-card-logo-placeholder {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: #f1f5f9;
    margin-top: -44px;
    border: 3px solid white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #94a3b8;
}

.store-stats {
    display: flex;
    gap: 16px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
    font-size: 13px;
    color: #64748b;
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 48px 24px;
    margin-bottom: 40px;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border-radius: 32px;
}

.hero-icon {
    font-size: 64px;
    color: #0f172a;
    margin-bottom: 20px;
}

.hero-section h1 {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #0f172a, #1e293b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-section p {
    font-size: 18px;
    color: #64748b;
    max-width: 560px;
    margin: 0 auto;
}

/* Search Bar */
.search-bar {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 32px;
}

.search-bar form {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.search-bar input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.search-bar select {
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    min-width: 160px;
}

/* Section Title */
.section-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

/* Store Banner */
.store-banner {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border-radius: 24px;
    padding: 32px;
    margin-bottom: 32px;
    position: relative;
    overflow: hidden;
    color: white;
}

.store-banner-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.15;
    z-index: 0;
}

.store-banner-content {
    position: relative;
    z-index: 1;
}

.store-logo-large {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    object-fit: cover;
    margin-bottom: 20px;
    border: 3px solid rgba(255,255,255,0.2);
}

.store-banner-content h2 {
    font-size: 28px;
    margin-bottom: 8px;
}

.store-contact {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    margin: 20px 0;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 20px;
}

.stat-icon {
    width: 48px;
    height: 48px;
    background: #f1f5f9;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.stat-icon i {
    font-size: 24px;
    color: #0f172a;
}

.stat-value {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 13px;
    color: #64748b;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 13px;
    color: #475569;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-size: 14px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #0f172a;
    box-shadow: 0 0 0 3px rgba(15,23,42,0.1);
}

/* Table */
.table-container {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 14px 12px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.table th {
    background: #f8fafc;
    font-weight: 600;
    font-size: 13px;
}

.table td {
    font-size: 13px;
    color: #475569;
}

/* Status Badges */
.status-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    display: inline-block;
}

.status-pending { background: #fef3c7; color: #d97706; }
.status-approved { background: #dbeafe; color: #2563eb; }
.status-completed { background: #dcfce7; color: #16a34a; }
.status-cancelled { background: #fee2e2; color: #dc2626; }

.payment-paid { background: #dcfce7; color: #16a34a; }
.payment-pending { background: #fef3c7; color: #d97706; }
.payment-refunded { background: #fee2e2; color: #dc2626; }

.stock-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
}

.stock-available { background: #dcfce7; color: #16a34a; }
.stock-low { background: #fef3c7; color: #d97706; }
.stock-out { background: #fee2e2; color: #dc2626; }

/* Alerts */
.alert {
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-weight: 500;
    font-size: 14px;
}

.alert-success {
    background: #dcfce7;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.alert-error {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.alert-info {
    background: #dbeafe;
    color: #2563eb;
    border: 1px solid #bfdbfe;
}

/* ============ CART SIDEBAR CSS YANG DIPERBAIKI ============ */

/* Overlay - menutupi seluruh layar */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    display: none;
    cursor: pointer;
}

.cart-overlay.active {
    display: block;
}

/* Sidebar utama */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -420px;
    width: 420px;
    max-width: 90%;
    height: 100vh;
    background: white;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    transition: right 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.cart-sidebar.active {
    right: 0;
}

/* Header sidebar */
.cart-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    flex-shrink: 0;
}

.cart-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.cart-header h3 i {
    color: #0f172a;
    margin-right: 8px;
}

.cart-header button {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #94a3b8;
    transition: color 0.2s;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.cart-header button:hover {
    color: #dc2626;
    background: #fef2f2;
}

/* Area items - scrollable */
.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
}

/* Style untuk setiap item */
.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 16px 0;
    border-bottom: 1px solid #e2e8f0;
    gap: 12px;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-info {
    flex: 1;
}

.cart-item-info strong {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    display: block;
    margin-bottom: 6px;
}

.cart-item-info p {
    font-size: 13px;
    color: #475569;
    margin: 4px 0;
}

.cart-item-info small {
    font-size: 11px;
    color: #94a3b8;
}

.cart-item-actions {
    text-align: right;
    flex-shrink: 0;
}

.cart-item-price {
    font-weight: 700;
    font-size: 14px;
    color: #0f172a;
    margin-bottom: 8px;
}

/* Footer sidebar */
.cart-footer {
    padding: 20px 24px;
    border-top: 1px solid #e2e8f0;
    background: white;
    flex-shrink: 0;
}

.cart-footer .flex-between {
    margin-bottom: 16px;
    font-size: 16px;
}

.cart-footer .flex-between strong:first-child {
    font-weight: 600;
    color: #475569;
}

.cart-footer .flex-between strong:last-child {
    font-weight: 800;
    font-size: 20px;
    color: #0f172a;
}

.cart-footer form {
    margin-bottom: 12px;
}

.cart-footer .btn-block {
    margin-bottom: 8px;
}

/* Floating cart button */
.cart-summary {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: white;
    padding: 14px 24px;
    border-radius: 48px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    z-index: 9997;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
    font-weight: 600;
}

.cart-summary:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.cart-summary i {
    font-size: 20px;
}

.cart-summary .cart-count {
    background: #ef4444;
    border-radius: 30px;
    padding: 2px 8px;
    font-size: 13px;
    font-weight: 700;
    min-width: 26px;
    text-align: center;
}

.cart-summary span:last-child {
    font-weight: 700;
    font-size: 15px;
}

/* Quantity Control */
.quantity-control {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 12px 0;
}

.quantity-control button {
    width: 32px;
    height: 32px;
    border: 1px solid #e2e8f0;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.quantity-control button:hover {
    background: #f1f5f9;
    border-color: #0f172a;
}

.quantity-control input {
    width: 50px;
    text-align: center;
    padding: 6px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
}

/* Modals */
.modal, .qr-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
    z-index: 1200;
}

.modal-content, .qr-modal-content {
    background: white;
    border-radius: 24px;
    padding: 32px;
    max-width: 560px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
}

.qr-modal-content {
    text-align: center;
}

.qr-modal-content img {
    width: 250px;
    height: 250px;
    margin: 16px auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e2e8f0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #94a3b8;
}

/* Auth Cards */
.auth-card {
    max-width: 480px;
    margin: 0 auto;
}

.auth-header {
    text-align: center;
    margin-bottom: 10px;
    margin-top: 25px;
}

.auth-header i {
    font-size: 56px;
    color: #0f172a;
}

.auth-header h2 {
    margin-top: 16px;
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    color: #64748b;
}

.auth-footer a {
    color: #0f172a;
    font-weight: 600;
    text-decoration: none;
}

/* Profile */
.profile-header {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.profile-photo-large img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e2e8f0;
}

.profile-photo-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #94a3b8;
}

/* Selected Items Bar */
.selected-items-bar {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.equipment-select {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
}

.equipment-select input {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* Price Preview */
.price-preview {
    background: #dcfce7;
    padding: 8px;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    font-size: 12px;
    margin: 8px 0;
}

/* Utility */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-success { color: #16a34a; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
hr { margin: 20px 0; border-color: #e2e8f0; }

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
    .container {
        padding: 0 12px;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 80%;
        height: calc(100vh - 70px);
        background: white;
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
        transition: left 0.3s ease;
        box-shadow: 2px 0 12px rgba(0,0,0,0.1);
        overflow-y: auto;
        z-index: 1000;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-link, .dropdown {
        width: 100%;
    }
    
    .dropdown-toggle {
        width: 100%;
        justify-content: space-between;
    }
    
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        padding-left: 20px;
        display: none;
    }
    
    .dropdown.active .dropdown-menu {
        display: block;
    }
    
    /* Cart sidebar mobile */
    .cart-sidebar {
        width: 100%;
        max-width: 100%;
        right: -100%;
    }
    
    .cart-sidebar.active {
        right: 0;
    }
    
    .cart-summary {
        bottom: 16px;
        right: 16px;
        padding: 12px 20px;
    }
    
    .cart-summary span:last-child {
        font-size: 13px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-section h1 {
        font-size: 32px;
    }
    
    .table th, .table td {
        padding: 10px 8px;
        font-size: 12px;
    }
}

/* Untuk layar sangat kecil */
@media (max-width: 480px) {
    .cart-summary span:last-child {
        display: none;
    }
    
    .cart-summary {
        padding: 12px 16px;
    }
    
    .cart-header {
        padding: 16px 20px;
    }
    
    .cart-items {
        padding: 12px 16px;
    }
    
    .cart-footer {
        padding: 16px 20px;
    }
}