/* Costa de Valencia - Sistema de Gestión - CSS Compartido */
:root {
    --primary: #2B9FD9;
    --primary-dark: #1a7fb5;
    --primary-light: #e8f4fd;
    --accent: #F5B731;
    --accent-light: #fef5e0;
    --success: #22c55e;
    --success-light: #dcfce7;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --info: #6366f1;
    --info-light: #eef2ff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --bg: #f0f2f5;
    --bg-card: #ffffff;
    --bg-sidebar: #ffffff;
    --text: #1f2937;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --border: #e5e7eb;
    --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-xs: 6px;
    --sidebar-width: 260px;
    --topbar-height: 64px;
    --transition: all 0.2s ease;
}
[data-theme="dark"] {
    --bg: #0f1117;
    --bg-card: #1a1d27;
    --bg-sidebar: #141620;
    --text: #e5e7eb;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    --border: #2d3348;
    --shadow: 0 1px 3px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.4);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.5);
    --primary-light: #1a2a3d;
    --accent-light: #2d2a1f;
    --success-light: #1a2e1a;
    --warning-light: #2d2a1a;
    --danger-light: #2e1a1a;
    --info-light: #1e1a2e;
    --gray-50: #1a1d27;
    --gray-100: #21242f;
    --gray-200: #2d3348;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== LAYOUT ===== */
.layout { display: flex; min-height: 100vh; }
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 100;
    overflow-y: auto;
    transition: var(--transition);
}
.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
}
.sidebar-header img { height: 40px; }
.sidebar-header .brand { font-size: 14px; font-weight: 700; color: var(--primary); line-height: 1.2; }
.sidebar-header .brand small { display: block; font-size: 10px; color: var(--text-muted); font-weight: 400; }
.sidebar-nav { flex: 1; padding: 12px 0; overflow-y: auto; }
.nav-section { padding: 8px 20px 4px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); margin-top: 8px; }
.nav-item {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 20px; margin: 1px 8px; border-radius: var(--radius-sm);
    color: var(--text-secondary); font-size: 13.5px; font-weight: 500;
    transition: var(--transition); text-decoration: none;
}
.nav-item:hover { background: var(--primary-light); color: var(--primary); text-decoration: none; }
.nav-item.active { background: var(--primary-light); color: var(--primary); font-weight: 600; }
.nav-item .icon { width: 20px; text-align: center; }
.nav-item .badge {
    margin-left: auto; background: var(--danger); color: #fff;
    font-size: 10px; padding: 2px 7px; border-radius: 10px; font-weight: 600;
}
.nav-item .badge-info { background: var(--primary); }
.sidebar-footer {
    padding: 16px 20px; border-top: 1px solid var(--border);
    display: flex; align-items: center; gap: 10px;
}
.sidebar-footer .avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--primary); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 700;
}
.sidebar-footer .user-info { flex: 1; }
.sidebar-footer .user-name { font-size: 13px; font-weight: 600; color: var(--text); }
.sidebar-footer .user-role { font-size: 11px; color: var(--text-muted); }

/* ===== MAIN CONTENT ===== */
.main { flex: 1; margin-left: var(--sidebar-width); }
.topbar {
    height: var(--topbar-height);
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 28px;
    position: sticky; top: 0; z-index: 50;
}
.topbar-left { display: flex; align-items: center; gap: 16px; }
.topbar-left h1 { font-size: 18px; font-weight: 700; color: var(--text); }
.topbar-left .subtitle { font-size: 12px; color: var(--text-muted); }
.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-muted); }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { color: var(--gray-300); }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.topbar-search {
    display: flex; align-items: center; gap: 8px;
    background: var(--gray-100); border-radius: var(--radius-sm);
    padding: 8px 14px; width: 220px; transition: var(--transition);
}
.topbar-search:focus-within { background: var(--bg-card); box-shadow: 0 0 0 2px var(--primary); }
.topbar-search input {
    border: none; background: transparent; outline: none;
    font-size: 13px; color: var(--text); width: 100%;
}
.topbar-search input::placeholder { color: var(--text-muted); }
.lang-selector { display: flex; gap: 2px; }
.lang-btn {
    padding: 5px 8px; border-radius: var(--radius-xs); border: 1px solid var(--border);
    background: transparent; color: var(--text-secondary); font-size: 11px;
    font-weight: 600; cursor: pointer; transition: var(--transition);
}
.lang-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.lang-btn:hover:not(.active) { background: var(--gray-100); }
.topbar-btn {
    width: 38px; height: 38px; border-radius: var(--radius-sm);
    border: 1px solid var(--border); background: transparent;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; color: var(--text-secondary); font-size: 18px;
    transition: var(--transition); position: relative;
}
.topbar-btn:hover { background: var(--gray-100); color: var(--text); }
.topbar-btn .notif-dot {
    position: absolute; top: 6px; right: 6px;
    width: 8px; height: 8px; background: var(--danger);
    border-radius: 50%; border: 2px solid var(--bg-card);
}

/* ===== CONTENT AREA ===== */
.content { padding: 28px; }
.page-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 24px; flex-wrap: wrap; gap: 16px;
}
.page-header h2 { font-size: 22px; font-weight: 700; }
.page-header .subtitle { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.page-actions { display: flex; gap: 10px; align-items: center; }

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 9px 18px; border-radius: var(--radius-sm);
    font-size: 13px; font-weight: 600; cursor: pointer;
    border: 1px solid transparent; transition: var(--transition);
    text-decoration: none; white-space: nowrap;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); text-decoration: none; }
.btn-secondary { background: var(--bg-card); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: var(--gray-100); text-decoration: none; }
.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-warning { background: var(--warning); color: #fff; }
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { background: var(--gray-100); }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-lg { padding: 12px 24px; font-size: 15px; }
.btn-icon { width: 36px; height: 36px; padding: 0; justify-content: center; }
.btn-icon.sm { width: 30px; height: 30px; font-size: 14px; }

/* ===== CARDS ===== */
.card {
    background: var(--bg-card); border-radius: var(--radius);
    border: 1px solid var(--border); box-shadow: var(--shadow);
    overflow: hidden;
}
.card-header {
    padding: 18px 22px; border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
}
.card-header h3 { font-size: 15px; font-weight: 700; }
.card-body { padding: 22px; }
.card-footer { padding: 14px 22px; border-top: 1px solid var(--border); background: var(--gray-50); }

/* ===== KPI CARDS ===== */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 24px; }
.kpi-card {
    background: var(--bg-card); border-radius: var(--radius);
    border: 1px solid var(--border); padding: 20px;
    display: flex; align-items: flex-start; gap: 16px;
    box-shadow: var(--shadow);
}
.kpi-icon {
    width: 48px; height: 48px; border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
}
.kpi-icon.blue { background: var(--primary-light); color: var(--primary); }
.kpi-icon.yellow { background: var(--accent-light); color: var(--accent); }
.kpi-icon.green { background: var(--success-light); color: var(--success); }
.kpi-icon.red { background: var(--danger-light); color: var(--danger); }
.kpi-icon.purple { background: var(--info-light); color: var(--info); }
.kpi-info { flex: 1; }
.kpi-value { font-size: 26px; font-weight: 800; line-height: 1.2; }
.kpi-label { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.kpi-trend { font-size: 11px; font-weight: 600; margin-top: 4px; }
.kpi-trend.up { color: var(--success); }
.kpi-trend.down { color: var(--danger); }

/* ===== TABLES ===== */
.table-container { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead th {
    padding: 12px 16px; text-align: left; font-size: 11px;
    font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
    color: var(--text-muted); border-bottom: 2px solid var(--border);
    background: var(--gray-50); white-space: nowrap;
}
tbody td {
    padding: 12px 16px; border-bottom: 1px solid var(--border);
    font-size: 13px; vertical-align: middle;
}
tbody tr:hover { background: var(--primary-light); }
tbody tr:last-child td { border-bottom: none; }

/* ===== FORMS ===== */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.form-hint { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.form-input, .form-select, .form-textarea {
    width: 100%; padding: 10px 14px; border: 1px solid var(--border);
    border-radius: var(--radius-sm); font-size: 13px; color: var(--text);
    background: var(--bg-card); transition: var(--transition);
    font-family: inherit;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none; border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(43,159,217,0.15);
}
.form-textarea { min-height: 100px; resize: vertical; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.form-check { display: flex; align-items: center; gap: 8px; }
.form-check input[type="checkbox"] {
    width: 18px; height: 18px; accent-color: var(--primary); cursor: pointer;
}
.form-check label { font-size: 13px; cursor: pointer; }

/* ===== STATUS BADGES ===== */
.badge-status {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 600;
}
.badge-status::before {
    content: ''; width: 6px; height: 6px; border-radius: 50%;
}
.badge-status.green { background: var(--success-light); color: #16a34a; }
.badge-status.green::before { background: #16a34a; }
.badge-status.yellow { background: var(--warning-light); color: #d97706; }
.badge-status.yellow::before { background: #d97706; }
.badge-status.red { background: var(--danger-light); color: #dc2626; }
.badge-status.red::before { background: #dc2626; }
.badge-status.blue { background: var(--primary-light); color: var(--primary); }
.badge-status.blue::before { background: var(--primary); }
.badge-status.purple { background: var(--info-light); color: var(--info); }
.badge-status.purple::before { background: var(--info); }
.badge-status.gray { background: var(--gray-100); color: var(--gray-500); }
.badge-status.gray::before { background: var(--gray-500); }

/* ===== TABS ===== */
.tabs { display: flex; gap: 0; border-bottom: 2px solid var(--border); margin-bottom: 24px; overflow-x: auto; }
.tab {
    padding: 12px 20px; font-size: 13px; font-weight: 600;
    color: var(--text-muted); cursor: pointer; border-bottom: 2px solid transparent;
    margin-bottom: -2px; white-space: nowrap; transition: var(--transition);
    text-decoration: none; display: block;
}
.tab:hover { color: var(--text); text-decoration: none; }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ===== FILTERS ===== */
.filters-bar {
    display: flex; align-items: center; gap: 10px;
    padding: 14px 18px; background: var(--bg-card);
    border: 1px solid var(--border); border-radius: var(--radius);
    margin-bottom: 16px; flex-wrap: wrap;
}
.filter-chip {
    padding: 6px 14px; border-radius: 20px; font-size: 12px;
    font-weight: 600; cursor: pointer; border: 1px solid var(--border);
    background: transparent; color: var(--text-secondary); transition: var(--transition);
}
.filter-chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.filter-chip:hover:not(.active) { background: var(--gray-100); }
.search-input {
    display: flex; align-items: center; gap: 8px;
    background: var(--gray-100); border-radius: var(--radius-sm);
    padding: 7px 12px; flex: 0 0 220px;
}
.search-input input {
    border: none; background: transparent; outline: none;
    font-size: 13px; color: var(--text); width: 100%;
}

/* ===== AVATAR ===== */
.avatar {
    width: 36px; height: 36px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.avatar.sm { width: 28px; height: 28px; font-size: 10px; }
.avatar.lg { width: 48px; height: 48px; font-size: 18px; }
.avatar.xl { width: 64px; height: 64px; font-size: 22px; }
.avatar-blue { background: var(--primary); }
.avatar-yellow { background: var(--accent); }
.avatar-green { background: var(--success); }
.avatar-red { background: var(--danger); }
.avatar-purple { background: var(--info); }

/* ===== KANBAN ===== */
.kanban { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 16px; }
.kanban-col { min-width: 280px; flex: 1; }
.kanban-col-header {
    padding: 12px 16px; border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    font-size: 13px; font-weight: 700; display: flex;
    align-items: center; justify-content: space-between;
}
.kanban-col-header .count {
    background: rgba(255,255,255,0.3); padding: 2px 8px;
    border-radius: 10px; font-size: 11px;
}
.kanban-cards { padding: 8px; background: var(--gray-100); border-radius: 0 0 var(--radius-sm) var(--radius-sm); min-height: 200px; }
.kanban-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 14px; margin-bottom: 8px;
    box-shadow: var(--shadow); cursor: grab;
}
.kanban-card:hover { box-shadow: var(--shadow-md); }
.kanban-card h4 { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.kanban-card p { font-size: 11px; color: var(--text-muted); }
.kanban-card .tags { display: flex; gap: 4px; margin-top: 8px; flex-wrap: wrap; }
.kanban-card .tag {
    padding: 2px 8px; border-radius: 10px; font-size: 10px; font-weight: 600;
    background: var(--primary-light); color: var(--primary);
}

/* ===== CALENDAR ===== */
.calendar-grid { display: grid; grid-template-columns: 60px repeat(5, 1fr); gap: 1px; background: var(--border); border-radius: var(--radius); overflow: hidden; }
.calendar-header { background: var(--gray-50); padding: 12px 8px; font-size: 12px; font-weight: 700; text-align: center; color: var(--text-secondary); }
.calendar-time { background: var(--bg-card); padding: 8px; font-size: 11px; color: var(--text-muted); text-align: right; height: 60px; }
.calendar-cell { background: var(--bg-card); padding: 4px; min-height: 60px; position: relative; }
.calendar-event {
    padding: 4px 8px; border-radius: var(--radius-xs); font-size: 11px;
    font-weight: 600; margin-bottom: 2px; cursor: pointer;
}
.calendar-event.blue { background: var(--primary-light); color: var(--primary); border-left: 3px solid var(--primary); }
.calendar-event.yellow { background: var(--accent-light); color: #b8860b; border-left: 3px solid var(--accent); }
.calendar-event.green { background: var(--success-light); color: #16a34a; border-left: 3px solid var(--success); }
.calendar-event.purple { background: var(--info-light); color: var(--info); border-left: 3px solid var(--info); }

/* ===== TIMELINE ===== */
.timeline { position: relative; padding-left: 24px; }
.timeline::before { content: ''; position: absolute; left: 7px; top: 0; bottom: 0; width: 2px; background: var(--border); }
.timeline-item { position: relative; padding-bottom: 20px; }
.timeline-item::before {
    content: ''; position: absolute; left: -20px; top: 4px;
    width: 10px; height: 10px; border-radius: 50%;
    background: var(--primary); border: 2px solid var(--bg-card);
}
.timeline-item.green::before { background: var(--success); }
.timeline-item.yellow::before { background: var(--accent); }
.timeline-item.red::before { background: var(--danger); }
.timeline-date { font-size: 11px; color: var(--text-muted); margin-bottom: 2px; }
.timeline-text { font-size: 13px; }

/* ===== PROGRESS BAR ===== */
.progress-bar { height: 8px; background: var(--gray-200); border-radius: 4px; overflow: hidden; }
.progress-fill { 
    height: 100%; 
    border-radius: 4px; 
    transition: width 0.3s ease;
    background: linear-gradient(90deg, var(--primary), var(--success));
}
.progress-fill.blue { background: var(--primary); }
.progress-fill.green { background: var(--success); }
.progress-fill.yellow { background: var(--accent); }
.progress-fill.red { background: var(--danger); }

/* ===== MODAL ===== */
.modal-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5); z-index: 1000;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
}
.modal {
    background: var(--bg-card); border-radius: var(--radius);
    width: 100%; max-width: 640px; max-height: 90vh; overflow-y: auto;
    box-shadow: var(--shadow-lg);
}
.modal-lg { max-width: 900px; }
.modal-header {
    padding: 20px 24px; border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
}
.modal-header h3 { font-size: 17px; font-weight: 700; }
.modal-close {
    width: 32px; height: 32px; border-radius: 50%; border: none;
    background: var(--gray-100); cursor: pointer; font-size: 18px;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-secondary);
}
.modal-body { padding: 24px; }
.modal-footer {
    padding: 16px 24px; border-top: 1px solid var(--border);
    display: flex; justify-content: flex-end; gap: 10px;
}

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

/* ===== DETAIL VIEW ===== */
.detail-header {
    display: flex; align-items: center; gap: 20px;
    padding: 24px; background: var(--bg-card);
    border: 1px solid var(--border); border-radius: var(--radius);
    margin-bottom: 24px; box-shadow: var(--shadow);
}
.detail-info h2 { font-size: 20px; font-weight: 700; }
.detail-meta { display: flex; gap: 16px; margin-top: 6px; flex-wrap: wrap; }
.detail-meta span { font-size: 12px; color: var(--text-muted); display: flex; align-items: center; gap: 4px; }
.detail-actions { margin-left: auto; display: flex; gap: 8px; }

/* ===== PAGINATION ===== */
.pagination {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 0; font-size: 13px; color: var(--text-muted);
}
.pagination-pages { display: flex; gap: 4px; }
.page-btn {
    width: 34px; height: 34px; border-radius: var(--radius-xs);
    border: 1px solid var(--border); background: var(--bg-card);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; font-size: 13px; font-weight: 500;
    color: var(--text-secondary); transition: var(--transition);
}
.page-btn:hover { background: var(--gray-100); }
.page-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ===== EMPTY STATE ===== */
.empty-state { text-align: center; padding: 60px 20px; }
.empty-state .icon { font-size: 48px; color: var(--text-muted); margin-bottom: 16px; }
.empty-state h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.empty-state p { font-size: 13px; color: var(--text-muted); margin-bottom: 20px; }

/* ===== ACTIVITY FEED ===== */
.activity-list { list-style: none; }
.activity-item {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 12px 0; border-bottom: 1px solid var(--border);
}
.activity-item:last-child { border-bottom: none; }
.activity-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex-shrink: 0; }
.activity-text { font-size: 13px; flex: 1; }
.activity-text strong { font-weight: 600; }
.activity-time { font-size: 11px; color: var(--text-muted); white-space: nowrap; }

/* ===== QUICK ACTIONS ===== */
.quick-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.quick-action {
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    padding: 20px 12px; background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); cursor: pointer; transition: var(--transition);
    text-decoration: none; color: var(--text);
}
.quick-action:hover { border-color: var(--primary); box-shadow: var(--shadow-md); transform: translateY(-2px); text-decoration: none; }
.quick-action .qa-icon { font-size: 24px; color: var(--primary); }
.quick-action span { font-size: 12px; font-weight: 600; text-align: center; }

/* ===== CHECKBOX TABLE ===== */
.check-cell { width: 40px; text-align: center; }
.check-cell input { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; }

/* ===== ATTENDANCE ===== */
.attendance-status { display: flex; gap: 6px; }
.att-btn {
    width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--border);
    background: transparent; cursor: pointer; font-size: 14px;
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition);
}
.att-btn.present { border-color: var(--success); background: var(--success-light); color: var(--success); }
.att-btn.absent { border-color: var(--danger); background: var(--danger-light); color: var(--danger); }
.att-btn.late { border-color: var(--warning); background: var(--warning-light); color: var(--warning); }
.att-btn.justified { border-color: var(--info); background: var(--info-light); color: var(--info); }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main { margin-left: 0; }
    .kanban { flex-direction: column; }
}
@media (max-width: 768px) {
    .content { padding: 16px; }
    .topbar { padding: 0 16px; }
    .page-header { flex-direction: column; align-items: flex-start; }
    .filters-bar { flex-direction: column; align-items: stretch; }
    .form-row { grid-template-columns: 1fr; }
    .kpi-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ===== PUBLIC PAGES (no sidebar) ===== */
.public-layout { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 40px 20px; background: var(--bg); }
.public-card { background: var(--bg-card); border-radius: var(--radius); box-shadow: var(--shadow-lg); width: 100%; max-width: 600px; overflow: hidden; }
.public-card-header { padding: 32px; text-align: center; border-bottom: 1px solid var(--border); }
.public-card-header img { height: 48px; margin-bottom: 12px; }
.public-card-header h1 { font-size: 20px; font-weight: 700; }
.public-card-header p { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.public-card-body { padding: 32px; }
.public-card-footer { padding: 20px 32px; border-top: 1px solid var(--border); text-align: center; background: var(--gray-50); }

/* ===== LOGIN SPECIFIC ===== */
.login-layout { display: flex; min-height: 100vh; }
.login-brand {
    flex: 0 0 45%; background: linear-gradient(135deg, var(--primary) 0%, #1a7fb5 100%);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 60px; color: #fff;
}
.login-brand img { height: 60px; margin-bottom: 24px; filter: brightness(0) invert(1); }
.login-brand h1 { font-size: 28px; font-weight: 800; margin-bottom: 8px; }
.login-brand p { font-size: 14px; opacity: 0.85; text-align: center; max-width: 360px; }
.login-features { margin-top: 40px; display: flex; flex-direction: column; gap: 16px; }
.login-feature { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.login-feature .lf-icon { width: 40px; height: 40px; border-radius: 10px; background: rgba(255,255,255,0.15); display: flex; align-items: center; justify-content: center; font-size: 18px; }
.login-form-side { flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px; background: var(--bg); }
.login-form-card { width: 100%; max-width: 400px; }
.login-form-card h2 { font-size: 24px; font-weight: 800; margin-bottom: 6px; }
.login-form-card .subtitle { font-size: 13px; color: var(--text-muted); margin-bottom: 28px; }
@media (max-width: 768px) { .login-brand { display: none; } }

/* ===== PORTAL LAYOUT (simplified sidebar) ===== */
.portal-sidebar { background: var(--bg-sidebar); width: 220px; }
.portal-sidebar .nav-item { font-size: 13px; }

/* ===== MISC ===== */
.divider { border: none; border-top: 1px solid var(--border); margin: 20px 0; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 12px; }
.text-xs { font-size: 11px; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.gap-4 { gap: 16px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-1 { flex: 1; }
.flex-wrap { flex-wrap: wrap; }
.w-full { width: 100%; }
.hidden { display: none; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ===== SVG ICONS (Lucide) ===== */
.icon svg, .qa-icon svg, .kpi-icon svg, .lf-icon svg, .topbar-btn svg, .topbar-search svg {
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
}
.icon svg {
    width: 18px;
    height: 18px;
}
.qa-icon svg {
    width: 24px;
    height: 24px;
}
.kpi-icon svg {
    width: 24px;
    height: 24px;
}
.lf-icon svg {
    width: 20px;
    height: 20px;
}
.topbar-btn svg {
    width: 18px;
    height: 18px;
}
.topbar-search svg {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
}
.sidebar-footer a svg {
    width: 18px;
    height: 18px;
}
.nav-item .icon {
    width: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.btn svg {
    width: 16px;
    height: 16px;
}
.detail-meta svg {
    width: 14px;
    height: 14px;
}
.flag-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 18px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 700;
    background: var(--gray-200);
    color: var(--text-secondary);
}
.att-btn svg {
    width: 16px;
    height: 16px;
}

/* ===== TAB LOADING SIMULATION ===== */
.tab-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--primary);
    gap: 16px;
}
.tab-loader .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--primary-light);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.tab-loader .text {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
}
