/*shared styling for the sign in / sign up pages.
  the page background lives in theme.css (single source for all user-facing pages).*/

/*centering wrapper*/

.auth-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 90px 0 40px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/*card*/

.auth-card {
    width: 100%;
    max-width: 400px;
    background: #fff;
    border: 1px solid #e9e4d8;
    border-radius: 16px;
    padding: 2.5rem 2.25rem;
    box-shadow: 0 1px 2px rgba(66, 54, 22, 0.05), 0 12px 32px -8px rgba(66, 54, 22, 0.09);
}

.auth-card-wide {
    max-width: 440px;
}

/*titles*/

.auth-title {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #1c1917;
    text-align: center;
    margin-bottom: 0.35rem;
}

.auth-sub {
    font-size: 0.9rem;
    color: #79716b;
    text-align: center;
    margin-bottom: 1.75rem;
}

/*fields*/

.auth-field {
    margin-bottom: 1.1rem;
}

.auth-field label {
    display: block;
    font-size: 0.83rem;
    font-weight: 600;
    color: #44403c;
    margin-bottom: 0.35rem;
}

.auth-field .optional-tag {
    font-weight: 400;
    color: #a8a29e;
}

.req-char {
    color: #ef4444;
    margin-left: 2px;
}

/*side-by-side fields (country / currency)*/

.auth-field-row {
    display: flex;
    gap: 0.9rem;
}

.auth-field-row .auth-field {
    flex: 1;
    min-width: 0;
}

/*inputs*/

.auth-card .form-control,
.auth-card .custom-select {
    height: 44px;
    border: 1px solid #dad5c9;
    border-radius: 10px;
    font-size: 0.95rem;
    color: #1c1917;
    background-color: #fff;
    box-shadow: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-card .form-control:focus,
.auth-card .custom-select:focus {
    border-color: #bf9832;
    box-shadow: 0 0 0 3px rgba(191, 152, 50, 0.18);
    outline: none;
}

.auth-card .bad-input,
.auth-card .bad-input:focus {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

/*submit button*/

.auth-btn {
    display: block;
    width: 100%;
    height: 46px;
    margin-top: 1.5rem;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #1c222c, #0d1117);
    color: #e0b64f;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    cursor: pointer;
    box-shadow: 0 6px 18px -6px rgba(13, 17, 23, 0.45);
    transition: background 0.15s ease, color 0.15s ease, transform 0.05s ease;
}

.auth-btn:hover {
    background: linear-gradient(135deg, #262d3a, #141922);
    color: #ecc25c;
}

.auth-btn:active {
    transform: translateY(1px);
}

.auth-btn:disabled {
    opacity: 0.6;
    cursor: default;
}

/*secondary links*/

.auth-links {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.85rem;
    color: #79716b;
}

.auth-links p {
    margin-bottom: 0.4rem;
}

.auth-links a {
    color: #8f6a14;
    font-weight: 600;
    text-decoration: none;
}

.auth-links a:hover {
    color: #6f520f;
    text-decoration: underline;
}

/*error modal*/

.auth-modal-overlay {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(28, 25, 17, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.18s ease, visibility 0.18s ease;
}

.auth-modal-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.auth-modal {
    width: 100%;
    max-width: 360px;
    background: #fff;
    border-radius: 16px;
    padding: 1.9rem 1.75rem 1.6rem;
    text-align: center;
    box-shadow: 0 24px 60px -12px rgba(16, 24, 40, 0.35);
    transform: translateY(8px) scale(0.97);
    transition: transform 0.18s ease;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.auth-modal-overlay.visible .auth-modal {
    transform: translateY(0) scale(1);
}

.auth-modal-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-modal-title {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #1c1917;
    margin-bottom: 0.4rem;
}

.auth-modal-message {
    font-size: 0.88rem;
    color: #79716b;
    line-height: 1.5;
    margin-bottom: 1.4rem;
}

.auth-modal-btn {
    display: block;
    width: 100%;
    height: 42px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #1c222c, #0d1117);
    color: #e0b64f;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.auth-modal-btn:hover {
    background: linear-gradient(135deg, #262d3a, #141922);
    color: #ecc25c;
}

.auth-modal-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(191, 152, 50, 0.35);
}

/*mobile*/

@media (max-width: 575.98px) {
    .auth-wrap {
        padding-top: 80px;
    }

    .auth-card {
        padding: 1.75rem 1.35rem;
        border-radius: 14px;
    }
}

@media (max-width: 420px) {
    .auth-field-row {
        flex-direction: column;
        gap: 0;
    }
}
