@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --bg-brand: #ffffff;
    --bg-auth: #f8fafc;
    --text-dark: #0f172a;
    --text-muted: #64748b;
    --primary: #000000;
    --primary-hover: #333333;
    --border-color: #e2e8f0;
    --error: #ef4444;
    --success: #10b981;
    --focus-ring: rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    min-height: 100vh;
    background-color: var(--bg-auth);
    overflow-x: hidden;
}

.split-layout {
    display: flex;
    min-height: 100vh;
}

.brand-panel {
    flex: 1;
    background-color: var(--bg-brand);
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid var(--border-color);
    padding: 2rem;
}

.brand-wrapper { text-align: center; }

.logo {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--text-dark);
    letter-spacing: -0.05em;
    margin-bottom: 0.5rem;
}

.tagline {
    font-size: 1.2rem;
    color: var(--text-muted);
    font-weight: 400;
}

.auth-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.form-wrapper {
    background: #ffffff;
    width: 100%;
    max-width: 420px;
    padding: 2.5rem;
    border-radius: 1.5rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.03);
    position: relative;
}

.auth-step {
    display: none;
    opacity: 0;
    transform: translateX(20px);
    animation: slideIn 0.4s forwards cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-step.active { display: block; }

@keyframes slideIn { to { opacity: 1; transform: translateX(0); } }

h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.subtext {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 2rem;
    line-height: 1.4;
}

.input-box {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
}

.input-box label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.input-box input, .input-box select {
    padding: 0.85rem 1rem;
    border: 1.5px solid var(--border-color);
    border-radius: 0.75rem;
    font-size: 1rem;
    color: var(--text-dark);
    background-color: white;
    transition: all 0.2s ease;
    width: 100%;
}

.input-box select { appearance: none; cursor: pointer; }

.input-box input:focus, .input-box select:focus {
    outline: none;
    border-color: var(--text-dark);
    box-shadow: 0 0 0 4px var(--focus-ring);
}

.hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.4rem;
}

.row-box {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.row-box .input-box { margin-bottom: 0; }
.half { flex: 1; }

input[type="date"] { font-family: 'Inter', sans-serif; }

.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper input { padding-right: 3rem; }

.toggle-password {
    position: absolute;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.toggle-password:hover { color: var(--text-dark); }

.link-small {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
}
.link-small:hover { color: var(--text-dark); text-decoration: underline; }

.primary-btn {
    width: 100%;
    padding: 0.9rem;
    background-color: var(--primary);
    color: #ffffff;
    border: none;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 1rem;
}

.primary-btn:hover:not(:disabled) { background-color: var(--primary-hover); }
.primary-btn:active:not(:disabled) { transform: scale(0.98); }
.primary-btn:disabled { background-color: var(--text-muted); opacity: 0.6; cursor: not-allowed; }

.text-btn {
    width: 100%;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    margin-top: 1.5rem;
    cursor: pointer;
}
.text-btn:hover { color: var(--text-dark); }

.error-message {
    color: var(--error);
    font-size: 0.85rem;
    margin-top: -0.5rem;
    margin-bottom: 0.5rem;
    text-align: center;
    min-height: 1.2em;
}

.badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 1rem;
    font-weight: 600;
}
.badge.available { background: #d1fae5; color: var(--success); }
.badge.taken { background: #fee2e2; color: var(--error); }
.badge.checking { background: #f1f5f9; color: var(--text-muted); }

@media (max-width: 850px) {
    .split-layout { flex-direction: column; }
    .brand-panel { 
        flex: none; 
        padding: 3rem 1.5rem; 
        border-right: none; 
        border-bottom: 1px solid var(--border-color); 
    }
    .logo { font-size: 2.8rem; }
    .auth-panel { flex: 1; padding: 1.5rem; align-items: flex-start; }
    .form-wrapper { padding: 1.5rem; box-shadow: none; border: 1px solid var(--border-color); }
    .row-box { flex-direction: column; gap: 1.5rem; }
}