/* ==========================================================================
   SAJ BEAUTY PARLOUR - PREMIUM 1040PX THEME
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #5856d6;
    --primary-hover: #4645ab;
    --primary-light: #eef2ff;
    
    --success: #10b981;
    --success-light: #ecfdf5;
    --danger: #ef4444;
    --danger-light: #fef2f2;
    
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* 1. Base & Typography */
body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.5;
    margin: 0;
    padding: 0;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: var(--text-main);
    letter-spacing: -0.025em;
}

/* The 1040px Centered Container */
.app-container {
    max-width: 1040px;
    margin: 0 auto;
    width: 100%;
    position: relative;
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* 2. Glassmorphism Navbar */
.top-navbar {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8) !important;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    border-radius: 0 0 16px 16px;
    margin-top: 10px;
}

.brand-logo {
    color: var(--text-main) !important;
    font-weight: 800;
    font-size: 1.25rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.brand-logo span {
    font-size: 1.5rem;
    background: linear-gradient(135deg, #5856d6, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* 3. Premium Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.card-header {
    background: transparent !important;
    border-bottom: 1px solid var(--border);
    padding: 1.25rem 1.5rem;
}

.card-body {
    padding: 1.5rem;
}

/* 4. Dashboard Stat Cards */
.stat-card {
    position: relative;
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    height: 100%;
}

.stat-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}

.stat-card .stat-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.stat-card .stat-value {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.05em;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-card .stat-sub {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
}

.stat-card.border-success { border-top: 4px solid var(--success); }
.stat-card.border-danger { border-top: 4px solid var(--danger); }
.stat-card.border-primary { border-top: 4px solid var(--primary); }
.stat-card.border-info { border-top: 4px solid #3b82f6; }

/* 5. Stylish Grid Quick Action Buttons */
.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 24px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    height: 100%;
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.8), rgba(255,255,255,0));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.action-btn:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: #cbd5e1;
}

.action-btn:hover::before { opacity: 1; }

.action-btn .icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    font-size: 1.5rem;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    z-index: 1;
}

.action-btn:hover .icon-wrapper {
    transform: scale(1.1) rotate(5deg);
}

.action-btn span {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
    letter-spacing: -0.2px;
    position: relative;
    z-index: 1;
    text-align: center;
}

/* Action Button Colors */
.action-btn-green .icon-wrapper { background: var(--success-light); color: var(--success); }
.action-btn-green:hover { border-color: #a7f3d0; }

.action-btn-red .icon-wrapper { background: var(--danger-light); color: var(--danger); }
.action-btn-red:hover { border-color: #fecaca; }

.action-btn-blue .icon-wrapper { background: #eff6ff; color: #2563eb; }
.action-btn-blue:hover { border-color: #bfdbfe; }

.action-btn-purple .icon-wrapper { background: #faf5ff; color: #9333ea; }
.action-btn-purple:hover { border-color: #e9d5ff; }

.action-btn-orange .icon-wrapper { background: #fff7ed; color: #ea580c; }
.action-btn-orange:hover { border-color: #fed7aa; }

.action-btn-gray .icon-wrapper { background: #f1f5f9; color: #475569; }
.action-btn-gray:hover { border-color: #e2e8f0; }

/* 6. Modern Tables */
.table-responsive {
    border-radius: 16px;
    overflow-x: auto;
}

.table {
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
}

.table thead th {
    background-color: #f8fafc;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    border-top: none;
    white-space: nowrap;
}

.table tbody td {
    padding: 1rem 1.5rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--border);
    color: var(--text-main);
    font-size: 0.875rem;
}

.table-hover tbody tr { transition: background-color 0.2s ease; }
.table-hover tbody tr:hover { background-color: #f8fafc; }
.table tbody tr:last-child td { border-bottom: none; }

/* 7. Badges (Round Pill Design) */
.badge {
    padding: 0.35em 0.8em;
    font-weight: 600;
    font-size: 0.75rem;
    border-radius: 9999px;
    letter-spacing: 0.025em;
}

.badge.bg-success-subtle { background-color: var(--success-light) !important; color: var(--success) !important; border: 1px solid #a7f3d0 !important; }
.badge.bg-danger-subtle { background-color: var(--danger-light) !important; color: var(--danger) !important; border: 1px solid #fecaca !important; }
.badge.bg-primary-subtle { background-color: var(--primary-light) !important; color: var(--primary) !important; border: 1px solid #c7d2fe !important; }
.badge.bg-secondary-subtle { background-color: #f1f5f9 !important; color: #475569 !important; border: 1px solid #e2e8f0 !important; }

/* 8. Forms & Inputs */
.form-label {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.form-control, .form-select {
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background-color: #f8fafc;
    transition: all 0.2s ease;
}

.form-control:focus, .form-select:focus {
    background-color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-light);
}

/* 9. Modern Buttons */
.btn {
    font-weight: 600;
    padding: 0.625rem 1.25rem;
    border-radius: 10px;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(88, 86, 214, 0.3);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 8px -1px rgba(88, 86, 214, 0.4);
}

.btn-light {
    background-color: #ffffff;
    border-color: var(--border);
    color: var(--text-main);
}

.btn-light:hover {
    background-color: #f8fafc;
    border-color: #cbd5e1;
}

/* 10. Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.card, .action-btn, .stat-card {
    animation: fadeIn 0.4s ease-out forwards;
}

/* Staggered animation delays */
.row > div:nth-child(1) .card, .row > div:nth-child(1) .action-btn { animation-delay: 0.05s; }
.row > div:nth-child(2) .card, .row > div:nth-child(2) .action-btn { animation-delay: 0.1s; }
.row > div:nth-child(3) .card, .row > div:nth-child(3) .action-btn { animation-delay: 0.15s; }
.row > div:nth-child(4) .card, .row > div:nth-child(4) .action-btn { animation-delay: 0.2s; }
.row > div:nth-child(5) .card, .row > div:nth-child(5) .action-btn { animation-delay: 0.25s; }
.row > div:nth-child(6) .card, .row > div:nth-child(6) .action-btn { animation-delay: 0.3s; }

/* 11. Responsive Adjustments */
@media (max-width: 1040px) {
    .app-container {
        padding-left: 15px;
        padding-right: 15px;
    }
}

@media (max-width: 768px) {
    .stat-card { padding: 1rem; }
    .stat-card .stat-value { font-size: 1.5rem; }
    .action-btn { padding: 16px 8px; gap: 8px; }
    .action-btn .icon-wrapper { width: 48px; height: 48px; font-size: 1.25rem; }
    .action-btn span { font-size: 0.75rem; }
    .table thead th, .table tbody td { padding: 0.75rem 1rem; }
}