/* public/css/auth.css
 * Shared styling for the auth pages (register, login, admin login): a centered
 * sign-up/sign-in card, styled validation notifications, and the password
 * reveal/match affordances added by /js/auth-form.js. Var fallbacks keep it
 * working under both the main and admin base layouts. */

.auth { max-width: 30rem; margin: 1rem auto 2rem; }
.auth-card { padding: 2rem 2rem 1.75rem; }
.auth-head { text-align: center; margin-bottom: 1.25rem; }
.auth-head h1 { margin: 0 0 .35rem; font-size: 1.5rem; }
.auth-head p { margin: 0; color: var(--muted, #6b7280); }

.auth-form label { margin-top: 1rem; }
.auth-form .help-text { margin-top: .2rem; }
/* Two-up on wider screens; stacks on narrow. */
.auth-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
@media (max-width: 520px) { .auth-grid { grid-template-columns: 1fr; } }

.auth-submit { width: 100%; margin-top: 1.5rem; padding: .65rem 1rem; font-size: 1rem; }
.auth-alt { text-align: center; margin: 1.1rem 0 0; font-size: .9rem; color: var(--muted, #6b7280); }

/* Validation errors as the app's styled notification pattern, not raw text. */
.auth-form ul:not([role]),
.auth-form .form-errors { list-style: none; margin: .4rem 0 0; padding: .5rem .75rem; border-radius: 6px; background: #fee2e2; color: #991b1b; font-size: .85rem; }
.auth-form ul:not([role]) li { margin: 0; }

/* Password reveal toggle (added by auth-form.js). */
.pw-field { position: relative; }
.pw-field input { padding-right: 2.75rem; }
.pw-toggle {
    position: absolute; right: .35rem; top: .25rem; bottom: 0;
    display: flex; align-items: center; justify-content: center;
    width: 2.25rem; padding: 0; border: 0; background: none;
    color: var(--muted, #6b7280); cursor: pointer; border-radius: 4px;
}
.pw-toggle:hover { color: var(--text, #1a1a2e); }
.pw-toggle.is-on { color: var(--accent, #0b5fff); }

/* Live password-match feedback (added by auth-form.js). */
.pw-match { margin-top: .4rem; font-size: .85rem; font-weight: 600; }
.pw-match--ok { color: #065f46; }
.pw-match--bad { color: #991b1b; }

/* Icon-only table row actions (e.g. account/users edit & delete). */
.action-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.375rem;
    cursor: pointer;
    border: none;
    background: none;
    border-radius: 0.25rem;
    font-size: 1rem;
    transition: background-color 0.2s ease;
    text-decoration: none;
    color: inherit;
}

.action-icon:hover,
.action-icon:focus {
    background-color: rgba(0, 0, 0, 0.05);
    outline: none;
}

.action-icon--delete:hover,
.action-icon--delete:focus {
    background-color: rgba(220, 53, 69, 0.1);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Underline tabs for the account settings page (Business/Branding/Payment/Integration). */
.tabs-nav { display:flex; border-bottom:1px solid #e5e7eb; padding: 0 1.5rem; }
.tabs-nav button { flex:1; padding:.85rem .5rem; border:none; background:none; font:inherit; font-size:.9rem; font-weight:600; color:var(--muted,#6b7280); cursor:pointer; border-bottom:2px solid transparent; margin-bottom:-1px; }
.tabs-nav button.active { color:var(--accent,#0b5fff); border-bottom-color:var(--accent,#0b5fff); }
.tabs-nav button:hover:not(.active) { color:var(--text,#1a1a2e); }
[data-tabs] > [role="tabpanel"][hidden] { display:none; }
[data-tabs] > [role="tabpanel"] { padding-top: 1.5rem; }
