/* ==========================================================
   LOGIN PAGE STYLES - CONTROL TOWER
   Innovative Group México (2026)
   ========================================================== */

:root {
    --brand-green-dark: #004d10;
    --brand-green-forest: #005a14;
    --brand-green-vibrant: #16a34a;
    --brand-green-accent: #78be46;
    --brand-green-glow: rgba(120, 190, 70, 0.35);

    --bg-deep: #08110b;
    --bg-card: rgba(255, 255, 255, 0.96);
    --border-card: rgba(226, 232, 240, 0.8);

    --text-heading: #0f172a;
    --text-body: #334155;
    --text-muted: #64748b;

    --font-display: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;

    --danger-bg: #fef2f2;
    --danger-border: #fecaca;
    --danger-text: #b91c1c;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-deep);
    color: var(--text-body);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    position: relative;
    overflow-x: hidden;
    background-image: 
        radial-gradient(circle at 15% 20%, rgba(120, 190, 70, 0.22) 0%, transparent 45%),
        radial-gradient(circle at 85% 80%, rgba(0, 90, 20, 0.35) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(15, 23, 42, 0.95) 0%, #050b07 100%);
    background-attachment: fixed;
}

/* Animated ambient backdrop mesh */
.ambient-mesh {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background: 
        linear-gradient(135deg, rgba(255,255,255,0.02) 0%, rgba(255,255,255,0) 100%);
}

.ambient-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.45;
    animation: floatGlow 14s ease-in-out infinite alternate;
}

.ambient-blob-1 {
    width: 450px;
    height: 450px;
    background: #16a34a;
    top: -100px;
    left: -100px;
}

.ambient-blob-2 {
    width: 500px;
    height: 500px;
    background: #005a14;
    bottom: -150px;
    right: -100px;
    animation-delay: -5s;
}

@keyframes floatGlow {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(40px, 30px) scale(1.08); }
    100% { transform: translate(-30px, 50px) scale(0.95); }
}

/* Login Card Container */
.login-wrapper {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 440px;
    animation: cardEntrance 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes cardEntrance {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.login-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.85);
    border-radius: 28px;
    padding: 44px 38px 36px 38px;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(255, 255, 255, 0.2),
        0 12px 32px -4px rgba(0, 90, 20, 0.15);
    position: relative;
    overflow: hidden;
}

/* Top accent line */
.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--brand-green-forest), var(--brand-green-accent), var(--brand-green-vibrant));
}

/* Header block */
.card-header {
    text-align: center;
    margin-bottom: 30px;
}

.logo-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    padding: 10px 18px;
    border-radius: 16px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
    border: 1px solid #eef2f6;
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}

.logo-wrap:hover {
    transform: translateY(-2px);
}

.logo-img {
    height: 48px;
    width: auto;
    object-fit: contain;
    display: block;
}

.security-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 90, 20, 0.07);
    color: var(--brand-green-forest);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    margin-bottom: 12px;
    border: 1px solid rgba(0, 90, 20, 0.12);
}

.security-badge svg {
    width: 12px;
    height: 12px;
    fill: currentColor;
}

.card-header h1 {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 800;
    color: var(--text-heading);
    letter-spacing: -0.5px;
    margin-bottom: 6px;
}

.card-header p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Alert message */
.alert-box {
    background: var(--danger-bg);
    border: 1px solid var(--danger-border);
    color: var(--danger-text);
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 22px;
    animation: shake 0.4s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

/* Form styling */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
    text-align: left;
}

.form-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-heading);
    letter-spacing: 0.2px;
    text-transform: uppercase;
}

.input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 14px;
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    pointer-events: none;
    transition: color 0.2s ease;
}

.form-input {
    width: 100%;
    height: 48px;
    padding: 0 44px 0 42px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-heading);
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    outline: none;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.form-input::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

.form-input:focus {
    background: #ffffff;
    border-color: var(--brand-green-forest);
    box-shadow: 0 0 0 4px var(--brand-green-glow);
}

.input-container:focus-within .input-icon {
    color: var(--brand-green-forest);
}

.toggle-pwd-btn {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    padding: 6px;
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: color 0.2s ease;
}

.toggle-pwd-btn:hover {
    color: var(--text-heading);
}

/* Submit Button */
.btn-submit {
    margin-top: 10px;
    height: 50px;
    background: linear-gradient(135deg, #005a14 0%, #007a1b 50%, #16a34a 100%);
    color: #ffffff;
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.3px;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    box-shadow: 0 8px 20px -4px rgba(0, 90, 20, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -4px rgba(0, 90, 20, 0.55);
    filter: brightness(1.05);
}

.btn-submit:active {
    transform: translateY(0);
}

.btn-submit svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.2s ease;
}

.btn-submit:hover svg {
    transform: translateX(4px);
}

/* Card footer */
.card-footer {
    margin-top: 26px;
    text-align: center;
    border-top: 1px solid #f1f5f9;
    padding-top: 18px;
}

.security-notice {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    letter-spacing: 0.2px;
}

.security-notice svg {
    width: 13px;
    height: 13px;
    fill: var(--brand-green-forest);
}

.author-credit {
    margin-top: 18px;
    text-align: center;
    font-size: 9.5px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.32);
    font-weight: 500;
    transition: color 0.25s ease, opacity 0.25s ease;
}

.author-credit span {
    color: rgba(255, 255, 255, 0.55);
    font-weight: 600;
}

.author-credit:hover {
    color: rgba(255, 255, 255, 0.6);
}

.author-credit:hover span {
    color: var(--brand-green-accent);
}

/* Responsive */
@media (max-width: 480px) {
    .login-card {
        padding: 32px 22px;
        border-radius: 22px;
    }
    .card-header h1 {
        font-size: 21px;
    }
}
