:root {
    --primary-color: #3B82F6;
    --primary-hover: #2563EB;
    --primary-light: #EFF6FF;
    --primary-gradient: linear-gradient(135deg, #3B82F6, #2563EB);
    --text-main: #0F172A;
    --text-muted: #64748B;
    --bg-main: #F4F6FA;
    --bg-card: #FFFFFF;
    --border-color: #E2E8F0;

    --success: #10B981;
    --success-bg: #ECFDF5;
    --danger: #EF4444;
    --danger-bg: #FEF2F2;

    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 10px 25px -3px rgba(15, 23, 42, 0.1);
    --shadow-xl: 0 20px 50px -5px rgba(15, 23, 42, 0.15);
    --radius-md: 10px;
    --radius-lg: 14px;
    --transition: all 0.2s ease;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-hover);
}

/* ========================================= */
/* AUTH LAYOUT */
/* ========================================= */
.auth-layout-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 50%, #0F172A 100%);
    position: relative;
    overflow: hidden;
}

.auth-layout-wrapper::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 40%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
                radial-gradient(circle at 70% 60%, rgba(139, 92, 246, 0.06) 0%, transparent 50%);
    animation: bgShift 20s ease-in-out infinite;
}

@keyframes bgShift {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-2%, -2%); }
}

.auth-card {
    background: var(--bg-card);
    width: 100%;
    max-width: 420px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl), 0 0 0 1px rgba(255,255,255,0.05);
    padding: 2.5rem 2rem;
    animation: authSlideUp 0.5s ease-out forwards;
    position: relative;
    z-index: 1;
}

@keyframes authSlideUp {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: var(--primary-gradient);
    color: white;
    border-radius: var(--radius-md);
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
}

.auth-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.5rem;
    letter-spacing: -0.3px;
}

.auth-subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

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

.input-icon {
    position: absolute;
    left: 1rem;
    color: var(--text-muted);
    font-size: 1rem;
    transition: color 0.2s;
}

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

.form-control {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    font-size: 0.95rem;
    font-family: var(--font-family);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--bg-card);
    color: var(--text-main);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.form-control::placeholder {
    color: #94A3B8;
}

.form-error-text {
    display: block;
    color: var(--danger);
    font-size: 0.75rem;
    margin-top: 0.375rem;
    font-weight: 500;
}

.form-control.is-invalid {
    border-color: var(--danger);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
    font-family: var(--font-family);
    gap: 8px;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
    transform: translateY(-1px);
}

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

.auth-footer {
    margin-top: 2rem;
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.auth-footer a {
    font-weight: 600;
}

/* Flash Messages */
.flash-message {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.flash-success {
    background-color: var(--success-bg);
    color: #065F46;
    border: 1px solid #A7F3D0;
}

.flash-error {
    background-color: var(--danger-bg);
    color: #991B1B;
    border: 1px solid #FECACA;
}

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

.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-check-input {
    width: 1rem;
    height: 1rem;
    accent-color: var(--primary-color);
}

.form-check-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    cursor: pointer;
}

/* Separator */
.auth-separator {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.auth-separator::before,
.auth-separator::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}
