:root {
  --bg: #0f1117;
  --panel: #171a23;
  --panel-2: #1f2330;
  --border: #2a2f3d;
  --text: #e6e8ef;
  --muted: #8b91a5;
  --primary: #5865f2;
  --primary-h: #4752c4;
  --danger: #ed4245;
  --ok: #57f287;
  --warn: #fee75c;
  --radius: 10px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font: 14px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}
a { color: var(--primary); }
code { background: var(--panel-2); padding: 1px 5px; border-radius: 4px; font-size: 12px; }
h1, h2 { margin: 0 0 8px; font-weight: 600; }
h1 { font-size: 20px; }
h2 { font-size: 16px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.error { color: var(--danger); }
.warning { background: rgba(254, 231, 92, 0.1); border: 1px solid rgba(254, 231, 92, 0.4); padding: 10px 12px; border-radius: var(--radius); margin-top: 12px; }

/* ---------- topbar ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px 20px; background: var(--panel); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 5; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); display: inline-block; }
.brand-dot.ok { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.brand-dot.bad { background: var(--danger); }
.avatar { width: 28px; height: 28px; border-radius: 50%; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tabs button, .tabs a.tab-link {
  background: transparent; color: var(--muted); border: 0; padding: 8px 14px; border-radius: 8px; cursor: pointer; font: inherit;
  text-decoration: none; display: inline-flex; align-items: center;
}
.tabs button:hover, .tabs a.tab-link:hover { color: var(--text); background: var(--panel-2); }
.tabs button.active, .tabs a.tab-link.active { color: var(--text); background: var(--panel-2); }

/* ---------- layout ---------- */
.content { max-width: 1200px; margin: 0 auto; padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.tab { display: none; flex-direction: column; gap: 16px; }
.tab.active { display: flex; }
.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.grid { display: grid; gap: 12px; }
.grid.stats { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat .label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.stat .value { font-size: 22px; font-weight: 600; }
.split { display: grid; grid-template-columns: 280px 1fr; gap: 16px; }
@media (max-width: 800px) { .split { grid-template-columns: 1fr; } }
.row { display: flex; gap: 8px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row input[type="text"] { flex: 1; }

/* ---------- forms ---------- */
label { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; color: var(--muted); font-size: 13px; }
label.inline { flex-direction: row; align-items: center; gap: 6px; margin: 0; }
input:not([type]), input[type="text"], input[type="password"], input[type="date"], input[type="time"], input[type="number"], select, textarea {
  background: var(--panel-2); color: var(--text); border: 1px solid var(--border); border-radius: 8px;
  padding: 8px 10px; font: inherit; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary); outline-offset: 0; border-color: transparent; }
textarea { min-height: 80px; resize: vertical; }
.toggle { flex-direction: row; align-items: center; gap: 10px; color: var(--text); }
.toggle input { width: auto; }
.btn {
  background: var(--panel-2); color: var(--text); border: 1px solid var(--border); border-radius: 8px;
  padding: 8px 14px; font: inherit; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; white-space: nowrap;
}
.btn:hover { border-color: var(--muted); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-h); }
.btn-danger { background: transparent; border-color: var(--danger); color: var(--danger); }
.btn-danger:hover { background: rgba(237, 66, 69, .12); }
.btn-ghost { background: transparent; }
.btn-block { width: 100%; justify-content: center; }

/* ---------- guild list ---------- */
.list { padding: 8px; max-height: 70vh; overflow: auto; }
.guild-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; cursor: pointer; border: 0; width: 100%;
  background: transparent; color: var(--text); text-align: left; font: inherit;
}
.guild-item:hover { background: var(--panel-2); }
.guild-item.active { background: var(--panel-2); outline: 1px solid var(--primary); }
.guild-item img, .guild-item .ph { width: 32px; height: 32px; border-radius: 50%; background: var(--panel-2); display: grid; place-items: center; font-weight: 600; flex: none; }
.guild-item .meta { display: flex; flex-direction: column; min-width: 0; }
.guild-item .meta span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.guild-item .meta span:last-child { color: var(--muted); font-size: 12px; }
.guild-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.guild-header img { width: 48px; height: 48px; border-radius: 50%; }
.section { border-top: 1px solid var(--border); padding-top: 14px; margin-top: 14px; }

/* ---------- table / logs ---------- */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table th { color: var(--muted); font-weight: 500; }
.table td.details { color: var(--muted); font-family: ui-monospace, monospace; font-size: 12px; word-break: break-all; }
.logbox {
  background: #0b0d12; border: 1px solid var(--border); border-radius: 8px; padding: 12px; margin: 12px 0 0;
  max-height: 65vh; overflow: auto; font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap;
}
.lv-error { color: #ff6b6e; }
.lv-warn { color: var(--warn); }
.lv-info { color: #a7c0ff; }
.lv-debug { color: var(--muted); }

input[type="date"], input[type="time"] { color-scheme: dark; }
.span2 { grid-column: 1 / -1; }

/* ---------- calendário ---------- */
.subtabs { display: flex; gap: 4px; flex-wrap: wrap; }
.subtabs button {
  background: var(--panel); color: var(--muted); border: 1px solid var(--border); padding: 7px 12px; border-radius: 8px; cursor: pointer; font: inherit;
}
.subtabs button:hover { color: var(--text); }
.subtabs button.active { color: var(--text); background: var(--panel-2); border-color: var(--primary); }
.cal-panel { display: none; }
.cal-panel.active { display: block; }
.cal-month-label { margin: 0 8px; min-width: 180px; text-align: center; text-transform: capitalize; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-top: 12px; }
.cal-dow { color: var(--muted); font-size: 12px; text-align: center; padding: 4px 0; text-transform: uppercase; letter-spacing: .04em; }
.cal-cell { background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px; min-height: 92px; padding: 6px; display: flex; flex-direction: column; gap: 4px; }
.cal-cell.other { opacity: .35; }
.cal-cell.today { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.cal-cell .day { font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; }
.cal-cell .day button { background: transparent; border: 0; color: var(--muted); cursor: pointer; font-size: 14px; line-height: 1; padding: 0 2px; }
.cal-cell .day button:hover { color: var(--text); }
.chip {
  border: 0; border-radius: 6px; padding: 3px 6px; font: inherit; font-size: 11px; text-align: left; cursor: pointer; color: #fff;
  background: var(--primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; gap: 4px; align-items: center;
}
.chip:hover { filter: brightness(1.15); }
.chip .t { opacity: .85; font-variant-numeric: tabular-nums; }
.chip.rank-Starter { background: #b7950b; }
.chip.rank-Achiever { background: #1e8449; }
.chip.rank-Expert { background: #7d3c98; }
.chip.rank-Elite { background: #c0392b; }
.chip.sent::after { content: '✓'; margin-left: auto; opacity: .8; }
.chip.err { outline: 1px solid var(--warn); }
@media (max-width: 800px) { .cal-cell { min-height: 60px; } .chip .label { display: none; } }

.ev-list { display: flex; flex-direction: column; gap: 6px; }
.ev-row { display: grid; grid-template-columns: 110px 60px 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; background: var(--panel-2); border-radius: 8px; border-left: 3px solid var(--primary); }
.ev-row.rank-Starter { border-left-color: #f1c40f; }
.ev-row.rank-Achiever { border-left-color: #2ecc71; }
.ev-row.rank-Expert { border-left-color: #9b59b6; }
.ev-row.rank-Elite { border-left-color: #e74c3c; }
.ev-row .when { color: var(--muted); font-size: 12px; }
.ev-row .time { font-variant-numeric: tabular-nums; font-weight: 600; }
.ev-row .meta { color: var(--muted); font-size: 12px; }
.ev-row .actions { display: flex; gap: 4px; align-items: center; }
.btn-icon {
  width: 34px; height: 34px; padding: 0; display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none; color: inherit;
}
.btn-icon svg { display: block; }
.badge { display: inline-block; padding: 1px 6px; border-radius: 999px; font-size: 11px; background: var(--panel); border: 1px solid var(--border); color: var(--muted); }
.badge.ok { color: var(--ok); border-color: var(--ok); }
.badge.warn { color: var(--warn); border-color: var(--warn); }

.embed-preview { background: #2b2d31; border-radius: 8px; padding: 12px 14px; border-left: 4px solid var(--primary); max-width: 520px; }
.embed-preview .e-title { font-weight: 600; margin-bottom: 4px; }
.embed-preview .e-desc { white-space: pre-wrap; font-size: 13px; margin-bottom: 8px; }
.embed-preview .e-fields { display: flex; gap: 24px; flex-wrap: wrap; margin-top: 4px; }
.embed-preview .e-field .n { font-size: 12px; font-weight: 600; margin-bottom: 2px; }
.embed-preview .e-field .v { font-size: 13px; color: #dbdee1; }
.embed-preview .e-time { background: rgba(255,255,255,.08); border-radius: 3px; padding: 0 3px; }
.embed-preview .e-footer { color: var(--muted); font-size: 11px; margin-top: 8px; }
#todo-style-preview { display: grid; gap: 12px; }
#todo-style-preview .embed-preview { padding: 20px; overflow-wrap: anywhere; }
#todo-style-preview .e-title { font-size: 17px; margin-bottom: 12px; }
#tab-todo .grid.two { grid-template-columns: repeat(2, minmax(0,1fr)); }
#tab-todo input[type=color] { width: 100%; height: 40px; border: 1px solid var(--border); background: var(--panel-2); border-radius: 8px; }
#todo-style .toggle { align-self: center; }
.todo-image-dialog { width: min(1000px,94vw); max-height: 94vh; background: var(--panel); color: var(--text); border: 1px solid var(--border); border-radius: 14px; padding: 20px; }
.todo-image-dialog::backdrop { background: rgba(0,0,0,.8); }
.todo-image-dialog img { display: block; max-width: 100%; max-height: 75vh; margin: 20px auto 0; object-fit: contain; }
@media(max-width: 700px) { #tab-todo .grid.two { grid-template-columns: minmax(0,1fr); } #tab-todo .row { flex-wrap: wrap; } #todo-items details { min-width: 150px; } }

.kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 12px 0 0; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.progress { font: 12px/1.6 ui-monospace, monospace; background: #0b0d12; border: 1px solid var(--border); border-radius: 8px; padding: 10px; max-height: 300px; overflow: auto; white-space: pre-wrap; }

/* ---------- login ---------- */
.login-body { display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-card { width: min(380px, 92vw); background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 28px; }
.login-card .brand { margin-bottom: 8px; }
.login-card form { margin-top: 4px; }
.btn-discord { background: #5865f2; border-color: #5865f2; color: #fff; gap: 10px; padding: 10px 14px; margin-top: 12px; }
.btn-discord:hover { background: #4752c4; }
.divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; margin: 14px 0; }
.divider::before, .divider::after { content: ''; flex: 1; border-top: 1px solid var(--border); }
.user-chip { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.user-chip img { width: 24px; height: 24px; border-radius: 50%; }

/* ---------- dialog ---------- */
.dialog { background: var(--panel); color: var(--text); border: 1px solid var(--border); border-radius: 14px; padding: 24px; width: min(360px, 92vw); }
.dialog::backdrop { background: rgba(0, 0, 0, .6); }
.dialog h2 { margin-bottom: 4px; }
.dialog form { display: flex; flex-direction: column; gap: 8px; }

/* ---------- toast ---------- */
.toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  background: var(--panel-2); border: 1px solid var(--border); padding: 10px 16px; border-radius: 10px; z-index: 10;
}
.toast.ok { border-color: var(--ok); }
.toast.err { border-color: var(--danger); }

.todo-customizer { display:grid; gap:28px; }
#todo-style-preview .embed-preview { width:100%; max-width:none; box-sizing:border-box; padding:24px; }
#todo-style-preview .e-desc, #todo-items summary { font-size:inherit; }
#todo-style-preview .e-title { font-size:1.3em; }
.todo-line { min-height:1.4em; overflow-wrap:anywhere; }
.todo-h2 { font-size:1.5em; font-weight:700; line-height:1.6; overflow-wrap:anywhere; }
.todo-h3 { font-size:1.25em; font-weight:700; line-height:1.6; overflow-wrap:anywhere; }
#todo-items .row { padding:16px; border:1px solid var(--border); border-radius:12px; }

/* Clover dashboard: shared visual skin; form values and API settings stay intact. */
@font-face { font-family:Poppins; src:url('/assets/fonts/poppins-400.ttf') format('truetype'); font-style:normal; font-weight:400; font-display:swap; }
@font-face { font-family:Poppins; src:url('/assets/fonts/poppins-500.ttf') format('truetype'); font-style:normal; font-weight:500; font-display:swap; }
@font-face { font-family:Poppins; src:url('/assets/fonts/poppins-600.ttf') format('truetype'); font-style:normal; font-weight:600; font-display:swap; }
.dashboard-body { --bg:#0b1014; --panel:#141a1f; --panel-2:#10161b; --border:#2c353d; --text:#e7ebee; --muted:#9ca5ad; --primary:#5dc9f5; --primary-h:#88dafb; --radius:12px; font-family:Poppins, sans-serif; font-size:13px; line-height:1.65; }
.dashboard-sidebar { position:fixed; inset:0 auto 0 0; width:250px; background:#13191e; border-right:1px solid var(--border); z-index:20; display:flex; flex-direction:column; }
.sidebar-brand { margin:20px 14px; padding:14px 12px; border:1px solid var(--border); background:#0e1418; border-radius:10px; display:flex; align-items:center; gap:12px; }
.sidebar-brand strong { font-size:14px; font-weight:600; display:block; }
.sidebar-brand div>span { display:block; color:var(--muted); font-size:10px; margin-top:2px; }
.clover-mark { background:#03170e; color:#36cd87; font-size:25px; width:36px; height:36px; border:1px solid #234133; border-radius:8px; display:grid; place-items:center; }
.dashboard-sidebar .tabs { display:flex; flex-direction:column; flex-wrap:nowrap; overflow-y:auto; padding:0 14px 20px; gap:5px; flex:1; }
.nav-group { font-size:10px; font-weight:600; letter-spacing:.08em; color:#a6afb5; margin:22px 8px 6px; }
.nav-group:first-child { margin-top:8px; }
.dashboard-sidebar .tabs button,.dashboard-sidebar .tabs a { width:100%; gap:12px; padding:11px 12px; border:1px solid transparent; border-radius:6px; font-weight:500; text-align:left; flex-shrink:0; }
.dashboard-sidebar .tabs button:hover,.dashboard-sidebar .tabs a:hover { background:#1a242c; }
.dashboard-sidebar .tabs button.active { background:#1a2b35; border-color:#34647b; color:var(--primary); }
.nav-icon { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round; flex:none; }
.sidebar-footer { border-top:1px solid var(--border); padding:20px 22px; }
.sidebar-footer .brand { margin-bottom:6px; font-size:12px; }
.sidebar-footer .avatar { width:24px; height:24px; }
.sidebar-footer .brand-dot { width:7px; height:7px; }
.dashboard-topbar { margin-left:250px; height:76px; padding:0 36px; background:#0e1419; flex-wrap:nowrap; }
.topbar-label { color:var(--muted); font-size:12px; }
#page-label { color:var(--text); }
.dashboard-content { margin:0 0 0 250px; max-width:none; padding:32px 36px 60px; gap:26px; }
.page-heading h1 { font-size:27px; font-weight:600; letter-spacing:-.6px; margin-bottom:6px; }
.page-heading p { margin:0; font-size:13px; }
.dashboard-body .card { padding:24px; box-shadow:0 2px 5px #0000000a; }
.dashboard-body h2 { font-size:15px; margin-bottom:16px; font-weight:600; }
.dashboard-body h3 { font-size:14px; font-weight:500; }
.dashboard-body .grid { gap:16px; }
.dashboard-body .tab { gap:20px; min-width:0; }
.dashboard-body .stat { min-height:142px; justify-content:space-between; border-top:2px solid #284653; }
.dashboard-body .stat .label { font-size:11px; text-transform:none; letter-spacing:0; }
.dashboard-body .stat .value { font-size:28px; font-weight:500; letter-spacing:-.5px; }
.dashboard-body .grid.stats { grid-template-columns:repeat(3,minmax(0,1fr)); }
.dashboard-body .btn { padding:9px 15px; font-size:12px; border-radius:6px; }
.dashboard-body .btn-primary { background:#1a3543; border-color:#39768f; color:#79d8ff; }
.dashboard-body .btn-primary:hover { background:#244d60; }
.dashboard-body .btn:focus-visible,.dashboard-sidebar button:focus-visible,.dashboard-sidebar a:focus-visible { outline:2px solid var(--primary); outline-offset:3px; }
.dashboard-body input,.dashboard-body select,.dashboard-body textarea { border-radius:6px; padding:10px 12px; }
.dashboard-body label { font-size:12px; }
.dashboard-body .section { margin-top:22px; padding-top:22px; }
.dashboard-body .subtabs { gap:8px; }
.dashboard-body .subtabs button { border-radius:6px; padding:9px 14px; }
.dashboard-body .subtabs button.active { background:#1a2b35; border-color:#34647b; color:var(--primary); }
.dashboard-body .split { grid-template-columns:240px minmax(0,1fr); }
.dashboard-body .table { display:block; overflow-x:auto; }
.dashboard-body .table th,.dashboard-body .table td { padding:12px; }
.dashboard-body .user-chip { font-size:11px; }
.menu-toggle { display:none; }
.sidebar-overlay { position:fixed; inset:0; background:#0009; border:0; z-index:19; }
@media(min-width:1500px) { .dashboard-content { padding-left:48px; padding-right:48px; } }
@media(max-width:1050px) { .dashboard-sidebar { width:220px; } .dashboard-topbar,.dashboard-content { margin-left:220px; } .dashboard-content { padding:26px 24px; } .dashboard-topbar { padding:0 24px; } .dashboard-body .split { grid-template-columns:1fr; } }
@media(max-width:760px) { .dashboard-sidebar { width:250px; transform:translateX(-100%); transition:transform .18s ease; } .sidebar-open .dashboard-sidebar { transform:translateX(0); } .dashboard-topbar,.dashboard-content { margin-left:0; } .dashboard-topbar { height:66px; padding:0 16px; gap:8px; } .menu-toggle { display:inline-flex; padding:8px!important; } .topbar-label { font-size:10px; } .dashboard-content { padding:24px 16px 40px; } .page-heading h1 { font-size:23px; } .dashboard-body .grid.stats { grid-template-columns:repeat(2,minmax(0,1fr)); } .dashboard-body .grid.two { grid-template-columns:minmax(0,1fr); } .dashboard-body .card { padding:18px; min-width:0; } .dashboard-body .row { flex-wrap:wrap; } .dashboard-topbar .row { flex-wrap:nowrap; } .dashboard-body .user-chip { max-width:100px; overflow:hidden; } .dashboard-body .cal-cell { min-width:0; padding:3px; } .dashboard-body .cal-month-label { min-width:120px; } }
@media(prefers-reduced-motion:reduce) { .dashboard-sidebar { transition:none; } }

#todo-items summary { font-weight:400; }

.todo-archive-details { flex:1; min-width:150px; overflow-wrap:anywhere; }
.todo-archive-details p { margin:4px 0; }

#todo-range[hidden], #todo-active-panel[hidden], #todo-archived-panel[hidden] { display:none; }

.settings-pane { display:flex; flex-direction:column; gap:22px; }
.settings-block { display:flex; flex-direction:column; gap:20px; min-width:0; }
[hidden] { display:none !important; }
.month-body { display:block; }
.month-content { margin-left:250px; padding:32px 36px; }
.month-content .v-head,.month-content main,.month-content .v-foot { max-width:none; padding-left:0; padding-right:0; }
.month-content .v-head { padding-top:0; padding-bottom:28px; }
.month-content .v-head h1 { font-size:27px; font-weight:600; }
.month-content .v-cell { border-radius:10px; min-height:140px; padding:12px; }
.month-content .v-cell.today { background:#182a33; box-shadow:none; }
.month-content .v-ev { border-radius:5px; padding:8px; }
.month-content .v-foot { padding-top:22px; border-top:1px solid var(--border); }
.month-content .v-day-h { top:66px; }
@media(max-width:1050px) { .month-content { margin-left:220px; padding:26px 24px; } }
@media(max-width:760px) { .month-content { margin-left:0; padding:24px 16px; } .month-content .v-head { align-items:flex-start; flex-direction:column; gap:12px; } .month-content .v-today { text-align:left; } }

.dashboard-sidebar .tabs a.active { background:#1a2b35; border-color:#34647b; color:var(--primary); }

.tools-nav-mark { width:18px; text-align:center; font-size:22px; font-weight:400; line-height:1; }
.tools-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(min(100%,340px),1fr)); gap:20px; }
.dashboard-body .tool-card { padding:0; overflow:hidden; }
.tool-image-button { display:block; width:100%; border:0; padding:0; background:var(--panel-2); cursor:pointer; }
.tool-preview,.tool-preview-empty { display:block; width:100%; aspect-ratio:16/10; object-fit:cover; object-position:top; border-bottom:1px solid var(--border); }
.tool-preview-empty { display:grid; place-items:center; color:var(--muted); font-size:13px; }
.tool-card-copy { padding:22px; }
.tool-card-copy h2 { margin-bottom:6px; }
.tool-card-copy>p { min-height:44px; font-size:12px; }
.tools-subtabs { min-width:0; }
.tool-toolbar { margin-bottom:16px; }
.tool-toolbar h2,.tool-toolbar p { margin:0; }
#tool-frame { display:block; width:100%; height:calc(100vh - 270px); min-height:600px; background:#fff; border:1px solid var(--border); border-radius:12px; }
.tool-dialog { width:min(520px,94vw); max-height:90vh; overflow:auto; }
@media(max-width:760px) { #tool-frame { min-height:680px; } .tool-toolbar .row { width:100%; } }

/* Shared Clover identity — selected login direction and application shell. */
.dashboard-body,.clover-login { --bg:#0b1014; --panel:#121a1e; --panel-2:#10171b; --border:#273239; --text:#edf0f2; --muted:#9ca8b1; --primary:#00b967; --primary-h:#00a85e; font-family:Poppins,sans-serif; }
.dashboard-sidebar { background:#0e1519; }
.sidebar-brand { background:transparent; border-color:var(--border); }
.dashboard-sidebar .tabs button.active,.dashboard-sidebar .tabs a.active { background:#10291e; color:#4ade98; border-color:#255d41; }
.dashboard-sidebar .tabs button:hover,.dashboard-sidebar .tabs a:hover { background:#15231c; }
.dashboard-body .btn-primary { background:#01762a; border-color:#07883c; color:#fff; }
.dashboard-body .btn-primary:hover { background:#07883c; }
.dashboard-body .subtabs button.active { background:#112a1f; border-color:#2c6648; color:#62dda0; }
.dashboard-body .stat { border-top:1px solid #2b4036; min-height:150px; }
.dashboard-body .stat .value { font-size:30px; font-weight:500; }
.dashboard-body .card { background:#121a1e; box-shadow:none; }
.page-heading { padding-bottom:10px; }
.page-heading h1 { font-size:30px; font-weight:500; }
.dashboard-topbar { background:#0b1115; }
.dashboard-body .cal-cell.today,.month-content .v-cell.today { background:#13281d; border-color:#32835a; }
.dashboard-content { gap:28px; }
.clover-login { display:block; padding:0; background:var(--bg); color:var(--text); font-size:15px; line-height:1.6; }
.login-layout { min-height:100svh; display:grid; grid-template-columns:1fr 1fr; max-width:1600px; margin:0 auto; padding:44px 6vw; }
.login-pitch { display:flex; flex-direction:column; justify-content:center; padding:40px 6vw 70px 0; }
.login-brand { display:flex; gap:16px; align-items:center; font-size:24px; font-weight:600; margin-bottom:80px; }
.login-pitch h1 { font-size:clamp(38px,4.5vw,66px); font-weight:600; line-height:1.16; letter-spacing:-2px; margin:0 0 34px; }
.login-pitch h1 span { color:#00b967; }
.login-rule { width:58px; height:4px; background:#00b967; }
.login-pitch ul { list-style:none; padding:0; margin:48px 0 0; display:grid; gap:22px; color:#bac4ca; font-size:20px; }
.login-pitch li { padding-left:20px; border-left:1px solid #52606a; }
.login-access { display:flex; flex-direction:column; justify-content:center; border-left:1px solid var(--border); padding:70px 0 0 6vw; position:relative; }
.login-access-inner { width:100%; max-width:510px; margin:0 auto; padding-bottom:100px; }
.login-eyebrow { font-size:11px; letter-spacing:.25em; font-weight:500; color:#b5c0c8; margin:0 0 26px; }
.login-access h2 { font-size:clamp(30px,3.4vw,48px); font-weight:600; letter-spacing:-1px; margin:36px 0 44px; line-height:1.2; }
.clover-login label { color:#bdc7ce; font-size:14px; margin-bottom:12px; }
.password-control { position:relative; }
.clover-login #password { min-height:60px; padding:14px 54px 14px 16px; border:1px solid #4b5a65; background:#111a20; font-size:16px; border-radius:7px; }
#show-password { position:absolute; right:8px; top:8px; width:44px; height:44px; display:grid; place-items:center; border:0; background:transparent; cursor:pointer; border-radius:5px; }
#show-password:focus-visible { outline:2px solid var(--primary); }
.clover-login .btn-primary { background:#01762a; border-color:#01762a; color:#fff; min-height:58px; margin-top:26px; font-weight:600; font-size:15px; justify-content:center; border-radius:7px; }
.clover-login .btn-primary:hover { background:#078b39; }
.clover-login input:focus { outline:2px solid #00b967; outline-offset:3px; }
.login-session { color:#96a3ad; font-size:13px; margin:24px 0 0; }
.login-footer { position:absolute; bottom:2px; left:6vw; right:0; border-top:1px solid var(--border); padding:24px 0 4px; font-size:11px; color:#8f9ca6; text-align:center; }
.login-footer span { padding:0 12px; }
.clover-login .error { font-size:13px; margin-top:20px; }
.clover-login .btn-discord { justify-content:center; padding:14px; font-size:14px; }
@media(max-width:900px) { .login-layout { padding:32px; } .login-pitch { padding-right:32px; } .login-access { padding-left:32px; } .login-brand { font-size:20px; } .login-footer { left:32px; } }
@media(max-width:760px) { .login-layout { grid-template-columns:1fr; padding:28px 24px; min-height:100svh; max-width:560px; } .login-pitch { padding:0; } .login-brand { margin-bottom:36px; font-size:19px; gap:12px; } .login-brand img { width:34px; height:34px; } .login-pitch h1 { font-size:38px; letter-spacing:-1px; margin-bottom:24px; } .login-pitch .login-rule,.login-pitch ul { display:none; } .login-access { border-left:0; border-top:1px solid var(--border); padding:28px 0 0; margin-top:8px; } .login-access-inner { padding-bottom:34px; } .login-eyebrow { font-size:10px; margin-bottom:16px; } .login-access .login-rule { width:38px; height:3px; } .login-access h2 { font-size:29px; margin:22px 0 30px; } .login-footer { position:static; padding:18px 0 0; font-size:10px; } .login-session { font-size:12px; } .page-heading h1 { font-size:25px; } }

.todo-task-row { gap:14px; }
.todo-select-label { padding:8px 12px; margin:0; border:1px dashed var(--border); border-radius:6px; color:var(--muted); font-size:11px; }
.todo-select-label input { accent-color:#01762a; }
.todo-state { min-width:100px; justify-content:center; font-weight:500; }
.todo-state.is-done { border-color:#285d40; background:#10291e; color:#66dda0; }
#todo-load-status { min-height:20px; margin:0 0 14px; }
