/* POET — vanilla CSS. Mobile-first; workers will be on phones. */

:root {
    --poet-navy-900: #0a1628;
    --poet-navy-800: #142340;
    --poet-navy-700: #1d3158;
    --poet-navy-100: #d6dde8;
    --poet-white:    #ffffff;
    --poet-text:     #1a1a1a;
    --poet-text-muted: #6b7280;
    --poet-bg:       #f5f6f8;
    --status-green:  #16a34a;
    --status-yellow: #eab308;
    --status-red:    #dc2626;
    --color-focus:   #2563eb;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: var(--poet-text);
    background: var(--poet-bg);
    line-height: 1.5;
}

a { color: var(--poet-navy-700); }
a:focus, button:focus, input:focus { outline: 2px solid var(--color-focus); outline-offset: 2px; }

/* ---------- Login ---------- */

.login-shell {
    min-height: 100vh;
    background: var(--poet-navy-900);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.login-card {
    background: var(--poet-white);
    width: 100%;
    max-width: 420px;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.25);
}

.login-card h1 {
    margin: 0 0 .25rem;
    font-size: 1.75rem;
    color: var(--poet-navy-900);
    letter-spacing: 1px;
}

.login-card p.tagline {
    margin: 0 0 1.5rem;
    color: var(--poet-text-muted);
    font-size: .9rem;
}

.field { margin-bottom: 1rem; }
.field label {
    display: block;
    font-size: .85rem;
    font-weight: 600;
    margin-bottom: .25rem;
    color: var(--poet-navy-800);
}
.field input {
    width: 100%;
    padding: .65rem .75rem;
    border: 1px solid var(--poet-navy-100);
    border-radius: 4px;
    font-size: 1rem;
    background: var(--poet-white);
}

.btn-primary {
    width: 100%;
    background: var(--poet-navy-900);
    color: var(--poet-white);
    border: 0;
    padding: .75rem 1rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
}
.btn-primary:hover { background: var(--poet-navy-800); }

.flash-error {
    background: #fef2f2;
    border-left: 4px solid var(--status-red);
    color: #7f1d1d;
    padding: .75rem;
    margin-bottom: 1rem;
    font-size: .9rem;
    border-radius: 2px;
}

/* ---------- App shell ---------- */

.topbar {
    background: var(--poet-navy-900);
    color: var(--poet-white);
    padding: .75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .5rem;
}
.topbar .brand {
    font-weight: 700;
    letter-spacing: 2px;
    font-size: 1.1rem;
}
.topbar .who { font-size: .9rem; color: var(--poet-navy-100); }
.topbar a { color: var(--poet-white); text-decoration: underline; }

.main {
    padding: 1rem;
    max-width: 1100px;
    margin: 0 auto;
}

.card {
    background: var(--poet-white);
    border: 1px solid var(--poet-navy-100);
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1rem;
}
.card h2 {
    margin: 0 0 .5rem;
    font-size: 1rem;
    color: var(--poet-navy-800);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.card .placeholder {
    color: var(--poet-text-muted);
    font-size: .9rem;
}

.grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
}
@media (min-width: 720px) {
    .grid-2 { grid-template-columns: 1fr 1fr; }
    .grid-3 { grid-template-columns: 1fr 1fr 1fr; }
}

/* ---------- Status lights ---------- */

.status-dot {
    display: inline-block;
    width: .75rem;
    height: .75rem;
    border-radius: 50%;
    margin-right: .35rem;
    vertical-align: middle;
}
.status-dot.green  { background: var(--status-green); }
.status-dot.yellow { background: var(--status-yellow); }
.status-dot.red    { background: var(--status-red); }

.status-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: .85rem;
    color: var(--poet-text-muted);
}

/* ---------- Idle warning ---------- */

.idle-warning {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    background: var(--status-yellow);
    color: #422006;
    padding: .75rem 1rem;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,.2);
    font-size: .9rem;
    display: none;
}
.idle-warning.visible { display: block; }
