/*
 * /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-signout {
    color: #e3e8f0;
    font-size: 15px;
    text-decoration: none;
}
.res-signout:hover { color: #fff; text-decoration: underline; }

/* -----------------------------------------------------------------
   Nav bar (sticks right under the header). Horizontal strip on
   desktop; collapses to a hamburger menu on narrow screens so the
   residents can get back to Dashboard / Services / etc. from any
   page.
   ----------------------------------------------------------------- */
.res-nav {
    background: var(--res-brand-dark);
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.res-nav ul {
    list-style: none;
    margin: 0 auto;
    padding: 0;
    max-width: 960px;
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
}
.res-nav li { margin: 0; }
.res-nav a {
    display: block;
    color: #e3e8f0;
    text-decoration: none;
    font-size: 17px;
    font-weight: 600;
    padding: 14px 18px;
    min-height: 48px;
    line-height: 20px;
    border-bottom: 3px solid transparent;
}
.res-nav a:hover,
.res-nav a:focus {
    color: #ffffff;
    background: rgba(255,255,255,0.08);
}
.res-nav a.res-nav-current {
    color: #ffffff;
    border-bottom-color: #ffcc33;
}

/* Hamburger toggle lives in the header; shown only on narrow screens. */
.res-nav-toggle {
    display: none;
    background: transparent;
    color: #ffffff;
    border: 2px solid #ffffff;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    padding: 8px 14px;
    cursor: pointer;
    min-height: 42px;
}
.res-nav-toggle:hover { background: rgba(255,255,255,0.1); }

@media (max-width: 720px) {
    .res-nav-toggle { display: inline-block; }
    .res-nav { display: none; }
    .res-nav.res-nav-open { display: block; }
    .res-nav ul { flex-direction: column; }
    .res-nav a {
        font-size: 18px;
        padding: 16px 20px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    .res-nav a.res-nav-current {
        background: rgba(255,204,51,0.15);
        border-bottom-color: rgba(255,255,255,0.1);
    }
}

/* -----------------------------------------------------------------
   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;
}

/* -----------------------------------------------------------------
   Service-request template buttons (Wellzesta-style common-request
   list on service_new.php). One big button per row, label on the
   left, call-to-action on the right.
   ----------------------------------------------------------------- */
.res-template-btn {
    display: block;
    width: 100%;
    background: #ffffff;
    border: 2px solid var(--res-border);
    border-radius: 10px;
    padding: 18px 22px;
    font-family: inherit;
    font-size: 22px;
    font-weight: 700;
    color: var(--res-text);
    cursor: pointer;
    text-align: left;
    min-height: 64px;
    transition: border-color 0.15s, background 0.15s;
}
.res-template-btn:hover,
.res-template-btn:focus {
    border-color: var(--res-brand);
    background: #f3f6fa;
}
.res-template-btn-other {
    color: var(--res-muted);
    font-style: italic;
}

/* -----------------------------------------------------------------
   Form helpers for multi-field pages (transportation_new.php and the
   per-service forms that follow). Field sets group related inputs
   with a labeled border; .res-row/.res-col lays two fields side by
   side on wide screens and stacks them on phones.
   ----------------------------------------------------------------- */
.res-fs {
    border: 2px solid var(--res-border);
    border-radius: 10px;
    padding: 18px 22px 22px;
    margin: 22px 0 0;
    background: #ffffff;
}
.res-leg {
    font-weight: 700;
    font-size: 23px;
    color: var(--res-brand-dark);
    padding: 0 10px;
}
/* Default label inside a fieldset (standalone "Appointment date", etc.) */
.res-fs > label,
.res-fs .res-col > label,
.res-fs > div > label {
    display: block;
    font-weight: 600;
    margin: 16px 0 8px;
    font-size: 21px;
}
.res-fs input[type="text"],
.res-fs input[type="tel"],
.res-fs input[type="date"],
.res-fs input[type="time"],
.res-fs input[type="datetime-local"],
.res-fs input[type="email"],
.res-fs input[type="number"],
.res-fs select,
.res-fs textarea {
    width: 100%;
    font-size: 24px;
    padding: 16px 18px;
    min-height: 66px;
    border: 2px solid #0f243d;
    border-radius: 10px;
    box-sizing: border-box;
    font-family: inherit;
    background: #ffffff;
}
.res-fs select { padding-right: 44px; }
.res-fs textarea { min-height: 110px; line-height: 1.4; resize: vertical; }

.res-row {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}
.res-col {
    flex: 1 1 280px;
    min-width: 0;
}

.res-static {
    padding: 16px 18px;
    min-height: 66px;
    background: #f3f6fa;
    border: 2px solid #d4d8de;
    border-radius: 10px;
    font-size: 24px;
    color: var(--res-brand-dark);
    font-weight: 600;
    display: flex;
    align-items: center;
}

/* Inline radio / checkbox labels. The !important flags defeat the
   .res-fs > label default above so these stay at their own size. */
.res-fs .res-inline-radio,
.res-fs .res-inline-checkbox,
.res-inline-radio,
.res-inline-checkbox {
    display: inline-flex !important;
    align-items: center;
    margin: 10px 26px 10px 0 !important;
    font-weight: 500 !important;
    font-size: 21px !important;
}
.res-fs .res-inline-checkbox,
.res-inline-checkbox { display: flex !important; margin: 12px 0 !important; }
.res-inline-radio input,
.res-inline-checkbox input {
    width: 28px;
    height: 28px;
    margin-right: 12px;
    flex-shrink: 0;
}

/* -----------------------------------------------------------------
   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;
}
/* Show / hide password toggle. The input keeps its own border and
   padding (from .res-login-wrap and inline styles on change_password);
   the wrapper just reserves a right-pad on the input for the toggle
   and absolute-positions the eye button inside that reserved space.
   !important flags defeat the inline padding on change_password.php. */
.res-pw-wrap {
    position: relative !important;
    display: block !important;
    width: 100%;
}
.res-pw-wrap input {
    padding-right: 60px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}
.res-pw-toggle {
    position: absolute !important;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    z-index: 2;
    background: transparent;
    border: none;
    padding: 6px;
    margin: 0;
    cursor: pointer;
    color: var(--res-brand-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    border-radius: 6px;
}
.res-pw-toggle:hover,
.res-pw-toggle:focus {
    background: rgba(27, 58, 92, 0.08);
    outline: none;
}
.res-pw-toggle svg { display: block; }

.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; }
}
