/* ============================================================
   Easy CMS — Auth pages shared stylesheet
   Used by: login.php, register.php, reset_password.php, update_email.php
   ============================================================ */

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

html, body {
    min-height: 100%;
    font-family: 'DM Sans', sans-serif;
    background: #f0f2f5;
    color: #2c3e50;
    font-size: 16px;
    line-height: 1.5;
}

.page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}

.card {
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 24px rgba(30, 37, 46, 0.12);
    overflow: hidden;
}

.card-header {
    background: #1e252e;
    padding: 28px 32px 24px;
    text-align: center;
}

.card-header img {
    height: 48px;
    width: auto;
    display: block;
    margin: 0 auto 14px;
    filter: invert(1) brightness(2);
}

.card-header h1 {
    color: #ffffff;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    opacity: 0.85;
}

.card-body {
    padding: 28px 32px 24px;
}

.card-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 20px;
}

.alert {
    padding: 11px 14px;
    border-radius: 7px;
    font-size: 0.9rem;
    line-height: 1.45;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 9px;
}

.alert i {
    flex-shrink: 0;
    margin-top: 2px;
}

.alert-error {
    background: #fff0f0;
    border: 1px solid #f5c6c6;
    color: #b94040;
}

.alert-success {
    background: #f0faf3;
    border: 1px solid #b7dfbf;
    color: #2d6a3f;
}

.alert-info {
    background: #fffbe6;
    border: 1px solid #f0d080;
    color: #7a5c00;
}

.field {
    margin-bottom: 18px;
}

.field-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: #5a6a7a;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 6px;
}

.field-hint {
    font-size: 0.8rem;
    color: #5a6a7a;
    margin-bottom: 6px;
}

.input-wrap {
    position: relative;
}

.input-wrap i.icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #5a6a7a;
    font-size: 0.9rem;
    pointer-events: none;
}

input[type="text"],
input[type="password"],
input[type="email"] {
    width: 100%;
    padding: 11px 12px 11px 36px;
    border: 1px solid #dde3ea;
    border-radius: 7px;
    font-size: 1rem;
    font-family: inherit;
    color: #2c3e50;
    background: #fafbfc;
    transition: border-color 0.2s, box-shadow 0.2s;
    -webkit-appearance: none;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus {
    outline: none;
    border-color: #2d89ef;
    box-shadow: 0 0 0 3px rgba(45, 137, 239, 0.12);
    background: #ffffff;
}

.pw-wrap input {
    padding-right: 42px;
}

.pw-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #5a6a7a;
    font-size: 0.95rem;
    padding: 4px;
    line-height: 1;
    width: auto;
    margin: 0;
}

.pw-toggle:hover {
    color: #2d89ef;
}

.btn-primary {
    width: 100%;
    padding: 12px;
    background: #2d89ef;
    color: #ffffff;
    border: none;
    border-radius: 7px;
    font-size: 1rem;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    margin-top: 4px;
}

.btn-primary:hover {
    background: #1b6fd3;
}

.btn-primary:active {
    transform: scale(0.99);
}

.btn-secondary {
    width: 100%;
    padding: 11px;
    background: #ffffff;
    color: #2c3e50;
    border: 1px solid #dde3ea;
    border-radius: 7px;
    font-size: 0.95rem;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-secondary:hover {
    background: #f0f2f5;
    border-color: #b0bec5;
}

.pwgen-launch {
    margin-top: 14px;
}

.card-footer {
    border-top: 1px solid #dde3ea;
    padding: 18px 32px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.card-footer a {
    font-size: 0.875rem;
    color: #2d89ef;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 7px;
}

.card-footer a:hover {
    text-decoration: underline;
    color: #1b6fd3;
}

.card-footer .divider {
    border: none;
    border-top: 1px solid #dde3ea;
    margin: 4px 0;
}

.tagline {
    margin-top: 20px;
    font-size: 0.8rem;
    color: #5a6a7a;
    text-align: center;
}

@media (max-width: 460px) {
    .card-header,
    .card-body,
    .card-footer {
        padding-left: 20px;
        padding-right: 20px;
    }
}

.card-tagline {
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 400;
    opacity: 0.75;
    margin-top: 6px;
    letter-spacing: 0.02em;
}

.card-copyright {
    font-size: 0.8rem;
    color: #5a6a7a;
    text-align: center;
    margin-top: 14px;
    white-space: nowrap;
}

.card-copyright a {
    color: #5a6a7a;
    text-decoration: none;
    font-size: 0.8rem;
}

.card-copyright a:hover {
    color: #2d89ef;
    text-decoration: underline;
}

/* ─── Fieldsets ──────────────────────────────────────────────── */

fieldset.field-group {
    border: 1px solid #dde3ea;
    border-radius: 8px;
    padding: 16px 16px 4px;
    margin-bottom: 20px;
}

legend.field-group-label {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #5a6a7a;
    padding: 0 6px;
}

.field-group-hint {
    font-size: 0.75rem;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: #9aabb8;
}

.card-subtitle {
    font-size: 0.875rem;
    color: #5a6a7a;
    margin-bottom: 20px;
    line-height: 1.5;
}
