/* Copyright (c) California Commission on Teacher Credentialing. All rights reserved. */

/* ============================================
   CSS VARIABLES - CTC Brand & Semantic Colors
   ============================================ */

:root {
    /* CTC Brand Colors */
    --ctc-gold: #d4a437;
    --ctc-gold-rgb: 212, 164, 55;
    --ctc-navy: #003366;
    --ctc-navy-dark: #002244;
    --ctc-navy-light: #004488;

    /* Primary Palette */
    --primary: #005ea2;
    --primary-dark: #1a4480;

    /* Semantic Colors */
    --success: #2e8540;
    --success-dark: #218838;
    --success-light: #D4EDDA;
    --warning: #e5a000;
    --warning-light: #FFF3CD;
    --warning-dark: #856404;
    --error: #d63e04;
    --error-light: #F8D7DA;
    --info-light: #D1ECF1;
    --danger-dark: #C82333;

    /* Neutral Palette */
    --gray-50: #f8f9fa;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #71767a;
    --gray-600: #565c65;
    --gray-700: #495057;
    --gray-800: #3d4551;
    --gray-900: #1b1b1b;

    --white: #ffffff;
    --text-primary: #1b1b1b;
    --text-secondary: #71767a;
}

/* ============================================
   BASE TYPOGRAPHY - CTC Standard Font
   ============================================ */

body {
    font-family: "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans-serif;
    color: var(--gray-800);
    line-height: 1.6;
}

/* ============================================
   FORM CONTENT CONTAINER - Full Width with Padding
   ============================================ */

.form-content-container {
    max-width: 100%;
    padding: 0;
}

/* ============================================
   LEGACY STYLES
   ============================================ */

#UploadedFiles tr {
    border-bottom: solid 1px var(--gray-400);
}

    #UploadedFiles tr:last-child {
        border-bottom: none;
    }

.text-warning {
    color: var(--warning-dark) !important;
}

.ctc-r4-form-display {
    color: var(--text-primary);
}

.k-notification h3 {
    font-size: 1.4em;
    line-height: normal;
}

.k-notification p {
    font-size: 1.0em;
    line-height: normal;
}

.k-notification img {
    margin: 20px;
    float: left;
}

.card-content {
    color: var(--bs-card-color);
}

.k-notification-NewHelpRequest {
    border-color: var(--kendo-color-info-emphasis, rgba(13, 202, 240, 0.4));
    color: var(--kendo-color-info-on-subtle, #055160);
    background-color: var(--kendo-color-info-subtle, #cff4fc);
}

.k-notification-NewHelpRequestResponse {
    border-color: var(--kendo-color-info-emphasis, rgba(13, 202, 240, 0.4));
    color: var(--kendo-color-info-on-subtle, #055160);
    background-color: var(--kendo-color-info-subtle, #cff4fc);
}

.k-notification-content {
    font-size: 1em;
}

.NewHelpRequestResponseNotificationTemplate,
.NewHelpRequestNotificationTemplate {
    width: 350px;
    height: 100px;
}

    .NewHelpRequestResponseNotificationTemplate p {
        font-size: 1.1em;
    }

.k-bootstrap-v4 .NewHelpRequestResponseNotificationTemplate,
.k-bootstrap-v4 .NewHelpRequestNotificationTemplate,
.k-bootstrap-v4 .wrong-pass,
.k-bootstrap-v4 .upload-success {
    width: calc( 300px - 2.5rem );
    height: calc( 100px - 1.5rem );
}

.chat-container {
    width: 100%;
    max-width: 100vw;
    margin: 0;
    padding: 2px;
    background-color: var(--white);
    box-sizing: border-box;
}

.message {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 10px;
    max-width: 95%;
    word-wrap: break-word;
}

    .message.agent {
        align-self: flex-end;
        margin-left: auto;
        border-top-right-radius: 0;
        border-top-left-radius: 15px;
        border-bottom-left-radius: 15px;
        border-bottom-right-radius: 15px;
    }

    .message.internalnote {
        background-color: rgba(64, 202, 230, .60);
        align-self: flex-end;
        margin-left: auto;
        border-top-right-radius: 0;
        border-top-left-radius: 15px;
        border-bottom-left-radius: 15px;
        border-bottom-right-radius: 15px;
    }

    .message.recalled {
        background-color: rgba(255, 255, 107, .60);
        align-self: flex-end;
        margin-left: auto;
        border-top-right-radius: 0;
        border-top-left-radius: 15px;
        border-bottom-left-radius: 15px;
        border-bottom-right-radius: 15px;
    }

    .message.requester {
        align-self: flex-start;
        text-align: left;
        margin-right: auto;
        border-top-left-radius: 0;
        border-top-right-radius: 15px;
        border-bottom-right-radius: 15px;
        border-bottom-left-radius: 15px;
    }

.message-content {
    width: 100%;
    display: block;
    box-sizing: border-box;
}

.mh500-v-scrollable {
    max-height: 500px;
    overflow-y: auto;
}

.v-scrollable {
    overflow-y: auto;
}

.scrollable {
    overflow: auto;
}

.h-scrollable {
    overflow-x: auto;
}

/* ============================================
   PAGE HEADER
   ============================================ */

.page-header {
    margin-bottom: 1.5rem;
}

.page-header h2 {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--ctc-navy);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.page-header h2 i {
    font-size: 2rem;
}

.page-header .subtitle {
    margin: 0.5rem 0 0 0;
    font-size: 1.125rem;
    color: var(--text-secondary);
}

/* ============================================
   CARD OVERRIDES - Grantee Portal Styling
   ============================================ */

.card.shadow {
    border-radius: 12px;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.r4-card {
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    background: var(--white);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.r4-card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    background-color: var(--gray-50);
}

.card.shadow .card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    background-color: var(--gray-50);
}

.card.shadow .card-header h4 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--ctc-navy);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-actions {
    display: flex;
    gap: 0.5rem;
}

.r4-card-body {
    padding: 2rem;
}

.r4-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1.25rem 1.5rem;
    background-color: var(--gray-50);
    border-top: 1px solid var(--gray-200);
}

.card.shadow .card-body {
    padding: 2rem;
}

.card.shadow .card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1.25rem 1.5rem;
    background-color: var(--gray-50);
    border-top: 1px solid var(--gray-200);
}

.footer-actions-left {
    display: flex;
    gap: 0.5rem;
}

/* ============================================
   ALERT OVERRIDES
   ============================================ */

.alert.d-flex > i {
    font-size: 1.25rem;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

/* ============================================
   FORM SECTIONS - Headers inside the box
   ============================================ */

.form-section {
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    margin-bottom: 1rem;
    background: var(--white);
}

.form-section-header {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1.25rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--gray-600);
    background-color: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-radius: 8px 8px 0 0;
}

.form-section-header i {
    font-size: 1rem;
    color: var(--primary);
}

.form-section-body {
    padding: 1.25rem 1.5rem 0.75rem;
}

/* LEA Partner callout */
.partner-lea-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    background: #e8f4fd;
    border: 1px solid #b6d4fe;
    border-radius: 6px;
    font-size: 0.8125rem;
    color: var(--primary-dark);
    margin-top: 0.375rem;
}

.partner-lea-display i {
    font-size: 1rem;
    flex-shrink: 0;
}

/* Additional placement section */
.form-section.additional-placement {
    border-left: 3px solid var(--primary);
    background-color: var(--gray-50);
}

.form-section.additional-placement .form-section-header {
    background-color: var(--gray-200);
}

/* Multiple placement toggle (slider switch) */
.multiple-placement-container {
    margin: 0.75rem 0;
}

.multiple-placement-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-weight: 500;
}

.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.toggle-slider {
    position: absolute;
    inset: 0;
    background-color: var(--gray-300);
    border-radius: 24px;
    transition: background-color 0.2s ease;
}

.toggle-slider::before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: var(--white);
    border-radius: 50%;
    transition: transform 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--primary);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(20px);
}

.toggle-switch input:focus-visible + .toggle-slider {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Race multi-select dropdown */
.race-multiselect {
    position: relative;
}

.race-toggle {
    text-align: left;
    background-color: #fff;
    cursor: pointer;
}

.race-toggle .race-summary {
    color: var(--gray-500);
}

.race-toggle.has-selection .race-summary {
    color: var(--text-primary);
}

.race-options {
    position: absolute;
    z-index: 10;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 200px;
    overflow-y: auto;
    padding: 0.5rem;
    border: 1px solid var(--gray-300);
    border-top: none;
    border-radius: 0 0 6px 6px;
    background: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.race-options .form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    padding: 0.25rem 0.25rem;
    cursor: pointer;
    border-radius: 4px;
}

.race-options .form-check:hover {
    background-color: var(--gray-100);
}

.race-options .form-check-label {
    font-weight: normal;
    cursor: pointer;
}

/* Phone input formatting */
.phone-input {
    font-variant-numeric: tabular-nums;
}

/* Form inline validation feedback */
.field-error,
.validation-msg {
    font-size: 0.8125rem;
    color: var(--danger-dark);
    margin-top: 0.25rem;
    display: none;
}

.form-control.touched:invalid,
.form-select.touched:invalid {
    border-color: var(--danger-dark);
}

.form-control.touched:invalid ~ .field-error,
.form-select.touched:invalid ~ .field-error,
.form-control.touched:invalid ~ .validation-msg,
.form-select.touched:invalid ~ .validation-msg {
    display: block;
}

/* Button spinner */
.btn-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: btn-spin 0.6s linear infinite;
    vertical-align: middle;
    margin-right: 0.375rem;
}

@keyframes btn-spin {
    to { transform: rotate(360deg); }
}

.btn:disabled {
    cursor: not-allowed;
}

/* ============================================
   CANDIDATE ENTRY CARDS
   ============================================ */

.candidate-entry {
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    margin-bottom: 1rem;
    background-color: var(--white);
}

.candidate-entry-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    background-color: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    border-radius: 8px 8px 0 0;
}

.candidate-entry-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9375rem;
    color: var(--gray-700);
}

.candidate-entry-title i {
    font-size: 1.25rem;
    color: var(--primary);
}

.candidate-entry-body {
    padding: 1.25rem;
}

/* ============================================
   FILTER TOOLBAR
   ============================================ */

.filter-toolbar {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.filter-toolbar form {
    gap: 1rem !important;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.filter-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.filter-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-700);
    line-height: 1.875rem;
}

/* ============================================
   TABLE OVERRIDES - Grantee Portal
   ============================================ */

.card.shadow .table {
    font-size: 0.9375rem;
    margin-bottom: 0;
}

.card.shadow .table th {
    font-weight: 600;
    color: var(--gray-700);
    white-space: nowrap;
}

.card.shadow .table tbody tr:last-child td {
    border-bottom: none;
}

/* ============================================
   GRID ACTION BUTTONS — higher contrast for table rows
   ============================================ */

.grid-action-btn {
    background-color: var(--primary);
    color: var(--white);
    border-color: var(--primary);
    font-weight: 500;
}

.grid-action-btn:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    color: var(--white);
}

/* ============================================
   STATUS BADGES
   ============================================ */

.badge-status {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    text-align: center;
    white-space: nowrap;
}

/* Badges fill full column width inside tables and Kendo grids */
td .badge-status,
td .badge,
.k-grid td .badge-status,
.k-grid td .badge {
    display: block;
    width: 100%;
    text-align: center;
}

.badge-pending {
    background: var(--warning-light);
    color: var(--warning-dark);
}

.badge-under-review {
    background: var(--info-light);
    color: var(--primary-dark);
}

.badge-approved {
    background: var(--success-light);
    color: var(--success-dark);
}

.badge-rejected {
    background: var(--error-light);
    color: var(--danger-dark);
}

.badge-draft {
    background: var(--gray-100);
    color: var(--gray-600);
    border: 1px solid var(--gray-300);
}

.badge-returned {
    background: var(--warning-light);
    color: var(--warning-dark);
}

.badge-default {
    background: var(--gray-200);
    color: var(--gray-700);
}

.badge-block {
    display: block;
    width: 100%;
    text-align: center;
}

.badge-status-submission,
.badge-status-default {
    background: var(--bs-gray-200, #e9ecef);
    color: var(--bs-gray-700, #495057);
}

.badge-status-review {
    background: var(--warning-light, #FFF3CD);
    color: var(--warning-dark, #856404);
}

.badge-status-rejected {
    background: var(--error-light, #F8D7DA);
    color: var(--danger-dark, #C82333);
}

.badge-status-disbursement {
    background: var(--success-light, #D4EDDA);
    color: var(--success-dark, #218838);
}

.badge-status-complete {
    background: #d0ecec;
    color: #13595a;
}

/* ============================================
   EMPTY STATE
   ============================================ */

.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--gray-500);
}

.empty-state > i {
    font-size: 4rem;
    display: block;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.empty-state-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    color: var(--gray-700);
}

.empty-state-description {
    font-size: 0.9375rem;
    margin: 0 0 1.5rem 0;
    color: var(--gray-500);
}

/* ============================================
   CANDIDATE DETAIL - HEADER
   ============================================ */

.candidate-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.candidate-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--ctc-navy), var(--primary));
    color: var(--white);
    font-size: 1.75rem;
    flex-shrink: 0;
}

.candidate-header-info {
    flex: 1;
    min-width: 0;
}

.candidate-header-info h3 {
    margin: 0 0 0.25rem 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
}

.candidate-header-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 0;
    list-style: none;
    padding: 0;
}

.candidate-header-meta li {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.candidate-header-meta li i {
    font-size: 1rem;
    color: var(--gray-400);
}

.candidate-header-badge {
    flex-shrink: 0;
}

/* ============================================
   CANDIDATE DETAIL - INFO GRID
   ============================================ */

.detail-field {
    margin-bottom: 1.25rem;
}

.detail-field-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 0.2rem;
}

.detail-field-value {
    font-size: 1rem;
    font-weight: 500;
    color: var(--gray-800);
}

.detail-field-value.empty {
    color: var(--gray-400);
}

.detail-field-value.currency {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--success-dark);
}

/* ============================================
   CANDIDATE DETAIL - STATUS TIMELINE
   ============================================ */

.status-timeline {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    position: relative;
    padding: 1rem 0;
}

.status-timeline::before {
    content: "";
    position: absolute;
    top: 2.25rem;
    left: 2.5rem;
    right: 2.5rem;
    height: 4px;
    background: var(--gray-200);
    border-radius: 2px;
    z-index: 0;
}

.timeline-progress-bar {
    position: absolute;
    top: 2.25rem;
    left: 2.5rem;
    height: 4px;
    background: linear-gradient(90deg, var(--success-dark), #2ecc71);
    border-radius: 2px;
    z-index: 1;
    transition: width 1s ease-out;
}

.timeline-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    flex: 1;
    max-width: 120px;
}

.timeline-step-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
    border: 3px solid var(--gray-200);
    background: var(--white);
    color: var(--gray-400);
}

.timeline-step.completed .timeline-step-icon {
    background: var(--success-dark);
    border-color: var(--success-dark);
    color: var(--white);
    box-shadow: 0 2px 8px rgba(33, 136, 56, 0.3);
}

.timeline-step.active .timeline-step-icon {
    background: var(--white);
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0, 94, 162, 0.15);
    animation: timeline-pulse 2s ease-in-out infinite;
}

.timeline-step.rejected .timeline-step-icon {
    background: var(--danger-dark);
    border-color: var(--danger-dark);
    color: var(--white);
    box-shadow: 0 2px 8px rgba(200, 35, 51, 0.3);
}

@keyframes timeline-pulse {
    0%, 100% { box-shadow: 0 0 0 4px rgba(0, 94, 162, 0.15); }
    50% { box-shadow: 0 0 0 8px rgba(0, 94, 162, 0.08); }
}

.timeline-step-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-400);
    text-align: center;
    line-height: 1.3;
}

.timeline-step.completed .timeline-step-label {
    color: var(--success-dark);
}

.timeline-step.active .timeline-step-label {
    color: var(--primary);
}

.timeline-step.rejected .timeline-step-label {
    color: var(--danger-dark);
}

.timeline-step-date {
    font-size: 0.7rem;
    color: var(--gray-500);
    margin-top: 0.15rem;
    text-align: center;
}

/* ============================================
   CANDIDATE DETAIL - REJECTION BANNER
   ============================================ */

.rejection-banner {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: var(--error-light);
    border-left: 4px solid var(--danger-dark);
    border-radius: 0 8px 8px 0;
    margin-top: 1rem;
}

.rejection-banner i {
    color: var(--danger-dark);
    font-size: 1.25rem;
    margin-top: 0.1rem;
}

.rejection-banner-text strong {
    display: block;
    color: var(--danger-dark);
    margin-bottom: 0.25rem;
}

.rejection-banner-text span {
    color: var(--gray-700);
    font-size: 0.9rem;
}

/* ============================================
   R4-CARD HEADER (enhanced)
   ============================================ */

.r4-card-header h5 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-700);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.r4-card-header h5 i {
    color: var(--gray-500);
}

/* ============================================
   GRANT CYCLE SELECTOR
   ============================================ */

.grant-cycle-selector {
    margin-bottom: 1.5rem;
}

/* ============================================
   CTC GOLD UTILITIES
   ============================================ */

.text-gold {
    color: var(--ctc-gold) !important;
}

.bg-gold {
    background-color: var(--ctc-gold) !important;
}

.border-gold {
    border-color: var(--ctc-gold) !important;
}

/* ============================================
   LEA DASHBOARD
   ============================================ */

.metric-card {
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid rgba(var(--bs-primary-rgb, 13, 110, 253), 0.2);
}

.metric-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    border-color: var(--bs-primary, #0d6efd);
}

.metric-value {
    font-size: 2rem;
    font-weight: bold;
    line-height: 1.2;
}

.metric-label {
    font-size: 0.9rem;
    color: #495057;
}

.metric-icon {
    font-size: 1.25rem;
}

.metric-warning {
    border-color: #ffc107 !important;
}

.metric-waitlist {
    border-color: var(--ctc-gold) !important;
}

.display-5 {
    font-size: 2rem;
}

.metric-icon-circle {
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    flex-shrink: 0;
}

.metric-icon-lg {
    font-size: 24px;
}

/* Action Items */
.action-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    background: var(--bs-white);
    border: 2px solid var(--bs-gray-300);
    border-radius: 8px;
    margin-bottom: 1rem;
    transition: all 0.2s;
}

.action-item:last-child {
    margin-bottom: 0;
}

.action-item-urgent {
    border-color: var(--bs-warning);
    background: var(--bs-warning-bg-subtle);
}

.action-item-normal {
    border-color: var(--bs-gray-300);
    background: var(--bs-gray-100);
}

.action-item:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.action-item-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.action-item-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 1.5rem;
}

.action-item-details h5 {
    margin: 0 0 0.5rem 0;
    color: var(--bs-primary);
    font-size: 1.1rem;
}

.action-item-details p {
    margin: 0;
    color: var(--bs-gray-600);
    font-size: 0.9rem;
}

.action-item-due {
    margin-top: 0.25rem !important;
    color: var(--bs-danger) !important;
    font-weight: 600;
}

.action-item-actions {
    margin-left: 1rem;
}

/* Empty State Icon */
.empty-state-icon {
    font-size: 4rem;
    opacity: 0.3;
}

@media (max-width: 768px) {
    .action-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .action-item-actions {
        margin-left: 0;
        margin-top: 1rem;
        width: 100%;
    }

    .action-item-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .card.shadow .card-body {
        padding: 1.25rem;
    }

    .card.shadow .card-footer {
        flex-direction: column;
    }

    .candidate-header {
        flex-direction: column;
        text-align: center;
    }

    .candidate-header-meta {
        justify-content: center;
    }

    .status-timeline {
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
        padding-left: 1rem;
    }

    .status-timeline::before {
        top: 1.25rem;
        left: 1.45rem;
        right: auto;
        width: 4px;
        height: calc(100% - 2.5rem);
    }

    .timeline-progress-bar {
        top: 1.25rem;
        left: 1.45rem;
        width: 4px !important;
        right: auto;
    }

    .timeline-step {
        flex-direction: row;
        gap: 0.75rem;
        max-width: none;
    }

    .timeline-step-label,
    .timeline-step-date {
        text-align: left;
    }

    .candidate-entry-header {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }

    .form-section-body {
        padding: 1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        transform: none !important;
        animation: none !important;
    }
}

/* Hide R4 validation summary on initial page load (no server-side errors).
   The R4 tag helper sets inline display:flex which overrides the standard
   ASP.NET behavior of hiding .validation-summary-valid via CSS. */
.validation-summary-valid {
    display: none !important;
}
