/*
 * /res-legacy/css/res.css
 *
 * Resident-first styling for the res-legacy subdomain. Big text,
 * big tap targets, high contrast; mobile-first with a comfortable
 * desktop fallback. Everything is intentionally simple so a 90yo
 * on an iPad can navigate without squinting.
 */

:root {
    --res-brand:        #1b3a5c;
    --res-brand-dark:   #0f243d;
    --res-accent:       #2b7a3b;
    --res-help:         #b02a2a;
    --res-help-dark:    #7a1922;
    --res-bg:           #f6f7f9;
    --res-card:         #ffffff;
    --res-text:         #1b1d20;
    --res-muted:        #5c6470;
    --res-border:       #d4d8de;
    --res-focus:        #0066cc;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--res-bg);
    color: var(--res-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 18px;
    line-height: 1.5;
}

a { color: var(--res-brand); }
a:focus, button:focus, input:focus {
    outline: 3px solid var(--res-focus);
    outline-offset: 2px;
}

/* -----------------------------------------------------------------
   Header
   ----------------------------------------------------------------- */
.res-header {
    background: var(--res-brand);
    color: #fff;
    padding: 14px 20px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.res-header-row {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.res-brand {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.2px;
    flex: 1;
    min-width: 180px;
}
.res-brand a { color: #fff; text-decoration: none; }

.res-help-btn {
    display: inline-block;
    background: var(--res-help);
    color: #fff;
    padding: 12px 20px;
    border: 2px solid #fff;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
    min-height: 48px;
    cursor: pointer;
}
.res-help-btn:hover { background: var(--res-help-dark); color: #fff; }

.res-signout {
    color: #e3e8f0;
    font-size: 15px;
    text-decoration: none;
}
.res-signout:hover { color: #fff; text-decoration: underline; }

/* -----------------------------------------------------------------
   Main container
   ----------------------------------------------------------------- */
.res-main {
    max-width: 960px;
    margin: 0 auto;
    padding: 24px 20px 60px;
}

.res-welcome {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 20px;
    color: var(--res-brand-dark);
}

/* -----------------------------------------------------------------
   Dashboard cards
   ----------------------------------------------------------------- */
.res-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 20px;
}
.res-card {
    background: var(--res-card);
    border: 1px solid var(--res-border);
    border-radius: 12px;
    padding: 20px;
    text-decoration: none;
    color: var(--res-text);
    display: flex;
    flex-direction: column;
    min-height: 120px;
    transition: box-shadow 0.15s, transform 0.15s;
}
.res-card:hover, .res-card:focus {
    box-shadow: 0 6px 18px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}
.res-card-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--res-brand);
    margin: 0 0 6px;
}
.res-card-sub {
    font-size: 15px;
    color: var(--res-muted);
    margin: 0;
}
.res-card.coming-soon {
    opacity: 0.55;
    pointer-events: none;
}
.res-card.coming-soon .res-card-sub {
    font-style: italic;
}

/* -----------------------------------------------------------------
   Login page
   ----------------------------------------------------------------- */
.res-login-wrap {
    max-width: 440px;
    margin: 60px auto;
    padding: 32px 28px;
    background: var(--res-card);
    border: 2px solid var(--res-brand);
    border-radius: 14px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.08);
}
.res-login-title {
    text-align: center;
    color: var(--res-brand);
    font-size: 26px;
    margin: 0 0 8px;
}
.res-login-sub {
    text-align: center;
    color: var(--res-muted);
    margin-bottom: 24px;
    font-size: 16px;
}
.res-login-msg {
    padding: 12px 14px;
    border-radius: 8px;
    margin: 10px 0;
    font-size: 17px;
}
.res-login-msg.err { background: #fde2e2; border: 2px solid var(--res-help); color: var(--res-help-dark); }
.res-login-msg.ok  { background: #d6f1dc; border: 2px solid var(--res-accent); }

.res-login-wrap label {
    display: block;
    font-weight: 600;
    margin: 14px 0 6px;
    font-size: 17px;
}
.res-login-wrap input[type="text"],
.res-login-wrap input[type="password"] {
    width: 100%;
    font-size: 22px;
    padding: 14px 14px;
    min-height: 56px;
    border: 3px solid var(--res-brand-dark);
    border-radius: 10px;
}
.res-login-wrap .res-remember {
    margin: 16px 0 0;
    font-size: 16px;
    font-weight: 500;
}
.res-login-wrap .res-remember input {
    width: 22px;
    height: 22px;
    vertical-align: middle;
    margin-right: 6px;
}
.res-signin-btn {
    width: 100%;
    margin-top: 20px;
    background: var(--res-accent);
    color: #fff;
    border: 1px solid #1f5c2b;
    font-size: 22px;
    font-weight: 700;
    padding: 16px;
    min-height: 60px;
    border-radius: 10px;
    cursor: pointer;
}
.res-signin-btn:hover { background: #1f5c2b; }

/* -----------------------------------------------------------------
   Footer
   ----------------------------------------------------------------- */
.res-footer {
    text-align: center;
    color: var(--res-muted);
    font-size: 13px;
    padding: 20px;
    border-top: 1px solid var(--res-border);
    background: var(--res-card);
    margin-top: 40px;
}

/* -----------------------------------------------------------------
   Narrow screens
   ----------------------------------------------------------------- */
@media (max-width: 480px) {
    body { font-size: 17px; }
    .res-welcome { font-size: 21px; }
    .res-card-title { font-size: 18px; }
    .res-help-btn { padding: 10px 16px; font-size: 16px; }
}
