/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.5;
    color: #100F0F;
    background-color: #F2F0E5;
    padding-top: 60px;
}

/* Form input reset to prevent white backgrounds */
input[type="text"], 
input[type="email"] {
    background-color: #FEFDF8 !important;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Textarea font fix - use sans-serif instead of monospace */
textarea {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Container and layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    min-height: 100vh;
    background-color: #FFFCF0;
    box-shadow: 0 0 0 1px #E6E4D9;
}

/* Wider container for exam list page - 15% increase */
.exam-list-page {
    display: block !important; /* Critical: Override body flex that constrains width */
}

.exam-list-page .container {
    max-width: 1520px;
}

/* Header */
.header {
    background-color: #100F0F;
    color: #FFFCF0;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid #6F6E69;
}

.header h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.organizer-badge {
    background-color: #CECDC3;
    color: #100F0F;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    font-size: 0.8rem;
    font-weight: 500;
}

.logout-link, .back-link, .audit-link {
    color: #DAD8CE;
    text-decoration: none;
    transition: color 0.2s ease;
}

.logout-link:hover, .back-link:hover, .audit-link:hover {
    color: #FFFCF0;
}

.audit-link {
    font-size: 0.85rem;
    opacity: 0.9;
}

.separator {
    opacity: 0.6;
    margin: 0 0.5rem;
}

/* Flash messages */
.flash-messages {
    padding: 0 1.5rem;
}

.flash-message {
    padding: 0.4rem 0.75rem;
    margin: 0.5rem 0;
    border-radius: 4px;
    border-left: 3px solid;
    font-size: 0.82rem;
}

.flash-success {
    background-color: #F2F0E5;
    color: #66800B;
    border-left-color: #66800B;
}

.flash-error {
    background-color: #F2F0E5;
    color: #AF3029;
    border-left-color: #AF3029;
}

.flash-info {
    background-color: #F2F0E5;
    color: #24837B;
    border-left-color: #24837B;
}

/* Main content */
.main-content {
    padding: 1rem 1.5rem;
}


/* Exam list page */
.exam-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #E6E4D9;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.exam-list-header h2 {
    color: #100F0F;
    font-size: 1.4rem;
    margin: 0;
    white-space: nowrap;
}

.list-status-action-form {
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.list-status-action-btn {
    white-space: nowrap;
    padding: 0.2rem 0.45rem;
    font-size: 0.72rem;
}

.list-status-inline-hint {
    font-size: 0.72rem;
    color: #AF3029;
}

.relative-time {
    cursor: help;
    border-bottom: 1px dotted #CDC9C3;
}

.last-activity {
    font-size: 0.85rem;
    opacity: 0.8;
}

.info-row.deadlines {
    background: rgba(188, 82, 21, 0.1);
    padding: 0.5rem;
    border-radius: 4px;
    border-left: 3px solid #BC5215;
}

.deadline-item {
    font-weight: 500;
    color: #BC5215;
}

.exam-key {
    font-family: 'Monaco', 'Menlo', monospace;
    background-color: #e9ecef;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    color: #495057;
}

.exam-info .info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.exam-info .label {
    font-weight: 500;
    color: #6c757d;
}

.exam-info .value {
    color: #495057;
    text-align: right;
}

.change-counter-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.2rem 0.45rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    border: 1px solid transparent;
    white-space: nowrap;
}

.change-counter-pill.is-pending {
    background: #fff0ee;
    color: #af3029;
    border-color: #f3beb9;
}

.change-counter-pill.notify.is-pending {
    background: #fff7ed;
    color: #9a3412;
    border-color: #fdba74;
}

.change-counter-pill.is-clear {
    background: #f3f4f6;
    color: #6b7280;
    border-color: #e5e7eb;
}

.change-counter-pill.table-pill {
    min-width: 2.3rem;
}

.change-counter-pill.archive-ready-pill {
    background: #dcfce7;
    color: #166534;
    border-color: #86efac;
}

.list-notify-btn {
    padding: 0.2rem 0.45rem;
    font-size: 0.72rem;
    line-height: 1.2;
}

.list-notify-btn:not(:disabled) {
    background: #2d5016;
    border-color: #2d5016;
    color: #fffcf0;
}

.list-notify-btn:not(:disabled):hover {
    background: #3d6b24;
    border-color: #3d6b24;
}

/* Compact table notify button (icon-only with badge) */
.list-notify-btn-compact {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #f9fafb;
    color: #9ca3af;
    cursor: default;
    font-size: 0;
    line-height: 1;
    transition: all 0.15s;
}

.list-notify-btn-compact svg {
    width: 15px;
    height: 15px;
    stroke-width: 1.8;
}

.list-notify-btn-compact:not(:disabled) {
    background: #ecfdf5;
    border-color: #6ee7b7;
    color: #059669;
    cursor: pointer;
}

.list-notify-btn-compact:not(:disabled):hover {
    background: #d1fae5;
    border-color: #34d399;
    box-shadow: 0 1px 3px rgba(5, 150, 105, 0.15);
}

.list-notify-btn-compact .notify-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 15px;
    height: 15px;
    padding: 0 3px;
    border-radius: 99px;
    background: #dc2626;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    line-height: 15px;
    text-align: center;
}

/* Bell toggle + notification control group */
.notify-control-group {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    justify-content: center;
}

.bell-toggle-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid #6ee7b7;
    border-radius: 6px;
    background: #ecfdf5;
    color: #059669;
    cursor: pointer;
    transition: all 0.15s;
}

.bell-toggle-btn:hover {
    background: #d1fae5;
    border-color: #34d399;
    box-shadow: 0 1px 3px rgba(5, 150, 105, 0.15);
}

.bell-toggle-btn svg {
    stroke-width: 2;
}

.bell-toggle-btn .bell-slash {
    position: absolute;
    display: none;
    color: #dc2626;
}

.bell-toggle-btn.is-disabled {
    background: #f9fafb;
    border-color: #d1d5db;
    color: #9ca3af;
}

.bell-toggle-btn.is-disabled:hover {
    background: #fef2f2;
    border-color: #fca5a5;
}

.bell-toggle-btn.is-disabled .bell-slash {
    display: block;
}

/* Hide pending-changes pill when notifications disabled */
.change-counter-pill.notify-hidden {
    visibility: hidden;
}

/* Notifications-disabled banner in exam detail */
.notifications-disabled-banner {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    padding: 10px 14px;
    margin-bottom: 12px;
    color: #1e40af;
    font-size: 13px;
}

/* Archive mode toggle */
.archive-mode-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.6rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #f9fafb;
    color: #6b7280;
    font-size: 0.78rem;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.archive-mode-toggle:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
    color: #374151;
}

.archive-mode-toggle.is-active {
    background: #fef3c7;
    border-color: #f59e0b;
    color: #92400e;
}

.archive-mode-toggle svg {
    width: 14px;
    height: 14px;
}

/* Archive mode: semester-level archive button visibility */
.semester-header .archive-toggle {
    display: none;
}

.archive-mode-active .semester-header .archive-toggle {
    display: block;
}

/* Archive mode: highlight rows */
.archive-mode-active .exam-list-table tbody tr:hover {
    background-color: #fef9c3;
}

/* Table value muted */
.table-value-muted {
    color: #d1d5db;
}

.list-notify-btn.is-busy,
.manual-send-buttons .btn.is-busy {
    opacity: 0.72;
    cursor: wait;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #6c757d;
}

.empty-state h3 {
    margin-bottom: 1rem;
    color: #495057;
}

.empty-state a {
    color: #100F0F;
    text-decoration: none;
}

.empty-state a:hover {
    text-decoration: underline;
}

/* Form styles */
.form-container {
    max-width: 800px;
    margin: 0 auto;
}

.exam-form {
    background-color: #FFFFFF;
}

.exam-form .form-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    border: 1px solid #E6E4D9;
    border-radius: 8px;
    background-color: #F9F8F3;
}

/* Enhanced collapsible section header */
.section-header {
    background-color: #100F0F;
    color: #FFFCF0;
    padding: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2px;
}

.section-header:hover {
    background-color: #6F6E69;
}

.section-title-area {
    flex: 1;
    margin-right: 2rem; /* Add space between description and status flags */
}

.section-header h2 {
    font-size: 1.2rem;
    margin: 0 0 0.25rem 0;
    font-weight: 500;
    color: #FFFCF0;
}

.section-status {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

/* Section management buttons */
.section-management-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.section-management-btn form {
    margin: 0;
    padding: 0;
}

.section-management-btn .btn-small {
    margin: 0;
    vertical-align: middle;
    min-width: 80px; /* Consistent button width */
    text-align: center;
}

/* Make section management buttons more visible on dark headers */
.section-header .section-management-btn .btn-secondary {
    background-color: rgba(255, 252, 240, 0.9) !important;
    color: #100F0F !important;
    border: 1px solid rgba(255, 252, 240, 0.7) !important;
    font-weight: 500;
}

.section-header .section-management-btn .btn-secondary:hover {
    background-color: #FFFCF0 !important;
    color: #100F0F !important;
    border-color: #FFFCF0 !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Status indicators */
.status-indicator {
    padding: 0.3rem 0.6rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

.status-complete {
    background-color: #66800B;
    color: #FFFCF0;
}

.status-partial {
    background-color: #BC5215;
    color: #FFFCF0;
}

.status-empty {
    background-color: #AF3029;
    color: #FFFCF0;
}

.status-optional-filled {
    background-color: #8B7EC8;
    color: #FFFCF0;
}

.status-optional-empty {
    background-color: #878580;
    color: #FFFCF0;
}

.status-missing {
    background-color: #AF3029;
    color: #FFFCF0;
}

.missing-count {
    font-weight: bold;
    color: #FFFCF0;
    background-color: rgba(255, 252, 240, 0.3);
    padding: 2px 4px;
    border-radius: 3px;
    margin-right: 2px;
}

.section-description {
    margin: 0;
    opacity: 0.9;
    font-size: 0.9rem;
}

/* Compact section headers (without descriptions) */
.section-header-compact {
    padding: 1rem 1.5rem; /* Reduced padding for compact headers */
}

.section-header-compact h2 {
    margin: 0; /* No margin for title in compact headers */
}

/* Infotext widget styling */
.infotext-widget {
    background: #F7F5F3;
    border: 1px solid #E6E4D9;
    border-radius: 6px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.6;
}

.infotext-widget p {
    margin: 0 0 1rem 0;
}

.infotext-widget p:last-child {
    margin-bottom: 0;
}

.infotext-widget strong {
    color: #100F0F;
    font-weight: 600;
}

.infotext-widget ul {
    margin: 0 0 1rem 0;
    padding-left: 1.5rem;
}

.infotext-widget ul:last-child {
    margin-bottom: 0;
}

.infotext-widget li {
    margin-bottom: 0.5rem;
}

.infotext-widget li:last-child {
    margin-bottom: 0;
}

.form-group-infotext {
    margin-bottom: 0; /* Remove margin since infotext has its own spacing */
}

.section-content {
    background-color: #FFFCF0;
    padding: 2rem;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group:last-child {
    margin-bottom: 2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
}

/* Enhanced field label styling */
.form-group label.required {
    font-weight: 700;
    color: #212529;
}

.form-group label.optional {
    font-weight: 400;
    color: #6c757d;
}

.required-asterisk {
    color: #dc3545;
    margin-left: 0.25rem;
}

.field-last-editor {
    margin: -0.2rem 0 0.55rem;
    font-size: 0.78rem;
    color: #6F6E69;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #100F0F;
    box-shadow: 0 0 0 2px rgba(16, 15, 15, 0.2);
}

.form-group input[readonly] {
    background-color: #e9ecef;
    cursor: not-allowed;
}

.form-description {
    margin-top: 0.25rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: #6F6E69;
    line-height: 1.4;
}

.form-help {
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #6c757d;
}

.form-info {
    padding: 0.75rem;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.debug-info {
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: #dc3545;
    font-family: 'Monaco', 'Menlo', monospace;
}

/* Auto-deadline suggestion styling */
.auto-suggestion {
    margin-top: 0.5rem;
    padding: 0.75rem;
    background-color: #E3F2FD;
    border: 1px solid #BBDEFB;
    border-radius: 4px;
    font-size: 0.9rem;
}

.suggestion-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.suggestion-label {
    color: #1565C0;
    font-weight: 500;
}

.suggestion-date {
    font-weight: 600;
    color: #0D47A1;
    background-color: #ffffff;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    border: 1px solid #90CAF9;
}

.suggestion-basis {
    color: #1976D2;
    font-size: 0.85rem;
    font-style: italic;
}

.btn-suggestion {
    background-color: #2196F3;
    color: white;
    border: none;
    padding: 0.375rem 0.75rem;
    border-radius: 4px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    white-space: nowrap;
}

.btn-suggestion:hover {
    background-color: #1976D2;
    transform: translateY(-1px);
}

.btn-suggestion:active {
    transform: translateY(0);
}

.btn-suggestion.suggestion-applied {
    background-color: #4CAF50;
    color: white;
}

/* Responsive design for suggestions */
@media (max-width: 768px) {
    .suggestion-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .btn-suggestion {
        align-self: stretch;
        text-align: center;
    }
}

/* Checkbox styling */
.checkbox-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.checkbox-container input[type="checkbox"] {
    width: auto;
    margin: 0;
    transform: scale(1.2);
}

.checkbox-label {
    margin-bottom: 0 !important;
    font-weight: normal;
    cursor: pointer;
}

/* Required field validation indicators */
.field-required-empty {
    border: 2px solid #dc3545 !important;
    background-color: #fff5f5 !important;
}

.field-required-empty:focus {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.2) !important;
}

/* Acknowledged/readonly field styling with fine diagonal pattern */
.form-group input[readonly],
.form-group textarea[readonly],
.form-group input[type="date"][readonly],
.form-group input[type="time"][readonly],
.form-group input[type="number"][readonly] {
    background-color: #F2F0E5 !important;
    background-image: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 2px,
        rgba(111, 110, 105, 0.08) 2px,
        rgba(111, 110, 105, 0.08) 4px
    ) !important;
    border: 1px solid #D4D3CE !important;
    font-weight: 600 !important;
    color: #100F0F !important;
    cursor: not-allowed;
    transition: transform 0.1s ease-in-out;
    position: relative;
}

/* Readonly file widget styling */
.form-group .file-widget.readonly-file .file-current {
    background-color: #F2F0E5 !important;
    background-image: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 2px,
        rgba(111, 110, 105, 0.08) 2px,
        rgba(111, 110, 105, 0.08) 4px
    ) !important;
    border: 1px solid #D4D3CE !important;
    border-radius: 4px;
    padding: 0.75rem;
}

.form-group input[readonly]:focus,
.form-group textarea[readonly]:focus,
.form-group input[type="date"][readonly]:focus,
.form-group input[type="time"][readonly]:focus,
.form-group input[type="number"][readonly]:focus {
    border-color: #D4D3CE !important;
    box-shadow: none !important;
    outline: none !important;
}

/* Wiggle animation for readonly field interaction */
@keyframes wiggle {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-2px); }
    20%, 40%, 60%, 80% { transform: translateX(2px); }
}

.readonly-wiggle {
    animation: wiggle 0.4s ease-in-out;
}

.checkbox-container input[type="checkbox"]:disabled {
    opacity: 1 !important;
    cursor: default;
}

.checkbox-container input[type="checkbox"]:disabled + .checkbox-label {
    font-weight: 600 !important;
    color: #100F0F !important;
    cursor: default;
}

.required-indicator {
    position: absolute;
    right: 8px;
    top: 8px;
    font-size: 0.9rem;
    font-weight: bold;
    z-index: 10;
    pointer-events: none;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #dc3545;
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
}

.form-group {
    position: relative;
}

/* Exam detail page */
.exam-header {
    margin-bottom: 2rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.exam-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.exam-meta-redesigned {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.meta-left {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    flex: 1;
}

.meta-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: fit-content;
}

.meta-item-compact {
    display: flex;
    gap: 0.5rem;
    align-items: baseline;
}

.meta-item-compact .label {
    font-size: 0.875rem;
    color: #6c757d;
    font-weight: 500;
    min-width: fit-content;
}

.meta-item-compact .value {
    color: #495057;
    font-weight: 500;
    min-width: fit-content;
}


.meta-right {
    display: flex;
    align-items: flex-start;
    flex-shrink: 0;
}

.meta-item {
    display: flex;
    flex-direction: column;
}

.meta-item .label {
    font-size: 0.875rem;
    color: #6c757d;
    margin-bottom: 0.25rem;
}

.meta-item .value {
    color: #495057;
    font-weight: 500;
}

.semester-move-container {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.btn-inline-edit {
    background: none;
    border: 1px solid #ced4da;
    border-radius: 3px;
    cursor: pointer;
    padding: 0.1rem 0.35rem;
    font-size: 0.85rem;
    color: #6c757d;
    line-height: 1;
}

.btn-inline-edit:hover {
    color: #495057;
    border-color: #868e96;
}

.semester-select {
    padding: 0.25rem 0.5rem;
    font-size: 0.85rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background: #fff;
}

/* UNIFIED BUTTON SYSTEM - Flexoki Colors */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1.2;
}

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

/* Primary action button (save, submit) */
.btn-primary,
.section-save-btn {
    color: #FFFCF0;
    background-color: #100F0F;
    border-color: #100F0F;
}

.btn-primary:hover,
.section-save-btn:hover {
    background-color: #6F6E69;
    border-color: #6F6E69;
}

/* Secondary/outline buttons */
.btn-secondary,
.btn-outline {
    color: #100F0F;
    background-color: transparent;
    border-color: #6F6E69;
}

.btn-secondary:hover,
.btn-outline:hover {
    color: #FFFCF0;
    background-color: #6F6E69;
    border-color: #6F6E69;
    text-decoration: none;
}

/* Muted button variant */
.btn-muted {
    color: #878580;
    border-color: #D4D3CE;
    opacity: 0.7;
}

.btn-muted:hover {
    opacity: 1;
    color: #6F6E69;
    border-color: #6F6E69;
    background-color: transparent;
}

/* Acknowledge button (positive action) */
.btn-acknowledge {
    color: #FFFCF0;
    background-color: #66800B;
    border-color: #66800B;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
}

.btn-acknowledge:hover {
    background-color: #4F5E09;
    border-color: #4F5E09;
}

/* Revert button (destructive action) */
.btn-revert {
    color: #FFFCF0;
    background-color: #AF3029;
    border-color: #AF3029;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
}

.btn-revert:hover {
    background-color: #8C261F;
    border-color: #8C261F;
}

/* Danger button (delete actions) - outlined style for better emoji visibility */
.btn-danger {
    color: #AF3029;
    background-color: transparent;
    border: 1px solid #AF3029;
    padding: 0.375rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-size: 0.875rem;
    font-family: inherit;
    transition: all 0.2s ease;
}

.btn-danger:hover {
    color: #FFFCF0;
    background-color: #AF3029;
    border-color: #AF3029;
}

/* Icon-only danger button variant (more compact) */
.btn-danger.btn-icon-only {
    padding: 0.375rem;
    font-size: 1rem;
    line-height: 1;
    min-width: unset;
}

/* Exam creation form styling - similar to section-content */
.form-container {
    background-color: #FFFFFF;
    border-radius: 8px;
    padding: 2rem;
    margin: 2rem auto;
    max-width: 600px;
    border: 1px solid #E6E4D9;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.form-section {
    margin-bottom: 2rem;
}

.form-section:last-child {
    margin-bottom: 0;
}

.form-container .form-section h2 {
    font-size: 1.2rem;
    margin: 0 0 1.5rem 0;
    font-weight: 600;
    color: #100F0F;
    border-bottom: 1px solid #E6E4D9;
    padding-bottom: 0.75rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #100F0F;
    font-size: 0.95rem;
}

.form-group input[type="text"],
.form-group input[type="email"] {
    width: 100%;
    padding: 0.875rem;
    border: 1px solid #D4D3CE;
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    background-color: #FEFDF8 !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus {
    outline: none;
    border-color: #2D5016;
    box-shadow: 0 0 0 3px rgba(45, 80, 22, 0.1);
    background-color: #FEFDF8;
}

.form-help {
    font-size: 0.875rem;
    color: #6F6E69;
    margin-top: 0.5rem;
    line-height: 1.4;
}

.form-info {
    background: rgba(45, 80, 22, 0.03);
    padding: 1rem;
    border-radius: 6px;
    margin: 1rem 0;
    border-left: 3px solid #2D5016;
    font-size: 0.9rem;
    line-height: 1.4;
}

.form-info strong {
    color: #2D5016;
    font-weight: 600;
}

.checkbox-container {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(45, 80, 22, 0.02);
    border-radius: 6px;
    border: 1px solid rgba(45, 80, 22, 0.08);
}

.checkbox-container input[type="checkbox"] {
    margin-top: 0.125rem;
    transform: scale(1.1);
}

.checkbox-label {
    font-weight: 500;
    color: #100F0F;
    cursor: pointer;
    line-height: 1.4;
}

.form-actions {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #dee2e6;
    display: flex;
    gap: 1rem;
    justify-content: flex-start;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        margin: 0;
        box-shadow: none;
    }
    
    .header {
        padding: 1rem;
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .exam-list-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .header-actions {
        width: 100%;
        justify-content: space-between;
    }

    .status-filter-group {
        flex: 1;
    }

    .search-filter-group {
        flex: 2;
        min-width: 0;
    }

    .status-filter-select {
        width: 100%;
        min-width: 0;
    }

    .exam-search-input {
        width: 100%;
        min-width: 0;
    }
    
    .exam-meta {
        grid-template-columns: 1fr;
    }
    
    .exam-meta-redesigned {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .meta-left {
        gap: 1rem;
    }
    
    .meta-group {
        min-width: 100%;
    }
    
    .meta-right {
        align-self: flex-start;
    }
    
    .form-actions {
        flex-direction: column;
    }
}

/* Redesign-v2 lifecycle UI */
.exam-lifecycle-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.9rem;
}

.exam-lifecycle-state {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.exam-lifecycle-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.exam-lifecycle-actions form {
    margin: 0;
}

.lifecycle-inline-hint {
    display: block;
    margin-top: 0.28rem;
    font-size: 0.78rem;
    color: #9a3412;
}

.lifecycle-inline-hint-counterparty {
    color: #1d4ed8;
}

.btn-summary-notify-header {
    white-space: nowrap;
}

.readonly-banner {
    background: #fff1f2;
    border: 1px solid #fda4af;
    color: #881337;
    padding: 0.7rem 0.9rem;
    border-radius: 8px;
    margin-bottom: 0.9rem;
    font-weight: 600;
}

.draft-status-banner {
    background: #fff8dc;
    border: 1px solid #f5d67a;
    color: #6b4f00;
    padding: 0.7rem 0.9rem;
    border-radius: 8px;
    margin-bottom: 0.9rem;
}

/* Unified pending-changes box (header + items in one container) */
.pending-changes-box {
    border: 1px solid #fdba74;
    border-radius: 8px;
    margin-bottom: 0.9rem;
    overflow: hidden;
}

.pending-changes-box-header {
    padding: 0.55rem 0.9rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.pending-changes-box-action {
    border-color: #fca5a5;
}

.pending-changes-box-action .pending-changes-box-header {
    background: #fef2f2;
    color: #991b1b;
}

.pending-changes-box-counterparty {
    border-color: #93c5fd;
}

.pending-changes-box-counterparty .pending-changes-box-header {
    background: #eff6ff;
    color: #1d4ed8;
}

.pending-changes-list {
    list-style: none;
    margin: 0;
    padding: 0.35rem 0.7rem 0.55rem;
    display: grid;
    gap: 0.4rem;
}

.pending-changes-box-action .pending-changes-list {
    background: #fff7f7;
}

.pending-changes-box-counterparty .pending-changes-list {
    background: #f8fbff;
}

.archive-ready-banner {
    margin-bottom: 0.9rem;
    padding: 0.65rem 0.8rem;
    border-radius: 8px;
    border: 1px solid #86efac;
    background: #ecfdf3;
    color: #14532d;
    display: flex;
    justify-content: space-between;
    gap: 0.7rem;
    align-items: center;
}

.archive-ready-copy {
    font-size: 0.9rem;
}

.pending-change-item {
    padding: 0.45rem 0.5rem;
    border-radius: 6px;
    background: #fff;
    border: 1px solid #fde7cf;
}

.pending-changes-box-action .pending-change-item {
    border-color: #fecaca;
}

.pending-changes-box-counterparty .pending-change-item {
    border-color: #dbeafe;
}

.pending-change-main {
    font-size: 0.9rem;
    color: #7c2d12;
}

.pending-change-diff {
    color: #9a3412;
}

.pending-change-meta {
    margin-top: 0.2rem;
    font-size: 0.8rem;
    color: #b45309;
}

.pending-changes-box-action .pending-change-main { color: #7f1d1d; }
.pending-changes-box-counterparty .pending-change-main { color: #1e3a8a; }
.pending-changes-box-action .pending-change-diff { color: #991b1b; }
.pending-changes-box-counterparty .pending-change-diff { color: #1d4ed8; }
.pending-changes-box-action .pending-change-meta { color: #b91c1c; }
.pending-changes-box-counterparty .pending-change-meta { color: #2563eb; }

.deadline-auto-shift-notice[hidden] {
    display: none !important;
}

.deadline-auto-shift-notice {
    margin-bottom: 0.8rem;
    padding: 0.65rem 0.8rem;
    border: 1px solid #f59e0b;
    border-radius: 8px;
    background: #fff8e1;
    color: #7c2d12;
    display: flex;
    justify-content: space-between;
    gap: 0.65rem;
    align-items: flex-start;
}

.deadline-auto-shift-notice-main {
    display: grid;
    gap: 0.35rem;
}

.deadline-auto-shift-notice-main ul {
    margin: 0;
    padding-left: 1.1rem;
}

.v2-deadline-manager {
    margin-bottom: 0.9rem;
    padding: 0.75rem 0.85rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #f8fafc;
}

.v2-deadline-manager-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.6rem;
    gap: 0.7rem;
}

.v2-deadline-manager-header h3 {
    margin: 0;
    font-size: 1rem;
    color: #111827;
}

.v2-deadline-item {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 0.45rem;
}

.v2-deadline-main {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.v2-deadline-actions {
    display: flex;
    gap: 0.35rem;
    align-items: center;
}

.deadline-pill-met {
    background: #dcfce7;
    border-color: #86efac;
    color: #166534;
}

.deadline-pill-updated {
    background: #fff7ed;
    border-color: #fdba74;
    color: #9a3412;
}

.v2-deadline-form {
    margin-top: 0.65rem;
    border-top: 1px solid #e5e7eb;
    padding-top: 0.65rem;
    display: grid;
    gap: 0.55rem;
}

.v2-deadline-form-row {
    display: grid;
    gap: 0.25rem;
}

.v2-deadline-form-row-inline {
    display: grid;
    gap: 0.6rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.v2-deadline-preset-row {
    border: 1px dashed #d1d5db;
    border-radius: 8px;
    padding: 0.55rem 0.6rem;
    background: #f9fafb;
}

.v2-deadline-preset-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #334155;
}

.v2-deadline-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.v2-deadline-preset-hint {
    color: #64748b;
}

#v2-custom-deliverable-row small {
    color: #64748b;
}

.v2-deadline-form label {
    font-size: 0.84rem;
    font-weight: 600;
    color: #374151;
}

.v2-deadline-form input,
.v2-deadline-form select {
    min-height: 36px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 0.35rem 0.5rem;
    font-size: 0.9rem;
    background: #fff;
}

.v2-deadline-form-actions {
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.exam-lifecycle-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.2;
}

.exam-lifecycle-badge.status-draft {
    color: #92400e;
    background: #fef3c7;
    border-color: #fcd34d;
}

.exam-lifecycle-badge.status-active {
    color: #166534;
    background: #dcfce7;
    border-color: #86efac;
}

.exam-lifecycle-badge.status-archived {
    color: #374151;
    background: #e5e7eb;
    border-color: #d1d5db;
}

.exam-readonly .section-save-btn,
.exam-readonly .btn-acknowledge,
.exam-readonly .btn-revert,
.exam-readonly .btn-deadline {
    opacity: 0.6;
}

/* Section form actions */
.section-form-actions {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
}

.main-actions {
    margin-top: 2rem;
    padding: 1rem;
    text-align: center;
    border-top: 2px solid #e0e0e0;
}

/* Sticky Top Navigation */
.top-nav-sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #100F0F;
    border-bottom: 1px solid #E6E4D9;
    z-index: 1000;
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.75rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

/* Wider navbar for exam list page to match container */
.exam-list-page .nav-content {
    max-width: 1520px;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    min-width: 0;
}

.exam-title-nav {
    color: #FFFCF0;
    font-size: 1.2rem;
    font-weight: 500;
    margin: 0;
    white-space: nowrap;
}

.user-info-compact {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: rgba(255, 252, 240, 0.9);
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-email {
    color: #DAD8CE;
}

.btn-logout {
    background: transparent;
    color: #DAD8CE;
    padding: 0.4rem 0.8rem;
    text-decoration: none;
    border: 1px solid #DAD8CE;
    border-radius: 3px;
    font-size: 0.85rem;
    transition: all 0.2s;
    margin-top: 0;
}

.btn-logout:hover {
    background: #AF3029;
    border-color: #AF3029;
    color: #FFFCF0;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-save-sticky {
    background: #4caf50;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.9rem;
    transition: background-color 0.2s;
    white-space: nowrap;
    margin-top: 0;
}

.btn-save-sticky:hover {
    background: #45a049;
}

.btn-secondary-nav {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: background-color 0.2s;
    white-space: nowrap;
    margin-top: 0;
}

.btn-secondary-nav:hover {
    background: rgba(255, 255, 255, 0.25);
    color: white;
    text-decoration: none;
}

.btn-outline-nav {
    background: transparent;
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    font-size: 0.9rem;
    transition: all 0.2s;
    white-space: nowrap;
    margin-top: 0;
}

.btn-outline-nav:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    text-decoration: none;
    border-color: rgba(255, 255, 255, 0.5);
}

.btn-primary-nav {
    background: #100F0F;
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: all 0.2s;
    white-space: nowrap;
    margin-top: 0;
}

.btn-primary-nav:hover {
    background: #2D2A27;
    color: white;
    text-decoration: none;
}

.audit-btn-small {
    background: #f8f9fa;
    color: #6F6E69;
    text-decoration: none;
    padding: 0.25rem 0.5rem;
    border: 1px solid #E6E4D9;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s;
    white-space: nowrap;
    height: 1.75rem;
    display: flex;
    align-items: center;
}

.audit-btn-small:hover {
    background: #E6E4D9;
    color: #100F0F;
    text-decoration: none;
    border-color: #CDC9C3;
}

.workflow-btn-small {
    background: #e3f2fd;
    color: #1565c0;
    text-decoration: none;
    padding: 0.25rem 0.5rem;
    border: 1px solid #bbdefb;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s;
    white-space: nowrap;
    height: 1.75rem;
    display: flex;
    align-items: center;
    margin-right: 0.5rem;
}

.workflow-btn-small:hover {
    background: #bbdefb;
    color: #0d47a1;
    text-decoration: none;
    border-color: #90caf9;
}

.workflow-icon {
    width: 14px;
    height: 14px;
    margin-right: 0.25rem;
}

.inline-workflow-panel {
    margin: 1.25rem 0;
    padding: 1rem;
    border: 1px solid #d0d7de;
    border-radius: 10px;
    background: #f8fbff;
}

.inline-workflow-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.inline-workflow-header h3 {
    margin: 0;
}

.inline-workflow-progress {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.inline-workflow-progress-pill {
    background: #e9ecef;
    color: #495057;
    border-radius: 999px;
    font-size: 0.78rem;
    padding: 0.2rem 0.55rem;
    font-weight: 600;
}

.inline-workflow-list {
    display: grid;
    gap: 0.6rem;
}

.inline-workflow-phases {
    display: grid;
    gap: 0.75rem;
}

.inline-workflow-phase-group {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.6rem;
    background: #f8fafc;
}

.inline-workflow-phase-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.55rem;
}

.inline-workflow-phase-header h4 {
    margin: 0;
    font-size: 0.84rem;
    color: #334155;
    letter-spacing: 0.02em;
}

.inline-workflow-step-header h4 {
    margin: 0;
    font-size: 0.95rem;
}

.inline-workflow-step-meta {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.inline-workflow-role-pill,
.inline-workflow-phase-pill {
    font-size: 0.72rem;
    font-weight: 600;
    border-radius: 999px;
    padding: 0.15rem 0.45rem;
    border: 1px solid transparent;
}

.inline-workflow-role-pill {
    background: #f3f4f6;
    color: #374151;
    border-color: #e5e7eb;
}

.inline-workflow-phase-pill {
    background: #dbeafe;
    color: #1e3a8a;
    border-color: #bfdbfe;
}

.inline-workflow-step-controls {
    display: grid;
    gap: 0.45rem;
}

.inline-workflow-status-quick {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.inline-workflow-status-check {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    color: #374151;
    cursor: pointer;
}

.inline-workflow-status-checkbox {
    width: 15px;
    height: 15px;
    accent-color: #15803d;
}

.inline-workflow-status-checkbox:indeterminate {
    accent-color: #1d4ed8;
}

.inline-workflow-na-toggle.is-active {
    background: #e0e7ff;
    color: #3730a3;
    border-color: #c7d2fe;
}

.inline-workflow-status-advanced {
    display: grid;
    gap: 0.2rem;
}

.inline-workflow-step-controls label {
    display: grid;
    gap: 0.25rem;
    font-size: 0.8rem;
    color: #4b5563;
}

.inline-workflow-step-controls select,
.inline-workflow-step-controls textarea {
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 0.4rem 0.55rem;
    font-size: 0.84rem;
    background: #fff;
}

.inline-workflow-step-controls textarea {
    resize: vertical;
    min-height: 56px;
}

.inline-workflow-requirements {
    margin-top: 0.5rem;
    border-top: 1px dashed #d1d5db;
    padding-top: 0.55rem;
    display: grid;
    gap: 0.45rem;
}

.inline-workflow-requirements h5 {
    margin: 0;
    font-size: 0.82rem;
    color: #334155;
}

.inline-workflow-requirement {
    display: grid;
    gap: 0.3rem;
}

.inline-workflow-requirement-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    padding: 0.4rem 0.55rem;
    font-size: 0.78rem;
    color: #1d4ed8;
}

.inline-workflow-requirement-description {
    color: #6b7280;
    font-size: 0.74rem;
}

.inline-workflow-requirement-checkbox {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    color: #374151;
}

.inline-workflow-requirement-field.is-dirty {
    border-color: #d97706;
    background: #fffbeb;
}

.inline-workflow-file-block {
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 0.4rem 0.5rem;
    background: #f8fafc;
    transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.inline-workflow-file-block.is-drag-over {
    border-color: #2563eb;
    background: #eff6ff;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.14);
}

.inline-workflow-file-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
}

.inline-workflow-file-header small {
    color: #64748b;
}

.inline-workflow-file-actions {
    margin-top: 0.35rem;
    display: flex;
    gap: 0.4rem;
    align-items: center;
}

.inline-workflow-file-drop-hint {
    margin-top: 0.3rem;
    font-size: 0.74rem;
    color: #64748b;
}

.inline-workflow-file-input {
    display: none;
}

.inline-workflow-file-list {
    list-style: none;
    margin: 0.45rem 0 0 0;
    padding: 0;
    display: grid;
    gap: 0.28rem;
}

.inline-workflow-file-item {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    align-items: flex-start;
    font-size: 0.76rem;
}

.inline-workflow-file-main {
    display: grid;
    gap: 0.15rem;
    min-width: 0;
}

.inline-workflow-file-item a {
    color: #1d4ed8;
    text-decoration: none;
}

.inline-workflow-file-item a:hover {
    text-decoration: underline;
}

.inline-workflow-file-meta {
    color: #6b7280;
    white-space: nowrap;
}

.inline-workflow-file-empty {
    color: #6b7280;
    font-size: 0.74rem;
}

.inline-workflow-requirements-progress {
    margin: 0;
    font-size: 0.76rem;
    color: #475569;
}


.inline-workflow-status-label {
    font-size: 0.78rem;
    color: #374151;
}

.inline-workflow-save-state {
    font-size: 0.76rem;
    color: #6b7280;
}

.inline-workflow-save-state.is-saving {
    color: #1d4ed8;
}

.inline-workflow-save-state.is-saved {
    color: #15803d;
}

.inline-workflow-save-state.is-error {
    color: #b91c1c;
}

.inline-workflow-status-date {
    font-size: 0.72rem;
    color: #9ca3af;
    margin-left: 0.3rem;
    white-space: nowrap;
}

/* --- TOC Notification Area --- */

.toc-notification-area {
    border-top: 1px solid #e5e7eb;
    margin-top: 0.6rem;
    padding-top: 0.6rem;
    display: grid;
    gap: 0.4rem;
}

.toc-pending-indicator {
    position: relative;
    font-size: 0.78rem;
    color: #4b5563;
    padding: 0.35rem 0.5rem;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    cursor: default;
}

.toc-pending-indicator:hover .toc-pending-overlay {
    display: block;
}

.toc-pending-label {
    display: block;
    line-height: 1.3;
}

.toc-pending-overlay {
    display: none;
    position: absolute;
    bottom: calc(100% + 6px);
    left: 0;
    right: 0;
    min-width: 260px;
    max-width: 360px;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    padding: 0.6rem 0.75rem;
    z-index: 100;
    font-size: 0.76rem;
}

.toc-pending-overlay-header {
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.4rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid #e5e7eb;
}

.toc-pending-overlay-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.3rem;
    max-height: 200px;
    overflow-y: auto;
}

.toc-pending-overlay-list li {
    line-height: 1.35;
    color: #4b5563;
}

.toc-pending-overlay-list .pending-change-diff {
    color: #6b7280;
    font-style: italic;
}

.toc-notify-btn {
    display: block;
    width: 100%;
    padding: 0.4rem 0.5rem;
    border: 1px solid #3b82f6;
    border-radius: 6px;
    background: #3b82f6;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    line-height: 1.3;
    transition: background 0.15s, opacity 0.15s;
}

.toc-notify-btn:hover:not(:disabled) {
    background: #2563eb;
}

.toc-notify-btn:disabled {
    background: #e5e7eb;
    border-color: #d1d5db;
    color: #9ca3af;
    cursor: default;
}

.toc-notify-btn.is-busy {
    opacity: 0.6;
}

@media (max-width: 1080px) {
    .toc-notification-area {
        margin-top: 0.4rem;
        padding-top: 0.4rem;
    }
    .toc-pending-overlay {
        position: fixed;
        bottom: auto;
        left: 1rem;
        right: 1rem;
        top: 50%;
        transform: translateY(-50%);
        max-width: none;
    }
}

/* --- Compact workflow items (redesign-v2) --- */

.inline-workflow-form-section .section-header {
    background: #f0f4f8;
    border-bottom: 2px solid #cbd5e1;
}

.inline-workflow-form-section .section-header h2 {
    font-size: 1.05rem;
    color: #334155;
    letter-spacing: 0.01em;
}

/* Compact step layout — collapsed by default */
.inline-workflow-step {
    border: 1px solid #e1e6ea;
    border-radius: 8px;
    background: #fff;
    padding: 0;
    overflow: hidden;
    transition: box-shadow 0.15s;
}

.inline-workflow-step:hover {
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.inline-workflow-step-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
    padding: 0.6rem 0.75rem;
    cursor: pointer;
    user-select: none;
    margin-bottom: 0;
}

.inline-workflow-step-title-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

.inline-workflow-step-title-row h4 {
    margin: 0;
    font-size: 0.88rem;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.inline-workflow-step-title-row .inline-workflow-status-checkbox {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    accent-color: #15803d;
    cursor: pointer;
}

/* Notes indicator badge */
.inline-workflow-notes-badge {
    flex-shrink: 0;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
    line-height: 1.3;
}

/* Expand chevron */
.inline-workflow-expand-icon {
    flex-shrink: 0;
    font-size: 1.1rem;
    color: #64748b;
    transition: transform 0.2s;
    margin-left: auto;
}

.inline-workflow-step.is-expanded .inline-workflow-expand-icon {
    transform: rotate(90deg);
}

.inline-workflow-step:hover .inline-workflow-expand-icon {
    color: #334155;
}

/* Status pills row */
.inline-workflow-status-pills {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.wf-pill {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    border: 1px solid #d1d5db;
    background: #f9fafb;
    color: #6b7280;
    cursor: pointer;
    transition: background 0.12s, color 0.12s, border-color 0.12s;
    line-height: 1.3;
}

.wf-pill:hover:not(:disabled) {
    background: #e5e7eb;
    color: #374151;
}

.wf-pill:disabled {
    cursor: default;
    opacity: 0.5;
}

.wf-pill.is-active[data-wf-status="pending"] {
    background: #fef3c7;
    color: #92400e;
    border-color: #fcd34d;
}

.wf-pill.is-active[data-wf-status="in_progress"] {
    background: #dbeafe;
    color: #1e40af;
    border-color: #93c5fd;
}

.wf-pill.is-active[data-wf-status="done"] {
    background: #d1fae5;
    color: #065f46;
    border-color: #6ee7b7;
}

.wf-pill.is-active[data-wf-status="na"] {
    background: #e0e7ff;
    color: #3730a3;
    border-color: #c7d2fe;
}

/* Collapsible details panel */
.inline-workflow-step-details {
    display: none;
    padding: 0 0.7rem 0.7rem;
    border-top: 1px solid #f1f5f9;
}

.inline-workflow-step.is-expanded .inline-workflow-step-details {
    display: block;
}

/* Role pill in compact title row */
.inline-workflow-step-title-row .inline-workflow-role-pill {
    font-size: 0.65rem;
    flex-shrink: 0;
}

/* TOC workflow pill */
.toc-workflow-pill {
    font-size: 0.72rem;
}

/* --- Deadline inline (in section 5) --- */

#form-deadlines {
    display: none;
}

.v2-deadline-inline {
    padding: 0.25rem 0;
}

.v2-deadline-inline .deadlines-list {
    margin-bottom: 0.5rem;
}

#v2-deadline-add-btn {
    margin-top: 0.25rem;
}

/* Deadline modal form adjustments */
#v2-deadline-modal .v2-deadline-form {
    display: grid;
    gap: 0.75rem;
}

#v2-deadline-modal .conflict-resolution-actions {
    margin-top: 0.5rem;
}

.exam-detail-layout.is-long-form {
    display: grid;
    grid-template-columns: minmax(190px, 240px) minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

.exam-detail-form-column {
    min-width: 0;
}

.exam-detail-toc {
    position: sticky;
    top: 88px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #ffffff;
    padding: 0.75rem;
}

.exam-detail-toc h3 {
    margin: 0 0 0.5rem 0;
    font-size: 0.86rem;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.exam-detail-toc ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.28rem;
}

.exam-detail-toc a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.45rem;
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 0.32rem 0.45rem;
    color: #4b5563;
    font-size: 0.82rem;
    text-decoration: none;
}

.exam-detail-toc a:hover {
    background: #f3f4f6;
    border-color: #e5e7eb;
    color: #111827;
}

.exam-detail-toc a.is-active {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
    font-weight: 600;
}

.toc-link-label {
    min-width: 0;
}

.toc-link-meta {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    flex-shrink: 0;
}

.toc-pending-badge {
    min-width: 1.15rem;
    height: 1.15rem;
    border-radius: 999px;
    border: 1px solid #fdba74;
    background: #fff7ed;
    color: #9a3412;
    font-size: 0.68rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    padding: 0 0.2rem;
}

.toc-pending-badge.is-empty {
    display: none;
}

.toc-dirty-dot {
    color: #dc2626;
    font-size: 0.8rem;
    line-height: 1;
}

.exam-detail-toc a.has-dirty {
    border-color: #fecaca;
    background: #fff1f2;
}

.section-header-static {
    cursor: default;
}

.section-header-static:hover {
    background-color: #100F0F;
}

.section-header-static.section-header-disabled:hover {
    background-color: #6F6E69;
}

.meta-item.audit-item {
    margin-left: auto;
}

@media (max-width: 1080px) {
    .exam-detail-layout.is-long-form {
        grid-template-columns: 1fr;
    }

    .exam-detail-toc {
        position: static;
        top: auto;
        padding: 0.65rem;
    }

    .exam-detail-toc ul {
        display: flex;
        flex-wrap: wrap;
        gap: 0.35rem;
    }
}

/* SECTION-SPECIFIC AJAX FORMS */

/* Section save button states */
.section-save-btn.dirty {
    background-color: #AF3029;
    border-color: #AF3029;
    box-shadow: 0 0 0 2px rgba(175, 48, 41, 0.3);
    position: relative;
}

.section-save-btn.dirty:hover {
    background-color: #8C261F;
    border-color: #8C261F;
}

.section-save-btn.dirty .unsaved-indicator {
    color: #FFFCF0;
    animation: pulse 1s infinite;
    margin-right: 4px;
}

.section-save-btn .save-status-indicator {
    margin-right: 4px;
    font-weight: 700;
}

.section-save-btn.is-saved {
    background-color: #66800B;
    border-color: #66800B;
    box-shadow: 0 0 0 2px rgba(102, 128, 11, 0.22);
}

.section-save-btn.is-saved:hover {
    background-color: #536A08;
    border-color: #536A08;
}

.section-save-btn.is-conflict {
    background-color: #BC5215;
    border-color: #BC5215;
    box-shadow: 0 0 0 2px rgba(188, 82, 21, 0.22);
}

.section-save-btn.is-conflict:hover {
    background-color: #9A4211;
    border-color: #9A4211;
}

.section-save-btn.is-error-state {
    background-color: #AF3029;
    border-color: #AF3029;
    box-shadow: 0 0 0 2px rgba(175, 48, 41, 0.22);
}

.section-save-btn.is-error-state:hover {
    background-color: #8C261F;
    border-color: #8C261F;
}

.section-save-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: #878580;
    border-color: #878580;
}

/* Save feedback styling */
.section-feedback {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
}

.section-feedback.success {
    background-color: #F2F0E5;
    color: #66800B;
    border: 1px solid #66800B;
}

.section-feedback.error {
    background-color: #F2F0E5;
    color: #AF3029;
    border: 1px solid #AF3029;
}

/* ── Inline per-field validation feedback ── */

.field-validation-error {
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
    padding: 0.45rem 0.65rem;
    margin-top: 0.35rem;
    background-color: #FFF0EE;
    border: 1px solid #AF3029;
    border-radius: 4px;
    font-size: 0.85rem;
    color: #AF3029;
    line-height: 1.4;
}

.field-validation-error .field-error-icon {
    flex-shrink: 0;
}

.field-validation-error .field-error-message {
    flex: 1;
}

/* Red outline on the input that has an error */
.field-has-error,
.field-has-error:focus {
    outline: 2px solid #AF3029 !important;
    outline-offset: -1px;
}

/* Green flash on successful autosave */
@keyframes fieldSaveFlash {
    0%   { outline: 2px solid #66800B; outline-offset: -1px; }
    60%  { outline: 2px solid #66800B; outline-offset: -1px; }
    100% { outline: 2px solid transparent; outline-offset: -1px; }
}

.field-save-success {
    animation: fieldSaveFlash 1.2s ease-out forwards;
}

/* Inline checkmark overlay inside input fields */
.field-success-check {
    position: absolute;
    right: 0.75rem;
    color: #66800B;
    font-size: 0.95rem;
    font-weight: 600;
    opacity: 1;
    transition: opacity 0.4s ease-out;
    pointer-events: none;
    z-index: 1;
    line-height: 1;
}

.field-success-check.fade-out {
    opacity: 0;
}

/* Loading spinner animation */
.save-spinner {
    display: inline-block;
    margin-right: 4px;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Section actions container */
.section-actions {
    margin: 2rem 0 1rem 0;
    padding: 1.5rem 0;
    border-top: 1px solid #E6E4D9;
}

/* Section forms */
.section-form {
    margin-bottom: 2rem;
}

/* Global actions */
.global-actions {
    text-align: center;
    padding: 2rem;
    border-top: 2px solid #E6E4D9;
    margin-top: 3rem;
}

/* File upload widgets */
.file-widget {
    margin: 1rem 0;
}

.file-current {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #F2F0E5;
    border: 1px solid #E6E4D9;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.file-icon {
    font-size: 1.5rem;
}

.file-details {
    flex-grow: 1;
}

.file-name {
    font-weight: 600;
    color: #100F0F;
}

.file-meta {
    font-size: 0.85rem;
    color: #6F6E69;
    margin-top: 0.25rem;
}

.file-warning {
    background-color: #FFFCF0;
    color: #AD8301;
    border: 1px solid #F0E68C;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

.file-actions {
    flex-shrink: 0;
}

.file-upload {
    margin: 1rem 0;
}

.file-upload-label {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: #F2F0E5;
    border: 2px dashed #CECDC3;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.file-upload-label:hover {
    background: #E6E4D9;
    border-color: #878580;
}

.file-input {
    display: none;
}

.file-upload-text {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #403E3C;
}

.file-replace {
    margin-top: 0.5rem;
}

.file-replace-label {
    font-size: 0.9rem;
    color: #6F6E69;
}

.file-input-replace {
    margin-left: 0.5rem;
}

.file-type-info {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #6F6E69;
}

.file-deadline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: #FFFCF0;
    border-left: 3px solid #F0E68C;
    font-size: 0.9rem;
    color: #403E3C;
}

.deadline-icon {
    font-size: 1.1rem;
}

.upload-deadline-context {
    margin-top: 0.55rem;
    padding: 0.45rem 0.6rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #f8fafc;
    display: flex;
    gap: 0.45rem;
    align-items: center;
    flex-wrap: wrap;
}

.upload-deadline-context-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #334155;
}

.upload-deadline-context-meta {
    font-size: 0.82rem;
    color: #475569;
}

.upload-deadline-context.deadline-overdue {
    background: #fff5f5;
    border-color: #fecaca;
}

.upload-deadline-context.deadline-urgent {
    background: #fff7ed;
    border-color: #fdba74;
}

.upload-deadline-context.deadline-warning {
    background: #fffbeb;
    border-color: #fde68a;
}

.upload-deadline-context.deadline-met {
    background: #ecfdf3;
    border-color: #86efac;
}

/* File upload states */
.file-uploading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background: #F2F0E5;
    border: 2px dashed #CECDC3;
    border-radius: 4px;
    color: #6F6E69;
    font-size: 1rem;
    gap: 0.5rem;
}

.file-deleting {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background: #FDF2F2;
    border: 2px dashed #E5B8B7;
    border-radius: 4px;
    color: #AF3029;
    font-size: 1rem;
    gap: 0.5rem;
}

/* File upload messages */
.file-upload-message {
    margin: 1rem 0;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
}

.file-upload-message.success {
    background-color: #F2F0E5;
    color: #66800B;
    border: 1px solid #66800B;
}

.file-upload-message.warning {
    background-color: #FFFCF0;
    color: #AD8301;
    border: 1px solid #F0E68C;
}

.file-upload-message.error {
    background-color: #F2F0E5;
    color: #AF3029;
    border: 1px solid #AF3029;
}

/* CSV preview styling */
.csv-preview {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: #FFFCF0;
    border-radius: 4px;
    border: 1px solid #F0E68C;
}

.csv-stats {
    font-weight: 600;
    color: #AD8301;
    margin-bottom: 0.5rem;
}

.csv-line {
    margin: 0.25rem 0;
    font-size: 0.85rem;
    color: #403E3C;
    line-height: 1.4;
}

.csv-label {
    font-weight: 500;
    color: #6F6E69;
}

.csv-data {
    font-family: monospace;
    background: rgba(255, 255, 255, 0.5);
    padding: 0.125rem 0.25rem;
    border-radius: 2px;
    margin-left: 0.25rem;
}

.csv-skipped {
    text-align: center;
    font-style: italic;
    color: #878580;
    font-size: 0.8rem;
    margin: 0.5rem 0;
    padding: 0.25rem;
}

.message-icon-svg {
    width: 16px;
    height: 16px;
    display: inline-block;
}

/* Additional file and UI icons */
.paperclip-icon {
    width: 16px;
    height: 16px;
    color: #6F6E69;
}

.chart-icon {
    width: 16px;
    height: 16px;
    color: #0D47A1;
    display: inline;
    vertical-align: text-bottom;
    margin-right: 0.5rem;
}

.folder-icon {
    width: 18px;
    height: 18px;
    color: #6F6E69;
}

.warning-icon-inline {
    width: 16px;
    height: 16px;
    color: #BC5215;
    display: inline;
    vertical-align: text-bottom;
    margin-right: 0.25rem;
}

.trash-icon {
    width: 14px;
    height: 14px;
    color: currentColor;
    display: inline;
    vertical-align: text-bottom;
    margin-right: 0.25rem;
}

.clock-icon-deadline {
    width: 16px;
    height: 16px;
    color: #BC5215;
}

.revert-icon {
    width: 16px;
    height: 16px;
    color: #AF3029;
    display: inline;
    vertical-align: text-bottom;
    margin-right: 0.5rem;
}

/* Header actions */
.header-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.status-filter-group {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.search-filter-group {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    min-width: 210px;
}

.status-filter-label {
    font-size: 0.82rem;
    color: #6F6E69;
    font-weight: 600;
}

.status-filter-select {
    border: 1px solid #CDC9C3;
    border-radius: 6px;
    background: #FFFCF0;
    color: #100F0F;
    font-size: 0.82rem;
    padding: 0.25rem 0.45rem;
    min-width: 130px;
}

.status-filter-select:focus {
    outline: none;
    border-color: #4385BE;
    box-shadow: 0 0 0 2px rgba(67, 133, 190, 0.15);
}

.exam-search-input {
    border: 1px solid #CDC9C3;
    border-radius: 6px;
    background: #FFFCF0;
    color: #100F0F;
    font-size: 0.82rem;
    padding: 0.25rem 0.45rem;
    min-width: 190px;
}

.exam-search-input:focus {
    outline: none;
    border-color: #4385BE;
    box-shadow: 0 0 0 2px rgba(67, 133, 190, 0.15);
}

.btn-hide-mode {
    background: #f8f9fa;
    color: #6F6E69;
    text-decoration: none;
    padding: 0.25rem 0.5rem;
    border: 1px solid #E6E4D9;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s;
    white-space: nowrap;
    cursor: pointer;
    height: 1.75rem;
    display: flex;
    align-items: center;
}

.btn-hide-mode:hover {
    background: #E6E4D9;
    color: #100F0F;
    border-color: #CDC9C3;
}

.btn-hide-mode.active {
    background: #AF3029;
    color: #FFFCF0;
    border-color: #AF3029;
}

.hide-mode-instruction {
    background: rgba(175, 48, 41, 0.1);
    color: #AF3029;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin: 1rem 0;
    border: 1px solid rgba(175, 48, 41, 0.2);
    text-align: center;
    font-weight: 500;
}

/* New deadlines list layout */
.deadlines-list {
    margin: 0.75rem 0;
}

.deadline-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.3rem 0.5rem;
    margin-bottom: 0.25rem;
    background: rgba(175, 48, 41, 0.05);
    border-radius: 4px;
    border-left: 3px solid #AF3029;
}

.deadline-name {
    font-size: 0.85rem;
    color: #100F0F;
}

.deadline-date {
    font-size: 0.85rem;
    font-weight: 600;
    color: #AF3029;
}

.btn-small {
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
    border-radius: 4px;
}

/* Validation Display Widget */
.validation-display {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    margin: 0.5rem 0 1rem 0;
    border-radius: 6px;
    border: 1px solid;
    background: rgba(255, 255, 255, 0.5);
    font-size: 0.95rem;
    line-height: 1.4;
}

.validation-display.validation-valid {
    border-color: #4CAF50;
    background: rgba(76, 175, 80, 0.1);
    color: #2E7D32;
}

.validation-display.validation-error {
    border-color: #F44336;
    background: rgba(244, 67, 54, 0.1);
    color: #C62828;
}

.validation-display.validation-info {
    border-color: #2196F3;
    background: rgba(33, 150, 243, 0.1);
    color: #1565C0;
}

.validation-icon {
    flex-shrink: 0;
    font-size: 1.1rem;
    margin-top: 0.1rem;
}

.validation-message {
    flex: 1;
    font-weight: 500;
}

/* Scheinteilnehmer Enhanced Widget */
.scheinteilnehmer-widget {
    border: 1px solid #D4D3CE;
    border-radius: 8px;
    padding: 1rem;
    background: #FAFAF9;
    margin: 0.5rem 0;
}

.scheinteilnehmer-mode-toggle {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid #E6E4D9;
    padding-bottom: 1rem;
}

.btn-toggle {
    padding: 0.5rem 1rem;
    border: 1px solid #D4D3CE;
    background: #FFFCF0;
    color: #6F6E69;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-toggle:hover {
    background: #F5F4F0;
    border-color: #C0BFB8;
}

.btn-toggle.active {
    background: #2D5016;
    color: #FFFCF0;
    border-color: #2D5016;
}

.btn-toggle.active:hover {
    background: #3D6B24;
}

.scheinteilnehmer-textarea-view textarea {
    width: 100%;
    min-height: 120px;
    padding: 0.75rem;
    border: 1px solid #D4D3CE;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.4;
    resize: vertical;
}

.scheinteilnehmer-actions {
    margin-top: 0.75rem;
    display: flex;
    gap: 0.5rem;
}

.btn-validate {
    padding: 0.5rem 1rem;
    background: #2D5016;
    color: #FFFCF0;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background-color 0.2s ease;
}

.btn-validate:hover {
    background: #3D6B24;
}

.btn-validate:disabled {
    background: #6F6E69;
    cursor: not-allowed;
}

.validate-spinner {
    font-size: 1rem;
}

.scheinteilnehmer-table-view {
    max-width: 100%;
    overflow-x: auto;
}

.scheinteilnehmer-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    background: white;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.scheinteilnehmer-table th,
.scheinteilnehmer-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #E6E4D9;
}

.scheinteilnehmer-table th {
    background: #F5F4F0;
    font-weight: 600;
    color: #2D5016;
    border-bottom: 2px solid #D4D3CE;
}

.scheinteilnehmer-table tbody tr:hover {
    background: rgba(45, 80, 22, 0.05);
}

.scheinteilnehmer-table tbody tr:last-child td {
    border-bottom: none;
}

.scheinteilnehmer-table em {
    color: #6F6E69;
    font-style: italic;
}

.table-summary {
    margin-top: 1rem;
    padding: 0.75rem;
    background: rgba(45, 80, 22, 0.1);
    border-radius: 6px;
    font-size: 0.9rem;
    color: #2D5016;
}

.table-actions {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #E6E4D9;
}

.parsed-table-content {
    margin-bottom: 1rem;
}

.scheinteilnehmer-feedback {
    margin-top: 0.75rem;
}

.scheinteilnehmer-message {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.75rem;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    line-height: 1.4;
}

.scheinteilnehmer-message.success {
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid #4CAF50;
    color: #2E7D32;
}

.scheinteilnehmer-message.warning {
    background: rgba(255, 152, 0, 0.1);
    border: 1px solid #FF9800;
    color: #E65100;
}

.scheinteilnehmer-message.error {
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid #F44336;
    color: #C62828;
}

.scheinteilnehmer-message .message-icon {
    flex-shrink: 0;
    font-size: 1rem;
    margin-top: 0.1rem;
}

.scheinteilnehmer-message .message-text {
    flex: 1;
}

/* DISABLED SECTIONS STYLING */
.disabled-sections-wrapper {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 2px solid #E6E4D9;
}

.disabled-sections-header {
    text-align: center;
    margin-bottom: 2rem;
}

.disabled-sections-header h3 {
    color: #6F6E69;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.disabled-sections-explanation {
    color: #878580;
    font-size: 0.95rem;
    margin: 0;
    font-style: italic;
}

/* Disabled section styling - only style header, keep content fully functional */
.form-section-disabled {
    /* Only add subtle border difference, no opacity change to content */
    border: 1px dashed #D4D3CE !important;
}

.section-header-disabled {
    background-color: #878580 !important;
    color: #FFFCF0 !important;
}

.section-header-disabled:hover {
    background-color: #6F6E69 !important;
}

.section-header-disabled h2 {
    color: #FFFCF0 !important;
    font-weight: 400;
}

.section-header-disabled .section-description {
    color: #F2F0E5 !important;
    opacity: 0.9;
}

.section-content-collapsed {
    background-color: #FAFAF9 !important;
    border-top: 1px solid #E6E4D9;
}

/* Deadline Management Styles */
.deadline-management {
    padding: 0.75rem 1rem;
    background-color: #FEFEF8;
    border-top: 1px solid #E6E4D9;
    border-bottom: 1px solid #E6E4D9;
}

.deadline-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.deadline-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.deadline-label {
    color: #878580;
    font-weight: 500;
}

.deadline-date {
    color: #2D2B28;
    font-weight: 600;
}

.deadline-countdown {
    color: #6F6E69;
    font-style: italic;
}

.deadline-overdue {
    color: #AF3029;
    font-weight: 600;
    font-style: italic;
}

/* Deadline status color coding */
.deadline-normal .deadline-date {
    color: #2D2B28;
}

.deadline-warning .deadline-date {
    color: #BC5215;
}

.deadline-urgent .deadline-date {
    color: #D2740A;
}

.deadline-overdue .deadline-date {
    color: #AF3029;
    font-weight: 700;
}

.deadline-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.deadline-readonly-note {
    color: #878580;
    font-size: 0.85rem;
    font-style: italic;
}

.deadline-set {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.deadline-set .deadline-label {
    color: #878580;
    font-weight: 500;
}

/* Deadline button styles */
.btn-deadline {
    padding: 0.25rem 0.75rem;
    border-radius: 3px;
    border: 1px solid;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.btn-deadline.btn-set {
    background-color: #66800B;
    color: #FFFCF0;
    border-color: #66800B;
}

.btn-deadline.btn-set:hover {
    background-color: #4F5E09;
    border-color: #4F5E09;
}

.btn-deadline.btn-update {
    background-color: #BC5215;
    color: #FFFCF0;
    border-color: #BC5215;
}

.btn-deadline.btn-update:hover {
    background-color: #9A4212;
    border-color: #9A4212;
}

.btn-deadline.btn-remove {
    background-color: #AF3029;
    color: #FFFCF0;
    border-color: #AF3029;
}

.btn-deadline.btn-remove:hover {
    background-color: #8E2621;
    border-color: #8E2621;
}

/* Heroicon styles for deadline status indicators */
.deadline-icon {
    display: inline-flex;
    align-items: center;
    margin-right: 0.25rem;
}

.heroicon {
    width: 1.2em;
    height: 1.2em;
    stroke-width: 2;
    vertical-align: middle;
}

.heroicon-check-circle {
    color: #66800B; /* Green for met deadlines */
}

.heroicon-exclamation-triangle {
    color: #AD8301; /* Warning yellow/orange for warnings and overdue */
}

.heroicon-fire {
    color: #AF3029; /* Red for urgent/critical */
}

.heroicon-clock {
    color: #205EA6; /* Blue for normal upcoming deadlines */
}

/* Deadline status styling */
.deadline-met .deadline-icon {
    color: #66800B;
}

.deadline-warning .deadline-icon {
    color: #AD8301;
}

.deadline-urgent .deadline-icon {
    color: #AF3029;
}

.deadline-overdue .deadline-icon {
    color: #AF3029;
}

.deadline-normal .deadline-icon {
    color: #205EA6;
}

.deadline-met-notice {
    color: #66800B;
    font-weight: 500;
    margin-left: 0.5rem;
}

/* File List Widget Styles for Additional Documents */
.file-list-widget {
    margin: 1rem 0;
}

.upload-zone {
    border: 2px dashed #C4A85C;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    background-color: #FAF8F3;
}

.upload-zone.drag-over {
    border-color: #205EA6;
    background-color: #ECF0F9;
}

.upload-prompt {
    color: #100F0F;
}

.upload-icon {
    color: #C4A85C;
    margin-bottom: 1rem;
}

.upload-info {
    font-size: 0.9rem;
    color: #6F6E69;
    margin: 0.5rem 0;
}

.additional-files-list {
    margin-top: 1.5rem;
}

.additional-files-list h4 {
    color: #100F0F;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.files-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    background: #FFFCF0;
    border: 1px solid #E6E4D9;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.file-item:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    background: #FAF8F3;
}

.file-icon {
    margin-right: 1rem;
    color: #878580;
}

.file-details {
    flex: 1;
}

.file-name {
    font-weight: 500;
    color: #100F0F;
    margin-bottom: 0.25rem;
}

.file-meta {
    font-size: 0.85rem;
    color: #6F6E69;
}

.file-description {
    font-style: italic;
}

.file-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-small {
    padding: 0.25rem 0.5rem;
    font-size: 0.85rem;
    border-radius: 3px;
    border: 1px solid;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-small.btn-primary {
    color: #FFFCF0;
    background-color: #100F0F;
    border-color: #100F0F;
}

.btn-download {
    color: #205EA6;
    border-color: #205EA6;
}

.btn-download:hover {
    background: #205EA6;
    color: white;
}

.btn-delete {
    color: #AF3029;
    border-color: #AF3029;
}

.btn-delete:hover {
    background: #AF3029;
    color: white;
}

.no-files-message {
    padding: 1.5rem;
    text-align: center;
    color: #6F6E69;
    font-style: italic;
    background: #FAF8F3;
    border-radius: 6px;
}

.registration-summary-banner {
    padding: 0.6rem 0.75rem;
    margin-bottom: 0.75rem;
    background: #ECF0F9;
    border-left: 3px solid #205EA6;
    border-radius: 4px;
    font-size: 0.95rem;
    color: #1C2D41;
}

.registration-summary-banner.has-duplicates {
    background: #FDF3EC;
    border-left-color: #BC5215;
}

.registration-summary-detail {
    color: #6F6E69;
    font-weight: normal;
}

.registration-duplicate-notice {
    margin-top: 0.35rem;
    font-size: 0.88rem;
    color: #BC5215;
}

.csv-summary {
    margin-top: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: #ECF0F9;
    border-radius: 4px;
    font-size: 0.95rem;
    color: #1C2D41;
}

.csv-summary-detail {
    color: #6F6E69;
    font-weight: normal;
}

.zip-download-action {
    margin-top: 0.75rem;
}

.upload-progress {
    padding: 0.75rem;
    background: #ECF0F9;
    border-left: 3px solid #205EA6;
    margin-bottom: 0.5rem;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.upload-error {
    padding: 0.75rem;
    background: #FFF0EE;
    border-left: 3px solid #AF3029;
    color: #AF3029;
    margin-bottom: 0.5rem;
}

.error-icon {
    margin-right: 0.5rem;
}

.filter-hidden-notice {
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.75rem;
    background: #FDF3EC;
    border-left: 3px solid #BC5215;
    border-radius: 4px;
    font-size: 0.9rem;
    color: #BC5215;
}

/* Semester group styling */
.semester-group {
    margin-bottom: 2rem;
    background: #FEFDF8;
    border: 1px solid #E6E4D9;
    border-radius: 8px;
    overflow: clip; /* clip instead of hidden: preserves border-radius clipping without creating a scroll container that breaks sticky */
}

.semester-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 1rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.semester-header h2 {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.collapse-toggle {
    background: none;
    border: none;
    font-size: 1rem;
    color: #6F6E69;
    cursor: pointer;
    padding: 0 0.5rem;
    transition: color 0.2s ease;
}

.collapse-toggle:hover {
    color: #100F0F;
}

.exam-count {
    font-size: 0.875rem;
    color: #6F6E69;
    font-weight: normal;
}

.archive-toggle {
    padding: 0.5rem 1rem;
    background: #FEFDF8;
    border: 1px solid #E6E4D9;
    border-radius: 4px;
    color: #6F6E69;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.archive-toggle:hover {
    background: #FAF8F3;
    border-color: #CECDC3;
    color: #100F0F;
}

.semester-exams {
    padding: 0.75rem;
}

.semester-group.collapsed .semester-exams {
    display: none;
}

/* Copy field functionality styles */
.input-with-copy {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-copy input,
.textarea-with-copy textarea {
    flex: 1;
    padding-right: 45px; /* Make room for copy button */
}

.btn-copy {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: #FEFDF8;
    border: 1px solid #E6E4D9;
    border-radius: 4px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}

.btn-copy:hover {
    background: #FAF8F3;
    border-color: #CECDC3;
}

.btn-copy:active {
    transform: translateY(-50%) scale(0.95);
}

.textarea-with-copy {
    position: relative;
}

.textarea-with-copy .btn-copy {
    top: 20px;
    transform: none;
}

.btn-copy.copying {
    background: #F5E6B8;
    border-color: #E6C649;
    animation: pulse 0.5s;
}

.btn-copy.copied {
    background: #E9F5F0;
    border-color: #5DA068;
    color: #5DA068;
}

.btn-copy.loading {
    background: #F5E6B8;
    border-color: #E6C649;
    animation: pulse 1s infinite;
}

.source-exam-link {
    color: #4385BE;
    text-decoration: none;
    font-weight: 500;
}

.source-exam-link:hover {
    color: #2E5F88;
    text-decoration: underline;
}

/* Copy operation overlay messages */
.copy-message-overlay {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid;
    white-space: nowrap;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    animation: fadeInUp 0.3s ease-out;
}

.copy-message-overlay.success {
    background: #E9F5F0;
    border-color: #5DA068;
    color: #4A7C59;
}

.copy-message-overlay.error {
    background: #FBEAEA;
    border-color: #E53E3E;
    color: #C53030;
}

.copy-message-overlay.info {
    background: #E6F3FF;
    border-color: #4385BE;
    color: #2B6CB0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes pulse {
    0% { transform: translateY(-50%) scale(1); }
    50% { transform: translateY(-50%) scale(1.1); }
    100% { transform: translateY(-50%) scale(1); }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.95);
    }
}

.icon-copy {
    width: 16px;
    height: 16px;
}

/* Usage Instructions Styles */
.usage-instructions-link {
    display: inline-block;
    margin-bottom: 12px;
    color: #6b7280;
    text-decoration: none;
    font-weight: 500;
    font-size: 12px;
}

.usage-instructions-link:hover {
    text-decoration: underline;
    color: #374151;
}

.usage-instructions-infobox {
    background-color: #FFFCF0;
    border: 2px solid #D73502;
    border-radius: 8px;
    margin-bottom: 24px;
    padding: 0;
    box-shadow: 0 4px 6px rgba(215, 53, 2, 0.1);
}

.infobox-header {
    background-color: #D73502;
    color: white;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 6px 6px 0 0;
}

.infobox-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.close-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.infobox-content {
    padding: 20px;
}

.instructions-grid {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.instruction-column {
    flex: 1;
    min-width: 280px;
}

.instruction-column p {
    margin-bottom: 16px;
}

.instruction-column p:last-child {
    margin-bottom: 0;
}

.instruction-column strong {
    color: #100F0F;
    font-weight: 600;
}

/* Batch Mode Styles */
.batch-mode-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background-color: #FEFDF8;
    color: #100F0F;
    border: 1px solid #E6E4D9;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    margin-right: 10px;
}

.batch-mode-btn:hover {
    background-color: #F2F0E5;
    border-color: #CECDC3;
}

.batch-mode-btn.batch-mode-active {
    background-color: #1D7AFC;
    color: white;
    border-color: #1D7AFC;
}

.batch-icon {
    width: 18px;
    height: 18px;
}

.batch-section-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    margin-right: 10px;
}

.batch-action-bar {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #100F0F;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

/* Fix button text visibility in batch action bar */
.batch-action-bar .btn {
    color: white !important;
}

.batch-action-bar .btn-secondary {
    background-color: #6B7280;
    border-color: #6B7280;
    color: white !important;
}

.batch-action-bar .btn-secondary:hover {
    background-color: #4B5563;
    border-color: #4B5563;
}

.batch-action-content {
    display: flex;
    align-items: center;
    gap: 16px;
}

.batch-selection-count {
    font-weight: 500;
    padding-right: 16px;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.batch-selected {
    background-color: #E8F3FF !important;
    border-color: #1D7AFC !important;
}

.batch-selected .section-header {
    background-color: #E8F3FF !important;
}

/* Fix section heading readability in batch mode */
.batch-selected .section-header h2 {
    color: #1E3A8A !important;
}

.batch-selected .section-header .section-description {
    color: #374151 !important;
}

.batch-mode-active .section-management-btn {
    display: flex;
    align-items: center;
}

/* Responsive adjustments */
@media (max-width: 968px) {
    .instructions-grid {
        flex-direction: column;
        gap: 20px;
    }
    
    .instruction-column {
        min-width: auto;
    }
}

/* Validation Results Styling */
.validation-results {
    margin-top: 15px;
    padding: 0;
}

.validation-loading {
    padding: 15px;
    text-align: center;
    background-color: #FEFDF8;
    border: 2px solid #E6E4D9;
    border-radius: 8px;
    color: #6F6E69;
}

.validation-result {
    border-radius: 8px;
    padding: 20px;
    border: 2px solid;
}

.validation-result.validation-success {
    background-color: #F0F9F0;
    border-color: #9ACD32;
    color: #2F4F2F;
}

.validation-result.validation-warnings {
    background-color: #FFFAF0;
    border-color: #FFA500;
    color: #8B4513;
}

.validation-result.validation-errors {
    background-color: #FFF0F0;
    border-color: #DC143C;
    color: #8B0000;
}

.validation-header h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
}

.validation-summary {
    margin: 0 0 15px 0;
    font-size: 14px;
    line-height: 1.4;
}

.validation-stats {
    display: flex;
    gap: 20px;
    margin: 15px 0;
    padding: 12px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
    min-width: 80px;
}

.stat-label {
    font-size: 12px;
    font-weight: 500;
    opacity: 0.8;
    margin-bottom: 2px;
}

.stat-value {
    font-size: 16px;
    font-weight: 600;
}

.validation-counts {
    margin: 15px 0;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.error-count, .warning-count {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
}

.error-count {
    background-color: rgba(220, 20, 60, 0.1);
    color: #DC143C;
}

.warning-count {
    background-color: rgba(255, 165, 0, 0.1);
    color: #FF8C00;
}

.validation-details {
    margin-top: 15px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding-top: 15px;
}

.validation-toggle {
    margin-bottom: 15px;
}

.validation-details-content {
    background-color: rgba(255, 255, 255, 0.2);
    padding: 15px;
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.validation-errors-list, .validation-warnings-list {
    margin-bottom: 15px;
}

.validation-errors-list:last-child, .validation-warnings-list:last-child {
    margin-bottom: 0;
}

.validation-errors-list h5, .validation-warnings-list h5 {
    margin: 0 0 8px 0;
    font-size: 14px;
    font-weight: 600;
}

.validation-errors-list ul, .validation-warnings-list ul {
    margin: 0;
    padding-left: 20px;
    list-style-type: disc;
}

.validation-errors-list li, .validation-warnings-list li {
    margin-bottom: 4px;
    font-size: 13px;
    line-height: 1.4;
}

/* File-grouped validation issues */
.validation-file-group {
    margin-bottom: 12px;
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.3);
}

.validation-file-group.has-errors {
    border-left: 3px solid #DC143C;
}

.validation-file-group.has-warnings {
    border-left: 3px solid #FF8C00;
}

.validation-file-heading {
    margin: 0 0 6px 0;
    font-size: 13px;
    font-weight: 600;
}

.validation-issue-list {
    margin: 0;
    padding-left: 20px;
    list-style-type: disc;
}

.validation-issue-list li {
    margin-bottom: 3px;
    font-size: 13px;
    line-height: 1.4;
}

.validation-issue-list .issue-error {
    color: #B91C1C;
}

.validation-issue-list .issue-warning {
    color: #92400E;
}

.issue-suggestion {
    color: #6B7280;
    font-style: italic;
}

.validation-file-content {
    margin-top: 8px;
}

.validation-file-content summary {
    font-size: 12px;
    color: #6B7280;
    cursor: pointer;
    user-select: none;
}

.validation-file-content summary:hover {
    color: #374151;
}

.file-content-preview {
    margin-top: 6px;
    padding: 10px;
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 4px;
    font-size: 11px;
    line-height: 1.6;
    max-height: 400px;
    overflow: auto;
    white-space: pre;
    color: #1F2937;
    tab-size: 4;
}

.file-content-preview .line-num {
    color: #9CA3AF;
    user-select: none;
}

.file-content-preview .line-highlight {
    background: #FEF3C7;
    display: inline-block;
    width: 100%;
    margin: 0 -10px;
    padding: 0 10px;
}

.file-content-preview .line-highlight .line-num {
    color: #D97706;
    font-weight: 600;
}

.file-content-preview .line-ellipsis {
    color: #D1D5DB;
    user-select: none;
}

.validation-error {
    background-color: #FFF0F0;
    border: 2px solid #DC143C;
    border-radius: 8px;
    padding: 20px;
    color: #8B0000;
}

.validation-error h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
}

.validation-error p {
    margin: 0;
    font-size: 14px;
}

/* Exam info section styles */
.validation-exam-info {
    margin: 20px 0;
    padding: 15px;
    background-color: #F8F9FA;
    border-radius: 6px;
    border: 1px solid #DEE2E6;
}

.validation-exam-info h5 {
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 600;
    color: #495057;
}

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

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background-color: #FFFFFF;
    border-radius: 4px;
    border: 1px solid #E9ECEF;
}

.info-label {
    font-weight: 500;
    color: #6C757D;
    font-size: 14px;
}

.info-value {
    font-weight: 600;
    color: #495057;
    font-family: monospace;
    font-size: 14px;
}

.task-names-details, .coversheet-details {
    margin: 12px 0;
    border: 1px solid #E9ECEF;
    border-radius: 4px;
}

.task-names-details summary, .coversheet-details summary {
    padding: 10px 12px;
    background-color: #F8F9FA;
    cursor: pointer;
    border-radius: 4px 4px 0 0;
    font-weight: 500;
    color: #495057;
    user-select: none;
}

.task-names-details summary:hover, .coversheet-details summary:hover {
    background-color: #E9ECEF;
}

.task-names-list {
    margin: 0;
    padding: 12px;
    background-color: #FFFFFF;
    list-style-type: none;
    max-height: 200px;
    overflow-y: auto;
}

.task-names-list li {
    padding: 6px 0;
    border-bottom: 1px solid #F1F3F5;
    font-size: 14px;
    color: #495057;
}

.task-names-list li:last-child {
    border-bottom: none;
}

.coversheet-preview {
    padding: 12px;
    background-color: #FFFFFF;
    font-size: 13px;
    line-height: 1.4;
    color: #6C757D;
    font-family: system-ui, -apple-system, sans-serif;
    border-radius: 0 0 4px 4px;
    max-height: 150px;
    overflow-y: auto;
}

.json-status {
    display: flex;
    gap: 15px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #E9ECEF;
}

.json-indicator {
    font-size: 14px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 4px;
}

.json-indicator.present {
    color: #155724;
    background-color: #D4E6D4;
}

.json-indicator.missing {
    color: #721C24;
    background-color: #F8D7DA;
}

.exam-json-details, .aux-folders-details {
    margin: 12px 0;
    border: 1px solid #E9ECEF;
    border-radius: 4px;
}

.exam-json-details summary, .aux-folders-details summary {
    padding: 10px 12px;
    background-color: #F8F9FA;
    cursor: pointer;
    border-radius: 4px 4px 0 0;
    font-weight: 500;
    color: #495057;
    user-select: none;
}

.exam-json-details summary:hover, .aux-folders-details summary:hover {
    background-color: #E9ECEF;
}

.json-content {
    padding: 12px;
    background-color: #F8F9FA;
    border-radius: 0 0 4px 4px;
    font-size: 12px;
    line-height: 1.4;
    color: #495057;
    font-family: monospace;
    max-height: 300px;
    overflow-y: auto;
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.aux-folders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    padding: 15px;
}

.aux-folder {
    background-color: #FFFFFF;
    border: 1px solid #E9ECEF;
    border-radius: 4px;
    padding: 12px;
}

.aux-folder h6 {
    margin: 0 0 10px 0;
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    border-bottom: 1px solid #F1F3F5;
    padding-bottom: 6px;
}

.aux-files-list {
    margin: 0;
    padding: 0;
    list-style-type: none;
    max-height: 150px;
    overflow-y: auto;
}

.aux-files-list li {
    padding: 4px 0;
    font-size: 13px;
    color: #6C757D;
    border-bottom: 1px solid #F8F9FA;
    font-family: monospace;
}

.aux-files-list li:last-child {
    border-bottom: none;
}

/* Inline heroicon styling */
.inline-icon {
    width: 16px;
    height: 16px;
    display: inline-block;
    vertical-align: text-top;
    margin-right: 4px;
}


.aux-empty {
    margin: 0;
    font-size: 13px;
    color: #ADB5BD;
    font-style: italic;
}

.file-structure-info {
    margin-top: 15px;
    padding-top: 12px;
    border-top: 1px solid #E9ECEF;
}

.structure-indicator {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.structure-label {
    font-weight: 500;
    color: #6C757D;
    font-size: 14px;
}

.structure-value {
    font-weight: 500;
    font-size: 14px;
    padding: 3px 8px;
    border-radius: 4px;
}

.structure-value.root-files {
    color: #0F5132;
    background-color: #D1E7DD;
}

.structure-value.subfolder-files {
    color: #664D03;
    background-color: #FFF3CD;
}

/* Button styling for validation */
.btn-info {
    background-color: #2F86A6;
    color: #FFFCF0;
    border: none;
}

.btn-info:hover {
    background-color: #2A7894;
}

.btn-info:disabled {
    background-color: #6F6E69;
    opacity: 0.7;
}

/* Spinner icon animation */
.spinner-icon {
    animation: spin 1s linear infinite;
    width: 16px;
    height: 16px;
}

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

/* Check icon styling */
.check-icon {
    width: 16px;
    height: 16px;
    margin-right: 4px;
}

/* ===================================
   Notification Management Section
   =================================== */

.notification-management-section {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    margin: 20px 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.notification-header {
    padding: 15px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    border-radius: 6px 6px 0 0;
    transition: background 0.2s;
}

.notification-header:hover {
    background: #e9ecef;
}

.notification-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.notification-icon {
    width: 24px;
    height: 24px;
    stroke-width: 2;
}

.notification-toggle {
    font-size: 16px;
    color: #666;
}

.notification-content {
    padding: 20px;
}

/* Notification Toggles */
.notification-toggles {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.toggle-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 28px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: #28a745;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

.toggle-label {
    flex: 1;
}

.toggle-label strong {
    display: block;
    margin-bottom: 4px;
    font-size: 15px;
    color: #333;
}

.toggle-description {
    display: block;
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

/* Manual Send Section */
.manual-send-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #f0f7ff;
    border-radius: 6px;
    border: 1px solid #c3ddfd;
}

.manual-send-section h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #333;
}

.manual-send-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.manual-send-buttons .btn {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-icon {
    width: 18px;
    height: 18px;
}

.btn-icon-small {
    width: 14px;
    height: 14px;
}

/* Notifications List Section */
.notifications-list-section {
    margin-bottom: 25px;
}

.notifications-list-section h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #333;
}

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

.list-header h4 {
    margin: 0;
}

.notifications-list {
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
}

.notification-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    background: #fff;
}

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

.notification-item:hover {
    background: #f8f9fa;
}

.notification-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.notification-info strong {
    font-size: 14px;
    color: #333;
}

.notification-recipient {
    font-size: 13px;
    color: #666;
}

.notification-time {
    font-size: 12px;
    color: #999;
}

.notification-error {
    font-size: 12px;
    color: #dc3545;
    font-style: italic;
}

.loading-message,
.empty-message,
.error-message {
    padding: 20px;
    text-align: center;
    color: #666;
    font-size: 14px;
}

.error-message {
    color: #dc3545;
}

.empty-message {
    color: #999;
}

/* Button styles for notification section */
.btn-danger {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: background-color 0.2s;
}

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

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

/* Flash messages enhancement */
.flash-message {
    animation: slideIn 0.3s ease-out;
}

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

/* =============================================
   LIST VIEW STYLES
   ============================================= */

/* Tabular figures for consistent number alignment */
.tabular-nums {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
}

/* List Table Wrapper */
.exam-list-table-wrapper {
    overflow-x: clip; /* clip instead of auto to preserve sticky behavior */
    margin-top: 0.5rem;
    border-radius: 6px;
    border: 1px solid #dee2e6;
    background: white;
}

/* List Table */
.exam-list-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
    line-height: 1.4;
}

.exam-list-table thead {
    background: #1e293b;
    position: sticky;
    top: 62px; /* below the fixed navbar */
    z-index: 20;
}

.exam-list-table th {
    padding: 7px 10px;
    text-align: left;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #cbd5e1;
    border-bottom: none;
    white-space: nowrap;
    user-select: none;
}

.exam-list-table th.sortable {
    cursor: pointer;
    transition: color 0.15s;
}

.exam-list-table th.sortable:hover {
    color: #fff;
    background: #334155;
}

.exam-list-table .sort-indicator {
    color: #60a5fa;
    font-size: 10px;
    margin-left: 2px;
}

.exam-list-table tbody tr {
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: background-color 0.1s ease;
}

.exam-list-table tbody tr:nth-child(even) {
    background-color: #fafaf8;
}

.exam-list-table tbody tr:hover {
    background-color: #eff6ff;
}

.exam-list-table tbody tr:last-child {
    border-bottom: none;
}

.exam-list-table td {
    padding: 6px 10px;
    vertical-align: middle;
}

/* Today separator between past and future exams */
.date-separator-row {
    pointer-events: none;
}

.date-separator-row:hover {
    background-color: transparent !important;
}

.date-separator-row td {
    padding: 0 !important;
    border-bottom: none !important;
}

.date-separator-line {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 10px;
}

.date-separator-line::before,
.date-separator-line::after {
    content: '';
    flex: 1;
    height: 1.5px;
    background: #ef4444;
    opacity: 0.5;
}

.date-separator-label {
    font-size: 10px;
    font-weight: 600;
    color: #ef4444;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

/* Combined cell styles (two-line layout) */
.cell-primary {
    font-weight: 500;
    color: #212529;
    line-height: 1.3;
}

.cell-secondary {
    font-size: 11px;
    color: #6c757d;
    line-height: 1.3;
    margin-top: 2px;
}

/* Column-specific styles */
.col-module-code {
    font-weight: 600;
    color: #1e40af;
    white-space: nowrap;
    font-size: 12.5px;
}

.col-module-code .cell-primary {
    color: #1e40af;
}

/* Status column: hidden by default, status shown as colored left border on rows */
.exam-list-table th.col-status,
.exam-list-table td.col-status {
    display: none;
}

.col-status .exam-lifecycle-badge {
    display: inline-block;
    font-size: 10px;
    padding: 2px 6px;
}

/* Colored left border indicates status on the first visible column */
.exam-list-table .exam-row[data-status="active"] td.col-module-code {
    border-left: 3px solid #22c55e;
}
.exam-list-table .exam-row[data-status="draft"] td.col-module-code {
    border-left: 3px solid #f59e0b;
}
.exam-list-table .exam-row[data-status="archived"] td.col-module-code {
    border-left: 3px solid #9ca3af;
}

/* Hide archive buttons in status column by default - shown via archive mode */
.col-status .list-status-action-form {
    display: none;
}

/* In archive mode, reveal the status column with action buttons */
.archive-mode-active .exam-list-table th.col-status,
.archive-mode-active .exam-list-table td.col-status {
    display: table-cell;
    width: auto;
    text-align: center;
    padding: 4px 6px;
}

.archive-mode-active .col-status .list-status-action-form {
    display: block;
    margin-top: 4px;
}

.archive-mode-active .col-status .list-status-action-btn {
    font-size: 10px;
    padding: 1px 5px;
}

.col-exam-name-examiner {
    min-width: 120px;
    max-width: 180px;
}

.col-duration {
    white-space: nowrap;
    text-align: center;
}

.col-exam-type {
    white-space: nowrap;
    color: #6b7280;
    font-size: 11.5px;
}

.col-registration-count {
    text-align: center;
    font-size: 12px;
    color: #6F6E69;
}

.tn-dup-marker {
    color: #BC5215;
    font-weight: 600;
    cursor: help;
}

.col-flags {
    white-space: nowrap;
    padding: 0.2rem 0.25rem !important;
}

.flag-badge {
    display: inline-block;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 0.12rem 0.35rem;
    border-radius: 4px;
    cursor: default;
    line-height: 1.3;
    vertical-align: middle;
}

.flag-badge + .flag-badge {
    margin-left: 0.2rem;
}

.flag-vor {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

/* Schein badge: 3 states */
.flag-schein-has_entries {
    background: #e0e7ff;
    color: #3730a3;
    border: 1px solid #c7d2fe;
}

.flag-schein-confirmed_none {
    background: #f3f4f6;
    color: #6b7280;
    border: 1px solid #d1d5db;
}

.flag-schein-unchecked {
    background: transparent;
    color: #c4c9d0;
    border: 1px dashed #d1d5db;
}

.flag-paper {
    background: #fce7f3;
    color: #9d174d;
    border: 1px solid #f9a8d4;
}

.col-datetime {
    white-space: nowrap;
    min-width: 100px;
}

.col-datetime .date-display {
    font-weight: 600;
    font-size: 12.5px;
    font-variant-numeric: tabular-nums;
}

.col-datetime .time-display {
    font-size: 11px;
    color: #6b7280;
    font-variant-numeric: tabular-nums;
}

.col-aufsichten,
.col-technik {
    max-width: 65px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.col-next-step {
    max-width: 160px;
}

.col-pending-changes {
    text-align: center;
    width: 50px;
}

.col-pending-notifications {
    text-align: center;
    width: 48px;
}

.col-pending-notifications .change-counter-pill {
    display: none; /* hide the separate counter pill, use badge on button instead */
}

.col-room-booked {
    text-align: left;
    width: 120px;
}

.list-inline-input {
    width: 100%;
    min-width: 90px;
    border: 1px solid #d0d7de;
    border-radius: 6px;
    padding: 4px 6px;
    font-size: 12px;
    color: #1f2328;
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.list-inline-input:focus {
    outline: none;
    border-color: #0d6efd;
    box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.15);
}

.list-inline-input.is-dirty {
    background: #fff9db;
}

.list-inline-input.is-saving {
    background: #e7f5ff;
}

.list-inline-input.is-error {
    border-color: #dc3545;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.12);
}

.list-inline-input.is-conflict {
    border-color: #BC5215;
    box-shadow: 0 0 0 2px rgba(188, 82, 21, 0.14);
    background: #FFF4E8;
}

.list-inline-input.is-saved {
    border-color: #66800B;
    box-shadow: 0 0 0 2px rgba(102, 128, 11, 0.12);
    background: #F6FAE8;
}

.list-inline-checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
    font-size: 12px;
}

.list-inline-checkbox {
    width: 14px;
    height: 14px;
    accent-color: #0d6efd;
}

.list-inline-checkbox.is-saving {
    outline: 2px solid rgba(13, 110, 253, 0.2);
    border-radius: 2px;
}

.list-inline-checkbox.is-error {
    outline: 2px solid rgba(220, 53, 69, 0.25);
    border-radius: 2px;
}

.list-inline-checkbox.is-conflict {
    outline: 2px solid rgba(188, 82, 21, 0.25);
    border-radius: 2px;
}

.list-inline-checkbox.is-saved {
    outline: 2px solid rgba(102, 128, 11, 0.25);
    border-radius: 2px;
}

.list-inline-checkbox-text {
    color: #495057;
}

/* Room confirmation toggle button */
.room-confirm-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #f9fafb;
    color: #9ca3af;
    cursor: pointer;
    padding: 0;
    transition: background 0.12s, color 0.12s, border-color 0.12s;
}

.room-confirm-toggle:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.room-confirm-toggle .room-icon {
    width: 14px;
    height: 14px;
}

.room-confirm-toggle .room-icon-check { display: none; }
.room-confirm-toggle .room-icon-question { display: block; }

.room-confirm-toggle.is-confirmed {
    background: #d1fae5;
    color: #065f46;
    border-color: #6ee7b7;
}

.room-confirm-toggle.is-confirmed .room-icon-check { display: block; }
.room-confirm-toggle.is-confirmed .room-icon-question { display: none; }

.room-confirm-toggle.is-saving {
    opacity: 0.6;
    pointer-events: none;
}

.room-confirm-toggle.is-error {
    border-color: #fca5a5;
    background: #fef2f2;
}

.list-inline-stack {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.list-inline-row {
    display: flex;
    gap: 0.35rem;
}

.list-inline-input-compact {
    min-width: 0;
}

.col-datetime .list-inline-input {
    font-size: 11.5px;
    padding: 3px 4px;
    font-variant-numeric: tabular-nums;
}

.col-datetime .list-inline-input[type="date"] {
    font-weight: 600;
    font-size: 12px;
}

.col-datetime .list-inline-input[type="time"] {
    max-width: 72px;
}

.col-datetime .list-inline-input[type="number"] {
    max-width: 52px;
    text-align: center;
}

.col-datetime .duration-suffix {
    font-size: 10px;
    color: #9ca3af;
    margin-left: 1px;
}

.col-room-booked .list-inline-stack {
    flex-direction: row;
    align-items: center;
}

.col-room-booked .list-inline-input {
    font-size: 11px;
    padding: 3px 5px;
    flex: 1;
    min-width: 0;
}

.col-deadlines {
    min-width: 140px;
}

/* Conflict resolution modal */
.conflict-resolution-modal {
    position: fixed;
    inset: 0;
    z-index: 1400;
    display: none;
    align-items: center;
    justify-content: center;
}

.conflict-resolution-modal.is-open {
    display: flex;
}

.conflict-resolution-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(16, 15, 15, 0.5);
}

.conflict-resolution-modal-dialog {
    position: relative;
    width: min(680px, calc(100% - 2rem));
    background: #fff;
    border: 1px solid #d0d7de;
    border-radius: 12px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
    padding: 1rem;
}

.conflict-resolution-modal-dialog h3 {
    margin-bottom: 0.35rem;
}

.conflict-resolution-modal-description {
    margin: 0 0 0.9rem;
    color: #495057;
    white-space: pre-line;
}

.conflict-resolution-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.conflict-resolution-column {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f8f9fa;
    padding: 0.6rem;
}

.conflict-resolution-label {
    font-size: 0.8rem;
    color: #6c757d;
    margin-bottom: 0.4rem;
    font-weight: 600;
}

.conflict-resolution-value {
    margin: 0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.85rem;
    white-space: pre-wrap;
    word-break: break-word;
    color: #212529;
}

.conflict-resolution-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.6rem;
}

.summary-notify-modal-dialog {
    width: min(760px, calc(100% - 2rem));
}

.summary-notify-preview-list {
    margin: 0 0 0.75rem;
    padding: 0.6rem 0.75rem 0.6rem 1.2rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f8f9fa;
    max-height: 220px;
    overflow: auto;
    display: grid;
    gap: 0.3rem;
}

.summary-notify-preview-item {
    font-size: 0.88rem;
    color: #212529;
    line-height: 1.35;
}

.summary-notify-overflow {
    margin: 0 0 0.75rem;
    color: #6c757d;
    font-size: 0.85rem;
}

.summary-notify-label {
    display: block;
    margin-bottom: 0.4rem;
    color: #495057;
    font-size: 0.85rem;
    font-weight: 600;
}

.summary-notify-textarea {
    width: 100%;
    border: 1px solid #ced4da;
    border-radius: 8px;
    padding: 0.6rem 0.7rem;
    margin-bottom: 0.9rem;
    font-family: inherit;
    font-size: 0.9rem;
}

.summary-notify-textarea:focus {
    outline: none;
    border-color: #0d6efd;
    box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.14);
}

.summary-notify-initial-deadline-row {
    margin-bottom: 0.8rem;
}

.summary-notify-date-input {
    width: 100%;
    border: 1px solid #ced4da;
    border-radius: 8px;
    padding: 0.5rem 0.65rem;
    font-size: 0.9rem;
    margin-bottom: 0.35rem;
}

.summary-notify-date-input:focus {
    outline: none;
    border-color: #0d6efd;
    box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.14);
}

.summary-notify-field-hint {
    margin: 0;
    font-size: 0.78rem;
    color: #6c757d;
}

@media (max-width: 768px) {
    .conflict-resolution-grid {
        grid-template-columns: 1fr;
    }

    .conflict-resolution-actions {
        flex-direction: column-reverse;
    }

    .conflict-resolution-actions .btn {
        width: 100%;
    }
}

/* Status indicators */
.status-check {
    color: #28a745;
    font-weight: bold;
    font-size: 16px;
}

.status-empty {
    color: #adb5bd;
}

.step-complete {
    color: #28a745;
    font-weight: bold;
    font-size: 14px;
}

/* Step badge in list view */
.step-badge {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.step-badge.step-pre {
    background: #fff3cd;
    color: #856404;
}

.step-badge.step-post {
    background: #cce5ff;
    color: #004085;
}

.step-badge.step-archive {
    background: #dcfce7;
    color: #166534;
}

/* Deadline pills */
.deadline-pills {
    display: flex;
    gap: 3px;
    flex-wrap: wrap;
}

.deadline-pill {
    display: inline-block;
    padding: 1px 5px;
    background: #e9ecef;
    border-radius: 8px;
    font-size: 10.5px;
    font-variant-numeric: tabular-nums;
    color: #495057;
    white-space: nowrap;
}

.deadline-pill:hover {
    background: #dee2e6;
}

.deadline-pill.deadline-normal {
    background: #eff6ff;
    color: #1d4ed8;
}

.deadline-pill.deadline-warning {
    background: #ffedd5;
    color: #9a3412;
}

.deadline-pill.deadline-urgent {
    background: #fee2e2;
    color: #b91c1c;
}

.deadline-pill.deadline-overdue {
    background: #fee2e2;
    color: #991b1b;
}

.deadline-pill.deadline-met {
    background: #dcfce7;
    color: #166534;
}

.deadline-pill.deadline-pill-empty {
    background: #f3f4f6;
    color: #6b7280;
}

/* ─── Batch Create ─── */
.batch-shared-fields {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.batch-shared-fields .form-group {
    flex: 1;
    min-width: 220px;
}

.batch-create-page {
    display: block !important; /* Override body flex that constrains width */
}

.batch-create-page .container,
.batch-create-page .form-container {
    max-width: none;
}

.batch-create-page .container {
    box-shadow: none;
}

.batch-table-wrapper {
    overflow-x: auto;
}

.batch-create-table {
    border-collapse: collapse;
    font-size: 13px;
}

.batch-create-table .list-inline-input {
    min-width: 0;
}

.batch-create-table th {
    text-transform: uppercase;
    font-size: 11px;
    font-weight: 600;
    color: #6F6E69;
    letter-spacing: 0.03em;
    padding: 6px 8px;
    text-align: left;
    border-bottom: 2px solid #E6E4D9;
    white-space: nowrap;
}

.batch-create-table td {
    padding: 5px 8px;
    vertical-align: top;
    border-bottom: 1px solid #E6E4D9;
}

.batch-col-num {
    width: 30px;
    text-align: center;
    color: #878580;
}

/* Column input widths — edit these to resize columns */
.batch-create-table .batch-col-code input { width: 100px; }
.batch-create-table .batch-col-name input { width: 140px; }
.batch-create-table .batch-col-email input { width: 160px; }
.batch-create-table .batch-col-involved input { width: 100px; }
.batch-create-table .batch-col-type select { width: 130px; }
.batch-create-table .batch-col-ects input { width: 44px; }
.batch-create-table .batch-col-date input { width: 125px; }
.batch-create-table .batch-col-time input { width: 52px; }
.batch-create-table .batch-col-duration input { width: 46px; }
.batch-create-table .batch-col-participants input { width: 46px; }
.batch-create-table .batch-col-room input { width: 95px; }
.batch-create-table .batch-col-room-confirmed input { width: 18px; }
.batch-create-table .batch-col-coordination input { width: 90px; }
.batch-create-table .batch-col-regdeadline input { width: 125px; }
.batch-create-table .batch-col-aufsichten input { width: 85px; }
.batch-create-table .batch-col-technik input { width: 52px; }
.batch-col-remove { width: 28px; }

.batch-input.is-warning {
    background-color: #FFF3E0;
    border-color: #E68A00;
}

.batch-parser-section {
    margin-bottom: 1rem;
}

.batch-parser-section textarea {
    width: 100%;
    font-family: monospace;
    font-size: 13px;
    border: 1px solid #D3D1C7;
    border-radius: 4px;
    padding: 8px;
    resize: vertical;
}

.batch-parser-section .form-help {
    margin-top: 4px;
}

.batch-remove-btn {
    background: none;
    border: none;
    color: #B4637A;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    padding: 4px;
    opacity: 0.5;
    transition: opacity 0.15s;
}

.batch-remove-btn:hover {
    opacity: 1;
}

.batch-row-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.batch-row-error {
    color: #AF3029;
    font-size: 11px;
    line-height: 1.3;
    margin-top: 2px;
}

/* Responsive adjustments for list view */
@media (max-width: 1200px) {
    .col-aufsichten,
    .col-technik {
        display: none;
    }
}

@media (max-width: 992px) {
    .col-next-step {
        display: none;
    }

    .col-pending-notifications {
        display: none;
    }

    .exam-list-table {
        font-size: 12px;
    }
}

@media (max-width: 768px) {
    .col-duration,
    .col-exam-type {
        display: none;
    }
}
