/* ============================================
   BarberGo - Modern Dashboard Theme
   ============================================ */

/* === BASE === */
:root {
    --sidebar-width: 260px;
    --sidebar-bg: linear-gradient(180deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
    --sidebar-hover: rgba(255,255,255,0.08);
    --sidebar-active: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --accent: #667eea;
    --accent-2: #764ba2;
    --body-bg: #f0f2f5;
    --card-radius: 12px;
    --transition: all 0.2s ease;
}

html { font-size: 14px; }
@media (min-width: 768px) { html { font-size: 15px; } }

body {
    margin: 0;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--body-bg);
    color: #333;
}

/* === SIDEBAR === */
#sidebar {
    background: var(--sidebar-bg) !important;
    min-width: var(--sidebar-width) !important;
    max-width: var(--sidebar-width);
    min-height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    overflow-y: auto;
    box-shadow: 4px 0 20px rgba(0,0,0,0.15);
}

#sidebar .sidebar-brand {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

#sidebar .sidebar-brand h4 {
    font-weight: 700;
    letter-spacing: -0.5px;
    margin: 0;
    font-size: 1.4rem;
}

#sidebar .sidebar-brand h4 i {
    background: var(--sidebar-active);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

#sidebar .nav-section-label {
    display: block;
    font-size: 0.65rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.35);
    padding: 0.75rem 1rem 0.4rem;
    font-weight: 600;
}

#sidebar .nav-link {
    color: rgba(255,255,255,0.7) !important;
    padding: 0.6rem 1rem !important;
    margin: 2px 0.5rem;
    border-radius: 8px !important;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

#sidebar .nav-link i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

#sidebar .nav-link:hover {
    color: #fff !important;
    background: var(--sidebar-hover);
    transform: translateX(3px);
}

#sidebar .nav-link.active {
    color: #fff !important;
    background: var(--sidebar-active) !important;
    box-shadow: 0 4px 15px rgba(102,126,234,0.4);
    font-weight: 600;
}

#sidebar .nav-link.nav-logout {
    color: rgba(255,100,100,0.8) !important;
}
#sidebar .nav-link.nav-logout:hover {
    color: #ff6b6b !important;
    background: rgba(255,100,100,0.1);
}

#sidebar .sidebar-divider {
    border-color: rgba(255,255,255,0.08);
    margin: 0.5rem 1rem;
}

/* === MAIN CONTENT WRAPPER === */
.main-wrapper {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* === TOP NAVBAR === */
.top-navbar {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: 0.8rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    position: sticky;
    top: 0;
    z-index: 100;
}

.top-navbar .user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: #555;
}

.top-navbar .user-info .avatar-circle {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--sidebar-active);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
}

.badge-admin {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24) !important;
    font-size: 0.65rem;
    padding: 3px 8px;
    border-radius: 20px;
    font-weight: 600;
}

/* === CONTENT AREA === */
.content-area {
    padding: 1.5rem 2rem;
    flex: 1;
}

/* === CARDS === */
.card {
    border: none;
    border-radius: var(--card-radius);
    box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    transition: var(--transition);
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* Stat / KPI Cards */
.stat-card {
    border: none;
    border-radius: var(--card-radius);
    overflow: hidden;
    position: relative;
}

.stat-card .card-body {
    padding: 1.2rem 1.4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-card .stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.stat-card .stat-label {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #8b8fa3;
    margin-bottom: 4px;
}

.stat-card .stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: #1a1a2e;
    line-height: 1;
}

.stat-card.stat-primary { background: linear-gradient(135deg, rgba(102,126,234,0.08), rgba(118,75,162,0.05)); }
.stat-card.stat-primary .stat-icon { background: rgba(102,126,234,0.15); color: #667eea; }

.stat-card.stat-success { background: linear-gradient(135deg, rgba(46,213,115,0.08), rgba(38,166,91,0.05)); }
.stat-card.stat-success .stat-icon { background: rgba(46,213,115,0.15); color: #2ed573; }

.stat-card.stat-warning { background: linear-gradient(135deg, rgba(255,165,2,0.08), rgba(255,140,0,0.05)); }
.stat-card.stat-warning .stat-icon { background: rgba(255,165,2,0.15); color: #ffa502; }

.stat-card.stat-danger { background: linear-gradient(135deg, rgba(255,71,87,0.08), rgba(238,90,36,0.05)); }
.stat-card.stat-danger .stat-icon { background: rgba(255,71,87,0.15); color: #ff4757; }

.stat-card.stat-info { background: linear-gradient(135deg, rgba(30,144,255,0.08), rgba(24,119,242,0.05)); }
.stat-card.stat-info .stat-icon { background: rgba(30,144,255,0.15); color: #1e90ff; }

.stat-card.stat-dark { background: linear-gradient(135deg, rgba(47,53,66,0.08), rgba(30,30,30,0.05)); }
.stat-card.stat-dark .stat-icon { background: rgba(47,53,66,0.15); color: #2f3542; }

/* === TABLES === */
.table {
    margin-bottom: 0;
}

.table thead th {
    border-bottom: 2px solid #e5e7eb;
    color: #6b7280;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.9rem 1rem;
    background: #fafbfc;
}

.table tbody td {
    padding: 0.85rem 1rem;
    vertical-align: middle;
    border-color: #f0f0f0;
    font-size: 0.9rem;
}

.table-hover tbody tr:hover {
    background: rgba(102,126,234,0.04);
}

/* === BADGES === */
.badge {
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
}

/* === BUTTONS === */
.btn {
    border-radius: 8px;
    font-weight: 600;
    transition: var(--transition);
    font-size: 0.9rem;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    box-shadow: 0 2px 8px rgba(102,126,234,0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a6fd6 0%, #6a4292 100%);
    box-shadow: 0 4px 15px rgba(102,126,234,0.4);
    transform: translateY(-1px);
}

.btn-outline-primary {
    border-color: #667eea;
    color: #667eea;
}
.btn-outline-primary:hover {
    background: #667eea;
    border-color: #667eea;
}

.btn-sm {
    padding: 0.35rem 0.65rem;
    font-size: 0.82rem;
    border-radius: 6px;
}

/* === FORMS === */
.form-control, .form-select {
    border-radius: 8px;
    border: 1.5px solid #e0e3e8;
    padding: 0.6rem 0.9rem;
    transition: var(--transition);
    font-size: 0.9rem;
}

.form-control:focus, .form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.15);
}

.form-label {
    font-weight: 600;
    font-size: 0.85rem;
    color: #555;
    margin-bottom: 0.3rem;
}

.input-group-text {
    border-radius: 8px 0 0 8px;
    border: 1.5px solid #e0e3e8;
    background: #f8f9fa;
    color: #888;
}

/* === ALERTS === */
.alert {
    border-radius: var(--card-radius);
    border: none;
    font-weight: 500;
}

.alert-success {
    background: rgba(46,213,115,0.12);
    color: #1a8a4a;
}

.alert-danger {
    background: rgba(255,71,87,0.12);
    color: #cc2936;
}

.alert-info {
    background: rgba(30,144,255,0.1);
    color: #1a6db5;
}

/* === PAGE HEADERS === */
.page-header {
    margin-bottom: 1.5rem;
}

.page-header h2 {
    font-weight: 700;
    font-size: 1.5rem;
    color: #1a1a2e;
    margin: 0;
}

.page-header .page-subtitle {
    color: #8b8fa3;
    font-size: 0.9rem;
    margin-top: 2px;
}

/* === LOGIN / AUTH PAGES === */
.auth-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    border-radius: 16px;
    border: none;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0,0,0,0.3);
}

.auth-card .card-body {
    padding: 2.5rem;
}

.auth-logo {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: var(--sidebar-active);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.8rem;
    color: #fff;
}

.auth-card h3 {
    font-weight: 700;
    font-size: 1.5rem;
}

.auth-card .btn-primary {
    padding: 0.7rem;
    font-size: 1rem;
}

/* === SCROLLBAR === */
#sidebar::-webkit-scrollbar {
    width: 4px;
}
#sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.15);
    border-radius: 4px;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    #sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    #sidebar.show {
        transform: translateX(0);
    }
    .main-wrapper {
        margin-left: 0;
    }
}
