/* Geotools Service — Adsquare Design System — Adsquare Design System */

/* ── Disabled button ── */
.btn:disabled, .btn[disabled] {
    opacity: 0.4;
    cursor: not-allowed;
}
.btn:disabled:hover, .btn[disabled]:hover {
    opacity: 0.4;
    transform: none;
}

/* ── Animations ── */
@keyframes geoPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .3; }
}

@keyframes geoShimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(220%); }
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(16,37,56,0.18); border-radius: 6px; border: 2px solid var(--bg); }

/* ── App shell ── */
html, body { margin: 0; height: 100%; }
body { background: var(--bg-alt); }

.app-shell {
    display: flex;
    height: 100vh;
    width: 100%;
    overflow: hidden;
    background: var(--bg-alt);
    font-family: var(--font-sans);
    color: var(--fg-1);
}

/* ── Sidebar ── */
.sidebar {
    width: 248px;
    flex: 0 0 248px;
    background: var(--bg-dark);
    color: var(--fg-inverse);
    display: flex;
    flex-direction: column;
    padding: 18px 14px;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 6px 10px 18px;
    border-bottom: 1px solid rgba(255,254,253,0.08);
    margin-bottom: 6px;
}

.sidebar-logo img {
    height: 19px;
    filter: brightness(0) invert(1);
}

.sidebar-label {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--adsq-turquoise);
    padding: 6px 10px 18px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.sidebar-nav-btn {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 11px;
    border: 0;
    cursor: pointer;
    border-radius: 7px;
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 500;
    text-align: left;
    text-decoration: none;
    background: transparent;
    color: rgba(255,254,253,0.78);
    box-shadow: none;
    transition: filter 0.1s;
}

.sidebar-nav-btn:hover {
    filter: brightness(1.15);
}

.sidebar-nav-btn.active {
    background: rgba(73,172,180,0.14);
    color: var(--adsq-turquoise);
    box-shadow: inset 2px 0 0 var(--adsq-turquoise);
}

.sidebar-section-label {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: rgba(255,254,253,0.38);
    padding: 26px 10px 10px;
}

.sidebar-recent-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-recent-btn {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 11px;
    border: 0;
    cursor: pointer;
    border-radius: 7px;
    background: transparent;
    color: rgba(255,254,253,0.7);
    font-family: var(--font-sans);
    font-size: 12px;
    text-align: left;
    text-decoration: none;
}

.sidebar-recent-btn:hover {
    background: rgba(255,254,253,0.06);
}

.sidebar-recent-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.sidebar-recent-dot.running {
    background: var(--adsq-turquoise);
    animation: geoPulse 1.6s ease-in-out infinite;
}

.sidebar-recent-dot.finished { background: #2C8A4F; }
.sidebar-recent-dot.failed { background: #B85C5C; }
.sidebar-recent-dot.canceled { background: rgba(255,254,253,0.4); }
.sidebar-recent-dot.init, .sidebar-recent-dot.queued { background: #C79A3A; }

.sidebar-recent-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 8px 4px;
    border-top: 1px solid rgba(255,254,253,0.08);
}

.sidebar-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--adsq-turquoise);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 13px;
    color: #fff;
    flex-shrink: 0;
}

.sidebar-user {
    flex: 1;
    min-width: 0;
}

.sidebar-user-name {
    font-size: 13px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-user-role {
    font-size: 11px;
    color: rgba(255,254,253,0.5);
}

.sidebar-logout-btn {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    border: 1px solid rgba(255,254,253,0.14);
    background: transparent;
    color: rgba(255,254,253,0.6);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sidebar-logout-btn:hover {
    background: rgba(255,254,253,0.08);
    color: #fff;
}

/* ── Main area ── */
.main-area {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* ── Breadcrumb header ── */
.breadcrumb-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    height: 56px;
    flex: 0 0 56px;
    padding: 0 32px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}

.breadcrumb-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--fg-2);
}

.breadcrumb-sep { color: var(--fg-3); }
.breadcrumb-current { color: var(--fg-1); font-weight: 500; }

.breadcrumb-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 14px;
}

.breadcrumb-user {
    font-size: 13px;
    color: var(--fg-2);
}

.breadcrumb-logout {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 13px;
    border-radius: 999px;
    border: 1px solid var(--border-strong);
    background: transparent;
    color: var(--fg-1);
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
}

.breadcrumb-logout:hover {
    background: var(--adsq-deep-blue-10);
}

/* ── Content area ── */
.content-area {
    flex: 1;
    overflow: auto;
}

/* ── Footer bar ── */
.footer-bar {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 32px;
    background: var(--bg);
    border-top: 1px solid var(--border);
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.02em;
    color: var(--fg-3);
}

.footer-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--adsq-turquoise);
}

.footer-name { color: var(--fg-2); }
.footer-sep { color: var(--border-strong); }

/* ── Page sections ── */
.page-section {
    padding: 30px 32px 48px;
}

/* ── Dashboard ── */
.dash-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 26px;
}

.dash-header h1 {
    font-size: 30px;
    line-height: 34px;
    margin: 0;
}

.dash-header p {
    margin: 7px 0 0;
    color: var(--fg-2);
    font-size: 14px;
}

/* ── KPI Cards ── */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 30px;
}

.kpi-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px 22px;
    box-shadow: var(--shadow-xs);
}

.kpi-card-label {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--adsq-turquoise);
    margin-bottom: 14px;
}

.kpi-card-value {
    font-size: 32px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--adsq-deep-blue);
    margin: 0;
}

.kpi-card-sub {
    font-size: 12px;
    color: var(--fg-3);
    margin-top: 9px;
}

/* ── Recent jobs header ── */
.recent-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.recent-header h2 {
    font-size: 16px;
    line-height: 20px;
    margin: 0;
    letter-spacing: 0;
}

.live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--fg-3);
}

.live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--adsq-turquoise);
    animation: geoPulse 1.6s ease-in-out infinite;
}

/* ── Job table ── */
.job-table-wrap {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.job-table {
    width: 100%;
    border-collapse: collapse;
}

.job-table thead th {
    text-align: left;
    padding: 13px 18px;
    background: var(--surface-alt);
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--fg-2);
    border-bottom: 1px solid var(--border);
}

.job-table thead th.text-right { text-align: right; }

.job-table tbody tr {
    cursor: pointer;
    border-bottom: 1px solid var(--border);
}

.job-table tbody tr:hover {
    background: var(--surface-alt);
}

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

.job-table td {
    padding: 15px 18px;
    font-size: 13px;
}

.job-table td.text-right { text-align: right; }
.job-table td.td-filename { font-weight: 500; }
.job-table td.td-user { color: var(--fg-2); }
.job-table td.td-created { color: var(--fg-3); }

.job-table td.td-insightly {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--adsq-turquoise);
}

.job-table td.td-cost {
    text-align: right;
    font-family: var(--font-mono);
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

/* ── Status pills ── */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 4px 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.status-pill-running { background: rgba(73,172,180,0.16); color: #2F8E96; }
.status-pill-running .status-dot { background: #49ACB4; }

.status-pill-finished { background: rgba(44,138,79,0.14); color: #2C7A4A; }
.status-pill-finished .status-dot { background: #2C8A4F; }

.status-pill-failed { background: rgba(184,92,92,0.13); color: #B14B4B; }
.status-pill-failed .status-dot { background: #B85C5C; }

.status-pill-canceled, .status-pill-cancelling { background: rgba(16,37,56,0.07); color: rgba(16,37,56,0.55); }
.status-pill-canceled .status-dot, .status-pill-cancelling .status-dot { background: rgba(16,37,56,0.4); }

.status-pill-init, .status-pill-queued { background: rgba(199,154,58,0.16); color: #9A7322; }
.status-pill-init .status-dot, .status-pill-queued .status-dot { background: #C79A3A; }

/* ── Progress bar in table ── */
.progress-mini {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 140px;
}

.progress-mini-track {
    flex: 1;
    height: 5px;
    background: var(--adsq-deep-blue-10);
    border-radius: 3px;
    overflow: hidden;
    max-width: 90px;
}

.progress-mini-fill {
    height: 100%;
    border-radius: 3px;
}

.progress-mini-fill.running { background: #49ACB4; }
.progress-mini-fill.finished { background: #2C8A4F; }
.progress-mini-fill.failed { background: #B85C5C; }
.progress-mini-fill.canceled, .progress-mini-fill.cancelling { background: rgba(16,37,56,0.4); }
.progress-mini-fill.init, .progress-mini-fill.queued { background: #C79A3A; }

.progress-mini-text {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--fg-2);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* ── Download buttons (table) ── */
.download-btns {
    display: inline-flex;
    gap: 6px;
}

.download-btn {
    padding: 5px 11px;
    border-radius: 6px;
    border: 1px solid var(--border-strong);
    font-size: 12px;
    font-weight: 500;
    color: var(--fg-1);
    cursor: pointer;
    text-decoration: none;
    background: transparent;
    display: inline-block;
}

.download-btn:hover {
    border-color: var(--adsq-turquoise);
    color: var(--adsq-turquoise);
}

.td-dash { color: var(--fg-3); }

/* ── No-jobs message ── */
.no-jobs-msg {
    text-align: center;
    padding: 2rem;
    color: var(--fg-3);
}

.no-jobs-msg td {
    padding: 2rem;
}

/* ── Upload page ── */
.upload-section {
    max-width: 720px;
    margin: 0 auto;
    padding: 56px 32px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 0;
    background: transparent;
    cursor: pointer;
    color: var(--fg-2);
    font-family: var(--font-sans);
    font-size: 13px;
    margin-bottom: 24px;
    padding: 0;
    text-decoration: none;
}

.back-link:hover { color: var(--fg-1); }

.upload-section h1 {
    font-size: 28px;
    margin: 0 0 6px;
}

.upload-section > p {
    color: var(--fg-2);
    font-size: 14px;
    margin: 0 0 28px;
}

.upload-zone {
    border: 2px dashed var(--border-strong);
    background: var(--surface-alt);
    border-radius: 14px;
    padding: 60px 32px;
    text-align: center;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}

.upload-zone.dragover {
    border-color: var(--adsq-turquoise);
    background: var(--adsq-turquoise-15);
}

.upload-icon-circle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--adsq-turquoise-15);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.upload-title {
    font-size: 17px;
    font-weight: 500;
    color: var(--fg-1);
    margin-bottom: 7px;
}

.upload-subtitle {
    font-size: 14px;
    color: var(--fg-2);
    margin-bottom: 22px;
}

.upload-browse { color: var(--adsq-turquoise); font-weight: 500; }

.file-type-badges {
    display: inline-flex;
    gap: 8px;
}

.file-type-badge {
    font-family: var(--font-mono);
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 6px;
    background: var(--surface-alt);
    color: var(--fg-2);
    border: 1px solid var(--border);
}

.upload-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    padding: 14px 16px;
    background: var(--surface-alt);
    border-radius: 10px;
}

.upload-info span {
    font-size: 13px;
    color: var(--fg-2);
}

.upload-error {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 18px;
    background: rgba(184,92,92,0.08);
    border: 1px solid rgba(184,92,92,0.25);
    border-radius: 10px;
    margin-bottom: 20px;
}

.upload-error p {
    font-size: 13px;
    font-weight: 600;
    color: #B14B4B;
    margin: 0;
}

/* ── Preview page ── */
.preview-section {
    padding: 30px 32px 48px;
    max-width: 1180px;
    margin: 0 auto;
}

.preview-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.preview-title-row h1 {
    font-size: 26px;
    margin: 0;
}

.file-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--adsq-turquoise-15);
    border: 1px solid var(--adsq-turquoise-30);
    font-size: 12px;
    font-weight: 500;
}

.preview-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 24px;
    align-items: start;
}

.preview-left {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.preview-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 24px;
    box-shadow: var(--shadow-xs);
}

.preview-card h3 {
    font-size: 15px;
    margin: 0 0 4px;
}

.preview-card > p {
    font-size: 13px;
    color: var(--fg-2);
    margin: 0 0 18px;
}

.mapping-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.field-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.field-group.full-width {
    grid-column: 1 / -1;
}

.field-label {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--fg-2);
}

.field-select-wrap { position: relative; }

.field-select {
    width: 100%;
    padding: 9px 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: var(--font-sans);
    font-size: 13px;
    color: var(--fg-1);
    cursor: pointer;
    appearance: none;
}

.field-select:focus {
    outline: 0;
    border-color: var(--adsq-turquoise);
}

.field-select-arrow {
    position: absolute;
    right: 11px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.field-input {
    width: 100%;
    padding: 9px 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: var(--font-sans);
    font-size: 13px;
    color: var(--fg-1);
    box-sizing: border-box;
}

.field-input:focus {
    outline: 0;
    border-color: var(--adsq-turquoise);
}

.field-input-mono {
    font-family: var(--font-mono);
}

/* ── Preview table ── */
.preview-table-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-xs);
}

.preview-table-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    font-weight: 500;
}

.preview-table-header span {
    color: var(--fg-3);
    font-weight: 400;
}

.preview-table {
    width: 100%;
    border-collapse: collapse;
}

.preview-table thead th {
    text-align: left;
    padding: 10px 18px;
    background: var(--surface-alt);
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--fg-2);
    border-bottom: 1px solid var(--border);
}

.preview-table tbody tr {
    border-bottom: 1px solid var(--border);
}

.preview-table tbody td {
    padding: 11px 18px;
    font-size: 13px;
}

.preview-table tbody td.mono {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--fg-2);
}

/* ── Cost card (sticky right side) ── */
.preview-right {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cost-card {
    background: var(--bg-dark);
    color: var(--fg-inverse);
    border-radius: 12px;
    padding: 24px;
}

.cost-card-label {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--adsq-turquoise);
    margin-bottom: 18px;
}

.cost-line {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 12px;
}

.cost-line:last-of-type { margin-bottom: 16px; }

.cost-line-name { font-size: 13px; color: var(--fg-inverse); }
.cost-line-detail {
    font-size: 11px;
    color: rgba(255,254,253,0.5);
    font-family: var(--font-mono);
}

.cost-line-amount {
    font-family: var(--font-mono);
    font-size: 14px;
}

.cost-divider {
    height: 1px;
    background: rgba(255,254,253,0.12);
    margin: 0 0 16px;
}

.cost-total-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.cost-total-label {
    font-size: 14px;
    font-weight: 500;
}

.cost-total-amount {
    font-family: var(--font-mono);
    font-size: 26px;
    font-weight: 500;
    color: var(--adsq-turquoise);
}

.cost-note {
    font-size: 11px;
    color: rgba(255,254,253,0.5);
    margin-top: 8px;
}

/* ── Job detail page ── */
.job-section {
    padding: 30px 32px 48px;
    max-width: 980px;
    margin: 0 auto;
}

.job-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 8px;
}

.job-title-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.job-title-left h1 {
    font-size: 24px;
    margin: 0;
}

.job-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 13px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
}

.job-status-pill .status-dot {
    width: 8px;
    height: 8px;
}

.job-meta {
    display: flex;
    gap: 18px;
    color: var(--fg-3);
    font-size: 13px;
    margin-bottom: 26px;
}

.job-meta .meta-sep { display: inline; }
.job-meta .insightly-link {
    font-family: var(--font-mono);
    color: var(--adsq-turquoise);
}

/* ── Progress card (job detail) ── */
.progress-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 26px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 18px;
}

.progress-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 14px;
}

.progress-pct {
    font-size: 42px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--adsq-deep-blue);
}

.progress-eta {
    font-size: 14px;
    color: var(--fg-2);
}

.stop-job-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 17px;
    border-radius: 999px;
    border: 1px solid rgba(184,92,92,0.4);
    background: rgba(184,92,92,0.08);
    color: #B14B4B;
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}

.stop-job-btn:hover {
    background: rgba(184,92,92,0.14);
}

.progress-track {
    height: 10px;
    background: var(--adsq-deep-blue-10);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    border-radius: 6px;
    transition: width .4s ease;
    position: relative;
    overflow: hidden;
}

.progress-fill.running { background: #49ACB4; }
.progress-fill.finished { background: #2C8A4F; }
.progress-fill.failed { background: #B85C5C; }
.progress-fill.canceled, .progress-fill.cancelling { background: rgba(16,37,56,0.4); }
.progress-fill.init, .progress-fill.queued { background: #C79A3A; }

.progress-shimmer {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.45), transparent);
    animation: geoShimmer 1.4s linear infinite;
}

/* ── Stat cards (job detail) ── */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 18px;
}

.stat-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 18px 20px;
}

.stat-card-label {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--fg-2);
    margin-bottom: 10px;
}

.stat-card-label.accent { color: var(--adsq-turquoise); }

.stat-card-value {
    font-size: 26px;
    font-weight: 700;
    color: var(--adsq-deep-blue);
    font-variant-numeric: tabular-nums;
}

.stat-card-value.failed-color { color: #B14B4B; }
.stat-card-value.mono { font-family: var(--font-mono); }

/* ── Status banners ── */
.banner-failed {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 18px;
    background: rgba(184,92,92,0.08);
    border: 1px solid rgba(184,92,92,0.25);
    border-radius: 10px;
}

.banner-failed-title {
    font-size: 13px;
    font-weight: 600;
    color: #B14B4B;
    margin-bottom: 3px;
}

.banner-failed-desc {
    font-size: 13px;
    color: var(--fg-2);
}

.banner-canceled {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    background: var(--surface-alt);
    border: 1px solid var(--border);
    border-radius: 10px;
}

.banner-canceled-text {
    font-size: 13px;
    color: var(--fg-2);
}

.banner-finished {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    background: rgba(44,138,79,0.08);
    border: 1px solid rgba(44,138,79,0.25);
    border-radius: 10px;
}

.banner-finished-text {
    font-size: 13px;
    font-weight: 500;
    color: #2C7A4A;
}

.banner-actions {
    margin-left: auto;
    display: flex;
    gap: 9px;
}

/* ── Download buttons (job detail) ── */
.job-download-btns {
    display: flex;
    gap: 9px;
}

/* ── SVG icons ── */
.icon-sm { width: 15px; height: 15px; }
.icon-md { width: 17px; height: 17px; }

/* ── Responsive ── */
@media (max-width: 1100px) {
    .preview-grid {
        grid-template-columns: 1fr;
    }
    .preview-right {
        position: static;
    }
}

@media (max-width: 900px) {
    .kpi-grid, .stat-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .sidebar {
        display: none;
    }
}

/* ── Confidence badge for mapping ── */
.confidence-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 500;
    vertical-align: middle;
    margin-left: 8px;
}

.confidence-high {
    background: rgba(44,138,79,0.14);
    color: #2C7A4A;
}

.confidence-medium {
    background: rgba(199,154,58,0.16);
    color: #9A7322;
}

.confidence-low {
    background: rgba(184,92,92,0.13);
    color: #B14B4B;
}
