/* =============================================
   Sreeyas Beauty & Fitness Studio — Design System
   Premium Pink, Gold & White Beauty Theme
   ============================================= */

/* === CSS Custom Properties === */
:root {
    /* Colors — Pink, Gold & White Beauty Theme */
    --bg-primary: #fff8f9;
    --bg-secondary: #ffffff;
    --bg-tertiary: #fef1f3;
    --bg-card: rgba(255, 255, 255, 0.95);
    --bg-card-hover: rgba(255, 240, 243, 0.95);
    --bg-glass: rgba(255, 255, 255, 0.8);
    --bg-input: #ffffff;
    --bg-sidebar: #ffffff;

    /* Accent Colors — Sreeyas Theme */
    --accent-gold: #D81B60; /* Magenta Accent */
    --accent-gold-light: #F06292;
    --accent-gold-dark: #AD1457;
    --accent-gold-glow: rgba(216, 27, 96, 0.12);
    --accent-teal: #4A148C; /* Deep Purple Accent */
    --accent-teal-light: #7C4DFF;
    --accent-teal-glow: rgba(74, 20, 140, 0.10);
    --accent-purple: #4A148C;
    --accent-purple-glow: rgba(74, 20, 140, 0.12);
    --accent-rose: #D81B60;
    --accent-rose-glow: rgba(216, 27, 96, 0.10);
    --accent-blue: #7C4DFF;
    --accent-blue-glow: rgba(124, 77, 255, 0.10);

    /* Text */
    --text-primary: #2d2d2d;
    --text-secondary: #6b5b5e;
    --text-muted: #b08d94;
    --text-accent: var(--accent-gold);

    /* Borders */
    --border-color: rgba(216, 27, 96, 0.12);
    --border-light: rgba(216, 27, 96, 0.06);
    --border-accent: rgba(216, 27, 96, 0.30);

    /* Status Colors */
    --status-success: #7C4DFF;
    --status-success-bg: rgba(124, 77, 255, 0.10);
    --status-warning: #d97706;
    --status-warning-bg: rgba(217, 119, 6, 0.10);
    --status-danger: #dc2626;
    --status-danger-bg: rgba(220, 38, 38, 0.10);
    --status-info: #D81B60;
    --status-info-bg: rgba(216, 27, 96, 0.10);

    /* Typography */
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: 'Outfit', 'Inter', sans-serif;
    --fs-xs: 0.75rem;
    --fs-sm: 0.8125rem;
    --fs-base: 0.875rem;
    --fs-md: 1rem;
    --fs-lg: 1.125rem;
    --fs-xl: 1.25rem;
    --fs-2xl: 1.5rem;
    --fs-3xl: 1.875rem;
    --fs-4xl: 2.25rem;

    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;

    /* Radii */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(216, 27, 96, 0.06);
    --shadow-md: 0 4px 12px rgba(216, 27, 96, 0.10);
    --shadow-lg: 0 8px 30px rgba(216, 27, 96, 0.12);
    --shadow-glow-gold: 0 0 20px rgba(216, 27, 96, 0.20);
    --shadow-glow-teal: 0 0 20px rgba(74, 20, 140, 0.20);

    /* Layout */
    --sidebar-width: 260px;
    --sidebar-collapsed: 72px;
    --header-height: 64px;
    --transition-fast: 0.15s ease;
    --transition-base: 0.25s ease;
    --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === Reset & Base === */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow: auto;
    min-height: 100vh;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    line-height: 1.3;
    font-weight: 600;
}

a {
    color: var(--accent-gold);
    text-decoration: none;
}

a:hover {
    color: var(--accent-gold-light);
}

input,
select,
textarea,
button {
    font-family: var(--font-body);
    font-size: var(--fs-base);
}

/* === App Layout === */
#app {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* === Sidebar === */
.sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: relative;
    z-index: 100;
    transition: width var(--transition-base), min-width var(--transition-base);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-5) var(--space-5);
    border-bottom: 1px solid var(--border-color);
    height: var(--header-height);
}

.brand-icon {
    font-size: 1.75rem;
    animation: pulse-glow 3s infinite;
}

@keyframes pulse-glow {

    0%,
    100% {
        filter: drop-shadow(0 0 4px rgba(216, 27, 96, 0.4));
    }

    50% {
        filter: drop-shadow(0 0 12px rgba(216, 27, 96, 0.7));
    }
}

.brand-name {
    font-family: var(--font-heading);
    font-size: var(--fs-xl);
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-gold-light), var(--accent-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-3) var(--space-3);
}

.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: var(--radius-full);
}

.nav-section-label {
    font-size: var(--fs-xs);
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: var(--space-4) var(--space-3) var(--space-2);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-3);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    margin-bottom: 2px;
    font-size: var(--fs-base);
    font-weight: 500;
    position: relative;
    user-select: none;
}

.nav-item:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--accent-gold-glow);
    color: var(--accent-gold);
    font-weight: 600;
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: var(--accent-gold);
    border-radius: var(--radius-full);
}

.nav-icon {
    font-size: 1.15rem;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.nav-badge {
    margin-left: auto;
    background: var(--accent-rose);
    color: white;
    font-size: var(--fs-xs);
    font-weight: 600;
    padding: 1px 7px;
    border-radius: var(--radius-full);
    min-width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: var(--space-3);
    border-top: 1px solid var(--border-color);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.sidebar-user:hover {
    background: var(--bg-card);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-teal));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: var(--fs-sm);
    color: #ffffff;
    flex-shrink: 0;
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-weight: 600;
    font-size: var(--fs-sm);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: var(--fs-xs);
    color: var(--text-muted);
}

/* === Main Content === */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}

.top-header {
    height: var(--header-height);
    min-height: var(--header-height);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-6);
    gap: var(--space-4);
}

.header-left {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.hamburger {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: var(--space-2);
}

.page-title-area h1 {
    font-size: var(--fs-xl);
    font-weight: 700;
}

.page-title-area p {
    font-size: var(--fs-xs);
    color: var(--text-muted);
}

.header-right {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.branch-selector {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-md);
    font-size: var(--fs-sm);
    cursor: pointer;
    outline: none;
    transition: border-color var(--transition-fast);
}

.branch-selector:focus {
    border-color: var(--accent-gold);
}

.header-icon-btn {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    width: 38px;
    height: 38px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.125rem;
    transition: all var(--transition-fast);
}

.header-icon-btn:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border-color: var(--accent-gold);
}

.notification-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    background: var(--accent-rose);
    border-radius: 50%;
    border: 2px solid #ffffff;
}

/* === Page Content === */
.page-content {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-6);
    background: var(--bg-primary);
}

.page-content::-webkit-scrollbar {
    width: 6px;
}

.page-content::-webkit-scrollbar-track {
    background: transparent;
}

.page-content::-webkit-scrollbar-thumb {
    background: rgba(216, 27, 96, 0.15);
    border-radius: var(--radius-full);
}

.page-content::-webkit-scrollbar-thumb:hover {
    background: rgba(216, 27, 96, 0.25);
}

/* === Animations === */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.animate-fade {
    animation: fadeIn 0.4s ease;
}

.animate-slide-up {
    animation: slideUp 0.4s ease;
}

.animate-scale {
    animation: scaleIn 0.3s ease;
}

/* Staggered animations */
.stagger-1 {
    animation-delay: 0.05s;
}

.stagger-2 {
    animation-delay: 0.1s;
}

.stagger-3 {
    animation-delay: 0.15s;
}

.stagger-4 {
    animation-delay: 0.2s;
}

.stagger-5 {
    animation-delay: 0.25s;
}

.stagger-6 {
    animation-delay: 0.3s;
}

/* === Modal === */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(45, 30, 35, 0.4);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: var(--space-6);
}

.modal-overlay.open {
    display: flex;
    animation: fadeIn 0.2s ease;
}

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 560px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    animation: scaleIn 0.25s ease;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-5) var(--space-6);
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    font-size: var(--fs-lg);
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.25rem;
    cursor: pointer;
    padding: var(--space-1);
    transition: color var(--transition-fast);
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: var(--space-6);
    overflow-y: auto;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-6);
    border-top: 1px solid var(--border-color);
}

/* === Toast === */
.toast-container {
    position: fixed;
    top: var(--space-6);
    right: var(--space-6);
    z-index: 1100;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

/* === Autocomplete === */
.autocomplete-list {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    z-index: 50;
    margin-top: 4px;
}

.autocomplete-item {
    padding: var(--space-2) var(--space-3);
    cursor: pointer;
    font-size: var(--fs-sm);
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-light);
    transition: background var(--transition-fast);
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover, .autocomplete-item.active {
    background-color: var(--bg-card-hover);
    color: var(--accent-gold);
}

.toast {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-4) var(--space-5);
    min-width: 300px;
    box-shadow: var(--shadow-lg);
    animation: slideDown 0.3s ease;
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.toast.success {
    border-left: 3px solid var(--status-success);
}

.toast.error {
    border-left: 3px solid var(--status-danger);
}

.toast.warning {
    border-left: 3px solid var(--status-warning);
}

.toast.info {
    border-left: 3px solid var(--status-info);
}

.toast-icon {
    font-size: 1.1rem;
}

.toast-message {
    flex: 1;
    font-size: var(--fs-sm);
}

/* === Responsive === */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -100%;
        transition: left var(--transition-base);
    }

    .sidebar.open {
        left: 0;
    }

    .hamburger {
        display: block;
    }

    .page-content {
        padding: var(--space-4);
    }

    .header-right .branch-selector {
        display: none;
    }
}