/* ============================================================
   CarZoon MOT History — Admin Settings
   ============================================================ */

.cz-mot-status-banner {
    border-radius: 10px;
    padding: 14px 20px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.cz-mot-status-banner.configured {
    background: #d1fae5;
    color: #065f46;
    border: 1.5px solid #6ee7b7;
}
.cz-mot-status-banner.not-configured {
    background: #fef3c7;
    color: #92400e;
    border: 1.5px solid #fcd34d;
}

.cz-mot-settings-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 24px;
    align-items: start;
}
@media (max-width: 900px) {
    .cz-mot-settings-grid { grid-template-columns: 1fr; }
}

.cz-mot-right-col { display: flex; flex-direction: column; gap: 20px; }

.cz-mot-card {
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.cz-mot-card-info { background: #f0f9ff; border-color: #bae6fd; }
.cz-mot-card-header {
    padding: 14px 20px;
    font-size: 14px;
    font-weight: 700;
    color: #1e3a5f;
    background: #f8fafc;
    border-bottom: 1.5px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.cz-mot-card-info .cz-mot-card-header { background: #e0f2fe; border-bottom-color: #bae6fd; }
.cz-mot-card-body { padding: 20px; }

.cz-mot-field-group { margin-bottom: 18px; }
.cz-mot-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #374151;
    margin-bottom: 6px;
}
.cz-mot-required { color: #ef4444; margin-left: 2px; }

.cz-mot-input-wrap { position: relative; display: flex; }
.cz-mot-input {
    width: 100%;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    color: #1e293b;
    background: #f8fafc;
    transition: 0.2s;
    box-sizing: border-box;
}
.cz-mot-input-wrap .cz-mot-input { border-radius: 8px 0 0 8px; border-right: none; }
.cz-mot-input:focus { outline: none; border-color: #2f68ff; background: #fff; }
.cz-mot-toggle-pw {
    background: #f1f5f9;
    border: 1.5px solid #cbd5e1;
    border-left: none;
    border-radius: 0 8px 8px 0;
    padding: 0 12px;
    cursor: pointer;
    font-size: 16px;
    transition: 0.2s;
}
.cz-mot-toggle-pw:hover { background: #e2e8f0; }

.cz-mot-hint { font-size: 12px; color: #94a3b8; margin: 4px 0 0; }
.cz-mot-divider { border: none; border-top: 1.5px solid #e2e8f0; margin: 18px 0; }


/* ============================================================
   CarZoon MOT History — Frontend
   ============================================================ */

.cz-mot-wrap {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 16px 60px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #1e293b;
}
.cz-mot-wrap * { box-sizing: border-box; }

/* ── SEARCH BOX ── */
.cz-mot-search-box {
    background: linear-gradient(135deg, #1a3a6b 0%, #2f68ff 100%);
    border-radius: 20px;
    padding: 32px 28px 24px;
    margin-bottom: 28px;
    box-shadow: 0 8px 32px rgba(47,104,255,0.22);
}
.cz-mot-logo-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}
.cz-mot-icon {
    font-size: 44px;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.2));
}
.cz-mot-title {
    font-size: 26px;
    font-weight: 800;
    /*color: #fff;*/
    margin: 0 0 4px;
    line-height: 1.2;
}
.cz-mot-subtitle {
    font-size: 14px;
    /*color: rgba(255,255,255,0.8);*/
    margin: 0;
}
.cz-mot-form-row {
    display: flex;
    gap: 12px;
     flex-direction: column;
    align-items: stretch;
}
.cz-mot-plate-wrapper {
    display: flex;
    align-items: stretch;
    /*box-shadow: 0 4px 16px rgba(0,0,0,0.3);*/
    background: #ffd84c !important;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid #1a3a60;
    width: 100%;
}
.cz-mot-plate-gb {

     display: flex;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    background: #1a3a60;
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.5px;

}
.cz-mot-plate-input {
    /*flex: 1;*/
    /*background: transparent;*/
    /*border: none;*/
    /*outline: none;*/
    /*font-size: 28px;*/
    /*font-weight: 900;*/
    /*color: #1a1a1a;*/
    /*padding: 10px 16px;*/
    /*letter-spacing: 4px;*/
    /*text-transform: uppercase;*/
    /*font-family: 'Charles Wright', 'UKNumberPlate', 'Arial Black', sans-serif;*/
    /*min-width: 0;*/
    
        flex: 1;
    min-height: 68px;
    border: 0 !important;
    background: #ffc107 !important;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: 4px;
    color: #111;
    padding: 0 20px;
    text-transform: uppercase;
    outline: none;
    font-family: inherit;
}
.cz-mot-plate-input::placeholder { color: rgba(26,26,26,0.35); letter-spacing: 4px; }

.cz-mot-search-btn {
    background: #fff;
    color: #2f68ff;
    border: none;
    border-radius: 12px;
    padding: 0 24px;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    transition: 0.18s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    min-height: 58px;
}
.cz-mot-search-btn:hover { background: #eef2ff; transform: translateY(-1px); }
.cz-mot-search-btn:active { transform: translateY(0); }
.cz-mot-btn-icon { font-size: 18px; }

.cz-mot-disclaimer {
    /*color: rgba(255,255,255,0.65);*/
    font-size: 12px;
    margin: 16px 0 0;
    text-align: center;
}

/* ── LOADING ── */
.cz-mot-loading {
    text-align: center;
    padding: 48px 24px;
    color: #64748b;
    font-size: 15px;
}
.cz-mot-spinner {
    width: 44px;
    height: 44px;
    border: 4px solid #e2e8f0;
    border-top-color: #2f68ff;
    border-radius: 50%;
    animation: czMotSpin 0.8s linear infinite;
    margin: 0 auto 16px;
}
@keyframes czMotSpin { to { transform: rotate(360deg); } }

/* ── ERROR ── */
.cz-mot-error {
    background: #fef2f2;
    border: 1.5px solid #fca5a5;
    border-radius: 12px;
    padding: 18px 22px;
    color: #dc2626;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}
.cz-mot-error::before { content: '⚠️'; font-size: 20px; flex-shrink: 0; }

/* ── VEHICLE HEADER CARD ── */
.cz-mot-vehicle-card {
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 18px;
    padding: 22px 24px;
    margin-bottom: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.cz-mot-vehicle-info { display: flex; align-items: center; gap: 16px; flex: 1; min-width: 0; }
.cz-mot-vehicle-icon { font-size: 40px; flex-shrink: 0; }
.cz-mot-vehicle-name {
    font-size: 20px;
    font-weight: 800;
    color: #0f2744;
    margin: 0 0 4px;
}
.cz-mot-vehicle-reg {
    display: inline-flex;
    align-items: center;
    background: #f5c518;
    border: 2.5px solid #1a1a1a;
    border-radius: 7px;
    overflow: hidden;
    font-size: 16px;
    font-weight: 900;
    letter-spacing: 3px;
    color: #1a1a1a;
}
.cz-mot-vehicle-reg-gb {
    background: #003f99;
    color: #f5c518;
    font-size: 9px;
    font-weight: 900;
    padding: 0 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 28px;
    border-right: 2px solid #1a1a1a;
    letter-spacing: 0.5px;
}
.cz-mot-vehicle-reg-num { padding: 4px 10px; }

/* ── STAT GRID ── */
.cz-mot-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}
.cz-mot-stat {
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    padding: 18px 16px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: 0.18s;
}
.cz-mot-stat:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,0.1); }
.cz-mot-stat-icon { font-size: 26px; margin-bottom: 8px; }
.cz-mot-stat-label { font-size: 11px; font-weight: 700; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.6px; margin-bottom: 6px; }
.cz-mot-stat-value { font-size: 18px; font-weight: 800; color: #0f2744; line-height: 1.2; }
.cz-mot-stat-value.valid { color: #059669; }
.cz-mot-stat-value.expired { color: #dc2626; }
.cz-mot-stat-sub { font-size: 11px; color: #94a3b8; margin-top: 4px; }
.cz-mot-stat-sub.soon { color: #f59e0b; font-weight: 700; }

/* ── INFO NOTICE ── */
.cz-mot-notice {
    background: #eff6ff;
    border: 1.5px solid #bfdbfe;
    border-radius: 10px;
    padding: 12px 18px;
    font-size: 13px;
    color: #1e40af;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
}
.cz-mot-notice-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }

/* ── TEST HISTORY CARD ── */
.cz-mot-history-card {
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    margin-bottom: 20px;
}
.cz-mot-history-title {
    font-size: 18px;
    font-weight: 800;
    color: #0f2744;
    padding: 20px 24px 16px;
    border-bottom: 1.5px solid #f1f5f9;
    margin: 0;
}

/* ── TEST ITEM ── */
.cz-mot-test-item {
    border-left: 4px solid #e2e8f0;
    padding: 18px 20px;
    border-bottom: 1px solid #f1f5f9;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: start;
    transition: 0.15s;
    cursor: pointer;
    position: relative;
}
.cz-mot-test-item:last-child { border-bottom: none; }
.cz-mot-test-item:hover { background: #f8fafc; }
.cz-mot-test-item.pass { border-left-color: #10b981; }
.cz-mot-test-item.fail { border-left-color: #ef4444; }

.cz-mot-test-header { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.cz-mot-test-date { font-size: 15px; font-weight: 800; color: #0f2744; }
.cz-mot-test-num { font-size: 11px; color: #94a3b8; margin-top: 2px; }

.cz-mot-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border-radius: 99px;
    padding: 3px 12px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.cz-mot-badge.pass { background: #d1fae5; color: #065f46; }
.cz-mot-badge.fail { background: #fee2e2; color: #991b1b; }

.cz-mot-test-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 13px;
    color: #475569;
    flex-wrap: wrap;
}
.cz-mot-test-meta-item { display: flex; align-items: center; gap: 5px; }
.cz-mot-test-expiry { color: #ef4444; font-weight: 700; }
.cz-mot-test-expiry.active { color: #10b981; }

.cz-mot-test-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.cz-mot-advisory-count {
    background: #fef3c7;
    color: #b45309;
    border-radius: 99px;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
}
.cz-mot-chevron { color: #94a3b8; font-size: 18px; line-height: 1; }

/* ── EXPANDED DETAIL ── */
.cz-mot-test-detail {
    display: none;
    padding: 0 20px 18px;
    background: #f8fafc;
    border-bottom: 1px solid #f1f5f9;
}
.cz-mot-test-detail.open { display: block; }
.cz-mot-detail-section { margin-top: 14px; }
.cz-mot-detail-section-title {
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    color: #94a3b8;
    margin: 0 0 8px;
}
.cz-mot-defect-item {
    background: #fff;
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 6px;
    font-size: 13px;
    color: #374151;
    border: 1.5px solid #e2e8f0;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}
.cz-mot-defect-item.advisory { border-left: 3px solid #f59e0b; }
.cz-mot-defect-item.fail     { border-left: 3px solid #ef4444; }
.cz-mot-defect-item.prs      { border-left: 3px solid #f97316; }
.cz-mot-defect-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 4px; flex-shrink: 0; }
.cz-mot-defect-dot.advisory { background: #f59e0b; }
.cz-mot-defect-dot.fail     { background: #ef4444; }
.cz-mot-defect-dot.prs      { background: #f97316; }

/* ── ADVISORY NOTICE ── */
.cz-mot-advisory-notice {
    background: #fffbeb;
    border: 1.5px solid #fde68a;
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 20px;
}
.cz-mot-advisory-icon { font-size: 28px; flex-shrink: 0; }
.cz-mot-advisory-text h4 { font-size: 14px; font-weight: 800; color: #92400e; margin: 0 0 4px; }
.cz-mot-advisory-text p  { font-size: 13px; color: #78350f; margin: 0; }

/* ── MOBILE ── */
@media (max-width: 600px) {
    .cz-mot-search-box { padding: 22px 16px 18px; border-radius: 14px; }
    .cz-mot-title { font-size: 20px; }
    .cz-mot-logo-row { gap: 10px; margin-bottom: 18px; }
    .cz-mot-icon { font-size: 36px; }
    .cz-mot-form-row { flex-direction: column; gap: 10px; }
    .cz-mot-plate-input { font-size: 22px; letter-spacing: 3px; padding: 10px 12px; }
    .cz-mot-search-btn { min-height: 48px; padding: 0 20px; font-size: 14px; border-radius: 10px; width: 100%; justify-content: center; }
    .cz-mot-stats { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .cz-mot-stat { padding: 14px 10px; border-radius: 12px; }
    .cz-mot-stat-value { font-size: 15px; }
    .cz-mot-vehicle-card { padding: 16px; border-radius: 14px; }
    .cz-mot-vehicle-name { font-size: 16px; }
    .cz-mot-test-item { padding: 14px 14px; }
    .cz-mot-test-date { font-size: 14px; }
    .cz-mot-test-meta { gap: 10px; font-size: 12px; }
    .cz-mot-history-title { font-size: 16px; padding: 16px 16px 12px; }
    .cz-mot-test-detail { padding: 0 14px 14px; }
}
