/* =========================================================
   Ecofriss - Design System v2 (Premium Login Layout)
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Brand Colors based on Kangaroo Sky Blue & Deep Navy heritage */
    --brand: #56B7F2;
    --brand-hover: #73c4f5;
    --brand-active: #3ba2dc;
    --brand-glow: rgba(86, 183, 242, 0.18);

    /* Layout Backgrounds and Surfaces */
    --bg: #0b0f24;
    --bg-secondary: #0f1430;
    --surface: #141b40;
    --surface-hover: #1c2559;

    /* Borders */
    --border: #232d66;
    --border-hover: #2f3c85;
    --border-focus: var(--brand);

    /* Typography settings */
    --font-primary: 'Outfit', sans-serif;
    --text: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-on-brand: #ffffff;

    /* Spacing, Radius & Shadows */
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.4), 0 0 80px rgba(86, 183, 242, 0.05);

    /* Transitions */
    --t-short: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --t-medium: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== RESET ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    height: 100%;
    background-color: var(--bg);
    font-family: var(--font-primary);
    color: var(--text);
    overflow: hidden;
}

/* --- BODY: Fondo oscuro con patrón de resplandor --- */
body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    position: relative;
}

body::before {
    content: '';
    position: absolute;
    top: -30%;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(86, 183, 242, 0.08) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* ===== BASE ===== */
.container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 480px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.card {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 48px 40px;
    text-align: center;
    transition: transform var(--t-medium), border-color var(--t-medium);
}

.card:hover {
    border-color: rgba(86, 183, 242, 0.3);
}

.logo {
    width: 160px;
    height: auto;
    margin: 0 auto 36px;
    display: block;
    filter: drop-shadow(0 4px 12px rgba(86, 183, 242, 0.2));
    transition: transform var(--t-medium);
}

.logo:hover {
    transform: scale(1.05);
}

/* Errors & Messages */
.card p {
    background: rgba(244, 63, 94, 0.12);
    border: 1px solid rgba(244, 63, 94, 0.25);
    color: #f43f5e !important;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 24px;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Form Styles */
form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Inputs */
input {
    width: 100%;
    padding: 16px 18px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text);
    font-size: 16px;
    font-family: var(--font-primary);
    outline: none;
    transition: border-color var(--t-short), box-shadow var(--t-short), background var(--t-short);
}

input::placeholder {
    color: var(--text-muted);
}

input:hover {
    border-color: var(--border-hover);
}

input:focus {
    background-color: var(--bg);
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-glow);
}

/* Button */
button {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 700;
    font-size: 16px;
    font-family: var(--font-primary);
    background: var(--brand);
    color: var(--bg);
    transition: background var(--t-short), transform var(--t-short), box-shadow var(--t-short);
    margin-top: 8px;
    box-shadow: 0 4px 12px rgba(86, 183, 242, 0.2);
}

button:hover {
    background: var(--brand-hover);
    box-shadow: 0 6px 16px rgba(86, 183, 242, 0.35);
}

button:active {
    transform: scale(0.98);
}

a {
    display: inline-block;
    margin-top: 24px;
    font-size: 14px;
    font-weight: 500;
    color: var(--brand);
    text-decoration: none;
    transition: color var(--t-short), text-shadow var(--t-short);
}

a:hover {
    color: var(--brand-hover);
    text-shadow: 0 0 8px var(--brand-glow);
}

/* ======================================================
   📱 MOBILE: Adaptive full screen card
   ====================================================== */
@media (max-width: 768px) {
    .container {
        padding: 16px;
        min-height: 100svh;
        align-items: stretch;
    }

    .card {
        max-width: none;
        width: 100%;
        height: calc(100svh - 32px);
        padding: 40px 24px;
        border-radius: 20px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .logo {
        width: 150px;
        margin-bottom: 40px;
    }

    input {
        font-size: 16px;
        padding: 18px 16px;
    }

    button {
        padding: 18px;
        font-size: 17px;
        border-radius: var(--radius-md);
    }
}

/* 📱 Small screens */
@media (max-width: 420px) {
    .card {
        height: calc(100svh - 24px);
        padding: 32px 18px;
    }

    .logo {
        width: 130px;
    }
}

/* Password visibility toggle */
.password-wrapper {
    position: relative;
    width: 100%;
}

.password-wrapper input {
    padding-right: 50px !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.password-wrapper button.toggle-password {
    position: absolute !important;
    right: 16px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background: none !important;
    background-color: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    margin-top: 0 !important;
    width: 24px !important;
    height: 24px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    color: var(--text-muted) !important;
    box-shadow: none !important;
    transition: color var(--t-short), transform var(--t-short) !important;
    z-index: 10 !important;
}

.password-wrapper button.toggle-password:hover {
    color: var(--text) !important;
    transform: translateY(-50%) scale(1.1) !important;
    background: none !important;
    background-color: transparent !important;
}

.password-wrapper button.toggle-password:active {
    transform: translateY(-50%) scale(0.95) !important;
}

.password-wrapper button.toggle-password svg {
    width: 20px !important;
    height: 20px !important;
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 2 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
}