
/* ================= ROOT COLORS ================= */
:root{
    --background-color: #f5e6d3; /* soft warm off-white */
    --default-color:    #1f1f1f; /* rich dark text */
    --heading-color:    #2d2d2d; /* deep charcoal for headings */
    --accent-color:     #8b4513; /* claude warm terracotta/coral */
    --accent-hover:     #c4654a; /* deeper terracotta on hover */
    --surface-color:    #ffffff; /* pure white surfaces */
    --contrast-color:   #0a0a0a; /* deepest black for contrast */
    --border-color:     #e5e3df; /* subtle warm border */
    --muted-text:       #6b6b6b; /* muted secondary text */

    /* Interactive states */
    --nav-color: #2d2d2d; 
    --nav-hover-color: #d97757; 
    --nav-mobile-background-color: #ffffff; 
    --nav-dropdown-background-color: #ffffff; 
    --nav-dropdown-color: #2d2d2d; 
    --nav-dropdown-hover-color: #d97757;
    
    /* Shadows & effects */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--background-color);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    color: var(--default-color);
    position: relative;
    overflow-x: hidden;
}

/* ---------- rotating geometric background ---------- */
.geometry-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.25;  /* subtle so cards remain readable */
}

.geometry-bg svg {
    position: absolute;
    width: 100%;
    height: 100%;
    animation: slowSpin 60s linear infinite;
}

@keyframes slowSpin {
    from { transform: rotate(0deg) scale(1.2); }
    to { transform: rotate(360deg) scale(1.2); }
}

/* individual shapes with slight variations */
.shape-1 {
    animation: slowSpin 70s reverse infinite;
}
.shape-2 {
    animation: slowSpin 90s linear infinite;
}
.shape-3 {
    animation: slowSpin 110s reverse infinite;
}

/* main card – warm white surface with soft shadows, above background */
.auth-card {
    background: var(--surface-color);
    width: 100%;
    max-width: 440px;
    border-radius: 2rem;
    padding: 2.5rem 2rem;
    box-shadow: var(--shadow-lg), 0 0 0 1px var(--border-color) inset;
    transition: transform 0.2s ease;
    position: relative;
    z-index: 2;
    backdrop-filter: blur(2px);
    background: rgba(255,255,255,0.95);
    animation: slide-into 1s ease forwards;
}

.auth-header {
    margin-bottom: 2rem;
    text-align: center;
}

@keyframes  slide-into{
    0%{transform: translateY(40px);opacity: 0.2;}
    100%{transform: translateY(0px); opacity: 1;}
}

.auth-header h1 {
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--heading-color);
    margin-bottom: 0.3rem;
}

.auth-header p {
    color: var(--muted-text);
    font-size: 0.95rem;
    font-weight: 400;
}

/* form structure */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.input-group label {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--muted-text);
    margin-left: 0.25rem;
}

/* modern input container – crisp and clean */
.input-field {
    display: flex;
    align-items: center;
    background: var(--nav-mobile-background-color);  /* soft warm off-white */
    border-radius: 1.2rem;
    padding: 0.6rem 1.2rem;
    border: 1px solid var(--border-color);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input-field i {
    color: var(--muted-text);
    font-size: 1rem;
    width: 1.5rem;
    transition: color 0.15s;
}

.input-field input {
    width: 100%;
    background: transparent;
    border: none;
    font-size: 1rem;
    font-weight: 500;
    color: var(--default-color);
    padding: 0.5rem 0;
    outline: none;
    font-family: 'Inter', sans-serif;
}

.input-field input::placeholder {
    color: #beb9b2;  /* warm light grey that fits palette */
    font-weight: 400;
    font-size: 0.95rem;
}

.input-field:focus-within {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(217, 119, 87, 0.12);
}

.input-field:focus-within i {
    color: var(--accent-color);
}

.field-note {
    font-size: 0.75rem;
    color: var(--muted-text);
    margin-left: 0.5rem;
    margin-top: 0.15rem;
}

/* button – using warm accent */
.auth-btn {
    background: var(--accent-color);
    border: none;
    border-radius: 2rem;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    letter-spacing: 0.01em;
    margin-top: 1rem;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(255,255,255,0.2);
}

.auth-btn:hover {
    background: var(--accent-hover);
    box-shadow: var(--shadow-md);
}

.auth-btn:active {
    transform: scale(0.98);
}

/* switch between login/register */
.auth-switch {
    margin-top: 2rem;
    text-align: center;
    color: var(--muted-text);
    font-size: 0.95rem;
}

.auth-switch a {
    color: var(--heading-color);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1.5px solid var(--border-color);
    padding-bottom: 0.1rem;
    margin-left: 0.5rem;
    transition: color 0.15s, border-color 0.15s;
}

.auth-reset-link{
    color: var(--heading-color);
    text-decoration: none;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.1rem;
    margin-left: 0.2rem;
    transition: color 0.15s, border-color 0.15s;
}
.auth-switch a:hover {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}

@media (max-width: 480px) {
    .auth-switch-reset,.auth-switch{
        font-size: 14px;
    }
    
}

.legal-note {
    margin-top: 1.5rem;
    font-size: 0.7rem;
    text-align: center;
    color: var(--muted-text);
}

hr {
    border: 0.5px solid var(--border-color);
    margin: 1.2rem 0 0.5rem 0;
}

/* subtle icons adjustment */
.fa-phone-alt, .fa-id-card, .fa-user {
    font-size: 0.95rem;
}

/* hint for login combo field */
.combo-hint {
    font-size: 0.75rem;
    color: var(--accent-color);
    margin-left: 0.5rem;
    font-weight: 500;
}

.password-wrapper {
    position: relative;
    width: 100%;
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--muted-text);
    font-size: 16px;
    padding: 5px;
    z-index: 2;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: var(--accent-color);
}

.error {
    background: #ffebee;
    color: #c62828;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    border: 1px solid #c62828;
}

.success {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    border: 1px solid #2e7d32;
}

.error p, .success p {
    margin: 5px 0;
    text-align: center;
}

.field-note {
    display: block;
    font-size: 12px;
    color: #666;
    margin-top: 5px;
    margin-left: 5px;
}

.password-strength {
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    margin-top: 5px;
    transition: all 0.3s;
}

.password-strength.weak { background: #c62828; width: 33%; }
.password-strength.medium { background: #ef6c00; width: 66%; }
.password-strength.strong { background: #2e7d32; width: 100%; }

/* Mac-style shake */
.error.shake {
    animation: macShake 0.4s cubic-bezier(.36,.07,.19,.97);
}

@keyframes macShake {
    0%  { transform: translateX(0); }
    15% { transform: translateX(-6px); }
    30% { transform: translateX(6px); }
    45% { transform: translateX(-5px); }
    60% { transform: translateX(5px); }
    75% { transform: translateX(-3px); }
    90% { transform: translateX(3px); }
    100% { transform: translateX(0); }
}

/* Referral banner styles */
.referral-banner {
    background: linear-gradient(135deg, rgba(217, 119, 87, 0.1), rgba(217, 119, 87, 0.05));
    border: 1px solid var(--accent-color);
    border-radius: 12px;
    padding: 15px 20px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    animation: slideDown 0.5s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.referral-banner i {
    font-size: 28px;
    color: var(--accent-color);
}

.referral-banner-content {
    flex: 1;
}

.referral-banner-title {
    font-weight: 600;
    color: var(--heading-color);
    margin-bottom: 5px;
}

.referral-banner-text {
    color: var(--muted-text);
    font-size: 14px;
}

.referral-banner-text strong {
    color: var(--accent-color);
    font-weight: 600;
}
.back-floating {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-color);
    color: var(--heading-color);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    transition: all 0.3s ease;

    z-index: 100;
}

.back-floating:hover {
    background: var(--accent-color);
    color: white;
    transform: translateX(-3px);
}