/* ================================================
   NAILS STUDIO – ADMIN DASHBOARD (DEEP DARK)
   ================================================ */

:root {
    --bg-dark:     #0F0A0A;
    --side-dark:   #1A1313;
    --card-dark:   #211919;
    --hover-dark:  #2C2222;
    --border-dark: #352A2A;
    --rose-gold:   #C4956A;
    --rose-gold-d: #A07850;
    --text-high:   #F5EEE8;
    --text-mid:    #A68E8E;
    --text-low:    #6D5959;
    --white:       #FFFFFF;
    
    --shadow-admin: 0 10px 40px rgba(0,0,0,0.4);
    --radius-admin: 14px;
}

/* ===== RESET & BASE ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }
body.admin-body {
    background: var(--bg-dark);
    color: var(--text-high);
    font-family: 'Inter', sans-serif;
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ===== SIDEBAR ===== */
.sidebar {
    width: 280px;
    background: var(--side-dark);
    border-right: 1px solid var(--border-dark);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
}
.sidebar-header {
    padding: 32px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}
.admin-logo {
    width: 42px; height: 42px;
    background: var(--rose-gold);
    color: var(--white);
    display: flex; align-items: center; justify-content: center;
    border-radius: 10px;
    font-family: 'Cormorant Garamond', serif;
    font-weight: 700; font-size: 1.4rem;
}
.admin-logo span { color: var(--side-dark); }
.logo-text { font-weight: 600; font-size: 1.1rem; }
.logo-text span { display: block; font-size: 0.75rem; color: var(--text-mid); font-weight: 400; text-transform: uppercase; letter-spacing: 1px; }

.sidebar-nav { flex: 1; padding: 20px 16px; }
.sidebar-nav ul { list-style: none; }
.sidebar-nav li { margin-bottom: 8px; }
.sidebar-nav a {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 16px;
    border-radius: 10px;
    color: var(--text-mid);
    text-decoration: none;
    font-size: 0.93rem;
    font-weight: 500;
    transition: all 0.3s ease;
}
.sidebar-nav a:hover, .sidebar-nav a.active {
    background: var(--hover-dark);
    color: var(--rose-gold);
}
.sidebar-nav a i { font-size: 1.1rem; width: 20px; text-align: center; }

.sidebar-footer { padding: 24px; border-top: 1px solid var(--border-dark); }
.user-profile { display: flex; align-items: center; gap: 12px; }
.avatar { 
    width: 40px; height: 40px; 
    background: var(--hover-dark); 
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    color: var(--rose-gold);
    border: 1px solid var(--border-dark);
}
.user-info { flex: 1; min-width: 0; }
.user-info strong { display: block; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-info span { font-size: 0.75rem; color: var(--text-low); display: block; }
.logout-btn { background: none; border: none; color: var(--text-low); cursor: pointer; font-size: 1.1rem; transition: color 0.3s; }
.logout-btn:hover { color: #ff5e5e; }

/* ===== MAIN CONTENT ===== */
.admin-main { margin-left: 280px; flex: 1; padding: 40px; }

.topbar { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 40px; }
.topbar h2 { font-size: 1.8rem; font-family: 'Inter', sans-serif; font-weight: 600; margin-bottom: 4px; }
.current-date { font-size: 0.9rem; color: var(--text-mid); }

.topbar-right { display: flex; align-items: center; gap: 24px; }
.search-box { 
    background: var(--side-dark); 
    border: 1px solid var(--border-dark); 
    padding: 10px 16px; border-radius: 30px;
    display: flex; align-items: center; gap: 10px;
    width: 320px;
}
.search-box input { background: none; border: none; color: var(--text-high); outline: none; width: 100%; font-size: 0.9rem; }
.notification-bell { position: relative; color: var(--text-mid); cursor: pointer; font-size: 1.2rem; }
.notification-bell .badge { position: absolute; top: -5px; right: -5px; background: #e74c3c; color: white; border-radius: 50%; width: 16px; height: 16px; font-size: 0.7rem; display: flex; align-items: center; justify-content: center; font-weight: 700; }

/* ===== MODULES ===== */
.module { display: none; animation: fadeInModule 0.5s ease-out; }
.module.active { display: block; }

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

/* ===== BENTO DASHBOARD ===== */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto auto;
    gap: 24px;
}
.bento-item {
    background: var(--card-dark);
    padding: 30px;
    border-radius: var(--radius-admin);
    border: 1px solid var(--border-dark);
    box-shadow: var(--shadow-admin);
    transition: transform 0.3s ease;
}
.bento-item:hover { transform: translateY(-4px); }

.stat-card .item-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.stat-card .label { font-size: 0.9rem; color: var(--text-mid); font-weight: 500; }
.stat-card .icon { color: var(--rose-gold); background: var(--hover-dark); padding: 10px; border-radius: 8px; font-size: 1.1rem; }
.stat-card .value { font-size: 2.2rem; font-weight: 700; margin-bottom: 8px; color: var(--white); }
.stat-card .delta { font-size: 0.8rem; font-weight: 600; display: flex; align-items: center; gap: 4px; }
.delta.positive { color: #2ecc71; }
.delta.negative { color: #e74c3c; }

.main-chart { grid-column: span 2; grid-row: span 1; }
.main-chart h3 { font-size: 1.1rem; color: var(--text-high); margin-bottom: 24px; }

.chart-container { display: flex; flex-direction: column; gap: 16px; }
.bar-row { display: flex; align-items: center; gap: 16px; }
.bar-label { width: 80px; font-size: 0.85rem; color: var(--text-mid); }
.bar-track { flex: 1; height: 8px; background: var(--hover-dark); border-radius: 10px; overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(to right, var(--rose-gold), #EDD9C0); border-radius: 10px; transition: width 1s ease; }
.bar-value { width: 30px; font-size: 0.85rem; color: var(--rose-gold); text-align: right; }

.quick-actions h3 { font-size: 1.1rem; margin-bottom: 24px; }
.action-btns { display: flex; flex-direction: column; gap: 12px; }
.btn-action { 
    background: var(--rose-gold); color: white; border: none; padding: 14px; 
    border-radius: 8px; font-weight: 600; font-size: 0.9rem; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    transition: all 0.3s;
}
.btn-action:hover { background: var(--rose-gold-d); transform: scale(1.02); }
.btn-outline { background: none; border: 1px solid var(--border-dark); color: var(--text-high); }
.btn-outline:hover { background: var(--hover-dark); }

/* ===== TABLES ===== */
.table-container { background: var(--card-dark); border-radius: var(--radius-admin); border: 1px solid var(--border-dark); overflow: hidden; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th { background: var(--side-dark); padding: 16px 24px; text-align: left; font-size: 0.8rem; color: var(--text-low); text-transform: uppercase; letter-spacing: 1px; }
.admin-table td { padding: 20px 24px; border-bottom: 1px solid var(--border-dark); font-size: 0.95rem; }
.client strong { display: block; font-size: 0.95rem; margin-bottom: 4px; }
.client span { font-size: 0.8rem; color: var(--text-low); }

.badge { padding: 4px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; }
.badge-success { background: rgba(46, 204, 113, 0.1); color: #2ecc71; border: 1px solid rgba(46, 204, 113, 0.2); }
.badge-warning { background: rgba(241, 196, 15, 0.1); color: #f1c40f; border: 1px solid rgba(241, 196, 15, 0.2); }

.btn-icon { background: none; border: none; color: var(--text-low); font-size: 1.1rem; cursor: pointer; }
.btn-icon:hover { color: var(--rose-gold); }

/* Services List */
.service-row-item { 
    background: var(--card-dark); padding: 20px 24px; border-radius: 12px; margin-bottom: 12px;
    display: flex; align-items: center; justify-content: space-between; border: 1px solid var(--border-dark);
}
.s-info strong { display: block; font-size: 1.1rem; color: var(--rose-gold); margin-bottom: 4px; }
.s-info span { color: var(--text-mid); font-size: 0.9rem; }
.s-price { font-weight: 700; font-size: 1.1rem; color: var(--text-high); }
.s-actions { display: flex; gap: 10px; }
.btn-small { background: var(--hover-dark); border: none; color: var(--text-high); width: 36px; height: 36px; border-radius: 8px; cursor: pointer; transition: 0.3s; }
.btn-small:hover { background: var(--rose-gold); }
.btn-danger:hover { background: #e74c3c; }

.btn-primary-small { background: var(--rose-gold); color: white; border: none; padding: 8px 16px; border-radius: 6px; font-weight: 600; font-size: 0.85rem; cursor: pointer; }
.btn-outline-small { background: none; border: 1px solid var(--border-dark); color: var(--text-high); padding: 8px 16px; border-radius: 6px; font-weight: 600; font-size: 0.85rem; cursor: pointer; }
/* ===== RESPONSIVE ADMIN ===== */
.sidebar-toggle {
    display: none;
    background: var(--hover-dark);
    border: 1px solid var(--border-dark);
    color: var(--text-high);
    width: 44px; height: 44px;
    border-radius: 10px;
    align-items: center; justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
}

@media (max-width: 1024px) {
    .sidebar { width: 80px; }
    .logo-text, .user-info, .sidebar-nav a span, .sidebar-header span { display: none; }
    .sidebar-nav a { justify-content: center; padding: 16px; }
    .sidebar-nav a i { font-size: 1.3rem; }
    .admin-main { margin-left: 80px; }
    .sidebar-header { justify-content: center; padding: 24px 0; }
    .sidebar-footer { padding: 16px 0; justify-content: center; }
    .logout-btn { margin-left: 0; }
}

@media (max-width: 768px) {
    .sidebar { left: -280px; width: 280px; transition: left 0.3s ease; box-shadow: 20px 0 50px rgba(0,0,0,0.5); }
    .sidebar.open { left: 0; }
    .logo-text, .user-info, .sidebar-nav a span { display: block; }
    .sidebar-nav a { justify-content: flex-start; }
    
    .admin-main { margin-left: 0; padding: 20px; }
    .sidebar-toggle { display: flex; margin-right: 15px; }
    
    .topbar { flex-direction: column; gap: 20px; align-items: flex-start; }
    .topbar-right { width: 100%; flex-direction: column-reverse; gap: 15px; align-items: flex-start; }
    .search-box { width: 100%; }
    
    .bento-grid { grid-template-columns: 1fr; }
    .main-chart { grid-column: span 1; }
    
    /* Tables on mobile */
    .table-container { overflow-x: auto; }
    .admin-table { min-width: 600px; }
}

@media (max-width: 480px) {
    .topbar h2 { font-size: 1.4rem; }
    .bento-item { padding: 20px; }
    .stat-card .value { font-size: 1.8rem; }
    .service-row-item { flex-direction: column; align-items: flex-start; gap: 15px; }
    .s-actions { width: 100%; justify-content: space-between; }
}
