/* ================================================================
   CCPOA ECC Permits Wizard — wizard.css
   ================================================================ */

/* ── Root variables ─────────────────────────────────────────────── */
.ecc-wizard {
    --ecc-blue:       #1F4E79;
    --ecc-blue-mid:   #2E75B6;
    --ecc-blue-light: #D6E4F0;
    --ecc-blue-pale:  #EBF3FA;
    --ecc-green:      #2E7D32;
    --ecc-green-bg:   #EAF7EA;
    --ecc-yellow:     #856404;
    --ecc-yellow-bg:  #FFF8E1;
    --ecc-red:        #B71C1C;
    --ecc-red-bg:     #FDECEA;
    --ecc-gray-light: #F5F5F5;
    --ecc-gray-mid:   #E0E0E0;
    --ecc-gray-text:  #555;
    --ecc-text:       #1a1a1a;
    --ecc-radius:     8px;
    --ecc-shadow:     0 2px 12px rgba(0,0,0,0.08);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 15px;
    color: var(--ecc-text);
    max-width: 100%;
    margin: 0;
}

/* ── Portal Home ─────────────────────────────────────────────────── */
.ecc-portal-header {
    text-align: center;
    padding: 32px 24px 16px;
    border-bottom: 2px solid var(--ecc-blue-light);
    margin-bottom: 24px;
}
.ecc-portal-badge {
    display: inline-block;
    background: var(--ecc-blue);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
    padding: 4px 14px;
    border-radius: 20px;
    margin-bottom: 12px;
}
.ecc-portal-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--ecc-blue);
    margin: 0 0 4px;
}
.ecc-portal-sub {
    color: var(--ecc-gray-text);
    font-size: 14px;
    margin: 0;
}
.ecc-portal-intro {
    padding: 0 24px 16px;
}
.ecc-portal-intro p {
    margin: 0 0 12px;
    line-height: 1.6;
}
.ecc-portal-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0 24px 32px;
}
.ecc-portal-btn {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 18px 20px;
    border: 2px solid var(--ecc-blue-mid);
    border-radius: var(--ecc-radius);
    background: #fff;
    cursor: pointer;
    text-align: left;
    text-decoration: none;
    color: var(--ecc-text);
    transition: all 0.15s ease;
    width: 100%;
    box-sizing: border-box;
}
.ecc-portal-btn:hover {
    background: var(--ecc-blue-pale);
    border-color: var(--ecc-blue);
    transform: translateY(-1px);
    box-shadow: var(--ecc-shadow);
}
.ecc-portal-btn--secondary {
    border-color: var(--ecc-gray-mid);
}
.ecc-portal-btn--ghost {
    border-color: var(--ecc-gray-mid);
    background: var(--ecc-gray-light);
}
.ecc-btn-icon { font-size: 28px; flex-shrink: 0; }
.ecc-btn-label { display: block; font-weight: 700; font-size: 16px; color: var(--ecc-blue); margin-bottom: 2px; }
.ecc-btn-desc  { display: block; font-size: 13px; color: var(--ecc-gray-text); }

/* ── Portal Dashboard Layout ──────────────────────────────────────── */
.ecc-portal-grid {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 16px;
    padding: 16px 16px 24px;
    align-items: start;
}
.ecc-portal-main    { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.ecc-portal-sidebar { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

.ecc-portal-card {
    background: #fff;
    border: 1px solid var(--ecc-gray-mid);
    border-radius: var(--ecc-radius);
    overflow: hidden;
}
.ecc-portal-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid var(--ecc-gray-mid);
    background: var(--ecc-gray-light);
}
.ecc-portal-card-header span {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--ecc-gray-text);
}
.ecc-submissions-toggle-btn {
    font-size: 12px;
    background: none;
    border: none;
    color: var(--ecc-gray-text);
    cursor: pointer;
    padding: 0;
}

/* Action tiles */
.ecc-tile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
}
.ecc-tile {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 18px 16px;
    background: #fff;
    border: none;
    border-right: 1px solid var(--ecc-gray-mid);
    cursor: pointer;
    text-align: left;
    transition: background 0.12s;
    width: 100%;
}
.ecc-tile:last-child { border-right: none; }
.ecc-tile:hover { background: var(--ecc-blue-pale); }
.ecc-tile-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-bottom: 10px;
    flex-shrink: 0;
}
.ecc-tile-icon--blue  { background: #E3F2FD; }
.ecc-tile-icon--amber { background: #FFF8E1; }
.ecc-tile-icon--teal  { background: #E1F5EE; }
.ecc-tile-icon--gray  { background: var(--ecc-gray-light); }
.ecc-tile-label { font-size: 14px; font-weight: 700; color: var(--ecc-blue); margin-bottom: 4px; line-height: 1.3; }
.ecc-tile-desc  { font-size: 12px; color: var(--ecc-gray-text); line-height: 1.4; flex: 1; }
.ecc-tile-arrow { font-size: 12px; color: var(--ecc-gray-text); margin-top: 10px; }

/* Submission rows inside portal card */
.ecc-submission-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--ecc-gray-mid);
}
.ecc-submission-row:last-child { border-bottom: none; }
.ecc-submission-row.is-closed { opacity: 0.65; }
.ecc-submission-ref  { font-weight: 700; font-size: 12px; color: var(--ecc-blue); min-width: 76px; font-family: monospace; flex-shrink: 0; }
.ecc-submission-info { flex: 1; min-width: 0; }
.ecc-submission-type { font-size: 13px; font-weight: 600; color: var(--ecc-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ecc-submission-addr { font-size: 11px; color: var(--ecc-gray-text); margin-top: 1px; }
.ecc-submission-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex-shrink: 0; }
.ecc-submission-date { font-size: 11px; color: var(--ecc-gray-text); }
.ecc-submissions-empty { padding: 16px 14px; font-size: 13px; color: var(--ecc-gray-text); text-align: center; }

/* Sub-status badges */
.ecc-sub-status { display: inline-block; padding: 2px 8px; border-radius: 3px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.ecc-sub-status--submitted     { background: #E3F2FD; color: #1565C0; }
.ecc-sub-status--under_review  { background: #FFF8E1; color: #F57F17; }
.ecc-sub-status--approved      { background: var(--ecc-green-bg); color: var(--ecc-green); }
.ecc-sub-status--approved_cond { background: #E8F5E9; color: #2E7D32; }
.ecc-sub-status--denied        { background: var(--ecc-red-bg); color: var(--ecc-red); }
.ecc-sub-status--tabled        { background: #F3E5F5; color: #6A1B9A; }
.ecc-sub-status--incomplete    { background: #FBE9E7; color: #BF360C; }
.ecc-sub-status--withdrawn     { background: var(--ecc-gray-light); color: var(--ecc-gray-text); }

/* Sidebar calendar widget */
.ecc-cal-widget { background: #fff; border: 1px solid var(--ecc-gray-mid); border-radius: var(--ecc-radius); overflow: hidden; }
.ecc-cal-widget-top { background: #1F4E79; padding: 12px 14px; display: flex; align-items: center; gap: 10px; }
.ecc-cal-block { width: 38px; flex-shrink: 0; border-radius: 5px; overflow: hidden; border: 1px solid rgba(255,255,255,0.3); }
.ecc-cal-block-month { background: rgba(255,255,255,0.25); color: #fff; font-size: 8px; font-weight: 700; letter-spacing: 1px; text-align: center; padding: 2px 0; }
.ecc-cal-block-day   { background: #fff; color: #1F4E79; font-size: 17px; font-weight: 700; text-align: center; padding: 2px 0 3px; line-height: 1; }
.ecc-cal-widget-title strong { display: block; font-size: 13px; color: #fff; font-weight: 700; }
.ecc-cal-widget-title span   { font-size: 11px; color: rgba(255,255,255,0.65); }
.ecc-cal-meetings { padding: 0; }
.ecc-cal-meeting-row { display: flex; align-items: center; justify-content: space-between; padding: 9px 14px; border-bottom: 1px solid var(--ecc-gray-mid); }
.ecc-cal-meeting-row:last-child { border-bottom: none; }
.ecc-cal-meeting-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--ecc-gray-text); margin-bottom: 2px; font-weight: 700; }
.ecc-cal-meeting-date  { font-size: 14px; font-weight: 700; color: var(--ecc-blue); }
.ecc-cal-chip { display: inline-block; font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 20px; text-transform: uppercase; letter-spacing: 0.4px; white-space: nowrap; }
.ecc-cal-chip--next  { background: #E8F5E9; color: #1B5E20; }
.ecc-cal-chip--after { background: var(--ecc-gray-light); color: var(--ecc-gray-text); }
.ecc-cal-deadline { padding: 9px 14px; border-top: 1px solid var(--ecc-gray-mid); background: var(--ecc-gray-light); display: flex; gap: 7px; align-items: flex-start; }
.ecc-cal-deadline-icon { font-size: 13px; flex-shrink: 0; margin-top: 1px; }
.ecc-cal-deadline p  { font-size: 12px; color: var(--ecc-gray-text); line-height: 1.4; margin: 0; }
.ecc-cal-deadline p strong { color: var(--ecc-text); font-weight: 700; }
.ecc-cal-deadline--urgent { background: #FFF8E1; border-top-color: #FFE082; }
.ecc-cal-deadline--urgent p { color: #633806; }
.ecc-cal-deadline--past { background: #FDECEA; border-top-color: #FFCDD2; }
.ecc-cal-deadline--past p { color: #7f1d1d; }
.ecc-cal-urgent .ecc-cal-widget-top { background: #B45309; }
.ecc-cal-urgent .ecc-cal-block-day  { color: #B45309; }
.ecc-cal-urgent .ecc-cal-meeting-date { color: #B45309; }
.ecc-cal-urgent .ecc-cal-chip--next { background: #FFF3E0; color: #E65100; }
.ecc-cal-past .ecc-cal-widget-top  { background: #455A64; }
.ecc-cal-past .ecc-cal-block-day   { color: #455A64; }
.ecc-cal-past .ecc-cal-chip--next  { background: #FDECEA; color: #7f1d1d; }

/* Help card */
.ecc-help-body { padding: 12px 14px; }
.ecc-help-body p { font-size: 13px; color: var(--ecc-gray-text); line-height: 1.5; margin-bottom: 8px; }
.ecc-help-body p:last-child { margin-bottom: 0; }
.ecc-help-body strong { color: var(--ecc-text); }

/* ── Progress Bar ─────────────────────────────────────────────────── */
.ecc-progress-wrap {
    padding: 20px 24px 0;
    margin-bottom: 24px;
}
.ecc-progress-bar {
    height: 6px;
    background: var(--ecc-gray-mid);
    border-radius: 3px;
    margin-bottom: 10px;
    overflow: hidden;
}
.ecc-progress-fill {
    height: 100%;
    background: var(--ecc-blue-mid);
    border-radius: 3px;
    transition: width 0.3s ease;
}
.ecc-steps-track {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 4px;
}
.ecc-step-label {
    font-size: 11px;
    color: var(--ecc-gray-text);
    white-space: nowrap;
}
.ecc-step-label.active {
    color: var(--ecc-blue-mid);
    font-weight: 700;
}
.ecc-step-label.done {
    color: var(--ecc-green);
}

/* ── Step Panels ─────────────────────────────────────────────────── */
.ecc-step-panel {
    display: none;
    padding: 0 24px;
    animation: eccFadeIn 0.2s ease;
}
.ecc-step-panel.active { display: block; }
@keyframes eccFadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.ecc-step-header {
    margin-bottom: 24px;
}
.ecc-step-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--ecc-blue);
    margin: 0 0 6px;
}
.ecc-step-header p {
    margin: 0;
    color: var(--ecc-gray-text);
    line-height: 1.5;
}

/* ── Project Type Cards ───────────────────────────────────────────── */
.ecc-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}
.ecc-type-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 14px 16px;
    border: 2px solid var(--ecc-gray-mid);
    border-radius: var(--ecc-radius);
    cursor: pointer;
    transition: all 0.15s ease;
    background: #fff;
    position: relative;
    width: 100%;
    text-align: left;
    font: inherit;
    user-select: none;
    -webkit-user-select: none;
    appearance: none;
    -webkit-appearance: none;
}
.ecc-type-card:hover {
    border-color: var(--ecc-blue-mid);
    background: var(--ecc-blue-pale);
}
.ecc-type-card.selected {
    border-color: var(--ecc-blue);
    background: var(--ecc-blue-pale);
    box-shadow: 0 0 0 3px rgba(46, 117, 182, 0.2);
}
/* Checkmark badge — hidden by default, shown when selected */
.ecc-type-check {
    position: absolute;
    top: 8px;
    right: 10px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--ecc-blue);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    display: none;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.ecc-type-card.selected .ecc-type-check {
    display: flex;
}
.ecc-type-icon  { font-size: 24px; margin-bottom: 8px; }
.ecc-type-label { font-weight: 700; font-size: 14px; color: var(--ecc-blue); margin-bottom: 4px; }
.ecc-type-desc  { font-size: 12px; color: var(--ecc-gray-text); line-height: 1.4; }

/* ── Info Boxes ───────────────────────────────────────────────────── */
.ecc-info-box {
    background: var(--ecc-blue-pale);
    border-left: 4px solid var(--ecc-blue-mid);
    border-radius: var(--ecc-radius);
    padding: 14px 16px;
    margin: 16px 0;
}
.ecc-info-box strong { display: block; margin-bottom: 6px; color: var(--ecc-blue); }
.ecc-info-box p strong { display: inline; margin-bottom: 0; color: inherit; font-weight: 700; }.ecc-info-box p { margin: 0; font-size: 14px; line-height: 1.6; }
.ecc-info-box--yellow { background: var(--ecc-yellow-bg); border-color: #F0AD4E; }
.ecc-info-box--yellow strong { color: var(--ecc-yellow); }
.ecc-info-box--red { background: var(--ecc-red-bg); border-color: var(--ecc-red); }
.ecc-info-box--red strong { color: var(--ecc-red); }
.ecc-info-box--blue { background: var(--ecc-blue-pale); border-color: var(--ecc-blue); }

/* ── Form Sections ────────────────────────────────────────────────── */
.ecc-form-section {
    background: #fff;
    border: 1px solid var(--ecc-gray-mid);
    border-radius: var(--ecc-radius);
    padding: 20px;
    margin-bottom: 16px;
}
.ecc-section-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--ecc-blue);
    margin: 0 0 4px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--ecc-gray-mid);
    margin-bottom: 16px;
}
.ecc-section-note {
    font-size: 13px;
    color: var(--ecc-gray-text);
    margin: -10px 0 14px;
}

/* ── Fields ───────────────────────────────────────────────────────── */
.ecc-field-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 14px;
}
.ecc-field {
    flex: 1 1 200px;
    display: flex;
    flex-direction: column;
}
.ecc-field--full { flex: 1 1 100%; }
.ecc-field--sm   { flex: 1 1 80px; max-width: 130px; }

.ecc-field label {
    font-size: 13px;
    font-weight: 600;
    color: var(--ecc-text);
    margin-bottom: 5px;
}
.ecc-field input[type="text"],
.ecc-field input[type="email"],
.ecc-field input[type="tel"],
.ecc-field input[type="number"],
.ecc-field input[type="date"],
.ecc-field input[type="time"],
.ecc-field select,
.ecc-field textarea {
    border: 1.5px solid var(--ecc-gray-mid);
    border-radius: 5px;
    padding: 8px 10px;
    font-size: 14px;
    font-family: inherit;
    color: var(--ecc-text);
    transition: border-color 0.15s;
    width: 100%;
    box-sizing: border-box;
    background: #fff;
}
.ecc-field input:focus,
.ecc-field select:focus,
.ecc-field textarea:focus {
    outline: none;
    border-color: var(--ecc-blue-mid);
    box-shadow: 0 0 0 3px rgba(46,117,182,0.15);
}
.ecc-field input.error { border-color: var(--ecc-red); }
.ecc-field-help {
    font-size: 12px;
    color: var(--ecc-gray-text);
    margin-top: 4px;
    line-height: 1.4;
}
.ecc-field-help a { color: var(--ecc-blue-mid); }
.req { color: var(--ecc-red); }

.ecc-radio-row { display: flex; gap: 16px; align-items: center; padding: 8px 0; }
.ecc-radio-row label { display: flex; gap: 5px; align-items: center; font-weight: 400; cursor: pointer; margin-bottom: 0; }

/* ── Upload Slots ─────────────────────────────────────────────────── */
.ecc-upload-slot {
    border: 2px dashed var(--ecc-gray-mid);
    border-radius: var(--ecc-radius);
    padding: 16px;
    margin-bottom: 12px;
    background: var(--ecc-gray-light);
    transition: border-color 0.15s;
}
.ecc-upload-slot:hover { border-color: var(--ecc-blue-mid); background: var(--ecc-blue-pale); }
.ecc-upload-slot.has-file { border-color: var(--ecc-green); background: var(--ecc-green-bg); }
.ecc-upload-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    margin-bottom: 8px;
}
.ecc-upload-icon { font-size: 20px; }
.ecc-upload-slot input[type="file"] { width: 100%; margin-top: 6px; }
.ecc-upload-slot .ecc-uploaded-name {
    font-size: 13px;
    color: var(--ecc-green);
    margin-top: 6px;
    font-weight: 600;
}

/* ── Acknowledgement List (App F) ───────────────────────────────── */
.ecc-ack-list { display: flex; flex-direction: column; gap: 10px; }
.ecc-ack-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 16px;
    border: 1.5px solid var(--ecc-gray-mid);
    border-radius: var(--ecc-radius);
    cursor: pointer;
    transition: all 0.15s;
    background: #fff;
}
.ecc-ack-item:has(input:checked) {
    border-color: var(--ecc-green);
    background: var(--ecc-green-bg);
}
.ecc-ack-item input[type="checkbox"] {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 2px;
    accent-color: var(--ecc-green);
    cursor: pointer;
}
.ecc-ack-content { display: flex; gap: 12px; align-items: flex-start; }
.ecc-ack-num {
    flex-shrink: 0;
    width: 26px; height: 26px;
    border-radius: 50%;
    background: var(--ecc-blue);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}
.ecc-ack-content strong { display: block; margin-bottom: 3px; }
.ecc-ack-content p { margin: 0; font-size: 13px; color: var(--ecc-gray-text); line-height: 1.5; }
.ecc-ack-warning { color: var(--ecc-red) !important; }
.ecc-ack-block {
    border: 2px solid var(--ecc-blue-mid);
    border-radius: var(--ecc-radius);
    padding: 16px;
}

/* Standalone checkbox */
.ecc-checkbox-label {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    cursor: pointer;
    padding: 10px 0;
}
.ecc-checkbox-label input[type="checkbox"] {
    flex-shrink: 0;
    width: 18px; height: 18px;
    margin-top: 2px;
    accent-color: var(--ecc-blue);
}
.ecc-checkbox-label span { font-size: 14px; line-height: 1.5; }
.ecc-checkbox-label--large span { font-size: 15px; }

/* ── Signature Input ─────────────────────────────────────────────── */
.ecc-signature-block { background: var(--ecc-gray-light); border-radius: var(--ecc-radius); padding: 16px; }
.ecc-sig-input {
    font-family: "Georgia", serif !important;
    font-size: 18px !important;
    font-style: italic;
    border-bottom: 2px solid var(--ecc-blue) !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    padding-left: 0 !important;
}

/* ── Navigation Row ──────────────────────────────────────────────── */
.ecc-nav-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-top: 1px solid var(--ecc-gray-mid);
    margin-top: 24px;
    gap: 12px;
}
.ecc-btn-back {
    background: none;
    border: 2px solid var(--ecc-gray-mid);
    border-radius: 6px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    color: var(--ecc-gray-text);
    transition: all 0.15s;
    text-decoration: none;
    display: inline-block;
}
.ecc-btn-back:hover { border-color: var(--ecc-blue-mid); color: var(--ecc-blue); }
.ecc-btn-next, .ecc-btn-submit {
    background: var(--ecc-blue);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 10px 28px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
    margin-left: auto;
}
.ecc-btn-next:hover, .ecc-btn-submit:hover { background: var(--ecc-blue-mid); }
.ecc-btn-submit { background: var(--ecc-green); }
.ecc-btn-submit:hover { background: #1B5E20; }
.ecc-btn-submit:disabled { background: #9E9E9E; cursor: not-allowed; }

/* ── Status / Error Messages ─────────────────────────────────────── */
.ecc-ajax-status {
    margin: 12px 24px;
    padding: 12px 16px;
    border-radius: var(--ecc-radius);
    font-size: 14px;
    font-weight: 600;
}
.ecc-ajax-status.success { background: var(--ecc-green-bg); color: var(--ecc-green); border: 1px solid #A5D6A7; }
.ecc-ajax-status.error   { background: var(--ecc-red-bg);   color: var(--ecc-red);   border: 1px solid #FFCDD2; }
.ecc-required-note { font-size: 13px; color: var(--ecc-red); margin-top: 8px; }

/* ── Review Step ─────────────────────────────────────────────────── */
.ecc-review-section {
    border: 1px solid var(--ecc-gray-mid);
    border-radius: var(--ecc-radius);
    margin-bottom: 12px;
    overflow: hidden;
}
.ecc-review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: var(--ecc-gray-light);
    border-bottom: 1px solid var(--ecc-gray-mid);
}
.ecc-review-header h4 { margin: 0; font-size: 14px; font-weight: 700; color: var(--ecc-blue); }
.ecc-review-edit {
    font-size: 12px;
    color: var(--ecc-blue-mid);
    background: none;
    border: 1px solid var(--ecc-blue-mid);
    border-radius: 4px;
    padding: 3px 10px;
    cursor: pointer;
}
.ecc-review-body { padding: 12px 16px; font-size: 14px; line-height: 1.6; }
.ecc-review-ok { color: var(--ecc-green); margin: 2px 0; }
.ecc-disclaimer {
    font-size: 12px;
    color: var(--ecc-gray-text);
    background: var(--ecc-gray-light);
    border: 1px solid var(--ecc-gray-mid);
    border-radius: var(--ecc-radius);
    padding: 12px 16px;
    margin-top: 16px;
    line-height: 1.6;
}

/* ── Date gap status ─────────────────────────────────────────────── */
.ecc-date-gap-status {
    padding: 10px 14px;
    border-radius: var(--ecc-radius);
    font-size: 13px;
    font-weight: 600;
    margin-top: 8px;
}
.ecc-date-gap-status.valid   { background: var(--ecc-green-bg); color: var(--ecc-green); }
.ecc-date-gap-status.invalid { background: var(--ecc-red-bg); color: var(--ecc-red); }

/* ── Confirmation Screen ─────────────────────────────────────────── */
.ecc-confirmation-inner {
    text-align: center;
    padding: 40px 24px;
}
.ecc-confirmation-icon { font-size: 56px; margin-bottom: 16px; }
.ecc-confirmation-inner h2 { font-size: 26px; color: var(--ecc-green); margin: 0 0 12px; }
.ecc-ref-badge {
    display: inline-block;
    background: var(--ecc-blue);
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    padding: 8px 28px;
    border-radius: 30px;
    margin: 0 0 16px;
    letter-spacing: 1px;
}
.ecc-confirmation-inner p { color: var(--ecc-gray-text); font-size: 15px; margin-bottom: 24px; }
.ecc-next-steps { text-align: left; margin: 0 auto 24px; max-width: 600px; }
.ecc-next-steps h3 { color: var(--ecc-blue); font-size: 16px; margin-bottom: 10px; }
.ecc-next-steps ol { padding-left: 20px; }
.ecc-next-steps li { font-size: 14px; line-height: 1.7; margin-bottom: 4px; }
.ecc-confirmation-actions { display: flex; justify-content: center; gap: 12px; margin-top: 24px; flex-wrap: wrap; }

/* ── Type-specific fields visibility ─────────────────────────────── */
.ecc-type-fields { display: none; }
.ecc-type-fields.active { display: block; }
.ecc-selected-type-badge {
    display: inline-block;
    background: var(--ecc-blue-pale);
    border: 1px solid var(--ecc-blue-mid);
    color: var(--ecc-blue);
    font-size: 13px;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 20px;
    margin-bottom: 16px;
}

/* ── Violation wrap ──────────────────────────────────────────────── */
.ecc-violation-wrap { padding: 0 24px; }

/* ── Doc list ────────────────────────────────────────────────────── */
.ecc-doc-list { display: flex; flex-direction: column; gap: 10px; }

/* ── Admin status badges (for shortcodes.php) ───────────────────── */
.ccpoa-status-badge { display:inline-block; padding:2px 8px; border-radius:3px; font-size:12px; font-weight:600; }

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 600px) {
    /* Portal grid — stack sidebar above main on mobile */
    .ecc-portal-grid {
        grid-template-columns: 1fr;
        padding: 12px 12px 20px;
        gap: 12px;
    }
    .ecc-portal-sidebar { order: -1; }
    .ecc-tile-grid { grid-template-columns: 1fr 1fr; }
    .ecc-tile { padding: 14px 12px; }
    .ecc-tile-label { font-size: 13px; }

    /* Wizard steps */
    .ecc-type-grid { grid-template-columns: 1fr; }
    .ecc-field-row {
        flex-direction: column;
        gap: 8px;
        margin-bottom: 8px;
    }
    .ecc-field { flex: 1 1 100%; }
    .ecc-field--sm { max-width: 100%; }
    .ecc-form-section { padding: 14px 12px; margin-bottom: 10px; }
    .ecc-step-panel { padding: 0 12px; }
    .ecc-nav-row { flex-wrap: wrap; padding: 14px 12px; gap: 8px; }
    .ecc-steps-track { display: none; }
    .ecc-progress-wrap { padding: 12px 12px 0; }
    .ecc-info-box { padding: 10px 12px; margin: 10px 0; }
    .ecc-section-title { margin-bottom: 10px; }
    .ecc-ack-item { padding: 10px 12px; }
    .ecc-review-body { padding: 10px 12px; }
    .ecc-draft-banner { padding: 10px 12px; }
    .ecc-draft-banner-inner { flex-direction: column; align-items: flex-start; gap: 10px; }
}

/* ── Print ───────────────────────────────────────────────────────── */
@media print {
    .ecc-nav-row, .ecc-portal-options, .ecc-confirmation-actions,
    .ecc-ref-toggle, .ecc-ref-drawer, .ecc-progress-wrap,
    .ecc-my-submissions, .ecc-draft-banner { display: none !important; }
    .ecc-wizard { max-width: 100%; box-shadow: none !important; }
    .ecc-step-panel { display: block !important; page-break-inside: avoid; }
    #wpadminbar, header, footer, nav,
    .site-header, .site-footer, .main-navigation,
    .sidebar, .widget-area, #sidebar { display: none !important; }
    body, html { margin: 0 !important; padding: 0 !important; }
}

/* ── Draft Banner ─────────────────────────────────────────────────── */
.ecc-draft-banner {
    margin-top: 16px;
    border: 2px solid var(--ecc-blue-mid);
    border-radius: var(--ecc-radius);
    background: var(--ecc-blue-pale);
    padding: 14px 16px;
}
.ecc-draft-banner-inner {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}
.ecc-draft-icon { font-size: 28px; flex-shrink: 0; }
.ecc-draft-text { flex: 1; min-width: 180px; }
.ecc-draft-text strong { display: block; color: var(--ecc-blue); font-size: 15px; margin-bottom: 2px; }
.ecc-draft-text span { font-size: 13px; color: var(--ecc-gray-text); }
.ecc-draft-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }

/* ── Save Progress button ─────────────────────────────────────────── */
.ecc-btn-save {
    background: none;
    border: 2px solid var(--ecc-blue-mid);
    border-radius: 6px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    color: var(--ecc-blue-mid);
    transition: all 0.15s;
}
.ecc-btn-save:hover { background: var(--ecc-blue-pale); }
.ecc-btn-save:disabled { opacity: 0.5; cursor: not-allowed; }

.ecc-save-status {
    text-align: center;
    font-size: 13px;
    padding: 6px 24px;
    color: var(--ecc-green);
}
.ecc-save-status.error { color: var(--ecc-red); }

/* ================================================================
   REFERENCE DOCUMENT DRAWER
   ================================================================ */

.ecc-ref-toggle {
    position: fixed;
    bottom: 28px;
    left: 28px;
    z-index: 1000;
    background: #1F4E79 !important;
    color: #000000 !important;
    border: none;
    border-radius: 30px;
    padding: 13px 22px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,0,0,0.22);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.15s, transform 0.15s;
    line-height: 1.3;
    text-align: left;
}
.ecc-ref-toggle:hover {
    background: #2E75B6 !important;
    transform: translateY(-2px);
    color: #000000 !important;
}
.ecc-ref-toggle-icon { font-size: 22px; flex-shrink: 0; }
.ecc-ref-toggle-text { display: flex; flex-direction: column; color: #000000 !important; }
.ecc-ref-toggle-main { font-size: 15px; font-weight: 700; color: #000000 !important; }
.ecc-ref-toggle-sub  { font-size: 12px; font-weight: 400; opacity: 0.85; margin-top: 1px; color: #000000 !important; }

.ecc-ref-drawer {
    position: fixed;
    top: 0;
    right: -620px;
    width: 600px;
    max-width: 95vw;
    height: 100vh;
    background: #fff;
    box-shadow: -4px 0 32px rgba(0,0,0,0.18);
    z-index: 1100;
    display: flex;
    flex-direction: column;
    transition: right 0.3s ease;
}
.ecc-ref-drawer.open {
    right: 0;
}

.ecc-ref-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--ecc-blue);
    color: #fff;
    flex-shrink: 0;
}
.ecc-ref-drawer-title {
    font-size: 15px;
    font-weight: 700;
}
.ecc-ref-drawer-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
    opacity: 0.85;
}
.ecc-ref-drawer-close:hover { opacity: 1; }

.ecc-ref-tabs {
    display: flex;
    border-bottom: 2px solid var(--ecc-gray-mid);
    flex-shrink: 0;
    background: var(--ecc-gray-light);
}
.ecc-ref-tab {
    flex: 1;
    background: none;
    border: none;
    padding: 11px 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ecc-gray-text);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.15s;
}
.ecc-ref-tab:hover { color: var(--ecc-blue); }
.ecc-ref-tab.active {
    color: var(--ecc-blue);
    border-bottom-color: var(--ecc-blue);
    background: #fff;
}

.ecc-ref-panels { flex: 1; overflow: hidden; display: flex; flex-direction: column; }
.ecc-ref-panel  { display: none; flex: 1; flex-direction: column; overflow: hidden; }
.ecc-ref-panel.active { display: flex; }

.ecc-ref-pdf-wrap {
    flex: 1;
    overflow: hidden;
}
.ecc-ref-pdf-wrap object {
    display: block;
    width: 100%;
    height: 100%;
    border: none;
}

.ecc-ref-open-link {
    display: block;
    text-align: center;
    padding: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ecc-blue-mid);
    text-decoration: none;
    border-top: 1px solid var(--ecc-gray-mid);
    flex-shrink: 0;
    background: var(--ecc-gray-light);
}
.ecc-ref-open-link:hover { background: var(--ecc-blue-pale); }

.ecc-ref-not-found {
    padding: 24px;
    color: var(--ecc-gray-text);
    font-size: 14px;
}

/* Overlay behind drawer on mobile */
.ecc-ref-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 1050;
}
.ecc-ref-overlay.visible { display: block; }

@media (max-width: 600px) {
    .ecc-ref-toggle { padding: 11px 16px; left: 16px; bottom: 16px; }
    .ecc-ref-toggle-sub { display: none; }
    .ecc-ref-drawer { width: 100vw; right: -100vw; }
}



/* ── Phase 4b: Multi-contractor ─────────────────────────────────────── */
.ecc-contractor-block {
    border: 1px solid var(--ecc-gray-mid);
    border-radius: var(--ecc-radius);
    padding: 16px;
    margin-bottom: 14px;
    background: #fafafa;
    position: relative;
}
.ecc-contractor-block-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.ecc-contractor-block-title {
    font-weight: 700;
    font-size: 14px;
    color: var(--ecc-blue);
}
.ecc-remove-contractor {
    background: none;
    border: none;
    color: #c62828;
    cursor: pointer;
    font-size: 13px;
    padding: 0;
    text-decoration: underline;
}
.ecc-remove-contractor:hover { color: #7f0000; }
#eccAddContractorBtn {
    margin-top: 4px;
    background: none;
    border: 2px dashed var(--ecc-blue-mid);
    color: var(--ecc-blue);
    border-radius: var(--ecc-radius);
    padding: 10px 18px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    width: 100%;
    text-align: center;
    transition: all 0.15s;
}
#eccAddContractorBtn:hover {
    background: var(--ecc-blue-pale);
    border-color: var(--ecc-blue);
}
