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

:root {
    --bg-body: linear-gradient(180deg, #edf1f7 0%, #e6ebf2 40%, #eaeff5 100%);
    --color-text: #1a202c;
    --color-text-secondary: #64748b;
    --color-text-muted: #94a3b8;
    --color-heading: #0f172a;
    --color-subheading: #111827;
    --card-bg: #ffffff;
    --card-border: #dae0e8;
    --card-radius: 14px;
    --card-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 3px 10px rgba(0,0,0,0.035), 0 8px 24px rgba(0,0,0,0.02);
    --card-shadow-hover: 0 3px 12px rgba(0,0,0,0.06), 0 10px 32px rgba(0,0,0,0.05);
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --primary-darker: #1d4ed8;
    --primary-ring: rgba(59,130,246,0.12);
    --green: #10b981;
    --green-dark: #059669;
    --orange: #f97316;
    --red: #ef4444;
    --border-input: #d3d8e0;
    --border-light: #e9ecf1;
    --bg-subtle: #f9fafb;
    --bg-panel: linear-gradient(180deg, #f9fafb 0%, #f2f5f9 100%);
    --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    --radius-btn: 9px;
    --radius-sm: 8px;
    --navbar-gradient: linear-gradient(135deg, #070d18 0%, #0b1830 30%, #112444 65%, #152b4c 100%);
}

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

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

::-webkit-scrollbar-thumb {
    background: #c4cbd5;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

::selection {
    background: rgba(59,130,246,0.15);
    color: #0f172a;
}

.navbar ::selection,
.admin-tabs ::selection,
.course-pill.active ::selection,
.mode-btn.active ::selection {
    background: rgba(255,255,255,0.3);
    color: #fff;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-body);
    background-attachment: fixed;
    color: var(--color-text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    letter-spacing: -0.011em;
    font-size: 14px;
    line-height: 1.65;
}

.container {
    max-width: 1520px;
    margin: 0 auto;
    padding: 30px 44px;
}

.navbar {
    background: var(--navbar-gradient);
    color: white;
    padding: 0 44px;
    height: 56px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 0 rgba(255,255,255,0.06) inset, 0 2px 10px rgba(0,0,0,0.28), 0 6px 24px rgba(8,18,36,0.22);
    position: relative;
    z-index: 100;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    backdrop-filter: saturate(1.2);
}

.nav-brand {
    font-size: 16.5px;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.18);
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 5px;
}

.nav-user {
    font-size: 13px;
    opacity: 0.65;
    padding-right: 14px;
    border-right: 1px solid rgba(255,255,255,0.12);
    margin-right: 10px;
    font-weight: 400;
    letter-spacing: 0.005em;
}

.btn-edit-name {
    background: none;
    border: none;
    color: rgba(255,255,255,0.4);
    cursor: pointer;
    font-size: 13px;
    padding: 2px 4px;
    margin-left: -4px;
    transition: color 0.2s;
}

.btn-edit-name:hover {
    color: #fff;
}

.nav-link {
    color: rgba(255,255,255,0.58);
    text-decoration: none;
    padding: 7px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    transition: color var(--transition), background var(--transition), box-shadow var(--transition);
    letter-spacing: 0.005em;
    position: relative;
}

.nav-link:hover {
    color: rgba(255,255,255,0.95);
    background: rgba(255,255,255,0.1);
}

.nav-link-active {
    color: #fff;
    background: rgba(255,255,255,0.14);
    font-weight: 600;
    box-shadow: 0 1px 4px rgba(0,0,0,0.12), inset 0 1px 0 rgba(255,255,255,0.06);
}

.admin-tabs {
    display: flex;
    background: linear-gradient(180deg, #0c1d38, #0d2240);
    padding: 0 36px;
    gap: 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.admin-tab {
    padding: 12px 24px;
    color: rgba(255,255,255,0.55);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    transition: color var(--transition), border-color var(--transition), background var(--transition);
    letter-spacing: 0.01em;
}

.admin-tab:hover {
    color: rgba(255,255,255,0.9);
    background: rgba(255,255,255,0.04);
}

.admin-tab-active {
    color: #fff;
    border-bottom-color: #63b3ed;
}

.badge {
    background: var(--primary);
    color: white;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.badge-prof {
    background: linear-gradient(135deg, #10b981, #059669);
}

.badge-active {
    background: var(--green);
    color: white;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 11px;
}

.badge-inactive {
    background: #94a3b8;
    color: white;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 11px;
}

.badge-error {
    background: var(--red);
    color: white;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 11px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 20px;
    border: none;
    border-radius: var(--radius-btn);
    font-size: 13.5px;
    font-weight: 560;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition);
    letter-spacing: -0.005em;
    line-height: 1.4;
    gap: 7px;
    font-family: inherit;
    white-space: nowrap;
}

.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 1px 2px rgba(37,99,235,0.22), 0 2px 6px rgba(37,99,235,0.1);
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-darker) 100%);
    box-shadow: 0 2px 6px rgba(37,99,235,0.3), 0 6px 16px rgba(37,99,235,0.15);
    transform: translateY(-0.5px);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0.5px);
    box-shadow: 0 1px 2px rgba(37,99,235,0.18);
}

.btn-secondary {
    background: #fff;
    color: #374151;
    border: 1px solid #d1d5dc;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.btn-secondary:hover:not(:disabled) {
    background: #f9fafb;
    border-color: #b0b8c4;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    transform: translateY(-0.5px);
}

.btn-secondary:active:not(:disabled) {
    transform: translateY(0.5px);
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.btn-outline {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 7px 16px;
    font-size: 13px;
    border-radius: var(--radius-sm);
}

.btn-outline:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.55);
}

.btn-sm {
    padding: 7px 14px;
    font-size: 13px;
}

.btn-xs {
    padding: 5px 12px;
    font-size: 12px;
    border-radius: 6px;
}

.btn-full {
    width: 100%;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-danger {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.btn-danger:hover:not(:disabled) {
    background: #fee2e2;
    border-color: #f87171;
    transform: translateY(-0.5px);
}

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    background: linear-gradient(160deg, #d8e2f0 0%, #cad7ea 25%, #d6e0ee 55%, #e4ebf4 100%);
}

.login-card {
    background: white;
    border-radius: 22px;
    padding: 56px 52px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03), 0 10px 30px rgba(0,0,0,0.06), 0 28px 72px rgba(0,0,0,0.08);
    border: 1px solid rgba(255,255,255,0.9);
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.login-header h1 {
    color: var(--color-heading);
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 10px;
    letter-spacing: -0.035em;
}

.login-header p {
    color: var(--color-text-secondary);
    font-size: 14.5px;
    line-height: 1.55;
}

.login-sign-in-btn {
    padding: 14px 16px;
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 20px;
    border-radius: 10px;
}

.login-sign-in-hint {
    text-align: center;
    color: #718096;
    font-size: 13px;
    margin-bottom: 24px;
}

.login-footer {
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid #f1f5f9;
    text-align: center;
    color: var(--color-text-muted);
    font-size: 13px;
}

.login-footer .small {
    font-size: 12px;
    color: #cbd5e1;
    margin-top: 4px;
}

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

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #374151;
    letter-spacing: 0.01em;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--border-input);
    border-radius: var(--radius-btn);
    font-size: 14px;
    transition: border-color var(--transition), box-shadow var(--transition), background 0.2s;
    background: #fafbfc;
    color: #1f2937;
    font-family: inherit;
}

.form-group input:hover,
.form-group select:hover {
    border-color: #b4bcc8;
    background: #fff;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-ring), 0 1px 2px rgba(0,0,0,0.05);
    background: #fff;
}

.form-group input:focus-visible,
.form-group select:focus-visible {
    outline: none;
}

.form-group input::placeholder {
    color: #9ca3af;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
    align-items: end;
}

.alert {
    padding: 13px 18px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 14px;
}

.alert-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.dashboard {
    padding-top: 6px;
}

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

.section-header h2 {
    font-size: 22px;
    color: var(--color-heading);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.product-select {
    display: flex;
    align-items: center;
    gap: 8px;
}

.product-select select {
    padding: 6px 12px;
    border: 1px solid #d1d5dc;
    border-radius: 7px;
    font-size: 14px;
}

.card {
    background: var(--card-bg);
    border-radius: var(--card-radius);
    padding: 26px;
    margin-bottom: 16px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--card-border);
    transition: box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.25s ease;
    position: relative;
}

.card h3 {
    font-size: 14.5px;
    font-weight: 650;
    color: var(--color-subheading);
    margin-bottom: 14px;
    letter-spacing: -0.012em;
}

.card-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.card-header-row h3 {
    margin-bottom: 0;
}

.config-card {
    background: linear-gradient(135deg, #eff6ff 0%, #f0f7ff 100%);
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 14px;
}

.config-card h3 {
    color: var(--primary-darker);
    margin-bottom: 12px;
}

.config-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.config-item {
    font-size: 14px;
}

.config-label {
    font-weight: 600;
    color: #4b5563;
}

.data-table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.data-table th {
    text-align: left;
    padding: 10px 16px;
    background: #f8fafc;
    font-size: 11px;
    font-weight: 700;
    color: #6b7280;
    border-bottom: 1px solid #e5e7eb;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.data-table td {
    padding: 10px 16px;
    border-bottom: 1px solid #f3f4f6;
    font-size: 14px;
    color: #374151;
}

.data-table tbody tr:hover {
    background: #f9fafb;
}

.empty-state {
    text-align: center;
    color: #9ca3af;
    padding: 56px 36px;
    font-size: 14px;
    background: linear-gradient(180deg, #fafbfd 0%, #f6f8fb 100%);
    border-radius: var(--card-radius);
    border: 1.5px dashed #cdd4de;
}

.empty-state h3 {
    color: #6b7280;
    margin-bottom: 8px;
    font-weight: 600;
}

.prof-dashboard {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 28px;
    align-items: start;
}

.sidebar .card {
    position: sticky;
    top: 20px;
    overflow: hidden;
}

.active-report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 18px 24px;
    background: linear-gradient(135deg, #ffffff 0%, #f9fbfe 100%);
    border-radius: 13px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--card-border);
    border-left: 4px solid var(--primary);
}

.report-info h2 {
    font-size: 17px;
    font-weight: 700;
    color: var(--color-heading);
    margin-bottom: 4px;
    letter-spacing: -0.02em;
}

.report-meta {
    font-size: 13px;
    color: #9ca3af;
}

.archived-badge {
    display: inline-block;
    background: #fef3c7;
    color: #92400e;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    margin-right: 8px;
    font-weight: 600;
    text-transform: uppercase;
    vertical-align: middle;
}

.dual-panel {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 22px;
    align-items: start;
}

.debrief-card {
    display: flex;
    flex-direction: column;
}

.debrief-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 18px;
}

.debrief-header h3 {
    margin-bottom: 0;
}

.model-selector-inline {
    display: flex;
    align-items: center;
    gap: 8px;
}

.model-selector-inline label {
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    white-space: nowrap;
    margin: 0;
}

.model-selector-inline select {
    padding: 6px 10px;
    border: 1px solid #d1d5db;
    border-radius: 7px;
    font-size: 13px;
    background: white;
    color: #374151;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
}

.model-selector-inline select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(59,130,246,0.15);
}

.generate-panel {
    background: var(--bg-panel);
    border: 1px solid var(--card-border);
    border-radius: 13px;
    padding: 22px;
    margin-bottom: 18px;
}

.generate-form .form-group {
    margin-bottom: 12px;
}

.generate-options {
    margin-bottom: 16px;
}

.regenerate-bar {
    margin-bottom: 14px;
}

.debrief-output {
    min-height: 120px;
    max-height: 70vh;
    overflow-y: auto;
    padding: 16px 14px;
    scroll-behavior: smooth;
}

.debrief-content {
    line-height: 1.75;
    color: #374151;
    font-size: 14px;
}

.debrief-h1 {
    font-size: 20px;
    color: var(--color-heading);
    margin: 24px 0 12px 0;
    padding-bottom: 6px;
    border-bottom: 2px solid #e5e7eb;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.debrief-h2 {
    font-size: 16px;
    color: var(--primary-darker);
    margin: 20px 0 8px 0;
    font-weight: 650;
}

.debrief-h3 {
    font-size: 14px;
    color: #4b5563;
    margin: 14px 0 6px 0;
    font-weight: 600;
}

.debrief-p {
    margin: 0 0 10px 0;
    line-height: 1.7;
}

.debrief-li {
    margin: 4px 0 4px 24px;
    line-height: 1.6;
}

.debrief-hr {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 16px 0;
}

.debrief-empty {
    text-align: center;
    padding: 56px 32px;
    color: #9ca3af;
    background: linear-gradient(180deg, #fafbfd 0%, #f6f8fb 100%);
    border-radius: 12px;
    border: 1.5px dashed #cdd4de;
}

.debrief-empty h4 {
    color: #6b7280;
    margin-bottom: 8px;
    font-weight: 600;
}

.debrief-loading {
    text-align: center;
    padding: 40px 24px;
    color: #6b7280;
}

.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #e5e7eb;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin: 0 auto 16px;
}

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

.export-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 14px;
    border-top: 1px solid var(--border-light);
    margin-top: 20px;
    padding-bottom: 2px;
}

.export-label {
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
}

.past-debriefs-list {
    max-height: 300px;
    overflow-y: auto;
}

.past-debrief-item {
    display: block;
    padding: 10px 14px;
    border-radius: var(--radius-btn);
    text-decoration: none;
    color: #374151;
    margin-bottom: 3px;
    border: 1px solid transparent;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.past-debrief-item:hover {
    background: #eef1f6;
    border-color: #dde2ea;
    transform: translateX(2px);
}

.past-debrief-round {
    font-size: 13px;
    font-weight: 600;
    color: #1f2937;
}

.past-debrief-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2px;
}

.past-debrief-file {
    font-size: 11px;
    color: #9ca3af;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 140px;
}

.past-debrief-date {
    font-size: 11px;
    color: #9ca3af;
    white-space: nowrap;
}

.report-list {
    max-height: 400px;
    overflow-y: auto;
}

.report-item-row {
    display: flex;
    align-items: center;
    border-radius: var(--radius-btn);
    border: 1px solid transparent;
    margin-bottom: 3px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.report-item-row:hover {
    background: #eef1f6;
    border-color: #dde2ea;
    transform: translateX(2px);
}

.report-item-row.active {
    background: linear-gradient(135deg, #eff6ff 0%, #e6eefb 100%);
    border-color: #93c5fd;
    box-shadow: 0 1px 3px rgba(59,130,246,0.1);
}

.report-item-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex: 1;
    padding: 10px 13px;
    text-decoration: none;
    color: #374151;
    font-size: 13px;
    min-width: 0;
}

.delete-form {
    flex-shrink: 0;
}

.btn-delete {
    background: none;
    border: none;
    color: #d1d5db;
    font-size: 18px;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 6px;
    line-height: 1;
    transition: color 0.2s, background 0.2s;
}

.btn-delete:hover {
    color: var(--red);
    background: #fef2f2;
}

.report-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: #374151;
    font-size: 13px;
    transition: background 0.15s;
    border: 1px solid transparent;
    margin-bottom: 3px;
}

.report-item:hover {
    background: #f3f4f6;
}

.report-item.active {
    background: #eff6ff;
    border-color: #93c5fd;
}

.report-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 180px;
}

.report-date {
    color: #9ca3af;
    font-size: 11px;
    white-space: nowrap;
}

.chat-card {
    display: flex;
    flex-direction: column;
    min-height: 400px;
    border-top: 3px solid var(--green);
    box-shadow: var(--card-shadow);
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 16px;
}

.chat-header h3 {
    margin-bottom: 0;
}

.generate-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    max-height: 450px;
    padding: 8px 0;
}

.message {
    margin-bottom: 14px;
    padding: 15px 20px;
    border-radius: 12px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.message-user {
    background: linear-gradient(135deg, #edf3ff 0%, #e4edfc 100%);
    border-left: 3px solid var(--primary);
    box-shadow: 0 1px 3px rgba(59,130,246,0.07);
}

.message-user:hover {
    box-shadow: 0 2px 8px rgba(59,130,246,0.1);
}

.message-assistant {
    background: linear-gradient(135deg, #f5f7fa 0%, #eef3f8 100%);
    border-left: 3px solid var(--green);
    box-shadow: 0 1px 3px rgba(16,185,129,0.07);
}

.message-assistant:hover {
    box-shadow: 0 2px 8px rgba(16,185,129,0.1);
}

.message-label {
    font-size: 10px;
    font-weight: 700;
    color: #6b7280;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.message-content {
    font-size: 14px;
    line-height: 1.65;
    white-space: pre-wrap;
    word-wrap: break-word;
    color: #374151;
}

.chat-welcome {
    text-align: center;
    padding: 48px 28px;
    color: #b0b8c4;
    background: linear-gradient(180deg, #fafbfd 0%, rgba(16,185,129,0.03) 100%);
    border-radius: 12px;
    border: 1.5px dashed #cdd4de;
    font-size: 13.5px;
    line-height: 1.6;
}

.chat-welcome h4 {
    color: #6b7280;
    margin-bottom: 8px;
    font-weight: 620;
    font-size: 15px;
    letter-spacing: -0.01em;
}

.chat-input-area {
    padding-top: 14px;
    border-top: 1px solid var(--border-light);
}

.chat-form {
    display: flex;
    gap: 10px;
}

.chat-form input {
    flex: 1;
    padding: 11px 16px;
    border: 1.5px solid var(--border-input);
    border-radius: 10px;
    font-size: 14px;
    transition: border-color var(--transition), box-shadow var(--transition), background 0.2s;
    background: #fafbfd;
    font-family: inherit;
}

.chat-form input:hover {
    border-color: #b4bcc8;
    background: #fff;
}

.chat-form input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-ring);
    background: #fff;
}

.chat-form input::placeholder {
    color: #9ca3af;
}

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

.export-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.welcome-card {
    text-align: center;
    padding: 64px 48px;
    border: 1.5px dashed #c4cdd8;
    background: linear-gradient(135deg, #ffffff 0%, #f7f9fc 100%);
    border-radius: 16px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.02);
}

.welcome-card h2 {
    color: var(--color-heading);
    margin-bottom: 12px;
    font-weight: 700;
    letter-spacing: -0.02em;
    font-size: 24px;
}

.welcome-card p {
    color: #6b7280;
    font-size: 15px;
    line-height: 1.65;
    max-width: 440px;
    margin-left: auto;
    margin-right: auto;
}

.status-msg {
    padding: 10px 14px;
    border-radius: var(--radius-btn);
    font-size: 13px;
    margin-top: 12px;
    font-weight: 500;
}

.status-info {
    background: #eff6ff;
    color: var(--primary-darker);
    border: 1px solid #bfdbfe;
}

.status-success {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.status-warning {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
}

.status-error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.upload-form {
    margin-bottom: 0;
}

.upload-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    border-bottom: 2px solid #e5e7eb;
}

.tab-btn {
    padding: 10px 20px;
    border: none;
    background: none;
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
}

.tab-btn:hover {
    color: #374151;
}

.tab-btn.active {
    color: var(--primary-dark);
    border-bottom-color: var(--primary-dark);
    font-weight: 600;
}

.drop-zone {
    border: 2px dashed #bfc8d4;
    border-radius: 13px;
    padding: 38px 24px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    background: var(--bg-panel);
}

.drop-zone:hover {
    border-color: #84b8f0;
    background: linear-gradient(180deg, #eef4ff 0%, #e6eefb 100%);
    transform: translateY(-1px);
    box-shadow: 0 3px 12px rgba(59,130,246,0.1);
}

.drop-zone-active {
    border-color: var(--primary);
    background: #eef4ff;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

.drop-zone-content {
    pointer-events: none;
}

.drop-icon {
    width: 48px;
    height: 48px;
    color: #9ca3af;
    margin-bottom: 12px;
}

.drop-zone-active .drop-icon {
    color: var(--primary);
}

.drop-text {
    font-size: 15px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 4px;
}

.drop-subtext {
    font-size: 13px;
    color: #9ca3af;
}

.hint-text {
    font-size: 12px;
    color: #9ca3af;
    line-height: 1.5;
    margin-top: 4px;
}

.file-list {
    margin-top: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    border-bottom: 1px solid #f3f4f6;
    font-size: 13px;
    gap: 12px;
}

.file-item:last-child {
    border-bottom: none;
}

.file-item-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
    color: #1f2937;
}

.file-item-size {
    color: #9ca3af;
    font-size: 12px;
    white-space: nowrap;
}

.file-item-remove {
    background: none;
    border: none;
    color: var(--red);
    font-size: 18px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.file-item-remove:hover {
    opacity: 1;
}

.bulk-status {
    margin-top: 16px;
    padding: 14px 18px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.5;
}

.bulk-results {
    margin-top: 10px;
}

.result-item {
    padding: 6px 0;
    font-size: 13px;
}

.result-success {
    color: #15803d;
}

.result-error {
    color: #b91c1c;
}

.result-skip {
    color: #b45309;
}

@media (max-width: 1200px) {
    .dual-panel {
        grid-template-columns: 1fr;
    }
}

.style-selector {
    margin-bottom: 16px;
}

.style-selector-label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    color: #374151;
    margin-bottom: 8px;
}

.style-cards {
    display: flex;
    gap: 10px;
}

.style-card {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 13px 17px;
    border: 1.5px solid #d8dde5;
    border-radius: 11px;
    cursor: pointer;
    transition: all var(--transition);
    background: #fff;
}

.style-card:hover {
    border-color: #84b8f0;
    background: #f9fbff;
    transform: translateY(-1px);
    box-shadow: 0 3px 12px rgba(59,130,246,0.1);
}

.style-card.selected {
    border-color: var(--primary);
    background: linear-gradient(135deg, #eff6ff 0%, #e6eefb 100%);
    box-shadow: 0 0 0 1px var(--primary), 0 3px 12px rgba(59,130,246,0.14);
}

.style-card input[type="radio"] {
    display: none;
}

.style-card-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.style-card-title {
    font-weight: 600;
    font-size: 13px;
    color: #1f2937;
}

.style-card-desc {
    font-size: 12px;
    color: #6b7280;
}

.more-options-toggle {
    margin: 14px 0 4px;
    text-align: center;
}

.btn-more-options {
    background: none;
    border: 1px dashed #ccd2da;
    color: #6b7280;
    font-size: 13px;
    padding: 8px 16px;
    border-radius: var(--radius-btn);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    justify-content: center;
    font-family: inherit;
}

.btn-more-options:hover {
    border-color: #9ca3af;
    color: #374151;
    background: #f9fafb;
}

.more-options-icon {
    font-weight: 700;
    font-size: 1rem;
}

.more-options-panel {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #e5e7eb;
}

.objectives-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.objective-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border: 1px solid #d1d5db;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fff;
    font-size: 12.5px;
    color: #4b5563;
    user-select: none;
}

.objective-chip:hover {
    border-color: #93c5fd;
    background: #f9fafb;
}

.objective-chip.selected {
    border-color: var(--primary-darker);
    background: #eff6ff;
    color: var(--primary-darker);
    font-weight: 550;
}

.objective-chip input[type="checkbox"] {
    display: none;
}

.chip-label {
    white-space: nowrap;
}

.message-actions {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    justify-content: flex-end;
}

.btn-msg-action {
    background: none;
    border: 1px solid #e5e7eb;
    color: #6b7280;
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn-msg-action:hover {
    border-color: #9ca3af;
    color: #374151;
    background: #f9fafb;
}

.analytics-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 20px;
    padding: 20px 0;
}

.analytics-sidebar .card {
    padding: 16px;
}

.analytics-sidebar h3 {
    margin: 0 0 12px;
    font-size: 1rem;
    color: #1f2937;
}

.analytics-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.analytics-header h2 {
    margin: 0;
    color: var(--color-heading);
}

.stat-pill {
    background: #eff6ff;
    color: var(--primary-darker);
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 550;
}

.dataset-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding: 8px 12px;
    background: #f8f9fb;
    border-radius: var(--radius-sm);
    border: 1px solid #dfe3e8;
}

.select-all-label {
    font-size: 13px;
    color: #4b5563;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

.dataset-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dataset-card {
    background: #fff;
    border: 1px solid #dfe3e8;
    border-radius: 10px;
    padding: 14px 16px;
    transition: box-shadow var(--transition);
}

.dataset-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.dataset-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dataset-checkbox {
    flex-shrink: 0;
}

.dataset-title {
    flex: 1;
    font-weight: 600;
    font-size: 14px;
    color: #1f2937;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-delete-sm {
    background: none;
    border: none;
    color: var(--red);
    cursor: pointer;
    font-size: 1rem;
    padding: 2px 6px;
    border-radius: 4px;
    line-height: 1;
}

.btn-delete-sm:hover {
    background: #fef2f2;
}

.dataset-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 8px;
}

.tag {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.tag-school { background: #eff6ff; color: var(--primary-darker); }
.tag-prof { background: #f0fdf4; color: #15803d; }
.tag-term { background: #fefce8; color: #a16207; }
.tag-course { background: #fdf2f8; color: #9d174d; }
.tag-type { background: #f5f3ff; color: #6d28d9; }

.dataset-desc {
    font-size: 13px;
    color: #6b7280;
    margin-top: 6px;
}

.dataset-meta {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 6px;
}

.filter-form .form-group {
    margin-bottom: 8px;
}

.filter-form label {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 2px;
}

.filter-form select {
    font-size: 13px;
    padding: 4px 8px;
}

.upload-form .form-group {
    margin-bottom: 10px;
}

.upload-form label {
    display: block;
    font-size: 12.5px;
    color: #4b5563;
    margin-bottom: 3px;
    font-weight: 550;
}

.upload-form input[type="text"],
.upload-form select,
.upload-form textarea {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid #d1d5db;
    border-radius: 7px;
    font-size: 13px;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
}

.upload-form input[type="text"]:focus,
.upload-form select:focus,
.upload-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(59,130,246,0.1);
}

.upload-form textarea {
    resize: vertical;
}

.form-hint {
    font-size: 11px;
    color: #9ca3af;
}

.label-required {
    font-size: 10px;
    font-weight: 400;
    color: var(--red);
    margin-left: 4px;
}

.label-optional {
    font-size: 10px;
    font-weight: 400;
    color: #9ca3af;
    margin-left: 4px;
}

.analysis-panel {
    margin-top: 20px;
    background: #fff;
    border: 2px solid var(--primary-darker);
    border-radius: var(--card-radius);
    padding: 20px;
}

.analysis-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.analysis-header h3 {
    margin: 0;
    color: var(--color-heading);
}

.analysis-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px;
    color: #6b7280;
}

.analysis-result {
    margin-top: 16px;
    padding: 18px;
    background: var(--bg-subtle);
    border-radius: 12px;
    line-height: 1.7;
    font-size: 14px;
    color: #374151;
    border: 1px solid #eceef2;
}

.analysis-result h2 {
    font-size: 1.3rem;
    color: var(--color-heading);
    margin: 20px 0 10px;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 6px;
    font-weight: 700;
}

.analysis-result h2:first-child {
    margin-top: 0;
}

.analysis-result h3 {
    font-size: 1.1rem;
    color: var(--primary-darker);
    margin: 16px 0 8px;
}

.analysis-result h4 {
    font-size: 1rem;
    color: #4b5563;
    margin: 12px 0 6px;
}

.analysis-result ul {
    margin: 8px 0;
    padding-left: 20px;
}

.analysis-result li {
    margin-bottom: 4px;
}

.error-text {
    color: var(--red);
    font-weight: 500;
}

.mastery-panel {
    margin-top: 18px;
}

.mastery-card {
    border-top: 4px solid var(--primary);
    box-shadow: var(--card-shadow);
    overflow: hidden;
}

.mastery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 20px;
}

.mastery-header h3 {
    margin-bottom: 0;
    color: var(--color-heading);
    font-size: 17px;
    font-weight: 700;
}

.mastery-summary-strip {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.mastery-chip {
    display: inline-flex;
    align-items: center;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.mastery-cards {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.mastery-obj-card {
    border: 1px solid var(--card-border);
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.25s;
}

.mastery-obj-card:hover {
    box-shadow: 0 2px 10px rgba(0,0,0,0.055);
    border-color: #c4cbd5;
}

.mastery-obj-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px 20px;
    cursor: pointer;
    background: var(--bg-panel);
    transition: background var(--transition);
}

.mastery-obj-header:hover {
    background: linear-gradient(180deg, #f0f3f7 0%, #eaeff5 100%);
}

.mastery-obj-title {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.mastery-obj-name {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    flex: 1;
    min-width: 0;
}

.mastery-level-badge {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
    flex-shrink: 0;
}

.mastery-progress-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mastery-progress-bar {
    flex: 1;
    height: 7px;
    border-radius: 4px;
    overflow: hidden;
    background: #e2e6ec;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.06);
}

.mastery-progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    position: relative;
}

.mastery-expand-icon {
    font-size: 18px;
    color: #9ca3af;
    font-weight: 600;
    width: 22px;
    text-align: center;
    flex-shrink: 0;
    user-select: none;
}

.mastery-obj-details {
    padding: 0 18px 16px;
    border-top: 1px solid #f3f4f6;
    animation: masterySlide 0.2s ease;
}

@keyframes masterySlide {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.mastery-detail-row {
    padding: 10px 0;
    border-bottom: 1px solid #f9fafb;
}

.mastery-detail-row:last-child {
    border-bottom: none;
}

.mastery-detail-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6b7280;
    margin-bottom: 4px;
}

.mastery-detail-text {
    font-size: 14px;
    line-height: 1.6;
    color: #374151;
}

.mastery-overall {
    margin-top: 4px;
}

.mastery-overall-box {
    background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%);
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    padding: 20px;
}

.mastery-overall-label {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--primary-darker);
    margin-bottom: 8px;
}

.mastery-overall-text {
    font-size: 14px;
    line-height: 1.7;
    color: #374151;
}

.cumulative-mastery-panel {
    margin-top: 12px;
}

.cumulative-mastery-header {
    position: relative;
}

.mastery-subtitle {
    display: block;
    font-size: 12px;
    color: #6b7280;
    font-weight: 400;
    margin-top: 2px;
}

.cm-trajectory-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 12px;
    margin-left: 6px;
    white-space: nowrap;
}

.cm-obj-card .mastery-obj-title {
    flex-wrap: wrap;
    gap: 6px;
}

.cm-timeline {
    padding: 8px 0 8px 12px;
}

.cm-timeline-step {
    display: flex;
    gap: 14px;
    position: relative;
    min-height: 60px;
}

.cm-timeline-dot {
    position: relative;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 4px;
    z-index: 1;
}

.cm-timeline-connector {
    position: absolute;
    left: 50%;
    top: 14px;
    transform: translateX(-50%);
    width: 2px;
    height: calc(100% + 20px);
    background: #e5e7eb;
}

.cm-timeline-content {
    flex: 1;
    padding-bottom: 16px;
}

.cm-timeline-round {
    font-weight: 700;
    font-size: 13px;
    color: var(--color-heading);
    margin-bottom: 4px;
}

.cm-timeline-level {
    font-size: 11px;
    padding: 2px 8px;
}

.cm-timeline-bar {
    height: 5px;
    background: #f3f4f6;
    border-radius: 3px;
    margin: 6px 0;
    max-width: 200px;
}

.cm-timeline-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.cm-timeline-evidence {
    font-size: 12px;
    color: #4b5563;
    line-height: 1.5;
    margin-top: 4px;
}

.cm-detail-section {
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
    margin-bottom: 8px;
}

.cm-detail-section-title {
    font-weight: 700;
    font-size: 13px;
    color: var(--primary-darker);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cm-at-risk {
    color: #dc2626;
}

.cm-overall-box {
    border-left-color: var(--primary-darker);
    background: #eff6ff;
}

.debrief-sections-toolbar {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.sections-hint {
    font-size: 12px;
    color: #6b7280;
    margin: 0 0 14px 0;
    font-style: italic;
}

.debrief-sections-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.debrief-section-card {
    border: 1px solid var(--card-border);
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.25s;
    background: #fff;
}

.debrief-section-card:hover {
    box-shadow: 0 2px 10px rgba(0,0,0,0.055);
    border-color: #c4cbd5;
}

.debrief-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 22px;
    cursor: pointer;
    background: var(--bg-panel);
    transition: background var(--transition);
    user-select: none;
    gap: 12px;
}

.debrief-section-header:hover {
    background: linear-gradient(180deg, #edf0f5 0%, #e7ecf3 100%);
}

.debrief-section-title {
    font-size: 14px;
    font-weight: 620;
    color: var(--color-subheading);
    letter-spacing: -0.005em;
    flex: 1;
    min-width: 0;
}

.debrief-section-icon {
    font-size: 16px;
    color: #9ca3af;
    font-weight: 600;
    width: 22px;
    text-align: center;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.debrief-section-body {
    padding: 20px 24px 22px;
    border-top: 1px solid #eef0f3;
    animation: sectionSlide 0.2s ease;
    line-height: 1.75;
    max-height: 60vh;
    overflow-y: auto;
}

@keyframes sectionSlide {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.debrief-section-body .debrief-h1 {
    margin-top: 8px;
}

.debrief-section-body .debrief-p,
.debrief-section-body .debrief-li {
    font-size: 14px;
}

.debrief-section-body .debrief-indent {
    margin-left: 20px;
}

.debrief-section-body .debrief-h4 {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin: 12px 0 6px;
}

.debrief-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 12px 0;
}

.debrief-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    min-width: 400px;
}

.debrief-table thead th {
    text-align: left;
    padding: 10px 12px;
    background: #f8fafc;
    font-weight: 600;
    color: #4b5563;
    border-bottom: 2px solid #e5e7eb;
    white-space: nowrap;
}

.debrief-table tbody td {
    padding: 8px 12px;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: top;
}

.debrief-table tbody tr:nth-child(even) {
    background: var(--bg-subtle);
}

.debrief-table tbody tr:hover {
    background: #f3f4f6;
}

.debrief-blockquote {
    border-left: 3px solid #93c5fd;
    background: #eff6ff;
    padding: 12px 18px;
    margin: 10px 0;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: #374151;
    font-size: 13px;
    line-height: 1.6;
}

.sections-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
}

.course-bar {
    background: linear-gradient(180deg, #ffffff 0%, #f7f9fc 100%);
    border-bottom: 1px solid #d6dbe4;
    padding: 11px 44px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    position: relative;
    z-index: 50;
}

.course-pills {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    flex: 1;
}

.course-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border-radius: 20px;
    background: #eef1f5;
    color: #4b5563;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid #d6dbe4;
    transition: all var(--transition);
    white-space: nowrap;
}

.course-pill:hover {
    background: #e2e6ec;
    color: #1f2937;
    border-color: #c2c9d3;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.07);
}

.course-pill.active {
    background: linear-gradient(135deg, #0a1628 0%, #152b4c 100%);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(10,22,40,0.3), 0 4px 12px rgba(10,22,40,0.12);
    font-weight: 600;
}

.course-pill.archived {
    opacity: 0.6;
    font-style: italic;
}

.course-pill.archived.active {
    opacity: 1;
}

.course-add-btn {
    background: #f3f4f6;
    color: #6b7280;
    font-size: 16px;
    font-weight: 700;
    padding: 4px 12px;
    border: 1px dashed #9ca3af;
    cursor: pointer;
}

.course-add-btn:hover {
    background: #e5e7eb;
    border-color: #6b7280;
}

.course-term-badge {
    font-size: 11px;
    background: rgba(0,0,0,0.08);
    padding: 1px 6px;
    border-radius: 8px;
    font-weight: 400;
}

.course-pill.active .course-term-badge {
    background: rgba(255,255,255,0.2);
}

.course-count-badge {
    font-size: 11px;
    background: rgba(0,0,0,0.1);
    padding: 1px 6px;
    border-radius: 8px;
    font-weight: 600;
    min-width: 18px;
    text-align: center;
}

.course-pill.active .course-count-badge {
    background: rgba(255,255,255,0.25);
}

.course-pill-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.course-pill-actions {
    display: none;
    position: absolute;
    right: -4px;
    top: -8px;
    gap: 2px;
    z-index: 10;
}

.course-pill-wrap:hover .course-pill-actions {
    display: flex;
}

.course-action-btn {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 11px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    padding: 0;
    transition: all 0.15s;
}

.course-action-btn:hover {
    background: #f3f4f6;
}

.course-action-btn.danger:hover {
    background: #fef2f2;
    color: #dc2626;
}

.course-create-form {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    width: 100%;
}

.course-input {
    padding: 7px 12px;
    border: 1px solid #d1d5db;
    border-radius: 7px;
    font-size: 13px;
    flex: 1;
    max-width: 260px;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
}

.course-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(59,130,246,0.1);
}

.course-input-sm {
    max-width: 140px;
}

.archived-courses-toggle {
    margin-left: auto;
}

.btn-archived-toggle {
    background: none;
    border: none;
    color: #6b7280;
    font-size: 12px;
    cursor: pointer;
    padding: 4px 8px;
    transition: color 0.15s;
    font-family: inherit;
}

.btn-archived-toggle:hover {
    color: #374151;
}

.archived-courses-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
    padding: 8px 0;
}

.sidebar-course-group {
    margin-bottom: 12px;
}

.sidebar-course-header {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-heading);
    padding: 6px 0 4px;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 4px;
}

.sidebar-course-header.unassigned {
    color: #6b7280;
}

.debrief-mode-toggle {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    border: 1px solid #d2d7df;
    border-radius: 12px;
    overflow: hidden;
    background: #e7eaf0;
    padding: 3px;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
}

.mode-btn {
    flex: 1;
    padding: 10px 16px;
    background: transparent;
    border: none;
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    transition: all var(--transition);
    text-align: center;
    border-radius: 9px;
    font-family: inherit;
    letter-spacing: -0.005em;
}

.mode-btn:hover:not(:disabled) {
    background: rgba(255,255,255,0.9);
    color: #374151;
}

.mode-btn.active {
    background: linear-gradient(135deg, #0a1628, #152b4c);
    color: #fff;
    box-shadow: 0 2px 8px rgba(10,22,40,0.35);
    letter-spacing: 0;
}

.mode-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.cumulative-info-box {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 11px;
    padding: 14px;
    margin-bottom: 16px;
}

.cumulative-info-title {
    font-weight: 700;
    color: #1e40af;
    font-size: 15px;
    margin-bottom: 4px;
}

.cumulative-info-box p {
    font-size: 13px;
    color: #4b5563;
    margin-bottom: 8px;
}

.cumulative-reports-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.cumulative-report-chip {
    display: inline-block;
    padding: 3px 10px;
    background: #fff;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    font-size: 12px;
    color: #1e40af;
    font-weight: 500;
}

.cumulative-report-chip.chip-peer-eval {
    background: #fef3c7;
    border-color: #f59e0b;
    color: #92400e;
}

.cumulative-report-chip.chip-other {
    background: #f3f4f6;
    border-color: #9ca3af;
    color: #4b5563;
}

.doc-type-badge {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    vertical-align: middle;
    margin-left: 4px;
}

.doc-type-badge.peer-eval {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #f59e0b;
}

.doc-type-badge.other-doc {
    background: #f3f4f6;
    color: #4b5563;
    border: 1px solid #9ca3af;
}

.course-intelligence-card {
    margin-top: 18px;
    border: 1px solid var(--card-border);
    border-left: 4px solid var(--orange);
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
}

.ci-header {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 14px;
}

.ci-header h3 {
    margin: 0;
    color: #1f2937;
}

.ci-subtitle {
    font-size: 13px;
    color: #6b7280;
}

.ci-doc-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    background: #f8f9fb;
    border-radius: var(--radius-btn);
    margin-bottom: 12px;
    font-size: 13px;
    color: #4b5563;
    border: 1px solid #eceef2;
}

.ci-doc-divider {
    color: #d1d5db;
    font-size: 18px;
}

.aa-peer-eval-note {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: var(--radius-btn);
    margin-top: 8px;
    font-size: 13px;
    color: #15803d;
}

.aa-note-icon {
    font-size: 16px;
}

.ci-documents-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.ci-doc-chip {
    display: inline-block;
    padding: 3px 10px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    font-size: 12px;
    color: #1e40af;
    font-weight: 500;
}

.ci-doc-chip.chip-peer-eval {
    background: #fef3c7;
    border-color: #f59e0b;
    color: #92400e;
}

.ci-doc-chip.chip-other {
    background: #f3f4f6;
    border-color: #9ca3af;
    color: #4b5563;
}

.ci-controls {
    margin-top: 8px;
}

.ci-options-row {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.ci-empty-state {
    text-align: center;
    padding: 28px;
    color: #6b7280;
}

.ci-empty-state p {
    margin: 4px 0;
}

.ci-empty-hint {
    font-size: 13px;
    color: #9ca3af;
}

.ci-output {
    margin-top: 18px;
    border-top: 1px solid #e5e7eb;
    padding-top: 18px;
}

.ci-sections-toolbar {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.ci-section summary {
    border-left-color: var(--orange);
}

.ci-section .debrief-section-content {
    max-height: 60vh;
    overflow-y: auto;
    padding: 18px 22px;
    line-height: 1.7;
}

.ci-section .debrief-section-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 13px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.ci-section .debrief-section-content thead th {
    background: var(--primary-darker);
    color: #fff;
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ci-section .debrief-section-content tbody td {
    padding: 10px 12px;
    border-bottom: 1px solid #f3f4f6;
}

.ci-section .debrief-section-content tbody tr:nth-child(even) {
    background: var(--bg-subtle);
}

.ci-section .debrief-section-content tbody tr:hover {
    background: #eff6ff;
}

.ci-section .debrief-section-content blockquote {
    border-left: 3px solid var(--orange);
    background: #fff7ed;
    margin: 10px 0;
    padding: 12px 18px;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: #9a3412;
    font-size: 13px;
    line-height: 1.5;
}

.ci-section .debrief-section-content h2 {
    font-size: 18px;
    color: var(--color-heading);
    margin: 28px 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #eff6ff;
}

.ci-section .debrief-section-content h3 {
    font-size: 15px;
    color: var(--primary-darker);
    margin: 20px 0 8px 0;
}

.ci-section .debrief-section-content h4 {
    font-size: 14px;
    color: #4b5563;
    margin: 14px 0 6px 0;
}

.ci-section .debrief-section-content hr {
    border: none;
    border-top: 2px solid #e5e7eb;
    margin: 24px 0;
}

.ci-section .debrief-section-content strong {
    color: var(--color-subheading);
}

.ci-section .debrief-section-content ul,
.ci-section .debrief-section-content ol {
    margin: 8px 0;
    padding-left: 20px;
}

.ci-section .debrief-section-content li {
    margin-bottom: 6px;
    font-size: 14px;
}

.ci-section .debrief-section-content p {
    margin: 8px 0;
    font-size: 14px;
}

.ci-score-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ci-score-value {
    font-weight: 700;
    font-size: 13px;
    min-width: 40px;
}

.ci-score-bar {
    flex: 1;
    height: 6px;
    background: #f3f4f6;
    border-radius: 3px;
    min-width: 40px;
    overflow: hidden;
}

.ci-score-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.ci-rating-badge {
    display: inline-block;
    color: #fff;
    font-weight: 700;
    font-size: 16px;
    padding: 6px 16px;
    border-radius: 20px;
    margin: 4px 0;
}

.ci-team-avg-badge {
    display: inline-block;
    background: var(--primary-darker);
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    padding: 4px 12px;
    border-radius: 12px;
}

.ci-above {
    color: #16a34a !important;
}

.ci-below {
    color: var(--red) !important;
}

.ci-at {
    color: #6b7280 !important;
}

.courses-page {
    max-width: 1000px;
    margin: 0 auto;
}

.courses-page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 28px;
}

.courses-page-header h1 {
    font-size: 28px;
    font-weight: 800;
    color: var(--color-heading);
    letter-spacing: -0.035em;
}

.courses-page-subtitle {
    color: #6b7280;
    font-size: 15px;
    margin-top: 4px;
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 18px;
    margin-bottom: 28px;
}

.course-card {
    background: #fff;
    border-radius: var(--card-radius);
    padding: 24px;
    border: 1px solid var(--card-border);
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.25s ease, transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-shadow: var(--card-shadow);
    position: relative;
    overflow: hidden;
}

.course-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.course-card:hover {
    box-shadow: var(--card-shadow-hover);
    border-color: #93c5fd;
    transform: translateY(-2px);
}

.course-card:hover::before {
    opacity: 1;
}

.course-card.archived {
    opacity: 0.65;
    border-style: dashed;
}

.course-card.archived::before {
    display: none;
}

.course-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.course-card-header h3 {
    font-size: 17px;
    font-weight: 650;
    color: var(--color-subheading);
    margin: 0;
    letter-spacing: -0.01em;
}

.course-card-term {
    background: #eff6ff;
    color: var(--primary-darker);
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 550;
}

.course-card-sim {
    background: #f0fdf4;
    color: #15803d;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.archived-badge {
    background: #fef2f2;
    color: #dc2626;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.course-card-stats {
    display: flex;
    gap: 24px;
}

.course-card-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.course-card-stat .stat-number {
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
}

.course-card-stat .stat-label {
    font-size: 11px;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.course-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #9ca3af;
    border-top: 1px solid #f0f2f5;
    padding-top: 12px;
}

.course-card-total {
    font-weight: 500;
    color: #6b7280;
}

.course-create-card {
    background: #fff;
    border-radius: var(--card-radius);
    padding: 24px 28px;
    border: 1px solid var(--card-border);
    margin-bottom: 20px;
    box-shadow: var(--card-shadow);
}

.course-create-card h3 {
    font-size: 15px;
    font-weight: 650;
    margin-bottom: 16px;
    color: var(--color-subheading);
}

.course-create-fields {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.course-create-fields .form-group {
    margin-bottom: 0;
}

.course-create-actions {
    display: flex;
    gap: 8px;
    padding-bottom: 2px;
}

.courses-empty {
    background: linear-gradient(135deg, #ffffff 0%, #f6f8fb 100%);
    border-radius: 16px;
    padding: 64px 48px;
    text-align: center;
    border: 1.5px dashed #c4cdd8;
    box-shadow: 0 2px 6px rgba(0,0,0,0.02);
}

.courses-empty h2 {
    font-size: 22px;
    margin-bottom: 10px;
    color: #1f2937;
    font-weight: 700;
}

.courses-empty p {
    color: #6b7280;
    margin-bottom: 24px;
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
}

.archived-section {
    margin-top: 28px;
}

.unassigned-section {
    margin-top: 18px;
    text-align: center;
}

.dashboard-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 13px;
    grid-column: 1 / -1;
}

.breadcrumb-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s;
}

.breadcrumb-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.breadcrumb-sep {
    color: #d1d5db;
    font-size: 11px;
}

.breadcrumb-current {
    color: var(--color-subheading);
    font-weight: 600;
}

.additional-analysis-card {
    margin-top: 18px;
    border-top: 3px solid var(--orange);
    box-shadow: var(--card-shadow);
    overflow: hidden;
}

.aa-header h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--color-heading);
    margin-bottom: 4px;
    letter-spacing: -0.015em;
}

.aa-subtitle {
    font-size: 13px;
    color: #6b7280;
    display: block;
    margin-bottom: 16px;
}

.aa-upload-section {
    background: var(--bg-panel);
    border: 1.5px dashed #b4bcc8;
    border-radius: 12px;
    padding: 20px 22px;
    margin-bottom: 18px;
    transition: border-color var(--transition);
}

.aa-upload-section:hover {
    border-color: #919dac;
}

.aa-upload-form .aa-upload-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.aa-upload-form .aa-upload-row .form-group {
    margin-bottom: 0;
}

.aa-upload-form .hint-text {
    display: block;
    margin-top: 4px;
}

.aa-doc-type-select {
    font-size: 13px;
}

.aa-documents-list {
    margin-bottom: 18px;
}

.aa-documents-list h4 {
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.aa-doc-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: var(--bg-subtle);
    border-radius: var(--radius-btn);
    margin-bottom: 5px;
    border: 1px solid var(--card-border);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.aa-doc-item:hover {
    background: #eef1f6;
    border-color: #c4cbd5;
}

.aa-doc-info {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.aa-doc-icon {
    font-size: 16px;
    flex-shrink: 0;
}

.aa-doc-name {
    font-size: 13px;
    color: #374151;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.aa-doc-delete {
    flex-shrink: 0;
    padding: 2px 8px;
    font-size: 12px;
    opacity: 0.5;
    transition: opacity 0.15s;
}

.aa-doc-delete:hover {
    opacity: 1;
}

.aa-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 22px 0;
}

.charts-dashboard {
    margin: 20px 0;
    background: #ffffff;
    border: 1px solid var(--card-border);
    border-radius: var(--card-radius);
    padding: 26px;
    box-shadow: var(--card-shadow);
}

.charts-toolbar {
    display: flex;
    gap: 6px;
    margin-bottom: 22px;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 14px;
}

.charts-tab {
    background: #edf0f5;
    border: 1px solid #d8dde5;
    color: #4b5563;
    font-weight: 550;
    padding: 7px 18px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.18s cubic-bezier(0.4, 0, 0.2, 1), color 0.18s, border-color 0.18s;
    font-size: 13px;
    font-family: inherit;
}

.charts-tab:hover {
    background: #e0e4eb;
}

.charts-tab.active {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-darker));
    color: #fff;
    border-color: var(--primary-dark);
    box-shadow: 0 1px 4px rgba(37,99,235,0.3);
}

.charts-panel {
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.charts-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.chart-container {
    flex: 1;
    min-width: 0;
    background: var(--bg-subtle);
    border: 1px solid #dfe4ea;
    border-radius: 11px;
    padding: 22px;
}

.chart-container.chart-full {
    flex: 1 1 100%;
}

.chart-title {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 10px;
}

.chart-select-row {
    margin-bottom: 10px;
}

.chart-select {
    font-size: 12px;
    padding: 4px 8px;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    background: #fff;
    color: #374151;
}

.chart-ready-badge {
    font-size: 10px;
    background: #dcfce7;
    color: #14532d;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 550;
}

.chart-extract-btn {
    font-size: 10px;
    padding: 2px 8px;
}

.ci-error-msg {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 11px;
    padding: 16px 20px;
    text-align: center;
    color: #dc2626;
    margin-top: 8px;
}

.ci-error-msg p {
    margin: 0 0 12px;
    font-size: 14px;
}

.aa-analysis-tabs {
    display: flex;
    gap: 8px;
    margin: 18px 0 14px;
}

.aa-analysis-tab {
    padding: 8px 20px;
    border: 1px solid #d8dde5;
    border-radius: var(--radius-btn);
    background: #edf0f5;
    color: #4b5563;
    font-size: 13px;
    font-weight: 550;
    cursor: pointer;
    transition: background 0.18s cubic-bezier(0.4, 0, 0.2, 1), color 0.18s, border-color 0.18s;
    font-family: inherit;
}

.aa-analysis-tab:hover {
    background: #e0e4eb;
    border-color: #c8cdd5;
}

.aa-analysis-tab.active {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-darker));
    color: #fff;
    border-color: var(--primary-dark);
    box-shadow: 0 1px 4px rgba(37,99,235,0.3);
}

.aa-tab-panel {
    margin-top: 8px;
}

@media (max-width: 480px) {
    .container {
        padding: 12px;
    }

    .navbar {
        padding: 0 14px;
        height: 48px;
        flex-wrap: wrap;
        gap: 6px;
    }

    .nav-brand {
        font-size: 15px;
    }

    .nav-links {
        gap: 6px;
        font-size: 13px;
    }

    .nav-user {
        font-size: 12px;
        max-width: 100px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        border-right: none;
        padding-right: 0;
        margin-right: 0;
    }

    .admin-tabs {
        padding: 0 10px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .admin-tab {
        padding: 8px 14px;
        font-size: 13px;
        white-space: nowrap;
    }

    .card {
        padding: 16px;
        border-radius: 10px;
    }

    .config-card {
        padding: 14px;
    }

    .welcome-card {
        padding: 30px 16px;
    }

    .welcome-card h2 {
        font-size: 18px;
    }

    .login-card {
        padding: 28px 22px;
        margin: 0 10px;
        border-radius: 16px;
    }

    .login-header h1 {
        font-size: 20px;
    }

    .drop-zone {
        padding: 24px 14px;
    }

    .drop-icon {
        width: 36px;
        height: 36px;
    }

    .drop-text {
        font-size: 14px;
    }

    .course-bar {
        padding: 8px 10px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap;
    }

    .course-pills {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 4px;
    }

    .course-pill {
        padding: 5px 10px;
        font-size: 12px;
    }

    .course-action-btn {
        width: 28px;
        height: 28px;
        font-size: 13px;
    }

    .course-create-form {
        flex-direction: column;
        align-items: stretch;
    }

    .course-input {
        max-width: 100%;
    }

    .debrief-mode-toggle {
        flex-direction: column;
    }

    .mode-btn {
        padding: 12px 16px;
        font-size: 14px;
    }

    .style-card {
        padding: 10px 12px;
    }

    .style-card-info h4 {
        font-size: 13px;
    }

    .objective-chip {
        min-height: 44px;
        padding: 10px 14px;
        font-size: 13px;
    }

    .sections-grid {
        gap: 6px;
    }

    .section-checkbox label {
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .aa-upload-form .aa-upload-row {
        flex-direction: column;
        align-items: stretch;
    }

    .aa-upload-form .aa-upload-row .form-group {
        flex: unset !important;
    }

    .ci-options-row {
        flex-direction: column;
    }

    .debrief-section-header {
        min-height: 48px;
        padding: 12px 14px;
    }

    .debrief-section-title {
        font-size: 14px;
    }

    .debrief-section-body {
        padding: 14px;
    }

    .debrief-section-body table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }

    .message {
        padding: 10px 12px;
    }

    .chat-welcome {
        padding: 30px 14px;
    }

    .export-buttons {
        flex-direction: column;
        gap: 8px;
    }

    .mastery-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .mastery-summary-strip {
        gap: 6px;
    }

    .mastery-chip {
        font-size: 11px;
        padding: 4px 10px;
    }

    .cumulative-info-box {
        padding: 10px;
    }

    .courses-grid {
        grid-template-columns: 1fr;
    }

    .course-card {
        padding: 16px;
    }

    .data-table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .data-table {
        min-width: 500px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 16px;
    }

    .navbar {
        padding: 0 16px;
        height: 48px;
    }

    .nav-brand {
        font-size: 16px;
    }

    .nav-links {
        gap: 8px;
    }

    .nav-user {
        border-right: none;
        padding-right: 0;
        margin-right: 0;
    }

    .admin-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .admin-tab {
        white-space: nowrap;
    }

    .prof-dashboard {
        grid-template-columns: 1fr;
    }

    .dual-panel {
        grid-template-columns: 1fr;
    }

    .sidebar .card {
        position: static;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .active-report-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .style-cards {
        flex-direction: column;
    }

    .analytics-layout {
        grid-template-columns: 1fr;
    }

    .charts-row {
        flex-direction: column;
    }

    .course-bar {
        padding: 8px 14px;
    }

    .course-create-form {
        flex-wrap: wrap;
    }

    .course-input {
        max-width: 100%;
        flex: 1 1 100%;
    }

    .aa-upload-form .aa-upload-row {
        flex-wrap: wrap;
    }

    .ci-options-row {
        flex-direction: column;
    }

    .debrief-section-header {
        min-height: 44px;
    }

    .debrief-section-body table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .past-debrief-item,
    .report-item-row {
        min-height: 44px;
    }

    .courses-grid {
        grid-template-columns: 1fr;
    }

    .card {
        padding: 14px;
        border-radius: 10px;
    }

    .welcome-card {
        padding: 28px 16px;
    }

    .drop-zone {
        padding: 24px 14px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .prof-dashboard {
        grid-template-columns: 230px 1fr;
    }

    .dual-panel {
        grid-template-columns: 1fr 300px;
    }

    .courses-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
