:root {
    --fc-navy: #0b1f3a;
    --fc-navy-2: #102848;
    --fc-ink: #0f2744;
    --fc-muted: #7a8798;
    --fc-orange: #e67a2e;
    --fc-orange-deep: #d56a22;
    --fc-input: #eef5fb;
    --fc-line: #d5e2ef;
    --fc-card: #ffffff;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
    font-family: "Segoe UI", Metropolis, system-ui, sans-serif;
    color: var(--fc-ink);
}

.fc-auth-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 28px 16px;
    background: linear-gradient(160deg, #08182e 0%, var(--fc-navy) 45%, #14345a 100%);
}

.fc-auth-card {
    width: min(440px, 100%);
    background: var(--fc-card);
    border-radius: 28px;
    padding: 34px 32px 28px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .28);
}

.fc-brand-login {
    margin: 0 0 18px;
}
.fc-brand-login strong {
    display: block;
    font-size: 18px;
    letter-spacing: -.01em;
    color: var(--fc-ink);
}
.fc-brand-login span {
    display: block;
    margin-top: 2px;
    font-size: 13px;
    font-weight: 700;
    color: var(--fc-orange);
    letter-spacing: .02em;
}

.fc-kicker {
    margin: 0 0 10px;
    color: var(--fc-orange);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .12em;
}

.fc-auth-card h1 {
    margin: 0;
    font-size: 34px;
    line-height: 1.15;
    letter-spacing: -.02em;
    color: var(--fc-ink);
}

.fc-auth-sub {
    margin: 8px 0 22px;
    color: var(--fc-muted);
    font-size: 14px;
}

.fc-form { display: grid; gap: 16px; }
.fc-field label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--fc-ink);
}
.fc-field input {
    width: 100%;
    border: 1px solid var(--fc-line);
    background: var(--fc-input);
    border-radius: 12px;
    padding: 14px 14px;
    font: inherit;
    font-size: 15px;
    color: var(--fc-ink);
}
.fc-field input:focus {
    outline: 2px solid rgba(230, 122, 46, .25);
    border-color: #f0b27a;
    background: #fff;
}

.fc-btn {
    border: none;
    border-radius: 12px;
    padding: 14px 16px;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.fc-btn--orange {
    background: linear-gradient(180deg, var(--fc-orange), var(--fc-orange-deep));
    color: #fff;
    box-shadow: 0 10px 22px rgba(214, 106, 34, .28);
}
.fc-btn--block { width: 100%; }
.fc-btn--ghost {
    background: #fff;
    border: 1px solid var(--fc-line);
    color: var(--fc-ink);
}

.fc-alert {
    border-radius: 12px;
    padding: 10px 12px;
    margin-bottom: 14px;
    font-size: 13px;
}
.fc-alert--error {
    background: #fdeceb;
    color: #9b2c2c;
    border: 1px solid #f5c2c0;
}
.fc-alert--ok {
    background: #e8f8f0;
    color: #146c43;
    border: 1px solid #b7ebd0;
}
.fc-alert ul { margin: 0; padding-left: 16px; }

.fc-demo {
    margin-top: 18px;
    border: 1.5px dashed #c5d2e0;
    background: #f4f7fb;
    border-radius: 14px;
    padding: 14px 16px;
}
.fc-demo-label {
    margin: 0 0 10px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    color: #6b7a8c;
}
.fc-demo-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    font-size: 13px;
    color: var(--fc-ink);
}
.fc-demo-row strong { font-weight: 800; }

.fc-foot {
    margin: 14px 0 0;
    text-align: center;
    color: #9aa6b5;
    font-size: 12px;
}

.fc-shell { min-height: 100vh; background: #eef2f7; }
.fc-topbar {
    background: #fff;
    border-bottom: 1px solid #e3ebf3;
    padding: 14px 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}
.fc-brand strong { display: block; font-size: 15px; }
.fc-brand span { display: block; font-size: 12px; color: var(--fc-muted); margin-top: 2px; }
.fc-content {
    width: min(960px, calc(100% - 40px));
    margin: 0 auto;
    padding: 28px 0 40px;
}
.fc-home-card {
    background: #fff;
    border-radius: 20px;
    border: 1px solid #e3ebf3;
    padding: 28px;
    box-shadow: 0 10px 24px rgba(20, 40, 70, .06);
}
.fc-home-card h1 { margin: 0 0 8px; font-size: 28px; }
.fc-home-card p { margin: 0; color: var(--fc-muted); }

/* ---------- Desktop workdesk ---------- */
.fc-app-body { margin: 0; background: #eef2f7; }
.fc-desk {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 240px 1fr;
}
.fc-sidebar {
    background: linear-gradient(180deg, #0b1f3a, #0a1830);
    color: #d7e4f3;
    padding: 18px 14px;
    display: flex;
    flex-direction: column;
}
.fc-side-brand {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 6px 8px 20px;
}
.fc-side-mark {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--fc-orange);
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 800;
    flex-shrink: 0;
}
.fc-side-brand strong { display: block; color: #fff; font-size: 13px; line-height: 1.25; }
.fc-side-brand span { display: block; font-size: 12px; opacity: .75; margin-top: 2px; }

.fc-side-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}
.fc-side-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #d7e4f3;
    text-decoration: none;
    padding: 12px 12px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 14px;
}
.fc-side-nav a span { width: 18px; text-align: center; opacity: .9; }
.fc-side-nav a:hover,
.fc-side-nav a.is-active {
    background: rgba(255,255,255,.12);
    color: #fff;
}
.fc-side-foot { margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.1); }

.fc-desk-main { min-width: 0; display: flex; flex-direction: column; }
.fc-desk-top {
    background: var(--fc-navy);
    color: #fff;
    padding: 16px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}
.fc-desk-top small {
    display: block;
    font-size: 13px;
    color: rgba(255,255,255,.7);
}
.fc-desk-top strong {
    display: block;
    margin-top: 2px;
    font-size: 20px;
    letter-spacing: -.01em;
}
.fc-gps {
    border: 1px solid rgba(255,255,255,.18);
    background: rgba(255,255,255,.08);
    color: #fff;
    border-radius: 999px;
    padding: 10px 16px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.fc-desk-content {
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
    padding: 24px 0 40px;
}

.fc-summary {
    background: linear-gradient(135deg, #e67a2e 0%, #c85a1a 100%);
    color: #fff;
    border-radius: 22px;
    padding: 22px 26px;
    box-shadow: 0 16px 32px rgba(200, 90, 26, .25);
    margin-bottom: 18px;
}
.fc-summary-label {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    opacity: .95;
    margin-bottom: 14px;
}
.fc-summary-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}
.fc-summary-metrics span {
    display: block;
    font-size: 13px;
    opacity: .9;
}
.fc-summary-metrics strong {
    display: block;
    margin-top: 6px;
    font-size: 32px;
    letter-spacing: -.02em;
}
.fc-progress {
    height: 8px;
    border-radius: 999px;
    background: rgba(255,255,255,.25);
    overflow: hidden;
}
.fc-progress-bar {
    height: 100%;
    background: #4ade80;
    border-radius: 999px;
}

.fc-tabs {
    display: inline-flex;
    gap: 8px;
    background: #e6ebf1;
    border-radius: 14px;
    padding: 6px;
    margin-bottom: 16px;
}
.fc-tabs a {
    text-decoration: none;
    color: #5b6b7c;
    font-weight: 800;
    font-size: 14px;
    padding: 10px 18px;
    border-radius: 10px;
}
.fc-tabs a.is-active {
    background: #fff;
    color: #c85a1a;
    box-shadow: 0 4px 12px rgba(20, 40, 70, .08);
}

.fc-search {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 1px solid #e3ebf3;
    border-radius: 14px;
    padding: 12px 14px;
    margin-bottom: 14px;
    box-shadow: 0 8px 18px rgba(20, 40, 70, .04);
}
.fc-search span { color: #8a97a8; font-size: 16px; }
.fc-search input {
    border: none;
    outline: none;
    width: 100%;
    font: inherit;
    font-size: 15px;
    background: transparent;
}

.fc-panel {
    background: #fff;
    border: 1px solid #e3ebf3;
    border-radius: 18px;
    box-shadow: 0 10px 24px rgba(20, 40, 70, .05);
    padding: 18px 20px;
}
.fc-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 12px;
}
.fc-panel-head h2 { margin: 0; font-size: 18px; }
.fc-meta { color: var(--fc-muted); font-size: 13px; }
.fc-muted { color: var(--fc-muted); }

.fc-table {
    width: 100%;
    border-collapse: collapse;
}
.fc-table th,
.fc-table td {
    padding: 14px 10px;
    border-bottom: 1px solid #edf2f7;
    text-align: left;
    vertical-align: middle;
    font-size: 14px;
}
.fc-table th {
    color: var(--fc-muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.fc-table tr:last-child td { border-bottom: none; }
.fc-table .is-right { text-align: right; }
.fc-table td strong { display: block; }
.fc-table td small { display: block; color: var(--fc-muted); margin-top: 2px; font-size: 12px; }
.fc-empty-cell { color: var(--fc-muted); text-align: center !important; padding: 28px 10px !important; }

.fc-seq {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #ffe8d6;
    color: #c85a1a;
    display: inline-grid;
    place-items: center;
    font-weight: 800;
}
.fc-status {
    display: inline-flex;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 800;
}
.fc-status.is-current { background: #e8f8f0; color: #146c43; }
.fc-status.is-overdue { background: #fdeceb; color: #9b2c2c; }
.fc-row-go {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #f4f7fb;
    color: #8a97a8;
    text-decoration: none;
    font-size: 22px;
    font-weight: 700;
}

.fc-dayclose {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}
.fc-day-stat {
    background: #f7fafc;
    border-radius: 14px;
    padding: 16px;
}
.fc-day-stat span { display: block; color: var(--fc-muted); font-size: 12px; font-weight: 700; }
.fc-day-stat strong { display: block; margin-top: 8px; font-size: 24px; }
.fc-sync-box p { margin: 0 0 10px; }
.fc-sync-box .fc-btn { margin-top: 8px; }

/* ---------- Collect panel ---------- */
.fc-collect-desk {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(260px, .7fr);
    gap: 16px;
    align-items: start;
}
.fc-back-link {
    display: inline-flex;
    margin-bottom: 12px;
    color: var(--fc-ink);
    font-weight: 800;
    text-decoration: none;
    font-size: 14px;
}
.fc-member-card {
    background: #fff;
    border: 1px solid #e3ebf3;
    border-radius: 18px;
    padding: 16px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    box-shadow: 0 8px 18px rgba(20, 40, 70, .04);
}
.fc-member-card-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}
.fc-member-card strong { display: block; font-size: 18px; }
.fc-member-card small { display: block; color: var(--fc-muted); margin-top: 2px; }
.fc-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--fc-orange);
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 800;
    flex-shrink: 0;
}
.fc-avatar--lg { width: 52px; height: 52px; font-size: 16px; }

.fc-due-card {
    background: #fff4e8;
    border-radius: 18px;
    padding: 18px 20px;
    margin-bottom: 16px;
}
.fc-due-label {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .06em;
    color: var(--fc-ink);
}
.fc-due-amount {
    margin: 8px 0;
    font-size: 40px;
    font-weight: 800;
    color: var(--fc-orange);
    letter-spacing: -.02em;
}
.fc-due-break {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    color: var(--fc-ink);
    font-size: 13px;
    font-weight: 700;
}

.fc-collect-form {
    background: #fff;
    border: 1px solid #e3ebf3;
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 10px 24px rgba(20, 40, 70, .05);
    display: grid;
    gap: 14px;
}
.fc-collect-form .fc-field label {
    display: block;
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 8px;
}
.fc-collect-form input[type="number"],
.fc-collect-form textarea {
    width: 100%;
    border: 1px solid #d7e0ea;
    border-radius: 12px;
    padding: 12px 14px;
    font: inherit;
    background: #fbfcfe;
}
.fc-mode-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}
.fc-mode-opt { cursor: pointer; }
.fc-mode-opt input { position: absolute; opacity: 0; pointer-events: none; }
.fc-mode-opt span {
    display: grid;
    place-items: center;
    border: 1px solid #d7e0ea;
    background: #fff;
    color: var(--fc-ink);
    border-radius: 12px;
    padding: 12px 10px;
    font-weight: 800;
}
.fc-mode-opt input:checked + span {
    background: var(--fc-orange);
    border-color: var(--fc-orange);
    color: #fff;
}

.fc-attach-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}
.fc-attach {
    border: 1px solid #d7e0ea;
    background: #fff;
    border-radius: 14px;
    padding: 16px 10px;
    font: inherit;
    font-weight: 800;
    color: var(--fc-ink);
    cursor: pointer;
    display: grid;
    gap: 8px;
    justify-items: center;
}
.fc-attach.is-on {
    border-color: var(--fc-orange);
    background: #fff4e8;
    color: #c85a1a;
}
.fc-offline-note {
    margin: 4px 0 0;
    text-align: center;
    color: #0f766e;
    font-size: 12px;
    font-weight: 700;
}

.fc-pick-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.fc-pick-card {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    border: 1px solid #e3ebf3;
    border-radius: 14px;
    padding: 14px;
    background: #fff;
}
.fc-pick-card:hover { border-color: #f0b27a; }
.fc-pick-card strong { display: block; }
.fc-pick-card small { display: block; color: var(--fc-muted); margin-top: 2px; font-size: 12px; }
.fc-pick-amt { margin-left: auto; text-align: right; }
.fc-pick-amt span { display: block; color: var(--fc-muted); font-size: 12px; margin-top: 2px; }

.fc-mini-list { list-style: none; margin: 0; padding: 0; }
.fc-mini-list li { border-bottom: 1px solid #edf2f7; }
.fc-mini-list li:last-child { border-bottom: none; }
.fc-mini-list a {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 0;
    text-decoration: none;
    color: inherit;
}
.fc-mini-list strong { font-size: 14px; }
.fc-mini-list small { color: var(--fc-muted); font-weight: 700; }

/* ---------- Day close ---------- */
.fc-dayclose-desk {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(260px, .75fr);
    gap: 16px;
    align-items: start;
}
.fc-dayclose-panel { padding: 22px 24px 24px; }
.fc-dayclose-title {
    margin: 0 0 8px;
    font-size: 22px;
    color: var(--fc-ink);
}
.fc-dayclose-list {
    margin: 0 0 20px;
    padding: 0;
}
.fc-dayclose-list > div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid #edf2f7;
}
.fc-dayclose-list > div:last-child { border-bottom: none; }
.fc-dayclose-list dt {
    margin: 0;
    color: var(--fc-ink);
    font-size: 15px;
    font-weight: 600;
}
.fc-dayclose-list dd {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    color: var(--fc-ink);
}
.fc-btn:disabled {
    opacity: .75;
    cursor: default;
}

@media (max-width: 980px) {
    .fc-desk { grid-template-columns: 1fr; }
    .fc-sidebar { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; }
    .fc-side-nav { flex-direction: row; flex-wrap: wrap; flex: 1; }
    .fc-side-foot { margin: 0; padding: 0; border: none; }
    .fc-summary-metrics strong { font-size: 26px; }
    .fc-dayclose { grid-template-columns: 1fr; }
    .fc-member-table-wrap { overflow-x: auto; }
    .fc-collect-desk { grid-template-columns: 1fr; }
    .fc-pick-grid { grid-template-columns: 1fr; }
    .fc-dayclose-desk { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .fc-auth-card { padding: 28px 20px 22px; border-radius: 22px; }
    .fc-auth-card h1 { font-size: 28px; }
    .fc-demo-row { grid-template-columns: 1fr; gap: 6px; }
    .fc-desk-content { width: calc(100% - 28px); }
    .fc-summary-metrics { grid-template-columns: 1fr; }
}
