/* --- Variables --- */
:root {
    --primary: #10b981;
    --primary-hover: #059669;
    --bg-surface: #ffffff;
    --bg-app: #f1f5f9;
    --text-main: #111827;
    --text-muted: #6b7280;
    --border: #e2e8f0;
    --ring: rgba(16, 185, 129, 0.2);
}

body {
    background-color: var(--bg-app);
}

/* --- Layout --- */
.auth-wrapper {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-card {
    background: var(--bg-surface);
    width: 100%;
    max-width: 480px;
    padding: 40px;
    border-radius: 24px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--border);
}

/* --- Header --- */
.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.icon-bg {
    width: 56px;
    height: 56px;
    background: #d1fae5;
    color: var(--primary);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.auth-header h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 0 0 8px 0;
}

.auth-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin: 0;
}

/* --- Form Elements --- */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: flex;
    gap: 16px;
}
.form-row .input-group { flex: 1; }

.input-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

/* Input with Icon Wrapper */
.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    pointer-events: none;
}

.form-input {
    width: 100%;
    padding: 12px 12px 12px 40px; /* Space for icon */
    border-radius: 10px;
    border: 1px solid var(--border);
    font-size: 0.95rem;
    color: var(--text-main);
    transition: all 0.2s;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--ring);
}

/* --- Role Selector (Custom Grid) --- */
.role-grid {
    display: flex;
    gap: 10px;
}

.role-option {
    flex: 1;
    cursor: pointer;
}

/* Hide default radio button */
.role-radio {
    display: none;
}

/* Custom Card Look */
.role-card {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    transition: all 0.2s;
    background: #f9fafb;
}

.role-name {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Selected State */
.role-radio:checked + .role-card {
    border-color: var(--primary);
    background: #ecfdf5; /* Light Green */
    color: var(--primary);
}

.role-radio:checked + .role-card .role-name {
    color: #065f46;
    font-weight: 700;
}

/* --- Buttons --- */
.form-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
}

.btn-submit {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.3);
    transition: transform 0.1s;
}

.btn-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 8px -1px rgba(16, 185, 129, 0.4);
}

.btn-cancel {
    text-align: center;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}
.btn-cancel:hover { color: var(--text-main); }

/* --- Error Banner --- */
.error-banner {
    background: #fee2e2;
    color: #b91c1c;
    padding: 12px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Mobile */
@media (max-width: 480px) {
    .auth-card { padding: 24px; }
    .form-row { flex-direction: column; gap: 20px; }
}