:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: #eef2ff;
    --secondary: #64748b;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #06b6d4;
    --dark: #1e293b;
    --light: #f8fafc;
    --white: #ffffff;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius: 8px;
    --radius-sm: 4px;
    --radius-lg: 12px;
    --transition: all 0.2s ease;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #f0f4ff 0%, #f8fafc 50%, #f0f9ff 100%);
    color: var(--gray-700);
    line-height: 1.6;
    min-height: 100vh;
}

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

#sidebar {
    width: 260px;
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    color: white;
    padding: 0;
    position: fixed;
    height: 100vh;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 20px rgba(0,0,0,0.15);
}

.logo {
    padding: 25px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 0;
    text-align: center;
    background: rgba(255,255,255,0.03);
}

.logo-img {
    width: 70px;
    height: 70px;
    border-radius: 16px;
    object-fit: cover;
    display: block;
    margin: 0 auto 12px;
    border: 2px solid rgba(79, 70, 229, 0.5);
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}

.logo span {
    font-size: 20px;
    font-weight: 700;
    display: block;
    color: #fff;
    letter-spacing: 0.5px;
}

.logo h5 {
    font-size: 10px;
    font-weight: 500;
    color: #94a3b8;
    margin-top: 6px;
    line-height: 1.4;
}

#sidebar ul.nav-menu {
    list-style: none;
    padding: 15px 12px;
    flex: 1;
}

#sidebar li {
    margin: 6px 0;
}

#sidebar a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #94a3b8;
    text-decoration: none;
    border-radius: var(--radius);
    transition: var(--transition);
    font-size: 14px;
    font-weight: 500;
}

#sidebar a::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gray-500);
    transition: var(--transition);
}

#sidebar a:hover,
#sidebar a.active {
    background: rgba(79, 70, 229, 0.15);
    color: #fff;
}

#sidebar a:hover::before,
#sidebar a.active::before {
    background: var(--primary);
    box-shadow: 0 0 10px var(--primary);
}

#main {
    margin-left: 260px;
    flex: 1;
    padding: 30px 40px;
    min-height: 100vh;
}

#header {
    margin-bottom: 30px;
}

#page-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--dark);
    position: relative;
    display: inline-block;
}

#page-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--info));
    border-radius: 2px;
}

.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: 24px;
    border: 1px solid var(--gray-200);
    overflow: hidden;
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--gray-50);
}

.card-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--dark);
}

.card-body {
    padding: 24px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--gray-700);
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 14px;
    transition: var(--transition);
    background: var(--white);
    color: var(--gray-700);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-control::placeholder {
    color: var(--gray-400);
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #6366f1);
    color: white;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.4);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-hover), #4f46e5);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.5);
}

.btn-secondary {
    background: var(--gray-200);
    color: var(--gray-700);
}

.btn-secondary:hover {
    background: var(--gray-300);
    transform: translateY(-1px);
}

.btn-success {
    background: linear-gradient(135deg, var(--success), #34d399);
    color: white;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669, var(--success));
    transform: translateY(-1px);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger), #f87171);
    color: white;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.4);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626, var(--danger));
    transform: translateY(-1px);
}

.btn-info {
    background: linear-gradient(135deg, var(--info), #22d3ee);
    color: white;
    box-shadow: 0 4px 14px rgba(6, 182, 212, 0.4);
}

.btn-info:hover {
    background: linear-gradient(135deg, #0891b2, var(--info));
    transform: translateY(-1px);
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.form-control:focus {
    outline: none;
    border-color: #3498db;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
}

.results-header {
    padding: 15px 0;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.results-header h3 {
    color: var(--dark);
    font-weight: 600;
}

.item-card {
    background: linear-gradient(135deg, #fff 0%, #f8fafc 100%);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 16px;
    transition: var(--transition);
}

.item-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.item-number {
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 12px;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.item-number::before {
    content: 'Q';
    width: 24px;
    height: 24px;
    background: var(--primary);
    color: white;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.item-stem {
    font-size: 15px;
    margin-bottom: 16px;
    line-height: 1.6;
    color: var(--gray-800);
}

.item-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin-bottom: 15px;
}

.option {
    padding: 10px 15px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.option.correct {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.item-answer {
    font-size: 14px;
    color: #666;
    padding-top: 10px;
    border-top: 1px solid #e9ecef;
}

.model-section {
    margin-bottom: 25px;
}

.model-section h4 {
    color: #2c3e50;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 2px solid #3498db;
}

.code-block {
    background: #282c34;
    color: #abb2bf;
    padding: 15px;
    border-radius: 5px;
    font-family: monospace;
    white-space: pre-wrap;
}

.config-item {
    padding: 8px 0;
    border-bottom: 1px solid #ecf0f1;
}

.config-item strong {
    color: #2c3e50;
}

.cognitive-item {
    padding: 12px 0;
    border-bottom: 1px solid #ecf0f1;
    font-size: 15px;
}

.cognitive-item strong {
    color: #2c3e50;
    display: inline-block;
    min-width: 180px;
}

.generate-mode-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    background: var(--gray-100);
    padding: 6px;
    border-radius: var(--radius);
}

.tab-btn {
    padding: 12px 20px;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
    color: var(--gray-600);
}

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

.tab-btn.active {
    background: linear-gradient(135deg, var(--primary), #6366f1);
    color: white;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}

.mode-panel.hidden {
    display: none;
}

.options-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 15px;
}

.item-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.hidden {
    display: none;
}

.model-select-group {
    display: flex;
    gap: 10px;
}

.model-select-group select {
    flex: 1;
}

.help-text {
    display: block;
    color: #666;
    font-size: 12px;
    margin-top: 5px;
}

.radical-item, .incidental-item {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    align-items: center;
}

.radical-item input, .incidental-item input {
    flex: 1;
}

.radical-values, .incidental-values {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 5px;
}

.tag {
    display: inline-block;
    padding: 4px 8px;
    background: #e9ecef;
    border-radius: 3px;
    font-size: 12px;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
}

.modal-content {
    background: white;
    max-width: 600px;
    margin: 50px auto;
    border-radius: 8px;
    max-height: 80vh;
    overflow: auto;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #ecf0f1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
}

.modal-close {
    font-size: 24px;
    cursor: pointer;
}

.modal-body {
    padding: 20px;
}

.custom-model-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

.add-remove-btns {
    display: flex;
    gap: 5px;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-info {
    background: #17a2b8;
    color: white;
}

.btn-info:hover {
    background: #138496;
}

.generate-wizard, .manual-input-wizard {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.wizard-step {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    border-left: 4px solid #3498db;
}

.wizard-step .step-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.step-number {
    width: 30px;
    height: 30px;
    background: #3498db;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.step-title {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
}

.step-content {
    padding-left: 40px;
}

.model-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.model-card {
    background: white;
    border: 2px solid #ddd;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.model-card:hover {
    border-color: #3498db;
    transform: translateY(-2px);
}

.model-card.selected {
    border-color: #3498db;
    background: #e8f4f8;
}

.model-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.model-name {
    font-weight: 600;
    color: #2c3e50;
}

.model-desc {
    font-size: 12px;
    color: #666;
}

.variables-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.var-group {
    background: white;
    padding: 15px;
    border-radius: 8px;
}

.var-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: #2c3e50;
}

.var-list {
    min-height: 60px;
    margin-bottom: 10px;
}

.empty-msg {
    color: #999;
    font-style: italic;
    font-size: 14px;
}

.var-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #e9ecef;
    padding: 5px 10px;
    border-radius: 20px;
    margin: 3px;
    font-size: 13px;
}

.var-name {
    font-weight: 600;
    color: #2c3e50;
}

.var-values {
    color: #666;
}

.var-edit, .var-delete {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0 2px;
    font-size: 12px;
}

.var-delete:hover {
    color: #dc3545;
}

.generate-action {
    display: flex;
    align-items: center;
    gap: 20px;
}

.generate-action .form-group {
    flex: 0 0 150px;
    margin: 0;
}

.btn-lg {
    padding: 15px 30px;
    font-size: 18px;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 15px;
}

.option-input {
    display: flex;
    align-items: center;
    gap: 10px;
}

.option-input label {
    width: 30px;
    font-weight: bold;
    color: #3498db;
}

.examples-modal {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.example-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid #ddd;
}

.example-item:hover {
    background: #e9ecef;
    border-color: #3498db;
}

.example-item strong {
    display: block;
    margin-bottom: 5px;
}

.example-item p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

/* Login Page Styles */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fafafa;
    position: relative;
}

.login-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(135deg, rgba(79, 70, 229, 0.03) 0%, transparent 50%),
        linear-gradient(225deg, rgba(139, 92, 246, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

.login-container {
    background: #fff;
    padding: 48px 40px;
    border-radius: 16px;
    box-shadow: 
        0 0 0 1px rgba(0,0,0,0.04),
        0 20px 50px -12px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 400px;
    position: relative;
    z-index: 1;
}

.login-logo {
    text-align: center;
    margin-bottom: 36px;
}

.login-logo img {
    width: 100px;
    height: 100px;
    border-radius: 24px;
    object-fit: cover;
    margin-bottom: 24px;
    box-shadow: 0 12px 32px rgba(79, 70, 229, 0.2);
}

.login-logo h1 {
    color: #111;
    font-size: 28px;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.5px;
}

.login-logo p {
    color: #666;
    font-size: 14px;
    margin-top: 10px;
    font-weight: 400;
    letter-spacing: 0.2px;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.login-form .form-control {
    width: 100%;
    padding: 14px 16px;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
    background: #fafafa;
    color: #111;
}

.login-form .form-control:focus {
    outline: none;
    border-color: #4f46e5;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.08);
}

.login-form .form-control::placeholder {
    color: #9ca3af;
}

.login-form .btn-block {
    width: 100%;
    padding: 14px;
    font-size: 14px;
    margin-top: 24px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    background: rgba(0,0,0,0.2);
}

.user-info {
    text-align: center;
    margin-bottom: 12px;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 500;
}

.sidebar-footer .btn {
    width: 100%;
    padding: 10px;
    font-size: 13px;
}

/* AI Generator Panel */
.ai-panel {
    padding: 20px;
}

.ai-input-section {
    margin-bottom: 25px;
}

.ai-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.ai-option {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.ai-option label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
}

.ai-result-preview {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
    max-height: 400px;
    overflow-y: auto;
}

.ai-spinner {
    text-align: center;
    padding: 40px;
    color: #666;
}

/* Admin Settings */
.admin-section {
    margin-bottom: 30px;
}

.admin-section h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
}

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

.settings-table th,
.settings-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ecf0f1;
}

.settings-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

.action-btns {
    display: flex;
    gap: 8px;
}

.action-btns .btn {
    padding: 8px 16px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.hidden {
    display: none !important;
}

/* Item Repository Styles */
.item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.item-origin {
    display: flex;
    gap: 5px;
}

.origin-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.origin-badge.stem {
    background: #e3f2fd;
    color: #1976d2;
}

.origin-badge.ai-generated {
    background: #f3e5f5;
    color: #7b1fa2;
}

.origin-badge.manual {
    background: #e8f5e9;
    color: #388e3c;
}

.origin-badge.custom {
    background: #fff3e0;
    color: #f57c00;
}

.origin-badge.auto-generate {
    background: #fce4ec;
    color: #c2185b;
}

.item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e9ecef;
}

.copy-text {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    #sidebar {
        width: 80px;
        padding: 0;
    }
    
    #sidebar .logo span,
    #sidebar .logo h5,
    #sidebar a span {
        display: none;
    }
    
    #sidebar .logo {
        padding: 20px 10px;
    }
    
    #sidebar a {
        justify-content: center;
        padding: 14px;
    }
    
    #sidebar a::before {
        display: block;
    }
    
    #main {
        margin-left: 80px;
        padding: 20px;
    }
}

@media (max-width: 768px) {
    #sidebar {
        transform: translateX(-100%);
        width: 260px;
        z-index: 1000;
    }
    
    #sidebar.open {
        transform: translateX(0);
    }
    
    #main {
        margin-left: 0;
        padding: 16px;
    }
    
    .generate-mode-tabs {
        flex-wrap: wrap;
    }
    
    .tab-btn {
        flex: 1;
        min-width: 100px;
    }
    
    .options-group,
    .options-grid {
        grid-template-columns: 1fr;
    }
    
    .variables-section {
        grid-template-columns: 1fr;
    }
    
    .model-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .item-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .login-container {
        margin: 16px;
        padding: 32px 24px;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.card {
    animation: fadeIn 0.3s ease;
}

#sidebar a {
    animation: slideIn 0.2s ease;
    animation-fill-mode: both;
}

#sidebar li:nth-child(1) a { animation-delay: 0.05s; }
#sidebar li:nth-child(2) a { animation-delay: 0.1s; }
#sidebar li:nth-child(3) a { animation-delay: 0.15s; }
#sidebar li:nth-child(4) a { animation-delay: 0.2s; }
#sidebar li:nth-child(5) a { animation-delay: 0.25s; }

/* Toast notifications */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 16px 24px;
    border-radius: var(--radius);
    color: white;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

.toast.success {
    background: linear-gradient(135deg, var(--success), #34d399);
}

.toast.error {
    background: linear-gradient(135deg, var(--danger), #f87171);
}

.toast.info {
    background: linear-gradient(135deg, var(--info), #22d3ee);
}

/* Loading spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9998;
}

/* Better form elements */
select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}