@import url('https://fonts.googleapis.com/css2?family=Lexend:wght@400;500;600&display=swap');

:root {
    --bg: #f4f7fb;
    --bg-alt: #eaf2f8;
    --ink: #1e2a32;
    --muted: rgba(30, 42, 50, 0.62);
    --accent: #2bb3a4;
    --accent-strong: #1f8f83;
    --accent-soft: #e2f6f3;
    --warning: #f1c05a;
    --panel: #ffffff;
    --panel-border: #e2e9f1;
    --shadow: rgba(22, 38, 51, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Lexend', 'Segoe UI', sans-serif;
    color: var(--ink);
    background-color: var(--bg);
    background-image: linear-gradient(180deg, #f7fafc 0%, #eef4f9 50%, #f4f7fb 100%);
    min-height: 100vh;
}

.page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 34px 18px 72px;
    position: relative;
    z-index: 0;
}

.page::before,
.page::after {
    display: none;
}

.hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    background: var(--panel);
    border: 1px solid var(--panel-border);
    border-radius: 18px;
    padding: 20px 22px;
    box-shadow: 0 10px 24px var(--shadow);
}

.hero-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.hero-mark {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: var(--accent);
    box-shadow: 0 6px 16px rgba(31, 143, 131, 0.25);
}

.hero-mark svg {
    width: 34px;
    height: 34px;
}

.hero-eyebrow {
    margin: 0 0 6px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(30, 42, 50, 0.55);
}

.hero-text h1 {
    font-family: 'Lexend', 'Segoe UI', sans-serif;
    font-size: 28px;
    margin: 0 0 6px;
}

.hero-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.subtitle {
    margin: 0;
    font-size: 14px;
    color: var(--muted);
    max-width: 420px;
}

.hero-status {
    display: grid;
    justify-items: end;
    gap: 6px;
}

.report-button {
    font-size: 11px;
    font-weight: 600;
    color: var(--accent-strong);
    text-decoration: none;
    border: 1px solid rgba(31, 143, 131, 0.25);
    background: var(--accent-soft);
    padding: 4px 10px;
    border-radius: 999px;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.report-button:hover {
    background: rgba(43, 179, 164, 0.2);
    border-color: rgba(31, 143, 131, 0.4);
}

.status-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(26, 42, 51, 0.55);
}

.status-badge {
    padding: 6px 14px;
    border-radius: 999px;
    font-weight: 600;
    background: var(--accent-soft);
    color: var(--accent-strong);
    font-size: 12px;
    border: 1px solid rgba(31, 143, 131, 0.25);
}

.status-badge.running {
    background: rgba(43, 179, 164, 0.18);
    color: #156a62;
}

.status-badge.blocked,
.status-badge.failed {
    background: rgba(242, 196, 165, 0.5);
    color: #7a3b1b;
    border-color: rgba(242, 196, 165, 0.65);
}

.status-badge.complete {
    background: rgba(43, 179, 164, 0.2);
    color: #11625b;
    border-color: rgba(43, 179, 164, 0.3);
}

.panel {
    background: var(--panel);
    border: 1px solid var(--panel-border);
    border-radius: 16px;
    padding: 18px 20px;
    box-shadow: 0 8px 20px var(--shadow);
}

.overall-panel {
    margin-top: 24px;
}

.info-panel {
    margin-top: 18px;
}

.content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: 22px;
    margin-top: 24px;
}

.content-main,
.content-side {
    display: grid;
    gap: 22px;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.panel-header > div {
    display: grid;
    gap: 4px;
}

.panel-header h2 {
    font-family: 'Lexend', 'Segoe UI', sans-serif;
    font-size: 18px;
    margin: 0;
}

.panel-subtitle {
    margin: 0;
    font-size: 12px;
    color: var(--muted);
}

.hint {
    font-size: 12px;
    color: rgba(30, 42, 50, 0.6);
}

.percent-pill {
    background: var(--accent-soft);
    color: var(--accent-strong);
    padding: 6px 12px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 11px;
    border: 1px solid rgba(31, 143, 131, 0.2);
}

.lag-banner {
    margin: 6px 0 10px;
    padding: 9px 12px;
    border-radius: 12px;
    background: rgba(241, 192, 90, 0.2);
    color: #6a4a00;
    border: 1px solid rgba(241, 192, 90, 0.4);
    font-size: 11px;
    font-weight: 600;
}

.sparkline {
    width: 100%;
    height: 28px;
    display: block;
    margin-top: 10px;
}

.bar {
    width: 100%;
    height: 20px;
    background: #eef3f7;
    border-radius: 999px;
    border: 1px solid rgba(30, 42, 50, 0.12);
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(30, 42, 50, 0.08);
}

.bar--big {
    height: 34px;
}

.bar-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--accent-strong), #67cfc4 70%);
    border-radius: inherit;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: 12px;
    transition: width 0.6s ease;
    box-shadow: 0 4px 10px rgba(31, 143, 131, 0.2);
    position: relative;
}

.bar-text {
    font-weight: 600;
    color: #1e2a3f;
    text-shadow: none;
    font-size: 12px;
    white-space: nowrap;
}

.tables-shell {
    display: grid;
    gap: 12px;
}

.tables-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
}

.tables-actions {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--muted);
}

.toggle input {
    accent-color: var(--accent);
    width: 14px;
    height: 14px;
}

.toggle-label {
    font-weight: 500;
}

.tables-header h2 {
    font-family: 'Lexend', 'Segoe UI', sans-serif;
    font-size: 18px;
    margin: 0 0 4px;
}

.tables {
    display: grid;
    gap: 12px;
}

.tables.carousel {
    position: relative;
    overflow: hidden;
    padding: 8px 0;
}

.tables.carousel::before,
.tables.carousel::after {
    display: none;
}

.completed-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 11px;
    background: var(--accent-soft);
    color: var(--accent-strong);
    border: 1px solid rgba(31, 143, 131, 0.2);
}

.section-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 11px 14px;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid rgba(30, 42, 50, 0.08);
    box-shadow: 0 6px 14px rgba(30, 42, 50, 0.08);
    position: relative;
    overflow: hidden;
}

.section-row.carousel-item.pos--2,
.section-row.carousel-item.pos--2p {
    padding: 8px 10px 10px;
}

.section-row.carousel-item.pos--1,
.section-row.carousel-item.pos--1p {
    padding: 9px 12px 12px;
}

.section-row.carousel-item {
    opacity: 0.6;
    transform: translateY(0);
    transition: transform 0.35s ease, opacity 0.35s ease, box-shadow 0.35s ease, filter 0.35s ease;
    filter: blur(0);
}

.section-row.carousel-item.carousel-active {
    opacity: 1;
    transform: translateY(0);
    box-shadow: 0 10px 20px rgba(30, 42, 50, 0.12);
    border-color: rgba(31, 143, 131, 0.25);
}

.section-row.carousel-item.pos--2 {
    opacity: 0.35;
    transform: translateY(-28px) scale(0.9);
    filter: blur(0.7px);
}

.section-row.carousel-item.pos--1 {
    opacity: 0.6;
    transform: translateY(-14px) scale(0.95);
    filter: blur(0.4px);
}

.section-row.carousel-item.pos--0 {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
}

.section-row.carousel-item.pos--1p {
    opacity: 0.6;
    transform: translateY(14px) scale(0.95);
    filter: blur(0.4px);
}

.section-row.carousel-item.pos--2p {
    opacity: 0.35;
    transform: translateY(28px) scale(0.9);
    filter: blur(0.7px);
}

.section-row.row-enter {
    opacity: 0;
    transform: translateY(10px);
}

.section-row.row-enter.row-enter-active {
    opacity: 1;
    transform: translateY(0);
    transition: transform 0.35s ease, opacity 0.35s ease;
}

.section-row.row-exit {
    opacity: 1;
    transform: translateY(0);
}

.section-row.row-exit.row-exit-active {
    opacity: 0;
    transform: translateY(-14px);
    transition: transform 0.4s ease, opacity 0.4s ease;
}

.section-label {
    font-weight: 600;
    font-size: 15px;
    position: relative;
    z-index: 1;
}

.section-message {
    font-size: 12px;
    color: rgba(30, 42, 50, 0.7);
    position: relative;
    z-index: 1;
}

.feed {
    overflow-y: auto;
    background: #f7fafc;
    border-radius: 14px;
    padding: 8px;
    display: grid;
    gap: 8px;
    border: 1px solid rgba(30, 42, 50, 0.08);
}

.feed-item {
    background: #ffffff;
    border-radius: 12px;
    padding: 8px 10px;
    box-shadow: 0 4px 12px rgba(30, 42, 50, 0.08);
    font-size: 12px;
    border-left: 3px solid rgba(31, 143, 131, 0.6);
}

.feed-time {
    font-size: 10px;
    color: rgba(26, 42, 51, 0.5);
    margin-bottom: 4px;
}

.followup-list {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.updates-panel {
    padding: 16px 18px;
}

.updates-panel .panel-header {
    margin-bottom: 8px;
}

.updates-panel .feed {
    background: transparent;
    border: none;
    padding: 0;
    gap: 8px;
}

.updates-panel .feed-item {
    box-shadow: none;
    border: 1px solid rgba(30, 42, 50, 0.08);
    border-left: 3px solid rgba(31, 143, 131, 0.6);
}

.followup-card {
    padding: 12px 14px;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid rgba(30, 42, 50, 0.1);
    display: grid;
    gap: 6px;
}

.followup-card.waiting {
    background: rgba(255, 255, 255, 0.88);
}

.followup-card.running {
    background: rgba(43, 179, 164, 0.08);
    border-color: rgba(31, 143, 131, 0.25);
}

.followup-card.complete {
    background: rgba(43, 179, 164, 0.12);
    border-color: rgba(31, 143, 131, 0.35);
}

.followup-card.na {
    background: #f3f6fa;
    border-color: rgba(30, 42, 50, 0.12);
}

.followup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.followup-title {
    font-weight: 700;
    font-size: 14px;
}

.followup-status {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(30, 42, 50, 0.08);
}

.followup-card.running .followup-status {
    background: rgba(43, 179, 164, 0.18);
    color: #156a62;
}

.followup-card.complete .followup-status {
    background: rgba(43, 179, 164, 0.25);
    color: #0b5a4f;
}

.followup-card.na .followup-status {
    background: rgba(30, 42, 50, 0.08);
    color: rgba(30, 42, 50, 0.6);
}

.followup-meta {
    font-size: 12px;
    color: rgba(26, 42, 51, 0.7);
}

.info-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.info-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 10px 12px;
    border: 1px solid rgba(30, 42, 50, 0.08);
    box-shadow: 0 4px 10px rgba(30, 42, 50, 0.06);
    display: grid;
    gap: 4px;
}

.info-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(30, 42, 50, 0.55);
}

.info-value {
    font-weight: 700;
    font-size: 14px;
}

.info-note {
    margin: 14px 0 0;
    font-size: 12px;
    color: var(--muted);
}

.followup-panel {
    margin-top: 18px;
}

.error {
    margin-top: 18px;
    background: #ffe8e3;
    color: #6b2b1a;
    padding: 12px 14px;
    border-radius: 14px;
    font-weight: 600;
    border: 1px solid #f4c6b7;
}

.hidden {
    display: none;
}

.site-footer {
    margin-top: 28px;
    padding-top: 16px;
    border-top: 1px solid var(--panel-border);
    color: var(--muted);
    font-size: 12px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.footer-item {
    display: grid;
    gap: 4px;
}

.footer-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(30, 42, 50, 0.55);
}

.footer-value {
    font-weight: 600;
    color: var(--ink);
}

.footer-copy {
    margin-top: 12px;
    font-size: 11px;
    color: rgba(30, 42, 50, 0.55);
}

.admin-body {
    background-attachment: fixed;
}

.admin-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 34px 18px 72px;
}

.admin-hero {
    margin-bottom: 24px;
}

.admin-login-panel {
    max-width: 520px;
}

.admin-login-form {
    display: grid;
    gap: 12px;
}

.admin-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
}

.admin-input {
    border-radius: 12px;
    border: 1px solid var(--panel-border);
    padding: 10px 12px;
    font-size: 14px;
    font-family: inherit;
    background: #ffffff;
}

.admin-action {
    background: var(--accent-soft);
    border: 1px solid rgba(31, 143, 131, 0.25);
    border-radius: 999px;
    padding: 8px 14px;
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    font-family: inherit;
    color: var(--accent-strong);
}

.admin-action:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.admin-action.confirm {
    background: rgba(241, 192, 90, 0.25);
    border-color: rgba(241, 192, 90, 0.45);
    color: #6a4a00;
}

.admin-secondary {
    background: #f4f7fb;
    border-color: var(--panel-border);
    color: var(--ink);
}

.admin-controls-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-list {
    display: grid;
    gap: 16px;
}

.admin-run {
    border-radius: 16px;
    border: 1px solid var(--panel-border);
    background: #ffffff;
    padding: 16px;
    display: grid;
    gap: 14px;
    box-shadow: 0 8px 20px var(--shadow);
}

.admin-run-header {
    display: grid;
    gap: 4px;
}

.admin-run-title {
    font-weight: 600;
    font-size: 16px;
}

.admin-run-meta {
    font-size: 12px;
    color: var(--muted);
}

.admin-run-link {
    display: grid;
    gap: 6px;
}

.admin-run-link-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(30, 42, 50, 0.55);
}

.admin-run-link-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.admin-run-link-input {
    flex: 1 1 280px;
    min-width: 220px;
    border-radius: 10px;
    border: 1px solid var(--panel-border);
    padding: 8px 10px;
    font-size: 12px;
    font-family: inherit;
    color: var(--ink);
    background: #ffffff;
}

.admin-run-link-input:focus {
    outline: 2px solid rgba(43, 179, 164, 0.25);
    outline-offset: 2px;
}

.admin-steps {
    display: grid;
    gap: 12px;
}

.admin-step {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(30, 42, 50, 0.08);
    background: #ffffff;
}

.admin-step-info {
    display: grid;
    gap: 4px;
}

.admin-step-title {
    font-weight: 600;
    font-size: 14px;
}

.admin-step-status {
    font-size: 12px;
    color: var(--muted);
}

.admin-step-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.admin-complete {
    display: flex;
    justify-content: flex-end;
}

.admin-complete-button {
    background: rgba(241, 192, 90, 0.2);
    border-color: rgba(241, 192, 90, 0.45);
    color: #6a4a00;
}

.admin-logout {
    margin: 0;
}

@keyframes stripes {
    from {
        background-position: 0 0;
    }
    to {
        background-position: 40px 40px;
    }
}

@keyframes sheen {
    0% {
        transform: translateX(-120%);
        opacity: 0;
    }
    40% {
        opacity: 0.7;
    }
    70% {
        opacity: 0;
    }
    100% {
        transform: translateX(320%);
        opacity: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .bar-fill,
    .bar-fill::after,
    .section-row,
    .section-row.row-enter,
    .section-row.row-enter-active,
    .section-row.row-exit,
    .section-row.row-exit-active,
    .section-row.carousel-item {
        animation: none;
        transition: none;
    }
}

@media (max-width: 900px) {
    .content-grid {
        grid-template-columns: 1fr;
    }

    .content-main,
    .content-side {
        gap: 18px;
    }

    .hero {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-status {
        justify-items: start;
    }

    .info-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .followup-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-step {
        grid-template-columns: 1fr;
    }

    .admin-step-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .page {
        padding: 28px 16px 56px;
    }

    .hero-left {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-text h1 {
        font-size: 24px;
    }

    .bar--big {
        height: 30px;
    }

    .panel {
        padding: 16px;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .followup-list {
        grid-template-columns: 1fr;
    }
}
