/* =============================================================================
   Mendipsys Accommodation Planner — Sign In
   =============================================================================
   Deliberately self-contained and deliberately NOT using this app's --cal-*
   variables. The sign-in page is shared visual territory: it must look identical
   to every other MendipSys app (staff, complaints, campsite, Report-It ...), so
   the values below are copied from the shared design system used by those apps.

   The calendar itself keeps its own navy (#1a3a5c) look — only this page uses
   the MendipSys brand blue (#005e85).

   If the shared design system changes, update these values to match.
   ============================================================================= */

:root {
    --brand:      #005e85;
    --brand-dark: #004669;
    --brand-light:#e8f4fd;
    --danger:     #842029;
    --danger-bg:  #f8d7da;
    --text:       #1a1a2e;
    --text-muted: #6b7280;
    --border:     #dde1e7;
    --radius:     10px;
    --radius-sm:  6px;
    --shadow-md:  0 4px 16px rgba(0, 0, 0, .12);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: var(--text);
    min-height: 100vh;
}

/* ── Page ─────────────────────────────────────────────────────── */
.login-page { background: var(--brand); }

.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.login-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 2rem 1.5rem;
    width: 100%;
    max-width: 420px;
}

/* ── Branding ─────────────────────────────────────────────────── */
.login-logo { text-align: center; margin-bottom: 1.25rem; }
.login-logo img { max-height: 60px; }

.login-logo-text {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--brand);
    letter-spacing: .02em;
}

.login-title {
    font-size: 1.4rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: .25rem;
}

.login-sub {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    font-size: .8rem;
}

/* ── Alerts ───────────────────────────────────────────────────── */
.alert {
    padding: .85rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    font-size: .9rem;
    font-weight: 500;
}
.alert-error { background: var(--danger-bg);   color: var(--danger); border-left: 4px solid var(--danger); }
.alert-info  { background: var(--brand-light); color: var(--brand);  border-left: 4px solid var(--brand); }

/* ── Form ─────────────────────────────────────────────────────── */
.form-group { margin-bottom: 1.1rem; }

.form-label {
    display: block;
    font-weight: 600;
    font-size: .9rem;
    margin-bottom: .4rem;
    color: var(--text);
}

.form-control {
    display: block;
    width: 100%;
    padding: .7rem .9rem;
    font-size: 1rem;   /* 16px minimum — stops iOS zooming the page on focus */
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--text);
    transition: border-color .15s, box-shadow .15s;
    -webkit-appearance: none;
    appearance: none;
}

.form-control:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(0, 94, 133, .15);
}

/* Password show/hide */
.input-group { position: relative; display: flex; }
.input-group .form-control { padding-right: 3rem; }

.input-toggle-pw {
    position: absolute;
    right: .6rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--text-muted);
    padding: .25rem;
}

/* ── Buttons ──────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    padding: .7rem 1.4rem;
    border-radius: var(--radius-sm);
    font-size: .95rem;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid transparent;
    transition: background .15s, transform .1s, opacity .15s;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--brand);
    color: #fff;
    border-color: var(--brand);
}
.btn-primary:hover {
    background: var(--brand-dark);
    border-color: var(--brand-dark);
}

.btn-block { width: 100%; }
