:root {
    --primary: #4f46e5;
    --primary-dark: #3730a3;
    --accent: #f59e0b;
    --dark: #0f172a;
    --glass: rgba(255, 255, 255, 0.95);
    --glass-border: rgba(255, 255, 255, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html,
body {
    height: 100%;
    font-family: 'Plus Jakarta Sans', sans-serif;
    overflow: hidden;
}

/* Base background overlay is handled in View because it uses PHP base_url */

.login-wrapper {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 440px;
    perspective: 1000px;
}

.login-card {
    background: var(--glass);
    backdrop-filter: blur(20px);
    border-radius: 32px;
    padding: 2.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--glass-border);
    text-align: center;
}

/* Logo Area */
.brand-area {
    margin-bottom: 2rem;
}

.logo-circle {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.4);
    margin-bottom: 1rem;
    transform: rotate(-10deg);
    transition: all 0.3s ease;
}

.logo-circle:hover {
    transform: rotate(0deg) scale(1.1);
}

.logo-circle i {
    font-size: 2rem;
    color: #fff;
}

.brand-name {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--dark);
    text-transform: uppercase;
    letter-spacing: -0.5px;
    margin-bottom: 0.25rem;
}

.brand-motto {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 500;
}

/* Greeting Section */
.greeting-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f1f5f9;
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 2rem;
}

/* Form Controls */
.form-floating-custom {
    position: relative;
    margin-bottom: 1.25rem;
    text-align: left;
}

.form-floating-custom label {
    display: block;
    font-size: 0.813rem;
    font-weight: 700;
    color: #475569;
    margin-bottom: 8px;
    margin-left: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-group-custom {
    position: relative;
    display: flex;
    align-items: center;
}

.input-group-custom i.main-icon {
    position: absolute;
    left: 1rem;
    font-size: 1.25rem;
    color: #94a3b8;
    transition: color 0.3s ease;
}

.form-input-premium {
    width: 100%;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 1rem 1rem 1rem 3rem;
    font-size: 1rem;
    font-weight: 500;
    color: var(--dark);
    transition: all 0.3s ease;
}

.form-input-premium:focus {
    outline: none;
    background: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.form-input-premium:focus+i.main-icon {
    color: var(--primary);
}

.password-toggle {
    position: absolute;
    right: 0.75rem;
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 1.25rem;
    padding: 8px;
    cursor: pointer;
    z-index: 2;
}

/* Utilities */
.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 500;
}

.remember-me input {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    accent-color: var(--primary);
    cursor: pointer;
}

/* Button */
.btn-submit {
    width: 100%;
    background: linear-gradient(to right, var(--primary), var(--primary-dark));
    color: #fff;
    border: none;
    border-radius: 16px;
    padding: 1.125rem;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.3);
    transition: all 0.3s ease;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(79, 70, 229, 0.4);
}

.btn-submit:active {
    transform: translateY(0);
}

/* Alerts */
.alert-custom {
    padding: 1rem;
    border-radius: 16px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.875rem;
    font-weight: 500;
    animation: shakeX 0.5s;
}

.alert-error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fee2e2;
}

.alert-success {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #dcfce7;
}

/* Footer */
.login-footer {
    margin-top: 2rem;
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* Responsive Adjustments */
@media (max-width: 480px) {
    body {
        align-items: flex-end;
        padding: 0;
    }

    .login-wrapper {
        max-width: 100%;
    }

    .login-card {
        border-radius: 40px 40px 0 0;
        padding: 2.5rem 1.5rem;
        padding-bottom: calc(2.5rem + env(safe-area-inset-bottom));
        box-shadow: 0 -10px 25px rgba(0, 0, 0, 0.1);
    }

    .brand-area {
        margin-top: -1.5rem;
    }
}

@media (min-width: 1024px) {
    .login-card {
        padding: 3.5rem;
    }
}

/* Micro-animations */
@keyframes shakeX {

    0%,
    100% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-5px);
    }

    40% {
        transform: translateX(5px);
    }

    60% {
        transform: translateX(-5px);
    }

    80% {
        transform: translateX(5px);
    }
}