:root {
    --accent: #6c5ce7;
    --accent-rgb: 108, 92, 231;
    --bg: #f5f6fa;
    --surface: #ffffff;
    --surface-2: #f8f9fc;
    --text: #1c1d22;
    --muted: #747988;
    --border: #e7e8ee;
    --shadow: 0 12px 30px rgba(28, 29, 34, .06);
    --green: #12b76a;
    --blue: #3478f6;
    --purple: #845ef7;
    --coral: #ef6461;
    --amber: #e79f21;
    --pink: #e64980;
    --radius: 20px;
    --sidebar: 252px;
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
input, select, textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 14px;
    background: var(--surface);
    color: var(--text);
    outline: 0;
    transition: border-color .18s, box-shadow .18s;
}
input:focus, select:focus, textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(var(--accent-rgb), .12);
}
textarea { min-height: 110px; resize: vertical; }
label { color: var(--text); font-size: 13px; font-weight: 650; }
label > input, label > select, label > textarea { display: block; margin-top: 7px; font-weight: 450; }
.app-shell { min-height: 100vh; }
.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 30;
    display: flex;
    width: var(--sidebar);
    flex-direction: column;
    padding: 22px 16px;
    border-right: 1px solid var(--border);
    background: var(--surface);
}
.app-brand { display: flex; align-items: center; gap: 12px; padding: 0 7px 22px; }
.app-brand > span:last-child { display: flex; flex-direction: column; }
.app-brand strong { font-size: 18px; letter-spacing: -.3px; }
.app-brand small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.brand-mark {
    display: grid;
    width: 50px;
    height: 50px;
    place-items: center;
    border-radius: 16px;
    background: linear-gradient(145deg, var(--accent), color-mix(in srgb, var(--accent) 72%, #111 28%));
    box-shadow: 0 10px 22px rgba(var(--accent-rgb), .22);
    color: #fff;
    font-weight: 850;
    font-size: 23px;
}
.brand-mark-small { width: 42px; height: 42px; border-radius: 13px; font-size: 20px; }
.main-nav { display: flex; flex: 1; flex-direction: column; gap: 5px; }
.main-nav a, .sidebar-foot > a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    border-radius: 12px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 650;
    transition: .18s ease;
}
.main-nav a:hover, .sidebar-foot > a:hover { background: var(--surface-2); color: var(--text); }
.main-nav a.active, .sidebar-foot > a.active {
    background: color-mix(in srgb, var(--accent) 11%, var(--surface));
    color: var(--accent);
}
.nav-icon { display: grid; width: 25px; height: 25px; place-items: center; font-size: 17px; }
.sidebar-foot { display: grid; gap: 5px; }
.mini-progress {
    margin-bottom: 10px;
    padding: 14px;
    border-radius: 14px;
    background: var(--surface-2);
    font-size: 11px;
}
.mini-progress span { color: var(--muted); }
.mini-progress strong { float: right; color: var(--accent); }
.mini-progress i {
    display: block;
    height: 5px;
    margin-top: 9px;
    overflow: hidden;
    border-radius: 99px;
    background: var(--border);
}
.mini-progress b { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.main-column { min-height: 100vh; margin-left: var(--sidebar); }
.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    min-height: 80px;
    align-items: center;
    justify-content: space-between;
    padding: 12px 32px;
    border-bottom: 1px solid rgba(231, 232, 238, .84);
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: blur(16px);
}
.page-heading h1 { margin: 3px 0 0; font-size: 21px; letter-spacing: -.4px; }
.eyebrow { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.topbar-actions { display: flex; align-items: center; gap: 9px; }
.icon-btn {
    display: inline-grid;
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: var(--surface);
    cursor: pointer;
    font-size: 18px;
}
.icon-btn:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.icon-btn.danger { width: 30px; height: 30px; border: 0; background: transparent; color: #c92a2a; opacity: .55; }
.icon-btn.danger:hover { background: #fff0f0; opacity: 1; }
.icon-btn.edit { width: 30px; height: 30px; border: 0; background: transparent; color: var(--accent); opacity: .72; }
.icon-btn.edit:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); opacity: 1; }
.item-actions { display: flex; align-items: center; gap: 2px; }
.menu-toggle { display: none; }
.profile-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--border);
    border-radius: 13px;
    padding: 6px 11px 6px 6px;
    background: var(--surface);
    cursor: pointer;
    text-align: left;
}
.profile-chip > span {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 10px;
    background: color-mix(in srgb, var(--accent) 16%, var(--surface));
    color: var(--accent);
    font-weight: 800;
}
.profile-chip div { display: flex; flex-direction: column; }
.profile-chip strong { max-width: 130px; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.profile-chip small { color: var(--muted); font-size: 10px; }
.content { width: min(1520px, 100%); margin: 0 auto; padding: 28px 32px 64px; }
.hero-panel {
    position: relative;
    display: flex;
    min-height: 190px;
    align-items: center;
    justify-content: space-between;
    overflow: hidden;
    margin-bottom: 20px;
    padding: 34px 40px;
    border-radius: 26px;
    background:
        radial-gradient(circle at 82% 30%, rgba(255,255,255,.26) 0 7%, transparent 7.4%),
        radial-gradient(circle at 86% 72%, rgba(255,255,255,.14) 0 14%, transparent 14.4%),
        linear-gradient(120deg, color-mix(in srgb, var(--accent) 93%, #15152b), var(--accent));
    box-shadow: 0 20px 40px rgba(var(--accent-rgb), .18);
    color: #fff;
}
.hero-panel:after {
    position: absolute;
    right: -100px;
    bottom: -170px;
    width: 360px;
    height: 360px;
    border: 2px solid rgba(255,255,255,.18);
    border-radius: 50%;
    content: "";
}
.hero-panel > div:first-child { position: relative; z-index: 1; max-width: 650px; }
.hero-kicker { font-size: 10px; font-weight: 850; letter-spacing: .17em; opacity: .8; }
.hero-panel h2 { margin: 12px 0 8px; font-size: clamp(24px, 3vw, 37px); line-height: 1.12; letter-spacing: -.9px; }
.hero-panel p { margin: 0; opacity: .84; }
.hero-date {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 17px 20px;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 19px;
    background: rgba(255,255,255,.12);
    backdrop-filter: blur(10px);
}
.hero-date strong { font-size: 46px; line-height: 1; }
.hero-date span { font-size: 13px; font-weight: 750; line-height: 1.25; text-transform: uppercase; }
.metric-grid { display: grid; gap: 14px; margin-bottom: 20px; }
.metric-grid-four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.metric-grid-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.metric-card {
    position: relative;
    display: flex;
    min-height: 134px;
    flex-direction: column;
    overflow: hidden;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: 0 8px 20px rgba(28,29,34,.03);
}
.metric-card:after {
    position: absolute;
    right: -28px;
    top: -34px;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: currentColor;
    content: "";
    opacity: .065;
}
.metric-card small { color: var(--muted); font-size: 11px; font-weight: 700; }
.metric-card strong { margin-top: 8px; font-size: clamp(20px, 2vw, 28px); letter-spacing: -.6px; }
.metric-card em { margin-top: auto; color: var(--muted); font-size: 10px; font-style: normal; }
.metric-card.green { color: var(--green); }
.metric-card.blue { color: var(--blue); }
.metric-card.purple { color: var(--purple); }
.metric-card.coral { color: var(--coral); }
.metric-card.amber { color: var(--amber); }
.metric-card small, .metric-card em { color: var(--muted); }
.metric-icon {
    position: absolute;
    right: 19px;
    top: 17px;
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 10px;
    background: currentColor;
    color: #fff;
    font-weight: 900;
}
.card {
    position: relative;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: 0 8px 22px rgba(28,29,34,.035);
}
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; margin-bottom: 19px; }
.card-head h3 { margin: 5px 0 0; font-size: 16px; letter-spacing: -.25px; }
.section-tag {
    display: inline-block;
    color: var(--muted);
    font-size: 9px;
    font-weight: 850;
    letter-spacing: .1em;
}
.green-tag { color: var(--green); }
.blue-tag { color: var(--blue); }
.purple-tag { color: var(--purple); }
.coral-tag { color: var(--coral); }
.amber-tag { color: var(--amber); }
.pink-tag { color: var(--pink); }
.text-btn, .round-add {
    border: 0;
    background: transparent;
    color: var(--accent);
    cursor: pointer;
    font-size: 11px;
    font-weight: 750;
}
.round-add {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border-radius: 10px;
    background: var(--accent);
    color: #fff;
    font-size: 18px;
}
.danger-text { color: #d94848; }
.streak { color: var(--green); font-size: 11px; font-weight: 750; }
.dashboard-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.dashboard-grid .span-2 { grid-column: span 2; }
.dashboard-calendar-card { grid-column: 1 / -1; }
.dashboard-calendar-layout { display: grid; grid-template-columns: minmax(420px, .95fr) minmax(460px, 1.35fr); gap: 34px; }
.mini-calendar { min-width: 0; }
.mini-calendar-weekdays, .mini-calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.mini-calendar-weekdays span { padding: 5px 0 12px; color: var(--muted); font-size: 10px; font-weight: 800; text-align: center; }
.mini-calendar-grid { gap: 6px; }
.mini-calendar-grid button {
    position: relative;
    display: grid;
    min-width: 0;
    aspect-ratio: 1;
    place-items: center;
    border: 0;
    min-height: 46px;
    border-radius: 11px;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
}
.mini-calendar-grid button:hover { background: color-mix(in srgb, var(--accent) 9%, var(--surface)); color: var(--accent); }
.mini-calendar-grid button.outside { color: var(--muted); opacity: .38; }
.mini-calendar-grid button.today { background: var(--accent); color: #fff; box-shadow: 0 5px 12px rgba(var(--accent-rgb), .2); }
.mini-calendar-grid button i { position: absolute; bottom: 5px; width: 5px; height: 5px; border-radius: 50%; background: var(--day-event-color); }
.mini-calendar-grid button.today i { background: #fff; }
.upcoming-calendar { min-width: 0; padding-left: 24px; border-left: 1px solid var(--border); }
.upcoming-calendar-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.upcoming-calendar-head > strong { font-size: 11px; }
.upcoming-calendar-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.upcoming-calendar-list > button {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 7px 8px;
    border: 0;
    border-left: 3px solid var(--item-color);
    border-radius: 9px;
    background: var(--surface-2);
    color: var(--text);
    cursor: pointer;
    text-align: left;
}
.upcoming-calendar-list > button:hover { background: color-mix(in srgb, var(--item-color) 10%, var(--surface)); }
.upcoming-calendar-list time { display: flex; flex-direction: column; align-items: center; color: var(--muted); }
.upcoming-calendar-list time strong { color: var(--text); font-size: 13px; line-height: 1; white-space: nowrap; }
.upcoming-calendar-list time small { margin-top: 3px; font-size: 8px; text-transform: uppercase; }
.upcoming-calendar-list > button > span { display: flex; min-width: 0; flex-direction: column; }
.upcoming-calendar-list > button > span strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.upcoming-calendar-list > button > span small { margin-top: 3px; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.heatmap { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 11px); grid-auto-columns: 11px; gap: 4px; overflow: hidden; }
.heatmap span, .heatmap-legend i { border-radius: 3px; background: #e9ecef; }
.heatmap .level-1, .heatmap-legend .level-1 { background: #b7efcf; }
.heatmap .level-2, .heatmap-legend .level-2 { background: #57d68d; }
.heatmap .level-3 { background: #20bf6b; }
.heatmap .level-4, .heatmap-legend .level-4 { background: #0a9c53; }
.heatmap-legend { display: flex; align-items: center; justify-content: flex-end; gap: 6px; margin-top: 15px; color: var(--muted); font-size: 9px; }
.heatmap-legend i { width: 10px; height: 10px; }
.timeline-list, .compact-list, .goal-mini-list, .reading-mini-list, .limit-list, .wish-list, .journal-list, .medication-list { display: grid; gap: 8px; }
.timeline-item { display: flex; align-items: stretch; gap: 12px; }
.timeline-item time { width: 42px; padding-top: 9px; color: var(--muted); font-size: 10px; font-weight: 700; }
.timeline-item > span { display: flex; flex: 1; flex-direction: column; padding: 8px 10px; border-left: 3px solid var(--item-color); border-radius: 8px; background: color-mix(in srgb, var(--item-color) 15%, var(--surface)); }
.timeline-item strong { font-size: 11px; }
.timeline-item small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.compact-list > div {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 9px;
    padding: 7px 0;
    border-bottom: 1px solid var(--border);
}
.compact-list > div:last-child { border-bottom: 0; }
.compact-list span:nth-child(2) { display: flex; flex-direction: column; }
.compact-list strong { font-size: 11px; }
.compact-list small { color: var(--muted); font-size: 9px; }
.compact-list b { font-size: 10px; }
.list-dot { width: 8px; height: 8px; border-radius: 50%; }
.list-dot.income { background: var(--green); }
.list-dot.expense { background: var(--coral); }
.list-dot.investment { background: var(--purple); }
.list-dot.debt { background: var(--amber); }
.positive { color: var(--green) !important; }
.negative { color: var(--coral) !important; }
.goal-mini-list article { display: grid; grid-template-columns: 1fr auto; gap: 6px; }
.goal-mini-list article > span { display: flex; flex-direction: column; min-width: 0; }
.goal-mini-list strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.goal-mini-list small { color: var(--muted); font-size: 9px; }
.goal-mini-list b { color: var(--accent); font-size: 10px; }
.goal-mini-list i, .reading-mini-list i {
    display: block;
    grid-column: 1 / -1;
    height: 5px;
    overflow: hidden;
    border-radius: 99px;
    background: var(--border);
}
.goal-mini-list em, .reading-mini-list em { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.reading-mini-list article { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 9px; }
.book-spine { display: grid; width: 30px; height: 42px; place-items: center; border-radius: 4px 7px 7px 4px; background: linear-gradient(145deg, #ffa94d, #ff6b6b); color: #fff; font-size: 12px; font-weight: 900; }
.reading-mini-list article > div { display: grid; gap: 3px; min-width: 0; }
.reading-mini-list strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.reading-mini-list small { color: var(--muted); font-size: 9px; }
.reading-mini-list b { font-size: 10px; }
.section-toolbar { display: flex; min-height: 48px; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.lead-copy { margin: 0; color: var(--muted); font-size: 13px; }
.button-row { display: flex; gap: 8px; }
.btn {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid transparent;
    border-radius: 12px;
    padding: 9px 16px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 750;
    transition: transform .15s, filter .15s;
}
.btn:hover { filter: brightness(.97); transform: translateY(-1px); }
.btn-primary { border-color: var(--accent); background: var(--accent); color: #fff; box-shadow: 0 8px 16px rgba(var(--accent-rgb), .15); }
.btn-soft { border-color: var(--border); background: var(--surface); color: var(--text); }
.btn-block { width: 100%; }
.btn-small { min-height: 34px; padding: 7px 11px; font-size: 10px; }
.month-switcher { display: flex; align-items: center; gap: 10px; }
.month-switcher a { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.month-switcher strong { min-width: 150px; font-size: 13px; text-align: center; text-transform: capitalize; }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.two-col.wide-left { grid-template-columns: minmax(0, 1.65fr) minmax(320px, .85fr); }
.stack { display: grid; align-content: start; gap: 16px; }
.data-table-wrap, .habit-table-wrap { overflow: auto; margin: 0 -8px -8px; }
.data-table, .habit-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: 11px 10px; border-bottom: 1px solid var(--border); font-size: 10px; text-align: left; white-space: nowrap; }
.data-table th { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.data-table td:first-child { display: flex; align-items: center; gap: 8px; }
.data-table .right { text-align: right; }
.entry-kind { display: grid; width: 27px; height: 27px; place-items: center; border-radius: 8px; font-size: 12px; }
.entry-kind.income { background: #e8fbf1; color: var(--green); }
.entry-kind.expense { background: #fff0f0; color: var(--coral); }
.entry-kind.investment { background: #f1edff; color: var(--purple); }
.entry-kind.debt { background: #fff5dd; color: var(--amber); }
.category-pill, .status-pill { display: inline-flex; padding: 4px 8px; border-radius: 99px; background: var(--surface-2); color: var(--muted); font-size: 9px; font-weight: 700; }
.empty-cell { padding: 30px !important; color: var(--muted); text-align: center !important; }
.empty-state { margin: 8px 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.donut-wrap { display: flex; align-items: center; gap: 22px; }
.donut { position: relative; display: grid; width: 150px; height: 150px; flex: 0 0 auto; place-items: center; border-radius: 50%; }
.donut:after { position: absolute; width: 88px; height: 88px; border-radius: 50%; background: var(--surface); content: ""; }
.donut span { position: relative; z-index: 1; max-width: 74px; font-size: 11px; font-weight: 800; text-align: center; }
.legend-list { display: grid; flex: 1; gap: 8px; }
.legend-list > div { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 7px; font-size: 9px; }
.legend-list i { width: 8px; height: 8px; border-radius: 50%; }
.limit-list article { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.limit-list article > div { display: flex; justify-content: space-between; gap: 12px; }
.limit-list strong { font-size: 11px; }
.limit-list span { color: var(--muted); font-size: 9px; }
.limit-list i { display: block; height: 6px; overflow: hidden; border-radius: 99px; background: var(--border); }
.limit-list em { display: block; height: 100%; border-radius: inherit; background: var(--green); }
.limit-list article.over em { background: var(--coral); }
.limit-list .item-actions { grid-column: 2; grid-row: 1 / span 2; }
.wish-list article { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; background: var(--surface-2); }
.wish-icon { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 10px; background: #ffeff7; color: var(--pink); }
.wish-list article > div { display: grid; gap: 3px; min-width: 0; }
.wish-list strong { font-size: 11px; }
.wish-list small { color: var(--muted); font-size: 9px; }
.wish-list i { height: 5px; overflow: hidden; border-radius: 99px; background: var(--border); }
.wish-list em { display: block; height: 100%; background: var(--pink); }
.wish-list b { font-size: 10px; }
.routine-habits { margin-bottom: 16px; }
.habit-table { min-width: 820px; }
.habit-table th, .habit-table td { padding: 10px 7px; border-bottom: 1px solid var(--border); font-size: 10px; text-align: center; }
.habit-table th { color: var(--muted); font-weight: 700; }
.habit-table th:first-child, .habit-table td:first-child { min-width: 180px; text-align: left; }
.habit-table td:first-child { display: flex; align-items: center; gap: 8px; }
.habit-table td:first-child i { width: 8px; height: 8px; border-radius: 50%; }
.habit-table th.today { color: var(--accent); }
.habit-table th span, .habit-table th strong { display: block; }
.habit-table th strong { margin-top: 3px; font-size: 12px; }
.habit-check {
    width: 27px;
    height: 27px;
    border: 1.5px solid color-mix(in srgb, var(--habit-color) 65%, var(--border));
    border-radius: 8px;
    background: transparent;
    color: transparent;
    cursor: pointer;
}
.habit-check.done { background: var(--habit-color); color: #fff; }
.week-board { display: grid; grid-template-columns: repeat(6, minmax(90px, 1fr)); gap: 7px; overflow-x: auto; }
.week-column { display: grid; min-width: 100px; align-content: start; gap: 7px; }
.week-column > strong { padding: 7px; border: 1px solid #9bd3fa; border-radius: 8px; background: #e6f5ff; color: #2475a9; font-size: 9px; text-align: center; text-transform: uppercase; }
.week-column article { position: relative; display: grid; gap: 2px; padding: 8px; border-left: 3px solid #79c4f2; border-radius: 8px; background: color-mix(in srgb, #bde3ff 25%, var(--surface)); }
.week-column time { color: var(--muted); font-size: 8px; font-weight: 700; }
.week-column span { font-size: 9px; font-weight: 700; }
.week-column article button { position: absolute; right: 3px; top: 2px; border: 0; background: transparent; color: #c92a2a; cursor: pointer; opacity: .5; }
.day-empty { padding: 15px 4px; color: var(--muted); font-size: 9px; text-align: center; }
.journal-list article { display: grid; grid-template-columns: auto 1fr auto auto; align-items: start; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.journal-list time { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 10px; background: var(--surface-2); color: var(--accent); font-size: 9px; font-weight: 800; }
.journal-list strong { font-size: 11px; }
.journal-list p { margin: 3px 0 0; color: var(--muted); font-size: 9px; line-height: 1.45; }
.journal-list article > span { color: var(--pink); font-size: 7px; letter-spacing: 2px; }
.workout-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.workout-card { padding: 0; overflow: hidden; }
.workout-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 92%, #1d1a4f), var(--accent)); color: #fff; }
.workout-head > div { display: flex; align-items: center; gap: 11px; }
.workout-head > div > span { display: grid; width: 40px; height: 40px; place-items: center; border: 1px solid rgba(255,255,255,.25); border-radius: 12px; background: rgba(255,255,255,.13); font-size: 11px; font-weight: 850; }
.workout-head small { font-size: 8px; letter-spacing: .1em; opacity: .7; }
.workout-head h3 { margin: 3px 0 0; font-size: 15px; }
.workout-head > strong { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 50%; background: rgba(255,255,255,.15); font-size: 11px; }
.workout-progress { height: 4px; background: var(--border); }
.workout-progress i { display: block; height: 100%; background: #54e59a; }
.exercise-list { padding: 8px 18px; }
.exercise-list article { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.exercise-list article.done strong { text-decoration: line-through; opacity: .5; }
.exercise-number { display: grid; width: 25px; height: 25px; place-items: center; border-radius: 8px; background: var(--surface-2); color: var(--muted); font-size: 9px; font-weight: 800; }
.exercise-list div { display: flex; flex-direction: column; }
.exercise-list strong { font-size: 11px; }
.exercise-list small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.exercise-check { width: 28px; height: 28px; border: 1.5px solid #9ee0ba; border-radius: 8px; background: transparent; color: #12b76a; cursor: pointer; }
.exercise-list article.done .exercise-check { background: var(--green); color: #fff; }
.card-actions { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 11px 18px 16px; }
.empty-card { display: grid; min-height: 250px; place-items: center; align-content: center; text-align: center; }
.empty-card > span { font-size: 36px; }
.empty-card h3 { margin: 10px 0 4px; }
.empty-card p { max-width: 350px; margin: 0 0 16px; color: var(--muted); font-size: 12px; }
.library-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.book-card { display: grid; grid-template-columns: 126px 1fr; gap: 18px; min-height: 255px; }
.book-cover { position: relative; display: flex; min-height: 210px; flex-direction: column; justify-content: space-between; overflow: hidden; padding: 17px 13px; border-radius: 8px 15px 15px 8px; box-shadow: 8px 10px 20px rgba(0,0,0,.12); color: #fff; }
.book-cover:before { position: absolute; inset: 0 auto 0 8px; width: 2px; background: rgba(255,255,255,.25); content: ""; }
.book-cover span { position: relative; font-size: 38px; font-weight: 900; opacity: .7; }
.book-cover small { position: relative; font-weight: 800; line-height: 1.35; }
.cover-0 { background: linear-gradient(145deg, #3742fa, #7bed9f); }
.cover-1 { background: linear-gradient(145deg, #ff6b81, #ffa502); }
.cover-2 { background: linear-gradient(145deg, #2f3542, #57606f); }
.cover-3 { background: linear-gradient(145deg, #8854d0, #fc5c65); }
.cover-4 { background: linear-gradient(145deg, #0fb9b1, #3867d6); }
.book-info { display: flex; min-width: 0; flex-direction: column; align-items: flex-start; }
.status-reading { background: #e7f5ff; color: #1971c2; }
.status-shelf { background: #fff4e6; color: #d9480f; }
.status-finished { background: #ebfbee; color: #2b8a3e; }
.status-loaned { background: #f3f0ff; color: #6741d9; }
.book-info h3 { margin: 13px 0 4px; font-size: 17px; line-height: 1.25; }
.book-info > p { margin: 0; color: var(--muted); font-size: 11px; }
.book-progress { display: grid; width: 100%; grid-template-columns: 1fr auto; gap: 7px; margin-top: 18px; color: var(--muted); font-size: 9px; }
.book-progress b { color: var(--accent); }
.book-progress i { grid-column: 1/-1; height: 6px; overflow: hidden; border-radius: 99px; background: var(--border); }
.book-progress em { display: block; height: 100%; background: var(--accent); }
.book-info blockquote { margin: 15px 0 0; padding: 10px; border-radius: 10px; background: var(--surface-2); color: var(--muted); font-size: 10px; font-style: italic; line-height: 1.5; }
.book-actions { display: flex; width: 100%; align-items: center; justify-content: space-between; margin-top: auto; }
.quote-card {
    margin-bottom: 16px;
    padding: 26px;
    border: 1px solid #ead6f8;
    border-radius: var(--radius);
    background: linear-gradient(120deg, #f7edff, #ffeef7);
    text-align: center;
}
.quote-card small { color: #9c36b5; font-size: 9px; font-weight: 850; letter-spacing: .1em; }
.quote-card blockquote { margin: 10px 0 0; font-size: clamp(16px, 2vw, 21px); font-weight: 750; font-style: italic; }
.goals-list { display: grid; gap: 12px; }
.goal-card { position: relative; padding: 17px; border: 1px solid var(--border); border-radius: 15px; background: var(--surface-2); }
.goal-card header { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 11px; }
.goal-target { display: grid; width: 37px; height: 37px; place-items: center; border-radius: 11px; font-size: 19px; }
.goal-card header small { color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .05em; }
.goal-card h4 { margin: 4px 0 0; font-size: 13px; }
.goal-card header > b { color: var(--accent); font-size: 12px; }
.goal-card > p { margin: 12px 0 0; color: var(--muted); font-size: 10px; }
.goal-bar { height: 6px; margin: 13px 0; overflow: hidden; border-radius: 99px; background: var(--border); }
.goal-bar i { display: block; height: 100%; border-radius: inherit; }
.goal-steps { display: grid; gap: 6px; }
.goal-steps button { display: flex; align-items: center; gap: 8px; border: 0; padding: 5px 0; background: transparent; cursor: pointer; color: var(--text); text-align: left; }
.goal-steps button i { display: grid; width: 20px; height: 20px; place-items: center; border: 1px solid var(--border); border-radius: 6px; color: transparent; font-size: 9px; font-style: normal; }
.goal-steps button.done span { color: var(--muted); text-decoration: line-through; }
.goal-steps button.done i { border-color: var(--green); background: var(--green); color: #fff; }
.goal-steps .add-step { color: var(--accent); font-size: 10px; font-weight: 700; }
.goal-delete { position: absolute; right: 7px; top: 7px; opacity: 0; }
.goal-card:hover .goal-delete { opacity: .75; }
.motivation-card { background: linear-gradient(150deg, var(--surface), #fffceb); }
.motivation-list { display: grid; gap: 7px; }
.motivation-list > div { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; padding: 10px; border: 1px solid #f4e7a6; border-radius: 10px; background: #fff9cf; color: #5c4b00; }
.motivation-list span { color: #e0a800; }
.motivation-list strong { font-size: 10px; }
.motivation-list button { border: 0; background: transparent; color: #9d8b3e; cursor: pointer; }
.health-hero {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 25px;
    margin-bottom: 16px;
    padding: 28px 34px;
    border: 1px solid #cfe8f5;
    border-radius: 24px;
    background: linear-gradient(120deg, #f4fbff, #e5f5ff);
}
.health-hero > div:first-child > span { color: #18779f; font-size: 10px; font-weight: 850; letter-spacing: .08em; }
.health-hero strong { display: block; margin: 9px 0 14px; color: #137ea8; font-size: 30px; }
.health-hero strong small { color: var(--muted); font-size: 12px; }
.water-bar { width: min(600px, 100%); height: 10px; overflow: hidden; border-radius: 99px; background: rgba(43,157,203,.12); }
.water-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #4dabf7, #15aabf); }
.water-actions { display: flex; gap: 8px; margin-top: 13px; }
.water-actions button { border: 1px solid #b9dded; border-radius: 9px; padding: 7px 11px; background: rgba(255,255,255,.65); color: #137ea8; cursor: pointer; font-size: 10px; font-weight: 750; }
.water-visual {
    position: relative;
    display: grid;
    width: 105px;
    height: 105px;
    place-items: center;
    overflow: hidden;
    border: 5px solid #fff;
    border-radius: 50%;
    background: linear-gradient(to top, #53c6ee 0 var(--water-level), rgba(255,255,255,.7) var(--water-level) 100%);
    box-shadow: 0 10px 20px rgba(43,157,203,.14);
}
.water-visual span { font-size: 35px; }
.medication-list article { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.med-icon { color: #fcc419; font-size: 16px; }
.medication-list article > div { display: flex; flex-direction: column; }
.medication-list strong { font-size: 11px; }
.medication-list strong small { padding: 2px 5px; border-radius: 5px; background: #fff3bf; color: #946b00; font-size: 8px; }
.medication-list article > div > span { margin-top: 3px; color: var(--muted); font-size: 9px; }
.medication-list > article > b { font-size: 10px; }
.low-stock { color: var(--coral); }
.bmi-score { display: flex; align-items: center; gap: 15px; padding: 16px; border-radius: 15px; background: var(--surface-2); }
.bmi-score > span { display: flex; width: 80px; height: 80px; flex-direction: column; align-items: center; justify-content: center; border-radius: 50%; background: color-mix(in srgb, var(--green) 15%, var(--surface)); color: var(--green); }
.bmi-score > span strong { font-size: 24px; }
.bmi-score > span small { font-size: 8px; font-weight: 800; }
.bmi-score h4 { margin: 0; }
.bmi-score p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.health-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.health-stats > div { display: flex; flex-direction: column; padding: 11px; border: 1px solid var(--border); border-radius: 11px; }
.health-stats small { color: var(--muted); font-size: 8px; }
.health-stats strong { margin-top: 3px; font-size: 12px; }
.health-log-list { display: grid; gap: 4px; }
.health-log-list article { display: grid; grid-template-columns: 70px auto 1fr auto; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.health-log-list time { color: var(--muted); font-size: 9px; }
.health-log-list strong { font-size: 11px; }
.health-log-list p { margin: 3px 0 0; color: var(--muted); font-size: 9px; }
.settings-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(320px, .8fr); gap: 16px; }
.settings-form { display: grid; gap: 16px; }
.settings-form fieldset { margin: 0; border: 0; padding: 0; }
.settings-form legend { margin-bottom: 8px; font-size: 13px; font-weight: 650; }
.theme-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.theme-options label input, .color-options label input { position: absolute; opacity: 0; pointer-events: none; }
.theme-options label span { display: block; border: 1px solid var(--border); border-radius: 11px; padding: 12px; background: var(--surface-2); font-size: 11px; text-align: center; cursor: pointer; }
.theme-options label input:checked + span { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); color: var(--accent); }
.color-options { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.color-options label:not(.custom-color) span { display: block; width: 30px; height: 30px; border: 3px solid var(--surface); border-radius: 50%; background: var(--swatch); box-shadow: 0 0 0 1px var(--border); cursor: pointer; }
.color-options label input:checked + span { box-shadow: 0 0 0 3px color-mix(in srgb, var(--swatch) 35%, transparent); transform: scale(1.08); }
.custom-color { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 10px; }
.custom-color input { position: static !important; width: 34px; height: 34px; padding: 2px; opacity: 1 !important; pointer-events: auto !important; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 13px; border-radius: 12px; background: var(--surface-2); }
.switch-row > span { display: flex; flex-direction: column; }
.switch-row small { margin-top: 3px; color: var(--muted); font-size: 9px; font-weight: 450; }
.switch-row input { width: 40px; height: 20px; accent-color: var(--accent); }
.backup-card p { color: var(--muted); font-size: 11px; line-height: 1.6; }
.backup-card > small { display: block; margin-top: 13px; color: var(--muted); font-size: 9px; }
.about-card { display: flex; align-items: center; gap: 12px; }
.about-card > div { display: flex; flex-direction: column; }
.about-card small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.user-admin-card { grid-column: 1 / -1; }
.user-create-form { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 18px; padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.user-create-form .btn { align-self: end; }
.managed-user-list { display: grid; gap: 7px; }
.managed-user-list article { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 11px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.user-avatar { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 10px; background: color-mix(in srgb, var(--accent) 14%, var(--surface)); color: var(--accent); font-size: 12px; font-weight: 800; }
.managed-user-list article > div { display: flex; min-width: 0; flex-direction: column; }
.managed-user-list strong { font-size: 11px; }
.managed-user-list small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(15, 16, 20, .56);
    backdrop-filter: blur(7px);
}
.modal-backdrop[hidden] { display: none; }
.modal {
    width: min(620px, 100%);
    max-height: min(760px, calc(100vh - 40px));
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: var(--surface);
    box-shadow: 0 28px 80px rgba(0,0,0,.24);
}
.modal > header { position: sticky; top: 0; z-index: 2; display: flex; align-items: flex-start; justify-content: space-between; padding: 22px 24px 16px; border-bottom: 1px solid var(--border); background: var(--surface); }
.modal h2 { margin: 5px 0 0; font-size: 20px; }
.modal-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; padding: 22px 24px 25px; }
.modal-form .full { grid-column: 1 / -1; }
.modal-form .check-row { display: flex; align-items: center; gap: 8px; padding: 12px; border-radius: 10px; background: var(--surface-2); }
.modal-form .check-row input { width: auto; margin: 0; accent-color: var(--accent); }
.modal-form .form-actions { display: flex; grid-column: 1 / -1; justify-content: flex-end; gap: 8px; padding-top: 5px; }
.toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 150;
    max-width: 360px;
    padding: 13px 17px;
    border-radius: 12px;
    background: #1f2937;
    box-shadow: 0 15px 30px rgba(0,0,0,.18);
    color: #fff;
    font-size: 11px;
    font-weight: 650;
    opacity: 0;
    pointer-events: none;
    transform: translateY(15px);
    transition: .2s;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { background: #c92a2a; }
.auth-page {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 30px;
    background:
        radial-gradient(circle at 15% 20%, rgba(108,92,231,.16), transparent 28%),
        radial-gradient(circle at 85% 80%, rgba(18,183,106,.13), transparent 30%),
        #f5f6fa;
}
.auth-shell {
    display: grid;
    width: min(980px, 100%);
    grid-template-columns: 1.05fr .95fr;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.85);
    border-radius: 30px;
    background: #fff;
    box-shadow: 0 30px 90px rgba(32,29,71,.14);
}
.auth-brand {
    position: relative;
    display: flex;
    min-height: 600px;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    padding: 55px;
    background: linear-gradient(145deg, #23213d, #5b4dcc);
    color: #fff;
}
.auth-brand:before, .auth-brand:after { position: absolute; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; content: ""; }
.auth-brand:before { right: -130px; top: -130px; width: 370px; height: 370px; }
.auth-brand:after { left: -170px; bottom: -200px; width: 430px; height: 430px; }
.auth-brand > * { position: relative; z-index: 1; }
.auth-brand .eyebrow { margin-top: 28px; color: rgba(255,255,255,.65); }
.auth-brand h1 { max-width: 430px; margin: 14px 0 15px; font-size: clamp(34px, 5vw, 49px); line-height: 1.04; letter-spacing: -1.4px; }
.auth-brand > p { max-width: 430px; margin: 0; color: rgba(255,255,255,.7); line-height: 1.7; }
.auth-feature-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 38px; }
.auth-feature-grid span { padding: 11px; border: 1px solid rgba(255,255,255,.12); border-radius: 11px; background: rgba(255,255,255,.08); font-size: 11px; }
.auth-card { display: flex; flex-direction: column; justify-content: center; padding: 55px; }
.auth-card-head { margin-bottom: 24px; }
.auth-card-head h2 { margin: 13px 0 6px; font-size: 28px; letter-spacing: -.6px; }
.auth-card-head p { margin: 0; color: var(--muted); font-size: 12px; }
.step-pill { display: inline-flex; padding: 6px 9px; border-radius: 99px; background: #eeebff; color: #5f4fd1; font-size: 9px; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.stack-form { display: grid; gap: 15px; }
.check-row { display: flex; align-items: flex-start; gap: 8px; color: var(--muted); font-size: 10px; font-weight: 500; }
.check-row input { width: auto; margin-top: 1px; accent-color: var(--accent); }
.alert { margin-bottom: 15px; padding: 11px 13px; border-radius: 10px; font-size: 10px; line-height: 1.5; }
.alert-error { border: 1px solid #ffc9c9; background: #fff5f5; color: #c92a2a; }
.alert-success { border: 1px solid #b2f2bb; background: #ebfbee; color: #2b8a3e; }
.auth-note { margin: 18px 0 0; color: var(--muted); font-size: 9px; text-align: center; }
.login-orbit { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 35px; }
.login-orbit span { display: grid; width: 45px; height: 45px; place-items: center; border: 1px solid rgba(255,255,255,.15); border-radius: 14px; background: rgba(255,255,255,.09); font-size: 19px; }
.is-compact .content { padding-top: 18px; }
.is-compact .card { padding: 17px; }
.is-compact .metric-card { min-height: 112px; padding: 17px; }
.is-compact .hero-panel { min-height: 158px; padding-block: 25px; }

html[data-theme="dark"] {
    --bg: #11131a;
    --surface: #191c25;
    --surface-2: #20242f;
    --text: #f3f5f9;
    --muted: #9aa1b2;
    --border: #2b303c;
    --shadow: 0 12px 30px rgba(0,0,0,.18);
}
html[data-theme="dark"] .auth-page { background: #11131a; }
html[data-theme="dark"] .auth-shell { background: var(--surface); border-color: var(--border); }
html[data-theme="dark"] .health-hero { border-color: #214a5b; background: linear-gradient(120deg, #162a35, #173844); }
html[data-theme="dark"] .quote-card { border-color: #50385b; background: linear-gradient(120deg, #30223a, #3a2432); }
html[data-theme="dark"] .motivation-card { background: var(--surface); }
html[data-theme="dark"] .motivation-list > div { border-color: #5c5429; background: #36331e; color: #f6e58d; }
html[data-theme="dark"] .week-column > strong { border-color: #315e7a; background: #19384c; color: #9dd7ff; }
.routine-habits + .two-col .pink-tag { color: #4a9ed3; }
.nav-order-list { display: grid; gap: 7px; margin-top: 8px; }
.nav-order-list > div { display: grid; grid-template-columns: 26px 1fr 34px 34px; align-items: center; gap: 7px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.nav-order-list strong { font-size: 11px; }
.nav-order-list button { display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); cursor: pointer; }
.nav-order-list button:hover { border-color: var(--accent); color: var(--accent); }
.field-help { margin: 0 0 6px; color: var(--muted); font-size: 10px; line-height: 1.5; }

/* Calendário */
.calendar-toolbar { display:flex; align-items:center; justify-content:space-between; gap:18px; margin-bottom:18px; }
.calendar-actions { display:flex; align-items:center; gap:12px; }
.calendar-view-switch { display:flex; padding:4px; border:1px solid var(--border); border-radius:12px; background:var(--surface); }
.calendar-view-switch a { padding:8px 13px; border-radius:9px; color:var(--muted); font-size:12px; font-weight:700; text-decoration:none; }
.calendar-view-switch a.active { color:var(--accent); background:rgba(var(--accent-rgb),.1); }
.calendar-shell { overflow:hidden; border:1px solid var(--border); border-radius:18px; background:var(--surface); box-shadow:var(--shadow); }
.calendar-weekdays, .calendar-grid { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); }
.calendar-weekdays { border-bottom:1px solid var(--border); background:var(--surface-2); }
.calendar-weekdays span { padding:12px; color:var(--muted); font-size:10px; font-weight:800; text-align:center; }
.calendar-day { min-height:128px; padding:9px; border-right:1px solid var(--border); border-bottom:1px solid var(--border); background:var(--surface); cursor:pointer; overflow:hidden; }
.calendar-day:nth-child(7n) { border-right:0; }
.calendar-day:hover { background:rgba(var(--accent-rgb),.025); }
.calendar-day.outside { opacity:.42; background:var(--surface-2); }
.calendar-day > header { display:flex; justify-content:space-between; align-items:center; min-height:24px; margin-bottom:5px; }
.calendar-day > header strong { display:grid; place-items:center; width:25px; height:25px; border-radius:50%; font-size:12px; }
.calendar-day > header span { color:var(--accent); font-size:9px; font-weight:800; }
.calendar-day.today > header strong { color:#fff; background:var(--accent); }
.day-events { display:flex; flex-direction:column; gap:4px; }
.day-events > small { color:var(--muted); font-size:9px; font-weight:700; padding-left:5px; }
.calendar-event { display:flex; align-items:center; gap:5px; width:100%; min-width:0; padding:5px 6px; border:0; border-radius:6px; color:var(--text); background:color-mix(in srgb, var(--event-color) 13%, var(--surface)); text-align:left; cursor:pointer; }
.calendar-event i, .agenda-events button > i { flex:0 0 5px; width:5px; height:5px; border-radius:50%; background:var(--event-color); }
.calendar-event time { color:var(--muted); font-size:9px; }
.calendar-event span { overflow:hidden; font-size:10px; font-weight:700; text-overflow:ellipsis; white-space:nowrap; }
.calendar-event.completed { opacity:.55; text-decoration:line-through; }
.week-view .calendar-day { min-height:460px; }
.calendar-agenda { padding:10px 24px; }
.agenda-day { display:grid; grid-template-columns:70px 1fr; gap:18px; padding:18px 0; border-bottom:1px solid var(--border); }
.agenda-day:last-child { border-bottom:0; }
.agenda-date { display:flex; align-items:center; gap:8px; }
.agenda-date strong { font-size:27px; }
.agenda-date span { color:var(--muted); font-size:10px; font-weight:800; text-transform:uppercase; }
.agenda-events { display:flex; flex-direction:column; gap:8px; }
.agenda-events button { display:grid; grid-template-columns:7px 90px 1fr auto; align-items:center; gap:10px; width:100%; padding:10px 12px; border:1px solid var(--border); border-radius:10px; color:var(--text); background:var(--surface-2); text-align:left; cursor:pointer; }
.agenda-events time { color:var(--muted); font-size:11px; font-weight:700; }
.agenda-events span { display:flex; flex-direction:column; gap:2px; }
.agenda-events small { color:var(--muted); font-size:10px; }
.agenda-events em { color:var(--accent); font-size:10px; font-style:normal; font-weight:700; }
.split-actions { grid-template-columns:auto 1fr auto auto; }
.btn-danger { color:#e03131; border:1px solid rgba(224,49,49,.2); background:rgba(224,49,49,.08); }
html[data-theme="dark"] .calendar-event { background:color-mix(in srgb, var(--event-color) 18%, var(--surface)); }
.day-panel { display:flex; flex-direction:column; gap:18px; min-width:0; }
.day-panel-list { display:flex; flex-direction:column; gap:10px; }
.day-panel-card { position:relative; display:grid; grid-template-columns:7px minmax(0,1fr) auto; align-items:start; gap:12px; padding:14px; border:1px solid var(--border); border-radius:13px; background:var(--surface-2); }
.day-panel-card > i { width:7px; height:100%; min-height:48px; border-radius:99px; background:var(--event-color); }
.day-panel-card-content { display:flex; flex-direction:column; gap:4px; min-width:0; }
.day-panel-card-content > div { display:flex; align-items:center; gap:8px; }
.day-panel-card-content time { color:var(--event-color); font-size:11px; font-weight:800; }
.day-panel-card-content strong { font-size:14px; }
.day-panel-card-content small { color:var(--muted); font-size:11px; }
.day-panel-card-content p { margin:3px 0 0; color:var(--muted); font-size:11px; white-space:pre-wrap; }
.day-panel-card-actions { display:flex; gap:5px; }
.day-panel-card.completed { opacity:.65; }
.day-panel-card.completed .day-panel-card-content > strong { text-decoration:line-through; }
.day-panel-status { padding:3px 7px; border-radius:99px; color:#18864b; background:rgba(32,191,107,.12); font-size:9px; font-weight:800; text-transform:uppercase; }
.day-panel-empty { display:grid; place-items:center; min-height:190px; padding:24px; border:1px dashed var(--border); border-radius:14px; color:var(--muted); text-align:center; }
.day-panel-empty span { margin-bottom:9px; font-size:30px; }
.day-panel-empty strong { color:var(--text); }
.day-panel-empty p { margin:4px 0 0; font-size:12px; }
.day-panel-footer { display:flex; justify-content:flex-end; gap:8px; padding-top:4px; border-top:1px solid var(--border); }
html[data-theme="dark"] .day-panel-status { color:#8ce8b7; background:rgba(32,191,107,.18); }
@media (prefers-color-scheme: dark) {
    html[data-theme="system"] {
        --bg: #11131a;
        --surface: #191c25;
        --surface-2: #20242f;
        --text: #f3f5f9;
        --muted: #9aa1b2;
        --border: #2b303c;
    }
}

.project-tabs { display:flex; gap:9px; overflow-x:auto; margin:0 0 18px; padding:3px 2px 9px; }
.project-tabs a { flex:0 0 auto; padding:10px 15px; border:1px solid var(--border); border-radius:10px; color:var(--muted); background:var(--surface); font-size:12px; font-weight:800; text-decoration:none; }
.project-tabs a::before { content:""; display:inline-block; width:7px; height:7px; margin-right:7px; border-radius:50%; background:var(--project-color); }
.project-tabs a.active { color:var(--text); border-color:var(--project-color); box-shadow:0 5px 16px rgba(0,0,0,.05); }
.project-list { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:18px; }
.project-card { position:relative; display:flex; min-height:235px; flex-direction:column; overflow:hidden; padding:22px; border:1px solid var(--border); border-radius:17px; color:var(--text); background:var(--surface); box-shadow:0 7px 22px rgba(25,34,63,.04); text-align:left; text-decoration:none; transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease; }
.project-card:hover { border-color:var(--project-color); box-shadow:0 13px 30px rgba(25,34,63,.09); transform:translateY(-3px); }
.project-card-accent { position:absolute; inset:0 0 auto; height:6px; background:var(--project-color); }
.project-card-top { display:flex; align-items:center; justify-content:space-between; margin-bottom:18px; }
.project-card-icon { display:grid; place-items:center; width:42px; height:42px; border-radius:12px; color:var(--project-color); background:color-mix(in srgb,var(--project-color) 12%,transparent); font-size:19px; font-weight:900; }
.project-card-open { color:var(--muted); font-size:10px; font-weight:800; text-transform:uppercase; letter-spacing:.04em; }
.project-card-open b { margin-left:4px; color:var(--project-color); font-size:18px; vertical-align:-1px; }
.project-card h2 { margin:0 0 7px; font-size:20px; }
.project-card > p { min-height:34px; margin:0 0 18px; overflow:hidden; color:var(--muted); font-size:11px; line-height:1.5; }
.project-card-stats { display:flex; flex-wrap:wrap; gap:8px 15px; margin-top:auto; color:var(--muted); font-size:10px; }
.project-card-stats strong { color:var(--text); }
.project-card-progress { height:6px; margin:15px 0 6px; overflow:hidden; border-radius:99px; background:var(--surface-2); }
.project-card-progress span { display:block; height:100%; border-radius:inherit; background:var(--project-color); }
.project-card > small { color:var(--muted); font-size:9px; font-weight:700; }
.project-card-new { align-items:center; justify-content:center; border:1px dashed rgba(var(--accent-rgb),.45); color:var(--accent); background:rgba(var(--accent-rgb),.025); cursor:pointer; font:inherit; text-align:center; }
.project-card-new:hover { --project-color:var(--accent); background:rgba(var(--accent-rgb),.065); }
.project-card-new > span { display:grid; place-items:center; width:48px; height:48px; margin-bottom:12px; border-radius:50%; background:rgba(var(--accent-rgb),.1); font-size:25px; }
.project-card-new > strong { font-size:14px; }
.project-card-new > small { margin-top:5px; }
.tasks-back { display:inline-flex; align-items:center; margin:-4px 0 17px; color:var(--accent); font-size:11px; font-weight:800; text-decoration:none; }
.tasks-back:hover { text-decoration:underline; }
.kanban-heading { display:flex; justify-content:space-between; align-items:center; gap:20px; margin-bottom:16px; }
.kanban-heading > div { display:flex; align-items:center; gap:12px; }
.kanban-heading > div > i { width:9px; height:42px; border-radius:99px; }
.kanban-heading h2,.kanban-heading p { margin:0; }
.kanban-heading p { margin-top:3px; color:var(--muted); font-size:12px; }
.kanban-board { display:flex; align-items:flex-start; gap:14px; width:100%; overflow-x:auto; padding:2px 2px 18px; }
.kanban-column { flex:0 0 310px; padding:12px; border:1px solid var(--border); border-radius:15px; background:var(--surface-2); transition:.15s ease; }
.kanban-column.drag-over { border-color:var(--accent); background:rgba(var(--accent-rgb),.06); transform:translateY(-2px); }
.kanban-column > header { display:grid; grid-template-columns:7px 1fr auto auto; align-items:center; gap:8px; margin-bottom:11px; }
.kanban-column > header > i { width:7px; height:24px; border-radius:99px; }
.kanban-column > header strong { font-size:13px; }
.kanban-column > header span { display:grid; place-items:center; min-width:23px; height:23px; border-radius:99px; color:var(--muted); background:var(--surface); font-size:10px; font-weight:800; }
.kanban-column > header button { border:0; color:var(--accent); background:transparent; font-size:20px; cursor:pointer; }
.kanban-cards { display:flex; flex-direction:column; gap:9px; min-height:45px; }
.kanban-card { padding:13px; border:1px solid var(--border); border-radius:11px; background:var(--surface); box-shadow:0 4px 13px rgba(0,0,0,.035); cursor:pointer; }
.kanban-card:hover { border-color:rgba(var(--accent-rgb),.45); transform:translateY(-1px); }
.kanban-card.dragging { opacity:.4; }
.kanban-card.completed > strong { text-decoration:line-through; opacity:.62; }
.kanban-card > strong { display:block; font-size:13px; }
.kanban-card > p { margin:7px 0; color:var(--muted); font-size:11px; line-height:1.45; }
.kanban-card footer { display:flex; justify-content:space-between; align-items:center; gap:8px; margin-top:11px; }
.kanban-card time { color:var(--muted); font-size:10px; font-weight:700; }
.priority { padding:3px 7px; border-radius:99px; color:#8a5b00; background:#fff3bf; font-size:9px; font-weight:800; text-transform:uppercase; }
.priority.alta,.priority.urgente { color:#c92a2a; background:#ffe3e3; }
.priority.baixa { color:#087f5b; background:#d3f9d8; }
.task-labels { display:flex; flex-wrap:wrap; gap:4px; margin-bottom:8px; }
.task-labels span { padding:3px 6px; border-radius:5px; color:var(--accent); background:rgba(var(--accent-rgb),.09); font-size:8px; font-weight:800; text-transform:uppercase; }
.kanban-add { width:100%; margin-top:9px; padding:9px; border:0; border-radius:8px; color:var(--muted); background:transparent; text-align:left; cursor:pointer; }
.kanban-add:hover { color:var(--accent); background:rgba(var(--accent-rgb),.07); }
.tasks-empty { display:grid; place-items:center; min-height:340px; text-align:center; }
.tasks-empty > span { font-size:44px; color:var(--accent); }
.tasks-empty h3 { margin:12px 0 3px; }
.tasks-empty p { margin:0 0 16px; color:var(--muted); }
.project-delete { margin-top:4px; }
.trader-access-form { display:flex; align-items:center; gap:7px; margin-left:auto; }
.mini-switch { display:flex; align-items:center; gap:6px; cursor:pointer; }
.mini-switch input { position:absolute; opacity:0; }
.mini-switch span { position:relative; width:31px; height:18px; border-radius:99px; background:var(--border); }
.mini-switch span::after { content:""; position:absolute; top:3px; left:3px; width:12px; height:12px; border-radius:50%; background:#fff; transition:.18s; }
.mini-switch input:checked + span { background:var(--accent); }
.mini-switch input:checked + span::after { transform:translateX(13px); }
.mini-switch small { color:var(--muted); font-size:9px; font-weight:800; }

@media (max-width: 1180px) {
    .project-list { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .metric-grid-four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-grid .span-2 { grid-column: span 2; }
    .dashboard-calendar-layout { grid-template-columns: minmax(340px, .9fr) minmax(380px, 1.1fr); gap: 24px; }
    .upcoming-calendar-list { grid-template-columns: 1fr; }
    .two-col.wide-left { grid-template-columns: 1fr; }
    .donut-wrap { justify-content: center; }
}
@media (max-width: 680px) {
    .project-list { grid-template-columns:1fr; }
    .project-card { min-height:215px; }
}
@media (max-width: 920px) {
    :root { --sidebar: 230px; }
    .sidebar { transform: translateX(-102%); transition: transform .22s ease; box-shadow: 15px 0 40px rgba(0,0,0,.12); }
    .sidebar.open { transform: translateX(0); }
    .main-column { margin-left: 0; }
    .menu-toggle { display: inline-grid; }
    .page-heading { margin-right: auto; margin-left: 12px; }
    .two-col, .settings-grid { grid-template-columns: 1fr; }
    .library-grid, .workout-grid { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
    .kanban-column { flex-basis:86vw; }
    .kanban-heading { align-items:flex-start; flex-direction:column; }
    .trader-access-form { width:100%; margin:5px 0 0 52px; }
    .user-create-form { grid-template-columns: 1fr; }
    .topbar { min-height: 70px; padding: 10px 14px; }
    .profile-chip div { display: none; }
    .profile-chip { padding: 5px; }
    .page-heading .eyebrow { display: none; }
    .page-heading h1 { font-size: 17px; }
    .content { padding: 18px 14px 50px; }
    .hero-panel { min-height: 210px; align-items: flex-start; padding: 26px; }
    .hero-date { position: absolute; right: 22px; bottom: 20px; padding: 10px 13px; }
    .hero-date strong { font-size: 30px; }
    .hero-date span { font-size: 9px; }
    .metric-grid-four, .metric-grid-three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-grid { grid-template-columns: 1fr; }
    .dashboard-grid .span-2 { grid-column: auto; }
    .dashboard-calendar-layout { grid-template-columns: 1fr; }
    .upcoming-calendar { padding: 18px 0 0; border-top: 1px solid var(--border); border-left: 0; }
    .mini-calendar-grid button { min-height: 40px; font-size: 11px; }
    .section-toolbar { align-items: flex-start; }
    .button-row { flex-direction: column; }
    .month-switcher strong { min-width: 100px; }
    .donut-wrap { align-items: flex-start; flex-direction: column; }
    .donut { align-self: center; }
    .book-card { grid-template-columns: 85px 1fr; gap: 13px; }
    .book-cover { min-height: 165px; padding: 12px 9px; }
    .book-cover span { font-size: 28px; }
    .health-hero { grid-template-columns: 1fr; padding: 24px; }
    .water-visual { display: none; }
    .health-log-list article { grid-template-columns: auto auto 1fr auto; }
    .auth-page { padding: 0; }
    .auth-shell { display: block; min-height: 100vh; border: 0; border-radius: 0; }
    .auth-brand { min-height: 285px; padding: 35px 28px; justify-content: flex-end; }
    .auth-brand h1 { margin-top: 10px; font-size: 34px; }
    .auth-brand > p { font-size: 12px; }
    .auth-feature-grid, .login-orbit { display: none; }
    .auth-card { padding: 35px 28px 50px; }
    .modal-backdrop { place-items: end center; padding: 0; }
    .modal { width: 100%; max-height: 90vh; border-radius: 22px 22px 0 0; }
    .modal-form { grid-template-columns: 1fr; padding: 18px; }
    .modal-form .full { grid-column: auto; }
    .modal-form .form-actions { grid-column: auto; }
    .theme-options { grid-template-columns: 1fr; }
    .calendar-toolbar, .calendar-actions { align-items:stretch; flex-direction:column; }
    .calendar-view-switch { justify-content:center; }
    .calendar-view-switch a { flex:1; text-align:center; }
    .calendar-shell { overflow-x:auto; }
    .calendar-weekdays, .calendar-grid { min-width:720px; }
    .calendar-day { min-height:112px; }
    .agenda-day { grid-template-columns:48px 1fr; gap:10px; }
    .calendar-agenda { padding:8px 14px; }
    .agenda-events button { grid-template-columns:7px 1fr; }
    .agenda-events time, .agenda-events span, .agenda-events em { grid-column:2; }
    .split-actions { grid-template-columns:1fr 1fr; }
    .split-actions span { display:none; }
}
@media (max-width: 430px) {
    .metric-grid-four, .metric-grid-three { grid-template-columns: 1fr; }
    .metric-card { min-height: 110px; }
    .book-card { grid-template-columns: 1fr; }
    .book-cover { width: 115px; min-height: 170px; }
}
