/* ================================================
   SGI OTI - Professional Design System
   Enterprise-grade SAP/TOTVS style
   Clean, Sober, Dark Mode Ready
   ================================================ */

:root {
    /* Professional Color Palette */
    --primary-dark: #3a3a3a;      /* Dark gray - logo background */
    --primary-light: #ffffff;     /* Pure white - light bg */
    --secondary-dark: #0052cc;    /* Blue - accent and borders */
    --secondary-light: #d4e5f7;   /* Light blue - borders */
    
    /* Accent Colors - Minimal */
    --accent-primary: #0052cc;    /* Professional blue */
    --accent-hover: #0042a3;      /* Darker blue */
    --accent-light: #e3f2fd;      /* Light blue bg */
    
    /* Violet Palette for Login */
    --violet-dark: #6b21a8;       /* Deep violet */
    --violet-bright: #a855f7;     /* Bright violet */
    --violet-light: #e9d5ff;      /* Light violet */
    
    /* Status Colors */
    --success: #10a760;           /* Green */
    --danger: #dc2626;            /* Red */
    --warning: #f59e0b;           /* Amber */
    --info: #0052cc;              /* Blue */
    
    /* Typography */
    --text-primary: #1a202c;      /* Dark text */
    --text-secondary: #4a5568;    /* Gray text */
    --text-tertiary: #718096;     /* Lighter gray */
    
    /* Dark Mode */
    --dark-bg: #2a2a2a;           /* Dark gray bg */
    --dark-card: #353535;         /* Medium gray card */
    --dark-text: #f0f0f0;         /* Light text */
    --dark-border: #404040;       /* Dark gray border */
    --sidebar-dark: #1a1a1a;      /* Very dark gray sidebar */
    --sidebar-dark-text: #ffffff; /* White text on dark sidebar */
    
    /* Spacing & Sizing */
    --radius: 6px;                /* Subtle radius */
    --transition: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --hover-bg: #e8f1ff;          /* Hover background - light blue */
    --border-color: #d4e5f7;      /* Border color - light blue */
}

/* Dark Mode Toggle */
html[data-theme="dark"] {
    --text-primary: var(--dark-text);
    --text-secondary: #d0d0d0;
    --text-tertiary: #b0b0b0;
    --primary-light: var(--dark-bg);
    --secondary-light: var(--dark-border);
}

/* Prevent Login Page from Dark Mode */
html[data-theme="dark"] .auth-brand,
html[data-theme="dark"] .auth-form-container,
html[data-theme="dark"] .auth-heading,
html[data-theme="dark"] .auth-description,
html[data-theme="dark"] .form-label {
    filter: none !important;
}

html[data-theme="dark"] .auth-brand {
    background: linear-gradient(135deg, #6b21a8 0%, #a855f7 100%) !important;
}

html[data-theme="dark"] .auth-form-container {
    background-color: #ffffff !important;
}

html[data-theme="dark"] .auth-heading {
    color: #1a202c !important;
}

html[data-theme="dark"] .auth-description {
    color: #4a5568 !important;
}

html[data-theme="dark"] .form-input,
html[data-theme="dark"] .form-select,
html[data-theme="dark"] .form-textarea {
    background-color: #ffffff !important;
    color: #1a202c !important;
    border-color: #d4e5f7 !important;
}

html[data-theme="dark"] .form-input::placeholder {
    color: #718096 !important;
}

/* ================================================
   Global Styles
   ================================================ */

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

html {
    font-size: 14px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
        'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
        sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    
    background-color: var(--primary-light);
    color: var(--text-primary);
    line-height: 1.5;
    transition: background-color var(--transition), color var(--transition);
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

::selection {
    background-color: var(--accent-light);
    color: var(--accent-primary);
}

/* ================================================
   Login Page - Professional
   ================================================ */

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

.auth-brand {
    flex: 0 0 40%;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

.auth-brand-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.auth-brand-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.65);
    z-index: 1;
}

.auth-brand::before {
    display: none;
}
    width: 500px;
    height: 500px;
    background: rgba(168, 85, 247, 0.1);
    border-radius: 50%;
}

.auth-logo {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 1;
}

.auth-title {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.auth-subtitle {
    font-size: 0.875rem;
    opacity: 0.8;
    position: relative;
    z-index: 1;
}

.auth-form-container {
    flex: 0 0 60%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    background: linear-gradient(135deg, #ffffff 0%, #f5f7fa 100%);
    position: relative;
}

.auth-form {
    width: 100%;
    max-width: 400px;
}

.auth-heading {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.auth-description {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 2rem;
}

/* ================================================
   Form Elements - Professional
   ================================================ */

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--secondary-light);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.875rem;
    background-color: white;
    color: var(--text-primary);
    transition: border-color var(--transition), box-shadow var(--transition);
}

html[data-theme="dark"] .form-input,
html[data-theme="dark"] .form-select,
html[data-theme="dark"] .form-textarea {
    background-color: var(--dark-card);
    border-color: var(--dark-border);
    color: var(--dark-text);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.form-input::placeholder {
    color: var(--text-tertiary);
}

/* ================================================
   Buttons - Enterprise Style
   ================================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
    user-select: none;
}

.btn-primary {
    background-color: #0052cc;
    color: white;
    width: 100%;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.btn-primary:hover {
    background-color: #0047b8;
    box-shadow: 0 4px 12px rgba(0, 82, 204, 0.3);
}

.btn-primary:active {
    transform: scale(0.98);
    background-color: #003fa5;
}

.btn-secondary {
    background-color: transparent;
    color: #0052cc;
    border: 2px solid #0052cc;
    width: 100%;
    font-weight: 600;
}

.btn-secondary:hover {
    background-color: #0052cc;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 82, 204, 0.2);
}

.btn-text {
    background: none;
    color: var(--accent-primary);
    padding: 0.5rem;
}

.btn-text:hover {
    background-color: var(--accent-light);
}

/* ================================================
   Layout - Main
   ================================================ */

.app-layout {
    display: flex;
    min-height: 100vh;
    background-color: var(--primary-light);
}

/* ================================================
   Sidebar - Professional
   ================================================ */

.sidebar {
    flex: 0 0 280px;
    background-color: var(--primary-dark);
    color: white;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    transition: flex 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    overflow-x: hidden;
}

html[data-theme="dark"] .sidebar {
    background-color: var(--sidebar-dark);
    border-right-color: rgba(255, 255, 255, 0.05);
}

.sidebar.collapsed {
    flex: 0 0 70px;
    overflow: hidden;
}

.sidebar.collapsed .sidebar-menu {
    overflow: hidden;
}

/* make logo clickable for expand */
.sidebar-logo {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.sidebar.collapsed .sidebar-logo {
    justify-content: center;
    width: 100%;
}

.sidebar-header {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    gap: 0.5rem;
}

.sidebar.collapsed .sidebar-header {
    padding: 0.75rem 0.5rem;
    justify-content: center;
}

.sidebar-header-actions {
    display: flex;
    gap: 0.25rem;
    margin-left: auto;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar.collapsed .sidebar-header-actions {
    margin-left: 0;
    width: 100%;
    justify-content: center;
    display: none;
}

.sidebar-header-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all var(--transition);
    font-size: 1rem;
}

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

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sidebar-logo-icon {
    width: 36px;
    height: 36px;
    background: #3a3a3a;
    border: 2px solid #0052cc;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #ffffff;
    font-size: 0.9rem;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
}

.sidebar-logo-icon:hover {
    transform: scale(1.05);
    box-shadow: 0 0 12px rgba(0, 82, 204, 0.4);
}

.sidebar-logo-icon.rotating {
    animation: collapseRotate 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.sidebar.collapsed .sidebar-logo-icon.rotating {
    animation: expandRotate 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes collapseRotate {
    0% {
        transform: rotateY(0deg);
    }
    100% {
        transform: rotateY(-180deg);
    }
}

@keyframes expandRotate {
    0% {
        transform: rotateY(-180deg);
    }
    100% {
        transform: rotateY(0deg);
    }
}

html[data-theme="dark"] .sidebar-logo-icon {
    background: #2a2a2a;
    border-color: rgba(255, 255, 255, 0.3);
    color: #ffffff;
}

.sidebar.collapsed .sidebar-logo-text {
    display: none;
}

.sidebar.collapsed .sidebar-header-actions .sidebar-header-btn:not(.sidebar-btn-notif) {
    display: none !important;
}

.sidebar.collapsed .sidebar-header-actions .sidebar-btn-notif {
    display: flex !important;
}

.sidebar-menu {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.sidebar-menu::-webkit-scrollbar {
    width: 4px;
}

.sidebar-menu::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-menu::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

.sidebar-menu::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.sidebar.collapsed .sidebar-menu {
    padding: 0.5rem 0;
}

.sidebar-section {
    margin-bottom: 0;
    display: none;
}

.sidebar-section-title {
    display: none;
}

.sidebar.collapsed .sidebar-section-title {
    display: none;
}

.sidebar-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all var(--transition);
    cursor: pointer;
    border-left: 3px solid transparent;
}

.sidebar.collapsed .sidebar-item {
    padding: 0.75rem 0.5rem;
    justify-content: center;
}

.sidebar.collapsed .sidebar-item:hover {
    border-left-color: transparent;
}

.sidebar.collapsed .sidebar-item.active {
    border-left-color: transparent;
    background-color: rgba(0, 82, 204, 0.3);
}

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

html[data-theme="dark"] .sidebar-item:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.15);
}

.sidebar-item.active {
    color: white;
    background-color: rgba(0, 82, 204, 0.2);
    border-left-color: #0052cc;
}

html[data-theme="dark"] .sidebar-item.active {
    background-color: rgba(255, 255, 255, 0.1);
    border-left-color: rgba(255, 255, 255, 0.8);
}

.sidebar-item-icon {
    flex: 0 0 24px;
    text-align: center;
    font-size: 1.1rem;
    transition: all 0.25s ease;
}

.sidebar.collapsed .sidebar-item-icon {
    flex: 0 0 24px;
}

.sidebar.collapsed .sidebar-item:hover .sidebar-item-icon {
    transform: scale(1.2);
}

.sidebar-item-text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: rgba(255, 255, 255, 0.8);
    transition: color var(--transition);
}

.sidebar-item:hover .sidebar-item-text {
    color: white;
}

html[data-theme="dark"] .sidebar-item:hover .sidebar-item-text {
    color: white;
}

.sidebar.collapsed .sidebar-item-text {
    display: none;
}

.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-height: 0;
    flex-shrink: 0;
}

.sidebar.collapsed .sidebar-footer {
    padding: 0.75rem 0.5rem;
}

.user-menu-clickable {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.75rem;
    border-radius: 6px;
    transition: all var(--transition);
    position: relative;
}

.user-menu-clickable:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

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

.user-info .user-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-info .user-role {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar.collapsed .user-info {
    display: none;
}

.user-dropdown {
    position: absolute;
    bottom: 100%;
    left: 1.5rem;
    right: 1.5rem;
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: 8px;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
    z-index: 1000;
    margin-bottom: 0.5rem;
    overflow: hidden;
}

.user-dropdown.active {
    display: flex;
}

.user-dropdown-item {
    padding: 0.75rem 1rem;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border: none;
    background: none;
    font-size: 0.875rem;
    width: 100%;
    text-align: left;
}

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

.user-dropdown-item:last-child {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #dc2626;
}

.user-dropdown-item:last-child:hover {
    background-color: rgba(220, 38, 38, 0.1);
}

/* ================================================
   Header
   ================================================ */

.header {
    flex: 0;
    background-color: white;
    border-bottom: 1px solid var(--secondary-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1.5rem;
    height: 48px;
}

html[data-theme="dark"] .header {
    background-color: var(--dark-card);
    border-bottom-color: var(--dark-border);
}

.header-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-menu-header {
    display: flex;
    align-items: center;
    cursor: pointer;
    gap: 0.5rem;
    position: relative;
}

.user-avatar-header {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), #00a8e8);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.75rem;
}

.user-dropdown-header {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: none;
    flex-direction: column;
    z-index: 1000;
    margin-top: 0.5rem;
    min-width: 200px;
    overflow: hidden;
}

.user-dropdown-header.active {
    display: flex;
}

/* theme toggle inside user dropdown */
.user-dropdown-header .theme-toggle-item {
    padding: 0.75rem 1rem;
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border: none;
    background: none;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all var(--transition);
}

.user-dropdown-header .theme-toggle-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.user-info-header {
    padding: 1rem;
    border-bottom: 1px solid var(--dark-border);
}

.user-name-header {
    font-size: 0.875rem;
    font-weight: 600;
    color: white;
}

.user-role-header {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 0.25rem;
}

.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.25rem;
    color: var(--text-secondary);
    transition: color var(--transition);
    padding: 0.5rem;
}

.theme-toggle:hover {
    color: var(--text-primary);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), #00a8e8);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

/* ================================================
   Main Content
   ================================================ */

.main-layout {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem;
}

/* ================================================
   Cards & Modules
   ================================================ */

.card {
    background-color: white;
    border: 1px solid var(--secondary-light);
    border-radius: 8px;
    padding: 1rem;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
}

html[data-theme="dark"] .card {
    background-color: var(--dark-card);
    border-color: var(--dark-border);
}

.card:hover {
    box-shadow: var(--shadow);
}

.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.module-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background-color: white;
    border: 1px solid var(--secondary-light);
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition);
    text-align: center;
}

html[data-theme="dark"] .module-item {
    background-color: var(--dark-card);
    border-color: var(--dark-border);
}

.module-item:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-light);
    transform: translateY(-2px);
}

.module-icon {
    font-size: 2rem;
    opacity: 0.8;
}

.module-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}

.module-category {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
}

/* ================================================
   Under Construction Page
   ================================================ */

.construction-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    text-align: center;
}

.construction-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.7;
}

.construction-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.construction-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* ================================================
   Modal
   ================================================ */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: white;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    max-width: 600px;
    width: 90%;
    animation: slideIn 200ms var(--transition);
}

html[data-theme="dark"] .modal-content {
    background-color: var(--dark-card);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

html[data-theme="dark"] .modal-header {
    border-bottom-color: var(--dark-border);
}

.modal-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

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

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

.modal-body {
    padding: 1.5rem;
}

/* ================================================
   Utility Classes
   ================================================ */

.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

/* ================================================
   Responsive Design
   ================================================ */

@media (max-width: 768px) {
    .auth-container {
        flex-direction: column;
    }

    .auth-brand {
        flex: 0 0 auto;
        padding: 2rem 1rem;
    }

    .auth-form-container {
        flex: 0 0 auto;
        padding: 2rem 1rem;
    }

    .sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        bottom: 0;
        z-index: 999;
        transition: left var(--transition);
    }

    .sidebar.open {
        left: 0;
    }

    .app-layout {
        flex-direction: column;
    }

    .modules-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }

    .main-content {
        padding: 1rem;
    }
}

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

    .auth-logo {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }

    .auth-title {
        font-size: 1.25rem;
    }
}

/* ================================================
   Print & Accessibility
   ================================================ */

.no-print {
    display: block;
}

@media print {
    .sidebar,
    .header,
    .theme-toggle,
    .btn-text,
    .no-print {
        display: none;
    }
}
