/* ==========================================
   BC360 - Design System
   Cohérent avec le site vitrine
   ========================================== */

:root {
    --anthracite: #1C1F26;
    --anthracite-light: #2A2E38;
    --anthracite-lighter: #363B47;
    --copper: #C4956A;
    --copper-light: #D4AD88;
    --copper-dark: #A67B52;
    --navy: #1B2A4A;
    --navy-light: #253A5E;

    --white: #FFFFFF;
    --gray-50: #F8F9FA;
    --gray-100: #F1F3F5;
    --gray-200: #E9ECEF;
    --gray-300: #DEE2E6;
    --gray-400: #ADB5BD;
    --gray-500: #6C757D;
    --gray-600: #495057;
    --gray-700: #343A40;

    --green: #2D8659;
    --green-light: #E8F5E9;
    --blue: #3B6FA0;
    --blue-light: #E3F2FD;
    --orange: #D4890A;
    --orange-light: #FFF3E0;
    --red: #C0392B;
    --red-light: #FDECEB;

    --font-serif: 'Playfair Display', Georgia, serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    --sidebar-width: 260px;
    --topbar-height: 60px;
    --radius: 8px;
    --radius-lg: 12px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
    --transition: 0.2s ease;
}

/* ==========================================
   Reset & Base
   ========================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; }
body { font-family: var(--font-sans); color: var(--gray-700); background: var(--gray-50); line-height: 1.6; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
input, select, textarea, button { font-family: inherit; font-size: inherit; }

/* ==========================================
   Login Page
   ========================================== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--anthracite) 0%, var(--navy) 100%);
    padding: 24px;
}

.login-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 48px 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-lg);
}

.login-logo {
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: 700;
    color: var(--anthracite);
    text-align: center;
    margin-bottom: 8px;
}
.login-logo span { color: var(--copper); }

.login-card h1 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    color: var(--anthracite);
    margin-bottom: 8px;
}

.login-subtitle {
    text-align: center;
    color: var(--gray-500);
    font-size: 0.9375rem;
    margin-bottom: 32px;
}

.login-back {
    display: block;
    text-align: center;
    margin-top: 24px;
    color: var(--gray-400);
    font-size: 0.875rem;
}
.login-back:hover { color: var(--copper); }

/* ==========================================
   App Layout
   ========================================== */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--anthracite);
    color: var(--white);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    transition: transform var(--transition);
}

.sidebar-header {
    padding: 24px 20px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-logo {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
}
.sidebar-logo span { color: var(--copper); }

.sidebar-close {
    display: none;
    position: absolute;
    right: 16px;
    top: 20px;
    background: none;
    border: none;
    color: var(--gray-400);
    font-size: 1.5rem;
    cursor: pointer;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius);
    color: rgba(255,255,255,0.65);
    font-size: 0.9375rem;
    font-weight: 400;
    transition: all var(--transition);
    margin-bottom: 2px;
}
.nav-item:hover { background: rgba(255,255,255,0.06); color: var(--white); }
.nav-item.active { background: rgba(196,149,106,0.15); color: var(--copper-light); font-weight: 500; }

.nav-icon { font-size: 1.125rem; width: 24px; text-align: center; }

.sidebar-footer {
    padding: 16px 12px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    margin-bottom: 8px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--copper);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
}

.user-meta { display: flex; flex-direction: column; min-width: 0; }
.user-name { font-size: 0.875rem; font-weight: 500; color: var(--white); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 0.75rem; color: var(--gray-400); }

.nav-logout { color: rgba(255,255,255,0.4); }
.nav-logout:hover { color: var(--red); background: rgba(192,57,43,0.1); }

/* Main content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

.topbar {
    height: var(--topbar-height);
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--gray-600);
    padding: 8px;
}

.notif-btn {
    background: none;
    border: none;
    font-size: 1.125rem;
    cursor: pointer;
    position: relative;
    padding: 8px;
}

.notif-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--copper);
    color: var(--white);
    font-size: 0.625rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-content {
    padding: 32px;
    max-width: 1280px;
}

/* ==========================================
   Page Header
   ========================================== */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 16px;
}

.page-header h1 {
    font-family: var(--font-serif);
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--anthracite);
}

.page-actions { display: flex; gap: 8px; align-items: center; }

.breadcrumb {
    display: block;
    font-size: 0.875rem;
    color: var(--gray-400);
    margin-bottom: 4px;
}
.breadcrumb:hover { color: var(--copper); }

/* ==========================================
   Cards
   ========================================== */
.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    transition: box-shadow var(--transition);
}
.card:hover { box-shadow: var(--shadow); }

.card-link { cursor: pointer; }
.card-link:hover { border-color: var(--copper-light); }

.card-header {
    padding: 20px 24px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.card-header h3 {
    font-family: var(--font-serif);
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--anthracite);
}

.card-body {
    padding: 16px 24px 24px;
}

.card-accent {
    border-left: 3px solid var(--copper);
}

.card-warning {
    border-left: 3px solid var(--orange);
}

/* ==========================================
   Dashboard Grid
   ========================================== */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.card-wide { grid-column: span 2; }

/* ==========================================
   Stats
   ========================================== */
.stats-row {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: 700;
    color: var(--anthracite);
    line-height: 1.1;
}

.stat-label {
    font-size: 0.8125rem;
    color: var(--gray-500);
    margin-top: 4px;
}

.stat-large {
    font-family: var(--font-serif);
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--anthracite);
    margin-bottom: 4px;
}

.stat-cell { text-align: center; }

/* ==========================================
   Badges
   ========================================== */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
}

.badge-lg { font-size: 0.8125rem; padding: 5px 14px; }

.badge-gray { background: var(--gray-100); color: var(--gray-600); }
.badge-blue { background: var(--blue-light); color: var(--blue); }
.badge-green { background: var(--green-light); color: var(--green); }
.badge-orange { background: var(--orange-light); color: var(--orange); }
.badge-copper { background: rgba(196,149,106,0.12); color: var(--copper-dark); }
.badge-outline { background: transparent; border: 1px solid var(--gray-300); color: var(--gray-600); }

/* ==========================================
   Buttons
   ========================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: var(--radius);
    font-size: 0.9375rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}

.btn-primary {
    background: var(--copper);
    color: var(--white);
}
.btn-primary:hover { background: var(--copper-dark); }

.btn-outline {
    background: transparent;
    border: 1px solid var(--gray-300);
    color: var(--gray-600);
}
.btn-outline:hover { border-color: var(--copper); color: var(--copper); }

.btn-accent {
    background: var(--navy);
    color: var(--white);
}
.btn-accent:hover { background: var(--navy-light); }

.btn-sm { padding: 6px 14px; font-size: 0.8125rem; }
.btn-full { width: 100%; }

.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ==========================================
   Forms
   ========================================== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 6px;
}

.required { color: var(--copper); }

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 0.9375rem;
    color: var(--gray-700);
    background: var(--white);
    transition: border-color var(--transition);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--copper);
    box-shadow: 0 0 0 3px rgba(196,149,106,0.1);
}

.form-textarea { resize: vertical; min-height: 80px; }

.form-select-sm { width: auto; padding: 6px 10px; font-size: 0.8125rem; }

.form-help {
    font-size: 0.8125rem;
    color: var(--gray-400);
    margin-top: 4px;
    line-height: 1.5;
}

.form-error {
    background: var(--red-light);
    color: var(--red);
    padding: 10px 16px;
    border-radius: var(--radius);
    font-size: 0.875rem;
    margin-bottom: 16px;
}

.form-message {
    padding: 10px 16px;
    border-radius: var(--radius);
    font-size: 0.875rem;
    margin-top: 16px;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 32px;
    flex-wrap: wrap;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.form-checkbox { margin-bottom: 12px; }

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
    font-size: 0.9375rem;
}

.checkbox-label input[type="checkbox"] {
    margin-top: 3px;
    accent-color: var(--copper);
}

.checkbox-inline { display: inline-flex; font-size: 0.8125rem; }

.inline-form { display: flex; flex-direction: column; gap: 16px; }

/* ==========================================
   Subject Form
   ========================================== */
.subject-form { max-width: 720px; }

.guide-card {
    background: rgba(196,149,106,0.06);
    border: 1px solid rgba(196,149,106,0.15);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 32px;
}

.guide-card h3 {
    font-family: var(--font-serif);
    font-size: 1.0625rem;
    color: var(--anthracite);
    margin-bottom: 12px;
}

.guide-card p {
    font-size: 0.9375rem;
    color: var(--gray-600);
    line-height: 1.7;
    margin-bottom: 8px;
}

.completeness-info {
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-top: 24px;
}

.completeness-bar {
    display: inline-block;
    width: 60px;
    height: 4px;
    background: var(--gray-200);
    border-radius: 2px;
    overflow: hidden;
    vertical-align: middle;
}

.completeness-bar span {
    display: block;
    height: 100%;
    background: var(--copper);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.completeness-lg { display: block; width: 100%; height: 6px; margin-top: 8px; }
.completeness-label { font-size: 0.75rem; color: var(--gray-400); margin-left: 4px; }

/* ==========================================
   Subject List
   ========================================== */
.filters-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.subject-card {
    display: block;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    margin-bottom: 12px;
    transition: all var(--transition);
}
.subject-card:hover { border-color: var(--copper-light); box-shadow: var(--shadow); }

.subject-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 8px;
}

.subject-card-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--anthracite);
}

.subject-badges { display: flex; gap: 6px; flex-wrap: wrap; flex-shrink: 0; }

.subject-card-meta {
    display: flex;
    gap: 16px;
    font-size: 0.8125rem;
    color: var(--gray-500);
    flex-wrap: wrap;
}

.subject-card-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
}

.priority-score {
    background: var(--navy);
    color: var(--white);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.priority-display { margin-top: 12px; font-size: 0.875rem; color: var(--gray-600); }

/* Subject list compact (dashboard) */
.subject-list-compact .subject-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--gray-100);
    font-size: 0.9375rem;
}
.subject-list-compact .subject-row:last-child { border-bottom: none; }
.subject-list-compact .subject-row:hover { background: var(--gray-50); margin: 0 -8px; padding-left: 8px; padding-right: 8px; border-radius: var(--radius); }

.subject-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.subject-member { font-weight: 500; min-width: 120px; }

/* ==========================================
   Detail Grid
   ========================================== */
.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.detail-fields { display: flex; flex-direction: column; gap: 0; }

.detail-field {
    display: flex;
    flex-direction: column;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-100);
}
.detail-field:last-child { border-bottom: none; }
.detail-field dt { font-size: 0.8125rem; font-weight: 500; color: var(--gray-500); margin-bottom: 4px; }
.detail-field dd { font-size: 0.9375rem; color: var(--gray-700); line-height: 1.6; }

/* ==========================================
   Messages
   ========================================== */
.message-thread {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 16px;
    padding: 4px 0;
}

.message {
    padding: 12px 16px;
    margin-bottom: 8px;
    border-radius: var(--radius);
    max-width: 85%;
}

.message-member {
    background: var(--gray-100);
    margin-right: auto;
}

.message-facilitator {
    background: rgba(196,149,106,0.08);
    margin-left: auto;
}

.message-internal {
    background: rgba(59,111,160,0.08);
    border-left: 2px solid var(--blue);
}

.message-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    font-size: 0.8125rem;
}

.message-header strong { color: var(--anthracite); }
.message-time { color: var(--gray-400); margin-left: auto; }
.message-type { color: var(--gray-500); font-style: italic; }
.message-body { font-size: 0.9375rem; line-height: 1.6; color: var(--gray-700); }

.message-form { border-top: 1px solid var(--gray-100); padding-top: 12px; }

.message-form-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
    flex-wrap: wrap;
}

/* ==========================================
   Decisions & Actions
   ========================================== */
.decision-item {
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.decision-item:last-child { border-bottom: none; }
.decision-type { align-self: flex-start; }

.action-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 0;
    border-bottom: 1px solid var(--gray-100);
}
.action-item:last-child { border-bottom: none; }
.action-due { font-size: 0.8125rem; color: var(--gray-500); }
.action-due.overdue { color: var(--red); font-weight: 500; }

/* ==========================================
   Followups
   ========================================== */
.followup-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--gray-100);
    flex-wrap: wrap;
}
.followup-item:last-child { border-bottom: none; }
.followup-title { flex: 1; font-weight: 500; }
.followup-due { font-size: 0.8125rem; color: var(--gray-500); }

/* ==========================================
   KPIs
   ========================================== */
.kpi-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px solid var(--gray-100);
}
.kpi-item:last-child { border-bottom: none; }
.kpi-name { font-weight: 500; flex: 1; }
.kpi-target, .kpi-current { font-size: 0.8125rem; color: var(--gray-500); }

/* ==========================================
   Presentation History
   ========================================== */
.presentation-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
}

/* ==========================================
   Rotation / Equity Table
   ========================================== */
.rotation-table { overflow-x: auto; }

.rotation-header, .rotation-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 2fr 2fr;
    gap: 8px;
    padding: 12px 16px;
    align-items: center;
    font-size: 0.875rem;
}

.rotation-header {
    font-weight: 600;
    color: var(--gray-500);
    border-bottom: 2px solid var(--gray-200);
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.rotation-row {
    border-bottom: 1px solid var(--gray-100);
}

.member-name { font-weight: 500; color: var(--anthracite); }

.equity-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 4px;
}

.equity-low .equity-dot { background: var(--orange); }
.equity-ok .equity-dot { background: var(--green); }
.equity-high .equity-dot { background: var(--red); }
.equity-low { background: var(--orange-light); }
.equity-high { background: var(--red-light); }

/* ==========================================
   Sessions
   ========================================== */
.session-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--gray-100);
}
.session-row:last-child { border-bottom: none; }
.session-link { font-size: 0.9375rem; }
.session-link:hover { color: var(--copper); }

.member-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px solid var(--gray-100);
    font-size: 0.9375rem;
}
.member-row:last-child { border-bottom: none; }

.agenda-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-100);
    font-size: 0.9375rem;
}
.agenda-item:last-child { border-bottom: none; }

/* ==========================================
   User Table
   ========================================== */
.user-table { overflow-x: auto; }

.table-header, .table-row {
    display: grid;
    grid-template-columns: 2fr 2fr 1fr 2fr 1fr 1.5fr;
    gap: 12px;
    padding: 12px 16px;
    align-items: center;
    font-size: 0.875rem;
}

.table-header {
    font-weight: 600;
    color: var(--gray-500);
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 2px solid var(--gray-200);
    background: var(--white);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.table-row {
    background: var(--white);
    border-bottom: 1px solid var(--gray-100);
}
.table-row:last-child { border-radius: 0 0 var(--radius-lg) var(--radius-lg); }

/* ==========================================
   Templates
   ========================================== */
.template-preview {
    font-size: 0.8125rem;
    color: var(--gray-600);
    background: var(--gray-50);
    padding: 12px;
    border-radius: var(--radius);
    white-space: pre-wrap;
    line-height: 1.5;
    margin: 8px 0;
}

/* ==========================================
   LLM Analysis
   ========================================== */
.llm-section {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--gray-100);
}
.llm-section:last-child { border-bottom: none; }

.llm-section h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--anthracite);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.llm-section p, .llm-section li {
    font-size: 0.9375rem;
    color: var(--gray-600);
    line-height: 1.6;
}

.llm-section ul { padding-left: 20px; }
.llm-section li { margin-bottom: 4px; }

.llm-warning { background: var(--orange-light); border-radius: var(--radius); padding: 16px; }

/* ==========================================
   Notifications
   ========================================== */
.notif-item {
    padding: 10px 0;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
}
.notif-item:last-child { border-bottom: none; }
.notif-item.unread { font-weight: 500; }
.notif-title { color: var(--gray-700); }
.notif-time { color: var(--gray-400); font-size: 0.8125rem; }

/* ==========================================
   Alert
   ========================================== */
.alert-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 0;
    font-size: 0.9375rem;
}
.alert-icon { flex-shrink: 0; }

/* ==========================================
   Activity
   ========================================== */
.activity-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-100);
    font-size: 0.875rem;
}
.activity-item:last-child { border-bottom: none; }
.activity-label { flex: 1; }

/* ==========================================
   Quick links
   ========================================== */
.quick-links { display: flex; flex-direction: column; gap: 8px; }

/* ==========================================
   Deadline
   ========================================== */
.deadline-info {
    margin-top: 8px;
    font-size: 0.875rem;
    color: var(--gray-600);
}

/* ==========================================
   Empty & Error States
   ========================================== */
.empty-state, .error-state {
    text-align: center;
    padding: 64px 24px;
    color: var(--gray-500);
}

.empty-state h2, .error-state h2 {
    font-family: var(--font-serif);
    color: var(--anthracite);
    margin-bottom: 8px;
}

/* ==========================================
   Loading
   ========================================== */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 64px;
    gap: 12px;
    color: var(--gray-400);
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--copper);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ==========================================
   Toast
   ========================================== */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--white);
    opacity: 0;
    transform: translateY(12px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.toast.show { opacity: 1; transform: translateY(0); }

.toast-success { background: var(--green); }
.toast-error { background: var(--red); }

/* ==========================================
   Pagination
   ========================================== */
.pagination {
    display: flex;
    gap: 4px;
    justify-content: center;
    margin-top: 32px;
}

.page-btn {
    width: 36px;
    height: 36px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    background: var(--white);
    color: var(--gray-600);
    cursor: pointer;
    font-size: 0.875rem;
    transition: all var(--transition);
}
.page-btn:hover { border-color: var(--copper); color: var(--copper); }
.page-btn.active { background: var(--copper); color: var(--white); border-color: var(--copper); }

/* ==========================================
   Text utilities
   ========================================== */
.text-muted { color: var(--gray-500); font-size: 0.875rem; }
.text-error { color: var(--red); }

/* ==========================================
   Responsive - Mobile
   ========================================== */
@media (max-width: 1024px) {
    .dashboard-grid { grid-template-columns: 1fr; }
    .card-wide { grid-column: span 1; }
    .detail-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
    }
    .sidebar.open { transform: translateX(0); }
    .sidebar-close { display: block; }

    .main-content { margin-left: 0; }
    .menu-toggle { display: block; }

    .topbar { padding: 0 16px; }
    .page-content { padding: 20px 16px; }

    .page-header { flex-direction: column; align-items: flex-start; }
    .page-header h1 { font-size: 1.375rem; }

    .stats-row { gap: 20px; }
    .stat-number { font-size: 1.5rem; }

    .filters-bar { flex-direction: column; }
    .form-row { grid-template-columns: 1fr; }

    .rotation-header, .rotation-row {
        grid-template-columns: 2fr 1fr 1fr 1fr;
        font-size: 0.8125rem;
    }
    .rotation-header span:nth-child(5),
    .rotation-row span:nth-child(5),
    .rotation-header span:nth-child(6),
    .rotation-row span:nth-child(6) { display: none; }

    .table-header, .table-row {
        grid-template-columns: 2fr 2fr 1fr;
    }
    .table-header span:nth-child(4),
    .table-row span:nth-child(4),
    .table-header span:nth-child(5),
    .table-row span:nth-child(5),
    .table-header span:nth-child(6),
    .table-row span:nth-child(6) { display: none; }

    .message { max-width: 95%; }
    .message-form-actions { flex-direction: column; align-items: flex-start; }
}
