:root {
    --bg: #f4f7fb;
    --surface: rgba(255,255,255,.92);
    --surface-solid: #ffffff;
    --surface-soft: #f7f9fc;
    --surface-hover: #eef4fb;
    --text: #172033;
    --muted: #6f7b91;
    --line: rgba(20,38,68,.10);
    --line-strong: rgba(20,38,68,.16);
    --primary: #0052cc;
    --primary-2: #1689f7;
    --primary-soft: rgba(0,82,204,.10);
    --cyan: #16a4d8;
    --green: #17a673;
    --amber: #e99b24;
    --red: #df5362;
    --shadow: 0 18px 50px rgba(32,58,93,.10);
    --shadow-soft: 0 8px 24px rgba(32,58,93,.07);
    --radius: 22px;
    --radius-sm: 14px;
    --topbar: 78px;
    --dock-h: 72px;
    --font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html[data-theme="dark"] {
    --bg: #07101f;
    --surface: rgba(15,27,47,.90);
    --surface-solid: #101d31;
    --surface-soft: #0d192a;
    --surface-hover: #14243c;
    --text: #f3f7ff;
    --muted: #9aa9c0;
    --line: rgba(176,201,239,.10);
    --line-strong: rgba(176,201,239,.18);
    --primary: #5a9cff;
    --primary-2: #2fc5ef;
    --primary-soft: rgba(90,156,255,.13);
    --shadow: 0 22px 60px rgba(0,0,0,.34);
    --shadow-soft: 0 10px 28px rgba(0,0,0,.22);
}

* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; font-family: var(--font); background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
svg { display: block; }
[hidden] { display: none !important; }

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image: radial-gradient(circle at 1px 1px, rgba(69,101,146,.075) 1px, transparent 0);
    background-size: 28px 28px;
    mask-image: linear-gradient(to bottom, black, transparent 75%);
    z-index: -3;
}

.ambient { position: fixed; width: 420px; height: 420px; border-radius: 50%; filter: blur(100px); opacity: .12; pointer-events: none; z-index: -2; }
.ambient-one { background: #2e7eff; top: -180px; right: 8%; }
.ambient-two { background: #21c0dd; bottom: -220px; left: 8%; }
html[data-theme="dark"] .ambient { opacity: .16; }

.topbar {
    position: fixed;
    z-index: 50;
    top: 0; left: 0; right: 0;
    height: var(--topbar);
    display: grid;
    grid-template-columns: minmax(250px,1fr) minmax(320px,620px) minmax(340px,1fr);
    align-items: center;
    gap: 24px;
    padding: 0 34px;
    background: color-mix(in srgb, var(--surface-solid) 78%, transparent);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(22px) saturate(150%);
}

.brand { display: inline-flex; align-items: center; gap: 12px; width: max-content; }
.brand img { filter: drop-shadow(0 8px 18px rgba(0,82,204,.22)); }
.brand-copy { display: flex; flex-direction: column; line-height: 1.05; }
.brand-copy strong { font-size: 17px; letter-spacing: .02em; }
.brand-copy small { margin-top: 5px; color: var(--muted); font-size: 11px; font-weight: 650; }

.topbar-center { display: flex; justify-content: center; }
.global-search {
    width: min(100%, 560px); height: 44px; display: flex; align-items: center; gap: 11px;
    padding: 0 13px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft); color: var(--muted); cursor: pointer; transition: .22s ease;
}
.global-search:hover { border-color: rgba(0,82,204,.28); background: var(--surface-hover); transform: translateY(-1px); }
.global-search span { flex: 1; text-align: left; font-size: 13px; }
kbd { border: 1px solid var(--line-strong); border-radius: 7px; padding: 3px 7px; background: var(--surface-solid); color: var(--muted); font-size: 10px; box-shadow: inset 0 -1px 0 var(--line); }

.topbar-actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; }
.icon-button {
    min-width: 42px; height: 42px; border-radius: 13px; border: 1px solid var(--line); background: var(--surface-soft); display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; transition: .2s ease;
}
.icon-button:hover { background: var(--surface-hover); transform: translateY(-1px); border-color: var(--line-strong); }
.language-code { font-size: 10px; font-weight: 800; }
.theme-sun, .theme-moon { display: none; }
html[data-theme="light"] .theme-moon { display: block; }
html[data-theme="dark"] .theme-sun { display: block; }
.notification-button { position: relative; }
.notification-dot { position: absolute; top: 9px; right: 9px; width: 7px; height: 7px; border-radius: 50%; background: var(--red); border: 2px solid var(--surface-solid); }

.profile-button { height: 46px; border: 0; background: transparent; display: flex; align-items: center; gap: 10px; padding: 3px 3px 3px 8px; cursor: pointer; border-radius: 15px; }
.profile-button:hover { background: var(--surface-hover); }
.avatar { width: 38px; height: 38px; border-radius: 13px; display: grid; place-items: center; color: white; font-weight: 800; background: linear-gradient(135deg,var(--primary),var(--primary-2)); box-shadow: 0 8px 18px rgba(0,82,204,.20); }
.profile-copy { display: flex; flex-direction: column; align-items: flex-start; min-width: 100px; line-height: 1.12; }
.profile-copy strong { max-width: 150px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
.profile-copy small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.profile-chevron { color: var(--muted); padding-right: 7px; }

.language-menu, .profile-menu { position: relative; }
.dropdown-panel { position: absolute; right: 0; top: calc(100% + 10px); min-width: 180px; padding: 8px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-solid); box-shadow: var(--shadow); opacity: 0; transform: translateY(-7px) scale(.98); visibility: hidden; transition: .18s ease; z-index: 80; }
[data-dropdown].open .dropdown-panel { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
.dropdown-panel a, .dropdown-panel form button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 11px; border: 0; border-radius: 10px; background: transparent; color: var(--text); cursor: pointer; font-size: 12px; text-align: left; }
.dropdown-panel a:hover, .dropdown-panel a.active, .dropdown-panel form button:hover { background: var(--surface-hover); color: var(--primary); }
.profile-panel { min-width: 240px; }
.profile-panel-head { padding: 9px 11px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; display: flex; flex-direction: column; }
.profile-panel-head strong { font-size: 13px; }
.profile-panel-head span { margin-top: 4px; color: var(--muted); font-size: 11px; }

.workspace { max-width: 1540px; margin: 0 auto; padding: calc(var(--topbar) + 36px) 34px calc(var(--dock-h) + 74px); }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 28px; margin-bottom: 27px; }
.page-head h1 { margin: 5px 0 7px; font-size: clamp(31px,3.2vw,48px); line-height: 1.02; letter-spacing: -.045em; }
.page-head h1 span { color: var(--primary); }
.page-head p { margin: 0; max-width: 720px; color: var(--muted); font-size: 14px; line-height: 1.7; }
.eyebrow { color: var(--primary); text-transform: uppercase; letter-spacing: .13em; font-size: 10px; font-weight: 850; }
.page-head-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.date-chip { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 13px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); color: var(--muted); font-size: 12px; }

.primary-button, .secondary-button, .text-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; transition: .2s ease; }
.primary-button { min-height: 43px; padding: 0 16px; border: 0; border-radius: 13px; background: linear-gradient(135deg,var(--primary),var(--primary-2)); color: white; font-weight: 780; font-size: 12px; box-shadow: 0 10px 25px rgba(0,82,204,.22); }
.primary-button:hover { transform: translateY(-2px); box-shadow: 0 15px 32px rgba(0,82,204,.28); }
.primary-button.full { width: 100%; }
.secondary-button { min-height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); color: var(--text); font-weight: 700; font-size: 12px; }
.secondary-button:hover { border-color: rgba(0,82,204,.25); color: var(--primary); }
.text-button { color: var(--primary); font-size: 11px; font-weight: 780; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-soft); backdrop-filter: blur(16px); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 22px 23px; border-bottom: 1px solid var(--line); }
.panel-head h2 { margin: 5px 0 0; font-size: 17px; letter-spacing: -.02em; }

.metric-grid { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 14px; margin-bottom: 18px; }
.metric-card { position: relative; min-height: 118px; padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-soft); display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; }
.metric-card::after { content: ""; position: absolute; width: 110px; height: 110px; border-radius: 50%; right: -50px; bottom: -65px; background: var(--primary-soft); }
.metric-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; }
.tone-1 { color: var(--primary); background: var(--primary-soft); }
.tone-2 { color: var(--green); background: rgba(23,166,115,.11); }
.tone-3 { color: var(--cyan); background: rgba(22,164,216,.11); }
.tone-4 { color: var(--amber); background: rgba(233,155,36,.11); }
.metric-copy { display: flex; flex-direction: column; gap: 5px; }
.metric-copy span { color: var(--muted); font-size: 10px; font-weight: 700; }
.metric-copy strong { font-size: 21px; letter-spacing: -.025em; white-space: nowrap; }
.metric-trend { position: absolute; top: 19px; right: 16px; color: var(--muted); font-size: 11px; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0,1.9fr) minmax(320px,.8fr); gap: 18px; margin-bottom: 18px; }
.dashboard-grid.lower { grid-template-columns: minmax(0,1.7fr) minmax(320px,.8fr); }
.panel-wide { min-width: 0; }
.health-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 15px; padding: 23px 23px 10px; }
.health-item { padding: 16px; border-radius: 15px; border: 1px solid var(--line); background: var(--surface-soft); }
.health-item span { color: var(--muted); font-size: 10px; font-weight: 700; }
.health-item strong { float: right; font-size: 14px; }
.progress { clear: both; height: 7px; margin-top: 14px; background: color-mix(in srgb,var(--line) 70%,transparent); border-radius: 10px; overflow: hidden; }
.progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,var(--primary),var(--primary-2)); }
.empty-chart { min-height: 205px; display: grid; place-items: center; padding: 20px 25px 25px; }
.chart-bars { width: min(100%,700px); height: 130px; display: flex; align-items: end; gap: 12px; border-bottom: 1px solid var(--line); padding: 0 10px; }
.chart-bars i { flex: 1; border-radius: 7px 7px 2px 2px; background: linear-gradient(to top,rgba(0,82,204,.15),var(--primary)); opacity: .72; animation: bars .8s ease both; }
.empty-chart p { margin: 10px 0 0; color: var(--muted); font-size: 11px; }
@keyframes bars { from { height: 0; } }

.cycle-focus { min-height: 270px; display: grid; grid-template-columns: 150px 1fr auto; align-items: center; gap: 27px; padding: 27px; }
.cycle-ring { --progress: 0; position: relative; width: 130px; height: 130px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--primary) calc(var(--progress)*1%), var(--surface-soft) 0); }
.cycle-ring::before { content: ""; position: absolute; inset: 12px; border-radius: 50%; background: var(--surface-solid); }
.cycle-ring span { position: relative; z-index: 1; font-size: 24px; font-weight: 850; }
.cycle-focus-copy span { color: var(--muted); font-size: 11px; }
.cycle-focus-copy h3 { margin: 6px 0; font-size: 25px; }
.cycle-focus-copy p { margin: 0 0 18px; color: var(--muted); font-size: 12px; }
.mini-stats { display: grid; gap: 8px; min-width: 165px; }
.mini-stats div { padding: 13px 14px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-soft); display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.mini-stats strong { font-size: 16px; }
.mini-stats span { color: var(--muted); font-size: 9px; text-align: right; }

.timeline-list { padding: 6px 22px 16px; }
.timeline-item { position: relative; display: grid; grid-template-columns: 46px 1fr; gap: 14px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.timeline-item:last-child { border-bottom: 0; }
.timeline-item time { width: 44px; height: 48px; display: grid; place-items: center; align-content: center; border-radius: 12px; background: var(--primary-soft); color: var(--primary); line-height: 1; }
.timeline-item time strong { font-size: 16px; }
.timeline-item time span { margin-top: 4px; font-size: 8px; font-weight: 800; }
.timeline-item > div { display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.timeline-item > div strong { font-size: 12px; }
.timeline-item > div span { margin-top: 4px; color: var(--muted); font-size: 10px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.timeline-item > div small { margin-top: 5px; color: var(--primary); font-size: 9px; font-weight: 800; }

.activity-list { padding: 8px 22px 18px; }
.activity-list article { display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 13px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.activity-list article:last-child { border-bottom: 0; }
.activity-icon { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; color: var(--green); background: rgba(23,166,115,.11); }
.activity-list article div { display: flex; flex-direction: column; gap: 3px; }
.activity-list article strong { font-size: 11px; }
.activity-list article small, .activity-list time { color: var(--muted); font-size: 9px; }
.quick-actions { padding: 12px 16px 18px; display: grid; gap: 8px; }
.quick-actions a { display: grid; grid-template-columns: 34px 1fr 15px; align-items: center; gap: 10px; padding: 10px; border-radius: 13px; transition: .2s; }
.quick-actions a:hover { background: var(--surface-hover); color: var(--primary); transform: translateX(2px); }
.quick-actions a > svg:first-child { width: 34px; height: 34px; padding: 7px; border-radius: 10px; color: var(--primary); background: var(--primary-soft); }
.quick-actions span { font-size: 11px; font-weight: 700; }

.dock { position: fixed; z-index: 45; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); transform: translateX(-50%); max-width: calc(100vw - 30px); height: var(--dock-h); padding: 10px 12px; display: flex; align-items: center; gap: 5px; border: 1px solid var(--line-strong); border-radius: 23px; background: color-mix(in srgb,var(--surface-solid) 78%,transparent); box-shadow: 0 18px 55px rgba(21,43,77,.20); backdrop-filter: blur(24px) saturate(160%); overflow-x: auto; scrollbar-width: none; }
.dock::-webkit-scrollbar { display: none; }
.dock-item { position: relative; flex: 0 0 48px; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 15px; color: var(--muted); transition: .2s cubic-bezier(.2,.8,.2,1); }
.dock-item:hover { color: var(--primary); background: var(--surface-hover); transform: translateY(-5px) scale(1.08); }
.dock-item.active { color: white; background: linear-gradient(135deg,var(--primary),var(--primary-2)); box-shadow: 0 9px 21px rgba(0,82,204,.28); }
.dock-item.active::after { content: ""; position: absolute; bottom: -8px; width: 4px; height: 4px; border-radius: 50%; background: var(--primary); }
.dock-item::before { content: attr(data-tooltip); position: absolute; bottom: calc(100% + 12px); left: 50%; transform: translate(-50%,6px); white-space: nowrap; padding: 6px 8px; border-radius: 8px; background: #101827; color: white; font-size: 9px; opacity: 0; visibility: hidden; transition: .18s; pointer-events: none; }
.dock-item:hover::before { opacity: 1; visibility: visible; transform: translate(-50%,0); }
.dock-separator { flex: 0 0 1px; height: 30px; background: var(--line-strong); margin: 0 5px; }

.command-palette { position: fixed; inset: 0; z-index: 100; display: grid; place-items: start center; padding-top: 12vh; }
.command-backdrop { position: absolute; inset: 0; background: rgba(5,13,25,.45); backdrop-filter: blur(8px); }
.command-dialog { position: relative; width: min(620px,calc(100vw - 30px)); max-height: 70vh; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 21px; background: var(--surface-solid); box-shadow: 0 30px 100px rgba(0,0,0,.30); animation: dialogIn .2s ease both; }
@keyframes dialogIn { from { opacity: 0; transform: translateY(-12px) scale(.98); } }
.command-input-wrap { height: 62px; display: flex; align-items: center; gap: 12px; padding: 0 18px; border-bottom: 1px solid var(--line); }
.command-input-wrap input { flex: 1; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 15px; }
.command-results { max-height: 52vh; overflow-y: auto; padding: 10px; }
.command-results a { display: flex; align-items: center; gap: 13px; padding: 12px; border-radius: 12px; }
.command-results a:hover { background: var(--surface-hover); color: var(--primary); }
.command-results span { font-size: 12px; font-weight: 700; }

.module-overview { display: grid; grid-template-columns: minmax(0,1.5fr) minmax(340px,.8fr); gap: 18px; margin-bottom: 18px; }
.module-hero { min-height: 185px; padding: 27px; display: grid; grid-template-columns: 78px 1fr auto; align-items: center; gap: 22px; }
.module-hero-icon { width: 74px; height: 74px; border-radius: 22px; display: grid; place-items: center; color: white; background: linear-gradient(135deg,var(--primary),var(--primary-2)); box-shadow: 0 16px 34px rgba(0,82,204,.24); }
.module-hero h2 { margin: 10px 0 6px; font-size: 24px; }
.module-hero p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.status-pill { display: inline-flex; align-items: center; gap: 7px; font-size: 9px; font-weight: 800; color: var(--green); }
.status-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px rgba(23,166,115,.10); }
.module-version { display: flex; flex-direction: column; align-items: flex-end; }
.module-version span { color: var(--muted); font-size: 9px; }
.module-version strong { margin-top: 4px; font-size: 13px; }
.module-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.mini-stat { padding: 18px; display: flex; flex-direction: column; justify-content: center; }
.mini-stat span { color: var(--muted); font-size: 9px; font-weight: 750; }
.mini-stat strong { margin: 7px 0 4px; font-size: 24px; }
.mini-stat small { color: var(--muted); font-size: 8px; }
.data-panel { min-height: 420px; }
.data-head { align-items: center; }
.data-tools { display: flex; gap: 9px; }
.table-search { height: 40px; min-width: 245px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); color: var(--muted); }
.table-search input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 11px; }
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: var(--muted); }
.empty-state.large { min-height: 330px; padding: 30px; }
.empty-state.compact { min-height: 270px; }
.empty-state.mini { min-height: 150px; }
.empty-state h3 { margin: 16px 0 5px; color: var(--text); font-size: 16px; }
.empty-state p { max-width: 470px; margin: 0 0 18px; font-size: 11px; line-height: 1.7; }
.empty-orb { width: 75px; height: 75px; border-radius: 24px; display: grid; place-items: center; color: var(--primary); background: var(--primary-soft); }

.settings-grid { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(290px,.55fr); gap: 18px; }
.settings-main { overflow: hidden; }
.settings-section { padding: 25px; border-bottom: 1px solid var(--line); }
.section-title { display: flex; gap: 13px; margin-bottom: 22px; }
.section-title > span { width: 39px; height: 39px; border-radius: 12px; display: grid; place-items: center; color: var(--primary); background: var(--primary-soft); }
.section-title h2 { margin: 0; font-size: 16px; }
.section-title p { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.field-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 16px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field.full { grid-column: 1/-1; }
.field > span { font-size: 10px; font-weight: 800; }
.field input, .field select { width: 100%; height: 44px; padding: 0 13px; border: 1px solid var(--line); border-radius: 12px; outline: 0; background: var(--surface-soft); color: var(--text); transition: .2s; }
.field input:focus, .field select:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.field small { color: var(--muted); font-size: 9px; line-height: 1.5; }
.field code { font-size: 9px; color: var(--primary); word-break: break-all; }
.money-input { display: flex; max-width: 260px; height: 44px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface-soft); }
.money-input b { display: grid; place-items: center; padding: 0 13px; border-right: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.money-input input { border: 0; border-radius: 0; }
.settings-actions { padding: 20px 25px; display: flex; justify-content: flex-end; }
.settings-status { padding: 25px; height: max-content; }
.settings-status h2 { margin: 6px 0 20px; }
.status-list { display: grid; gap: 1px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.status-list div { display: flex; justify-content: space-between; gap: 15px; padding: 13px; background: var(--surface-soft); }
.status-list span, .status-list strong { font-size: 10px; }
.status-list span { color: var(--muted); }
.status-list .ok { color: var(--green); }
.status-list .warn { color: var(--amber); }
.security-note { margin-top: 16px; padding: 14px; border-radius: 13px; display: flex; gap: 10px; color: var(--green); background: rgba(23,166,115,.09); }
.security-note p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.6; }

.toast { position: fixed; top: 94px; right: 24px; z-index: 90; max-width: 390px; display: grid; grid-template-columns: 22px 1fr 20px; align-items: center; gap: 10px; padding: 14px; border-radius: 14px; background: var(--surface-solid); border: 1px solid var(--line); box-shadow: var(--shadow); animation: toastIn .3s ease both; }
.toast.success { color: var(--green); }
.toast.error { color: var(--red); }
.toast span { color: var(--text); font-size: 11px; }
.toast button { border: 0; background: transparent; cursor: pointer; color: var(--muted); font-size: 18px; }
@keyframes toastIn { from { transform: translateX(30px); opacity: 0; } }

.modal { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 20px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(5,13,25,.50); backdrop-filter: blur(8px); }
.modal-card { position: relative; width: min(430px,100%); padding: 28px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface-solid); box-shadow: 0 30px 90px rgba(0,0,0,.30); text-align: center; }
.modal-icon { width: 62px; height: 62px; margin: 0 auto; display: grid; place-items: center; border-radius: 20px; color: var(--primary); background: var(--primary-soft); }
.modal-card h3 { margin: 18px 0 8px; }
.modal-card p { margin: 0 0 20px; color: var(--muted); font-size: 11px; line-height: 1.7; }

.error-page { min-height: calc(100vh - var(--topbar) - 150px); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.error-page > span { font-size: 90px; line-height: 1; font-weight: 900; letter-spacing: -.07em; color: var(--primary-soft); -webkit-text-stroke: 2px var(--primary); }
.error-page h1 { margin: 12px 0 7px; }
.error-page p { margin: 0 0 20px; color: var(--muted); font-size: 12px; }

.guest-body { overflow: hidden; }
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0,1.05fr) minmax(470px,.75fr); }
.auth-showcase { position: relative; overflow: hidden; color: white; background: linear-gradient(135deg,rgba(2,24,63,.88) 0%,rgba(0,61,155,.72) 48%,rgba(10,164,232,.38) 100%), url('../img/medicos.jpg') center center/cover no-repeat; }
.auth-showcase::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg,rgba(2,16,43,.26) 0%,rgba(2,16,43,.10) 30%,rgba(2,16,43,.42) 100%); }
.auth-showcase::after { content: ""; position: absolute; right: -90px; bottom: -180px; width: 340px; height: 340px; border-radius: 50%; background: radial-gradient(circle,rgba(255,255,255,.16) 0%,rgba(255,255,255,0) 68%); }
.auth-showcase-inner { position: relative; z-index: 2; min-height: 100%; padding: 46px clamp(40px,6vw,100px); display: flex; flex-direction: column; justify-content: space-between; }
.auth-brand { display: flex; align-items: center; gap: 14px; }
.auth-brand img { box-shadow: none; border-radius: 0; }
.auth-brand-logo-login { width: min(100%, 420px); height: auto; filter: drop-shadow(0 14px 34px rgba(0,0,0,.24)); }
.auth-brand > div { display: flex; flex-direction: column; }
.auth-brand strong { font-size: 19px; }
.auth-brand span { margin-top: 4px; opacity: .72; font-size: 10px; }
.auth-copy { max-width: 710px; }
.auth-copy .eyebrow { color: rgba(255,255,255,.72); }
.auth-copy h1 { margin: 13px 0 17px; font-size: clamp(42px,5.2vw,76px); line-height: .98; letter-spacing: -.055em; }
.auth-copy p { max-width: 650px; margin: 0; color: rgba(255,255,255,.76); font-size: 14px; line-height: 1.85; }
.auth-features { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.auth-features article { min-height: 96px; display: flex; align-items: center; gap: 13px; padding: 15px; border: 1px solid rgba(255,255,255,.16); border-radius: 17px; background: rgba(255,255,255,.08); backdrop-filter: blur(10px); }
.auth-features article > span { width: 39px; height: 39px; border-radius: 12px; display: grid; place-items: center; background: rgba(255,255,255,.14); }
.auth-features article div { display: flex; flex-direction: column; }
.auth-features strong { font-size: 11px; }
.auth-features small { margin-top: 5px; color: rgba(255,255,255,.65); font-size: 8px; line-height: 1.5; }
.auth-form-panel { position: relative; display: grid; place-items: center; padding: 45px; background: var(--bg); }
.auth-tools { position: absolute; top: 24px; right: 25px; display: flex; gap: 8px; }
.auth-card { width: min(100%,430px); }
.mobile-brand { display: none; }
.auth-card h2 { margin: 8px 0 7px; font-size: 34px; letter-spacing: -.045em; }
.auth-card > p { margin: 0 0 25px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.auth-form { display: grid; gap: 17px; }
.auth-form > label { display: grid; gap: 8px; }
.auth-form label > span { font-size: 10px; font-weight: 800; }
.auth-form input { width: 100%; height: 49px; padding: 0 14px; border: 1px solid var(--line); border-radius: 13px; outline: 0; background: var(--surface-solid); color: var(--text); transition: .2s; }
.auth-form input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.password-field { position: relative; }
.password-field input { padding-right: 48px; }
.password-field button { position: absolute; top: 50%; right: 9px; transform: translateY(-50%); width: 33px; height: 33px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; }
.password-field button:hover { background: var(--surface-hover); color: var(--primary); }
.auth-row { display: flex; align-items: center; justify-content: space-between; }
.checkbox { display: flex !important; grid-template-columns: auto 1fr; align-items: center; gap: 8px !important; }
.checkbox input { width: 16px; height: 16px; accent-color: var(--primary); }
.checkbox span, .muted-link { color: var(--muted); font-size: 10px !important; }
.muted-link:hover { color: var(--primary); }
.auth-security { display: block; margin-top: 18px; color: var(--muted); text-align: center; font-size: 9px; }
.auth-powered-by { display: grid; justify-items: center; gap: 10px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.auth-powered-by span { color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.auth-powered-by img { height: 24px; width: auto; display: block; }
.form-alert { margin-bottom: 17px; display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 12px; font-size: 10px; }
.form-alert.error { color: var(--red); background: rgba(223,83,98,.09); }

.reveal { animation: reveal .55s cubic-bezier(.2,.8,.2,1) both; }
.delay-1 { animation-delay: .06s; }
.delay-2 { animation-delay: .12s; }
.delay-3 { animation-delay: .18s; }
@keyframes reveal { from { opacity: 0; transform: translateY(15px); } }

@media (max-width: 1240px) {
    .topbar { grid-template-columns: 230px 1fr auto; padding: 0 22px; }
    .profile-copy { display: none; }
    .metric-grid { grid-template-columns: repeat(3,1fr); }
    .module-overview { grid-template-columns: 1fr; }
    .module-stats { grid-template-columns: repeat(3,1fr); }
    .auth-shell { grid-template-columns: 1fr 470px; }
    .auth-showcase-inner { padding: 42px; }
    .auth-features { grid-template-columns: 1fr; max-width: 400px; }
    .auth-features article { min-height: 75px; }
}

@media (max-width: 900px) {
    :root { --topbar: 68px; --dock-h: 66px; }
    .topbar { grid-template-columns: 1fr auto; padding: 0 15px; }
    .brand-copy small { display: none; }
    .topbar-center { display: none; }
    .notification-button { display: none; }
    .workspace { padding: calc(var(--topbar) + 25px) 16px calc(var(--dock-h) + 55px); }
    .page-head { align-items: flex-start; flex-direction: column; }
    .page-head-actions { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
    .metric-grid { grid-template-columns: repeat(2,1fr); }
    .dashboard-grid, .dashboard-grid.lower, .settings-grid { grid-template-columns: 1fr; }
    .cycle-focus { grid-template-columns: 120px 1fr; }
    .mini-stats { grid-column: 1/-1; grid-template-columns: repeat(3,1fr); }
    .settings-status { order: -1; }
    .auth-shell { grid-template-columns: 1fr; }
    .auth-showcase { display: none; }
    .auth-form-panel { min-height: 100vh; padding: 30px 22px; }
    .mobile-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 45px; }
    .guest-body { overflow: auto; }
}

@media (max-width: 620px) {
    .topbar { gap: 8px; }
    .brand img { width: 34px; height: 34px; }
    .brand-copy strong { font-size: 14px; }
    .profile-button { padding-left: 2px; }
    .profile-chevron { display: none; }
    .avatar { width: 35px; height: 35px; }
    .icon-button { min-width: 38px; height: 38px; }
    .workspace { padding-left: 12px; padding-right: 12px; }
    .page-head h1 { font-size: 32px; }
    .date-chip { display: none; }
    .metric-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
    .metric-card { min-height: 108px; padding: 14px; }
    .metric-copy strong { font-size: 17px; }
    .metric-copy span { font-size: 8px; }
    .health-grid { grid-template-columns: 1fr; }
    .cycle-focus { grid-template-columns: 1fr; justify-items: center; text-align: center; }
    .mini-stats { grid-template-columns: 1fr; width: 100%; }
    .panel-head { padding: 18px; }
    .module-hero { grid-template-columns: 62px 1fr; padding: 20px; }
    .module-hero-icon { width: 60px; height: 60px; border-radius: 18px; }
    .module-version { display: none; }
    .module-stats { grid-template-columns: 1fr; }
    .data-head { align-items: flex-start; flex-direction: column; }
    .data-tools { width: 100%; }
    .table-search { min-width: 0; flex: 1; }
    .field-grid { grid-template-columns: 1fr; }
    .field.full { grid-column: auto; }
    .settings-section { padding: 20px; }
    .dock { width: calc(100vw - 18px); justify-content: flex-start; bottom: 9px; height: 62px; border-radius: 20px; padding: 8px; }
    .dock-item { flex-basis: 44px; width: 44px; height: 44px; border-radius: 13px; }
    .dock-item::before { display: none; }
    .auth-tools { top: 16px; right: 16px; }
    .auth-card h2 { font-size: 30px; }
}

/* ===== Functional entities: Mentors and Students v1.1.0 ===== */
.compact-metrics { grid-template-columns: repeat(4,minmax(0,1fr)); }
.metric-icon.purple { color: var(--primary); background: var(--primary-soft); }
.metric-icon.green { color: var(--green); background: color-mix(in srgb,var(--green) 11%,transparent); }
.metric-icon.orange { color: var(--amber); background: color-mix(in srgb,var(--amber) 12%,transparent); }
.metric-icon.red { color: var(--red); background: color-mix(in srgb,var(--red) 11%,transparent); }
.metric-icon.blue { color: var(--cyan); background: color-mix(in srgb,var(--cyan) 11%,transparent); }
.panel-head small { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; }

.filter-bar { display: flex; align-items: center; gap: 9px; padding: 16px 22px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.filter-bar select, .filter-search { min-height: 42px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); color: var(--text); outline: 0; }
.filter-bar select { padding: 0 34px 0 12px; font-size: 11px; cursor: pointer; }
.filter-search { min-width: 240px; flex: 1 1 290px; display: flex; align-items: center; gap: 9px; padding: 0 12px; }
.filter-search input { width: 100%; border: 0; background: transparent; color: var(--text); outline: 0; font-size: 12px; }
.filter-bar select:focus, .filter-search:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.student-filters .filter-search { flex-basis: 220px; }

.entity-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; padding: 20px 22px; }
.entity-card { min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface-soft); transition: .2s ease; }
.entity-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb,var(--primary) 25%,var(--line)); box-shadow: var(--shadow-soft); }
.entity-card-head { display: grid; grid-template-columns: 45px minmax(0,1fr) auto; gap: 11px; align-items: center; }
.entity-avatar, .profile-avatar-large, .mini-avatar { display: grid; place-items: center; color: white; background: linear-gradient(135deg,var(--primary),var(--primary-2)); font-weight: 850; }
.entity-avatar { width: 45px; height: 45px; border-radius: 14px; box-shadow: 0 8px 18px color-mix(in srgb,var(--primary) 22%,transparent); }
.entity-title { min-width: 0; }
.entity-title h3 { margin: 0; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.entity-title p { margin: 4px 0 0; color: var(--muted); font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status-badge { display: inline-flex; align-items: center; justify-content: center; min-height: 24px; padding: 0 8px; border-radius: 999px; font-size: 8px; font-weight: 850; letter-spacing: .02em; white-space: nowrap; }
.status-badge.success { color: var(--green); background: color-mix(in srgb,var(--green) 12%,transparent); }
.status-badge.warning { color: var(--amber); background: color-mix(in srgb,var(--amber) 13%,transparent); }
.status-badge.danger { color: var(--red); background: color-mix(in srgb,var(--red) 12%,transparent); }
.status-badge.muted, .status-badge.neutral { color: var(--muted); background: color-mix(in srgb,var(--muted) 10%,transparent); }
.entity-contact { display: grid; gap: 7px; margin: 16px 0; padding: 13px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.entity-contact span { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--muted); font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entity-numbers { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.entity-numbers div { padding: 11px; border-radius: 12px; background: var(--surface-solid); border: 1px solid var(--line); }
.entity-numbers strong, .entity-numbers span { display: block; }
.entity-numbers strong { font-size: 15px; }
.entity-numbers span { margin-top: 4px; color: var(--muted); font-size: 8px; }
.entity-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 15px; }
.secondary-button.small { min-height: 35px; padding: 0 12px; }
.icon-action { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 11px; color: var(--muted); border: 1px solid var(--line); background: var(--surface-solid); }
.icon-action:hover { color: var(--primary); border-color: color-mix(in srgb,var(--primary) 26%,var(--line)); }
.student-status-row, .badge-row { display: flex; gap: 6px; flex-wrap: wrap; }
.cycle-mini { margin-top: 13px; padding: 12px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-solid); }
.cycle-mini > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 9px; }
.cycle-mini span { color: var(--muted); font-size: 8px; }
.cycle-mini strong { max-width: 65%; font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-progress { height: 5px; margin-top: 9px; border-radius: 5px; overflow: hidden; background: var(--line); }
.mini-progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,var(--primary),var(--primary-2)); }
.cycle-mini small { display: block; margin-top: 5px; color: var(--muted); font-size: 8px; text-align: right; }
.entity-meta { display: grid; gap: 5px; margin-top: 12px; color: var(--muted); font-size: 9px; }
.entity-meta strong { color: var(--text); font-weight: 750; }

.pagination { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 4px 22px 22px; }
.page-link, .page-number { min-height: 36px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); background: var(--surface-soft); border-radius: 11px; font-size: 10px; font-weight: 750; }
.page-link { gap: 7px; padding: 0 12px; }
.page-number { width: 36px; }
.page-number.active { border-color: transparent; color: white; background: linear-gradient(135deg,var(--primary),var(--primary-2)); }
.page-link.disabled { opacity: .4; pointer-events: none; }
.page-numbers { display: flex; gap: 6px; }

.back-link { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 11px; color: var(--muted); font-size: 10px; font-weight: 750; }
.back-link:hover { color: var(--primary); }
.entity-form { max-width: 1120px; margin: 0 auto; display: grid; gap: 15px; }
.form-section { padding: 23px; }
.form-section-head { display: flex; align-items: center; gap: 13px; margin-bottom: 20px; padding-bottom: 17px; border-bottom: 1px solid var(--line); }
.section-icon { width: 43px; height: 43px; flex: 0 0 43px; display: grid; place-items: center; border-radius: 13px; color: var(--primary); background: var(--primary-soft); }
.form-section-head h2 { margin: 0; font-size: 16px; }
.form-section-head p { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.field-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.field { display: grid; gap: 7px; min-width: 0; }
.field.full { grid-column: 1/-1; }
.field > span { font-size: 10px; font-weight: 800; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); color: var(--text); outline: 0; transition: .2s; }
.field input, .field select { height: 45px; padding: 0 12px; }
.field textarea { padding: 12px; resize: vertical; line-height: 1.55; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); background: var(--surface-solid); }
.field > small { color: var(--muted); font-size: 8px; line-height: 1.5; }
.field .field-error { color: var(--red); font-weight: 700; }
.form-footer { position: sticky; bottom: calc(var(--dock-h) + 24px); z-index: 12; display: flex; justify-content: flex-end; gap: 9px; padding: 12px; border: 1px solid var(--line-strong); border-radius: 16px; background: color-mix(in srgb,var(--surface-solid) 88%,transparent); backdrop-filter: blur(18px); box-shadow: var(--shadow); }
.danger-button { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 14px; border: 1px solid color-mix(in srgb,var(--red) 28%,var(--line)); border-radius: 12px; background: color-mix(in srgb,var(--red) 9%,transparent); color: var(--red); cursor: pointer; font-size: 11px; font-weight: 780; }
.danger-button:hover { background: color-mix(in srgb,var(--red) 15%,transparent); }

.profile-layout { display: grid; grid-template-columns: minmax(300px,380px) minmax(0,1fr); gap: 18px; }
.profile-card { align-self: start; padding: 23px; }
.profile-identity { display: flex; align-items: center; gap: 14px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.profile-avatar-large { width: 68px; height: 68px; border-radius: 21px; font-size: 25px; box-shadow: 0 12px 26px color-mix(in srgb,var(--primary) 22%,transparent); }
.profile-identity h2 { margin: 0 0 8px; font-size: 20px; }
.detail-list { margin: 5px 0 0; }
.detail-list > div { display: grid; grid-template-columns: 120px minmax(0,1fr); gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.detail-list dt { color: var(--muted); font-size: 9px; font-weight: 700; }
.detail-list dd { margin: 0; font-size: 10px; font-weight: 700; text-align: right; overflow-wrap: anywhere; }
.notes-box { margin-top: 18px; padding: 14px; border-radius: 13px; background: var(--surface-soft); border: 1px solid var(--line); }
.notes-box strong { font-size: 10px; }
.notes-box p { margin: 8px 0 0; color: var(--muted); font-size: 10px; line-height: 1.65; }
.profile-main { display: grid; align-content: start; gap: 18px; min-width: 0; }
.profile-main .compact-metrics { margin-bottom: 0; }
.profile-section { overflow: hidden; }
.compact-list { padding: 8px 21px 17px; }
.compact-list a { display: grid; grid-template-columns: 38px minmax(0,1fr) auto auto; align-items: center; gap: 11px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.compact-list a:last-child { border-bottom: 0; }
.compact-list a:hover strong { color: var(--primary); }
.mini-avatar { width: 37px; height: 37px; border-radius: 12px; }
.compact-list a > div { min-width: 0; }
.compact-list strong, .compact-list small { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.compact-list strong { font-size: 11px; }
.compact-list small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.progress-label { color: var(--primary); font-size: 10px; font-weight: 850; }

@media (max-width: 1180px) {
    .entity-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .compact-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 850px) {
    .profile-layout { grid-template-columns: 1fr; }
    .profile-card { order: -1; }
    .filter-bar { align-items: stretch; }
    .filter-bar select, .filter-bar .secondary-button { flex: 1 1 160px; }
}
@media (max-width: 620px) {
    .entity-grid { grid-template-columns: 1fr; padding: 12px; }
    .compact-metrics { grid-template-columns: 1fr 1fr; }
    .filter-bar { padding: 12px; }
    .filter-search { min-width: 100%; flex-basis: 100%; }
    .field-grid { grid-template-columns: 1fr; }
    .field.full { grid-column: auto; }
    .form-section { padding: 17px; }
    .form-footer { bottom: calc(var(--dock-h) + 14px); }
    .pagination { padding: 3px 12px 15px; }
    .page-numbers { display: none; }
    .detail-list > div { grid-template-columns: 1fr; gap: 5px; }
    .detail-list dd { text-align: left; }
    .compact-list a { grid-template-columns: 36px minmax(0,1fr) auto; }
    .compact-list a > svg:last-child, .compact-list .progress-label { display: none; }
}

/* ===== Dock labels + Academic modules v1.2.0 ===== */
:root { --dock-h: 82px; }
.dock { height: var(--dock-h); padding: 8px 10px; gap: 4px; align-items: stretch; }
.dock-item { flex: 0 0 72px; width: 72px; height: 64px; padding: 7px 4px 5px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.dock-label { display: block; width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; text-align: center; font-size: 8px; line-height: 1.1; font-weight: 800; letter-spacing: -.01em; }
.dock-item::before { display: none; }
.dock-item.active::after { bottom: -5px; }

.split-management { display: grid; grid-template-columns: minmax(300px,.7fr) minmax(0,1.3fr); gap: 18px; align-items: start; }
.compact-form-card { position: sticky; top: calc(var(--topbar) + 24px); }
.inline-form-actions { display: flex; justify-content: flex-end; margin-top: 18px; }
.data-table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; min-width: 760px; }
.data-table th, .data-table td { padding: 13px 16px; border-bottom: 1px solid var(--line); text-align: left; font-size: 10px; vertical-align: middle; }
.data-table th { color: var(--muted); font-size: 8px; text-transform: uppercase; letter-spacing: .06em; }
.data-table td strong, .data-table td small { display: block; }
.data-table td small { margin-top: 4px; color: var(--muted); font-size: 8px; }

.academic-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; padding: 20px 22px; }
.academic-card { min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface-soft); transition: .2s; }
.academic-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb,var(--primary) 25%,var(--line)); box-shadow: var(--shadow-soft); }
.academic-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.academic-card-top h3 { margin: 5px 0 0; font-size: 15px; line-height: 1.25; }
.period-row { display: flex; align-items: center; gap: 7px; margin: 14px 0; color: var(--muted); font-size: 9px; }
.academic-progress > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.academic-progress span { color: var(--muted); font-size: 8px; font-weight: 750; }
.academic-progress strong { font-size: 12px; }
.academic-numbers { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-top: 13px; }
.academic-numbers div { padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-solid); }
.academic-numbers strong, .academic-numbers span { display: block; }
.academic-numbers strong { font-size: 14px; }
.academic-numbers span { margin-top: 4px; color: var(--muted); font-size: 7px; }
.academic-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; }
.academic-meta > span:first-child { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--muted); font-size: 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.large-badge { min-height: 30px; padding: 0 11px; font-size: 9px; }

.academic-form { max-width: 1280px; }
.academic-section-head { align-items: center; }
.academic-section-head .head-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.primary-button.small { min-height: 35px; padding: 0 12px; font-size: 10px; }
.form-alert { display: flex; gap: 11px; align-items: flex-start; padding: 14px; border: 1px solid color-mix(in srgb,var(--red) 25%,var(--line)); border-radius: 14px; color: var(--red); background: color-mix(in srgb,var(--red) 7%,var(--surface-solid)); }
.form-alert strong, .form-alert span { display: block; }
.form-alert strong { font-size: 11px; }
.form-alert span { margin-top: 4px; color: var(--muted); font-size: 9px; line-height: 1.55; }
.cycle-items { display: grid; gap: 12px; }
.cycle-item-row { display: grid; grid-template-columns: 38px minmax(0,1fr); gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface-soft); }
.cycle-item-number { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.cycle-item-number > span { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; color: white; background: linear-gradient(135deg,var(--primary),var(--primary-2)); font-size: 10px; font-weight: 850; }
.remove-row { width: 28px; height: 28px; border: 0; border-radius: 9px; cursor: pointer; color: var(--red); background: color-mix(in srgb,var(--red) 9%,transparent); }
.cycle-item-fields { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 11px; }
.cycle-item-fields .field.full { grid-column: 1/-1; }

.academic-detail { overflow: hidden; }
.study-list { padding: 5px 22px 22px; }
.study-item { display: grid; grid-template-columns: 54px minmax(0,1fr); gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.study-item:last-child { border-bottom: 0; }
.study-date { width: 52px; height: 58px; display: grid; place-items: center; align-content: center; border-radius: 14px; color: var(--primary); background: var(--primary-soft); }
.study-date strong { font-size: 17px; }
.study-date span { margin-top: 3px; font-size: 7px; font-weight: 850; }
.study-main { min-width: 0; }
.study-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.study-title-row h3 { margin: 5px 0 0; font-size: 14px; }
.study-targets { display: flex; gap: 12px; flex-wrap: wrap; margin: 11px 0; color: var(--muted); }
.study-targets span { display: flex; align-items: center; gap: 5px; font-size: 8px; }
.performance-form { display: grid; gap: 10px; padding: 13px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft); }
.performance-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 9px; }
.performance-grid label, .performance-notes { display: grid; gap: 5px; }
.performance-grid span, .performance-notes span { font-size: 8px; font-weight: 800; }
.performance-grid input, .performance-grid select, .performance-notes textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-solid); color: var(--text); outline: 0; }
.performance-grid input, .performance-grid select { height: 38px; padding: 0 9px; }
.performance-notes textarea { padding: 9px; resize: vertical; }
.performance-form .secondary-button { justify-self: end; }
.danger-zone { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 18px; padding: 19px 22px; }
.danger-zone h3 { margin: 0; font-size: 14px; }
.danger-zone p { margin: 5px 0 0; color: var(--muted); font-size: 9px; }

.status-badge.priority-low { color: var(--muted); background: color-mix(in srgb,var(--muted) 10%,transparent); }
.status-badge.priority-normal { color: var(--primary); background: var(--primary-soft); }
.status-badge.priority-high { color: var(--amber); background: color-mix(in srgb,var(--amber) 12%,transparent); }
.status-badge.priority-urgent { color: var(--red); background: color-mix(in srgb,var(--red) 12%,transparent); }
.source-cycle-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.source-cycle-option, .source-item-option { display: grid; align-items: center; gap: 11px; padding: 13px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-soft); cursor: pointer; }
.source-cycle-option { grid-template-columns: 18px minmax(0,1fr) auto; }
.source-item-option { grid-template-columns: 18px 78px minmax(0,1fr) auto; }
.source-cycle-option:has(input:checked), .source-item-option:has(input:checked) { border-color: color-mix(in srgb,var(--primary) 38%,var(--line)); background: var(--primary-soft); }
.source-cycle-option input, .source-item-option input, .select-all-control input { accent-color: var(--primary); }
.source-cycle-option strong, .source-cycle-option small, .source-item-option strong, .source-item-option small { display: block; }
.source-cycle-option strong, .source-item-option strong { font-size: 10px; }
.source-cycle-option small, .source-item-option small { margin-top: 4px; color: var(--muted); font-size: 8px; }
.source-cycle-option em, .source-item-option em { color: var(--primary); font-size: 9px; font-style: normal; font-weight: 850; }
.reload-source-actions { display: flex; justify-content: flex-end; margin-top: 14px; }
.source-items-list { display: grid; gap: 8px; }
.source-item-date { color: var(--muted); font-size: 8px; }
.select-all-control { margin-left: auto; display: flex; align-items: center; gap: 7px; font-size: 9px; font-weight: 800; }
.revision-edit-items { display: grid; gap: 9px; }
.revision-edit-row { display: grid; grid-template-columns: minmax(0,1.4fr) repeat(3,minmax(120px,.5fr)); gap: 10px; align-items: end; padding: 12px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-soft); }
.revision-edit-row > div strong { display: block; margin-top: 5px; font-size: 11px; }
.revision-edit-row label { display: grid; gap: 5px; }
.revision-edit-row label span { font-size: 8px; font-weight: 800; }
.revision-edit-row input { height: 38px; padding: 0 9px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-solid); color: var(--text); }
.source-summary { margin-bottom: 18px; overflow: hidden; }
.source-summary-list { padding: 5px 22px 20px; display: grid; gap: 8px; }
.source-summary-list a { display: grid; grid-template-columns: 40px minmax(0,1fr) auto 16px; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-soft); }
.source-summary-list strong, .source-summary-list small { display: block; }
.source-summary-list strong { font-size: 10px; }
.source-summary-list small { margin-top: 4px; color: var(--muted); font-size: 8px; }
.source-summary-list em { color: var(--primary); font-size: 10px; font-style: normal; font-weight: 850; }

@media (max-width: 1180px) {
    .academic-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .split-management { grid-template-columns: 1fr; }
    .compact-form-card { position: static; }
    .cycle-item-fields { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 760px) {
    :root { --dock-h: 74px; }
    .dock { height: var(--dock-h); }
    .dock-item { flex-basis: 62px; width: 62px; height: 58px; gap: 4px; padding: 5px 3px; }
    .dock-label { font-size: 7px; }
    .academic-grid { grid-template-columns: 1fr; padding: 12px; }
    .academic-numbers { grid-template-columns: repeat(3,1fr); }
    .cycle-item-fields, .performance-grid { grid-template-columns: 1fr 1fr; }
    .source-cycle-grid { grid-template-columns: 1fr; }
    .source-item-option { grid-template-columns: 18px minmax(0,1fr) auto; }
    .source-item-date { display: none; }
    .revision-edit-row { grid-template-columns: 1fr 1fr; }
    .revision-edit-row > div { grid-column: 1/-1; }
    .academic-section-head { align-items: flex-start; flex-wrap: wrap; }
    .academic-section-head .head-actions, .select-all-control { width: 100%; margin-left: 56px; }
}
@media (max-width: 520px) {
    .cycle-item-row { grid-template-columns: 1fr; }
    .cycle-item-number { flex-direction: row; justify-content: space-between; }
    .cycle-item-fields, .performance-grid { grid-template-columns: 1fr; }
    .study-item { grid-template-columns: 1fr; }
    .study-date { width: 100%; height: 38px; display: flex; gap: 5px; }
    .revision-edit-row { grid-template-columns: 1fr; }
    .danger-zone { align-items: flex-start; flex-direction: column; }
}

/* Dock label readability correction v1.2.0 */
:root { --dock-h: 88px; }
.dock { min-height: var(--dock-h); padding: 8px 12px; gap: 5px; }
.dock-item {
    flex: 0 0 80px;
    width: 80px;
    height: 70px;
    padding: 7px 5px 6px;
    gap: 6px;
}
.dock-label {
    display: -webkit-box;
    width: 100%;
    min-height: 20px;
    overflow: hidden;
    white-space: normal;
    text-overflow: clip;
    text-align: center;
    font-size: 10px;
    line-height: 1.05;
    font-weight: 800;
    letter-spacing: 0;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.dock-item svg { flex: 0 0 auto; }
@media (max-width: 760px) {
    :root { --dock-h: 82px; }
    .dock { min-height: var(--dock-h); padding: 7px 8px; }
    .dock-item { flex-basis: 70px; width: 70px; height: 64px; padding: 6px 3px 5px; }
    .dock-label { min-height: 18px; font-size: 9px; }
}

/* =========================================================
   AP MED v1.2.1 — Correções visuais de alinhamento e Dock
   ========================================================= */
:root { --dock-h: 72px; }

.brand {
    width: min(190px, 100%);
    min-width: 0;
}
.brand-logo {
    display: block;
    width: auto;
    max-width: 190px;
    height: 48px;
    object-fit: contain;
    object-position: left center;
    filter: none;
}
.brand-logo.brand-logo-fallback {
    width: 42px;
    height: 42px;
    filter: drop-shadow(0 8px 18px rgba(0,82,204,.22));
}

.form-page-head {
    width: 100%;
    max-width: 1120px;
    margin-left: auto;
    margin-right: auto;
}
.form-page-head.academic-width { max-width: 1280px; }
.page-head-copy { width: 100%; min-width: 0; }
.page-context-row {
    min-height: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}
.page-context-row .back-link {
    margin: 0;
    line-height: 1;
}
.page-context-row .eyebrow {
    display: inline-flex;
    align-items: center;
    min-height: 16px;
    line-height: 1;
}
.form-page-head h1 { margin-top: 0; }

.field-grid { align-items: start; }
.field {
    align-content: start;
    min-width: 0;
}
.field > span {
    min-height: 14px;
    display: flex;
    align-items: flex-end;
    line-height: 1.25;
}
.field input,
.field select,
.field textarea { min-width: 0; }

/* Dock no padrão VERA: apenas ícones; nome aparece ao passar o cursor. */
.dock {
    height: var(--dock-h);
    min-height: var(--dock-h);
    padding: 10px 12px;
    gap: 5px;
    align-items: center;
    overflow-x: auto;
    overflow-y: hidden;
}
.dock-item {
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    padding: 0;
    display: grid;
    place-items: center;
    gap: 0;
}
.dock-label { display: none !important; }
.dock-item::before { display: none !important; }
.dock-item.active::after { bottom: -8px; }

.dock-floating-tooltip {
    position: fixed;
    z-index: 90;
    left: 0;
    top: 0;
    max-width: min(260px, calc(100vw - 24px));
    padding: 7px 10px;
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 9px;
    color: #fff;
    background: rgba(16,24,39,.96);
    box-shadow: 0 12px 30px rgba(0,0,0,.24);
    font-size: 10px;
    line-height: 1.15;
    font-weight: 750;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transform: translate(-50%, 6px);
    transition: opacity .15s ease, transform .15s ease;
}
.dock-floating-tooltip.visible {
    opacity: 1;
    transform: translate(-50%, 0);
}
.dock-floating-tooltip::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 100%;
    width: 8px;
    height: 8px;
    background: rgba(16,24,39,.96);
    transform: translate(-50%, -4px) rotate(45deg);
}

@media (max-width: 760px) {
    :root { --dock-h: 72px; }
    .dock { height: var(--dock-h); min-height: var(--dock-h); padding: 9px 10px; }
    .dock-item { flex-basis: 48px; width: 48px; height: 48px; padding: 0; }
    .brand-logo { max-width: 150px; height: 42px; }
}

@media (max-width: 620px) {
    .form-page-head { margin-bottom: 20px; }
    .page-context-row { flex-wrap: wrap; gap: 8px 10px; }
}

.auth-brand-logo {
    width: auto;
    max-width: 210px;
    height: 58px;
    object-fit: contain;
    object-position: left center;
    border-radius: 0 !important;
    box-shadow: none !important;
}
.auth-brand-logo.auth-brand-logo-fallback,
.mobile-brand img.auth-brand-logo-fallback {
    width: 54px;
    height: 54px;
    border-radius: 17px !important;
    box-shadow: 0 14px 35px rgba(0,0,0,.18) !important;
}
.mobile-brand img {
    width: auto;
    max-width: 150px;
    height: 44px;
    object-fit: contain;
}

/* =========================================================
   AP MED v1.3.0 — Logo ampliado, Provas, Flashcards e Caderno
   ========================================================= */
@media (min-width: 901px) {
    .topbar { grid-template-columns: minmax(300px,1fr) minmax(320px,620px) minmax(340px,1fr); }
    .brand { width: 290px; }
    .brand-logo { max-width: 275px; height: 64px; }
    .brand-logo.brand-logo-fallback { width: 52px; height: 52px; }
}
@media (min-width: 901px) and (max-width: 1240px) {
    .topbar { grid-template-columns: 260px 1fr auto; }
    .brand { width: 250px; }
    .brand-logo { max-width: 235px; height: 58px; }
}
@media (max-width: 900px) {
    .brand { width: 205px; }
    .brand-logo { max-width: 195px; height: 52px; }
}
@media (max-width: 620px) {
    .brand { width: 150px; }
    .brand-logo { width: auto !important; max-width: 145px; height: 44px !important; }
}

.check-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.check-card { display:flex; align-items:center; gap:10px; min-height:58px; padding:11px 13px; border:1px solid var(--line); border-radius:14px; background:var(--surface-soft); cursor:pointer; transition:.2s; }
.check-card:hover { border-color:color-mix(in srgb,var(--primary) 35%,var(--line)); background:var(--surface-hover); }
.check-card input { width:17px; height:17px; accent-color:var(--primary); }
.check-card span { display:flex; flex-direction:column; min-width:0; }
.check-card strong { font-size:11px; }
.check-card small { margin-top:3px; color:var(--muted); font-size:8px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.inline-error { margin:0 0 14px; padding:10px 12px; border-radius:11px; background:color-mix(in srgb,var(--red) 10%,transparent); color:var(--red); font-size:10px; font-weight:750; }

.exam-question-list { display:grid; gap:15px; }
.exam-question-editor { padding:17px; border:1px solid var(--line); border-radius:17px; background:var(--surface-soft); }
.exam-question-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:14px; }
.exam-question-head strong { font-size:12px; }
.icon-action.danger { color:var(--red); }
.exam-card .academic-numbers { grid-template-columns:repeat(2,1fr); }
.result-hero { display:flex; align-items:center; gap:24px; padding:24px; }
.result-score { width:108px; height:108px; border-radius:50%; display:grid; place-items:center; flex:0 0 auto; color:#fff; background:linear-gradient(135deg,var(--primary),var(--cyan)); font-size:25px; font-weight:900; box-shadow:0 15px 35px color-mix(in srgb,var(--primary) 30%,transparent); }
.result-hero h2 { margin:6px 0; }
.result-hero p { margin:0; color:var(--muted); }
.exam-taking-list { display:grid; gap:14px; }
.exam-question-view { display:grid; grid-template-columns:44px 1fr; gap:15px; padding:20px; }
.question-number { width:40px; height:40px; display:grid; place-items:center; border-radius:12px; color:var(--primary); background:var(--primary-soft); font-weight:900; }
.question-body h3 { margin:2px 0 16px; font-size:15px; line-height:1.55; }
.option-list { display:grid; gap:8px; }
.answer-option { display:flex; align-items:flex-start; gap:10px; padding:11px 13px; border:1px solid var(--line); border-radius:13px; background:var(--surface-soft); cursor:pointer; }
.answer-option input { margin-top:3px; accent-color:var(--primary); }
.answer-option strong { width:24px; height:24px; display:grid; place-items:center; border-radius:8px; background:var(--surface-solid); color:var(--primary); }
.answer-option span { padding-top:3px; font-size:11px; line-height:1.45; }
.answer-option.correct { border-color:color-mix(in srgb,var(--green) 55%,var(--line)); background:color-mix(in srgb,var(--green) 8%,var(--surface-soft)); }
.answer-option.wrong { border-color:color-mix(in srgb,var(--red) 55%,var(--line)); background:color-mix(in srgb,var(--red) 8%,var(--surface-soft)); }
.question-comment { margin-top:13px; padding:13px; border-left:3px solid var(--primary); border-radius:10px; background:var(--primary-soft); }
.question-comment strong { font-size:10px; }
.question-comment p { margin:6px 0 0; color:var(--muted); font-size:10px; line-height:1.55; }
.external-result-tabs { display:flex; gap:18px; margin-bottom:16px; }
.external-result-tabs label { display:flex; align-items:center; gap:7px; font-size:10px; font-weight:750; }
.external-result-tabs input { accent-color:var(--primary); }
.external-question-grid { display:grid; grid-template-columns:repeat(10,minmax(0,1fr)); gap:8px; margin-bottom:18px; }
.external-question { display:grid; grid-template-columns:1fr 1fr; gap:4px; padding:7px; border:1px solid var(--line); border-radius:12px; background:var(--surface-soft); }
.external-question strong { grid-column:1/-1; text-align:center; font-size:10px; }
.external-question label { height:28px; display:grid; place-items:center; border-radius:8px; cursor:pointer; font-weight:900; }
.external-question input { position:absolute; opacity:0; pointer-events:none; }
.external-question .mark-correct { color:var(--green); background:color-mix(in srgb,var(--green) 10%,transparent); }
.external-question .mark-wrong { color:var(--red); background:color-mix(in srgb,var(--red) 10%,transparent); }
.external-question label:has(input:checked) { color:white; box-shadow:0 6px 14px rgba(0,0,0,.12); }
.external-question .mark-correct:has(input:checked) { background:var(--green); }
.external-question .mark-wrong:has(input:checked) { background:var(--red); }
.question-preview-list { display:grid; gap:9px; padding:0 20px 20px; }
.question-preview-list article { padding:13px; border:1px solid var(--line); border-radius:13px; background:var(--surface-soft); }
.question-preview-list strong,.question-preview-list span { display:block; font-size:10px; line-height:1.5; }
.question-preview-list span { margin-top:5px; color:var(--green); font-weight:800; }
.question-preview-list p { margin:6px 0 0; color:var(--muted); font-size:9px; }

.flashcard-layout { display:grid; grid-template-columns:270px minmax(0,1fr); gap:16px; align-items:start; }
.flashcard-sidebar { position:sticky; top:calc(var(--topbar) + 20px); padding-bottom:16px; }
.compact-form { display:grid; gap:10px; padding:0 18px 18px; }
.full-button { width:100%; justify-content:center; }
.deck-list { display:grid; gap:5px; padding:0 12px; }
.deck-list a { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:10px 11px; border-radius:11px; color:var(--muted); font-size:10px; font-weight:750; }
.deck-list a:hover,.deck-list a.active { color:var(--primary); background:var(--primary-soft); }
.deck-list strong { min-width:24px; height:24px; display:grid; place-items:center; border-radius:8px; background:var(--surface-solid); font-size:9px; }
.flashcard-main { display:grid; gap:16px; min-width:0; }
.inline-form-actions { display:flex; justify-content:flex-end; margin-top:14px; }
.check-line { display:flex; align-items:center; gap:8px; font-size:10px; font-weight:700; }
.check-line input { accent-color:var(--primary); }
.filter-check { display:flex; align-items:center; gap:6px; min-height:40px; font-size:9px; font-weight:750; white-space:nowrap; }
.filter-check input { accent-color:var(--primary); }
.flashcard-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; padding:0 18px 18px; }
.flashcard-card { padding:16px; border:1px solid var(--line); border-radius:17px; background:var(--surface-soft); box-shadow:var(--shadow-soft); }
.flashcard-card-head { display:flex; justify-content:space-between; align-items:center; }
.favorite-button { width:30px; height:30px; border:0; border-radius:9px; background:var(--surface-solid); color:var(--muted); cursor:pointer; }
.favorite-button.active { color:var(--amber); background:color-mix(in srgb,var(--amber) 12%,var(--surface-solid)); }
.flashcard-face,.flashcard-answer { margin-top:13px; padding:12px; border-radius:13px; background:var(--surface-solid); }
.flashcard-face small,.flashcard-answer small { color:var(--muted); font-size:8px; font-weight:800; text-transform:uppercase; letter-spacing:.1em; }
.flashcard-face h3 { margin:7px 0 0; font-size:13px; line-height:1.45; }
.flashcard-answer p { margin:7px 0 0; color:var(--muted); font-size:10px; line-height:1.5; }
.flashcard-meta { display:flex; justify-content:space-between; gap:10px; margin-top:12px; color:var(--muted); font-size:8px; }
.flashcard-review-shell { max-width:820px; margin:0 auto; }
.flashcard-review-card { min-height:440px; padding:28px; display:flex; flex-direction:column; border:1px solid var(--line); border-radius:26px; background:linear-gradient(145deg,var(--surface-solid),var(--surface-soft)); box-shadow:var(--shadow); }
.flashcard-review-top { display:flex; justify-content:space-between; color:var(--muted); font-size:9px; }
.review-face { flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; }
.review-face small { color:var(--muted); text-transform:uppercase; letter-spacing:.14em; font-size:9px; font-weight:850; }
.review-face h2 { max-width:650px; margin:15px 0; font-size:28px; line-height:1.35; }
.review-face p { max-width:620px; color:var(--muted); line-height:1.55; }
.reveal-answer { align-self:center; }
.review-actions { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin-top:14px; }
.review-actions form { margin:0; }
.review-result { width:100%; min-height:74px; border:1px solid var(--line); border-radius:16px; background:var(--surface-solid); cursor:pointer; }
.review-result strong,.review-result small { display:block; }
.review-result small { margin-top:5px; color:var(--muted); font-size:8px; }
.review-result.forgot { color:var(--red); }.review-result.difficult { color:var(--amber); }.review-result.remembered { color:var(--green); }

.notebook-layout { display:grid; grid-template-columns:340px minmax(0,1fr); gap:16px; align-items:start; }
.notebook-form { position:sticky; top:calc(var(--topbar) + 20px); }
.notebook-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; padding:0 18px 18px; }
.notebook-card { padding:16px; border:1px solid var(--line); border-radius:17px; background:var(--surface-soft); }
.notebook-card-head,.notebook-meta { display:flex; justify-content:space-between; gap:10px; align-items:center; }
.notebook-card-head small,.notebook-meta { color:var(--muted); font-size:8px; }
.notebook-card h3 { margin:13px 0 8px; font-size:14px; }
.notebook-card > p { max-height:130px; overflow:auto; margin:0; color:var(--muted); font-size:10px; line-height:1.55; }
.notebook-meta { margin-top:12px; padding-top:11px; border-top:1px solid var(--line); }
.notebook-status-form { display:flex; gap:5px; align-items:center; flex:1; }
.notebook-status-form select,.notebook-status-form input { min-width:0; height:34px; border:1px solid var(--line); border-radius:9px; background:var(--surface-solid); color:var(--text); font-size:8px; padding:0 7px; }

@media (max-width:1100px) {
    .check-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .external-question-grid { grid-template-columns:repeat(8,minmax(0,1fr)); }
    .flashcard-layout,.notebook-layout { grid-template-columns:1fr; }
    .flashcard-sidebar,.notebook-form { position:static; }
}
@media (max-width:760px) {
    .check-grid,.flashcard-grid,.notebook-grid { grid-template-columns:1fr; }
    .external-question-grid { grid-template-columns:repeat(5,minmax(0,1fr)); }
    .exam-question-view { grid-template-columns:1fr; }
    .question-number { width:36px;height:36px; }
    .result-hero { align-items:flex-start; }
    .result-score { width:82px;height:82px;font-size:20px; }
    .review-actions { grid-template-columns:1fr; }
    .review-face h2 { font-size:22px; }
    .notebook-status-form { flex-wrap:wrap; }
}

/* =========================================================
   AP MED v1.4.0 — Marca ampliada, Avaliação, Agenda e Aulões
   ========================================================= */
:root { --topbar: 104px; }
.topbar {
    grid-template-columns: minmax(420px,1fr) minmax(360px,620px) minmax(340px,1fr);
    min-height: var(--topbar);
    padding-left: 38px;
    padding-right: 38px;
}
.brand { width: 400px; min-width: 400px; height: 86px; overflow: visible; }
.brand-logo {
    width: 385px !important;
    max-width: none !important;
    height: 82px !important;
    object-fit: contain;
    object-position: left center;
    transform: translateZ(0);
}
.brand-logo.brand-logo-fallback { width: 62px !important; height: 62px !important; }

.curriculum-summary-grid { display:grid; grid-template-columns:minmax(0,1.35fr) minmax(260px,.65fr); gap:18px; margin-bottom:18px; }
.profile-summary-card { display:flex; align-items:center; gap:18px; padding:22px; }
.avatar.large { width:58px; height:58px; border-radius:18px; font-size:20px; flex:0 0 auto; }
.avatar.small { width:34px; height:34px; border-radius:11px; font-size:11px; flex:0 0 auto; }
.profile-summary-card h2 { margin:0 0 5px; font-size:19px; }
.profile-summary-card p,.profile-summary-card small { margin:0; color:var(--muted); font-size:10px; }
.curriculum-status-card { display:flex; flex-direction:column; justify-content:center; gap:8px; padding:22px; }
.curriculum-status-card strong { font-size:18px; }
.curriculum-status-card small { color:var(--muted); font-size:10px; }
.compact-check { margin-top:12px; }
.document-list { display:grid; gap:10px; padding:16px 20px 22px; }
.document-row { display:grid; grid-template-columns:42px minmax(180px,1fr) auto 38px minmax(300px,.9fr); align-items:center; gap:12px; padding:13px; border:1px solid var(--line); border-radius:15px; background:var(--surface-soft); }
.document-icon { width:38px; height:38px; display:grid; place-items:center; border-radius:11px; color:var(--primary); background:var(--primary-soft); }
.document-copy { min-width:0; }
.document-copy strong,.document-copy small { display:block; }
.document-copy strong { font-size:11px; }
.document-copy small { margin-top:4px; color:var(--muted); font-size:8px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.document-copy p { margin:7px 0 0; color:var(--muted); font-size:9px; }
.document-review-form { display:grid; grid-template-columns:150px minmax(130px,1fr) auto; gap:7px; }
.document-review-form select,.document-review-form input { min-width:0; height:36px; padding:0 9px; border:1px solid var(--line); border-radius:10px; color:var(--text); background:var(--surface-solid); font-size:9px; }
.evaluation-items { display:grid; gap:10px; margin:18px 0 12px; }
.evaluation-item { display:grid; grid-template-columns:minmax(180px,1.25fr) 140px 140px minmax(180px,1fr) 36px; align-items:end; gap:10px; padding:13px; border:1px solid var(--line); border-radius:15px; background:var(--surface-soft); }
.evaluation-opinion { margin-top:18px; }
.evaluation-result { display:flex; align-items:center; gap:24px; padding:24px; }
.evaluation-result h3 { margin:0 0 8px; }
.evaluation-result p { margin:0 0 10px; color:var(--muted); font-size:11px; line-height:1.7; }
.evaluation-result small { color:var(--muted); font-size:9px; }

.appointment-list { display:grid; gap:11px; padding:18px 20px 24px; }
.appointment-card { display:grid; grid-template-columns:62px minmax(210px,1fr) minmax(430px,1.25fr); align-items:center; gap:16px; padding:14px; border:1px solid var(--line); border-radius:16px; background:var(--surface-soft); }
.appointment-card > time { width:58px; height:58px; display:grid; place-items:center; align-content:center; border-radius:15px; color:var(--primary); background:var(--primary-soft); }
.appointment-card > time strong { font-size:20px; line-height:1; }
.appointment-card > time span { margin-top:5px; font-size:8px; font-weight:850; }
.appointment-copy h3 { margin:7px 0 4px; font-size:13px; }
.appointment-copy p { margin:0; color:var(--muted); font-size:9px; }
.appointment-copy .text-button { margin-top:7px; color:var(--primary); font-size:9px; font-weight:800; }
.appointment-actions { display:grid; grid-template-columns:130px minmax(140px,1fr) minmax(130px,1fr) auto; gap:7px; }
.appointment-actions select,.appointment-actions input { min-width:0; height:36px; padding:0 9px; border:1px solid var(--line); border-radius:10px; background:var(--surface-solid); color:var(--text); font-size:9px; }

.class-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; padding:18px 20px 24px; }
.class-card { overflow:hidden; border:1px solid var(--line); border-radius:19px; background:var(--surface); box-shadow:var(--shadow-soft); }
.class-cover { min-height:150px; display:grid; place-items:center; align-content:center; gap:10px; color:white; background:linear-gradient(135deg,var(--primary),var(--cyan)); }
.class-cover span { width:64px; height:64px; display:grid; place-items:center; border:1px solid rgba(255,255,255,.22); border-radius:20px; background:rgba(255,255,255,.13); backdrop-filter:blur(10px); }
.class-cover small { font-size:9px; font-weight:800; }
.class-card-body { padding:17px; }
.class-card-body h3 { margin:10px 0 7px; font-size:15px; }
.class-card-body p { min-height:42px; margin:0 0 12px; color:var(--muted); font-size:9px; line-height:1.6; }
.class-card-body > small { color:var(--muted); font-size:8px; }
.class-detail-grid { display:grid; grid-template-columns:minmax(0,1.6fr) minmax(300px,.55fr); gap:18px; align-items:start; margin-bottom:18px; }
.class-player-panel { overflow:hidden; }
.video-frame { position:relative; padding-top:56.25%; background:#050a12; }
.video-frame iframe { position:absolute; inset:0; width:100%; height:100%; border:0; }
.native-video { display:block; width:100%; max-height:680px; background:#050a12; }
.external-video { min-height:420px; display:grid; place-items:center; align-content:center; gap:18px; background:linear-gradient(135deg,var(--surface-soft),var(--surface)); }
.class-meta { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:16px 18px; }
.class-side-stack { display:grid; gap:18px; }
.side-form-card .compact-form { padding:16px 18px 20px; }
.side-form-card textarea { width:100%; padding:12px; border:1px solid var(--line); border-radius:12px; background:var(--surface-soft); color:var(--text); resize:vertical; }
.comments-panel { margin-bottom:18px; }
.comment-list { display:grid; gap:1px; padding:8px 20px; }
.comment-list article { display:grid; grid-template-columns:36px 1fr; gap:12px; padding:14px 0; border-bottom:1px solid var(--line); }
.comment-list strong,.comment-list small { display:block; }
.comment-list strong { font-size:11px; }
.comment-list small { margin-top:3px; color:var(--muted); font-size:8px; }
.comment-list p { margin:8px 0 0; font-size:10px; line-height:1.6; }
.comment-form { display:grid; grid-template-columns:1fr auto; align-items:end; gap:12px; padding:16px 20px 22px; }
.comment-form textarea { padding:12px; border:1px solid var(--line); border-radius:13px; background:var(--surface-soft); color:var(--text); resize:vertical; }

@media (max-width: 1400px) {
    :root { --topbar: 94px; }
    .topbar { grid-template-columns: 340px minmax(300px,1fr) auto; padding-left:28px; padding-right:28px; }
    .brand { width:330px; min-width:330px; height:78px; }
    .brand-logo { width:315px !important; height:74px !important; }
    .document-row { grid-template-columns:42px minmax(160px,1fr) auto 38px; }
    .document-review-form { grid-column:2/-1; }
    .appointment-card { grid-template-columns:62px minmax(180px,.75fr) minmax(360px,1fr); }
}
@media (max-width: 1100px) {
    :root { --topbar: 86px; }
    .topbar { grid-template-columns:270px 1fr auto; gap:14px; padding:0 20px; }
    .brand { width:260px; min-width:260px; height:70px; }
    .brand-logo { width:250px !important; height:66px !important; }
    .class-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .class-detail-grid { grid-template-columns:1fr; }
    .evaluation-item { grid-template-columns:1fr 1fr; }
    .evaluation-item .icon-action { align-self:center; }
    .appointment-card { grid-template-columns:58px 1fr; }
    .appointment-actions { grid-column:2; grid-template-columns:1fr 1fr; }
}
@media (max-width: 760px) {
    :root { --topbar: 76px; }
    .topbar { grid-template-columns:190px 1fr auto; padding:0 12px; }
    .brand { width:180px; min-width:180px; height:62px; }
    .brand-logo { width:175px !important; height:58px !important; }
    .curriculum-summary-grid,.class-grid { grid-template-columns:1fr; }
    .document-row { grid-template-columns:42px minmax(0,1fr) auto; }
    .document-row > .icon-action { grid-column:3; }
    .document-review-form { grid-column:1/-1; grid-template-columns:1fr; }
    .evaluation-item { grid-template-columns:1fr; }
    .appointment-actions { grid-template-columns:1fr; }
    .comment-form { grid-template-columns:1fr; }
}
@media (max-width: 620px) {
    .topbar { grid-template-columns:170px 1fr auto; }
    .brand { width:160px; min-width:160px; }
    .brand-logo { width:155px !important; height:54px !important; }
}

/* =========================================================
   AP MED v1.5.0 — Site, Financeiro, Comunidade, Tickets e Notificações
   ========================================================= */
@media (min-width: 1401px) {
    .topbar { grid-template-columns: minmax(470px,1fr) minmax(360px,620px) minmax(340px,1fr); }
    .brand { width:450px; min-width:450px; height:94px; }
    .brand-logo { width:430px !important; height:90px !important; }
}
.notification-menu { position:relative; }
.notification-count { position:absolute; right:3px; top:3px; min-width:17px; height:17px; padding:0 4px; display:grid; place-items:center; border-radius:9px; color:#fff; background:#ef4444; font-size:8px; font-weight:900; box-shadow:0 0 0 3px var(--surface-solid); }
.notification-panel { right:-82px; width:min(390px,calc(100vw - 24px)); padding:0; overflow:hidden; }
.notification-panel-head { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:16px; border-bottom:1px solid var(--line); }
.notification-panel-head strong,.notification-panel-head small { display:block; }.notification-panel-head small{margin-top:3px;color:var(--muted);font-size:9px}
.notification-list { max-height:420px; overflow:auto; }.notification-item{display:block;border-bottom:1px solid var(--line)}.notification-item:last-child{border:0}.notification-item button{width:100%;display:grid;grid-template-columns:34px 1fr;gap:10px;text-align:left;padding:13px 15px;border:0;background:transparent;color:var(--text);cursor:pointer}.notification-item.unread button{background:var(--primary-soft)}.notification-type-icon{width:32px;height:32px;display:grid;place-items:center;border-radius:10px;color:var(--primary);background:var(--surface-soft)}.notification-item strong,.notification-item small,.notification-item time{display:block}.notification-item strong{font-size:10px}.notification-item small{margin-top:4px;color:var(--muted);font-size:8px;line-height:1.45}.notification-item time{margin-top:5px;color:var(--muted);font-size:7px}.empty-notifications{display:grid;place-items:center;gap:8px;padding:30px;color:var(--muted);font-size:10px}

.site-body { min-height:100vh; color:var(--text); background:var(--background); }
.site-header { position:sticky; z-index:50; top:0; min-height:86px; display:grid; grid-template-columns:320px 1fr auto; align-items:center; gap:28px; padding:0 5vw; border-bottom:1px solid var(--line); background:color-mix(in srgb,var(--background) 88%,transparent); backdrop-filter:blur(18px); }
.site-brand { display:flex; align-items:center; height:78px; }.site-brand img{width:300px;height:72px;object-fit:contain;object-position:left center}.site-header nav{display:flex;justify-content:center;gap:30px}.site-header nav a,.site-footer a{color:var(--muted);font-size:11px;font-weight:750}.site-header nav a:hover,.site-footer a:hover{color:var(--primary)}.site-actions{display:flex;align-items:center;gap:10px}.site-languages{display:flex;gap:4px}.site-languages a{padding:7px;color:var(--muted);font-size:9px;font-weight:850}.site-toast{position:fixed;z-index:100;top:96px;left:50%;transform:translateX(-50%);max-width:min(640px,calc(100vw - 32px));padding:13px 18px;border-radius:12px;color:white;box-shadow:var(--shadow)}.site-toast.success{background:#16a34a}.site-toast.error{background:#dc2626}
.site-hero { min-height:720px; display:grid; grid-template-columns:minmax(0,1.15fr) minmax(360px,.65fr); align-items:center; gap:7vw; padding:80px 8vw; overflow:hidden; background:radial-gradient(circle at 82% 15%,rgba(0,82,204,.12),transparent 36%),radial-gradient(circle at 15% 85%,rgba(0,194,203,.1),transparent 32%); }
.site-kicker{display:inline-flex;align-items:center;gap:8px;color:var(--primary);font-size:10px;font-weight:900;letter-spacing:.14em;text-transform:uppercase}.site-hero h1{max-width:850px;margin:18px 0;font-size:clamp(46px,5vw,82px);line-height:.98;letter-spacing:-.055em}.site-hero-copy>p{max-width:700px;margin:0;color:var(--muted);font-size:clamp(15px,1.35vw,21px);line-height:1.7}.site-hero-actions{display:flex;gap:12px;margin-top:30px}.primary-button.large,.secondary-button.large{min-height:50px;padding:0 22px;font-size:11px}.site-trust{display:flex;flex-wrap:wrap;gap:18px;margin-top:26px;color:var(--muted);font-size:10px}.site-trust span{display:flex;align-items:center;gap:6px}.site-trust svg{color:#16a34a}
.site-hero-card{position:relative;padding:34px;border:1px solid rgba(0,82,204,.18);border-radius:30px;background:linear-gradient(145deg,var(--surface),var(--surface-soft));box-shadow:0 30px 90px rgba(0,45,100,.16)}.hero-orbit{position:absolute;inset:-40%;border:1px solid rgba(0,82,204,.09);border-radius:50%;pointer-events:none}.hero-card-icon{width:72px;height:72px;display:grid;place-items:center;border-radius:22px;color:#fff;background:linear-gradient(135deg,var(--primary),var(--cyan));box-shadow:0 20px 44px rgba(0,82,204,.25)}.site-hero-card h2{margin:24px 0;font-size:25px}.hero-progress{margin:18px 0}.hero-progress>div{display:flex;justify-content:space-between;margin-bottom:8px;font-size:10px}.hero-progress i{display:block;height:8px;border-radius:6px;background:var(--line);overflow:hidden}.hero-progress b{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,var(--primary),var(--cyan))}.hero-mini-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:25px}.hero-mini-grid article{padding:15px;border:1px solid var(--line);border-radius:15px;background:var(--surface)}.hero-mini-grid strong,.hero-mini-grid span{display:block}.hero-mini-grid strong{font-size:20px}.hero-mini-grid span{margin-top:4px;color:var(--muted);font-size:9px}
.site-section{padding:90px 8vw}.site-section-head{max-width:720px;margin:0 auto 42px;text-align:center}.site-section-head h2,.split-section h2,.site-cta h2{margin:14px 0;font-size:clamp(34px,4vw,58px);line-height:1.02;letter-spacing:-.045em}.site-section-head p,.split-section>div>p,.site-cta p{color:var(--muted);font-size:14px;line-height:1.75}.product-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.product-card{min-height:390px;display:flex;flex-direction:column;align-items:flex-start;gap:20px;padding:30px;border:1px solid var(--line);border-radius:26px;background:var(--surface);box-shadow:var(--shadow-soft)}.product-card.featured{color:white;border-color:transparent;background:linear-gradient(145deg,#0052cc,#003d9b)}.product-card.featured .product-icon{color:#fff;background:rgba(255,255,255,.15)}.product-card.featured p,.product-card.featured small{color:rgba(255,255,255,.75)}.product-icon{width:58px;height:58px;display:grid;place-items:center;border-radius:18px;color:var(--primary);background:var(--primary-soft)}.product-card small{color:var(--muted);font-size:9px;font-weight:850;text-transform:uppercase;letter-spacing:.08em}.product-card h3{margin:8px 0;font-size:25px}.product-card p{color:var(--muted);font-size:12px;line-height:1.7}.product-card>.primary-button,.product-card>.secondary-button,.product-card>.status-badge{margin-top:auto}.product-price{font-size:28px}
.split-section{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(330px,.55fr);gap:8vw;align-items:center}.feature-list{display:grid;gap:14px;margin-top:30px}.feature-list article{display:grid;grid-template-columns:48px 1fr;gap:16px;padding:17px;border:1px solid var(--line);border-radius:18px;background:var(--surface)}.feature-list article>svg{color:var(--primary)}.feature-list h3,.feature-list p{margin:0}.feature-list h3{font-size:14px}.feature-list p{margin-top:6px;color:var(--muted);font-size:10px;line-height:1.55}.price-card{padding:34px;border-radius:28px;color:#fff;background:linear-gradient(145deg,#081c3a,#0052cc);box-shadow:0 35px 90px rgba(0,61,155,.28)}.price-card>span,.price-card>strong,.price-card>small{display:block}.price-card>span{font-size:11px}.price-card>strong{margin:12px 0;font-size:48px}.price-card>small{color:rgba(255,255,255,.7)}.price-card ul{display:grid;gap:12px;margin:28px 0;padding:0;list-style:none}.price-card li{display:flex;gap:8px;font-size:11px}.site-cta{margin:40px 8vw 100px;padding:50px;display:flex;align-items:center;justify-content:space-between;gap:30px;border-radius:30px;background:linear-gradient(135deg,var(--surface-soft),var(--primary-soft))}.site-footer{display:grid;grid-template-columns:1fr auto;gap:28px;align-items:center;padding:40px 8vw;border-top:1px solid var(--line)}.site-footer img{width:230px;height:60px;object-fit:contain;object-position:left}.site-footer p{color:var(--muted);font-size:10px}.site-footer>div:nth-child(2){display:flex;gap:20px}.site-footer small{grid-column:1/-1;color:var(--muted)}
.checkout-shell{min-height:calc(100vh - 86px);display:grid;grid-template-columns:minmax(320px,.75fr) minmax(520px,1fr);gap:6vw;align-items:start;padding:65px 8vw}.checkout-intro{position:sticky;top:140px}.checkout-intro h1{margin:18px 0;font-size:clamp(42px,4vw,64px);line-height:1}.checkout-intro>p{color:var(--muted);line-height:1.7}.checkout-summary{margin-top:30px;padding:24px;border:1px solid var(--line);border-radius:22px;background:var(--surface)}.checkout-summary>div{display:flex;justify-content:space-between;align-items:center}.checkout-summary strong{font-size:24px}.checkout-summary ul{display:grid;gap:10px;padding:20px 0 0;list-style:none}.checkout-summary li{display:flex;gap:8px;font-size:10px}.checkout-form{padding:28px}.payment-head{margin-top:28px}.payment-options{display:grid;grid-template-columns:1fr 1fr;gap:12px}.payment-options input{position:absolute;opacity:0}.payment-options label>span{min-height:92px;display:grid;grid-template-columns:34px 1fr;grid-template-rows:auto auto;align-items:center;padding:16px;border:1px solid var(--line);border-radius:16px;cursor:pointer}.payment-options svg{grid-row:1/3;color:var(--primary)}.payment-options strong,.payment-options small{display:block}.payment-options small{color:var(--muted);font-size:8px}.payment-options input:checked+span{border-color:var(--primary);background:var(--primary-soft);box-shadow:0 0 0 3px rgba(0,82,204,.08)}.integration-warning,.success-note{display:flex;gap:10px;margin:18px 0;padding:15px;border-radius:14px;color:#9a3412;background:#fff7ed}.integration-warning p,.success-note p{margin:0;font-size:10px;line-height:1.5}.checkout-submit{width:100%;margin-top:22px}.checkout-security{display:flex;justify-content:center;align-items:center;gap:6px;margin-top:12px;color:var(--muted)}
.order-shell{min-height:calc(100vh - 86px);display:grid;place-items:center;padding:60px 20px}.order-card{width:min(650px,100%);padding:38px;text-align:center}.order-status-icon{width:76px;height:76px;display:grid;place-items:center;margin:0 auto 20px;border-radius:24px}.order-status-icon.success{color:#15803d;background:#dcfce7}.order-status-icon.warning{color:#a16207;background:#fef3c7}.order-status-icon.danger{color:#b91c1c;background:#fee2e2}.order-card h1{margin:12px 0;font-size:38px}.order-details{display:grid;grid-template-columns:1fr 1fr;gap:1px;margin:25px 0;background:var(--line);border:1px solid var(--line);border-radius:16px;overflow:hidden}.order-details div{padding:15px;background:var(--surface)}.order-details span,.order-details strong{display:block}.order-details span{color:var(--muted);font-size:8px}.order-details strong{margin-top:5px;font-size:11px}.pix-box{display:grid;justify-items:center;gap:14px;margin:22px 0;padding:22px;border:1px solid var(--line);border-radius:18px;background:var(--surface-soft)}.pix-box img{width:210px;height:210px}.pix-box label{width:100%;text-align:left}.pix-box textarea{width:100%;height:76px;padding:10px;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--text);font-size:8px;resize:none}.order-help{margin-top:18px;color:var(--muted);font-size:10px}

.community-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px;padding:18px 20px 24px}.community-card{display:flex;flex-direction:column;padding:20px;border:1px solid var(--line);border-radius:19px;background:var(--surface-soft)}.community-card-head{display:flex;align-items:center;gap:10px}.community-card-head>div{min-width:0;flex:1}.community-card-head strong,.community-card-head small{display:block}.community-card-head strong{font-size:10px}.community-card-head small{margin-top:3px;color:var(--muted);font-size:8px}.small-avatar{width:34px;height:34px;border-radius:11px;font-size:10px}.community-card h3{margin:18px 0 8px;font-size:17px}.community-card h3 a{color:var(--text)}.community-card>p{flex:1;color:var(--muted);font-size:10px;line-height:1.65}.community-meta{display:flex;align-items:center;gap:16px;margin-top:15px;color:var(--muted);font-size:9px}.community-meta span,.community-meta a{display:flex;align-items:center;gap:5px}.community-meta a{margin-left:auto;color:var(--primary);font-weight:800}.card-admin-actions{display:flex;gap:7px;margin-top:13px}.card-admin-actions select{min-width:0;height:34px;border:1px solid var(--line);border-radius:9px;background:var(--surface);color:var(--text)}.report-list{display:grid;gap:9px;padding:16px 20px 22px}.report-list article{display:flex;justify-content:space-between;gap:16px;padding:14px;border:1px solid var(--line);border-radius:14px;background:var(--surface-soft)}.report-list p{margin:5px 0;color:var(--muted);font-size:9px}.report-list small{font-size:8px}.report-list form{display:flex;gap:6px;align-items:center}.community-detail-grid{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(330px,.7fr);gap:18px;align-items:start}.community-post-detail{padding:25px}.community-post-detail>header{display:flex;align-items:center;gap:12px}.community-post-detail header strong,.community-post-detail header small{display:block}.community-post-detail header small{margin-top:4px;color:var(--muted);font-size:8px}.community-content{padding:30px 0;font-size:12px;line-height:1.85}.community-post-actions{display:flex;align-items:flex-start;gap:10px}.community-post-actions details{position:relative}.community-post-actions summary{cursor:pointer;color:var(--muted);font-size:9px}.community-post-actions details form{position:absolute;z-index:5;right:0;width:280px;display:grid;gap:8px;padding:12px;border:1px solid var(--line);border-radius:12px;background:var(--surface);box-shadow:var(--shadow)}.community-post-actions input,.community-post-actions textarea,.comment-form textarea{padding:10px;border:1px solid var(--line);border-radius:10px;background:var(--surface-soft);color:var(--text)}.community-comments{overflow:hidden;position:sticky;top:126px}.comment-form{grid-template-columns:1fr}.comment-list article>div{min-width:0}.comment-list header{display:flex;align-items:center;gap:7px}.danger-text{color:#dc2626!important}

.ticket-list{display:grid;gap:9px;padding:16px 20px 24px}.ticket-card{position:relative;display:grid;grid-template-columns:1fr auto;align-items:center;gap:20px;padding:16px 18px;border:1px solid var(--line);border-radius:16px;color:var(--text);background:var(--surface-soft)}.ticket-card:hover{border-color:var(--primary);transform:translateY(-1px)}.ticket-priority{position:absolute;left:0;top:13px;bottom:13px;width:4px;border-radius:4px;background:#94a3b8}.ticket-priority.high{background:#f97316}.ticket-priority.urgent{background:#dc2626}.ticket-priority.low{background:#22c55e}.ticket-card h3{margin:8px 0 5px;font-size:13px}.ticket-card p{margin:0;color:var(--muted);font-size:9px}.ticket-card aside{text-align:right}.ticket-card aside strong,.ticket-card aside small,.ticket-card aside time{display:block}.ticket-card aside strong{font-size:16px}.ticket-card aside small,.ticket-card aside time{color:var(--muted);font-size:8px}.ticket-card aside time{margin-top:6px}.ticket-detail-grid{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(280px,.45fr);gap:18px;align-items:start}.ticket-thread{overflow:hidden}.thread-list{display:grid;gap:14px;min-height:380px;padding:22px}.thread-message{display:grid;grid-template-columns:36px minmax(0,1fr);gap:10px;max-width:80%}.thread-message.mine{margin-left:auto;grid-template-columns:minmax(0,1fr) 36px}.thread-message.mine .avatar{grid-column:2;grid-row:1}.thread-message.mine>div{grid-column:1;grid-row:1;background:var(--primary-soft)}.thread-message>div{padding:13px;border:1px solid var(--line);border-radius:15px;background:var(--surface-soft)}.thread-message.internal>div{border-color:#f59e0b;background:#fffbeb}.thread-message header{display:flex;align-items:center;gap:7px}.thread-message header small{color:var(--muted);font-size:7px}.thread-message p{margin:8px 0 0;font-size:10px;line-height:1.6}.thread-reply{display:grid;gap:10px;padding:18px 22px;border-top:1px solid var(--line)}.thread-reply textarea{padding:12px;border:1px solid var(--line);border-radius:13px;background:var(--surface-soft);color:var(--text)}.ticket-sidebar{position:sticky;top:126px;padding:20px}.ticket-sidebar dl{display:grid;gap:1px;margin:0 0 20px;background:var(--line);border:1px solid var(--line);border-radius:13px;overflow:hidden}.ticket-sidebar dl div{padding:12px;background:var(--surface)}.ticket-sidebar dt{color:var(--muted);font-size:8px}.ticket-sidebar dd{margin:5px 0 0;font-size:10px;font-weight:800}.full-button{width:100%;justify-content:center}.settings-webhook-form{width:100%}

@media(max-width:1100px){.site-header{grid-template-columns:240px 1fr auto}.site-brand img{width:225px}.site-header nav{display:none}.site-hero,.split-section,.checkout-shell{grid-template-columns:1fr}.site-hero{min-height:auto}.checkout-intro{position:static}.product-grid{grid-template-columns:1fr 1fr}.product-card.featured{grid-column:1/-1}.community-detail-grid,.ticket-detail-grid{grid-template-columns:1fr}.community-comments,.ticket-sidebar{position:static}}
@media(max-width:760px){.site-header{grid-template-columns:180px 1fr;min-height:76px;padding:0 16px}.site-brand{height:68px}.site-brand img{width:170px;height:60px}.site-header .site-actions .secondary-button,.site-header nav,.site-languages{display:none}.site-actions{justify-self:end}.site-hero,.site-section,.checkout-shell{padding:48px 20px}.site-hero h1{font-size:44px}.product-grid,.community-grid,.payment-options{grid-template-columns:1fr}.product-card.featured{grid-column:auto}.split-section{gap:35px}.site-cta{margin:30px 20px 70px;padding:30px;flex-direction:column;align-items:flex-start}.site-footer{grid-template-columns:1fr;padding:35px 20px}.checkout-shell{gap:32px}.order-details{grid-template-columns:1fr}.community-detail-grid,.ticket-detail-grid{display:block}.community-comments,.ticket-sidebar{margin-top:18px}.thread-message{max-width:94%}.notification-panel{position:fixed;right:12px;top:72px}.report-list article{flex-direction:column}.site-footer>div:nth-child(2){flex-wrap:wrap}}

/* Finance charge composer — v1.5.0 */
.finance-charge-panel{margin-bottom:24px}
.finance-charge-form{display:grid;grid-template-columns:minmax(220px,1.6fr) repeat(3,minmax(150px,1fr)) auto;gap:14px;align-items:end}
.finance-charge-form .field{margin:0}
.finance-charge-form .primary-button{min-height:48px;white-space:nowrap}
@media(max-width:1100px){.finance-charge-form{grid-template-columns:repeat(2,minmax(0,1fr))}.finance-charge-form .primary-button{width:100%}}
@media(max-width:640px){.finance-charge-form{grid-template-columns:1fr}}

/* v1.11.0 — experiência final, site institucional e recuperação de senha */
.auth-back-link{display:inline-flex;align-items:center;gap:7px;margin-top:18px;color:var(--muted);font-size:9px;font-weight:800}.auth-back-link:hover{color:var(--primary)}
.site-header{grid-template-columns:430px 1fr auto;min-height:94px;padding-left:clamp(24px,4vw,70px);padding-right:clamp(24px,4vw,70px)}.site-brand{height:90px}.site-brand img{width:390px;height:84px}.site-header .primary-button,.site-header .secondary-button{min-height:44px;padding:0 18px;font-size:10px}.primary-button.large,.secondary-button.large{min-height:60px;padding:0 30px;font-size:12px;border-radius:15px}.site-hero-actions{gap:14px}.site-cta .primary-button.large{min-width:230px}.site-presentation{display:grid;grid-template-columns:minmax(280px,.65fr) minmax(0,1.35fr);gap:44px;align-items:center}.site-presentation-copy h2,.site-approved-head h2{margin:10px 0 12px;font-size:clamp(34px,3.4vw,58px);letter-spacing:-.045em}.site-presentation-copy p,.site-approved-head p{max-width:650px;color:var(--muted);font-size:15px;line-height:1.75}.site-video-card{overflow:hidden;aspect-ratio:16/9;border:1px solid var(--line);border-radius:24px;background:#07162d;box-shadow:0 25px 70px rgba(8,31,64,.14)}.site-video-card iframe{display:block;width:100%;height:100%;border:0}.site-video-external{height:100%;display:grid;place-items:center;align-content:center;gap:18px;color:white}.site-approved-head{display:flex;align-items:end;justify-content:space-between;gap:28px}.site-approved-head>div:first-child{max-width:760px}.site-carousel-controls{display:flex;gap:8px}.site-carousel-controls .secondary-button{width:46px;min-width:46px;height:46px;padding:0}.site-approved-carousel{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(280px,31%);gap:14px;overflow-x:auto;padding:8px 2px 18px;scroll-snap-type:x mandatory;scrollbar-width:thin;scroll-behavior:smooth}.approved-card{scroll-snap-align:start;display:flex;align-items:center;gap:14px;min-height:128px;padding:18px;border:1px solid var(--line);border-radius:19px;background:var(--surface-solid);box-shadow:var(--shadow-sm)}.approved-card img,.approved-avatar{width:72px;height:72px;flex:0 0 72px;border-radius:20px;object-fit:cover}.approved-avatar{display:grid;place-items:center;background:linear-gradient(145deg,var(--primary),#159ce4);color:white;font-size:26px;font-weight:900}.approved-card>div{min-width:0;display:grid;gap:4px}.approved-card strong{font-size:13px}.approved-card span{color:var(--primary);font-size:9px;font-weight:800}.approved-card small{color:var(--muted);font-size:8px;line-height:1.4}.site-footer-meta{display:grid;justify-items:end;gap:5px}.purple-credit{color:var(--muted);font-weight:750}.purple-credit::before{content:"◆";margin-right:6px;color:#8b5cf6;font-size:7px}
@media(max-width:1200px){.site-header{grid-template-columns:300px 1fr auto}.site-brand img{width:280px}.site-presentation{grid-template-columns:1fr;gap:26px}.site-approved-carousel{grid-auto-columns:minmax(270px,45%)}}
@media(max-width:760px){.site-header{grid-template-columns:190px 1fr}.site-brand img{width:185px;height:66px}.site-approved-head{align-items:flex-start;flex-direction:column}.site-approved-carousel{grid-auto-columns:minmax(260px,88%)}.site-carousel-controls{align-self:flex-end}.site-presentation-copy h2,.site-approved-head h2{font-size:36px}.site-footer-meta{justify-items:start}.primary-button.large,.secondary-button.large{min-height:56px;padding:0 22px}}

/* v1.11.0 — crédito institucional discreto */
.app-purple-credit{display:block;margin:7px 12px 4px;padding-top:10px;border-top:1px solid var(--line);color:var(--muted);font-size:7px;text-align:center;letter-spacing:.04em}.guest-purple-credit{position:fixed;right:18px;bottom:14px;z-index:6;color:var(--muted);font-size:7px;opacity:.72}.site-footer .purple-credit{font-weight:700;letter-spacing:.03em}@media(max-width:720px){.guest-purple-credit{position:static;display:block;margin:10px 0 18px;text-align:center}}

/* v1.16.6 — login brand scale */
.auth-brand .auth-brand-logo.auth-brand-logo-login{
    width:clamp(220px,27vw,300px);
    max-width:300px;
    height:auto;
    object-fit:contain;
    object-position:left center;
    filter:drop-shadow(0 14px 34px rgba(0,0,0,.24));
}
@media (max-width:1240px){
    .auth-brand .auth-brand-logo.auth-brand-logo-login{width:260px;max-width:260px}
}

/* v1.16.7 — dock com crédito Purple + refinamento final */
.dock{bottom:max(42px,calc(env(safe-area-inset-bottom) + 34px)) !important}
.dock-purple-credit{position:fixed;z-index:44;left:50%;bottom:max(9px,env(safe-area-inset-bottom));transform:translateX(-50%);display:flex;align-items:center;justify-content:center;gap:7px;color:var(--muted);font-size:7px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;white-space:nowrap;opacity:.82}
.dock-purple-credit:hover{opacity:1;color:var(--text)}
.dock-purple-credit img{display:block;width:auto;height:14px;max-width:76px;object-fit:contain}
.workspace{padding-bottom:calc(var(--dock-h) + 108px) !important}
@media(max-width:620px){
  .dock{bottom:max(36px,calc(env(safe-area-inset-bottom) + 28px)) !important}
  .dock-purple-credit{bottom:max(7px,env(safe-area-inset-bottom));font-size:6px;gap:5px}
  .dock-purple-credit img{height:12px;max-width:68px}
  .workspace{padding-bottom:calc(var(--dock-h) + 96px) !important}
}
.flash-stat-card.blue{background:#eef7ff;border-color:#cfe5ff}.flash-stat-card.blue strong,.flash-stat-card.blue span{color:#0b72ce}

/* v1.16.9 — logo login refinado */
.auth-brand .auth-brand-logo.auth-brand-logo-login{width:clamp(190px,22vw,240px)!important;max-width:240px!important;height:auto!important}
@media(max-width:1240px){.auth-brand .auth-brand-logo.auth-brand-logo-login{width:210px!important;max-width:210px!important}}
