/* This file contains common styles for authentication pages */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --green-400: #3dba7e;
    --green-500: #28a065;
    --green-600: #1e8050;
    --green-700: #14603c;

    --cream: #faf8f4;

    --text-dark: #1a1a1a;
    --text-muted: #6b7280;

    --border-light: #e5e7eb;

    ---font-display: 'Inter', system-ui, sans-serif;
    --font-body: 'DM Sans', system-ui, sans-serif;
}

.auth-page-wrap {
    min-height: 100vh;
    width: 100%;
    font-family: var(--font-body);
    background: var(--green-700);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    position: relative;
    overflow: hidden;
}

.auth-page-wrap::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        repeating-linear-gradient(0deg, transparent, transparent 3px, rgba(255,255,255,0.018) 3px, rgba(255,255,255,0.018) 4px),
        repeating-linear-gradient(90deg, transparent, transparent 3px, rgba(255,255,255,0.018) 3px, rgba(255,255,255,0.018) 4px),
        repeating-linear-gradient(45deg, transparent, transparent 8px, rgba(255,255,255,0.012) 8px, rgba(255,255,255,0.012) 9px),
        repeating-linear-gradient(-45deg, transparent, transparent 8px, rgba(255,255,255,0.012) 8px, rgba(255,255,255,0.012) 9px);

    pointer-events: none;
}

.auth-page-wrap::after {
    content: '';
    position: absolute;
    bottom: -100px;
    right: -100px;
    width: 420px;
    height: 420px;
    border: 64px solid rgba(255,255,255,0.04);
    border-radius: 50%;
    pointer-events: none;
}

.thread-arc-1 {
    position: absolute;
    top: -80px;
    left: -80px;
    width: 280px;
    height: 280px;
    border: 42px solid rgba(255,255,255,0.032);
    border-radius: 50%;
    pointer-events: none;
}

.thread-arc-2 {
    position: absolute;
    bottom: 110px;
    right: -120px;
    width: 340px;
    height: 340px;
    border: 2px solid rgba(255,255,255,0.055);
    border-radius: 50%;
    pointer-events: none;
}

.thread-arc-3 {
    position: absolute;
    bottom: 72px;
    right: -72px;
    width: 230px;
    height: 230px;
    border: 2px solid rgba(255,255,255,0.038);
    border-radius: 50%;
    pointer-events: none;
}

.deco-spool {
    position: absolute;
    top: 38px;
    right: 42px;
    opacity: 0.1;
    pointer-events: none;
}

.deco-spool svg {
    width: 52px;
    height: 52px;
    stroke: white;
    fill: none;
    stroke-width: 1.5;
    stroke-linecap: round;
}

.auth-form-card {
    background: rgba(255,255,255,0.97);
    border-radius: 24px;
    padding: 44px 40px 40px;
    width: 100%;
    max-width: 400px;
    position: relative;
    z-index: 10;
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.14),
        0 2px 4px rgba(0,0,0,0.08),
        0 8px 24px rgba(0,0,0,0.14),
        0 24px 60px rgba(0,0,0,0.22),
        0 40px 80px rgba(10,50,28,0.28);

    animation: cardIn 0.55s cubic-bezier(0, 0, 1, 1) both;
}

@keyframes cardIn {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.auth-form-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 24px;
    background: linear-gradient(158deg, rgba(255,255,255,0.55) 0%, transparent 38%);
    pointer-events: none;
}

.auth-form-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 18px;
    animation: float 5s ease-in-out infinite;
}

.auth-form-logo img {
    height: 120px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
}

/* floating animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

.auth-form-header {
    margin-bottom: 28px;
}

.auth-form-title {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.18;
    letter-spacing: -0.4px;
    margin-bottom: 7px;
    text-align: center;
}

.auth-form-subtitle {
    font-size: 13.5px;
    color: var(--text-muted);
    line-height: 1.5;
    text-align: center;
}

.auth-form-group {
    margin-bottom: 14px;
}

.auth-form-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-dark);
    letter-spacing: 0.25px;
    margin-bottom: 6px;
}

.auth-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input-icon {
    position: absolute;
    left: 13px;
    width: 17px;
    height: 17px;
    stroke: #9ca3af;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
}

.auth-input-wrapper input,
.auth-input-wrapper .input {
    width: 100%;
    height: 46px;
    padding: 0 14px 0 42px !important;
    border: 1.5px solid var(--border-light) !important;
    border-radius: 11px !important;
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--text-dark);
    background: var(--cream) !important;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    box-shadow: none !important;
    margin-bottom: 0 !important;
}

.auth-input-wrapper input::placeholder,
.auth-input-wrapper .input::placeholder {
    color: #b0b8c4;
    font-weight: 300;
}

.auth-input-wrapper input:focus,
.auth-input-wrapper .input:focus {
    border-color: var(--green-400) !important;
    background: white !important;
    box-shadow: 0 0 0 3px rgba(61,186,126,0.11) !important;
}

.auth-error-msg {
    color: #dc2626;
    font-size: 0.875rem;
}

.auth-developer-footer {
    text-align: center;
    margin-top: 20px;
    padding-bottom: 5px;
}

.auth-developer-footer span {
    font-size: 13px;
    color: #555;
}

.auth-developer-footer img {
    height: 45px;
    margin-top: 5px;
}


/* ── error message ── */

@keyframes errorPop {
    0%   { opacity: 0; transform: translateY(-6px) scale(0.97); }
    60%  { opacity: 1; transform: translateY(2px) scale(1.01); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes errorShake {
    0%, 100% { transform: translateX(0); }
    20%       { transform: translateX(-5px); }
    40%       { transform: translateX(5px); }
    60%       { transform: translateX(-3px); }
    80%       { transform: translateX(3px); }
}

.auth-error-msg {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    color: #dc2626;
    font-size: 0.8rem;
    font-weight: 500;
    background: #fff5f5;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 9px 12px;
    margin-bottom: 12px;
    line-height: 1.45;
    animation:
        errorPop   0.3s cubic-bezier(0.22, 1, 0.36, 1) both,
        errorShake 0.4s ease         0.3s both;
}

.auth-error-msg::before {
    content: '⚠';
    font-size: 13px;
    flex-shrink: 0;
    margin-top: 1px;
}


@media (max-width: 480px) {
    .auth-page-wrap {
        padding: 24px 16px;
    }

    .auth-form-card {
        padding: 32px 24px 28px;
    }
}