/**
 * Shared auth styles (registration + password recovery)
 * aligned with forum visual language.
 */

:root {
    --auth-bg-deep: #101820;
    --auth-bg-mid: #1a2b34;
    --auth-bg-soft: #2e3f37;
    --auth-paper: rgba(244, 234, 214, 0.96);
    --auth-paper-dim: rgba(239, 228, 205, 0.95);
    --auth-line: rgba(200, 184, 150, 0.7);
    --auth-ink: #22303a;
    --auth-ink-soft: #5c6f80;
    --auth-link: #2f4f67;
    --auth-link-hover: #3d6280;
    --auth-btn-top: #39576d;
    --auth-btn-bottom: #253c4c;
    --auth-btn-top-hover: #466882;
    --auth-btn-bottom-hover: #2a4558;
    --auth-danger: #7d2f2f;
    --auth-danger-bg: rgba(255, 241, 241, 0.88);
    --auth-success: #265f37;
    --auth-success-bg: rgba(240, 253, 242, 0.9);
    --auth-shadow-main: 0 16px 36px rgba(0, 0, 0, 0.33);
    --auth-shadow-soft: 0 8px 18px rgba(0, 0, 0, 0.18);
}

html,
body {
    margin: 0;
    padding: 0;
}

body.auth-modal-body {
    min-height: 100vh;
    font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
    color: var(--auth-ink);
    background:
        radial-gradient(circle at 20% 0%, rgba(52, 72, 62, 0.7) 0%, transparent 36%),
        radial-gradient(circle at 88% 14%, rgba(58, 47, 38, 0.62) 0%, transparent 40%),
        linear-gradient(140deg, var(--auth-bg-deep) 0%, var(--auth-bg-mid) 52%, var(--auth-bg-soft) 100%);
    background-attachment: fixed;
    padding: 10px;
    box-sizing: border-box;
}

.auth-shell {
    width: min(100%, 700px);
    margin: 0 auto;
}

.auth-shell.auth-shell-sm {
    width: min(100%, 420px);
}

.auth-card {
    border: 1px solid var(--auth-line);
    border-radius: 14px;
    background: linear-gradient(180deg, var(--auth-paper), var(--auth-paper-dim));
    box-shadow: var(--auth-shadow-main);
    padding: 12px;
    box-sizing: border-box;
}

.auth-card-title {
    margin: 0;
    font-family: "Copperplate", "Times New Roman", serif;
    font-size: 22px;
    line-height: 1.1;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    text-align: center;
    color: #25303a;
}

.auth-card-subtitle {
    margin: 6px 0 0;
    text-align: center;
    color: var(--auth-ink-soft);
    font-size: 13px;
    line-height: 1.3;
}

.auth-block {
    margin-top: 10px;
}

.auth-form-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid rgba(98, 80, 48, 0.22);
    border-radius: 10px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.62);
}

.auth-form-table td {
    padding: 9px 10px;
    border-bottom: 1px solid rgba(102, 82, 47, 0.12);
    vertical-align: middle;
}

.auth-form-table tr:last-child td {
    border-bottom: none;
}

.auth-label {
    width: 34%;
    color: #32495e;
    font-size: 13px;
    font-weight: 700;
    font-family: "Copperplate", "Times New Roman", serif;
    letter-spacing: 0.02em;
}

.auth-field {
    color: var(--auth-ink);
}

.auth-status {
    width: 30px;
    text-align: center;
}

.auth-modal-body a {
    color: var(--auth-link);
    text-decoration: none;
    transition: color 0.15s ease, text-shadow 0.15s ease;
}

.auth-modal-body a:hover,
.auth-modal-body a:focus-visible {
    color: var(--auth-link-hover);
    text-decoration: none;
    text-shadow: 0 0 8px rgba(98, 137, 168, 0.35);
}

.auth-input,
.auth-select,
.auth-modal-body input.login,
.auth-modal-body select.items,
.auth-modal-body input.items {
    width: 100%;
    box-sizing: border-box;
    min-height: 34px;
    padding: 6px 10px;
    border: 1px solid rgba(87, 72, 43, 0.34);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.84);
    color: #23303a;
    font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
    font-size: 13px;
}

.auth-modal-body select.auth-select {
    padding-right: 8px;
}

.auth-input:focus,
.auth-select:focus,
.auth-modal-body input.login:focus,
.auth-modal-body select.items:focus,
.auth-modal-body input.items:focus {
    outline: none;
    border-color: rgba(44, 79, 106, 0.74);
    box-shadow: 0 0 0 2px rgba(61, 98, 128, 0.18);
    background: rgba(255, 255, 255, 0.94);
}

.auth-select-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.auth-select-row .auth-select {
    width: auto;
    min-width: 70px;
}

.auth-captcha-wrap {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.auth-captcha-input {
    max-width: 120px;
}

#captcha_image {
    border: 1px solid rgba(87, 72, 43, 0.32);
    border-radius: 8px;
    cursor: pointer;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

#captcha_image:hover {
    opacity: 0.84;
    transform: translateY(-1px);
}

.auth-checkline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #41576b;
    font-size: 13px;
}

.auth-checkline input[type="checkbox"] {
    width: 16px;
    height: 16px;
}

.auth-submit-wrap {
    margin-top: 12px;
    text-align: center;
}

.auth-submit,
.auth-modal-body input[type="submit"].auth-submit,
.auth-modal-body input.login[type="submit"] {
    min-height: 34px;
    min-width: 180px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid rgba(34, 52, 66, 0.55);
    background: linear-gradient(160deg, var(--auth-btn-top), var(--auth-btn-bottom));
    color: #edf4f9;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.14s ease, box-shadow 0.14s ease, background 0.14s ease;
}

.auth-submit:hover,
.auth-submit:focus-visible,
.auth-modal-body input[type="submit"].auth-submit:hover,
.auth-modal-body input.login[type="submit"]:hover {
    background: linear-gradient(160deg, var(--auth-btn-top-hover), var(--auth-btn-bottom-hover));
    transform: translateY(-1px);
    box-shadow: var(--auth-shadow-soft);
}

.auth-submit:focus-visible {
    outline: 2px solid rgba(44, 79, 106, 0.46);
    outline-offset: 2px;
}

.auth-log {
    margin-top: 10px;
    border-radius: 10px;
    padding: 8px 10px;
    border: 1px solid rgba(98, 80, 48, 0.24);
    background: rgba(255, 255, 255, 0.76);
    color: #3f556a;
    font-size: 13px;
    visibility: hidden;
}

.auth-status img,
img[id^="pic_"] {
    width: 16px;
    height: 16px;
    vertical-align: middle;
}

.auth-notice {
    margin-top: 10px;
    border-radius: 10px;
    border: 1px solid rgba(98, 80, 48, 0.26);
    background: rgba(255, 255, 255, 0.7);
    padding: 10px 12px;
}

.auth-notice-title {
    font-family: "Copperplate", "Times New Roman", serif;
    font-size: 14px;
    font-weight: 700;
    color: #2f4356;
    letter-spacing: 0.02em;
}

.auth-notice-text {
    margin-top: 4px;
    font-size: 12px;
    line-height: 1.35;
    color: #5b6f82;
}

.auth-notice.auth-notice-error {
    border-color: rgba(143, 43, 43, 0.36);
    background: var(--auth-danger-bg);
}

.auth-notice.auth-notice-error .auth-notice-title,
.auth-notice.auth-notice-error .auth-notice-text {
    color: var(--auth-danger);
}

.auth-notice.auth-notice-success {
    border-color: rgba(47, 111, 63, 0.36);
    background: var(--auth-success-bg);
}

.auth-notice.auth-notice-success .auth-notice-title,
.auth-notice.auth-notice-success .auth-notice-text {
    color: var(--auth-success);
}

.auth-password-box {
    margin-top: 8px;
    border-radius: 10px;
    border: 1px dashed rgba(47, 111, 63, 0.42);
    background: rgba(255, 255, 255, 0.86);
    padding: 8px;
    text-align: center;
}

#new-password-display.auth-password-value {
    display: inline-block;
    min-width: 120px;
    color: #7d2f2f;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.08em;
    font-family: Consolas, "Courier New", monospace;
    cursor: pointer;
    user-select: none;
    border-radius: 8px;
    padding: 3px 8px;
    transition: background 0.15s ease, color 0.15s ease;
}

#new-password-display.auth-password-value:hover {
    background: rgba(47, 111, 63, 0.1);
}

#copy-message.auth-copy-message {
    margin-top: 8px;
    color: var(--auth-success);
    font-size: 12px;
    display: none;
}

.gift-info {
    margin-top: 10px;
    border-radius: 10px;
    border: 1px solid rgba(184, 137, 47, 0.4);
    background: linear-gradient(130deg, rgba(255, 246, 198, 0.85), rgba(250, 231, 167, 0.82));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.46);
    padding: 10px;
    text-align: center;
}

.gift-info h3 {
    margin: 0;
    font-family: "Copperplate", "Times New Roman", serif;
    color: #7a5722;
    font-size: 16px;
    letter-spacing: 0.02em;
}

.gift-list {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.gift-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid rgba(155, 113, 39, 0.34);
    background: rgba(255, 255, 255, 0.72);
    color: #6f4f1e;
    font-size: 13px;
    font-weight: 700;
}

.gift-item img {
    width: 16px;
    height: 16px;
}

.gift-note {
    margin-top: 8px;
    font-size: 12px;
    color: #765f37;
}

.auth-info-block {
    margin-top: 10px;
    border-radius: 10px;
    border: 1px solid rgba(98, 80, 48, 0.24);
    background: rgba(255, 255, 255, 0.66);
    padding: 10px;
}

.auth-info-title {
    margin: 0;
    font-family: "Copperplate", "Times New Roman", serif;
    color: #2f4356;
    font-size: 14px;
    letter-spacing: 0.02em;
}

.auth-info-text {
    margin-top: 6px;
    color: #5b6f82;
    font-size: 12px;
    line-height: 1.36;
}

@media screen and (max-width: 700px) {
    body.auth-modal-body {
        padding: 8px;
    }

    .auth-card {
        padding: 10px;
        border-radius: 12px;
    }

    .auth-card-title {
        font-size: 18px;
    }

    .auth-form-table,
    .auth-form-table tbody,
    .auth-form-table tr,
    .auth-form-table td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }

    .auth-form-table tr {
        border-bottom: 1px solid rgba(102, 82, 47, 0.12);
    }

    .auth-form-table tr:last-child {
        border-bottom: none;
    }

    .auth-form-table td {
        border: none;
        padding: 7px 8px;
    }

    .auth-label {
        padding-bottom: 0;
        font-size: 12px;
    }

    .auth-status {
        width: 100%;
        text-align: left;
        padding-top: 0;
        padding-bottom: 8px;
    }

    .auth-status img,
    img[id^="pic_"] {
        width: 14px;
        height: 14px;
    }

    .auth-select-row {
        flex-wrap: wrap;
    }

    .auth-select-row .auth-select {
        flex: 1 1 70px;
    }
}
