:root {
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --primary-light: #eef2ff;
    --text-main: #0f172a;
    --text-muted: #64748b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

body {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    position: relative;
    overflow: hidden;
}

.orb-1 {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.12) 0%, rgba(79, 70, 229, 0) 70%);
    top: -150px;
    right: -100px;
    border-radius: 50%;
    z-index: 1;
    filter: blur(50px);
    animation: pulse 8s ease-in-out infinite;
}

.orb-2 {
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 0%, rgba(139, 92, 246, 0) 70%);
    bottom: -100px;
    left: -100px;
    border-radius: 50%;
    z-index: 1;
    filter: blur(50px);
    animation: pulse 10s ease-in-out infinite reverse;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.1);
        opacity: 1;
    }
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 2.5rem;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    border-radius: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(255, 255, 255, 0.4) inset;
    z-index: 10;
    animation: floatUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes floatUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.brand-header {
    text-align: center;
    margin-bottom: 2rem;
}

.brand-logo {
    width: 56px;
    height: 56px;
    background: var(--primary);
    color: white;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    box-shadow: 0 10px 25px -5px rgba(79, 70, 229, 0.35);
}

.brand-logo i {
    width: 28px;
    height: 28px;
}

.brand-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.brand-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.4rem;
    font-weight: 500;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper i {
    position: absolute;
    left: 1rem;
    color: #94a3b8;
    width: 18px;
    height: 18px;
    transition: color 0.2s;
}

.form-control {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 2.75rem;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-main);
    transition: all 0.2s;
}

.form-control::placeholder {
    color: #94a3b8;
}

.form-control:focus {
    outline: none;
    background: white;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-light);
}

.btn-submit {
    width: 100%;
    padding: 0.9rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 0.75rem;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 0.5rem;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-submit:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.3);
}

.btn-submit:disabled {
    opacity: 0.75;
    cursor: not-allowed;
    transform: none !important;
}

.input-wrapper .toggle-password {
    position: absolute;
    right: 0.75rem;
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 0.35rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.375rem;
    transition: color 0.2s, background-color 0.2s;
    z-index: 2;
}

.input-wrapper .toggle-password:hover {
    color: var(--primary);
    background: var(--primary-light);
}

.input-wrapper .toggle-password i,
.input-wrapper .toggle-password svg {
    position: static;
    width: 18px;
    height: 18px;
}

.has-toggle {
    padding-right: 2.85rem !important;
}

.options-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    font-size: 0.8rem;
}

.remember-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: var(--text-main);
    font-weight: 600;
    user-select: none;
}

.remember-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
    border-radius: 4px;
}

.pin-hint {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.65rem 0.85rem;
    border-radius: 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    line-height: 1.4;
}

.pin-hint i,
.pin-hint svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: #15803d;
}

.animate-spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.alert-error {
    background: #fef2f2;
    color: #dc2626;
    padding: 0.85rem;
    border-radius: 0.5rem;
    border: 1px solid #fecaca;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: shake 0.3s ease;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

.admin-link {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.admin-link a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.admin-link a:hover {
    color: var(--primary-dark);
}

.forgot-link {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    transition: all 0.2s;
}

.forgot-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
    margin-top: 1.25rem;
}

.back-link:hover {
    color: var(--primary);
}