:root {
  --navy: #1f3864;
  --blue: #2e75b6;
  --blue-600: #2563a8;
  --green: #27ae60;
  --red: #e74c3c;
  --orange: #e67e22;
  --purple: #8e44ad;
  --gray: #95a5a6;
  --ink: #1c2433;
  --muted: #6b7787;
  --line: #e6eaf0;
  --bg: #f4f6fa;
  --card: #ffffff;
  --shadow: 0 1px 3px rgba(16,32,64,.06), 0 6px 24px rgba(16,32,64,.06);
  --radius: 14px;
  --sidebar: 248px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  background: var(--bg); color: var(--ink);
  font-size: 14px; -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
h1,h2,h3,h4 { margin: 0; font-weight: 700; letter-spacing: -.01em; }
.hidden { display: none !important; }

/* ============ LOGIN ============ */
.login-wrap {
  min-height: 100vh; display: grid; place-items: center;
  background: radial-gradient(1200px 600px at 70% -10%, #2e75b633, transparent),
              linear-gradient(135deg, #16294a, #1f3864 60%, #24467e);
  padding: 20px;
}
.login-card {
  width: 100%; max-width: 400px; background: #fff; border-radius: 18px;
  padding: 36px 32px; box-shadow: 0 24px 60px rgba(0,0,0,.35);
}
.login-card img.logo { height: 46px; display: block; margin: 0 auto 6px; }
.login-card .sub { text-align: center; color: var(--muted); margin-bottom: 26px; font-size: 13px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px;
  font-size: 14px; outline: none; background: #fff; transition: border .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--blue); box-shadow: 0 0 0 3px #2e75b622;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 11px 16px; border: none; border-radius: 10px; font-weight: 600; font-size: 14px;
  background: var(--blue); color: #fff; transition: filter .15s, transform .05s;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(1px); }
.btn.block { width: 100%; }
.btn.ghost { background: #eef2f7; color: var(--navy); }
.btn.ghost:hover { background: #e2e8f1; }
.btn.green { background: var(--green); }
.btn.red { background: var(--red); }
.btn.sm { padding: 7px 11px; font-size: 12.5px; border-radius: 8px; }
.btn.outline { background: #fff; border: 1px solid var(--line); color: var(--ink); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.err { color: var(--red); font-size: 12.5px; margin-top: 8px; min-height: 16px; }

/* ============ LAYOUT ============ */
.app { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar {
  background: linear-gradient(180deg, #1f3864, #182c50); color: #cdd7e6;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.sidebar .brand { padding: 20px 20px 14px; display: flex; align-items: center; gap: 10px; }
.sidebar .brand img { height: 30px; }
.nav { flex: 1; overflow-y: auto; padding: 8px 12px; }
.nav a {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px;
  color: #b9c5da; font-weight: 500; font-size: 13.5px; margin-bottom: 2px; transition: background .12s, color .12s;
}
.nav a:hover { background: #ffffff14; color: #fff; }
.nav a.active { background: var(--blue); color: #fff; box-shadow: 0 4px 12px #2e75b655; }
.nav a svg { width: 18px; height: 18px; flex: none; }
.nav .section { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: #6f80a0; padding: 14px 12px 6px; }
.sidebar .who { padding: 14px; border-top: 1px solid #ffffff14; display: flex; align-items: center; gap: 10px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.who .meta { flex: 1; min-width: 0; }
.who .meta b { display: block; font-size: 13px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who .meta span { font-size: 11px; color: #8ea0bf; text-transform: capitalize; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 60px; background: #fff; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 14px; padding: 0 24px; position: sticky; top: 0; z-index: 20;
}
.topbar .menu-btn { display: none; background: none; border: none; }
.topbar h2 { font-size: 17px; }
.topbar .spacer { flex: 1; }
.icon-btn { position: relative; background: #f1f4f9; border: none; border-radius: 10px; width: 38px; height: 38px; display: grid; place-items: center; color: var(--navy); }
.icon-btn:hover { background: #e6ebf3; }
.badge-dot { position: absolute; top: 6px; right: 7px; background: var(--red); color: #fff; font-size: 10px; font-weight: 700; min-width: 16px; height: 16px; border-radius: 8px; display: grid; place-items: center; padding: 0 4px; }
.content { padding: 22px 28px; max-width: 1640px; width: 100%; margin: 0 auto; }

/* ============ COMPONENTS ============ */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card.pad { padding: 18px 20px; }
.grid { display: grid; gap: 16px; }
.kpis { grid-template-columns: repeat(4, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 980px) { .kpis { grid-template-columns: repeat(2,1fr); } .cols-3,.cols-2 { grid-template-columns: 1fr; } }

.kpi { padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.kpi .label { font-size: 12px; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 7px; }
.kpi .value { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.kpi .delta { font-size: 12px; font-weight: 600; }
.kpi .icon { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; }
.pos { color: var(--green); } .neg { color: var(--red); }

.section-title { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; margin: 26px 0 12px; }
.row { display: flex; align-items: center; gap: 12px; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }

.progress { height: 9px; background: #eef1f6; border-radius: 6px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), var(--green)); border-radius: 6px; transition: width .5s; }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 20px; font-size: 11.5px; font-weight: 600; }
.badge.blue { background: #e8f1fb; color: var(--blue-600); }
.badge.green { background: #e6f6ec; color: #1e8a4c; }
.badge.red { background: #fdecea; color: #c0392b; }
.badge.orange { background: #fdf0e3; color: #c4670e; }
.badge.gray { background: #eef1f5; color: #5b6675; }
.badge.purple { background: #f2e9f8; color: #7d3aa8; }
.badge.navy { background: #e7ecf5; color: var(--navy); }

table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; padding: 10px 14px; border-bottom: 1px solid var(--line); }
td { padding: 12px 14px; border-bottom: 1px solid #f0f2f6; font-size: 13.5px; vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tbody tr { transition: background .1s; }
tbody tr.clickable:hover { background: #f7f9fc; cursor: pointer; }
.table-card { overflow: hidden; }
.table-head { padding: 16px 20px; display: flex; align-items: center; gap: 12px; }

.search { display: flex; align-items: center; gap: 8px; background: #f1f4f9; border-radius: 10px; padding: 8px 12px; flex: 1; max-width: 360px; }
.search input { border: none; background: none; outline: none; width: 100%; font-size: 13.5px; }
.search svg { width: 18px; height: 18px; flex: none; color: var(--muted); }

/* ranking */
.rank-list { display: flex; flex-direction: column; }
.rank-item { display: flex; align-items: center; gap: 14px; padding: 12px 6px; border-bottom: 1px solid #f0f2f6; }
.rank-item:last-child { border-bottom: none; }
.rank-pos { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-weight: 800; font-size: 13px; background: #eef1f6; color: var(--muted); flex: none; }
.rank-pos.gold { background: #fff4d6; color: #b8860b; }
.rank-pos.silver { background: #eef1f5; color: #6b7787; }
.rank-pos.bronze { background: #f6e6da; color: #a05a2c; }
.rank-meta { flex: 1; min-width: 0; }
.rank-meta b { font-size: 14px; }
.rank-meta .sub { font-size: 12px; color: var(--muted); }
.rank-score { text-align: right; }
.rank-score b { font-size: 18px; color: var(--navy); }
.rank-score span { font-size: 11px; color: var(--muted); display: block; }

/* timeline */
.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ''; position: absolute; left: 9px; top: 4px; bottom: 4px; width: 2px; background: var(--line); }
.tl-item { position: relative; padding: 0 0 18px; }
.tl-item::before { content: ''; position: absolute; left: -22px; top: 3px; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 3px solid var(--blue); }
.tl-item.green::before { border-color: var(--green); }
.tl-item.red::before { border-color: var(--red); }
.tl-item.orange::before { border-color: var(--orange); }
.tl-item.purple::before { border-color: var(--purple); }
.tl-item .tl-text { font-size: 13.5px; }
.tl-item .tl-meta { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

/* modal */
.modal-bg { position: fixed; inset: 0; background: rgba(20,32,56,.5); display: grid; place-items: center; z-index: 100; padding: 20px; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: #fff; border-radius: 16px; width: 100%; max-width: 480px; max-height: 90vh; overflow: auto; box-shadow: 0 30px 70px rgba(0,0,0,.4); }
.modal.wide { max-width: 720px; }
.modal-head { padding: 18px 22px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; background: #fff; }
.modal-head h3 { font-size: 16px; }
.modal-body { padding: 20px 22px; }
.modal-foot { padding: 16px 22px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; position: sticky; bottom: 0; background: #fff; }
.close-x { background: none; border: none; color: var(--muted); font-size: 22px; line-height: 1; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }

/* toast */
.toasts { position: fixed; bottom: 22px; right: 22px; display: flex; flex-direction: column; gap: 10px; z-index: 200; }
.toast { background: var(--navy); color: #fff; padding: 12px 16px; border-radius: 10px; font-size: 13.5px; box-shadow: 0 10px 30px rgba(0,0,0,.25); animation: slidein .2s; max-width: 320px; }
.toast.green { background: var(--green); } .toast.red { background: var(--red); }
@keyframes slidein { from { transform: translateX(40px); opacity: 0; } }

.empty { text-align: center; color: var(--muted); padding: 40px 20px; font-size: 13.5px; }
.muted { color: var(--muted); }
.chip { display: inline-block; padding: 2px 8px; background: #eef2f7; border-radius: 6px; font-size: 11px; color: #5b6675; margin: 2px 3px 2px 0; }
.tabs { display: flex; gap: 4px; background: #eef1f6; padding: 4px; border-radius: 10px; }
.tabs button { flex: 1; border: none; background: none; padding: 8px 12px; border-radius: 8px; font-weight: 600; font-size: 13px; color: var(--muted); }
.tabs button.active { background: #fff; color: var(--navy); box-shadow: var(--shadow); }
.notif-panel { position: absolute; top: 52px; right: 24px; width: 340px; background: #fff; border-radius: 14px; box-shadow: 0 20px 50px rgba(0,0,0,.2); border: 1px solid var(--line); z-index: 50; overflow: hidden; }
.notif-item { padding: 12px 16px; border-bottom: 1px solid #f0f2f6; font-size: 13px; }
.notif-item.unread { background: #f0f7ff; }

/* tareas de hoy compactas */
.tasks-grid { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 980px) { .tasks-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .tasks-grid { grid-template-columns: 1fr; } }
.task-card { padding: 13px 15px; transition: background .2s; }
.task-card select { padding: 8px 10px; font-size: 13px; border: 1px solid var(--line); border-radius: 9px; width: 100%; outline: none; }
.task-card.done-green { background: #f0faf3; box-shadow: inset 0 0 0 1px #bfe6cd; }
.task-card.done-red { background: #fdf4f2; box-shadow: inset 0 0 0 1px #f0cdc7; }
.done-label { margin-top: 9px; font-size: 13px; font-weight: 700; padding: 7px 10px; border-radius: 9px; text-align: center; }
.done-label.green { background: #d8f3e1; color: #1e8a4c; }
.done-label.red { background: #fbe2de; color: #c0392b; }

/* cajas de dashboard de igual altura (avisos / actividad) */
.dash-box { height: 360px; display: flex; flex-direction: column; }
.dash-box .box-body { flex: 1; overflow: hidden; margin-top: 4px; }

/* ===== DASHBOARD - centro de control ===== */
.dash-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; align-items: start; }
.dash-grid > .sp3 { grid-column: span 3; }
.dash-grid > .sp4 { grid-column: span 4; }
.dash-grid > .sp5 { grid-column: span 5; }
.dash-grid > .sp7 { grid-column: span 7; }
.dash-grid > .sp12 { grid-column: span 12; }
@media (max-width: 1280px) { .dash-grid > .sp3 { grid-column: span 6; } .dash-grid > .sp5, .dash-grid > .sp7, .dash-grid > .sp4 { grid-column: span 12; } }
@media (max-width: 640px) { .dash-grid > * { grid-column: span 12 !important; } }

.card-title { font-size: 14.5px; font-weight: 700; }
.box-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.link-sm { font-size: 12px; color: var(--blue); }
.tl-item::before { border-color: var(--c, var(--blue)) !important; }

/* KPIs */
.kpi-mini { padding: 14px 16px; }
.kpi-label { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.kpi-icon { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.kpi-icon svg { width: 17px; height: 17px; }
.kpi-value { font-size: 25px; font-weight: 800; letter-spacing: -.02em; margin-top: 7px; display: flex; align-items: baseline; gap: 7px; }
.kpi-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; min-height: 14px; }
.kdelta { font-size: 12px; font-weight: 700; }
.kdelta.pos { color: var(--green); } .kdelta.neg { color: var(--red); }

/* Objetivo hero */
.obj-hero { background: linear-gradient(135deg, #ffffff, #f3f8ff); }
.obj-body { display: flex; align-items: center; gap: 22px; }
.obj-pct { font-size: 52px; font-weight: 800; color: var(--navy); line-height: 1; letter-spacing: -.03em; flex: none; }
.obj-pct small { font-size: 22px; color: var(--muted); font-weight: 700; }
.obj-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px 18px; flex: 1; }
.obj-stats > div { display: flex; flex-direction: column; }
.obj-stats b { font-size: 16px; }
.obj-stats span { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.progress.big { height: 12px; }

/* Avisos */
.aviso-row { display: flex; gap: 10px; padding: 10px 6px; border-bottom: 1px solid #f0f2f6; cursor: pointer; border-radius: 8px; }
.aviso-row:last-child { border-bottom: none; }
.aviso-row:hover { background: #f7f9fc; }
.aviso-row.unread { background: #f0f7ff; }
.prio-dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 5px; flex: none; background: var(--blue); }
.prio-dot.alta { background: var(--red); } .prio-dot.baja { background: var(--gray); }
.aviso-main { min-width: 0; flex: 1; }
.aviso-title { font-size: 13.5px; font-weight: 600; }
.aviso-prev { font-size: 12.5px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 2px 0; }
.aviso-meta { font-size: 11px; color: var(--gray); }

/* Actividad timeline */
.act-row { display: flex; align-items: flex-start; gap: 9px; padding: 8px 2px; }
.act-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; flex: none; }
.mini-avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; font-size: 10px; font-weight: 700; flex: none; }
.mini-avatar.lg { width: 34px; height: 34px; font-size: 12px; }
.act-main { min-width: 0; flex: 1; }
.act-text { font-size: 13px; line-height: 1.35; }
.act-time { font-size: 11px; color: var(--gray); margin-top: 1px; }

/* Ranking productividad */
.rank-row { display: flex; align-items: center; gap: 11px; padding: 10px 8px; border-radius: 10px; }
.rank-row + .rank-row { border-top: 1px solid #f0f2f6; }
.rank-row.first { background: linear-gradient(90deg, #fff8e6, #fffdf8); box-shadow: inset 0 0 0 1px #f0d98a; }
.rank-row.mine { background: #f0f7ff; }
.rank-info { flex: 1; min-width: 0; }
.rank-pts { font-size: 13px; font-weight: 800; color: var(--navy); }
.rank-sub { font-size: 11.5px; color: var(--muted); margin-top: 4px; }

/* Grafico */
.chart-line { stroke-dasharray: 1500; stroke-dashoffset: 1500; animation: chartdraw 1s ease forwards; }
@keyframes chartdraw { to { stroke-dashoffset: 0; } }
.chart-dot { cursor: pointer; transition: r .12s; }
.chart-dot:hover { r: 5.5; }

/* nav notification dot */
.nav a { position: relative; }
.nav-dot { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); min-width: 8px; height: 8px; border-radius: 8px; background: var(--red); box-shadow: 0 0 0 3px #ffffff10; }
.nav-dot.count { min-width: 18px; height: 18px; font-size: 10px; font-weight: 700; color: #fff; display: grid; place-items: center; padding: 0 4px; }

/* topbar global search */
.topsearch { position: relative; width: 300px; max-width: 40vw; }
.topsearch .search { max-width: none; }
.search-results { position: absolute; top: 44px; left: 0; right: 0; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); z-index: 40; overflow: hidden; }
.search-results a { display: block; padding: 10px 14px; border-bottom: 1px solid #f0f2f6; color: var(--ink); font-size: 13.5px; }
.search-results a:hover { background: #f7f9fc; }
.search-results a:last-child { border-bottom: none; }
@media (max-width: 700px) { .topsearch { width: 150px; } }

/* avisos */
.aviso { border-left: 4px solid var(--blue); background: #f7f9fc; border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; }
.aviso.alta { border-left-color: var(--red); background: #fdf3f2; }
.aviso.baja { border-left-color: var(--gray); }
.aviso .at { font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.aviso .ab { font-size: 13px; color: #45505f; margin-top: 4px; white-space: pre-wrap; }
.aviso.unread { box-shadow: inset 3px 0 0 var(--blue); }

/* commission lines */
.com-line { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid #f0f2f6; }
.com-line:last-child { border-bottom: none; }
.com-line b { font-size: 15px; }
.com-amt { font-size: 16px; font-weight: 800; color: var(--navy); }

/* bulk action bar */
.bulkbar { display: flex; align-items: center; gap: 10px; background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.bulkbar select { padding: 7px 10px; border-radius: 8px; border: none; }
.bulkbar .sp { flex: 1; }
td .chk, th .chk { width: 16px; height: 16px; cursor: pointer; }

/* mini chart */
.chart-wrap { width: 100%; overflow-x: auto; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; margin-top: 8px; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

/* print / PDF */
@media print {
  .sidebar, .topbar, .toasts, #modal-root, .no-print { display: none !important; }
  .app { display: block; }
  .content { padding: 0; max-width: none; }
  body { background: #fff; }
  .print-only { display: block !important; }
}
.print-only { display: none; }

/* responsive sidebar */
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; z-index: 60; width: 260px; transform: translateX(-100%); transition: transform .2s; }
  .sidebar.open { transform: none; }
  .topbar .menu-btn { display: grid; place-items: center; width: 38px; height: 38px; background: #f1f4f9; border-radius: 10px; }
  .scrim { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 55; }
}

/* =================== CALENDARIO DE MARKETING =================== */
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.cal-head {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  padding: 4px 0;
}
.cal-cell {
  min-height: 80px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 5px;
  cursor: pointer;
  position: relative;
  background: var(--bg);
  transition: background .15s;
}
.cal-cell:hover { background: var(--hover); }
.cal-cell.empty { background: transparent; border-color: transparent; cursor: default; }
.cal-cell.today { border-color: var(--accent); background: rgba(var(--accent-rgb, 59,130,246),.06); }
.cal-cell.fecha-clave { background: #fff9e6; border-color: #f59e0b; }
.cal-day-num { font-size: 12px; font-weight: 700; color: var(--text); margin-bottom: 3px; }
.cal-event-label {
  font-size: 10px;
  background: #f59e0b;
  color: #fff;
  border-radius: 3px;
  padding: 1px 4px;
  margin-bottom: 3px;
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.cal-note {
  font-size: 10px;
  background: var(--accent);
  color: #fff;
  border-radius: 3px;
  padding: 1px 4px;
  margin-bottom: 2px;
  position: relative;
  padding-right: 16px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.cal-note-del {
  position: absolute;
  right: 3px;
  top: 0;
  cursor: pointer;
  font-weight: 700;
  font-size: 12px;
  line-height: 1.4;
  opacity: .7;
}
.cal-note-del:hover { opacity: 1; }
.cal-add-btn {
  font-size: 16px;
  color: var(--muted);
  line-height: 1;
  cursor: pointer;
  display: none;
  position: absolute;
  bottom: 4px;
  right: 6px;
}
.cal-cell:hover .cal-add-btn { display: block; }
