/* TeleCare+ — unified login */
:root {
    --login-sidebar: #1e2235;
    --login-accent: #4361ee;
    --login-accent-light: #3a86ff;
    --login-text: #1f2937;
    --login-muted: #6b7280;
    --login-border: #e5e7eb;
}

* { box-sizing: border-box; }

.login-page {
    margin: 0;
    min-height: 100vh;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    display: flex;
    background: #f4f6fb;
}

.login-brand-panel {
    flex: 1;
    background: linear-gradient(160deg, #1e2235 0%, #2a3050 45%, #4361ee 100%);
    color: #fff;
    padding: 48px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.login-brand-panel::before {
    content: '';
    position: absolute;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: rgba(255,255,255,0.04);
    top: -120px;
    right: -80px;
}

.login-brand-panel::after {
    content: '';
    position: absolute;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: rgba(255,255,255,0.03);
    bottom: -60px;
    left: -40px;
}

.login-brand-content {
    position: relative;
    z-index: 1;
}

.login-logo {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 48px;
}

.login-logo-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, #4361ee, #3a86ff);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

.login-logo span {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.login-brand-panel h1 {
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    line-height: 1.25;
    margin: 0 0 16px;
    font-weight: 700;
}

.login-brand-panel > .login-brand-content > p {
    color: rgba(255,255,255,0.78);
    font-size: 1.05rem;
    line-height: 1.65;
    max-width: 420px;
    margin: 0 0 36px;
}

.login-features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.login-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    color: rgba(255,255,255,0.88);
    font-size: 0.95rem;
}

.login-features li i {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}

.login-brand-footer {
    position: relative;
    z-index: 1;
    color: rgba(255,255,255,0.5);
    font-size: 0.85rem;
}

.login-form-panel {
    width: 100%;
    max-width: 520px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 32px;
    background: #fff;
}

.login-form-wrap {
    width: 100%;
    max-width: 380px;
}

.login-form-wrap h2 {
    margin: 0 0 8px;
    font-size: 1.65rem;
    color: var(--login-text);
}

.login-form-wrap .login-subtitle {
    color: var(--login-muted);
    margin: 0 0 28px;
    font-size: 0.95rem;
}

.login-role-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
}

.login-role-tag {
    padding: 6px 12px;
    border-radius: 999px;
    background: #f3f4f6;
    color: var(--login-muted);
    font-size: 0.78rem;
    font-weight: 600;
}

.login-role-tag i {
    margin-right: 4px;
    color: var(--login-accent);
}

.login-alert {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.login-alert-success {
    background: #ecfdf5;
    color: #065f46;
    border-color: #a7f3d0;
}

.login-forgot {
    margin: -8px 0 16px;
    text-align: right;
    font-size: 0.88rem;
}

.login-forgot a {
    color: var(--login-accent);
    text-decoration: none;
    font-weight: 500;
}

.login-forgot a:hover {
    text-decoration: underline;
}

.login-form-wrap .login-field + .login-field {
    margin-top: 0;
}

.login-field {
    margin-bottom: 18px;
}

.login-field label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--login-text);
}

.login-field input {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid var(--login-border);
    border-radius: 10px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.login-field input:focus {
    outline: none;
    border-color: var(--login-accent);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.12);
}

.login-submit {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--login-accent), var(--login-accent-light));
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.login-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(67, 97, 238, 0.35);
}

.login-links {
    margin-top: 28px;
    text-align: center;
    font-size: 0.9rem;
    color: var(--login-muted);
}

.login-links a {
    color: var(--login-accent);
    text-decoration: none;
    font-weight: 600;
}

.login-links a:hover { text-decoration: underline; }

.login-links p { margin: 8px 0; }

.login-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 24px;
    color: var(--login-muted);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
}

.login-back:hover { color: var(--login-accent); }

/* Registration — wider form panel */
.auth-register-page .login-form-panel {
    flex: 1.4;
    overflow-y: auto;
}

.auth-register-wrap {
    max-width: 720px;
}

.auth-section-title {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--login-muted);
    margin: 28px 0 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--login-border);
    display: flex;
    align-items: center;
    gap: 8px;
}

.auth-section-title:first-of-type {
    margin-top: 0;
}

.auth-section-title i { color: var(--login-accent); }

.auth-form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 14px;
}

.auth-form-row .login-field { margin-bottom: 0; }

.auth-form-field--full {
    grid-column: 1 / -1;
}

.auth-register-wrap .login-field input,
.auth-register-wrap .login-field select,
.auth-register-wrap .login-field textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--login-border);
    border-radius: 10px;
    font-size: 0.95rem;
    font-family: inherit;
    background: #fff;
    color: var(--login-text);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-register-wrap .login-field textarea {
    min-height: 96px;
    resize: vertical;
    line-height: 1.5;
}

.auth-register-wrap .login-field select {
    appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.auth-register-wrap .login-field input:focus,
.auth-register-wrap .login-field select:focus,
.auth-register-wrap .login-field textarea:focus {
    outline: none;
    border-color: var(--login-accent);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.12);
}

.auth-register-wrap .login-field input:-webkit-autofill,
.auth-register-wrap .login-field input:-webkit-autofill:hover,
.auth-register-wrap .login-field input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #fff inset;
    box-shadow: 0 0 0 1000px #fff inset;
    -webkit-text-fill-color: var(--login-text);
    caret-color: var(--login-text);
    border: 1px solid var(--login-border);
}

.auth-register-wrap .login-field input::placeholder,
.auth-register-wrap .login-field textarea::placeholder {
    color: #9ca3af;
}

.auth-required::after {
    content: ' *';
    color: #ef4444;
}

.auth-terms {
    font-size: 0.85rem;
    color: var(--login-muted);
    margin: 16px 0;
}

@media (max-width: 900px) {
    .login-page { flex-direction: column; }
    .login-brand-panel {
        padding: 32px 24px;
        min-height: auto;
    }
    .login-brand-panel h1 { font-size: 1.5rem; }
    .login-features { display: none; }
    .login-form-panel {
        max-width: none;
        padding: 32px 24px 48px;
    }
    .auth-form-row {
        grid-template-columns: 1fr;
    }
    .auth-form-field--full {
        grid-column: auto;
    }
}
