@import url('https://fonts.googleapis.com/css2?family=Sora:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800&display=swap');

:root {
    --bg-cream: #FAF7F2;
    --bg-ivory: #F5F0E8;
    --bg-warm: #EDE6DB;
    --bg-sand: #E3D9CC;
    --coffee-50: #FAF5F0;
    --coffee-100: #F0E6DA;
    --coffee-200: #DBC8B0;
    --coffee-300: #C4A882;
    --coffee-400: #A68B5B;
    --coffee-500: #8B6914;
    --coffee-600: #7A5D30;
    --coffee-700: #5C4324;
    --mocha-500: #6F4E37;
    --mocha-600: #5D3F2D;
    --mocha-700: #4A3223;
    --text-dark: #3D2E1E;
    --text-medium: #5C4A38;
    --text-light: #8B7A68;
    --text-muted: #A99B8A;
    --border-light: rgba(61, 46, 30, 0.08);
    --border-medium: rgba(61, 46, 30, 0.12);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    min-height: 100vh;
    display: flex;
    background: var(--bg-cream);
    color: var(--text-dark);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.login-container {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

.decorative-panel {
    flex: 0 0 45%;
    background: linear-gradient(160deg, var(--mocha-500) 0%, var(--mocha-600) 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px;
}

.decorative-panel::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    top: -150px;
    right: -150px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 60% 40% 70% 30% / 40% 50% 50% 60%;
    animation: blobMorph 15s ease-in-out infinite;
}

.decorative-panel::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    bottom: -100px;
    left: -100px;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 40% 60% 30% 70% / 50% 40% 60% 50%;
    animation: blobMorph 20s ease-in-out infinite reverse;
}

@keyframes blobMorph {
    0%, 100% { border-radius: 60% 40% 70% 30% / 40% 50% 50% 60%; }
    25% { border-radius: 50% 50% 40% 60% / 60% 40% 60% 40%; }
    50% { border-radius: 40% 60% 50% 50% / 50% 60% 40% 60%; }
    75% { border-radius: 70% 30% 60% 40% / 40% 50% 60% 50%; }
}

.pattern-overlay {
    position: absolute;
    inset: 0;
    opacity: 0.05;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.brand-content {
    position: relative;
    z-index: 10;
    text-align: center;
    color: white;
}

.brand-logo {
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 32px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    animation: logoFloat 6s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.brand-logo svg {
    width: 50px;
    height: 50px;
    fill: white;
}

.brand-title {
    font-family: 'Sora', sans-serif;
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}

.brand-tagline {
    font-size: 1.1rem;
    font-weight: 400;
    opacity: 0.9;
    letter-spacing: 0.05em;
}

.floating-shapes {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.shape {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.shape-1 {
    width: 20px;
    height: 20px;
    top: 20%;
    left: 20%;
    animation: floatShape 8s ease-in-out infinite;
}

.shape-2 {
    width: 14px;
    height: 14px;
    top: 60%;
    left: 70%;
    animation: floatShape 10s ease-in-out infinite 1s;
}

.shape-3 {
    width: 24px;
    height: 24px;
    top: 75%;
    left: 25%;
    animation: floatShape 12s ease-in-out infinite 2s;
}

.shape-4 {
    width: 16px;
    height: 16px;
    top: 30%;
    left: 80%;
    animation: floatShape 9s ease-in-out infinite 0.5s;
}

@keyframes floatShape {
    0%, 100% { transform: translate(0, 0) rotate(0deg); opacity: 0.6; }
    25% { transform: translate(10px, -20px) rotate(90deg); opacity: 0.8; }
    50% { transform: translate(-5px, -40px) rotate(180deg); opacity: 0.6; }
    75% { transform: translate(15px, -20px) rotate(270deg); opacity: 0.8; }
}

.form-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: var(--bg-cream);
    position: relative;
}

.form-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.02;
    pointer-events: none;
}

.login-card {
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 10;
    animation: cardSlideIn 700ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
    transform: translateX(30px);
}

@keyframes cardSlideIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.logo {
    text-align: center;
    margin-bottom: 40px;
    display: none;
}

.logo h1 {
    font-family: 'Sora', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--mocha-500);
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.logo p {
    font-size: 0.9rem;
    color: var(--text-light);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 500;
}

.form-header {
    margin-bottom: 40px;
    animation: fadeSlideUp 500ms ease-out 200ms backwards;
}

@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
}

.form-header h2 {
    font-family: 'Sora', sans-serif;
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 10px;
    letter-spacing: -0.01em;
}

.form-header p {
    font-size: 1rem;
    color: var(--text-light);
    line-height: 1.6;
}

.form-group {
    margin-bottom: 24px;
    animation: fadeSlideUp 500ms ease-out backwards;
}

.form-group:nth-child(1) { animation-delay: 300ms; }
.form-group:nth-child(2) { animation-delay: 400ms; }

.form-label {
    display: block;
    margin-bottom: 10px;
    color: var(--text-medium);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.form-input {
    width: 100%;
    padding: 16px 20px;
    background: #FFFFFF;
    border: 2px solid #3d2e1e91;
    border-radius: 12px;
    color: #3D2E1E;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    transition: all 250ms cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(45, 41, 38, 0.08);
}

.form-input:hover {
    border-color: #B8A898;
    box-shadow: 0 4px 12px rgba(45, 41, 38, 0.1);
}

.form-input:focus {
    outline: none;
    border-color: #6F4E37;
    box-shadow:
        0 0 0 4px rgba(111, 78, 55, 0.1),
        0 4px 16px rgba(111, 78, 55, 0.15);
}

.form-input::placeholder {
    color: #A99B8A;
    font-weight: 400;
}

.form-checkbox {
    display: flex;
    align-items: center;
    margin-bottom: 32px;
    animation: fadeSlideUp 500ms ease-out 500ms backwards;
}

.form-checkbox input {
    appearance: none;
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    background: white;
    border: 2px solid var(--border-medium);
    border-radius: 6px;
    margin-right: 12px;
    cursor: pointer;
    position: relative;
    transition: all 200ms;
    flex-shrink: 0;
}

.form-checkbox input:hover {
    border-color: var(--mocha-500);
}

.form-checkbox input:checked {
    background: var(--mocha-500);
    border-color: var(--mocha-500);
}

.form-checkbox input:checked::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 11px;
    border: solid white;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg);
    animation: checkBounce 250ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes checkBounce {
    0% { transform: rotate(45deg) scale(0); }
    60% { transform: rotate(45deg) scale(1.1); }
    100% { transform: rotate(45deg) scale(1); }
}

.form-checkbox label {
    color: var(--text-light);
    font-size: 0.95rem;
    cursor: pointer;
    user-select: none;
    transition: color 200ms;
}

.form-checkbox label:hover {
    color: var(--text-medium);
}

.btn {
    width: 100%;
    padding: 18px 32px;
    background: #6F4E37;
    color: #FFFFFF !important;
    border: none;
    border-radius: 12px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 4px 16px rgba(111, 78, 55, 0.25),
        0 2px 4px rgba(111, 78, 55, 0.1);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.25) 50%,
        transparent 100%
    );
    transition: left 600ms ease;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    background: #5D3F2D;
    transform: translateY(-3px);
    box-shadow:
        0 8px 24px rgba(111, 78, 55, 0.35),
        0 4px 8px rgba(111, 78, 55, 0.15);
}

.btn:active {
    transform: translateY(-1px);
    box-shadow:
        0 4px 12px rgba(111, 78, 55, 0.25),
        0 2px 4px rgba(111, 78, 55, 0.1);
}

.btn.loading {
    pointer-events: none;
    opacity: 0.85;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    top: 50%;
    left: 50%;
    margin: -11px 0 0 -11px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.alert {
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 28px;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.5;
    display: flex;
    align-items: center;
    gap: 14px;
    animation: alertShake 400ms cubic-bezier(0.36, 0.07, 0.19, 0.97);
    position: relative;
    overflow: hidden;
}

@keyframes alertShake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
    20%, 40%, 60%, 80% { transform: translateX(4px); }
}

.alert::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
}

.alert-success {
    background: #ECFDF5;
    color: #047857;
}
.alert-success::before { background: #10B981; }

.alert-error {
    background: #FEF2F2;
    color: #B91C1C;
}
.alert-error::before { background: #EF4444; }

.alert-warning {
    background: #FFFBEB;
    color: #B45309;
}
.alert-warning::before { background: #F59E0B; }

.alert-info {
    background: #EFF6FF;
    color: #1D4ED8;
}
.alert-info::before { background: #3B82F6; }

.footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 28px;
    border-top: 1px solid var(--border-light);
    color: var(--text-light);
    font-size: 0.85rem;
    animation: fadeSlideUp 500ms ease-out 700ms backwards;
}

.footer p {
    line-height: 1.6;
}

.footer strong {
    color: var(--mocha-500);
    font-weight: 600;
}

@media (max-width: 900px) {
    body {
        background: var(--bg-cream);
    }

    .login-container {
        flex-direction: column;
    }

    .decorative-panel {
        display: none;
    }

    .form-panel {
        padding: 32px 24px;
        min-height: 100vh;
    }

    .login-card {
        max-width: 100%;
    }

    .logo {
        display: block;
    }

    .form-header h2 {
        font-size: 1.75rem;
    }
}

@media (max-width: 480px) {
    .form-panel {
        padding: 24px 20px;
    }

    .logo h1 {
        font-size: 2rem;
    }

    .form-input {
        padding: 14px 16px;
    }

    .btn {
        padding: 16px 24px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.form-input:focus-visible,
.btn:focus-visible,
.form-checkbox input:focus-visible {
    outline: 2px solid var(--mocha-500);
    outline-offset: 2px;
}

@media (prefers-color-scheme: dark) {
}
