/* Central login frontend styles (ar-auth). Original minimal Arkansas.gov-style
   skin; per-affiliate text comes from affiliate_info, not from here. */
:root {
    --ar-blue: #14467a;
    --ar-blue-dark: #0f3358;
    --ar-bg: #eef1f4;
    --ar-border: #cbd2da;
    --ar-error: #b3261e;
    --ar-text: #1d2733;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--ar-bg);
    color: var(--ar-text);
    line-height: 1.5;
}

.sso-card {
    max-width: 28rem;
    margin: 3rem auto;
    background: #fff;
    border: 1px solid var(--ar-border);
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    padding: 2rem 2.25rem 1.5rem;
}

.sso-header h1 {
    margin: 0 0 1.25rem;
    font-size: 1.4rem;
    color: var(--ar-blue);
    border-bottom: 3px solid var(--ar-blue);
    padding-bottom: 0.6rem;
}

.sso-welcome { margin-bottom: 1rem; }

.sso-errors {
    list-style: none;
    margin: 0 0 1rem;
    padding: 0.75rem 1rem;
    background: #fdeceb;
    border: 1px solid var(--ar-error);
    border-radius: 4px;
    color: var(--ar-error);
}
.sso-errors li + li { margin-top: 0.35rem; }

.sso-form { display: flex; flex-direction: column; }
.sso-form label { font-weight: 600; margin: 0.75rem 0 0.25rem; }
.sso-form input {
    padding: 0.6rem 0.7rem;
    border: 1px solid var(--ar-border);
    border-radius: 4px;
    font-size: 1rem;
}
.sso-form button {
    margin-top: 1.25rem;
    padding: 0.7rem 1rem;
    background: var(--ar-blue);
    color: #fff;
    border: 0;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}
.sso-form button:hover { background: var(--ar-blue-dark); }

.sso-identifier { margin: 0 0 0.5rem; }

.sso-links { margin-top: 1.25rem; display: flex; flex-direction: column; gap: 0.4rem; }
.sso-links a { color: var(--ar-blue); text-decoration: none; }
.sso-links a:hover { text-decoration: underline; }

.sso-services { list-style: none; padding: 0; margin: 0.5rem 0 1rem; }
.sso-services li { padding: 0.5rem 0; border-bottom: 1px solid var(--ar-border); }
.sso-services a { color: var(--ar-blue); text-decoration: none; font-weight: 600; }
.sso-services a:hover { text-decoration: underline; }
/* The subscribed-service action is a CSRF-protected POST form (it consumes
   the session login to mint a handshake), not a GET link; style its button
   to match the link it replaced. */
.sso-services form { display: inline; margin: 0; }
.sso-services button.sso-link-button {
    font: inherit;
    color: var(--ar-blue);
    background: none;
    border: none;
    padding: 0;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}
.sso-services button.sso-link-button:hover { text-decoration: underline; }

.sso-footer {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--ar-border);
    font-size: 0.8rem;
    color: #5a6675;
    text-align: center;
}

/* --- Group administration ------------------------------------------------- */
/* The login card is 28rem, which is right for a credential form and too narrow
   for a member table. Admin pages opt into a wider card via .sso-card-wide. */
.sso-card-wide { max-width: 72rem; }
/* Dates and status badges read as one unit; wrapping "Nov / 5, / 2026" is noise. */
.sso-table .sso-nowrap { white-space: nowrap; }

.sso-notice {
    margin: 0 0 1rem;
    padding: 0.75rem 1rem;
    border: 1px solid #b7d7b9;
    border-left: 4px solid #2e7d32;
    background: #f2f9f2;
    color: #1b4d20;
}

.sso-table { width: 100%; border-collapse: collapse; margin: 0.5rem 0 1.25rem; }
.sso-table th, .sso-table td {
    text-align: left;
    padding: 0.5rem 0.6rem;
    border-bottom: 1px solid var(--ar-border);
    vertical-align: middle;
}
.sso-table th { font-size: 0.8rem; text-transform: uppercase; color: #5a6675; }
.sso-table a { color: var(--ar-blue); text-decoration: none; font-weight: 600; }
.sso-table a:hover { text-decoration: underline; }

/* Row actions are single-button forms; keep them inline rather than stacking
   like .sso-form, whose flex-column layout would stretch each button. */
.sso-table form { display: inline; }
.sso-table button {
    font: inherit;
    font-size: 0.85rem;
    padding: 0.3rem 0.7rem;
    color: var(--ar-blue);
    background: #fff;
    border: 1px solid var(--ar-border);
    border-radius: 4px;
    cursor: pointer;
}
.sso-table button:hover { border-color: var(--ar-blue); }

/* Admin pages lay their nav out horizontally; the login flows keep the stacked
   default, so this is scoped to the wide card rather than overriding globally. */
.sso-card-wide .sso-links { flex-direction: row; gap: 1rem; }

/* Admin: inline action rows and one-time secrets */
.sso-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin: 0.5rem 0; }
.sso-actions form { display: inline; }
.sso-actions button {
    font: inherit; font-size: 0.9rem; padding: 0.45rem 0.9rem;
    color: var(--ar-blue); background: #fff;
    border: 1px solid var(--ar-border); border-radius: 4px; cursor: pointer;
}
.sso-actions button:hover { border-color: var(--ar-blue); }

.sso-hint { font-size: 0.85rem; color: #5a6675; margin: 0.25rem 0 1rem; }

/* A one-time reset link must be selectable and must not silently truncate. */
.sso-reset-link {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.85rem;
    word-break: break-all;
    background: #fff;
    border: 1px solid var(--ar-border);
    border-radius: 4px;
    padding: 0.5rem 0.6rem;
    margin: 0.5rem 0 0;
}

.sso-form select {
    font: inherit; padding: 0.5rem; margin-bottom: 0.25rem;
    border: 1px solid var(--ar-border); border-radius: 4px; background: #fff;
}

/* --- Admin navigation and home ------------------------------------------- */
.sso-adminnav {
    display: flex;
    gap: 1rem;
    align-items: baseline;
    flex-wrap: wrap;
    margin: 0 0 1.25rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--ar-border);
    font-size: 0.9rem;
}
.sso-adminnav a { color: var(--ar-blue); text-decoration: none; }
.sso-adminnav a:hover { text-decoration: underline; }
/* The current page is rendered as text, not a link to itself. */
.sso-adminnav-current { font-weight: 600; color: #222; }
/* Log out sits apart from the surface links. */
.sso-adminnav-out { margin-left: auto; }

.sso-cards { list-style: none; padding: 0; margin: 0.5rem 0 1.5rem; }
.sso-cards li {
    border: 1px solid var(--ar-border);
    border-radius: 6px;
    padding: 0.9rem 1rem;
    margin-bottom: 0.75rem;
}
.sso-cards li > a { color: var(--ar-blue); text-decoration: none; font-weight: 600; font-size: 1.05rem; }
.sso-cards li > a:hover { text-decoration: underline; }
.sso-cards li > p { margin: 0.35rem 0 0; font-size: 0.9rem; color: #5a6675; }

/* Account-state flags on the user admin page */
.sso-flag {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.1rem 0.45rem;
    border-radius: 3px;
    background: #f1f3f5;
    color: #5a6675;
    border: 1px solid var(--ar-border);
}
.sso-warn {
    margin: 0.5rem 0 1rem;
    padding: 0.6rem 0.8rem;
    border: 1px solid #f0d58c;
    border-left: 4px solid #d19b00;
    background: #fffaef;
    color: #6b4e00;
    font-size: 0.9rem;
}
