:root {
    --primary-color: #78ff5a;
    --primary-dark: #022c22;
    --text-main: #0f172a;
    --card-bg-glass: rgba(255, 255, 255, 0.18);
}

/* Global reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.bg-animated {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), #10f25b);
    background-size: 200% 200%;
    animation: gradientShift 10s ease-in-out infinite;
    color: var(--text-main);
}

@keyframes gradientShift {
    0%   { background-position: 0% 50%;   }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%;   }
}

.wrapper {
    width: 100%;
    max-width: 980px;
    padding: 20px;
}

/* Base card */
.card {
    background: #ffffff;
    border-radius: 24px;
    padding: 28px 24px 24px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;

    opacity: 0;
    transform: translateY(16px) scale(0.97);
    animation: cardIn 0.6s ease forwards;
}

.card::before {
    content: "";
    position: absolute;
    width: 160px;
    height: 160px;
    background: radial-gradient(circle, rgba(255,255,255,0.65), transparent 60%);
    top: -60px;
    right: -40px;
    opacity: 0.8;
    pointer-events: none;
}

@keyframes cardIn {
    0% {
        opacity: 0;
        transform: translateY(16px) scale(0.97);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Auth-specific cards with glassmorphism */
.card-login,
.card-register,
.card-forgot {
    max-width: 440px;
    margin: 0 auto;
    background: var(--card-bg-glass);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.card-register {
    animation: registerIn 0.7s ease forwards;
}

@keyframes registerIn {
    0% {
        opacity: 0;
        transform: translateY(18px) scale(0.96) rotateX(5deg);
    }
    60% {
        opacity: 1;
        transform: translateY(-2px) scale(1.01);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.card-forgot {
    animation: forgotIn 0.6s ease forwards;
}

@keyframes forgotIn {
    0% {
        opacity: 0;
        transform: translateY(18px) scale(0.96);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* “Pill” header */
.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(16, 242, 91, 0.12);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
    color: #065f46;
    margin-bottom: 10px;
}

/* Pulse dot */
.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    animation: pulse 1.7s infinite;
}

@keyframes pulse {
    0%   { transform: scale(1);   box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
    70%  { transform: scale(1.4); box-shadow: 0 0 0 9px rgba(34, 197, 94, 0); }
    100% { transform: scale(1);   box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* Titles & text */
h1 {
    font-size: 1.6rem;
    margin-bottom: 6px;
    color: #022c22;
}

.subtitle {
    font-size: 0.92rem;
    line-height: 1.4;
    color: var(--text-main);
    opacity: 0.85;
    margin-bottom: 18px;
}

/* Form layout */
.form-vertical {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.field-label {
    font-size: 0.86rem;
    font-weight: 600;
    margin-top: 4px;
    color: #022c22;
}

.input {
    border-radius: 10px;
    border: 1px solid rgba(15, 23, 42, 0.25);
    padding: 9px 11px;
    font-size: 0.92rem;
    outline: none;
    background: rgba(255,255,255,0.9);
    transition: border 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.input:focus {
    border-color: #22c55e;
    box-shadow: 0 0 0 1px rgba(34,197,94,0.4);
    background: #ffffff;
}

/* Password input wrapper with toggle button */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper .input {
    padding-right: 45px;
    width: 100%;
}

.password-toggle {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(15, 23, 42, 0.5);
    transition: color 0.18s ease;
    outline: none;
    border-radius: 6px;
}

.password-toggle:hover {
    color: rgba(15, 23, 42, 0.8);
    background: rgba(15, 23, 42, 0.05);
}

.password-toggle:focus {
    color: #22c55e;
    background: rgba(34, 197, 94, 0.1);
}

.password-toggle .eye-icon {
    width: 20px;
    height: 20px;
    stroke-width: 2;
}

.password-toggle .eye-hide {
    display: none;
}

.password-input-wrapper.show-password .eye-show {
    display: none;
}

.password-input-wrapper.show-password .eye-hide {
    display: block;
}

/* Helper text */
.helper-text,
.hint {
    font-size: 0.78rem;
    opacity: 0.8;
    margin-top: 2px;
    color: #022c22;
}

/* Buttons */
.btn-row {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 14px;
    flex-wrap: wrap;
}

.btn-primary {
    border: none;
    outline: none;
    cursor: pointer;
    border-radius: 999px;
    padding: 10px 20px;
    font-size: 0.95rem;
    font-weight: 600;
    background: var(--primary-dark);
    color: #ecfdf5;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    box-shadow: 0 10px 24px rgba(6, 95, 70, 0.5);
    text-decoration: none;
}

.btn-primary span.arrow {
    transition: transform 0.18s ease;
}

.btn-primary::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 0% 0%, rgba(120,255,90,0.4), transparent 60%);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.btn-primary:hover {
    transform: translateY(-1px) scale(1.01);
    box-shadow: 0 14px 30px rgba(6, 95, 70, 0.65);
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-primary:hover span.arrow {
    transform: translateX(3px);
}

.btn-ghost {
    border-radius: 999px;
    padding: 9px 16px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid rgba(15, 23, 42, 0.2);
    background: rgba(255, 255, 255, 0.72);
    color: var(--text-main);
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.96);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12);
}

/* Alerts */
.alert-error,
.alert-success {
    margin-bottom: 12px;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 0.88rem;
}

.alert-error {
    background: rgba(248, 113, 113, 0.08);
    border: 1px solid rgba(220, 38, 38, 0.4);
    color: #991b1b;
}

.alert-success {
    background: rgba(16,185,129,0.08);
    border: 1px solid rgba(5,150,105,0.6);
    color: #065f46;
}

/* Meta info */
.meta {
    margin-top: 18px;
    font-size: 0.8rem;
    color: #022c22;
    opacity: 0.85;
    display: flex;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Links */
.link-muted {
    font-size: 0.85rem;
    opacity: 0.9;
    color: #022c22;
    text-decoration: none;
}

.link-muted:hover {
    text-decoration: underline;
}

/* Dashboard & extras (optional if you reuse same CSS for dashboard) */
.dashboard-page {
    margin: 0;
    background: #f5f6fb;
    color: #101828;
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.dashboard-layout {
    min-height: 100vh;
    display: flex;
}

.sidebar {
    width: 88px;
    background: #1f2933;
    padding: 28px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    color: #fff;
}

.sidebar-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 18px;
    width: 100%;
}

.sidebar .nav-item {
    width: 100%;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 1.3rem;
    transition: background 0.2s ease, color 0.2s ease;
}

.sidebar .nav-item:hover,
.sidebar .nav-item.active {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

.main-panel {
    flex: 1;
    padding: 32px 48px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.dashboard-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

/* ... (keep/add more dashboard rules here if needed) */

/* Responsive tweaks */
@media (max-width: 768px) {
    .sidebar {
        display: none;
    }

    .main-panel {
        padding: 20px;
    }

    .dashboard-topbar {
        gap: 12px;
    }
}
/* --- Auth header side-by-side layout --- */
.auth-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.auth-text h1 {
    margin-bottom: 4px;
    font-size: 1.7rem;
}

.auth-text .subtitle {
    margin-bottom: 0;
}

/* --- Logo on the right --- */
.auth-logo-side img {
    height: 50px;   /* ⬅ smaller */
    /* height: 80px;  ⬅ larger */

    width: auto;
    object-fit: contain;
    opacity: 0;

    animation:
        logoPop 0.6s ease forwards,
        logoFloat 4s ease-in-out infinite 0.6s,
        logoGlow 3s ease-in-out infinite 0.6s;

    transition: transform 0.3s ease;
}


.auth-logo-side img:hover {
    transform: translateY(-4px) rotate(-4deg);
}

/* Floating + glow animations (reuse your previous ones) */
@keyframes logoPop {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-6px); }
}

@keyframes logoGlow {
    0%, 100% {
        filter: drop-shadow(0 4px 10px rgba(0,0,0,0.25));
    }
    50% {
        filter: drop-shadow(0 6px 18px rgba(120,255,90,0.65));
    }
}