:root {
    --primary-color: #691c32;
    --primary-hover: #4d1525;
    --secondary-color: #9f2241;
    --text-main: #2d3436;
    --text-muted: #636e72;
    --bg-card: rgba(255, 255, 255, 0.85);
    --border-glass: rgba(255, 255, 255, 0.4);
    --shadow-premium: 0 25px 50px -12px rgba(105, 27, 49, 0.2);
    --transition-smooth: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    position: relative;
    overflow-x: hidden;
}

/* Background Overlay */
.bg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(105, 27, 49, 0.7) 0%, rgba(30, 41, 59, 0.5) 100%);
    backdrop-filter: blur(4px);
    z-index: 1;
}

.login-wrapper {
    position: relative;
    z-index: 10;
    width: 100%;
    padding: 20px;
    display: flex;
    justify-content: center;
    animation: fadeIn 0.8s ease-out;
}

.login-container {
    width: 100%;
    max-width: 440px;
}

.login-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border-radius: 24px;
    border: 1px solid var(--border-glass);
    box-shadow: var(--shadow-premium);
    padding: 3rem 2.5rem;
    position: relative;
    overflow: hidden;
    transition: var(--transition-smooth);
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

/* Header Section */
.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.brand-logo {
    width: 120px;
    height: 120px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    padding: 15px;
    transition: var(--transition-smooth);
}

.brand-logo:hover {
    transform: scale(1.05) rotate(2deg);
}

.brand-logo img {
    max-width: 100%;
    height: auto;
}

.brand-name {
    font-size: 1.75rem;
    font-weight: 800;
    color: #1e293b;
    letter-spacing: -0.025em;
    margin-bottom: 0.5rem;
}

.brand-subtitle {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* Form Controls */
.form-floating {
    margin-bottom: 1.25rem;
}

.form-floating > .form-control,
.form-floating > .form-select {
    height: 58px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 14px;
    padding-left: 3.25rem;
    font-size: 1rem;
    color: var(--text-main);
    transition: var(--transition-smooth);
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.form-floating > label {
    padding-left: 3.25rem;
    color: var(--text-muted);
}

.form-floating > .form-control:focus,
.form-floating > .form-select:focus {
    background: #fff;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(105, 27, 49, 0.15);
    outline: none;
}

.input-icon {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    z-index: 10;
    font-size: 1.1rem;
    transition: var(--transition-smooth);
}

.form-floating:focus-within .input-icon {
    color: var(--primary-color);
}

/* Buttons */
.btn-submit {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
    border: none;
    border-radius: 14px;
    padding: 1rem;
    font-weight: 600;
    font-size: 1rem;
    width: 100%;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 10px 15px -3px rgba(105, 27, 49, 0.3);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(105, 27, 49, 0.4);
    filter: brightness(1.1);
}

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

.btn-ghost {
    background: transparent;
    color: var(--primary-color);
    border: none;
    padding: 0.75rem;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition-smooth);
    border-radius: 10px;
}

.btn-ghost:hover {
    background: rgba(105, 27, 49, 0.08);
}

/* Footer */
.login-footer {
    margin-top: 2.5rem;
    text-align: center;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding-top: 1.5rem;
}

.login-footer p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.version-tag {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Custom Checkbox/Radio if needed */
.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* SweetAlert customization */
.swal2-popup {
    border-radius: 20px !important;
    font-family: 'Inter', sans-serif !important;
}

/* Mobile adjustments */
@media (max-width: 480px) {
    .login-card {
        padding: 2rem 1.5rem;
    }
    .brand-logo {
        width: 100px;
        height: 100px;
    }
}
