/* Garnet SoundWorks - Professional Stylesheet */

/* ============================================================================
   BASE & RESET
   ========================================================================= */


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


a {
    text-decoration: none;
}

a:hover {
    text-decoration: underline; /* or none if you never want underlines */
}

/* Modal base */
.modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal.open {
    display: flex;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
}

.modal-dialog {
    position: relative;
    background: #fff;
    border-radius: 10px;
    max-width: 480px;
    width: 100%;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.15);
    padding: 1.5rem 1.75rem;
    z-index: 1001;
}

/* Modal header */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.modal-header h2 {
    font-size: 1.25rem;
    margin: 0;
}

.modal-close {
    border: none;
    background: transparent;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
}

/* Modal content */
.modal-body {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    border: 1px solid var(--border-subtle, #ddd);
    border-radius: 6px;
    padding: 0.5rem 0.6rem;
    font-size: 0.9rem;
    background: #fff;
}

.form-group textarea {
    resize: vertical;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 1rem;
}


:root {
    /* Colors - Light Mode */
    --white: #ffffff;
    --gray-50: #f8f9fa;
    --gray-100: #f1f3f5;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;
    
    --garnet: #6b1c23;
    --garnet-dark: #4a1318;
    --garnet-light: #8b2530;
    --garnet-lighter: #a03340;
    
    --gold: #d4a574;
    --gold-light: #e8c9a8;
    --gold-dark: #b8895f;
    
    /* Semantic colors */
    --background: var(--gray-50);
    --surface: var(--white);
    --surface-raised: var(--gray-100);
    --border: var(--gray-300);
    --text: var(--gray-900);
    --text-muted: var(--gray-600);
    --accent: var(--garnet);
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    
    /* Borders */
    --radius: 0;
    --radius-sm: 0;
    --radius-lg: 0;
    
    /* Layout */
    --sidebar-width: 260px;
    --header-height: 64px;
    
    /* Transitions */
    --transition: 150ms ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: var(--text);
    background: var(--background);
    -webkit-font-smoothing: antialiased;
}

/* ============================================================================
   AUTHENTICATION PAGES
   ========================================================================= */

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl);
    background: var(--gray-100);
}

.login-container {
    width: 100%;
    max-width: 1000px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--white);
    border-radius: 8px;
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

/* Brand Panel */
.login-left {
    padding: var(--space-2xl);
    background: var(--garnet);
    border-right: none;
}

.branding h1 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
    letter-spacing: -0.02em;
    color: var(--white);
}

.branding h1 span {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.8);
    margin-top: var(--space-xs);
}

.branding p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--space-md);
}

.branding .tagline {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
}



/* Form Panel */
.login-right {
    padding: var(--space-2xl);
    display: flex;
    align-items: center;
    background: var(--white);
}

.login-form-container,
.register-form-container {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.login-form-container h2,
.register-form-container h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: var(--space-xs);
    color: var(--gray-900);
}

.subtitle {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: var(--space-xl);
}

/* ============================================================================
   FORMS
   ========================================================================= */

.form-group {
    margin-bottom: var(--space-lg);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: var(--space-sm);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.625rem 0.75rem;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 0.9375rem;
    transition: border-color var(--transition);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--gray-500);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--garnet);
    box-shadow: 0 0 0 3px rgba(107, 28, 35, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: var(--space-lg) 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.875rem;
    color: var(--text-muted);
}

.checkbox-label input {
    width: auto;
}

.forgot-link {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition);
}

.forgot-link:hover {
    color: var(--text);
}

.form-footer {
    margin-top: var(--space-xl);
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.form-footer a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition);
}

.form-footer a:hover {
    color: var(--accent);
}

/* ============================================================================
   BUTTONS
   ========================================================================= */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all var(--transition);
}

.btn-primary {
    background: var(--garnet);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--garnet-dark);
}

.btn-secondary {
    background: var(--gray-200);
    color: var(--gray-900);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--gray-300);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}

.btn-outline:hover {
    background: var(--gray-100);
}

.btn-block {
    width: 100%;
}

.btn-logout {
    width: 100%;
    padding: 0.5rem;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all var(--transition);
}

.btn-logout:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
}

/* ============================================================================
   APP LAYOUT
   ========================================================================= */

.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--garnet);
    border-right: none;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
}

.sidebar-header {
    padding: var(--space-lg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h2 {
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    text-transform: none;
    color: var(--white);
}

.sidebar-nav {
    flex: 1;
    padding: var(--space-md);
    overflow-y: auto;
}

/* Nav Items with Dropdown Support */
.nav-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 0.75rem var(--space-md);
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9375rem;
    margin-bottom: 0.25rem;
    transition: all var(--transition);
    font-weight: 400;
    cursor: pointer;
    justify-content: space-between;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
}

.nav-item.active {
    background: var(--white);
    color: var(--garnet);
    font-weight: 500;
}

/* Dropdown Container */
.nav-dropdown {
    margin-bottom: var(--space-sm);
}

.nav-dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.75rem var(--space-md);
    color: rgba(255, 255, 255, 0.8);
    background: transparent;
    border: none;
    border-radius: 6px;
    font-size: 0.9375rem;
    font-weight: 400;
    cursor: pointer;
    transition: all var(--transition);
    text-align: left;
}

.nav-dropdown-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
}

.nav-dropdown-toggle.open {
    background: rgba(255, 255, 255, 0.15);
    color: var(--white);
}

.dropdown-icon {
    font-size: 0.75rem;
    transition: transform var(--transition);
}

.nav-dropdown-toggle.open .dropdown-icon {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.nav-dropdown-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding-left: var(--space-lg);
}

.nav-dropdown-menu.open {
    max-height: 500px;
}

.nav-dropdown-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 0.625rem var(--space-md);
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.875rem;
    margin-bottom: 0.125rem;
    transition: all var(--transition);
}

.nav-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
}

.nav-dropdown-item.active {
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
    font-weight: 500;
}

.sidebar-footer {
    padding: var(--space-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.user-info {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    margin-bottom: var(--space-md);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--white);
    color: var(--garnet);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
}

.user-details {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-size: 0.9375rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--white);
}

.user-role {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
}

.content-header {
    height: var(--header-height);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0 var(--space-xl);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 10;
}

.content-header h1 {
    font-size: 1.25rem;
    font-weight: 600;
}

.page-subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: var(--space-xs);
}

.header-right {
    display: flex;
    gap: var(--space-md);
}

.content-body {
    flex: 1;
    padding: var(--space-xl);
}

/* ============================================================================
   STATS CARDS
   ========================================================================= */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.stat-card {
    padding: var(--space-lg);
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.stat-number {
    font-size: 1.875rem;
    font-weight: 600;
    margin-bottom: var(--space-xs);
    color: var(--gray-900);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 400;
}

.stat-change {
    font-size: 0.8125rem;
    margin-top: var(--space-sm);
    font-weight: 500;
}

.stat-change.positive {
    color: #22c55e;
}

.stat-change.negative {
    color: #ef4444;
}

/* ============================================================================
   CARDS
   ========================================================================= */

.card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: var(--space-lg);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.card-header {
    padding: var(--space-lg);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--white);
}

.card-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-900);
}

.card-body {
    padding: var(--space-lg);
}

.view-all {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition);
}

.view-all:hover {
    color: var(--text);
}

/* ============================================================================
   TABLES
   ========================================================================= */

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: var(--gray-50);
}

.data-table th {
    padding: 0.75rem var(--space-md);
    text-align: left;
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
    color: var(--gray-700);
    border-bottom: 1px solid var(--border);
}

.data-table td {
    padding: 0.75rem var(--space-md);
    border-bottom: 1px solid var(--border);
    color: var(--gray-900);
}

.data-table tbody tr:hover {
    background: var(--gray-50);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* ============================================================================
   BADGES
   ========================================================================= */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
}

.badge-success {
    background: #22c55e;
    color: var(--white);
    border: none;
}

.badge-warning {
    background: #eab308;
    color: var(--white);
    border: none;
}

.badge-danger {
    background: #ef4444;
    color: var(--white);
    border: none;
}

.badge-info {
    background: var(--garnet);
    color: var(--white);
    border: none;
}

/* ============================================================================
   SEARCH & FILTERS
   ========================================================================= */

.search-filter-bar {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.search-box {
    flex: 1;
}

.search-box input,
.form-control {
    width: 100%;
    padding: 0.625rem var(--space-md);
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 0.9375rem;
    transition: border-color var(--transition);
}

.search-box input::placeholder {
    color: var(--gray-500);
}

.search-box input:focus,
.form-control:focus {
    outline: none;
    border-color: var(--garnet);
    box-shadow: 0 0 0 3px rgba(107, 28, 35, 0.1);
}

/* ============================================================================
   TABS
   ========================================================================= */

.tab-nav {
    display: flex;
    gap: var(--space-md);
    border-bottom: 1px solid var(--border);
    margin-bottom: var(--space-lg);
}

.tab-btn {
    padding: var(--space-md) 0;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-muted);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
}

.tab-btn:hover {
    color: var(--text);
}

.tab-btn.active {
    color: var(--garnet);
    border-bottom-color: var(--garnet);
}

/* ============================================================================
   MODALS
   ========================================================================= */

.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.modal-header {
    padding: var(--space-lg);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color var(--transition);
}

.modal-close:hover {
    color: var(--text);
}

.modal-body {
    padding: var(--space-lg);
    overflow-y: auto;
}

.modal-footer {
    padding: var(--space-lg);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: var(--space-md);
}

/* ============================================================================
   LISTS
   ========================================================================= */

.list-group {
    list-style: none;
}

.list-item {
    padding: var(--space-md);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    transition: background var(--transition);
    color: var(--gray-900);
}

.list-item:last-child {
    border-bottom: none;
}

.list-item:hover {
    background: var(--gray-50);
}

/* ============================================================================
   CALENDAR
   ========================================================================= */

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: var(--border);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.calendar-day {
    background: var(--white);
    min-height: 80px;
    padding: var(--space-sm);
    font-size: 0.875rem;
    color: var(--gray-900);
}

.calendar-day.today {
    background: var(--gray-100);
    border: 2px solid var(--garnet);
}

/* ============================================================================
   RESPONSIVE
   ========================================================================= */

@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .login-container {
        grid-template-columns: 1fr;
    }
    
    .login-left {
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
    
    .sidebar {
        position: static;
        width: 100%;
        height: auto;
        flex-direction: row;
        align-items: center;
        padding: var(--space-md);
    }
    
    .sidebar-header {
        border-bottom: none;
        padding: 0;
        margin-right: var(--space-md);
    }
    
    .sidebar-nav {
        flex-direction: row;
        overflow-x: auto;
        padding: 0;
    }
    
    .sidebar-footer {
        display: none;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .content-header {
        flex-direction: column;
        align-items: flex-start;
        height: auto;
        padding: var(--space-lg);
    }
    
    .content-body {
        padding: var(--space-lg);
    }
}

@media (max-width: 480px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .search-filter-bar {
        flex-direction: column;
    }
}