/* =========================================
   AUTH SYSTEM – MOBILE FIRST
   Fully Namespaced
========================================= */

.auth-root {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #0A3328, #0D1F1A);
    position: relative;
    overflow: hidden;
}

/* subtle gold radial glow */
.auth-root::before {
    content: "";
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(212,175,55,0.15), transparent 70%);
    top: -150px;
    left: 50%;
    transform: translateX(-50%);
    filter: blur(60px);
    z-index: 0;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    border-radius: 20px;
    padding: 32px 24px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.25);
    position: relative;
    z-index: 2;
    animation: authFadeIn 0.6s ease;
}

@keyframes authFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-title {
    font-size: 1.8rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 24px;
    color: #0A3328;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.auth-field input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid #ddd;
    font-family: var(--font-primary);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.auth-field input:focus {
    outline: none;
    border-color: #D4AF37;
    box-shadow: 0 0 0 3px rgba(212,175,55,0.2);
}

.auth-btn-primary {
    margin-top: 10px;
    padding: 14px;
    border-radius: 50px;
    border: none;
    font-weight: 700;
    font-size: 1rem;
    background: linear-gradient(90deg, #D4AF37, #B8942F);
    color: #0A3328;
    cursor: pointer;
    transition: all 0.3s ease;
}

.auth-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(212,175,55,0.35);
}

.auth-footer {
    text-align: center;
    margin-top: 18px;
}

.auth-footer a {
    font-size: 0.9rem;
    color: #145C45;
    font-weight: 600;
}

.auth-footer a:hover {
    color: #D4AF37;
}

/* =========================================
   MODAL
========================================= */

.auth-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.auth-modal-box {
    background: #ffffff;
    padding: 28px;
    border-radius: 16px;
    max-width: 380px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}

.auth-modal-box.success {
    border-top: 4px solid #145C45;
}

.auth-modal-box.error {
    border-top: 4px solid #b00020;
}

.auth-btn-secondary {
    margin-top: 18px;
    padding: 10px 24px;
    border-radius: 50px;
    border: none;
    background: #0A3328;
    color: #ffffff;
    cursor: pointer;
    font-weight: 600;
}

/* =========================================
   TABLET
========================================= */
@media (min-width: 768px) {
    .auth-card {
        padding: 40px 36px;
    }

    .auth-title {
        font-size: 2rem;
    }
}

/* =========================================
   DESKTOP
========================================= */
@media (min-width: 1024px) {
    .auth-card {
        max-width: 450px;
    }
}

.auth-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: #f8f9f9;
}

.auth-page .container {
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.auth-page input {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
}

.auth-page button {
    width: 100%;
    padding: 0.75rem 1rem;
    background: #145C45;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
}

.auth-page .message.error {
    color: #D32F2F;
    margin-top: 1rem;
    text-align: center;
}

.auth-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
    background: #f8f9f9;
}

.auth-container {
    width: 100%;
    max-width: 400px;
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    text-align: center;
}

.auth-form input {
    width: 100%;
    padding: 12px 16px;
    margin: 12px 0;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 16px;
}

.auth-form button {
    width: 100%;
    padding: 12px;
    background: #145C45;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: 0.3s;
}

.auth-form button:hover {
    background: #0D1F1A;
}

.auth-links {
    margin-top: 15px;
    font-size: 14px;
}

.auth-links a {
    color: #145C45;
    text-decoration: none;
}

.auth-links a:hover {
    text-decoration: underline;
}

/* Modal */
.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal-box {
    background: #fff;
    padding: 25px 35px;
    border-radius: 12px;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}

.modal-box.error {
    border-left: 6px solid #D9534F;
}

.modal-box.success {
    border-left: 6px solid #28A745;
}

.modal-box button {
    margin-top: 15px;
    padding: 10px 20px;
    background: #145C45;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.modal-box button:hover {
    background: #0D1F1A;
}

/* ===== FINTECH AUTH ROOT ===== */

.kd-auth {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background:
        radial-gradient(circle at 20% 20%, rgba(212,175,55,0.08), transparent 40%),
        linear-gradient(135deg, #0D1F1A, #0A3328);
}

/* ===== CARD ===== */

.kd-auth-card {
    width: 100%;
    max-width: 420px;
    padding: 50px 40px;
    border-radius: 20px;
    background: rgba(255,255,255,0.04);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow:
        0 30px 60px rgba(0,0,0,0.6),
        0 0 40px rgba(212,175,55,0.08);
    color: #fff;
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== HEADER ===== */

.kd-auth-header {
    text-align: center;
    margin-bottom: 40px;
}

.kd-auth-header h1 {
    font-size: 26px;
    margin-bottom: 10px;
    font-weight: 600;
}

.kd-auth-header p {
    font-size: 14px;
    color: rgba(255,255,255,0.6);
}

/* ===== INPUTS ===== */

.kd-input-group {
    position: relative;
    margin-bottom: 28px;
}

.kd-input-group input {
    width: 100%;
    padding: 16px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.03);
    color: #fff;
    font-size: 15px;
    outline: none;
    transition: all 0.3s ease;
}

.kd-input-group input:focus {
    border-color: #D4AF37;
    box-shadow: 0 0 0 3px rgba(212,175,55,0.15);
}

/* Floating label */

.kd-input-group label {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: rgba(255,255,255,0.6);
    pointer-events: none;
    transition: 0.3s ease;
}

.kd-input-group input:focus + label,
.kd-input-group input:not(:placeholder-shown) + label {
    top: -8px;
    left: 10px;
    font-size: 12px;
    background: #0D1F1A;
    padding: 0 6px;
    color: #D4AF37;
}

/* ===== BUTTON ===== */

.kd-auth-btn {
    width: 100%;
    padding: 16px;
    border-radius: 12px;
    border: none;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    background: linear-gradient(135deg, #D4AF37, #C9A437);
    color: #0D1F1A;
    transition: all 0.3s ease;
}

.kd-auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(212,175,55,0.3);
}

/* ===== FOOTER LINKS ===== */

.kd-auth-footer {
    margin-top: 30px;
    text-align: center;
    font-size: 13px;
}

.kd-auth-footer a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: 0.3s;
}

.kd-auth-footer a:hover {
    color: #D4AF37;
}

/* ===== MODAL ===== */

.kd-auth-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.kd-modal-box {
    background: #111;
    padding: 30px 40px;
    border-radius: 14px;
    text-align: center;
    max-width: 360px;
    color: #fff;
    border-left: 5px solid #D4AF37;
}

.kd-modal-box.error {
    border-left-color: #ff4d4d;
}

.kd-modal-box.success {
    border-left-color: #28a745;
}

.kd-modal-box button {
    margin-top: 20px;
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    background: #D4AF37;
    color: #0D1F1A;
    font-weight: 600;
}

.kd-verification-message {
    margin: 20px 0 30px;
    padding: 14px;
    border-radius: 10px;
    font-size: 14px;
    text-align: center;
}

.kd-verification-message.success {
    background: rgba(40,167,69,0.15);
    color: #28a745;
}

.kd-verification-message.error {
    background: rgba(255,77,77,0.15);
    color: #ff4d4d;
}
