/**
 * Plomada Main Stylesheet
 * Shared styles for the entire application
 * Uses Tailwind CSS for utility classes
 */

/* CSS Variables */
:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: #818cf8;
    --dark: #0f172a;
    --card-bg: rgba(255, 255, 255, 0.03);
    --border: rgba(255, 255, 255, 0.1);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;
    --glass: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
}

/* Reset */
* {
    box-sizing: border-box;
}

body {
    background-color: var(--dark);
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
    margin: 0;
    display: flex;
    min-height: 100vh;
}

/* ==================== SIDEBAR ==================== */
.sidebar {
    width: 280px;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    border-right: 1px solid var(--border);
    padding: 2.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-label {
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
    font-weight: 600;
}

.nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-item {
    margin-bottom: 0.5rem;
}

.nav-link {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.nav-link:hover,
.nav-link.active {
    background: var(--card-bg);
    color: white;
    transform: translateX(5px);
}

.nav-link.active {
    border-left: 3px solid var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

/* ==================== LOGOUT BUTTON ==================== */
.btn-logout {
    margin-top: auto;
    color: #fca5a5;
    text-decoration: none;
    font-weight: 600;
    padding: 1rem;
    border-radius: 12px;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* ==================== MAIN LAYOUT ==================== */
.main-wrapper {
    margin-left: 280px;
    flex: 1;
    padding: 3rem;
    background: radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.08), transparent);
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

h1 {
    font-weight: 800;
    font-size: 2.25rem;
    margin: 0;
}

/* ==================== CARDS - High Specificity ==================== */
body .card,
body .card-narrow,
body .card-narrower,
body .card-with-header {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 24px !important;
    padding: 2rem !important;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

body .card-narrow {
    max-width: 600px;
    margin: 0 auto;
}

body .card-narrower {
    max-width: 800px;
    margin: 0 auto;
}

body .card-with-header {
    margin-bottom: 2rem;
}

.card-narrow {
    max-width: 600px;
    margin: 0 auto;
}

.card-narrower {
    max-width: 800px;
    margin: 0 auto;
}

.card-narrower {
    max-width: 500px;
    margin: 0 auto;
}

.card-with-header {
    margin-bottom: 2rem;
}

/* ==================== BUTTONS ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    font-size: 0.95rem;
}

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

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}

.btn-success {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success);
}

.btn-success:hover {
    background: rgba(34, 197, 94, 0.2);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.2);
}

.btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.85rem;
}

.btn-icon {
    padding: 0.5rem;
}

/* ==================== TABLES ==================== */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

th {
    text-align: left;
    padding: 1rem;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    font-weight: 600;
}

td {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-main);
}

/* ==================== BADGES ==================== */
.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success {
    background: rgba(34, 197, 94, 0.1);
    color: #4ade80;
}

.badge-primary {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
}

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #fbbf24;
}

/* ==================== HEADER WIDGETS ==================== */
.header-widgets {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    max-width: 100%;
}

.widget-card {
    padding: 0.5rem 0.75rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 1;
}

.widget-card.bg-success-light {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.2);
}

.widget-card.bg-teal-light {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.2);
}

.widget-icon {
    width: 28px;
    height: 28px;
    background: rgba(99, 102, 241, 0.2);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.widget-icon.bg-success {
    background: rgba(34, 197, 94, 0.2);
}

.widget-icon.bg-teal {
    background: rgba(16, 185, 129, 0.2);
}

.widget-value {
    font-size: 1rem;
    font-weight: 700;
    white-space: nowrap;
}

.widget-label {
    color: var(--text-muted);
    font-size: 0.7rem;
    white-space: nowrap;
}

.widget-value.text-success {
    color: #4ade80;
}

.widget-value.text-teal {
    color: #10b981;
}

@media (max-width: 768px) {
    .widget-card {
        flex: 1 1 calc(50% - 0.25rem);
        min-width: 120px;
        padding: 0.5rem;
    }
    
    .widget-icon {
        width: 24px;
        height: 24px;
        font-size: 0.75rem;
    }
    
    .widget-value {
        font-size: 0.875rem;
    }
    
    .widget-label {
        font-size: 0.65rem;
    }
}

/* ==================== FORMS - High Specificity ==================== */
body .card .form-group,
body .card-narrow .form-group,
body .card-narrower .form-group {
    margin-bottom: 1.5rem;
}

body .card .form-group label,
body .card-narrow .form-group label,
body .card-narrower .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.9rem;
}

body .card .form-group input,
body .card .form-group select,
body .card .form-group textarea,
body .card-narrow .form-group input,
body .card-narrow .form-group select,
body .card-narrow .form-group textarea,
body .card-narrower .form-group input,
body .card-narrower .form-group select,
body .card-narrower .form-group textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 12px;
    color: white !important;
    font-family: 'Outfit', sans-serif;
    box-sizing: border-box;
    font-size: 1rem;
    -webkit-transition: all 0.2s ease;
    transition: all 0.2s ease;
}

body .card .form-group input:hover,
body .card .form-group select:hover,
body .card .form-group textarea:hover,
body .card-narrow .form-group input:hover,
body .card-narrow .form-group select:hover,
body .card-narrow .form-group textarea:hover,
body .card-narrower .form-group input:hover,
body .card-narrower .form-group select:hover,
body .card-narrower .form-group textarea:hover {
    border-color: rgba(255, 255, 255, 0.3) !important;
    background: rgba(255, 255, 255, 0.1) !important;
}

body .card .form-group input:focus,
body .card .form-group select:focus,
body .card .form-group textarea:focus,
body .card-narrow .form-group input:focus,
body .card-narrow .form-group select:focus,
body .card-narrow .form-group textarea:focus,
body .card-narrower .form-group input:focus,
body .card-narrower .form-group select:focus,
body .card-narrower .form-group textarea:focus {
    outline: none;
    border-color: var(--primary) !important;
    background: rgba(255, 255, 255, 0.12) !important;
    -webkit-box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

body .card .form-group input[readonly],
body .card .form-group select[readonly],
body .card .form-group textarea[readonly],
body .card-narrow .form-group input[readonly],
body .card-narrow .form-group select[readonly],
body .card-narrow .form-group textarea[readonly],
body .card-narrower .form-group input[readonly],
body .card-narrower .form-group select[readonly],
body .card-narrower .form-group textarea[readonly] {
    background: rgba(255, 255, 255, 0.03) !important;
    color: var(--text-muted);
    cursor: not-allowed;
}

body .card input::-webkit-input-placeholder,
body .card textarea::-webkit-input-placeholder,
body .card-narrow input::-webkit-input-placeholder,
body .card-narrow textarea::-webkit-input-placeholder,
body .card-narrower input::-webkit-input-placeholder,
body .card-narrower textarea::-webkit-input-placeholder {
    color: rgba(255, 255, 255, 0.4) !important;
}

body .card input::-moz-placeholder,
body .card textarea::-moz-placeholder,
body .card-narrow input::-moz-placeholder,
body .card-narrow textarea::-moz-placeholder,
body .card-narrower input::-moz-placeholder,
body .card-narrower textarea::-moz-placeholder {
    color: rgba(255, 255, 255, 0.4) !important;
}

body .card input::placeholder,
body .card textarea::placeholder,
body .card-narrow input::placeholder,
body .card-narrow textarea::placeholder,
body .card-narrower input::placeholder,
body .card-narrower textarea::placeholder {
    color: rgba(255, 255, 255, 0.4) !important;
}

/* ==================== FORM ACTIONS ==================== */
.form-actions {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.form-actions-left {
    justify-content: flex-start;
}

.form-actions-center {
    justify-content: center;
}

/* ==================== TEXT UTILITIES ==================== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: #fca5a5; }
.text-small { font-size: 0.85rem; }
.text-smaller { font-size: 0.75rem; }
.font-bold { font-weight: 600; }
.font-normal { font-weight: 400; }

/* ==================== PADDING UTILITIES ==================== */
.p-0 { padding: 0; }
.p-1 { padding: 0.5rem; }
.p-1-5 { padding: 0.75rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.px-1 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-2 { padding-left: 1rem; padding-right: 1rem; }
.py-1 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-2 { padding-top: 1rem; padding-bottom: 1rem; }

/* ==================== FLEX UTILITIES ==================== */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-0-5 { gap: 0.25rem; }
.gap-1 { gap: 0.5rem; }
.gap-1-5 { gap: 0.75rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

/* ==================== MARGIN UTILITIES ==================== */
.m-0 { margin: 0; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-1-5 { margin-top: 0.75rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-1-5 { margin-bottom: 0.75rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.ml-auto { margin-left: auto; }
.mr-auto { margin-left: auto; }
.mr-1 { margin-right: 0.5rem; }
.mr-2 { margin-right: 1rem; }

/* ==================== WIDTH/HEIGHT ==================== */
.w-full { width: 100%; }
.h-full { height: 100%; }
.w-64 { width: 64px; }
.h-64 { height: 64px; }
.w-32 { width: 32px; }
.h-32 { height: 32px; }

/* ==================== BORDER & BACKGROUND ==================== */
.border { border: 1px solid var(--border); }
.border-t { border-top: 1px solid var(--border); }
.rounded { border-radius: 8px; }
.rounded-lg { border-radius: 12px; }
.rounded-xl { border-radius: 16px; }
.rounded-2xl { border-radius: 24px; }
.rounded-full { border-radius: 9999px; }

/* ==================== ACTION LINKS ==================== */
.action-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: opacity 0.2s;
}

.action-link:hover {
    opacity: 0.8;
}

.action-link-danger {
    color: #fca5a5;
}

.action-link-danger:hover {
    opacity: 0.8;
}

/* ==================== ACTIONS ROW ==================== */
.actions-row {
    display: flex;
    gap: 0.5rem;
}

/* ==================== SEARCH DROPDOWN (MASON SELECTOR) ==================== */
.mason-dropdown,
.mason-dropdown * {
    background: #1e293b !important;
    background-color: #1e293b !important;
    color: #f8fafc !important;
}

/* Force dropdown to override card styles */
#mason-dropdown,
#mason-dropdown .mason-option,
#mason-dropdown .mason-option * {
    background: #1e293b !important;
    background-color: #1e293b !important;
    color: #f8fafc !important;
}

.mason-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    border: 1px solid #3b82f6 !important;
    border-radius: 12px;
    max-height: 280px;
    overflow-y: auto;
    z-index: 9999 !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    margin-top: 4px;
}

.mason-dropdown.show {
    display: block !important;
}

.mason-search-container {
    position: relative;
}

#mason-dropdown .mason-option {
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s;
    background: #1e293b !important;
    background-color: #1e293b !important;
    color: #f8fafc !important;
}

#mason-dropdown .mason-option:hover,
#mason-dropdown .mason-option.selected,
#mason-dropdown .mason-option:focus {
    background: #3b82f6 !important;
    background-color: #3b82f6 !important;
    color: #ffffff !important;
}

#mason-dropdown .mason-option:last-child {
    border-bottom: none;
}

#mason-dropdown .mason-name {
    font-weight: 600;
    color: #f8fafc !important;
}

#mason-dropdown .mason-email {
    font-size: 0.85rem;
    color: #94a3b8;
}

#mason-dropdown .mason-option:hover .mason-name,
#mason-dropdown .mason-option:hover .mason-email,
#mason-dropdown .mason-option.selected .mason-name,
#mason-dropdown .mason-option.selected .mason-email {
    color: #ffffff !important;
}

.mason-search-results {
    max-height: 250px;
    overflow-y: auto;
}

.mason-dropdown.show {
    display: block !important;
}

.mason-search-container {
    position: relative;
}

.mason-option {
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s;
    background: #1e293b !important;
    color: #f8fafc !important;
}

.mason-option:hover,
.mason-option.selected {
    background: #3b82f6 !important;
    color: #ffffff !important;
}

.mason-option:last-child {
    border-bottom: none;
}

.mason-name {
    font-weight: 600;
    color: #f8fafc !important;
}

.mason-email {
    font-size: 0.85rem;
    color: #94a3b8;
}

.mason-option:hover .mason-name,
.mason-option:hover .mason-email,
.mason-option.selected .mason-name,
.mason-option.selected .mason-email {
    color: #ffffff !important;
}

.mason-search-results {
    max-height: 250px;
    overflow-y: auto;
}

/* ==================== SEARCH FILTERS ==================== */
.filters-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.filter-actions {
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
}

/* ==================== AUDIT LOG DETAILS ==================== */
.audit-details {
    display: none;
    background: rgba(0, 0, 0, 0.2);
    padding: 1.5rem;
}

.audit-details.show {
    display: block;
}

.audit-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.audit-details h4 {
    margin: 0 0 0.75rem 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.audit-details pre {
    background: rgba(0, 0, 0, 0.3);
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 0.85rem;
    margin: 0;
}

/* ==================== STATUS BADGES IN TABLES ==================== */
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* ==================== EMPTY STATE ==================== */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

/* ==================== VERSION INFO ==================== */
.version-info {
    text-align: right;
    color: var(--text-muted);
    font-size: 0.7rem;
    opacity: 0.5;
    padding-right: 0.5rem;
}

/* ==================== MONOSPACE ==================== */
.monospace {
    font-family: monospace;
    color: var(--primary);
}

/* ==================== LOGO STYLES ==================== */
.logo-img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    object-fit: contain;
}

.logo-img-lg {
    width: 64px;
    height: 64px;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 0 20px rgba(99, 102, 241, 0.4));
}

.logo-shadow {
    filter: drop-shadow(0 0 20px rgba(99, 102, 241, 0.4));
}

/* ==================== ALERTS ==================== */
.alert {
    padding: 0.75rem 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    text-align: center;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

/* ==================== GRID UTILITIES ==================== */
.grid { display: grid; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
.grid-cols-auto { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

/* ==================== BACKGROUND UTILITIES ==================== */
.bg-dark { background: rgba(0, 0, 0, 0.2); }
.bg-glass { background: rgba(255, 255, 255, 0.03); }

/* ==================== POSITION UTILITIES ==================== */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }

/* ==================== CURSOR UTILITIES ==================== */
.cursor-pointer { cursor: pointer; }
.cursor-not-allowed { cursor: not-allowed; }

/* ==================== BORDER RADIUS UTILITIES ==================== */
.rounded-tl-12 { border-top-left-radius: 12px; }
.rounded-tr-12 { border-top-right-radius: 12px; }
.rounded-bl-12 { border-bottom-left-radius: 12px; }
.rounded-br-12 { border-bottom-right-radius: 12px; }

/* ==================== TRANSITION ==================== */
.transition { transition: all 0.2s ease; }

/* ==================== Mobile Menu Button ==================== */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    margin-right: 1rem;
}

/* Overlay for mobile menu */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.sidebar-overlay.active {
    display: block;
}

/* Mobile Styles */
@media (max-width: 1024px) {
    .mobile-menu-btn {
        display: block;
    }

    .sidebar {
        left: -280px;
        transition: left 0.3s ease;
        z-index: 1000;
    }

    .sidebar-open {
        left: 0;
    }

    .main-wrapper {
        margin-left: 0;
        padding: 1.5rem;
    }

    .header {
        flex-wrap: wrap;
        gap: 1rem;
    }

    h1 {
        font-size: 1.75rem;
    }
    
    .audit-details-grid {
        grid-template-columns: 1fr;
    }
}

/* ==================== GRADO BADGES ==================== */
.grado-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.1rem;
}

.grado-iniciado {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    border: 2px solid #f59e0b;
}

.grado-compañero {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
    border: 2px solid #3b82f6;
}

.grado-maestro {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 2px solid #10b981;
}

.grado-libre {
    background: rgba(139, 92, 246, 0.2);
    color: #8b5cf6;
    border: 2px solid #8b5cf6;
}

/* ==================== GRADE BUTTONS ==================== */
.btn-grade {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.btn-aumento {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
    border: 2px solid #3b82f6;
}

.btn-aumento:hover {
    background: #3b82f6;
    color: white;
}

.btn-exaltacion {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 2px solid #10b981;
}

.btn-exaltacion:hover {
    background: #10b981;
    color: white;
}

.btn-libre {
    background: rgba(139, 92, 246, 0.2);
    color: #8b5cf6;
    border: 2px solid #8b5cf6;
}

.btn-libre:hover {
    background: #8b5cf6;
    color: white;
}

/* ==================== TIMELINE ==================== */
.timeline-entry {
    border-left: 3px solid var(--border);
    padding-left: 1rem;
    margin-bottom: 1rem;
    position: relative;
}

.timeline-entry::before {
    content: '';
    position: absolute;
    left: -7px;
    top: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary);
}

.timeline-entry.grade-change::before {
    background: #10b981;
}

/* ==================== MODAL STYLES ==================== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

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

.modal-content {
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 16px;
    max-width: 450px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal-content h3 {
    margin: 0 0 0.5rem 0;
    color: var(--text-main);
    font-size: 1.5rem;
    font-weight: 700;
}

.modal-content .text-muted {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.modal-content .form-group {
    margin-bottom: 1.25rem;
}

.modal-content .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.9rem;
}

.modal-content .form-group input,
.modal-content .form-group textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 12px;
    color: white !important;
    font-family: 'Outfit', sans-serif;
    box-sizing: border-box;
    font-size: 1rem;
    -webkit-transition: all 0.2s ease;
    transition: all 0.2s ease;
}

.modal-content .form-group input:hover,
.modal-content .form-group textarea:hover {
    border-color: rgba(255, 255, 255, 0.3) !important;
    background: rgba(255, 255, 255, 0.1) !important;
}

.modal-content .form-group input:focus,
.modal-content .form-group textarea:focus {
    outline: none;
    border-color: var(--primary) !important;
    background: rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.modal-content .form-group input::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
}

.modal-content .flex {
    display: flex;
}

.modal-content .justify-end {
    justify-content: flex-end;
}

.modal-content .gap-1 {
    gap: 0.5rem;
}

.modal-content .mt-2 {
    margin-top: 1rem;
}

/* ==================== GLOBAL DROPDOWN FIX ==================== */
/* Fix for white text on white background in dropdowns */
select option {
    background-color: #1e293b !important; /* Dark background matching the theme */
    color: #f8fafc !important; /* Light text */
}

/* Ensure hover state is also visible */
select option:checked,
select option:hover {
    background-color: #3b82f6 !important; /* Blue background for selection */
    color: #ffffff !important;
}

