/* ==========================================================================
   MENZIO LUXURY - ADMIN ERP & MANAGEMENT STYLING
   ========================================================================== */

/* ==========================================================================
   1. ADMIN LOGIN SCREEN
   ========================================================================== */

.admin-login-body {
    min-height: 100vh;
    display: flex;
    background-color: #06080B;
    background-image: 
        linear-gradient(135deg, rgba(6, 8, 12, 0.92) 0%, rgba(10, 13, 20, 0.84) 50%, rgba(5, 7, 11, 0.93) 100%),
        url('../assets/images/admin_login_atelier_bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    font-family: var(--font-sans);
    overflow-x: hidden;
    position: relative;
}

.login-split-wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
}

/* Left Brand & Atelier Control Information Panel */
.login-left-panel {
    flex: 1.1;
    padding: 3rem 4rem;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    position: relative;
}

.login-left-card {
    background: rgba(11, 14, 21, 0.78);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(197, 164, 126, 0.24);
    border-radius: 24px;
    padding: 2.6rem 2.8rem;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.75), 0 0 35px rgba(197, 164, 126, 0.08);
    max-width: 530px;
    width: 100%;
    animation: loginCardFadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.login-left-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.6rem;
    padding-bottom: 1.2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.login-left-brand-img {
    height: 42px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(197, 164, 126, 0.35));
}

.atelier-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(197, 164, 126, 0.12);
    border: 1px solid rgba(197, 164, 126, 0.3);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--color-gold);
    letter-spacing: 0.3px;
}

.status-pulse-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22C55E;
    box-shadow: 0 0 8px #22C55E;
    display: inline-block;
}

.login-left-title {
    font-size: clamp(1.65rem, 2.2vw, 2.1rem);
    font-weight: 700;
    line-height: 1.25;
    color: #FFFFFF;
    margin-bottom: 0.85rem;
}

.login-left-desc {
    font-size: 0.9rem;
    line-height: 1.65;
    color: #A0AEC0;
    margin-bottom: 1.8rem;
}

/* Atelier Live Stats 2x2 */
.login-atelier-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
    margin-bottom: 1.8rem;
}

.atelier-stat-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(197, 164, 126, 0.16);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    transition: all 0.25s ease;
}

.atelier-stat-pill:hover {
    background: rgba(197, 164, 126, 0.08);
    border-color: var(--color-gold);
    transform: translateY(-2px);
}

.stat-pill-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(197, 164, 126, 0.14);
    color: var(--color-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.stat-pill-num {
    font-size: 0.82rem;
    font-weight: 700;
    color: #FFFFFF;
    line-height: 1.2;
}

.stat-pill-lbl {
    font-size: 0.68rem;
    color: #94A3B8;
}

.login-left-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.76rem;
    color: #64748B;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 1.2rem;
}

.login-left-card-footer span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* Right Form Panel with Compact Login V5 Card */
.login-right-panel {
    flex: 0.9;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 3rem 4rem;
    background: transparent;
}

.login-card-v5 {
    width: 100%;
    max-width: 410px;
    background: rgba(11, 14, 21, 0.84);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border: 1px solid rgba(197, 164, 126, 0.24);
    border-radius: 24px;
    padding: 2.2rem 2.2rem;
    box-shadow: 0 30px 70px -15px rgba(0, 0, 0, 0.85),
                0 0 0 1px rgba(197, 164, 126, 0.15),
                0 0 40px rgba(197, 164, 126, 0.08);
    position: relative;
    z-index: 10;
    animation: loginCardFadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes loginCardFadeUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 1.25rem;
}

.login-brand-logo-img {
    height: 40px;
    width: auto;
    object-fit: contain;
    margin-bottom: 0.9rem;
    filter: drop-shadow(0 4px 12px rgba(197, 164, 126, 0.3));
}

.login-title {
    font-size: 1.55rem;
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 0.25rem;
    font-family: var(--font-sans);
    letter-spacing: -0.3px;
}

.login-subtitle {
    color: #94A3B8;
    font-size: 0.82rem;
    margin: 0;
}

/* Discreet Demo Access Pill (Clean Dark Glass, Compact) */
.demo-access-chip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(197, 164, 126, 0.22);
    border-radius: var(--radius-sm);
    padding: 0.55rem 0.85rem;
    margin-bottom: 1.2rem;
    gap: 10px;
}

.demo-chip-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.demo-chip-icon {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(197, 164, 126, 0.15);
    color: var(--color-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.demo-chip-title {
    font-size: 0.74rem;
    font-weight: 700;
    color: #E2E8F0;
    letter-spacing: 0.2px;
}

.demo-chip-sub {
    font-size: 0.7rem;
    color: #94A3B8;
}

.demo-chip-sub strong {
    color: var(--color-gold-light);
    font-weight: 600;
}

.demo-chip-autofill {
    background: rgba(197, 164, 126, 0.15);
    border: 1px solid var(--color-border);
    color: var(--color-gold-light);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 9px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.demo-chip-autofill:hover {
    background: var(--gold-gradient);
    color: var(--color-obsidian);
    border-color: transparent;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(197, 164, 126, 0.3);
}

.login-footer-links {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.login-back-link {
    font-size: 0.82rem;
    color: var(--color-gold-light);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s ease;
}

.login-back-link:hover {
    color: #FFFFFF;
}

.login-security-badge {
    font-size: 0.72rem;
    color: #64748B;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* ==========================================================================
   2. ADMIN DASHBOARD SHELL
   ========================================================================== */

.admin-layout {
    display: flex;
    min-height: 100vh;
    background-color: #06080B;
    color: #E2E8F0;
    font-family: var(--font-sans);
}

/* Sidebar with Independent Scroll & Sticky Navigation */
.admin-sidebar {
    width: 270px;
    background: #090C12;
    border-right: 1px solid var(--color-border-subtle);
    display: flex;
    flex-direction: column;
    transition: var(--transition-smooth);
    z-index: 100;
    position: sticky;
    top: 0;
    height: 100vh;
    max-height: 100vh;
    overflow-y: auto; /* ENABLES SCROLLING */
    overflow-x: hidden;
}

/* Slim luxury scrollbar for admin sidebar */
.admin-sidebar::-webkit-scrollbar {
    width: 5px;
}

.admin-sidebar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.admin-sidebar::-webkit-scrollbar-thumb {
    background: rgba(197, 164, 126, 0.3);
    border-radius: 4px;
}

.admin-sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--color-gold);
}

.admin-sidebar-header {
    padding: 1.1rem 1.2rem;
    border-bottom: 1px solid var(--color-border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.admin-sidebar-logo {
    height: 38px;
    width: auto;
    object-fit: contain;
}

.admin-nav-list {
    list-style: none;
    padding: 0.9rem 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    margin: 0;
}

.admin-nav-item a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 13px;
    border-radius: var(--radius-sm);
    color: #94A3B8;
    font-size: 0.86rem;
    font-weight: 600;
    transition: var(--transition-fast);
}

.admin-nav-item a i {
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

.admin-nav-item.active a,
.admin-nav-item a:hover {
    background: rgba(197, 164, 126, 0.12);
    color: var(--color-gold-light);
    border-left: 3px solid var(--color-gold);
}

.admin-nav-badge {
    margin-left: auto;
    background: #E11D48;
    color: #FFFFFF;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-weight: 700;
}

.admin-sidebar-footer {
    padding: 1rem 1.2rem;
    border-top: 1px solid var(--color-border-subtle);
    flex-shrink: 0;
    background: #07090E;
}

.admin-user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gold-gradient);
    color: var(--color-obsidian);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.95rem;
}

/* Main Area */
.admin-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: #080A0E;
}

/* Topbar */
.admin-topbar {
    height: 74px;
    background: #0A0C12;
    border-bottom: 1px solid var(--color-border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2.2rem;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.topbar-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #FFFFFF;
    font-family: var(--font-sans);
    letter-spacing: 0.2px;
    text-transform: none;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

/* Dashboard Body */
.admin-content {
    padding: 1.8rem 2.2rem;
    flex: 1;
    overflow-y: auto;
}

/* ==========================================================================
   3. KPI METRICS CARDS
   ========================================================================== */

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1.2rem;
    margin-bottom: 2rem;
}

.metric-card {
    background: var(--card-gradient);
    border: 1px solid var(--color-border-subtle);
    border-radius: var(--radius-md);
    padding: 1.4rem 1.6rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    transition: var(--transition-fast);
}

.metric-card:hover {
    border-color: var(--color-gold);
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.4);
}

.metric-info h6 {
    font-size: 0.76rem;
    letter-spacing: 0.2px;
    text-transform: none;
    color: #94A3B8;
    margin-bottom: 6px;
    font-weight: 600;
}

.metric-value {
    font-size: 1.55rem;
    font-family: var(--font-sans);
    font-weight: 700;
    color: #FFFFFF;
    line-height: 1.2;
    margin-bottom: 4px;
}

.metric-trend {
    font-size: 0.75rem;
    color: #22C55E;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.metric-icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    background: rgba(197, 164, 126, 0.12);
    border: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-gold);
    font-size: 1.2rem;
}

/* ==========================================================================
   4. DATA TABLES & ACTION BUTTONS
   ========================================================================== */

.admin-card {
    background: var(--card-gradient);
    border: 1px solid var(--color-border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 2rem;
}

.admin-card-header {
    padding: 1.2rem 1.6rem;
    border-bottom: 1px solid var(--color-border-subtle);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.admin-card-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #FFFFFF;
    font-family: var(--font-sans);
    letter-spacing: 0.2px;
}

.table-search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--color-border-subtle);
    border-radius: var(--radius-sm);
    padding: 6px 14px;
}

.table-search-box input {
    background: transparent;
    border: none;
    outline: none;
    color: #FFFFFF;
    font-size: 0.84rem;
    width: 200px;
}

.table-responsive {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.82rem;
}

.admin-table th {
    background: rgba(255, 255, 255, 0.02);
    padding: 11px 16px;
    font-weight: 600;
    font-size: 0.76rem;
    letter-spacing: 0.2px;
    text-transform: none;
    color: var(--color-gold-light);
    border-bottom: 1px solid var(--color-border-subtle);
}

.admin-table td {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    color: #CBD5E1;
    vertical-align: middle;
}

.admin-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.025);
}

/* Status Badges */
.badge-status {
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.2px;
    text-transform: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.badge-pending {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: #F59E0B;
}

.badge-approved {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.4);
    color: #22C55E;
}

.badge-rejected {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #EF4444;
}

.badge-in-progress {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.4);
    color: #3B82F6;
}

/* Tab Panels */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 992px) {
    .login-split-wrapper {
        flex-direction: column;
    }
    .login-left-panel {
        display: none;
    }
    .login-right-panel {
        padding: 2rem 1.5rem;
    }
    .admin-sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        bottom: 0;
    }
    .admin-sidebar.open {
        left: 0;
    }
}
