/**
 * AUBA Beauty Studio - Admin Dashboard Styles
 */

:root {
    --color-bg: #f5f5f7;
    --color-bg-dark: #1d1d1f;
    --color-sidebar: #2C2C3E;
    --color-card: #ffffff;
    --color-text-main: #1d1d1f;
    --color-text-secondary: #6e6e73;
    --color-accent: #D4AF37;
    --color-accent-light: #F5E6C8;
    --color-success: #34C759;
    --color-warning: #FF9500;
    --color-error: #FF3B30;
    --color-border: #e5e5e7;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--color-bg);
    color: var(--color-text-main);
    display: flex;
    min-height: 100vh;
}

/* ============================================
   SIDEBAR
   ============================================ */

.sidebar {
    width: 260px;
    background: var(--color-sidebar);
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
    transition: transform 0.3s ease;
}

.sidebar.hidden {
    transform: translateX(-100%);
}

.sidebar-header {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.sidebar-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-accent);
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    border-radius: var(--radius-sm);
    margin-bottom: 4px;
    transition: all 0.2s;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.nav-item.active {
    background: var(--color-accent);
    color: var(--color-sidebar);
    font-weight: 500;
}

.nav-icon {
    font-size: 18px;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-logout {
    width: 100%;
    padding: 12px;
    background: rgba(255, 59, 48, 0.2);
    color: #FF6961;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s;
}

.btn-logout:hover {
    background: rgba(255, 59, 48, 0.3);
}

/* ============================================
   MAIN CONTENT
   ============================================ */

.main-content {
    flex: 1;
    margin-left: 260px;
    min-height: 100vh;
}

.admin-header {
    background: white;
    padding: 16px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

.header-left h1 {
    font-size: 24px;
    font-weight: 600;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-badge {
    background: var(--color-accent-light);
    color: var(--color-sidebar);
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

/* ============================================
   LOGIN SECTION
   ============================================ */

.login-section {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 70px);
    padding: 24px;
}

.login-card {
    background: white;
    padding: 48px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    max-width: 400px;
    width: 100%;
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo {
    width: 80px;
    margin-bottom: 16px;
}

.login-header h2 {
    margin-bottom: 8px;
}

.login-header p {
    color: var(--color-text-secondary);
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
}

.login-form input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 16px;
    transition: border-color 0.2s;
}

.login-form input:focus {
    outline: none;
    border-color: var(--color-accent);
}

.error-message {
    background: #FFEBEE;
    color: var(--color-error);
    padding: 12px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 14px;
}

.hidden {
    display: none !important;
}

/* ============================================
   CONTENT SECTIONS
   ============================================ */

.content-section {
    padding: 32px;
}

.section-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.section-header-row h2 {
    font-size: 20px;
}

.filters {
    display: flex;
    gap: 12px;
}

.filters input,
.filters select {
    padding: 10px 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 14px;
}

/* ============================================
   STATS GRID
   ============================================ */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: white;
    padding: 24px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-icon {
    font-size: 32px;
    background: var(--color-accent-light);
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--color-text-main);
}

.stat-label {
    font-size: 14px;
    color: var(--color-text-secondary);
}

/* ============================================
   DASHBOARD GRID
   ============================================ */

.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

.card {
    background: white;
    padding: 24px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.card h3 {
    margin-bottom: 20px;
    font-size: 16px;
}

.booking-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--color-border);
}

.booking-item:last-child {
    border-bottom: none;
}

.booking-info strong {
    display: block;
    margin-bottom: 4px;
}

.booking-info span {
    font-size: 13px;
    color: var(--color-text-secondary);
}

.booking-time {
    text-align: right;
    font-size: 13px;
    color: var(--color-text-secondary);
}

.booking-time span {
    display: block;
}

.quick-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.action-btn {
    padding: 14px 20px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    text-align: left;
    text-decoration: none;
    color: var(--color-text-main);
    transition: all 0.2s;
    display: block;
}

.action-btn:hover {
    background: var(--color-accent-light);
    border-color: var(--color-accent);
}

/* ============================================
   TABLES
   ============================================ */

.table-container {
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}

.data-table th {
    background: var(--color-bg);
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    color: var(--color-text-secondary);
}

.data-table td {
    font-size: 14px;
}

.data-table td small {
    display: block;
    color: var(--color-text-secondary);
    font-size: 12px;
}

.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
}

.status-pending {
    background: #FFF3E0;
    color: #E65100;
}

.status-confirmed {
    background: #E8F5E9;
    color: #2E7D32;
}

.status-completed {
    background: #E3F2FD;
    color: #1565C0;
}

.status-cancelled {
    background: #FFEBEE;
    color: #C62828;
}

.btn-icon {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    padding: 4px 8px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.btn-icon:hover {
    opacity: 1;
}

/* ============================================
   CARDS GRID (Manicurists)
   ============================================ */

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.manicurist-card {
    background: white;
    padding: 24px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.manicurist-avatar {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #FF9A9E 0%, #FECFEF 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 600;
    color: white;
    margin: 0 auto 16px;
}

.manicurist-card h4 {
    margin-bottom: 4px;
}

.manicurist-card p {
    color: var(--color-text-secondary);
    font-size: 14px;
    margin-bottom: 8px;
}

.manicurist-card .phone {
    font-size: 13px;
}

.manicurist-card .status-badge {
    margin-top: 12px;
}

.card-actions {
    margin-top: 16px;
    display: flex;
    justify-content: center;
    gap: 8px;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn-primary {
    background: var(--color-sidebar);
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary:hover {
    background: var(--color-accent);
}

.btn-secondary {
    background: white;
    color: var(--color-text-main);
    padding: 12px 24px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: var(--color-bg);
}

/* ============================================
   MODAL
   ============================================ */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--color-border);
}

.modal-header h3 {
    font-size: 18px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--color-text-secondary);
}

.modal-form {
    padding: 24px;
}

.modal-form .form-group {
    margin-bottom: 20px;
}

.modal-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
}

.modal-form input,
.modal-form textarea,
.modal-form select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 14px;
}

.modal-form textarea {
    min-height: 100px;
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding-top: 16px;
    border-top: 1px solid var(--color-border);
    margin-top: 24px;
}

/* ============================================
   UTILITIES
   ============================================ */

.loading-text,
.empty-text {
    color: var(--color-text-secondary);
    font-size: 14px;
    padding: 20px 0;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .menu-toggle {
        display: block;
    }

    .admin-header {
        padding: 16px;
    }

    .header-left h1 {
        font-size: 18px;
    }

    .content-section {
        padding: 16px;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .stat-card {
        padding: 16px;
    }

    .stat-value {
        font-size: 22px;
    }

    .login-card {
        padding: 32px 24px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}