﻿:root {
    --teal: #2a7068;
    --teal-dark: #1e5550;
    --teal-mid: #3d8a7f;
    --btn: #6a9e7f;
    --btn-hover: #5a8e6f;
    --text-muted: #5a7566;
    --white: #ffffff;
    --color-primary: #7BA792;
    --color-bg-light: #CFE3DA;
    --color-shadow: #537f6a;
    --color-input-shadow: #bbbbbb;
    --transition-speed: 500ms;
    --input-border: #cccccc;
    --icon-colour: #9ca3af;
    --input-focus: #0d9488;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'DM Sans', sans-serif;
    min-height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0a1a18;
}

/* ════════════════════════════════
             BACKGROUND LAYERS
          ════════════════════════════════ */
.bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    background: radial-gradient(ellipse 120% 25% at 50% 48%, rgba(42, 180, 160, 0.22) 0%, rgba(20, 100, 90, 0.10) 50%, transparent 100% ), radial-gradient(ellipse 60% 60% at 30% 60%, rgba(20, 70, 65, 0.4) 0%, transparent 70% ), radial-gradient(ellipse 60% 60% at 70% 35%, rgba(15, 55, 52, 0.5) 0%, transparent 70% ), linear-gradient(160deg, #0c1e1b 0%, #0a1a18 40%, #071412 70%, #0d1f1c 100%);
    animation: bgBreath 8s ease-in-out infinite alternate;
}

@keyframes bgBreath {
    0% {
        filter: brightness(1) hue-rotate(0deg);
    }

    100% {
        filter: brightness(1.1) hue-rotate(8deg);
    }
}

/* Central light streak */
.streak {
    position: fixed;
    z-index: 1;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 85vw;
    height: 120px;
    background: radial-gradient(ellipse 100% 100% at 50% 50%, rgba(60, 200, 180, 0.28) 0%, rgba(40, 160, 140, 0.12) 40%, transparent 75% );
    filter: blur(18px);
    animation: streakPulse 6s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes streakPulse {
    0% {
        opacity: 0.7;
        transform: translate(-50%, -50%) scaleY(1);
    }

    100% {
        opacity: 1.0;
        transform: translate(-50%, -50%) scaleY(1.3);
    }
}

#bokeh-canvas {
    position: fixed;
    inset: 0;
    z-index: 2;
    pointer-events: none;
}

.login-card {
    position: absolute;
    background-color: rgba(207, 227, 218, 0);
    backdrop-filter: blur(16px); /* The magic frosted glass blur */
    -webkit-backdrop-filter: blur(16px); /* Safari support */
    border: 1px solid rgba(255, 255, 255, 0.5); /* Subtle glowing edge */

    border-radius: 0.75rem;
    padding: 3.5rem 2.5rem 2rem 2.5rem;
    width: 400px;
    z-index: 20;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 1); 
}

.logo-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
}

.login-logo {
    width: 70%;
}

/* Form Styling */
.form-group {
    margin-bottom: 1rem;
    width: 100%;
}

.pt-12 {
    padding-top: 3rem;
}

.form-label {
    display: block;
    color: white;
    font-size: 0.875rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.form-input {
    background-color: #ffffff !important;
    border: 1px solid var(--input-border); /* border-gray-900 approximate */
    border-radius: 0.5rem;
    width: 100%;
    padding: 0.625rem 2.5rem; /* py-2.5 px-3 */
    color: #374151; /* text-gray-700 */
    outline: none;
}

    .form-input:focus {
        border-color: var(--input-focus);
        box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.1);
    }

/* Container to hold icons and inputs together */
.input-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

/* Style for the icons at the start (User/Lock) */
.prefix-icon {
    position: absolute;
    left: 12px;
    color: var(--icon-colour);
    font-size: 1rem;
    pointer-events: none; /* So clicking the icon still focuses the input */
    z-index: 5;
}

/* Adjust the input padding so text starts after the icon */
.form-input.has-prefix {
    padding-left: 40px; /* Space for the 12px left + icon width */
}

/* Keep your password toggle on the right */
.password-toggle {
    position: absolute;
    right: 12px;
    color: #6b7280; /* Subtle gray for the eye icon */
    cursor: pointer;
    z-index: 5;
    transition: color 0.2s;
}

    .password-toggle:hover {
        color: var(--color-primary);
    }


/* Password Toggle Logic */
.password-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    cursor: pointer;
}

/* Button Styling */
.action-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 2rem;
    padding-bottom: 1.25rem;
    width: 100%;
}

.btn-login {
    color: white;
    width: 100%;
    font-weight: 600;
    font-size: 16px;
    padding: 0.45rem 3rem; /* pt-2 pb-2 px-12 */
    border-radius: 0.5rem;
    border: 2px solid var(--color-primary);
    background-color: var(--color-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

    .btn-login:hover {
        background-color: var(--color-primary);
        color: white;
    }

    .btn-login:focus {
        outline: none;
    }

.form-error {
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    color: #ef4444;
    font-size: 14px;
    text-align: center;
    background: #fef2f2;
    padding: 8px;
    border-radius: 6px;
    border: 1px solid #fee2e2;
}

/* The Animation Keyframes */
@keyframes slideUpFade {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.98);
        filter: blur(10px); /* Starts slightly blurry for extra style */
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

/* The Entrance Class */
.animate-entrance {
    animation: slideUpFade 800ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
    /* Keeps the card invisible until the animation starts */
    opacity: 0;
}

/* Optional: Subtle delay for the form elements inside the card */
.form-group {
    animation: slideUpFade 800ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: 200ms;
    opacity: 0;
}

.action-wrapper {
    animation: slideUpFade 800ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: 400ms;
    opacity: 0;
}

.btn-login:active {
    transform: scale(0.96);
    filter: brightness(0.9);
}

/* ════════════════════════════════
   FLOATING TICKS
════════════════════════════════ */
.float-tick {
    position: fixed;
    z-index: 3;
    pointer-events: none;
    color: rgba(80, 200, 160, 0.3);
    font-size: 80px;
    font-weight: 900;
    line-height: 1;
    user-select: none;
    animation: tickFloat linear forwards;
}

@keyframes tickFloat {
    0% {
        opacity: 0;
        transform: scale(0.2);
        filter: blur(16px);
    }

    25% {
        opacity: 0.85;
        transform: scale(1);
        filter: blur(8px);
    }

    50% {
        opacity: 1;
        transform: scale(1.5);
        filter: blur(1px);
    }

    75% {
        opacity: 0.85;
        transform: scale(1);
        filter: blur(8px);
    }

    100% {
        opacity: 0;
        transform: scale(0.2);
        filter: blur(16px);
    }
}

.hidden {
    display: none;
}