:root {
  --accent: #0f766e; --accent-ink: #fff; --accent-soft: #ccfbf1;
  --bg: #f4f5f7; --panel: #fff; --panel-2: #f8fafc; --line: #e5e7eb; --line-2: #d1d5db;
  --ink: #0f172a; --ink-2: #334155; --mut: #64748b;
  --in: #fff; --out: #d9fdd3; --note: #fef9c3; --danger: #dc2626; --ok: #16a34a; --warn: #d97706;
  --shadow: 0 1px 2px rgba(15,23,42,.06);
  --r: 10px; --avatar: #e3e8e7;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0f14; --panel: #121820; --panel-2: #0f141b; --line: #1f2933; --line-2: #2b3744;
    --ink: #e6edf3; --ink-2: #c4cdd6; --mut: #8b98a5; --accent-soft: #123b37;
    --avatar: #24303b; --in: #1b232d; --out: #0f3d33; --note: #3a3413; --shadow: 0 1px 2px rgba(0,0,0,.4);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font: 14px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif; background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
.boot { display: grid; place-items: center; height: 100vh; color: var(--mut); }
.hidden { display: none !important; }
.mut { color: var(--mut); } .small { font-size: 12px; } .right { text-align: right; } .nowrap { white-space: nowrap; }
.row { display: flex; gap: 8px; align-items: center; } .grow { flex: 1; min-width: 0; } .wrap { flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 10px; }

/* botões e campos */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--panel); cursor: pointer; font-weight: 500; white-space: nowrap; }
.btn:hover { background: var(--panel-2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--danger); }
.btn.sm { padding: 5px 10px; font-size: 13px; }
.btn.icon { padding: 6px 8px; }
.btn:disabled { opacity: .55; cursor: default; }
.link { background: none; border: 0; color: var(--accent); cursor: pointer; padding: 0; font-weight: 500; }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=tel], input[type=number], input[type=date], select, textarea {
  width: 100%; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--panel); outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
textarea { resize: vertical; }
label.f { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--mut); font-weight: 500; }
label.f > input, label.f > select, label.f > textarea { font-size: 14px; color: var(--ink); font-weight: 400; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
input[type=color] { width: 36px; height: 32px; padding: 0; border: 1px solid var(--line-2); border-radius: 6px; background: none; cursor: pointer; }

/* layout */
.shell { display: grid; grid-template-columns: 68px 1fr; height: 100vh; height: 100dvh; }
.rail { background: #0b3b37; display: flex; flex-direction: column; align-items: center; padding: 12px 0; gap: 4px; }
.rail .logo { width: 38px; height: 38px; margin-bottom: 14px; }
.rail button { width: 52px; height: 52px; border: 0; border-radius: 12px; background: transparent; color: #99d5cd; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 10px; position: relative; }
.rail button svg { width: 22px; height: 22px; }
.rail button:hover { background: rgba(255,255,255,.07); color: #fff; }
.rail button.on { background: rgba(255,255,255,.14); color: #fff; }
.rail .badge { position: absolute; top: 4px; right: 6px; background: #e2e8f0; color: #0b3b37 !important; color: #fff; border-radius: 9px; font-size: 10px; min-width: 18px; height: 18px; display: grid; place-items: center; padding: 0 5px; font-weight: 700; }
.rail .spacer { flex: 1; }
.rail .me { width: 34px; height: 34px; border-radius: 50%; color: #fff; font-weight: 700; display: grid; place-items: center; font-size: 13px; }
.main { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 10px; padding: 14px 20px; border-bottom: 1px solid var(--line); background: var(--panel); }
.topbar h1 { font-size: 18px; margin: 0; font-weight: 650; }
.content { flex: 1; min-height: 0; overflow: auto; padding: 20px; }

/* conversas */
.inbox { display: grid; grid-template-columns: 340px 1fr 320px; height: 100%; min-height: 0; }
.inbox.no-side { grid-template-columns: 340px 1fr; }
.clist { border-right: 1px solid var(--line); background: var(--panel); display: flex; flex-direction: column; min-height: 0; }
.clist .head { padding: 12px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.tabs { display: flex; gap: 4px; background: var(--panel-2); border: 1px solid var(--line); padding: 3px; border-radius: 9px; }
.tabs button { flex: 1; white-space: nowrap; border: 0; background: none; padding: 5px 6px; border-radius: 7px; cursor: pointer; color: var(--mut); font-weight: 500; font-size: 13px; }
.tabs button.on { background: var(--panel); color: var(--ink); box-shadow: var(--shadow); }
.clist .items { overflow: auto; flex: 1; }
.citem { display: flex; gap: 10px; padding: 11px 12px; border-bottom: 1px solid var(--line); cursor: pointer; align-items: flex-start; }
.citem:hover { background: var(--panel-2); }
.citem.on { background: var(--accent-soft); }
.avatar { width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 600; color: var(--ink-2); font-size: 14px; }
.avatar.lg { width: 56px; height: 56px; font-size: 20px; }
.citem .name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.citem .prev { color: var(--mut); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.citem .time { font-size: 11px; color: var(--mut); white-space: nowrap; }
.unread { background: var(--accent); color: var(--accent-ink); border-radius: 10px; font-size: 11px; font-weight: 700; min-width: 20px; height: 20px; display: inline-grid; place-items: center; padding: 0 6px; }
.chips { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--mut); white-space: nowrap; }
.chips .chip + .chip::before { content: '·'; margin-right: 1px; color: var(--line-2); }
.chip.sel { cursor: pointer; border: 1px solid var(--line-2); background: var(--panel); color: var(--ink-2); padding: 2px 9px; border-radius: 6px; }
.chip.sel.on { background: var(--ink); border-color: var(--ink); color: var(--panel); }
.chips .chip.sel + .chip.sel::before { content: none; }
.stage-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }

.chat { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--panel-2); }
.chat .head { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--panel); border-bottom: 1px solid var(--line); }
.chat .msgs { flex: 1; overflow: auto; padding: 16px 6%; display: flex; flex-direction: column; gap: 4px;
  background-image: radial-gradient(color-mix(in srgb, var(--mut) 12%, transparent) 1px, transparent 1px); background-size: 18px 18px; }
.bubble { max-width: min(560px, 78%); padding: 7px 10px 5px; border-radius: 10px; box-shadow: 0 1px 1px rgba(0,0,0,.06); white-space: pre-wrap; word-wrap: break-word; position: relative; }
.bubble.in { background: var(--in); align-self: flex-start; border-top-left-radius: 3px; }
.bubble.out { background: var(--out); align-self: flex-end; border-top-right-radius: 3px; }
.bubble.note { background: var(--note); align-self: flex-end; border: 1px dashed color-mix(in srgb, var(--warn) 60%, transparent); }
.bubble .meta { font-size: 10.5px; color: var(--mut); text-align: right; margin-top: 2px; display: flex; gap: 6px; justify-content: flex-end; align-items: center; }
.bubble .media { font-size: 12px; color: var(--mut); font-style: italic; }
.bubble .who { font-size: 11px; font-weight: 600; color: var(--warn); margin-bottom: 2px; }
.sysmsg { align-self: center; font-size: 12px; color: var(--mut); background: var(--panel); border: 1px solid var(--line); padding: 3px 10px; border-radius: 999px; margin: 6px 0; text-align: center; max-width: 90%; }
.daysep { align-self: center; font-size: 11.5px; font-weight: 600; color: var(--mut); background: var(--panel); padding: 3px 12px; border-radius: 8px; margin: 10px 0 4px; box-shadow: var(--shadow); }
.ticks { color: var(--mut); } .ticks.read { color: #0ea5e9; }
.composer { padding: 10px 14px; background: var(--panel); border-top: 1px solid var(--line); position: relative; }
.composer .mode { display: flex; gap: 4px; margin-bottom: 8px; }
.composer .mode button { border: 0; background: none; padding: 3px 10px; border-radius: 6px; font-size: 12.5px; font-weight: 600; color: var(--mut); cursor: pointer; }
.composer .mode button.on { background: var(--accent-soft); color: var(--accent); }
.composer .mode button.on.note { background: var(--note); color: var(--warn); }
.composer textarea { min-height: 42px; max-height: 180px; resize: none; }
.composer.is-note textarea { background: var(--note); }
.qr-pop { position: absolute; bottom: 100%; left: 14px; right: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); max-height: 240px; overflow: auto; }
.qr-pop div { padding: 8px 12px; cursor: pointer; border-bottom: 1px solid var(--line); }
.qr-pop div.on, .qr-pop div:hover { background: var(--accent-soft); }
.empty { display: grid; place-items: center; height: 100%; color: var(--mut); text-align: center; padding: 30px; }
.empty svg { width: 54px; height: 54px; opacity: .4; margin-bottom: 10px; }

.side { border-left: 1px solid var(--line); background: var(--panel); overflow: auto; padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.side h3 { font-size: 13px; font-weight: 600; color: var(--ink-2); margin: 0 0 6px; }
.side .card { border: 1px solid var(--line); border-radius: var(--r); padding: 12px; }
.qmini { display: flex; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.qmini:last-child { border-bottom: 0; }

/* status */
.st { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.st::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--mut); }
.st.draft::before { background: var(--line-2); } .st.sent::before { background: var(--mut); }
.st.viewed::before { background: var(--ink-2); } .st.approved::before { background: var(--ok); } .st.rejected::before { background: var(--danger); }

/* funil */
.board { display: flex; gap: 12px; height: 100%; overflow-x: auto; padding-bottom: 6px; align-items: flex-start; }
.lane { width: 280px; flex: none; background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; display: flex; flex-direction: column; max-height: 100%; }
.lane .lh { padding: 10px 12px; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); }
.lane .lh b { flex: 1; }
.lane .lc { padding: 8px; display: flex; flex-direction: column; gap: 8px; overflow: auto; min-height: 60px; flex: 1; }
.lane.drop { outline: 2px dashed var(--accent); outline-offset: -2px; }
.deal { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px; cursor: grab; box-shadow: var(--shadow); }
.deal:active { cursor: grabbing; }
.deal.dragging { opacity: .4; }
.deal .t { font-weight: 600; }
.deal .v { font-weight: 650; color: var(--accent); font-size: 13px; }

/* tabelas */
.card-p { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
table.t { width: 100%; border-collapse: collapse; }
table.t th { text-align: left; font-size: 12.5px; color: var(--mut); padding: 10px 12px; border-bottom: 1px solid var(--line); font-weight: 600; background: var(--panel-2); position: sticky; top: 0; }
table.t td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr.click { cursor: pointer; } table.t tr.click:hover td { background: var(--panel-2); }
.toolbar { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar input[type=search] { max-width: 280px; }
.toolbar select { width: auto; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.stat .k { font-size: 12px; color: var(--mut); font-weight: 500; } .stat .v { font-size: 22px; font-weight: 700; margin-top: 2px; }

/* editor de orçamento */
.items-ed { width: 100%; border-collapse: collapse; }
.items-ed th { font-size: 11.5px; color: var(--mut); text-align: left; font-weight: 600; padding: 6px 4px; border-bottom: 1px solid var(--line); }
.items-ed td { padding: 6px 4px; vertical-align: top; border-bottom: 1px solid var(--line); }
.items-ed td input, .items-ed td textarea { padding: 6px 8px; }
.items-ed .desc { margin-top: 4px; font-size: 12.5px; }
.totbox { margin-left: auto; width: 300px; display: flex; flex-direction: column; gap: 6px; }
.totbox .r { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.totbox .grand { font-size: 18px; font-weight: 700; border-top: 1px solid var(--line); padding-top: 8px; color: var(--accent); }

/* ajustes */
.settings { display: grid; grid-template-columns: 200px 1fr; gap: 20px; max-width: 1100px; }
.snav { display: flex; flex-direction: column; gap: 2px; }
.snav button { text-align: left; padding: 8px 12px; border: 0; background: none; border-radius: 8px; cursor: pointer; color: var(--ink-2); font-weight: 500; }
.snav button.on { background: var(--panel); color: var(--accent); box-shadow: var(--shadow); }
.spanel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.spanel h2 { margin: 0; font-size: 16px; }
.listed { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 10px; }
.listed > div { display: flex; gap: 8px; align-items: center; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.listed > div:last-child { border-bottom: 0; }
.drag-h { cursor: grab; color: var(--mut); user-select: none; }
.qrbox { display: grid; place-items: center; padding: 16px; border: 1px dashed var(--line-2); border-radius: 12px; }
.qrbox img { width: 240px; height: 240px; background: #fff; border-radius: 8px; }

/* modal e toast */
.overlay { position: fixed; inset: 0; background: rgba(15,23,42,.45); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal { background: var(--panel); border-radius: 14px; box-shadow: 0 8px 24px rgba(15,23,42,.12); width: min(520px, 100%); max-height: calc(100dvh - 32px); display: flex; flex-direction: column; }
.modal.wide { width: min(980px, 100%); }
.modal .mh { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.modal .mh h2 { margin: 0; font-size: 17px; flex: 1; }
.modal .mb { padding: 18px 20px; overflow: auto; display: flex; flex-direction: column; gap: 12px; }
.modal .mf { padding: 12px 20px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
#toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
#toast div { background: #0f172a; color: #fff; padding: 10px 16px; border-radius: 9px; box-shadow: var(--shadow); font-weight: 500; animation: tin .2s ease; }
#toast div.err { background: var(--danger); }
@keyframes tin { from { opacity: 0; transform: translateY(8px); } }

/* login */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: var(--bg); }
.auth form { background: var(--panel); border-radius: 16px; padding: 28px; width: min(400px, 100%); display: flex; flex-direction: column; gap: 12px; border: 1px solid var(--line); }
.auth h1 { margin: 0 0 4px; font-size: 22px; display: flex; gap: 10px; align-items: center; }
.auth h1 img { width: 34px; }
.auth .err { color: var(--danger); font-size: 13px; min-height: 1em; }

.dry { background: #fef3c7; color: #92400e; font-size: 12.5px; padding: 6px 12px; border-radius: 8px; }
.back-btn { display: none; }

@media (max-width: 1180px) { .inbox { grid-template-columns: 300px 1fr; } .inbox .side { display: none; } .inbox.show-side .side { display: flex; position: fixed; right: 0; top: 0; bottom: 0; width: 340px; z-index: 30; box-shadow: var(--shadow); } }
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
  .rail { flex-direction: row; justify-content: space-around; padding: 4px 6px calc(4px + env(safe-area-inset-bottom)); order: 2; }
  .rail .logo, .rail .spacer, .rail .me { display: none; }
  .rail button { height: 48px; }
  .inbox, .inbox.no-side { grid-template-columns: 1fr; }
  .inbox.has-chat .clist { display: none; } .inbox:not(.has-chat) .chat { display: none; }
  .back-btn { display: inline-flex; }
  .inbox.show-side .side { width: 100%; }
  .content { padding: 12px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .settings { grid-template-columns: 1fr; } .snav { flex-direction: row; overflow-x: auto; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .hide-m { display: none; }
  .totbox { width: 100%; }
  .chat .msgs { padding: 12px; }
}

/* relatórios */
.rstats { grid-template-columns: repeat(4, 1fr); }
.stat .dl { color: var(--ink-2); }
.rgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.rgrid.three { grid-template-columns: repeat(3, 1fr); }
.rchart { padding: 14px 16px; }
.rchart h3, .report h3 { font-size: 13px; margin: 0 0 10px; font-weight: 650; color: var(--ink-2); }
.cols-wrap { display: flex; gap: 8px; height: 170px; margin-top: 6px; }
.yax { position: relative; width: 26px; flex: none; }
.yax span { position: absolute; right: 0; transform: translateY(50%); font-size: 10.5px; color: var(--mut); }
.cols { position: relative; flex: 1; display: flex; align-items: flex-end; gap: 2px; border-bottom: 1px solid var(--line-2); }
.cols .gl { position: absolute; left: 0; right: 0; height: 1px; background: var(--line); pointer-events: none; }
.cb { flex: 1; height: 100%; display: flex; align-items: flex-end; justify-content: center; position: relative; outline: none; cursor: default; }
.cb b { display: block; width: 100%; max-width: 24px; background: var(--accent); border-radius: 4px 4px 0 0; min-height: 0; }
.cb:hover b, .cb:focus b { filter: brightness(1.2); }
.cb:hover::before, .cb:focus::before { content: ''; position: absolute; inset: 0; background: color-mix(in srgb, var(--accent) 8%, transparent); border-radius: 4px; }
.xax { display: flex; gap: 2px; margin-left: 34px; margin-top: 4px; }
.xax span { flex: 1; font-size: 10px; color: var(--mut); text-align: center; white-space: nowrap; overflow: visible; }
.hb { margin-bottom: 10px; } .hb:last-child { margin-bottom: 0; }
.hbt { height: 8px; background: var(--panel-2); border-radius: 4px; margin-top: 4px; overflow: hidden; }
.hbt b { display: block; height: 100%; background: var(--accent); border-radius: 0 4px 4px 0; }
#ctip { position: absolute; display: none; z-index: 70; background: #0f172a; color: #fff; font-size: 12px; font-weight: 500; padding: 5px 9px; border-radius: 6px; pointer-events: none; white-space: nowrap; }
@media (max-width: 1000px) { .rgrid, .rgrid.three { grid-template-columns: 1fr; } .rstats { grid-template-columns: 1fr 1fr; } }
@media print {
  .rail, .topbar .btn, .topbar .tabs, #rnav, #rcustom { display: none !important; }
  .shell { display: block; height: auto; } .content { overflow: visible; } body { background: #fff; }
  .card-p, .stat { break-inside: avoid; }
}
@media (max-width: 760px) {
  .topbar { flex-wrap: wrap; padding: 10px 12px; }
  .topbar .tabs { order: 3; width: 100% !important; }
  .rail button { width: auto; flex: 1; font-size: 9.5px; }
}

.avatar { position: relative; overflow: hidden; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* casca com aviso de confirmação */
.mainwrap { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.mainwrap .main { flex: 1; }
.vbar { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; padding: 9px 20px; background: #fef9c3; color: #713f12; font-size: 13.5px; border-bottom: 1px solid #fde68a; }
.vbar span { flex: 1; min-width: 200px; }
.auth form { position: relative; }
.auth-brand { display: flex; gap: 10px; align-items: center; font-size: 20px; font-weight: 700; color: var(--ink); text-decoration: none; margin-bottom: 4px; }
.auth-brand img { width: 30px; }
.mainwrap { height: 100%; overflow: hidden; }
.mainwrap .main { min-height: 0; }
.main > .inbox { flex: 1; min-height: 0; height: auto; }

/* agenda */
.agenda .wk { overflow: hidden; }
.wk-head { display: grid; grid-template-columns: 54px repeat(7, 1fr); border-bottom: 1px solid var(--line); }
.wk-head > div { padding: 8px 6px; font-size: 13px; color: var(--mut); text-align: center; }
.wk-head > div b { color: var(--ink); font-size: 16px; font-weight: 650; }
.wk-head > div.today b { color: var(--accent); }
.wk-scroll { height: calc(100dvh - 230px); min-height: 360px; overflow: auto; }
.wk-grid { position: relative; display: grid; grid-template-columns: 54px repeat(7, 1fr); }
.wk-hours { position: relative; }
.wk-hours span { position: absolute; right: 8px; transform: translateY(-50%); font-size: 11px; color: var(--mut); }
.wk-hours span:first-child { transform: none; }
.wk-col { position: relative; border-left: 1px solid var(--line); cursor: copy;
  background-image: linear-gradient(var(--line) 1px, transparent 1px); background-size: 100% 48px; }
.wk-col.today { background-color: color-mix(in srgb, var(--accent) 4%, transparent); }
.nowline { position: absolute; left: 0; right: 0; height: 2px; background: var(--danger); pointer-events: none; }
.ev { position: absolute; background: var(--panel); border: 1px solid var(--line-2); border-left: 3px solid var(--accent); border-radius: 5px; padding: 3px 6px; font-size: 12px; line-height: 1.3; overflow: hidden; cursor: pointer; color: var(--ink); }
.ev b { font-weight: 650; }
.ev:hover { border-color: var(--accent); }
.st-done { opacity: .6; } .st-canceled, .st-no_show { opacity: .5; text-decoration: line-through; }
.ev.st-canceled, .ev.st-no_show { border-left-color: var(--mut); }
.mo-head { display: grid; grid-template-columns: repeat(7, 1fr); border-bottom: 1px solid var(--line); }
.mo-head div { padding: 8px; font-size: 12.5px; color: var(--mut); text-align: center; }
.mo-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.mo-cell { min-height: 108px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 4px 5px; cursor: copy; overflow: hidden; }
.mo-cell:nth-child(7n) { border-right: 0; }
.mo-cell.out { background: var(--panel-2); color: var(--mut); }
.mo-day { font-size: 12.5px; font-weight: 600; margin-bottom: 3px; }
.mo-cell.today .mo-day { color: var(--accent); }
.mo-ev { font-size: 11.5px; padding: 1px 4px; border-left: 2px solid var(--accent); margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; border-radius: 2px; }
.mo-ev:hover { background: var(--panel-2); }
.mo-more { font-size: 11px; color: var(--mut); padding-left: 4px; }
.ag-day h3 { font-size: 14px; margin: 18px 0 8px; font-weight: 650; }
.ag-day:first-child h3 { margin-top: 0; }
.ag-row { display: flex; gap: 14px; align-items: center; padding: 11px 14px; border-bottom: 1px solid var(--line); cursor: pointer; }
.ag-row:last-child { border-bottom: 0; }
.ag-row:hover { background: var(--panel-2); }
.ag-time { width: 96px; flex: none; font-weight: 600; font-size: 13.5px; }
.ag-t { font-weight: 600; }
@media (max-width: 760px) {
  .wk-head, .wk-grid { grid-template-columns: 36px repeat(7, minmax(44px, 1fr)); }
  .wk { overflow-x: auto; } .wk-head > div span { display: none; }
  .ev { font-size: 10.5px; padding: 2px 3px; } .ev b { display: none; }
  .mo-cell { min-height: 64px; } .mo-ev { font-size: 10px; } .mo-ev b { display: none; }
  .ag-time { width: 74px; }
}
