/* ===================================
   GOLD POS ERP - Custom Theme CSS
   Golden Theme: #FFD700, #FDB931, #B8860B
=================================== */

:root {
    --gold-primary: #FFD700;
    --gold-dark: #B8860B;
    --gold-light: #FDB931;
    --gold-accent: #8B7355;
    --gold-bg: #FFF9E6;
    --gold-text: #333333;
    --sidebar-bg: #1a1a2e;
    --navbar-height: 60px;
    --bottom-nav-height: 60px;
}

/* ---- Base ---- */
body {
    background-color: var(--gold-bg);
    color: var(--gold-text);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    padding-top: var(--navbar-height);
}

/* ---- Navbar ---- */
.gold-navbar {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    border-bottom: 2px solid var(--gold-primary);
    height: var(--navbar-height);
    box-shadow: 0 2px 15px rgba(255,215,0,0.2);
}

.gold-navbar .nav-link {
    color: rgba(255,255,255,0.85) !important;
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.gold-navbar .nav-link:hover,
.gold-navbar .nav-link.active {
    color: var(--gold-primary) !important;
    background: rgba(255,215,0,0.1);
}

.gold-navbar .navbar-brand {
    color: var(--gold-primary) !important;
    font-size: 1.1rem;
}

/* ---- Dropdown Menus ---- */
.gold-dropdown {
    background: #1a1a2e;
    border: 1px solid var(--gold-dark);
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    min-width: 200px;
}

.gold-dropdown .dropdown-item {
    color: rgba(255,255,255,0.85);
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
}

.gold-dropdown .dropdown-item:hover {
    background: rgba(255,215,0,0.15);
    color: var(--gold-primary);
}

.gold-dropdown .dropdown-header {
    color: var(--gold-light);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ---- Gold Rate Badge ---- */
.gold-rate-badge {
    background: linear-gradient(135deg, var(--gold-dark), var(--gold-primary));
    color: #1a1a2e;
    font-weight: 600;
    font-size: 0.8rem;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
}

/* ---- User Button ---- */
.gold-user-btn {
    background: rgba(255,215,0,0.1);
    border: 1px solid rgba(255,215,0,0.3);
    color: var(--gold-primary) !important;
    border-radius: 25px;
    padding: 0.3rem 0.75rem;
    transition: all 0.3s ease;
}

.gold-user-btn:hover {
    background: rgba(255,215,0,0.2);
    border-color: var(--gold-primary);
}

/* ---- Avatar ---- */
.avatar-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
    color: #1a1a2e;
    font-weight: 700;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-circle-lg {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
    color: #1a1a2e;
    font-weight: 700;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ---- Main Wrapper ---- */
.main-wrapper {
    min-height: calc(100vh - var(--navbar-height));
    padding-bottom: var(--bottom-nav-height);
}

/* ---- Page Header / Breadcrumb ---- */
.page-header {
    background: linear-gradient(135deg, #fff 0%, var(--gold-bg) 100%);
    border-bottom: 1px solid rgba(184,134,11,0.2);
    padding: 0.5rem 0;
}

/* ---- Cards ---- */
.card {
    border: 1px solid rgba(184,134,11,0.15);
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(184,134,11,0.08);
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 4px 20px rgba(184,134,11,0.15);
}

.card-header {
    background: linear-gradient(135deg, var(--gold-bg) 0%, #fff 100%);
    border-bottom: 2px solid rgba(255,215,0,0.3);
    font-weight: 600;
}

/* ---- Gold Card Variants ---- */
.card-gold {
    border-color: var(--gold-primary);
    background: linear-gradient(135deg, #fff9e6 0%, #fff 100%);
}

.card-gold .card-header {
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
    color: #1a1a2e;
}

/* ---- Stat Cards (Dashboard) ---- */
.stat-card {
    border-radius: 16px;
    padding: 1.5rem;
    color: white;
    position: relative;
    overflow: hidden;
    border: none;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: -30px;
    right: -30px;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
}

.stat-card-gold {
    background: linear-gradient(135deg, var(--gold-dark), var(--gold-primary));
    color: #1a1a2e;
}

.stat-card-blue {
    background: linear-gradient(135deg, #1a1a2e, #0f3460);
}

.stat-card-green {
    background: linear-gradient(135deg, #198754, #20c997);
}

.stat-card-red {
    background: linear-gradient(135deg, #dc3545, #fd7e14);
}

.stat-card .stat-icon {
    font-size: 2.5rem;
    opacity: 0.8;
}

.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1;
}

.stat-card .stat-label {
    font-size: 0.8rem;
    opacity: 0.85;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ---- Buttons ---- */
.btn-gold {
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
    color: #1a1a2e;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    min-height: 44px;
}

.btn-gold:hover {
    background: linear-gradient(135deg, var(--gold-dark), #8B6914);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(184,134,11,0.4);
}

.btn-gold-outline {
    border: 2px solid var(--gold-primary);
    color: var(--gold-dark);
    background: transparent;
    font-weight: 600;
    border-radius: 8px;
    min-height: 44px;
    transition: all 0.3s ease;
}

.btn-gold-outline:hover {
    background: var(--gold-primary);
    color: #1a1a2e;
}

/* ---- Forms ---- */
.form-control:focus, .form-select:focus {
    border-color: var(--gold-primary);
    box-shadow: 0 0 0 0.25rem rgba(255,215,0,0.25);
}

.form-label {
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--gold-accent);
}

/* ---- Tables ---- */
.table-gold thead th {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    color: var(--gold-primary);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    padding: 0.75rem 1rem;
}

.table-gold tbody tr:hover {
    background: rgba(255,215,0,0.05);
}

/* ---- Mobile Offcanvas ---- */
.gold-offcanvas {
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
    border-right: 2px solid var(--gold-primary);
    width: 280px !important;
}

.gold-offcanvas .offcanvas-title {
    color: var(--gold-primary);
    font-weight: 700;
}

.gold-user-panel {
    background: rgba(255,215,0,0.08);
    border-bottom: 1px solid rgba(255,215,0,0.2);
}

/* ---- Mobile Nav Items ---- */
.mobile-nav {
    padding: 0.5rem 0;
}

.mobile-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.75rem 1.25rem;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.mobile-nav-item i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.mobile-nav-item:hover,
.mobile-nav-item.active {
    background: rgba(255,215,0,0.1);
    color: var(--gold-primary);
    border-left-color: var(--gold-primary);
}

/* ---- Bottom Navigation (Mobile) ---- */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottom-nav-height);
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border-top: 2px solid var(--gold-primary);
    display: flex;
    z-index: 1030;
    box-shadow: 0 -4px 15px rgba(0,0,0,0.3);
}

.bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-size: 0.65rem;
    gap: 2px;
    transition: all 0.2s ease;
    min-height: 44px;
}

.bottom-nav-item i {
    font-size: 1.2rem;
}

.bottom-nav-item.active,
.bottom-nav-item:hover {
    color: var(--gold-primary);
}

/* ---- Auth Page ---- */
.auth-body {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    padding-top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-wrapper {
    width: 100%;
    max-width: 440px;
    padding: 1rem;
}

.auth-card {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
    border: 1px solid rgba(255,215,0,0.2);
}

.auth-gem-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-size: 2rem;
    color: #1a1a2e;
}

.gold-text {
    background: linear-gradient(135deg, var(--gold-dark), var(--gold-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ---- Badges ---- */
.badge-gold {
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
    color: #1a1a2e;
    font-weight: 600;
}

/* ---- POS Specific ---- */
.pos-product-card {
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    border-radius: 12px;
}

.pos-product-card:hover,
.pos-product-card:active {
    border-color: var(--gold-primary);
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(255,215,0,0.3);
}

.pos-cart-item {
    border-bottom: 1px solid rgba(184,134,11,0.15);
    padding: 0.5rem 0;
}

/* ---- Loading Spinner ---- */
.spinner-gold {
    color: var(--gold-primary);
}

.loading-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255,249,230,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* ---- Print Styles ---- */
@media print {
    .gold-navbar, .mobile-bottom-nav, .gold-offcanvas,
    .no-print, .btn, nav { display: none !important; }
    body { padding-top: 0 !important; background: white !important; }
    .main-wrapper { padding-bottom: 0 !important; }
}

/* ---- Responsive Tables ---- */
@media (max-width: 767px) {
    body { padding-bottom: calc(var(--bottom-nav-height) + 1rem); }

    .table-responsive-card thead { display: none; }
    .table-responsive-card tbody tr {
        display: block;
        background: white;
        border-radius: 12px;
        margin-bottom: 0.75rem;
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
        padding: 0.75rem;
        border: 1px solid rgba(184,134,11,0.15);
    }
    .table-responsive-card tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.35rem 0;
        border: none;
        font-size: 0.875rem;
    }
    .table-responsive-card tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--gold-accent);
        font-size: 0.75rem;
        text-transform: uppercase;
        flex: 0 0 45%;
    }

    .stat-card { margin-bottom: 0.75rem; }
    .auth-card { padding: 1.5rem; }
    .card { border-radius: 10px; }
}

@media (max-width: 991px) {
    .main-wrapper { padding-bottom: var(--bottom-nav-height); }
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--gold-bg); }
::-webkit-scrollbar-thumb {
    background: var(--gold-light);
    border-radius: 3px;
}

/* ---- Transitions ---- */
.fade-in { animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ---- Gold Divider ---- */
.gold-divider {
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold-primary), transparent);
    border: none;
    margin: 1rem 0;
}

/* ---- Section Title ---- */
.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gold-dark);
    border-left: 4px solid var(--gold-primary);
    padding-left: 0.75rem;
}