:root {
    --primary: #1F4E79;
    --primary-light: #E6EEF5;
    --primary-dark: #164060;
    --accent: #1D6A5B;
    --success: #3B6D11;
    --danger: #A32D2D;
    --danger-light: #FCEBEB;
    --bg: #F7F8FA;
    --surface: #FFFFFF;
    --text-primary: #1A1A1A;
    --text-secondary: #6B7280;
    --text-tertiary: #9CA3AF;
    --border: #E5E7EB;
    
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, system-ui, sans-serif;
    background-color: var(--bg);
    color: var(--text-primary);
}

.auth-wrapper {
    display: grid;
    grid-template-columns: 1fr 400px;
    min-height: 100vh;
}

@media (min-width: 1200px) {
    .auth-wrapper { grid-template-columns: 1fr 500px; }
}

/* Left side - Form */
.auth-left {
    display: flex;
    justify-content: center;
    padding: 40px 20px;
    background: var(--surface);
    overflow-y: auto;
}

.auth-form-container {
    width: 100%;
    max-width: 480px;
    display: flex;
    flex-direction: column;
}

.auth-logo { margin-bottom: 32px; }

h1 {
    font-size: 28px;
    font-weight: 600;
    margin: 0 0 8px 0;
}

.subtitle {
    color: var(--text-secondary);
    margin-bottom: 32px;
}

/* Form Elements */
.auth-form .form-group { margin-bottom: 24px; }

.auth-form label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
}

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="number"] {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
}

.auth-form input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(31, 78, 121, 0.12);
}

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

/* Custom Cards */
.legal-form-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.legal-card {
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    padding: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 13px;
}

.legal-card input { display: none; }
.legal-card:has(input:checked) {
    border-color: var(--primary);
    background-color: var(--primary-light);
    color: var(--primary-dark);
}

.division-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.division-card {
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.division-card input { display: none; }
.division-card .card-content {
    display: flex;
    gap: 16px;
    align-items: center;
}

.division-card .emoji { font-size: 24px; }
.division-card .text strong { display: block; font-size: 15px; margin-bottom: 2px; }
.division-card .text p { margin: 0; font-size: 13px; color: var(--text-secondary); }

.division-card:hover { border-color: var(--primary); }
.division-card:has(input:checked) {
    border-color: var(--primary);
    background-color: var(--primary-light);
}

/* Password Input */
.password-input-wrapper { position: relative; }
.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
}

/* Strength Meter */
.strength-meter {
    display: flex;
    gap: 4px;
    margin-top: 8px;
    align-items: center;
}

.strength-meter .bar {
    flex: 1;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    transition: background 0.3s;
}

.strength-meter .strength-text {
    font-size: 12px;
    margin-left: 8px;
    color: var(--text-secondary);
    min-width: 60px;
}

.strength-meter[data-strength="1"] .bar:nth-child(1) { background: var(--danger); }
.strength-meter[data-strength="2"] .bar:nth-child(-n+2) { background: #EAB308; }
.strength-meter[data-strength="3"] .bar:nth-child(-n+3) { background: var(--success); }

/* Checkbox */
.checkbox-container {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.checkbox-container input { display: none; }
.checkmark {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    display: inline-block;
    border: 2px solid var(--primary);
    border-radius: 4px;
    position: relative;
    top: 1px;
    transition: all 0.2s;
    background: white;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.checkbox-container:hover .checkmark { border-color: var(--primary); }
.checkbox-container input:checked + .checkmark {
    background-color: var(--primary);
    border-color: var(--primary);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 5px;
    top: 2px;
    width: 5px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-container input:checked + .checkmark:after { display: block; }
.label-text { font-size: 13px; line-height: 1.5; color: var(--text-secondary); }
.label-text a { color: var(--primary); text-decoration: none; font-weight: 500; }

/* Buttons */
.btn {
    width: 100%;
    height: 48px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover { background-color: var(--primary-dark); }
.btn-primary:active { transform: scale(0.99); }

/* Right side - Branding */
.auth-right {
    background-color: var(--primary);
    color: white;
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.branding-content h2 { font-size: 32px; margin-bottom: 32px; line-height: 1.2; }
.benefits { list-style: none; padding: 0; }
.benefits li {
    margin-bottom: 20px;
    font-size: 18px;
    display: flex;
    gap: 12px;
}
.benefits li::before { content: "✓"; color: #8BE3FF; font-weight: bold; }

.copyright {
    position: absolute;
    bottom: 40px;
    left: 60px;
    font-size: 14px;
    color: rgba(255,255,255,0.6);
}

/* Footer */
.auth-footer {
    margin-top: 24px;
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
}
.auth-footer a { color: var(--primary); text-decoration: none; font-weight: 600; }

.error { color: var(--danger); font-size: 12px; margin-top: 4px; }
.alert { padding: 12px; border-radius: var(--radius-md); margin-bottom: 20px; font-size: 14px; }
.alert-danger { background: var(--danger-light); color: var(--danger); border: 1px solid rgba(163, 45, 45, 0.2); }

@media (max-width: 900px) {
    .auth-wrapper { grid-template-columns: 1fr; }
    .auth-right { display: none; }
    .form-row { grid-template-columns: 1fr; }
}
