/* ─── Design tokens ─────────────────────────────────────────── */
:root {
    /* Backgrounds */
    --bg: #080A12;
    --surface: #0F1119;
    --surface-2: #161A26;
    --surface-3: #1C2133;

    /* Borders */
    --border: rgba(255, 255, 255, 0.07);
    --border-md: rgba(255, 255, 255, 0.11);
    --border-accent: rgba(79, 130, 247, 0.35);

    /* Text */
    --text: #E2E8F0;
    --text-2: #8892A4;
    --text-3: #525B6E;

    /* Accent – blue */
    --accent: #4F82F7;
    --accent-dark: #3B6EE3;
    --accent-soft: rgba(79, 130, 247, 0.12);
    --accent-glow: 0 0 24px rgba(79, 130, 247, 0.22);

    /* Semantic */
    --success: #10B981;
    --success-soft: rgba(16, 185, 129, 0.12);
    --warning: #F59E0B;
    --warning-soft: rgba(245, 158, 11, 0.12);
    --danger: #EF4444;
    --danger-soft: rgba(239, 68, 68, 0.12);

    /* Radii */
    --radius-xs: 6px;
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 18px;
    --radius-xl: 22px;

    /* Shadows */
    --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.4), 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-btn: 0 4px 16px rgba(79, 130, 247, 0.3);
}

/* ─── Reset & base ──────────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Inter", system-ui, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--bg);
    background-image:
        radial-gradient(ellipse 80% 50% at 20% -10%, rgba(79, 130, 247, 0.07), transparent),
        radial-gradient(ellipse 60% 40% at 80% 110%, rgba(16, 185, 129, 0.05), transparent);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
}

h1,
h2,
h3,
h4 {
    margin: 0;
    font-weight: 600;
    line-height: 1.25;
}

/* ─── App shell ─────────────────────────────────────────────── */
.app-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ─── Header ────────────────────────────────────────────────── */
.app-header {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 24px;
    height: 56px;
    background: rgba(8, 10, 18, 0.82);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.brand-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: var(--radius-sm);
    background: var(--accent);
    color: #fff;
    font-size: 15px;
}

.brand-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.01em;
}

/* Step tabs */
.step-tabs {
    display: flex;
    align-items: center;
    gap: 2px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 4px;
}

.step-tab {
    display: flex;
    align-items: center;
    gap: 7px;
    background: none;
    border: none;
    border-radius: 999px;
    padding: 5px 14px;
    font: inherit;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-2);
    cursor: pointer;
    transition: background 0.18s, color 0.18s;
    white-space: nowrap;
}

.step-tab:hover:not(:disabled) {
    background: var(--surface-3);
    color: var(--text);
}

.step-tab:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.step-tab.active {
    background: var(--accent);
    color: #fff;
}

.step-tab.done {
    color: var(--success);
}

.step-tab.done .step-tab-num {
    color: var(--success);
}

.step-tab-num {
    font-size: 11px;
    font-weight: 700;
    font-family: "JetBrains Mono", monospace;
    letter-spacing: 0.04em;
    color: inherit;
    opacity: 0.7;
}

.step-tab.active .step-tab-num {
    opacity: 0.85;
}

.step-tab-sep {
    width: 20px;
    height: 1px;
    background: var(--border-md);
    margin: 0 2px;
}

/* Header right */
.header-right {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-shrink: 0;
}

.header-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--text-3);
    transition: background 0.3s;
}

.header-status-dot.running {
    background: var(--warning);
    box-shadow: 0 0 8px var(--warning);
    animation: pulse-dot 1.5s ease-in-out infinite;
}

.header-status-dot.completed {
    background: var(--success);
}

.header-status-dot.failed {
    background: var(--danger);
}

@keyframes pulse-dot {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

.header-status-text {
    font-size: 12px;
    color: var(--text-2);
    text-transform: capitalize;
}

/* ─── Main content ──────────────────────────────────────────── */
.app-main {
    flex: 1;
    width: min(1200px, calc(100% - 48px));
    margin: 0 auto;
    padding: 32px 0 48px;
    display: grid;
    gap: 20px;
    min-width: 0;
}

/* ─── Page header ───────────────────────────────────────────── */
.page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 4px;
}

.page-eyebrow {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 6px;
}

.page-eyebrow i {
    font-size: 12px;
}

.page-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
}

/* ─── Step view ─────────────────────────────────────────────── */
.step-view {
    display: contents;
}

/* ─── Cards ─────────────────────────────────────────────────── */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 22px;
    box-shadow: var(--shadow-card);
}

.card-primary {
    border-color: rgba(79, 130, 247, 0.18);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.card-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    font-size: 16px;
    flex-shrink: 0;
}

.accent-blue {
    background: var(--accent-soft);
    color: var(--accent);
}

.accent-green {
    background: var(--success-soft);
    color: var(--success);
}

.accent-purple {
    background: #f3e5f5;
    color: #9c27b0;
}

.card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
}

.card-desc {
    margin: 0 0 18px;
    color: var(--text-2);
    font-size: 13.5px;
    line-height: 1.65;
}

.card-subhead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}

.card-subhead-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-2);
    font-size: 13px;
}

.card-subhead-title i {
    font-size: 14px;
}

.card-subhead h2,
.card-subhead h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

/* ─── Step 1 grid ───────────────────────────────────────────── */
.step1-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 20px;
    align-items: start;
}

/* ─── Form ──────────────────────────────────────────────────── */
.upload-form {
    display: grid;
    gap: 16px;
}

.field {
    display: grid;
    gap: 7px;
}

.field-label {
    font-size: 12.5px;
    font-weight: 500;
    color: var(--text-2);
    letter-spacing: 0.01em;
}

input[type="text"], #quick-ups-password {
    width: 100%;
    background: var(--surface-2);
    border: 1px solid var(--border-md);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    font: inherit;
    font-size: 14px;
    color: var(--text);
    outline: none;
    transition: border-color 0.18s, box-shadow 0.18s;
}

input[type="text"]::placeholder {
    color: var(--text-3);
}

input[type="text"]:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

/* File drop */
.file-drop {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1.5px dashed rgba(79, 130, 247, 0.25);
    border-radius: var(--radius-lg);
    padding: 28px 20px;
    background: var(--accent-soft);
    cursor: pointer;
    transition: border-color 0.18s, background 0.18s;
    text-align: center;
}

.file-drop:hover {
    border-color: rgba(79, 130, 247, 0.5);
    background: rgba(79, 130, 247, 0.16);
}

.file-drop input[type="file"] {
    display: none;
}

.file-drop-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: var(--surface-3);
    color: var(--accent);
    font-size: 18px;
    margin-bottom: 4px;
}

.file-title {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text);
}

.file-hint {
    font-size: 12px;
    color: var(--text-2);
}

.button-row {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
}

/* ─── Buttons ───────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: none;
    border-radius: 999px;
    padding: 9px 18px;
    font: inherit;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none;
    transition: opacity 0.18s, transform 0.15s, box-shadow 0.18s, background 0.18s;
}

.btn i {
    font-size: 14px;
}

.btn:hover:not(:disabled) {
    transform: translateY(-1px);
}

.btn:active:not(:disabled) {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    transform: none;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: var(--shadow-btn);
}

.btn-primary:hover:not(:disabled) {
    background: var(--accent-dark);
    box-shadow: 0 6px 24px rgba(79, 130, 247, 0.45);
}

.btn-outline {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border-md);
}

.btn-outline:hover:not(:disabled) {
    background: var(--surface-2);
    border-color: var(--border-accent);
}

.btn-ghost {
    background: var(--surface-2);
    color: var(--text-2);
    border: 1px solid var(--border);
}

.btn-ghost:hover:not(:disabled) {
    background: var(--surface-3);
    color: var(--text);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12.5px;
}

/* ─── Feedback panel ────────────────────────────────────────── */
.feedback-panel {
    display: grid;
    gap: 10px;
    margin-top: 4px;
    border-radius: var(--radius-md);
    padding: 14px 16px;
    border: 1px solid var(--border);
    font-size: 13.5px;
}

.feedback-panel.success {
    background: var(--success-soft);
    border-color: rgba(16, 185, 129, 0.25);
    color: #6EE7B7;
}

.feedback-panel.error {
    background: var(--danger-soft);
    border-color: rgba(239, 68, 68, 0.25);
    color: #FCA5A5;
}

.feedback-panel strong {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: inherit;
}

.feedback-panel ul {
    margin: 0;
    padding-left: 18px;
    color: inherit;
    opacity: 0.85;
}

/* ─── Run bar (Step 2) ──────────────────────────────────────── */
.run-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 18px 22px;
    box-shadow: var(--shadow-card);
}

.run-bar-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--text-3);
    margin-bottom: 4px;
}

.run-bar-config {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}

.run-btn-group {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

/* Run hint */
.run-hint {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    background: var(--success-soft);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: #6EE7B7;
    font-size: 13.5px;
}

.run-hint i {
    font-size: 15px;
    flex-shrink: 0;
}

/* ─── Checkpoint panel ──────────────────────────────────────── */
.checkpoint-panel {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: var(--radius-lg);
}

.checkpoint-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: var(--warning-soft);
    color: var(--warning);
    font-size: 18px;
    flex-shrink: 0;
}

.checkpoint-copy p {
    margin: 0 0 4px;
    font-weight: 600;
    color: var(--warning);
    font-size: 13.5px;
}

.checkpoint-copy span {
    font-size: 13px;
    color: var(--text-2);
}

.checkpoint-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-left: auto;
    flex-shrink: 0;
}

.checkpoint-actions input[type="text"] {
    min-width: 180px;
    padding: 8px 12px;
}

/* ─── Timeline layout ───────────────────────────────────────── */
.timeline-layout {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr;
    gap: 20px;
    align-items: start;
    min-width: 0;
}

/* Status pill */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.status-pill::before {
    content: '';
    display: block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
}

.status-pill.idle {
    background: rgba(82, 91, 110, 0.2);
    color: var(--text-3);
}

.status-pill.running {
    background: var(--warning-soft);
    color: var(--warning);
}

.status-pill.completed {
    background: var(--success-soft);
    color: var(--success);
}

.status-pill.failed {
    background: var(--danger-soft);
    color: var(--danger);
}

/* Timeline */
.timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
    max-height: 480px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 2px;
}

.timeline-item {
    display: grid;
    grid-template-columns: 20px 1fr;
    gap: 10px;
    position: relative;
    padding-bottom: 14px;
    min-width: 0;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-soft);
    margin-top: 5px;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

.timeline-item:not(:last-child) .timeline-dot::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 100%;
    transform: translateX(-50%);
    width: 1px;
    height: calc(100% + 14px);
    background: var(--border-md);
}

.timeline-content {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 10px 13px;
    min-width: 0;
    overflow: hidden;
}

.timeline-message {
    font-size: 13px;
    line-height: 1.55;
    color: var(--text);
    word-break: break-word;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.timeline-level,
.timeline-time {
    margin-top: 5px;
    font-size: 11px;
    color: var(--text-3);
    font-family: "JetBrains Mono", monospace;
}

.timeline-empty {
    font-size: 13px;
    color: var(--text-3);
    padding: 8px 0;
}

.timeline-card,
.console-card {
    min-width: 0;
}

.console {
    min-height: 360px;
    max-height: 480px;
    overflow: auto;
    border-radius: var(--radius-md);
    background: #05070E;
    border: 1px solid var(--border);
    color: #94D8B1;
    padding: 14px 16px;
    font-family: "JetBrains Mono", monospace;
    font-size: 12px;
    line-height: 1.7;
    margin-top: 2px;
}

.console-line {
    white-space: pre-wrap;
    word-break: break-word;
}

.console-line.info {
    color: #94D8B1;
}

.console-line.error {
    color: #FCA5A5;
}

.console-line.warning {
    color: #FDE68A;
}

.job-id-label {
    font-size: 11px;
    font-family: "JetBrains Mono", monospace;
    color: var(--text-3);
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 3px 10px;
}

/* ─── Recent jobs ───────────────────────────────────────────── */
.recent-panel {
    margin-top: 0;
}

.recent-jobs {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.recent-job-card {
    display: grid;
    grid-template-columns: 1.2fr 0.9fr 1fr;
    gap: 16px;
    align-items: center;
    padding: 13px 4px;
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
}

.recent-job-card:last-child {
    border-bottom: none;
}

.recent-job-card:hover {
    background: var(--surface-2);
    border-radius: var(--radius-sm);
}

.recent-job-card strong {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 3px;
    font-family: "JetBrains Mono", monospace;
}

.recent-job-card span {
    font-size: 12px;
    color: var(--text-2);
}

/* ─── Utility ───────────────────────────────────────────────── */
.hidden {
    display: none !important;
}

.empty-state {
    padding: 24px 0;
    font-size: 13px;
    color: var(--text-3);
    text-align: center;
}

/* ─── Scrollbar styling ─────────────────────────────────────── */
::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--surface-3);
    border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-3);
}

/* ─── Responsive ────────────────────────────────────────────── */
@media (max-width: 960px) {

    .step1-grid,
    .timeline-layout {
        grid-template-columns: 1fr;
    }

    .run-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }

    .recent-job-card {
        grid-template-columns: 1fr 1fr;
    }

    .checkpoint-panel {
        flex-wrap: wrap;
    }

    .checkpoint-actions {
        margin-left: 0;
        width: 100%;
    }
}

@media (max-width: 720px) {
    .app-header {
        padding: 0 16px;
    }

    .brand-name {
        display: none;
    }

    .step-tab-label {
        display: none;
    }

    .app-main {
        width: calc(100% - 32px);
        padding: 20px 0 32px;
    }

    .page-title {
        font-size: 18px;
    }

    .recent-job-card {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}

/* ─── Jobs & Tables ─────────────────────────────────────────── */
.data-table-container {
    width: 100%;
    overflow-x: auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}

.data-table th {
    text-align: left;
    padding: 14px 20px;
    font-weight: 600;
    color: var(--text-2);
    border-bottom: 1px solid var(--border-md);
    background: rgba(255, 255, 255, 0.02);
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.05em;
}

.data-table td {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    vertical-align: middle;
}

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

.data-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* ─── Stats Grid ────────────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 8px;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 20px;
    box-shadow: var(--shadow-card);
}

.stat-card h3 {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 8px;
}

.stat-card .value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
    font-family: "JetBrains Mono", monospace;
}

/* ─── Modals ────────────────────────────────────────────────── */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--surface);
    border: 1px solid var(--border-md);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 30px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

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

.modal-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
}

.close-btn {
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text-2);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.close-btn:hover {
    background: var(--surface-3);
    color: var(--text);
    border-color: var(--border-md);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-2);
}

.form-group input, 
.form-group textarea {
    width: 100%;
    background: var(--surface-2);
    border: 1px solid var(--border-md);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    color: var(--text);
    font: inherit;
    outline: none;
    transition: all 0.2s;
}

.form-group input:focus, 
.form-group textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.form-group textarea {
    min-height: 120px;
    font-family: "JetBrains Mono", monospace;
    font-size: 13px;
    resize: vertical;
}

/* Modal Actions */
.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}
/* Segmented Control Component */
.segmented-control {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-md);
    gap: 4px;
}

.segmented-control label {
    flex: 1;
    text-align: center;
    padding: 10px 16px;
    cursor: pointer;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-3);
    transition: all 0.2s;
    user-select: none;
    border: 1px solid transparent;
}

.segmented-control input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.segmented-control label:hover {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-2);
}

.segmented-control input:checked + label {
    background: var(--accent);
    color: white;
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 12px var(--accent-soft);
}

.segmented-control input:focus-visible + label {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Success/Error badge styles in tables/cards */
.status-pill.online { background: var(--success-soft); color: var(--success); }
.status-pill.offline { background: var(--danger-soft); color: var(--danger); }
.status-pill.busy { background: var(--warning-soft); color: var(--warning); }

/* ─── Pagination ───────────────────────────────────────────── */
.pagination-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 24px;
    padding: 0 4px;
    flex-wrap: wrap;
}

.pagination-info {
    font-size: 13px;
    color: var(--text-2);
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pagination-limit {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-right: 16px;
}

.pagination-limit label {
    font-size: 13px;
    color: var(--text-3);
    white-space: nowrap;
}

.pagination-limit select {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    padding: 4px 8px;
    font-size: 13px;
    outline: none;
    cursor: pointer;
    transition: border-color 0.18s;
}

.pagination-limit select:hover {
    border-color: var(--border-accent);
}

.pagination-btns {
    display: flex;
    align-items: center;
    gap: 6px;
}

.page-num {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-2);
    cursor: pointer;
    transition: background 0.18s, color 0.18s;
}

.page-num:hover:not(.active) {
    background: var(--surface-2);
    color: var(--text);
}

.page-num.active {
    background: var(--accent);
    color: #fff;
}

.pagination-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text-2);
    cursor: pointer;
    transition: background 0.18s, color 0.18s, opacity 0.18s;
}

.pagination-btn:hover:not(:disabled) {
    background: var(--surface-3);
    color: var(--text);
}

.pagination-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.pagination-sep {
    color: var(--text-3);
    padding: 0 4px;
}