/* =============================================================
   login.css  –  Greenera Technical Solutions
   Used by: index.php (Login Page)
   ============================================================= */

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

:root {
    --primary:    #00C49A;
    --primary-d:  #009E7A;
    --primary-l:  #00EDBA;
    --accent:     #00BCD4;
    --accent-d:   #0097A7;
    --dark:       #0D1B2A;
    --dark-2:     #112233;
    --dark-3:     #1A2F40;
    --text:       #e2e8f0;
    --text-muted: #94a3b8;
    --glass:      rgba(255,255,255,0.06);
    --glass-b:    rgba(255,255,255,0.12);
    --error:      #ff6b6b;
    --shadow:     0 25px 60px rgba(0,0,0,0.5);
}

html, body {
    height: 100%;
    font-family: 'Inter', sans-serif;
    background: var(--dark);
    color: var(--text);
    overflow: hidden;
}

/* ── Animated background ── */
.bg-canvas {
    position: fixed; inset: 0;
    background: linear-gradient(135deg, #061a10 0%, #0a2a1e 40%, #081a28 70%, #041020 100%);
    z-index: 0;
}
.bg-canvas::before {
    content: '';
    position: absolute; inset: 0;
    background:
        radial-gradient(ellipse 60% 50% at 20% 30%, rgba(0,196,154,0.15) 0%, transparent 60%),
        radial-gradient(ellipse 50% 40% at 80% 70%, rgba(0,188,212,0.12) 0%, transparent 60%);
}

/* ── Floating orbs ── */
.orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.25;
    animation: floatOrb 12s ease-in-out infinite;
}
.orb-1 { width: 500px; height: 500px; top: -150px; left: -150px; background: #00C49A; animation-delay: 0s; }
.orb-2 { width: 400px; height: 400px; bottom: -100px; right: -100px; background: #00BCD4; animation-delay: -6s; }
.orb-3 { width: 300px; height: 300px; top: 40%; left: 40%; background: #00968A; animation-delay: -3s; }

@keyframes floatOrb {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%       { transform: translate(30px, -30px) scale(1.05); }
    66%       { transform: translate(-20px, 20px) scale(0.95); }
}

/* ── Layout ── */
.wrapper {
    position: relative; z-index: 1;
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

/* ── Left brand panel ── */
.brand-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 50px;
    position: relative;
    overflow: hidden;
}
.brand-panel::after {
    content: '';
    position: absolute; right: 0; top: 0; bottom: 0;
    width: 1px;
    background: linear-gradient(to bottom, transparent, rgba(0,196,154,0.4), transparent);
}

.brand-logo-wrap {
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(20px);
    border-radius: 28px;
    padding: 36px;
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow: 0 20px 60px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.1);
    margin-bottom: 40px;
    animation: logoEntrance 0.8s cubic-bezier(0.34,1.56,0.64,1) both;
}
@keyframes logoEntrance {
    from { opacity: 0; transform: scale(0.7) translateY(-30px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.brand-logo-wrap img {
    width: 220px;
    height: auto;
    display: block;
    filter: drop-shadow(0 4px 20px rgba(0,196,154,0.3));
}

.brand-title {
    font-size: 2rem;
    font-weight: 800;
    text-align: center;
    background: linear-gradient(135deg, #00C49A, #00BCD4, #00EDBA);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
    margin-bottom: 16px;
    animation: fadeUp 0.8s 0.2s both;
}
.brand-sub {
    font-size: 1rem;
    color: var(--text-muted);
    text-align: center;
    font-style: italic;
    letter-spacing: 0.03em;
    animation: fadeUp 0.8s 0.4s both;
}

.brand-features {
    margin-top: 48px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    max-width: 320px;
    animation: fadeUp 0.8s 0.6s both;
}
.feature-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: var(--glass);
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.07);
    font-size: 0.875rem;
    color: var(--text-muted);
    transition: all 0.3s;
}
.feature-item:hover {
    background: var(--glass-b);
    color: var(--text);
    transform: translateX(4px);
}
.feature-icon {
    width: 36px; height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex; align-items: center; justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}

/* ── Right login panel ── */
.login-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 50px;
}

.login-card {
    width: 100%;
    max-width: 440px;
    background: var(--glass);
    backdrop-filter: blur(30px);
    border-radius: 28px;
    border: 1px solid rgba(255,255,255,0.1);
    padding: 48px 44px;
    box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,0.08);
    animation: cardEntrance 0.9s cubic-bezier(0.34,1.36,0.64,1) 0.1s both;
}
@keyframes cardEntrance {
    from { opacity: 0; transform: translateY(40px) scale(0.95); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.login-header { text-align: center; margin-bottom: 36px; }
.login-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}
.login-header p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ── Form ── */
.form-group {
    margin-bottom: 22px;
    animation: fadeUp 0.6s both;
}
.form-group:nth-child(1) { animation-delay: 0.3s; }
.form-group:nth-child(2) { animation-delay: 0.45s; }
.form-group:nth-child(3) { animation-delay: 0.6s; }

label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.input-wrap { position: relative; }
.input-icon {
    position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.95rem;
    transition: color 0.3s;
    pointer-events: none;
}
.input-wrap:focus-within .input-icon { color: var(--primary); }

input[type="email"],
input[type="password"],
input[type="text"] {
    width: 100%;
    padding: 14px 48px 14px 44px;
    background: rgba(255,255,255,0.06);
    border: 1.5px solid rgba(255,255,255,0.1);
    border-radius: 14px;
    color: var(--text);
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: all 0.3s;
}
input:focus {
    border-color: var(--primary);
    background: rgba(0,196,154,0.08);
    box-shadow: 0 0 0 4px rgba(0,196,154,0.12);
}
input::placeholder { color: rgba(148,163,184,0.5); }
input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 50px #1a2f30 inset;
    -webkit-text-fill-color: var(--text);
}

.toggle-pw {
    position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
    background: none; border: none;
    color: var(--text-muted);
    cursor: pointer; font-size: 0.95rem;
    transition: color 0.3s;
    padding: 4px;
}
.toggle-pw:hover { color: var(--primary); }

/* ── Error alert ── */
.alert-error {
    background: rgba(255,107,107,0.12);
    border: 1px solid rgba(255,107,107,0.35);
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 22px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ff9999;
    font-size: 0.875rem;
    animation: shake 0.4s ease;
}
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%       { transform: translateX(-6px); }
    40%       { transform: translateX(6px); }
    60%       { transform: translateX(-4px); }
    80%       { transform: translateX(4px); }
}

/* ── Submit button ── */
.btn-login {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.04em;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
    box-shadow: 0 8px 30px rgba(0,196,154,0.35);
    animation: fadeUp 0.6s 0.65s both;
}
.btn-login::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(135deg, var(--primary-l), var(--primary));
    opacity: 0;
    transition: opacity 0.3s;
}
.btn-login:hover::before { opacity: 1; }
.btn-login:hover { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(0,196,154,0.5); }
.btn-login:active { transform: translateY(0); }
.btn-login span { position: relative; z-index: 1; }

/* ── Spinner ── */
.spinner {
    display: none;
    width: 20px; height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Footer ── */
.login-footer {
    text-align: center;
    margin-top: 28px;
    font-size: 0.78rem;
    color: rgba(148,163,184,0.5);
}
.login-footer a { color: var(--primary); text-decoration: none; }
.login-footer a:hover { text-decoration: underline; }

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ── */
@media (max-width: 900px) {
    html, body { overflow: auto; }
    .wrapper { grid-template-columns: 1fr; min-height: 100vh; }
    .brand-panel {
        padding: 50px 30px 30px;
        border-bottom: 1px solid rgba(0,196,154,0.2);
    }
    .brand-panel::after { display: none; }
    .brand-logo-wrap img { width: 160px; }
    .brand-title { font-size: 1.5rem; }
    .brand-features { display: none; }
    .login-panel { padding: 30px 20px 50px; }
    .login-card { padding: 36px 28px; }
}
@media (max-width: 480px) {
    .login-card { padding: 28px 20px; border-radius: 20px; }
    .login-header h1 { font-size: 1.4rem; }
}
