* { box-sizing: border-box; }
html, body {
    margin: 0; padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #07172e;
    color: #e8eef7;
    font-size: 14px;
}
a { color: var(--accent); }
header {
    position: sticky; top: 0; z-index: 10;
    background: #0a1f3d;
    border-bottom: 1px solid #1f3a66;
    padding: 12px 20px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 16px;
}
header .brand { display: flex; align-items: center; gap: 12px; justify-self: start; }
header .brand a { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
header .brand a:hover { opacity: 0.85; }
header .brand img { height: 32px; width: auto; display: block; }
header h1 { margin: 0; font-size: 16px; font-weight: 600; letter-spacing: 0.3px; }
header nav { display: flex; align-items: center; justify-self: end; }
header nav a {
    margin-left: 12px;
    text-decoration: none;
    color: #8fa5c4;
    padding: 6px 12px;
    border-radius: 6px;
}
header nav a.active { background: #1f3a66; color: #fff; }

.clock-zone { justify-self: center; text-align: center; line-height: 1.2; }
.clock-time {
    font-family: ui-monospace, Menlo, monospace;
    font-size: 20px; font-weight: 600; color: #fff;
    letter-spacing: 0.5px;
}
.clock-offset {
    font-size: 11px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.5px;
    margin-top: 2px;
}
.clock-offset.early   { color: #2ecc71; }
.clock-offset.late    { color: #e67e22; }
.clock-offset.ontime  { color: #6781a3; }
.clock-offset.unknown { color: #4a6890; }
.meta { font-size: 12px; color: #6781a3; }
main { padding: 20px; max-width: 1600px; margin: 0 auto; }

/* ---- Status badges ---- */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}
.badge.pending  { background: #16294a; color: #8fa5c4; }
.badge.briefing { background: #3d2e0e; color: #f5b041; }
.badge.ready    { background: #0e3d22; color: #2ecc71; animation: pulse 1.2s infinite; }
.badge.live     { background: #0e2a55; color: var(--accent); }
.badge.done     { background: #0d1d36; color: #4a6890; }

@keyframes pulse {
    0%,100% { box-shadow: 0 0 0 0 rgba(46,204,113,0.6); }
    50%     { box-shadow: 0 0 0 8px rgba(46,204,113,0); }
}

/* ---- Checklist cards ---- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 14px; }
.card {
    background: #0c2244;
    border: 1px solid #1f3a66;
    border-radius: 10px;
    padding: 14px;
    transition: border-color 0.2s;
}
.card.ready { border-color: #2ecc71; }
.card.live, .card.done { opacity: 0.55; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; gap: 8px; }
.card-num { font-size: 22px; font-weight: 700; color: var(--accent); min-width: 36px; }
.card-title { font-size: 13px; font-weight: 600; line-height: 1.3; }
.card-meta { font-size: 11px; color: #6781a3; margin: 4px 0 10px; }
.card-meta span { margin-right: 10px; }
.card-link {
    display: inline-block; font-size: 11px; margin-bottom: 10px;
    color: var(--accent); text-decoration: none;
    word-break: break-all;
}
.checks { display: grid; gap: 6px; }
.checks label {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 10px; background: #07172e; border-radius: 6px;
    cursor: pointer; user-select: none; font-size: 13px;
}
.checks label:hover { background: #102a4f; }
.checks input { width: 18px; height: 18px; cursor: pointer; accent-color: #2ecc71; }
.checks label.checked { color: #2ecc71; }
.card-actions { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; }
button {
    background: #1f3a66; color: #e8eef7; border: none;
    padding: 7px 12px; border-radius: 6px; font-size: 12px;
    cursor: pointer; font-weight: 600;
}
button:hover { background: #2b4d82; }
button.primary { background: #2ecc71; color: #07172e; }
button.primary:hover { background: #27ae60; }
button.warn { background: #e67e22; color: #fff; }
button.warn:hover { background: #d35400; }
button.ghost { background: transparent; color: #6781a3; }
button.ghost:hover { color: #e8eef7; }

/* ---- Dashboard table ---- */
table { width: 100%; border-collapse: collapse; }
th, td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #1f3a66;
    font-size: 13px;
    vertical-align: middle;
}
th { background: #0a1f3d; font-size: 11px; text-transform: uppercase; color: #8fa5c4; font-weight: 600; }
tr.break td {
    background: #0d1d36;
    text-align: center;
    font-weight: 700;
    color: #6781a3;
    letter-spacing: 2px;
}
tr.status-ready td { background: rgba(46,204,113,0.10); }
tr.status-live  td { background: rgba(var(--accent-rgb), 0.10); }
tr.status-done  { opacity: 0.45; }
.proj-title { font-weight: 600; max-width: 420px; }
.proj-meta { font-size: 11px; color: #6781a3; margin-top: 2px; }
.teams-btn {
    display: inline-block; padding: 4px 10px;
    background: var(--accent); color: #07172e;
    border-radius: 4px; text-decoration: none; font-size: 11px;
    font-weight: 600;
}
.teams-btn:hover { background: var(--accent); filter: brightness(1.1); }
.order-cell { font-size: 18px; font-weight: 700; color: var(--accent); text-align: center; width: 50px; }
.time-cell { font-family: ui-monospace, Menlo, monospace; white-space: nowrap; }
.time-cell .connect { color: #f5b041; font-weight: 600; }
.dash-actions { display: flex; gap: 6px; }

.filter-bar { margin-bottom: 14px; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.filter-bar label { font-size: 12px; color: #8fa5c4; cursor: pointer; }
.filter-bar #syncInfo { margin-left: auto; }

.view-toggle { display: inline-flex; background: #0a1f3d; border: 1px solid #1f3a66; border-radius: 8px; padding: 2px; }
.view-toggle button {
    background: transparent; color: #8fa5c4;
    padding: 6px 12px; font-size: 12px;
    border-radius: 6px;
}
.view-toggle button.active { background: #1f3a66; color: #fff; }
.view-toggle button:hover { color: #fff; }

/* Checklist table view */
/* ---- Checklist table (scoped .cl-*) ---- */
.cl-scroll { overflow-x: auto; width: 100%; }
.cl-table {
    table-layout: fixed;
    width: 100%;
    min-width: 1120px;
    border-collapse: collapse;
}
.cl-table col.cl-col-num     { width: 44px; }
.cl-table col.cl-col-time    { width: 105px; }
.cl-table col.cl-col-project { /* flexible: absorbs remaining */ }
.cl-table col.cl-col-mode    { width: 108px; }
.cl-table col.cl-col-link    { width: 82px; }
.cl-table col.cl-col-check   { width: 58px; }
.cl-table col.cl-col-status  { width: 105px; }
.cl-table col.cl-col-actions { width: 82px; }

.cl-table th, .cl-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #1f3a66;
    font-size: 13px;
    vertical-align: middle;
    text-align: left;
    overflow: hidden;
}
.cl-table th {
    background: #0a1f3d;
    font-size: 11px;
    text-transform: uppercase;
    color: #8fa5c4;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.cl-table .cl-num {
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    color: var(--accent);
}
.cl-table .cl-time {
    font-family: ui-monospace, Menlo, monospace;
    line-height: 1.35;
    white-space: nowrap;
}
.cl-table .cl-time .connect-time { font-size: 12px; color: #f5b041; font-weight: 600; }
.cl-table .cl-time .range { font-size: 11px; color: #6781a3; }

.cl-table .cl-project .proj-title {
    font-weight: 600;
    line-height: 1.3;
    overflow-wrap: break-word;
    word-break: normal;
}
.cl-table .cl-project .proj-meta {
    font-size: 11px;
    color: #6781a3;
    margin-top: 2px;
}

.cl-table .cl-mode .presence-select { width: 100%; }
.cl-table .cl-link { text-align: center; }

.cl-table .cl-check { text-align: center; padding: 10px 4px; }
.cl-table .cl-check input[type=checkbox] {
    width: 20px; height: 20px;
    cursor: pointer;
    accent-color: #2ecc71;
    vertical-align: middle;
}
.cl-table .cl-na { color: #2b4d82; font-weight: 600; }

.cl-table .cl-status { text-align: center; }
.cl-table .cl-actions {
    text-align: right;
    white-space: nowrap;
}
.cl-table .cl-actions button {
    display: inline-block;
    margin-left: 3px;
    vertical-align: middle;
}

.cl-table tr.status-ready td { background: rgba(46,204,113,0.10); }
.cl-table tr.status-live td  { background: rgba(var(--accent-rgb), 0.10); }
.cl-table tr.status-done     { opacity: 0.45; }

.cl-table tr.cl-break td {
    background: #0d1d36;
    text-align: center;
    font-weight: 700;
    color: #6781a3;
    letter-spacing: 2px;
    padding: 12px;
    text-transform: uppercase;
    font-size: 11px;
}

.btn-xs { padding: 4px 8px; font-size: 12px; }

/* ---- Nav gear icon ---- */
.nav-icon { padding: 6px 10px !important; font-size: 15px; }
.nav-icon:hover { color: #fff !important; }

/* ---- Toast notifications ---- */
.toast-container {
    position: fixed;
    top: 80px; right: 20px;
    z-index: 1000;
    display: flex; flex-direction: column; gap: 10px;
}
.toast {
    background: #0c2244;
    border: 1px solid #2b4d82;
    border-left: 4px solid var(--accent);
    border-radius: 8px;
    padding: 12px 16px;
    min-width: 280px;
    max-width: 400px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.4);
    animation: toast-in 0.3s ease-out;
}
.toast.info    { border-left-color: var(--accent); }
.toast.success { border-left-color: #2ecc71; }
.toast.warn    { border-left-color: #f5b041; }
.toast.error   { border-left-color: #e74c3c; }
.toast-title { font-weight: 700; color: #fff; font-size: 13px; margin-bottom: 2px; }
.toast-body  { color: #8fa5c4; font-size: 12px; }
@keyframes toast-in {
    from { transform: translateX(110%); opacity: 0; }
    to   { transform: translateX(0);    opacity: 1; }
}
.toast.fade-out { animation: toast-out 0.3s ease-in forwards; }
@keyframes toast-out {
    to { transform: translateX(110%); opacity: 0; }
}

/* ---- Admin page ---- */
.admin-main { max-width: 900px; }
.admin-card {
    background: #0c2244;
    border: 1px solid #1f3a66;
    border-radius: 12px;
    padding: 24px 28px;
    margin-bottom: 20px;
}
.admin-card.danger { border-color: #5a2a1a; }
.admin-card h2 {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    display: flex; align-items: center; gap: 10px;
}
.admin-card h2 i { color: var(--accent); }
.admin-card.danger h2 i { color: #e67e22; }
.admin-hint {
    margin: 0 0 20px;
    font-size: 12px;
    color: #8fa5c4;
    line-height: 1.5;
}
.admin-hint code {
    background: #07172e;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 11px;
    color: var(--accent);
}

.setting-row {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 14px 0;
    border-top: 1px solid #1f3a66;
}
.setting-row:first-of-type { border-top: none; padding-top: 4px; }
.setting-text { flex: 1; }
.setting-text strong { display: block; color: #fff; font-size: 13px; margin-bottom: 3px; }
.setting-text span { display: block; color: #8fa5c4; font-size: 12px; line-height: 1.5; }

/* Toggle switch */
.switch {
    position: relative;
    display: inline-block;
    width: 48px; height: 26px;
    flex-shrink: 0;
    margin-top: 2px;
}
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
    position: absolute; inset: 0;
    background: #1f3a66;
    border-radius: 26px;
    cursor: pointer;
    transition: 0.25s;
}
.switch .slider::before {
    content: '';
    position: absolute;
    height: 20px; width: 20px;
    left: 3px; top: 3px;
    background: #8fa5c4;
    border-radius: 50%;
    transition: 0.25s;
}
.switch input:checked + .slider { background: #2ecc71; }
.switch input:checked + .slider::before { transform: translateX(22px); background: #fff; }

.admin-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.admin-buttons a, .admin-buttons button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #1f3a66;
    color: #e8eef7;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}
.admin-buttons a:hover, .admin-buttons button:hover { background: #2b4d82; }
.admin-buttons a.primary, .admin-buttons button.primary {
    background: #1f3a66;
}

.import-box {
    background: #07172e;
    border: 1px dashed #1f3a66;
    border-radius: 8px;
    padding: 16px;
}
.import-box strong { display: block; color: #fff; font-size: 13px; margin-bottom: 10px; }
.import-row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.import-row input[type=file] {
    flex: 1;
    min-width: 200px;
    background: #0c2244;
    color: #e8eef7;
    border: 1px solid #1f3a66;
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 12px;
}
.import-row input[type=file]::file-selector-button {
    background: #1f3a66;
    color: #e8eef7;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    margin-right: 10px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
}
.admin-warn {
    font-size: 12px;
    color: #f5b041;
    line-height: 1.5;
    display: flex;
    gap: 8px;
    align-items: flex-start;
}
.admin-warn i { margin-top: 2px; }

/* Break separator (cards view) */
.break-sep {
    grid-column: 1 / -1;
    text-align: center;
    padding: 14px;
    color: #6781a3;
    font-weight: 700;
    letter-spacing: 3px;
    background: #0d1d36;
    border: 1px dashed #1f3a66;
    border-radius: 8px;
    margin: 6px 0;
}

/* Connect time block (used in checklist + dashboard) */
.time-block { font-family: ui-monospace, Menlo, monospace; line-height: 1.3; }
.time-block .primary-time { font-size: 15px; font-weight: 700; color: #fff; }
.time-block .connect-time { font-size: 12px; color: #f5b041; font-weight: 600; }
.time-block .connect-time.small { font-size: 11px; opacity: 0.8; }
.time-block .range { font-size: 11px; color: #6781a3; }

.presence-select {
    background: #07172e;
    color: #e8eef7;
    border: 1px solid #1f3a66;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
}
.presence-select:hover { border-color: var(--accent); }
.presence-select.remote { color: var(--accent); }
.presence-select.onsite { color: #2ecc71; }
.presence-select.hybrid { color: #f5b041; }

/* ---- Landing page with background ---- */
body.landing-body {
    background: #000 url('bg.jpg') center center / cover no-repeat fixed;
    min-height: 100vh;
}
body.landing-body::before {
    content: '';
    position: fixed; inset: 0;
    background: radial-gradient(ellipse at center, rgba(0,0,0,0) 0%, rgba(0,0,0,0.55) 100%);
    pointer-events: none;
}
.landing {
    position: relative;
    max-width: 560px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 40px 20px;
    text-align: center;
}
.landing .logo {
    width: 140px; height: auto;
    margin-bottom: 24px;
    filter: drop-shadow(0 4px 24px rgba(var(--accent-rgb), 0.4));
}
.landing h1 {
    font-size: 28px;
    font-weight: 300;
    letter-spacing: 4px;
    margin: 0 0 8px;
    text-transform: uppercase;
}
.landing .subtitle {
    font-size: 13px;
    color: #8fa5c4;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 40px;
}
.landing .choices { display: grid; gap: 14px; width: 100%; }
.landing .choices a {
    display: block; padding: 22px;
    background: rgba(10, 31, 61, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(var(--accent-rgb), 0.25);
    border-radius: 10px;
    text-decoration: none;
    color: #e8eef7;
    transition: all 0.2s;
}
.landing .choices a:hover {
    border-color: var(--accent);
    background: rgba(15, 45, 90, 0.85);
    transform: translateY(-2px);
}
.landing .choices a strong {
    display: block;
    font-size: 16px;
    margin-bottom: 4px;
    letter-spacing: 0.5px;
}
.landing .choices a span {
    font-size: 12px;
    color: #8fa5c4;
}


.event-login-form {
    width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 12px;
}
.event-login-form input[type=text] {
    background: rgba(10, 31, 61, 0.75);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(var(--accent-rgb), 0.4);
    border-radius: 10px;
    padding: 14px 18px;
    color: #fff;
    font-size: 18px;
    text-align: center;
    letter-spacing: 4px;
    font-family: ui-monospace, Menlo, monospace;
    text-transform: uppercase;
}
.event-login-form input[type=text]:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
.event-login-form button { padding: 14px; font-size: 14px; border-radius: 10px; }
.login-error {
    color: #e74c3c;
    font-size: 12px;
    text-align: center;
    margin-top: 4px;
}

/* ---- Shared header (Awards CMS) ---- */
header .brand-text { display: flex; flex-direction: column; line-height: 1.2; }
header .brand-text h1 { margin: 0; font-size: 14px; font-weight: 600; letter-spacing: 0.3px; color: #fff; }
header .brand-text .brand-sub {
    font-size: 10px; text-transform: uppercase; letter-spacing: 1.5px;
    color: #8fa5c4; margin-top: 2px;
}
