:root {
    --primary: #1010d8;
    --primary-600: #0c0cbb;
    --primary-700: #080895;
    --primary-soft: #eeeeff;
    --ink: #172033;
    --muted: #667085;
    --muted-2: #98a2b3;
    --surface: #ffffff;
    --surface-2: #f7f8fc;
    --surface-3: #eef1f7;
    --border: #e5e9f2;
    --success: #168455;
    --warning: #b77900;
    --orange: #d85b14;
    --danger: #c63737;
    --shadow-sm: 0 1px 3px rgba(21, 33, 61, .08), 0 8px 22px rgba(21, 33, 61, .05);
    --shadow-md: 0 20px 50px rgba(24, 33, 80, .12);
    --radius: 18px;
    --sidebar: 238px;
    --topbar: 72px;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--surface-2); }
body { margin: 0; min-height: 100vh; color: var(--ink); background: var(--surface-2); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }
.icon { width: 20px; height: 20px; flex: 0 0 20px; }

/* Login */
.login-page { min-height: 100vh; display: grid; grid-template-columns: minmax(380px, 1.15fr) minmax(420px, .85fr); background: #fff; }
.login-visual { position: relative; overflow: hidden; padding: 54px; min-height: 100vh; color: #fff; background: radial-gradient(circle at 18% 18%, rgba(76, 103, 255, .75), transparent 31%), radial-gradient(circle at 88% 80%, rgba(0, 187, 255, .35), transparent 29%), linear-gradient(145deg, #0505ab 0%, #1010e1 48%, #05057e 100%); display: flex; flex-direction: column; justify-content: space-between; }
.login-visual::before, .login-visual::after { content: ""; position: absolute; border: 1px solid rgba(255,255,255,.14); border-radius: 50%; }
.login-visual::before { width: 520px; height: 520px; right: -170px; top: -180px; }
.login-visual::after { width: 360px; height: 360px; left: -180px; bottom: -150px; }
.login-logo { width: 190px; position: relative; z-index: 1; }
.login-hero { position: relative; z-index: 1; max-width: 650px; padding-bottom: 4vh; }
.login-kicker { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid rgba(255,255,255,.2); border-radius: 999px; background: rgba(255,255,255,.08); font-size: 13px; font-weight: 700; letter-spacing: .03em; }
.login-hero h1 { margin: 22px 0 16px; font-size: clamp(38px, 4.5vw, 68px); line-height: .98; letter-spacing: -.055em; max-width: 620px; }
.login-hero p { margin: 0; max-width: 540px; color: rgba(255,255,255,.78); font-size: 17px; line-height: 1.65; }
.login-version { position: relative; z-index: 1; color: rgba(255,255,255,.55); font-size: 12px; }
.login-form-side { min-height: 100vh; display: grid; place-items: center; padding: 48px; background: linear-gradient(180deg, #fff 0%, #fbfbfe 100%); }
.login-card { width: min(100%, 430px); }
.mobile-login-logo { display: none; width: 170px; margin-bottom: 34px; }
.login-card h2 { margin: 0 0 8px; font-size: 30px; letter-spacing: -.035em; }
.login-card > p { margin: 0 0 34px; color: var(--muted); line-height: 1.6; }
.login-field { margin-bottom: 18px; }
.login-field label, .field label { display: block; margin-bottom: 8px; color: #344054; font-weight: 700; font-size: 13px; }
.input-wrap { position: relative; }
.input-wrap .icon { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--muted-2); }
.input-wrap input { padding-left: 48px; }
.input-wrap .password-toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; display: grid; place-items: center; border: 0; background: transparent; color: var(--muted); border-radius: 10px; }
.input-wrap.has-action input { padding-right: 52px; }
.form-control { width: 100%; min-height: 46px; border: 1px solid #d7deea; background: #fff; color: var(--ink); border-radius: 12px; padding: 11px 13px; outline: 0; transition: border-color .2s, box-shadow .2s, background .2s; }
.form-control:focus { border-color: rgba(16,16,216,.75); box-shadow: 0 0 0 4px rgba(16,16,216,.09); }
.form-control[readonly] { background: #f5f7fa; color: #667085; }
textarea.form-control { min-height: 112px; resize: vertical; }
select.form-control { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #667085 50%), linear-gradient(135deg, #667085 50%, transparent 50%); background-position: calc(100% - 17px) 20px, calc(100% - 12px) 20px; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
.login-options { display: flex; justify-content: space-between; align-items: center; margin: 4px 0 26px; }
.checkbox { display: inline-flex; align-items: center; gap: 9px; color: #475467; font-size: 14px; }
.checkbox input { width: 17px; height: 17px; accent-color: var(--primary); }
.btn { border: 0; min-height: 42px; padding: 10px 16px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 750; font-size: 14px; transition: transform .15s, box-shadow .15s, background .15s; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { color: #fff; background: linear-gradient(135deg, var(--primary) 0%, #3636f3 100%); box-shadow: 0 9px 20px rgba(16,16,216,.2); }
.btn-primary:hover { box-shadow: 0 12px 25px rgba(16,16,216,.27); }
.btn-secondary { color: #344054; background: #eef1f6; }
.btn-ghost { color: #344054; background: #fff; border: 1px solid var(--border); }
.btn-danger { color: #fff; background: var(--danger); }
.btn-sm { min-height: 34px; padding: 7px 10px; font-size: 13px; border-radius: 9px; }
.btn-block { width: 100%; min-height: 50px; }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 13px 15px; margin-bottom: 20px; border-radius: 12px; font-size: 14px; line-height: 1.45; }
.alert-success { background: #ecfdf3; color: #087443; border: 1px solid #b7efcf; }
.alert-error { background: #fff0f0; color: #a52d2d; border: 1px solid #f6c7c7; }
.alert-info { background: #eef4ff; color: #174ea6; border: 1px solid #c7d8ff; }

/* App layout */
.app-shell { min-height: 100vh; }
.sidebar { position: fixed; z-index: 50; inset: 0 auto 0 0; width: var(--sidebar); display: flex; flex-direction: column; color: #fff; background: linear-gradient(180deg, #0a0ac7 0%, #08089c 56%, #06066d 100%); box-shadow: 12px 0 34px rgba(9, 10, 73, .14); transition: transform .25s ease; }
.sidebar-brand { height: 84px; display: flex; align-items: center; justify-content: center; border-bottom: 1px solid rgba(255,255,255,.11); }
.sidebar-brand img { width: 132px; }
.sidebar-user { margin: 20px 16px 10px; padding: 14px; display: flex; align-items: center; gap: 11px; border: 1px solid rgba(255,255,255,.11); border-radius: 15px; background: rgba(255,255,255,.07); }
.avatar { display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; font-weight: 850; letter-spacing: -.03em; }
.avatar-small { width: 38px; height: 38px; background: rgba(255,255,255,.17); color: #fff; font-size: 13px; }
.avatar-tiny { width: 34px; height: 34px; background: var(--primary-soft); color: var(--primary); font-size: 12px; }
.sidebar-user-copy { min-width: 0; }
.sidebar-user-copy span { display: block; color: rgba(255,255,255,.58); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 3px; }
.sidebar-user-copy strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.sidebar-nav { padding: 13px 12px; }
.nav-label { margin: 18px 12px 8px; color: rgba(255,255,255,.38); font-size: 10px; font-weight: 800; letter-spacing: .1em; }
.nav-link { min-height: 44px; padding: 10px 12px; display: flex; align-items: center; gap: 12px; border-radius: 11px; color: rgba(255,255,255,.73); font-size: 14px; font-weight: 650; transition: .18s ease; }
.nav-link:hover { color: #fff; background: rgba(255,255,255,.09); }
.nav-link.active { color: #fff; background: rgba(255,255,255,.17); box-shadow: inset 3px 0 0 #fff; }
.nav-link .icon { width: 18px; height: 18px; }
.sidebar-bottom { margin-top: auto; padding: 12px 12px 20px; }
.sidebar-bottom small { display: block; padding: 14px 12px 0; color: rgba(255,255,255,.38); font-size: 10px; }
.nav-logout { color: rgba(255,255,255,.7); }
.main-area { min-height: 100vh; margin-left: var(--sidebar); display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; height: var(--topbar); padding: 0 28px; display: flex; align-items: center; justify-content: space-between; background: rgba(255,255,255,.92); border-bottom: 1px solid var(--border); backdrop-filter: blur(15px); }
.topbar-left, .topbar-right, .user-chip { display: flex; align-items: center; }
.topbar-left { gap: 15px; }
.topbar-right { gap: 11px; }
.icon-button { width: 42px; height: 42px; border: 1px solid var(--border); border-radius: 12px; background: #fff; color: #475467; display: grid; place-items: center; }
.icon-button:hover { color: var(--primary); background: var(--primary-soft); border-color: #d7d7ff; }
.topbar-title span { display: block; color: var(--muted-2); font-size: 10px; font-weight: 800; letter-spacing: .1em; }
.topbar-title strong { display: block; margin-top: 2px; font-size: 15px; }
.user-chip { gap: 9px; padding: 5px 10px 5px 5px; border: 1px solid var(--border); border-radius: 999px; background: #fff; }
.user-chip-copy strong, .user-chip-copy span { display: block; line-height: 1.2; }
.user-chip-copy strong { font-size: 12px; }
.user-chip-copy span { color: var(--muted); font-size: 10px; margin-top: 2px; }
.page-content { flex: 1; width: 100%; max-width: none; margin: 0; padding: 30px 28px 42px; box-sizing: border-box; }
.app-footer { width: 100%; max-width: none; margin: 0; padding: 18px 28px 25px; display: flex; justify-content: space-between; gap: 15px; color: var(--muted-2); font-size: 11px; box-sizing: border-box; }
.sidebar-overlay { display: none; }

/* Page */
.page-heading { margin-bottom: 26px; display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; }
.eyebrow { margin: 0 0 6px; color: var(--primary); font-size: 11px; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.page-heading h1 { margin: 0; font-size: clamp(28px, 2.4vw, 36px); line-height: 1.06; letter-spacing: -.04em; }
.page-heading p { margin: 9px 0 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.page-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-bottom: 24px; }
.stat-card { min-height: 122px; padding: 18px 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); position: relative; overflow: hidden; }
.stat-card::after { content: ""; position: absolute; width: 95px; height: 95px; right: -35px; top: -35px; border-radius: 50%; background: var(--primary-soft); opacity: .65; }
.stat-icon { width: 39px; height: 39px; display: grid; place-items: center; color: var(--primary); border-radius: 11px; background: var(--primary-soft); position: relative; z-index: 1; }
.stat-icon .icon { width: 19px; height: 19px; }
.stat-copy { margin-top: 14px; position: relative; z-index: 1; }
.stat-copy span { color: var(--muted); font-size: 12px; font-weight: 650; }
.stat-copy strong { display: block; margin-top: 3px; font-size: 28px; letter-spacing: -.04em; }
.content-grid { display: grid; grid-template-columns: minmax(0, 2.45fr) minmax(270px, .75fr); gap: 18px; align-items: stretch; }
.card { width: 100%; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); overflow: hidden; box-sizing: border-box; }
.card-header { min-height: 65px; padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; gap: 15px; border-bottom: 1px solid var(--border); }
.card-title h2, .card-title h3 { margin: 0; font-size: 16px; letter-spacing: -.015em; }
.card-title p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.card-body { padding: 20px; }
.card-body.flush { padding: 0; }
.search-box { width: min(330px, 100%); position: relative; }
.search-box .icon { position: absolute; top: 50%; left: 13px; transform: translateY(-50%); color: var(--muted-2); width: 17px; height: 17px; }
.search-box input { min-height: 39px; padding-left: 39px; font-size: 13px; }
.table-wrap { width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; min-width: 880px; }
.data-table th { padding: 12px 15px; color: #667085; background: #fafbfc; border-bottom: 1px solid var(--border); font-size: 10px; font-weight: 850; letter-spacing: .065em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.data-table td { padding: 13px 15px; border-bottom: 1px solid #edf0f5; font-size: 13px; vertical-align: middle; }
.data-table tbody tr:hover { background: #fbfbff; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.client-cell { display: flex; align-items: center; gap: 10px; min-width: 190px; }
.client-avatar { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 38px; border-radius: 11px; background: var(--primary-soft); color: var(--primary); font-size: 12px; font-weight: 850; overflow: hidden; }
.client-avatar img { width: 100%; height: 100%; object-fit: cover; }
.client-cell strong, .client-cell span { display: block; }
.client-cell strong { font-size: 13px; }
.client-cell span { margin-top: 2px; color: var(--muted); font-size: 11px; }
.actions { display: flex; gap: 6px; align-items: center; white-space: nowrap; }
.action-btn { width: 34px; height: 34px; border: 1px solid var(--border); background: #fff; color: #667085; border-radius: 9px; display: inline-grid; place-items: center; }
.action-btn .icon { width: 16px; height: 16px; }
.action-btn:hover { color: var(--primary); border-color: #cfcfff; background: var(--primary-soft); }
.action-btn.danger:hover { color: var(--danger); border-color: #f0c7c7; background: #fff2f2; }
.badge { display: inline-flex; align-items: center; min-height: 25px; padding: 4px 9px; border-radius: 999px; font-size: 11px; font-weight: 800; white-space: nowrap; }
.badge-neutral { color: #5f6675; background: #f0f2f5; }
.badge-info { color: #174ea6; background: #e9f2ff; }
.badge-warning { color: #855800; background: #fff5d6; }
.badge-orange { color: #a03c0c; background: #fff0e8; }
.badge-danger { color: #a52d2d; background: #ffeded; }
.badge-success { color: #087443; background: #e8f8ef; }
.empty-state { min-height: 270px; padding: 46px 25px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: var(--muted); }
.empty-icon { width: 52px; height: 52px; margin: 0 auto 13px; display: grid; place-items: center; border-radius: 15px; color: var(--primary); background: var(--primary-soft); }
.empty-state h3 { margin: 0 0 5px; color: var(--ink); font-size: 16px; }
.empty-state p { margin: 0; font-size: 13px; }
.side-panel { min-height: 340px; padding: 24px; background: linear-gradient(155deg, #1010d8, #07078e); color: #fff; display: flex; flex-direction: column; }
.side-panel h3 { margin: 7px 0 9px; font-size: 21px; letter-spacing: -.025em; }
.side-panel p { margin: 0; color: rgba(255,255,255,.69); font-size: 13px; line-height: 1.55; }
.side-panel .side-label { color: rgba(255,255,255,.5); font-size: 10px; font-weight: 850; letter-spacing: .08em; }
.side-stat { margin-top: auto; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.15); }
.side-stat span { color: rgba(255,255,255,.55); font-size: 11px; }
.side-stat strong { display: block; margin-top: 3px; font-size: 28px; letter-spacing: -.04em; }

/* Proportional page composition */
.dashboard-client-card { min-height: 340px; }
.dashboard-client-card .empty-state { min-height: 273px; }
.clients-card { min-height: 430px; }
.clients-card .empty-state { min-height: 360px; }

/* Forms */
.form-card { width: 100%; max-width: none; margin: 0; }
.form-section { padding: 22px 22px 4px; border-bottom: 1px solid var(--border); }
.form-section:last-child { border-bottom: 0; }
.form-section-heading { margin-bottom: 18px; display: flex; align-items: center; gap: 11px; }
.form-section-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--primary-soft); color: var(--primary); }
.form-section-icon .icon { width: 17px; height: 17px; }
.form-section-heading h3 { margin: 0; font-size: 15px; }
.form-section-heading p { margin: 2px 0 0; color: var(--muted); font-size: 11px; }
.form-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.field { grid-column: span 4; margin-bottom: 18px; }
.field.col-2 { grid-column: span 2; }
.field.col-3 { grid-column: span 3; }
.field.col-4 { grid-column: span 4; }
.field.col-5 { grid-column: span 5; }
.field.col-6 { grid-column: span 6; }
.field.col-8 { grid-column: span 8; }
.field.col-12 { grid-column: span 12; }
.field small { display: block; margin-top: 6px; color: var(--muted); font-size: 11px; }
.form-actions { padding: 18px 22px; display: flex; justify-content: flex-end; gap: 9px; background: #fafbfc; border-top: 1px solid var(--border); }
.checkbox-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.check-card { min-height: 42px; padding: 8px 10px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: 10px; background: #fff; font-size: 12px; }
.check-card input { accent-color: var(--primary); }

/* Client profile */
.profile-hero { padding: 26px; display: flex; align-items: center; justify-content: space-between; gap: 25px; background: linear-gradient(135deg, #fff 0%, #f8f8ff 100%); }
.profile-person { display: flex; align-items: center; gap: 18px; }
.profile-photo { width: 92px; height: 92px; display: grid; place-items: center; flex: 0 0 92px; border-radius: 25px; overflow: hidden; color: #fff; background: linear-gradient(145deg, #1717e3, #090996); font-size: 26px; font-weight: 850; box-shadow: 0 14px 30px rgba(16,16,216,.18); }
.profile-photo img { width: 100%; height: 100%; object-fit: cover; }
.profile-copy h1 { margin: 0 0 6px; font-size: 29px; letter-spacing: -.04em; }
.profile-copy p { margin: 0; color: var(--muted); font-size: 13px; }
.profile-copy .badge { margin-top: 11px; }
.profile-updated { text-align: right; }
.profile-updated span { display: block; color: var(--muted); font-size: 11px; }
.profile-updated strong { display: block; margin-top: 4px; font-size: 12px; }
.metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; margin-top: 20px; }
.metric-card { padding: 18px; border: 1px solid var(--border); border-radius: 15px; background: #fff; }
.metric-card span { color: var(--muted); font-size: 11px; font-weight: 700; }
.metric-card strong { display: block; margin-top: 6px; font-size: 21px; line-height: 1.2; letter-spacing: -.025em; overflow-wrap: anywhere; }
.orientation-card { margin-top: 15px; padding: 20px; border: 1px solid #dedefc; border-radius: 15px; background: #f8f8ff; }
.orientation-card span { display: block; color: var(--primary); font-size: 10px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.orientation-card p { margin: 8px 0 0; line-height: 1.65; white-space: pre-wrap; }
.detail-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; }
.detail-item { padding: 15px 20px; border-bottom: 1px solid var(--border); }
.detail-item:nth-child(odd) { border-right: 1px solid var(--border); }
.detail-item span { display: block; color: var(--muted); font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: .055em; }
.detail-item strong { display: block; margin-top: 5px; font-size: 13px; font-weight: 650; overflow-wrap: anywhere; }

/* Modal */
.modal-backdrop { position: fixed; z-index: 100; inset: 0; display: none; align-items: center; justify-content: center; padding: 20px; background: rgba(9, 14, 30, .54); backdrop-filter: blur(4px); }
.modal-backdrop.open { display: flex; }
.modal { width: min(100%, 860px); max-width: calc(100vw - 40px); border-radius: 18px; background: #fff; box-shadow: var(--shadow-md); overflow: hidden; }
.modal-header { padding: 20px; border-bottom: 1px solid var(--border); }
.modal-header h3 { margin: 0; font-size: 18px; }
.modal-body { padding: 20px; color: #475467; line-height: 1.55; }
.modal-footer { padding: 15px 20px; display: flex; justify-content: flex-end; gap: 8px; background: #fafbfc; border-top: 1px solid var(--border); }


/* Full-width application composition */
.page-heading,
.stats-grid,
.content-grid,
.clients-card,
.dashboard-client-card,
.form-card,
.profile-hero,
.metric-grid {
    width: 100%;
    max-width: none;
}

@media (min-width: 1400px) {
    .page-content { padding-left: 32px; padding-right: 32px; }
    .app-footer { padding-left: 32px; padding-right: 32px; }
    .form-section { padding-left: 26px; padding-right: 26px; }
    .form-actions { padding-left: 26px; padding-right: 26px; }
}

@media (max-width: 1240px) {
    .page-content { padding-left: 24px; padding-right: 24px; }
    .app-footer { padding-left: 24px; padding-right: 24px; }
    .content-grid { grid-template-columns: minmax(0, 1fr) 270px; }
}
@media (max-width: 1080px) {
    .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .content-grid { grid-template-columns: 1fr; }
    .side-panel { min-height: 210px; }
    .dashboard-client-card { min-height: 320px; }
}
@media (max-width: 900px) {
    :root { --sidebar: 270px; }
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .sidebar-overlay { display: block; position: fixed; z-index: 40; inset: 0; background: rgba(8, 13, 30, .45); opacity: 0; pointer-events: none; transition: opacity .22s; }
    .sidebar-overlay.open { opacity: 1; pointer-events: auto; }
    .main-area { margin-left: 0; }
    .page-content { padding: 24px 18px 34px; }
    .topbar { padding: 0 18px; }
    .user-chip-copy { display: none; }
    .field, .field.col-2, .field.col-3, .field.col-4, .field.col-5, .field.col-6, .field.col-8 { grid-column: span 6; }
    .login-page { grid-template-columns: 1fr; }
    .login-visual { display: none; }
    .mobile-login-logo { display: block; }
    .login-form-side { background: radial-gradient(circle at top right, #ededff 0%, transparent 35%), #fff; padding: 30px; }
}
@media (max-width: 650px) {
    .topbar { height: 68px; }
    .topbar-title span { display: none; }
    .page-heading { align-items: flex-start; flex-direction: column; }
    .page-actions { width: 100%; }
    .page-actions .btn { flex: 1; }
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .stat-card { min-height: 115px; padding: 15px; }
    .stat-copy strong { font-size: 24px; }
    .card-header { align-items: flex-start; flex-direction: column; }
    .search-box { width: 100%; }
    .field, .field.col-2, .field.col-3, .field.col-4, .field.col-5, .field.col-6, .field.col-8, .field.col-12 { grid-column: span 12; }
    .checkbox-grid { grid-template-columns: 1fr 1fr; }
    .profile-hero { align-items: flex-start; flex-direction: column; }
    .profile-updated { text-align: left; }
    .metric-grid { grid-template-columns: 1fr; }
    .detail-list { grid-template-columns: 1fr; }
    .detail-item:nth-child(odd) { border-right: 0; }
    .app-footer { flex-direction: column; padding: 14px 18px 22px; }
}
@media (max-width: 420px) {
    .stats-grid { grid-template-columns: 1fr; }
    .checkbox-grid { grid-template-columns: 1fr; }
    .login-form-side { padding: 22px; }
}

/* =========================================================
   Área do cliente • portal próprio mobile-first
   ========================================================= */
.client-portal-body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 90% 0%, rgba(16, 16, 216, .08), transparent 28%),
        #f4f6fb;
    color: var(--ink);
}

.client-portal-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.client-mobile-topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    min-height: 74px;
    padding: 10px max(18px, env(safe-area-inset-right)) 10px max(18px, env(safe-area-inset-left));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    background: linear-gradient(135deg, #0909c1 0%, #1010df 58%, #09099e 100%);
    box-shadow: 0 10px 28px rgba(7, 7, 113, .16);
}

.client-brand {
    display: inline-flex;
    align-items: center;
    min-width: 0;
}

.client-brand img {
    width: 118px;
    height: auto;
}

.client-top-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.client-welcome {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: rgba(255, 255, 255, .78);
    font-size: 12px;
    font-weight: 650;
}

.client-logout {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    flex: 0 0 40px;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 13px;
    color: #fff;
    background: rgba(255,255,255,.09);
    transition: background .18s ease, transform .18s ease;
}

.client-logout:hover {
    background: rgba(255,255,255,.17);
    transform: translateY(-1px);
}

.client-logout .icon { width: 19px; height: 19px; }

.client-portal-main {
    width: min(100%, 1120px);
    margin: 0 auto;
    padding: 24px 22px 38px;
    flex: 1;
}

.client-profile-card {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: 218px;
    padding: 30px 32px;
    display: flex;
    align-items: center;
    gap: 24px;
    border-radius: 26px;
    color: #fff;
    background: linear-gradient(140deg, #0808a9 0%, #1111dc 55%, #2929f0 100%);
    box-shadow: 0 22px 50px rgba(15, 15, 164, .2);
}

.client-profile-glow {
    position: absolute;
    z-index: -1;
    border-radius: 50%;
    pointer-events: none;
}

.client-profile-glow-one {
    width: 280px;
    height: 280px;
    top: -150px;
    right: -50px;
    background: rgba(255,255,255,.11);
}

.client-profile-glow-two {
    width: 180px;
    height: 180px;
    bottom: -115px;
    left: 20%;
    border: 1px solid rgba(255,255,255,.15);
}

.client-profile-photo {
    width: 112px;
    height: 112px;
    display: grid;
    place-items: center;
    flex: 0 0 112px;
    overflow: hidden;
    border: 4px solid rgba(255,255,255,.92);
    border-radius: 32px;
    color: var(--primary);
    background: #fff;
    box-shadow: 0 14px 30px rgba(0,0,0,.18);
    font-size: 30px;
    font-weight: 850;
}

.client-profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.client-kicker {
    display: block;
    margin-bottom: 8px;
    color: rgba(255,255,255,.64);
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .12em;
}

.client-profile-copy { min-width: 0; }

.client-profile-copy h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.03;
    letter-spacing: -.045em;
    overflow-wrap: anywhere;
}

.client-profile-copy > p {
    margin: 9px 0 0;
    color: rgba(255,255,255,.76);
    font-size: 14px;
    line-height: 1.5;
}

.client-profile-badges {
    margin-top: 18px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px 12px;
}

.client-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 29px;
    padding: 6px 10px;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 999px;
    background: rgba(255,255,255,.11);
    color: #fff;
    font-size: 11px;
    font-weight: 750;
}

.client-status i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(255,255,255,.12);
}

.client-status-success i { background: #72e6ac; }
.client-status-warning i { background: #ffd56c; }
.client-status-orange i { background: #ffab70; }
.client-status-danger i { background: #ff8c8c; }
.client-status-info i { background: #88c6ff; }

.client-updated-mobile {
    color: rgba(255,255,255,.62);
    font-size: 11px;
}

.client-section-heading {
    margin: 27px 2px 13px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
}

.client-section-heading span,
.client-info-copy > span,
.client-info-heading span {
    display: block;
    color: var(--primary);
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .1em;
}

.client-section-heading h2,
.client-info-heading h2 {
    margin: 3px 0 0;
    font-size: 20px;
    line-height: 1.15;
    letter-spacing: -.03em;
}

.client-section-heading p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

.client-metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.client-metric {
    min-width: 0;
    min-height: 145px;
    padding: 17px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid var(--border);
    border-radius: 19px;
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.client-metric-featured {
    grid-column: span 2;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 17px;
    color: #fff;
    border-color: transparent;
    background: linear-gradient(135deg, #1111dc 0%, #0a0aa9 100%);
    box-shadow: 0 16px 34px rgba(16,16,216,.18);
}

.client-metric-icon {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    flex: 0 0 40px;
    border-radius: 13px;
    color: var(--primary);
    background: var(--primary-soft);
}

.client-metric-icon .icon { width: 19px; height: 19px; }
.client-metric-featured .client-metric-icon { color: #fff; background: rgba(255,255,255,.13); }

.client-metric > span,
.client-metric > div > span {
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    line-height: 1.35;
    text-transform: uppercase;
    letter-spacing: .045em;
}

.client-metric > strong,
.client-metric > div > strong {
    display: block;
    margin-top: 7px;
    color: var(--ink);
    font-size: clamp(23px, 3vw, 31px);
    line-height: 1;
    letter-spacing: -.04em;
    overflow-wrap: anywhere;
}

.client-metric-featured > div > span { color: rgba(255,255,255,.66); }
.client-metric-featured > div > strong { color: #fff; font-size: clamp(34px, 5vw, 46px); }
.client-metric-featured small { display: block; margin-top: 5px; color: rgba(255,255,255,.58); font-size: 10px; }

.client-info-card {
    margin-top: 14px;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.client-municipios-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.client-info-icon {
    width: 43px;
    height: 43px;
    display: grid;
    place-items: center;
    flex: 0 0 43px;
    border-radius: 13px;
    color: var(--primary);
    background: var(--primary-soft);
}

.client-info-icon .icon { width: 20px; height: 20px; }
.client-info-copy { min-width: 0; }

.client-info-copy p {
    margin: 7px 0 0;
    color: #344054;
    font-size: 14px;
    line-height: 1.6;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.client-info-heading {
    display: flex;
    align-items: center;
    gap: 13px;
}

.client-orientation-card {
    border-color: #dcdcff;
    background: linear-gradient(180deg, #fff 0%, #fafaff 100%);
}

.client-orientation-text {
    margin: 18px 0 0;
    padding-top: 16px;
    border-top: 1px solid #ececff;
    color: #475467;
    font-size: 14px;
    line-height: 1.72;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.client-last-update {
    margin: 18px 2px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    color: var(--muted-2);
    font-size: 10px;
    text-align: center;
}

.client-last-update .icon { width: 14px; height: 14px; }
.client-last-update strong { color: var(--muted); font-weight: 700; }

.client-portal-footer {
    width: min(100%, 1120px);
    margin: 0 auto;
    padding: 16px 22px max(22px, env(safe-area-inset-bottom));
    display: flex;
    justify-content: space-between;
    gap: 14px;
    color: var(--muted-2);
    font-size: 10px;
}

@media (max-width: 760px) {
    .client-mobile-topbar {
        min-height: 66px;
        padding-top: max(8px, env(safe-area-inset-top));
        padding-bottom: 8px;
    }

    .client-brand img { width: 104px; }
    .client-welcome { display: none; }
    .client-logout { width: 38px; height: 38px; flex-basis: 38px; border-radius: 12px; }

    .client-portal-main {
        padding: 14px 14px 28px;
    }

    .client-profile-card {
        min-height: 0;
        padding: 24px 18px 22px;
        align-items: center;
        flex-direction: column;
        gap: 14px;
        border-radius: 22px;
        text-align: center;
    }

    .client-profile-photo {
        width: 96px;
        height: 96px;
        flex-basis: 96px;
        border-radius: 28px;
        font-size: 25px;
    }

    .client-profile-copy h1 { font-size: 28px; }
    .client-profile-copy > p { margin-top: 6px; font-size: 13px; }
    .client-profile-badges { justify-content: center; margin-top: 14px; }
    .client-updated-mobile { width: 100%; }

    .client-section-heading {
        margin: 22px 2px 11px;
        align-items: flex-start;
    }

    .client-section-heading h2 { font-size: 19px; }
    .client-section-heading p { display: none; }

    .client-metrics-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .client-metric {
        min-height: 128px;
        padding: 14px;
        border-radius: 17px;
    }

    .client-metric-featured {
        grid-column: 1 / -1;
        min-height: 118px;
        padding: 17px;
    }

    .client-metric-icon {
        width: 36px;
        height: 36px;
        flex-basis: 36px;
        border-radius: 12px;
    }

    .client-metric > span,
    .client-metric > div > span {
        font-size: 9px;
    }

    .client-metric > strong,
    .client-metric > div > strong {
        font-size: 25px;
    }

    .client-metric-featured > div > strong { font-size: 38px; }

    .client-info-card {
        margin-top: 10px;
        padding: 16px;
        border-radius: 17px;
    }

    .client-info-icon {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
        border-radius: 12px;
    }

    .client-info-heading h2 { font-size: 17px; }
    .client-info-copy p, .client-orientation-text { font-size: 13px; }
    .client-orientation-text { margin-top: 14px; padding-top: 14px; }

    .client-portal-footer {
        padding-left: 16px;
        padding-right: 16px;
        flex-direction: column;
        align-items: center;
        gap: 4px;
    }
}

@media (max-width: 370px) {
    .client-portal-main { padding-left: 10px; padding-right: 10px; }
    .client-profile-card { border-radius: 19px; }
    .client-metrics-grid { gap: 8px; }
    .client-metric { padding: 12px; min-height: 122px; }
    .client-metric > strong { font-size: 23px; }
    .client-metric > span { font-size: 8.5px; }
}

/* Upload de foto do cliente */
.photo-form-section { padding-bottom: 24px; }
.photo-upload-layout {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    align-items: center;
    gap: 24px;
    padding: 2px 0 8px;
}
.photo-upload-preview {
    width: 150px;
    height: 150px;
    border: 1px solid #d9dff0;
    border-radius: 24px;
    overflow: hidden;
    background: linear-gradient(145deg, #f8f9ff, #eef0ff);
    box-shadow: inset 0 0 0 5px #fff;
}
.photo-upload-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.photo-upload-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
}
.photo-upload-placeholder .icon { width: 28px; height: 28px; }
.photo-upload-content { min-width: 0; }
.photo-upload-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.photo-upload-button {
    min-height: 42px;
    padding: 0 16px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    border-radius: 11px;
    background: var(--primary);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(16, 16, 216, .16);
}
.photo-upload-button:hover { filter: brightness(.96); }
.photo-upload-button .icon { width: 17px; height: 17px; }
.photo-upload-content p {
    max-width: 620px;
    margin: 12px 0 5px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.55;
}
.photo-file-name {
    display: block;
    color: #475467;
    font-size: 11px;
    font-weight: 700;
    overflow-wrap: anywhere;
}
.photo-remove-option {
    width: fit-content;
    margin-top: 14px;
    padding: 9px 11px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #efcaca;
    border-radius: 10px;
    color: #a52d2d;
    background: #fff7f7;
    font-size: 12px;
    font-weight: 750;
    cursor: pointer;
}
.photo-remove-option input { accent-color: #c43131; }

@media (max-width: 680px) {
    .photo-upload-layout {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
        gap: 16px;
    }
    .photo-upload-preview {
        width: 132px;
        height: 132px;
        border-radius: 22px;
    }
    .photo-upload-content p { margin-left: auto; margin-right: auto; }
    .photo-remove-option { margin-left: auto; margin-right: auto; }
}

/* =========================================================
   Ajustes finais • foto no topo do cadastro + portal do cliente mais amigável
   ========================================================= */
.photo-form-section-top {
    background: linear-gradient(180deg, #fbfcff 0%, #f6f8ff 100%);
}
.photo-form-section-top .photo-upload-preview {
    width: 164px;
    height: 164px;
    border-radius: 26px;
}
.photo-form-section-top .photo-upload-content p {
    margin-top: 10px;
}

.client-updated-mobile,
.client-last-update {
    display: none !important;
}

.client-portal-body {
    background:
        radial-gradient(circle at 100% 0%, rgba(58, 92, 255, .10), transparent 28%),
        linear-gradient(180deg, #f6f8ff 0%, #f1f4fb 100%);
}

.client-mobile-topbar {
    min-height: 70px;
    background: linear-gradient(135deg, #1736d7 0%, #2648f4 58%, #1629b6 100%);
    box-shadow: 0 10px 28px rgba(23, 54, 215, .16);
}

.client-portal-main {
    width: min(100%, 1100px);
    padding-top: 18px;
}

.client-profile-card {
    min-height: 200px;
    padding: 28px 28px 26px;
    gap: 20px;
    border-radius: 28px;
    background: linear-gradient(145deg, #1f37d6 0%, #3454ff 62%, #516dff 100%);
    box-shadow: 0 22px 48px rgba(27, 54, 211, .18);
}

.client-profile-glow-one {
    background: rgba(255,255,255,.10);
}

.client-profile-glow-two {
    border-color: rgba(255,255,255,.14);
}

.client-kicker {
    color: rgba(255,255,255,.7);
}

.client-profile-copy h1 {
    font-size: clamp(28px, 4.1vw, 40px);
}

.client-role-location {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.client-pill {
    min-height: 34px;
    padding: 7px 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .01em;
}

.client-role-pill {
    color: #1930be;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(0,0,0,.09);
}

.client-city-pill {
    color: #ffffff;
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.18);
}

.client-city-pill .icon {
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
}

.client-profile-badges {
    margin-top: 14px;
}

.client-status {
    min-height: 32px;
    padding: 7px 12px;
    background: rgba(255,255,255,.18);
}

.client-section-heading span,
.client-info-copy > span,
.client-info-heading span {
    color: #2b44e7;
}

.client-section-heading {
    margin-top: 24px;
}

.client-metrics-grid {
    gap: 14px;
}

.client-metric {
    min-height: 138px;
    padding: 18px;
    border: 1px solid #e5e9f4;
    border-radius: 20px;
    background: linear-gradient(180deg, #ffffff 0%, #fcfcff 100%);
    box-shadow: 0 10px 24px rgba(17, 24, 39, .06);
}

.client-metric-featured {
    background: linear-gradient(145deg, #1831d8 0%, #2648f4 100%);
    box-shadow: 0 16px 34px rgba(23, 54, 215, .18);
}

.client-metric > span,
.client-metric > div > span {
    color: #667085;
}

.client-metric > strong,
.client-metric > div > strong {
    color: #101828;
}

.client-info-card {
    border-color: #e6eaf4;
    border-radius: 22px;
    box-shadow: 0 10px 24px rgba(17, 24, 39, .05);
}

.client-municipios-card,
.client-orientation-card {
    background: linear-gradient(180deg, #ffffff 0%, #fcfcff 100%);
}

.client-orientation-card {
    border-color: #e3e7ff;
}

.client-orientation-text {
    color: #475467;
}

@media (max-width: 760px) {
    .photo-form-section-top .photo-upload-preview {
        width: 138px;
        height: 138px;
        border-radius: 24px;
    }

    .client-mobile-topbar {
        min-height: 64px;
        padding-top: max(8px, env(safe-area-inset-top));
    }

    .client-portal-main {
        padding: 12px 12px 24px;
    }

    .client-profile-card {
        padding: 20px 16px 18px;
        border-radius: 24px;
        gap: 12px;
    }

    .client-profile-photo {
        width: 92px;
        height: 92px;
        flex-basis: 92px;
        border-radius: 26px;
    }

    .client-profile-copy h1 {
        font-size: 24px;
    }

    .client-role-location {
        justify-content: center;
        margin-top: 10px;
        gap: 8px;
    }

    .client-pill {
        min-height: 32px;
        padding: 6px 11px;
        font-size: 11px;
    }

    .client-profile-badges {
        margin-top: 12px;
    }

    .client-metrics-grid {
        gap: 10px;
    }

    .client-metric {
        min-height: 124px;
        padding: 14px;
        border-radius: 18px;
    }

    .client-metric-featured {
        min-height: 112px;
    }

    .client-info-card {
        padding: 16px;
        border-radius: 18px;
    }
}

@media (max-width: 420px) {
    .client-brand img {
        width: 96px;
    }

    .client-profile-card {
        padding-left: 14px;
        padding-right: 14px;
    }

    .client-profile-copy h1 {
        font-size: 22px;
    }

    .client-role-location {
        flex-direction: column;
        align-items: center;
    }

    .client-metrics-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .client-metric {
        min-height: 116px;
        padding: 12px;
    }

    .client-metric > strong,
    .client-metric > div > strong {
        font-size: 22px;
    }

    .client-metric-featured > div > strong {
        font-size: 34px;
    }
}

/* =========================================================
   Refinamento visual • topo do portal do cliente mais limpo
   ========================================================= */
.client-mobile-topbar {
    background: #2442e8 !important;
    box-shadow: none !important;
    border-bottom: 1px solid rgba(255,255,255,.14);
}

.client-brand {
    padding: 0;
}

.client-brand img {
    display: block;
    height: 42px;
    width: auto;
}

.client-top-actions {
    gap: 8px;
}

.client-logout {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,.18);
    background: rgba(255,255,255,.08) !important;
    box-shadow: none !important;
}

.client-logout:hover {
    background: rgba(255,255,255,.14) !important;
    transform: none;
}

@media (max-width: 760px) {
    .client-mobile-topbar {
        min-height: 62px;
        padding-left: 14px;
        padding-right: 14px;
    }

    .client-brand img {
        height: 38px;
    }

    .client-logout {
        width: 40px;
        height: 40px;
        flex-basis: 40px;
        border-radius: 13px;
    }
}

/* =========================================================
   Refinamento visual • bloco azul do login homogêneo
   ========================================================= */
.login-visual {
    background: #0915c8 !important;
}

.login-visual::before,
.login-visual::after {
    display: none !important;
}

.login-logo {
    background: transparent !important;
}

/* =========================================================
   Refinamento visual • login mobile com cara de app
   ========================================================= */
@media (max-width: 900px) {
    body {
        background: linear-gradient(180deg, #1f37d6 0%, #2648f4 42%, #eef2ff 42%, #f7f9ff 100%) !important;
    }

    .login-page {
        display: block;
        min-height: 100vh;
        background: transparent !important;
    }

    .login-form-side {
        min-height: 100vh;
        display: flex;
        align-items: stretch;
        justify-content: center;
        padding: 0;
        background: transparent !important;
    }

    .login-card {
        width: 100%;
        max-width: 100%;
        min-height: 100vh;
        margin: 0;
        padding: calc(max(22px, env(safe-area-inset-top)) + 10px) 20px 30px;
        display: flex;
        flex-direction: column;
        background: transparent;
    }

    .mobile-login-logo {
        display: block;
        width: 150px;
        margin: 0 auto 22px;
        position: relative;
        z-index: 2;
    }

    .login-card h2,
    .login-card > p,
    .alert,
    .login-card form {
        position: relative;
        z-index: 2;
    }

    .login-card h2,
    .login-card > p {
        display: none;
    }

    .login-card form {
        margin-top: 8px;
        padding: 28px 20px 24px;
        border-radius: 30px 30px 0 0;
        background: #ffffff;
        box-shadow: 0 -8px 24px rgba(25, 38, 93, .06), 0 16px 32px rgba(25, 38, 93, .08);
        flex: 1;
    }

    .login-card form::before {
        content: "Acesse sua conta";
        display: block;
        margin-bottom: 6px;
        color: #172033;
        font-size: 30px;
        font-weight: 850;
        letter-spacing: -.04em;
        line-height: 1.05;
    }

    .login-card form::after {
        content: "Informe seu CPF cadastrado para continuar.";
        display: block;
        margin-bottom: 24px;
        color: #667085;
        font-size: 15px;
        line-height: 1.55;
    }

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

    .login-field label {
        font-size: 13px;
        font-weight: 800;
    }

    .input-wrap {
        min-height: 56px;
        border-radius: 16px;
        background: #f8faff;
        border-color: #d8e0f0;
    }

    .input-wrap .form-control {
        min-height: 54px;
        background: transparent;
        font-size: 17px;
    }

    .login-options {
        margin: 6px 0 22px;
    }

    .checkbox {
        font-size: 14px;
    }

    .btn.btn-primary.btn-block {
        min-height: 56px;
        border-radius: 18px;
        font-size: 18px;
        font-weight: 800;
        box-shadow: 0 12px 22px rgba(38, 72, 244, .22);
    }
}

@media (max-width: 480px) {
    .login-card {
        padding-left: 14px;
        padding-right: 14px;
    }

    .mobile-login-logo {
        width: 140px;
        margin-bottom: 18px;
    }

    .login-card form {
        padding: 24px 16px 22px;
        border-radius: 26px 26px 0 0;
    }

    .login-card form::before {
        font-size: 27px;
        margin-bottom: 8px;
    }

    .login-card form::after {
        font-size: 14px;
        margin-bottom: 20px;
    }

    .btn.btn-primary.btn-block {
        min-height: 54px;
        font-size: 17px;
    }
}

/* =========================================================
   Refinamento visual • login mobile com fundo azul inteiro e único card branco
   ========================================================= */
@media (max-width: 900px) {
    html,
    body {
        background: #2442e8 !important;
    }

    .login-form-side {
        align-items: flex-start;
        justify-content: flex-start;
        background: #2442e8 !important;
    }

    .login-card {
        min-height: auto !important;
        padding-top: calc(max(18px, env(safe-area-inset-top)) + 14px);
        padding-bottom: 26px;
        background: transparent !important;
    }

    .mobile-login-logo {
        width: 138px;
        margin: 0 auto 18px;
    }

    .login-card form {
        margin-top: 8px;
        padding: 24px 18px 22px;
        border-radius: 28px;
        background: #ffffff !important;
        box-shadow: 0 16px 36px rgba(15, 23, 42, .14);
        flex: 0 0 auto !important;
    }

    .login-card form::before {
        margin-bottom: 10px;
    }

    .login-card form::after {
        margin-bottom: 18px;
    }
}

@media (max-width: 480px) {
    html,
    body {
        background: #2442e8 !important;
    }

    .login-card {
        padding-left: 14px;
        padding-right: 14px;
        padding-bottom: 24px;
    }

    .mobile-login-logo {
        width: 132px;
        margin-bottom: 16px;
    }

    .login-card form {
        padding: 22px 16px 20px;
        border-radius: 26px;
    }
}

/* =========================================================
   Refinamento visual • área do cliente mais limpa e equilibrada
   ========================================================= */
.client-portal-body {
    background: #eef3ff !important;
}

.client-mobile-topbar {
    background: #2442e8 !important;
    box-shadow: 0 8px 24px rgba(25, 42, 120, .10) !important;
    border-bottom: 1px solid rgba(255,255,255,.10);
}

.client-portal-main {
    padding-top: 16px !important;
    padding-bottom: 26px !important;
}

.client-profile-card {
    min-height: 0 !important;
    padding: 22px 18px 18px !important;
    border-radius: 24px !important;
    background: linear-gradient(145deg, #2442e8 0%, #4260ff 100%) !important;
    box-shadow: 0 16px 34px rgba(36, 66, 232, .18) !important;
}

.client-profile-glow-one,
.client-profile-glow-two {
    opacity: .35;
}

.client-profile-glow-one {
    width: 180px !important;
    height: 180px !important;
    right: -30px !important;
    top: -70px !important;
}

.client-profile-glow-two {
    width: 150px !important;
    height: 150px !important;
    left: 12% !important;
    bottom: -90px !important;
}

.client-profile-copy h1 {
    font-size: 22px !important;
}

.client-kicker {
    margin-bottom: 10px !important;
    font-size: 11px !important;
}

.client-role-location {
    margin-top: 12px !important;
}

.client-pill {
    min-height: 32px !important;
    padding: 6px 12px !important;
    font-size: 12px !important;
}

.client-role-pill {
    color: #1d36d4 !important;
    background: #ffffff !important;
}

.client-city-pill {
    background: rgba(255,255,255,.14) !important;
}

.client-profile-badges {
    margin-top: 12px !important;
}

.client-status {
    background: rgba(255,255,255,.15) !important;
}

.client-section-heading {
    margin: 18px 2px 12px !important;
    align-items: flex-start !important;
}

.client-section-heading span {
    color: #3b57ea !important;
}

.client-section-heading h2 {
    color: #121a2f !important;
    font-size: 17px !important;
}

.client-section-heading p {
    color: #6b7280 !important;
}

.client-metrics-grid {
    gap: 10px !important;
}

.client-metric {
    min-height: 118px !important;
    padding: 14px !important;
    border: 1px solid #dde4f2 !important;
    border-radius: 18px !important;
    background: #ffffff !important;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .06) !important;
}

.client-metric-featured {
    grid-column: 1 / -1 !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 14px !important;
    min-height: 112px !important;
    color: inherit !important;
    background: #ffffff !important;
    border: 2px solid #d8e0ff !important;
    box-shadow: 0 10px 24px rgba(36, 66, 232, .08) !important;
}

.client-metric-featured .client-metric-icon {
    color: #ffffff !important;
    background: linear-gradient(145deg, #2442e8, #4563ff) !important;
}

.client-metric-featured > div > span {
    color: #4f5b77 !important;
}

.client-metric-featured > div > strong {
    color: #101828 !important;
    font-size: 28px !important;
}

.client-metric-featured small {
    color: #6b7280 !important;
}

.client-metric-icon {
    width: 38px !important;
    height: 38px !important;
    border-radius: 12px !important;
    background: #eef2ff !important;
    color: #2442e8 !important;
}

.client-metric > span,
.client-metric > div > span {
    color: #667085 !important;
    font-size: 10px !important;
}

.client-metric > strong,
.client-metric > div > strong {
    color: #101828 !important;
    font-size: 24px !important;
}

.client-info-card {
    margin-top: 10px !important;
    padding: 16px !important;
    border: 1px solid #dde4f2 !important;
    border-radius: 18px !important;
    background: #ffffff !important;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .05) !important;
}

.client-info-icon {
    width: 40px !important;
    height: 40px !important;
    border-radius: 12px !important;
    background: #eef2ff !important;
    color: #2442e8 !important;
}

.client-info-copy p,
.client-orientation-text {
    color: #475467 !important;
    font-size: 13px !important;
}

.client-orientation-text {
    margin-top: 14px !important;
    padding-top: 14px !important;
}

.client-portal-footer {
    color: #8390ad !important;
}

@media (max-width: 760px) {
    .client-portal-main {
        padding: 12px 12px 22px !important;
    }

    .client-profile-card {
        padding: 18px 14px 16px !important;
        gap: 10px !important;
    }

    .client-profile-photo {
        width: 90px !important;
        height: 90px !important;
        flex-basis: 90px !important;
        border-radius: 24px !important;
    }

    .client-profile-copy h1 {
        font-size: 20px !important;
    }

    .client-kicker {
        font-size: 10px !important;
    }

    .client-role-location {
        gap: 8px !important;
    }

    .client-pill {
        font-size: 11px !important;
    }

    .client-section-heading {
        margin-top: 16px !important;
    }

    .client-section-heading h2 {
        font-size: 16px !important;
    }

    .client-metric {
        min-height: 108px !important;
        padding: 12px !important;
    }

    .client-metric-featured {
        min-height: 106px !important;
    }

    .client-metric > strong,
    .client-metric > div > strong {
        font-size: 22px !important;
    }

    .client-metric-featured > div > strong {
        font-size: 26px !important;
    }
}

/* =========================================================
   Refinamento visual • azul oficial da marca no portal do cliente
   ========================================================= */
.client-mobile-topbar {
    background: #0002c6 !important;
}

.client-profile-card {
    background: #0002c6 !important;
}

.client-metric-featured .client-metric-icon,
.client-info-icon,
.client-metric-icon,
.client-section-heading span,
.client-info-copy > span,
.client-info-heading span {
    color: #0002c6 !important;
}

.client-metric-featured .client-metric-icon {
    background: #eef1ff !important;
}

/* =========================================================
   Refinamento visual • azul oficial da marca também no login mobile
   ========================================================= */
@media (max-width: 900px) {
    html,
    body,
    .login-form-side {
        background: #0002c6 !important;
    }

    .btn.btn-primary.btn-block {
        background: #0002c6 !important;
        border-color: #0002c6 !important;
        box-shadow: 0 12px 22px rgba(0, 2, 198, .22) !important;
    }
}

/* =========================================================
   Painel administrativo • calendário lateral
   ========================================================= */
.side-calendar-panel {
    min-height: 340px;
    padding: 22px;
    background: linear-gradient(180deg, #ffffff 0%, #fafbff 100%);
    color: var(--ink);
}

.side-calendar-panel .side-label {
    color: #5f6b88;
}

.side-calendar-head h3 {
    margin: 8px 0 4px;
    color: #172033;
    font-size: 24px;
    letter-spacing: -.03em;
}

.side-calendar-head h3 small {
    color: #7b86a2;
    font-size: .68em;
    font-weight: 700;
}

.side-calendar-head p {
    color: var(--muted);
    font-size: 13px;
}

.calendar-card {
    margin-top: 18px;
    padding: 16px;
    border: 1px solid #e2e7f2;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(19, 33, 68, .06);
}

.calendar-weekdays,
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 8px;
}

.calendar-weekdays {
    margin-bottom: 10px;
}

.calendar-weekdays span {
    text-align: center;
    color: #7b86a2;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.calendar-day {
    aspect-ratio: 1 / 1;
    min-height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: #f4f6fb;
    color: #25314d;
    font-size: 13px;
    font-weight: 700;
}

.calendar-day.is-empty {
    background: transparent;
}

.calendar-day.is-today {
    background: #0002c6;
    color: #fff;
    box-shadow: 0 10px 22px rgba(0, 2, 198, .18);
}

.side-stat-inline {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #e7ebf4;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.side-stat-inline div {
    padding: 12px 14px;
    border-radius: 14px;
    background: #f7f9fe;
    border: 1px solid #e5eaf5;
}

.side-stat-inline span {
    display: block;
    color: #667085;
    font-size: 11px;
}

.side-stat-inline strong {
    display: block;
    margin-top: 4px;
    color: #172033;
    font-size: 26px;
    letter-spacing: -.04em;
}

/* =========================================================
   Refinamento visual • imagem suave nas áreas azuis
   ========================================================= */
.login-visual {
    background-color: #0002c6 !important;
    background-image:
        linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,0)),
        url('../img/logo-inope-20anos.png') !important;
    background-repeat: no-repeat, no-repeat !important;
    background-position: 0 0, right -40px bottom 36px !important;
    background-size: auto, 420px auto !important;
}

.client-profile-card,
.login-form-side {
    position: relative;
    overflow: hidden;
}

.client-profile-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url('../img/logo-inope-20anos.png');
    background-repeat: no-repeat;
    background-size: 210px auto;
    background-position: right -26px bottom -10px;
    opacity: .08;
    pointer-events: none;
}

.client-profile-card > * {
    position: relative;
    z-index: 1;
}

@media (max-width: 900px) {
    .login-form-side::before {
        content: "";
        position: absolute;
        inset: 0;
        background-image: url('../img/logo-inope-20anos.png');
        background-repeat: no-repeat;
        background-size: 220px auto;
        background-position: center calc(max(20px, env(safe-area-inset-top)) + 30px);
        opacity: .08;
        pointer-events: none;
    }

    .login-card,
    .login-card form {
        position: relative;
        z-index: 1;
    }
}

@media (max-width: 480px) {
    .client-profile-card::after {
        background-size: 170px auto;
        background-position: right -28px bottom -8px;
        opacity: .07;
    }

    .login-form-side::before {
        background-size: 180px auto;
        background-position: center calc(max(16px, env(safe-area-inset-top)) + 24px);
        opacity: .07;
    }
}

/* =========================================================
   Refinamento visual • imagem relacionada à pesquisa no painel azul do login
   ========================================================= */
.login-visual {
    background: linear-gradient(135deg, #0002c6 0%, #0b12d6 52%, #1118de 100%) !important;
}

.login-visual::before {
    display: none !important;
}

.login-visual::after {
    content: "" !important;
    display: block !important;
    position: absolute !important;
    inset: 0 !important;
    width: auto !important;
    height: auto !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    border: 0 !important;
    border-radius: 0 !important;
    background:
        linear-gradient(90deg, rgba(0,2,198,.96) 0%, rgba(0,2,198,.78) 34%, rgba(0,2,198,.42) 58%, rgba(0,2,198,.18) 100%),
        linear-gradient(180deg, rgba(0,2,198,.18) 0%, rgba(0,2,198,.36) 100%),
        url('../img/research-bg.jpg') right center / cover no-repeat !important;
    opacity: .42 !important;
    pointer-events: none !important;
}

.login-logo,
.login-hero,
.login-version,
.login-kicker {
    position: relative;
    z-index: 2;
}

.login-kicker {
    background: rgba(255,255,255,.10) !important;
    border-color: rgba(255,255,255,.22) !important;
}

@media (max-width: 900px) {
    .login-form-side::before {
        display: none !important;
    }
}

/* =========================================================
   Ajuste solicitado • hero do cliente sem marca escondida e com cargos em destaque
   ========================================================= */
.client-profile-card::after {
    display: none !important;
}

.client-role-main {
    margin-top: 14px;
    display: flex;
    justify-content: center;
}

.client-role-pill-large {
    min-height: 40px !important;
    padding: 9px 18px !important;
    font-size: 14px !important;
    font-weight: 900 !important;
    letter-spacing: .01em;
    box-shadow: 0 10px 22px rgba(0, 0, 0, .12);
}

.client-role-meta {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.client-role-meta .client-pill,
.client-status-inline {
    min-height: 36px;
    padding: 7px 14px;
    font-size: 12px;
}

.client-status-inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255,255,255,.14) !important;
    border: 1px solid rgba(255,255,255,.18);
    font-weight: 800;
}

.client-status-inline i {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #fff;
}

.client-profile-badges {
    display: none !important;
}

@media (max-width: 480px) {
    .client-role-pill-large {
        min-height: 38px !important;
        padding: 8px 16px !important;
        font-size: 13px !important;
    }

    .client-role-meta {
        gap: 8px;
    }

    .client-role-meta .client-pill,
    .client-status-inline {
        min-height: 34px;
        padding: 6px 12px;
        font-size: 11px;
    }
}

/* =========================================================
   Correção robusta • hero do cliente no mobile sem espaço vazio
   ========================================================= */
.client-profile-glow,
.client-profile-glow-one,
.client-profile-glow-two {
    display: none !important;
}

.client-profile-card {
    justify-content: flex-start !important;
}

.client-profile-card::before {
    content: "";
    position: absolute;
    width: 172px;
    height: 172px;
    top: -68px;
    right: -26px;
    border-radius: 50%;
    background: rgba(255,255,255,.06);
    pointer-events: none;
}

.client-profile-card > * {
    position: relative;
    z-index: 1;
}

@media (max-width: 760px) {
    .client-profile-card {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: flex-start !important;
        min-height: auto !important;
        padding-top: 18px !important;
        padding-bottom: 18px !important;
        text-align: center !important;
    }

    .client-profile-card::before {
        width: 148px;
        height: 148px;
        top: -58px;
        right: -24px;
    }

    .client-profile-photo {
        margin-top: 0 !important;
        margin-bottom: 6px !important;
    }

    .client-profile-copy {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
}
