/* CalLink design system — 01.00.00
   Theme values come from CSS variables set per page (CalLink look or the calendar's own look). */

:root {
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .06);
  --shadow: 0 1px 3px rgba(16, 24, 40, .08), 0 4px 14px rgba(16, 24, 40, .06);
  --shadow-lg: 0 12px 40px rgba(16, 24, 40, .14);
  --c-border: color-mix(in srgb, var(--c-text) 12%, transparent);
  --c-soft: color-mix(in srgb, var(--c-primary) 9%, var(--c-surface));
  --c-soft-2: color-mix(in srgb, var(--c-text) 4%, var(--c-surface));
  --topbar-h: 60px;
  --gap: 1rem;
  --content-max: 1180px;
  --bs-primary: var(--c-primary);
  --bs-body-color: var(--c-text);
  --bs-body-bg: var(--c-bg);
  --bs-border-color: var(--c-border);
  --bs-secondary-color: var(--c-muted);
  --bs-link-color: var(--c-primary);
  --bs-link-hover-color: color-mix(in srgb, var(--c-primary) 80%, #000);
  --bs-emphasis-color: var(--c-text);
  --bs-tertiary-bg: var(--c-soft-2);
}
.width-wide { --content-max: 1480px; }
.dense { --gap: .65rem; }

html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--f-body), system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--c-bg);
  color: var(--c-text);
  font-size: 15px;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.dense body, body.dense { font-size: 14px; }
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6, .page-title, .brand-name { font-family: var(--f-head), var(--f-body), system-ui, sans-serif; letter-spacing: -.01em; }
a { color: var(--c-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
.text-muted, .form-text { color: var(--c-muted) !important; }
hr { border-color: var(--c-border); opacity: 1; }
.skip-link { position: absolute; left: 1rem; top: .5rem; z-index: 2000; background: var(--c-surface); padding: .5rem 1rem; border-radius: 8px; }
::selection { background: color-mix(in srgb, var(--c-primary) 25%, transparent); }

/* ---------- Buttons & forms ---------- */
.btn { border-radius: 10px; font-weight: 500; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; line-height: 1.25; padding: .5rem .95rem; }
.btn-sm { padding: .32rem .7rem; font-size: .85rem; border-radius: 8px; }
.btn-lg { padding: .7rem 1.3rem; }
.btn-primary { --bs-btn-bg: var(--c-primary); --bs-btn-border-color: var(--c-primary); --bs-btn-color: var(--c-primary-text); --bs-btn-hover-bg: color-mix(in srgb, var(--c-primary) 86%, #000); --bs-btn-hover-border-color: color-mix(in srgb, var(--c-primary) 86%, #000); --bs-btn-hover-color: var(--c-primary-text); --bs-btn-active-bg: color-mix(in srgb, var(--c-primary) 78%, #000); --bs-btn-active-color: var(--c-primary-text); --bs-btn-disabled-bg: var(--c-primary); --bs-btn-disabled-border-color: var(--c-primary); --bs-btn-disabled-color: var(--c-primary-text); }
.btn-outline-primary { --bs-btn-color: var(--c-primary); --bs-btn-border-color: color-mix(in srgb, var(--c-primary) 55%, transparent); --bs-btn-hover-bg: var(--c-primary); --bs-btn-hover-border-color: var(--c-primary); --bs-btn-hover-color: var(--c-primary-text); --bs-btn-active-bg: var(--c-primary); --bs-btn-active-color: var(--c-primary-text); }
.btn-outline-secondary { --bs-btn-color: var(--c-text); --bs-btn-border-color: var(--c-border); --bs-btn-hover-bg: var(--c-soft-2); --bs-btn-hover-color: var(--c-text); --bs-btn-hover-border-color: var(--c-border); --bs-btn-active-bg: var(--c-soft-2); --bs-btn-active-color: var(--c-text); }
.btn-soft { background: var(--c-soft); color: var(--c-primary); border: 0; }
.btn-soft:hover { background: color-mix(in srgb, var(--c-primary) 16%, var(--c-surface)); color: var(--c-primary); }
.btn-ghost { background: transparent; border: 0; color: var(--c-muted); padding: .35rem .5rem; }
.btn-ghost:hover { background: var(--c-soft-2); color: var(--c-text); }
.btn-edit { padding: .26rem .6rem; font-size: .8rem; }
.btn-link { text-decoration: none; }
.form-control, .form-select { border-radius: 10px; border-color: var(--c-border); background-color: var(--c-surface); color: var(--c-text); padding: .55rem .8rem; }
.form-control-sm, .form-select-sm { border-radius: 8px; padding: .35rem .6rem; }
.form-control:focus, .form-select:focus { border-color: color-mix(in srgb, var(--c-primary) 60%, transparent); box-shadow: 0 0 0 .2rem color-mix(in srgb, var(--c-primary) 18%, transparent); background-color: var(--c-surface); color: var(--c-text); }
.form-control::placeholder { color: color-mix(in srgb, var(--c-muted) 75%, transparent); }
.form-label { font-weight: 600; font-size: .85rem; margin-bottom: .3rem; color: var(--c-text); }
.form-check-input:checked { background-color: var(--c-primary); border-color: var(--c-primary); }
.form-switch .form-check-input { width: 2.4em; }
.input-group > .btn { border-radius: 0 10px 10px 0; }
.input-group > .form-control:first-child { border-radius: 10px 0 0 10px; }
fieldset.group { border: 1px solid var(--c-border); border-radius: var(--radius-sm); padding: .9rem 1rem .6rem; margin-bottom: 1rem; }
fieldset.group > legend { float: none; width: auto; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--c-muted); padding: 0 .35rem; margin: 0; }
.password-wrap { position: relative; }
.password-wrap .form-control { padding-right: 2.6rem; }
.password-eye { position: absolute; right: .4rem; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--c-muted); padding: .3rem .45rem; }

/* ---------- Top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 1030; background: var(--c-nav-bg); color: var(--c-nav-text); border-bottom: 1px solid var(--c-border); }
.topbar-inner { max-width: var(--content-max); margin: 0 auto; min-height: var(--topbar-h); display: flex; align-items: center; gap: .6rem; padding: .4rem 1rem; }
.topbar a, .topbar .brand { color: var(--c-nav-text); }
.brand { display: inline-flex; align-items: center; gap: .55rem; font-weight: 700; font-size: 1.1rem; text-decoration: none !important; min-width: 0; }
.brand-logo { height: 34px; width: auto; max-width: 160px; object-fit: contain; border-radius: 6px; }
.logo-sm .brand-logo { height: 26px; } .logo-lg .brand-logo { height: 48px; max-width: 220px; }
.brand-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 32vw; }
.icon-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px; border: 0; background: transparent; color: inherit; font-size: 1.2rem; text-decoration: none !important; }
.icon-btn:hover { background: color-mix(in srgb, var(--c-nav-text) 10%, transparent); }
.avatar-btn { border: 0; background: transparent; padding: 0; border-radius: 50%; margin-left: .2rem; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: .2rem; }
.public-nav { gap: 1rem; }
.public-nav a:not(.btn) { color: var(--c-nav-text); font-weight: 500; }
.space-switch { display: inline-flex; align-items: center; gap: .45rem; border: 1px solid color-mix(in srgb, var(--c-nav-text) 18%, transparent); background: color-mix(in srgb, var(--c-nav-text) 5%, transparent); color: var(--c-nav-text); border-radius: 999px; padding: .3rem .75rem; font-weight: 600; font-size: .88rem; max-width: 38vw; }
.space-switch:hover { background: color-mix(in srgb, var(--c-nav-text) 12%, transparent); }
.space-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.space-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.space-dot.is-personal { background: #14b8a6; } .space-dot.is-cal { background: var(--c-accent); }
.badge-dot { position: absolute; top: 8px; right: 8px; width: 9px; height: 9px; border-radius: 50%; background: #ef4444; border: 2px solid var(--c-nav-bg); }
.badge-count { position: absolute; top: 3px; right: 1px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: #ef4444; color: #fff; font-size: .68rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; border: 2px solid var(--c-nav-bg); }

/* Header layouts (10) */
.hdr-h1 .topbar { box-shadow: var(--shadow-sm); }
.hdr-h2 .topbar { background: linear-gradient(110deg, var(--c-nav-bg), color-mix(in srgb, var(--c-nav-bg) 55%, var(--c-accent))); border-bottom: 0; box-shadow: 0 6px 22px color-mix(in srgb, var(--c-nav-bg) 35%, transparent); }
.hdr-h3 .topbar { border-bottom: 2px solid var(--c-text); box-shadow: none; }
.hdr-h3 .space-switch { border-radius: 6px; }
.hdr-h4 .topbar-inner { min-height: 72px; }
.hdr-h4 .brand { font-size: 1.3rem; text-transform: uppercase; letter-spacing: .04em; font-weight: 800; }
.hdr-h4 .topbar { border-bottom: 4px solid var(--c-primary); }
.hdr-h5 .topbar-inner { display: grid; grid-template-columns: auto 1fr auto; }
.hdr-h5 .brand { justify-self: center; grid-column: 2; grid-row: 1; flex-direction: column; gap: .15rem; font-size: 1.15rem; }
.hdr-h5 .menu-btn { grid-column: 1; grid-row: 1; }
.hdr-h5 .space-switch { grid-column: 1; grid-row: 2; justify-self: start; }
.hdr-h5 .topbar-actions { grid-column: 3; grid-row: 1 / span 2; }
.hdr-h5 .brand-logo { height: 40px; }
.hdr-h6 .topbar { background: var(--c-bg); border-bottom: 0; padding-top: .5rem; }
.hdr-h6 .topbar-inner { background: var(--c-nav-bg); border-radius: 999px; box-shadow: var(--shadow); margin: 0 auto; max-width: calc(var(--content-max) - 1rem); }
.hdr-h7 .topbar { border-bottom: 0; box-shadow: 0 3px 0 var(--c-accent); }
.hdr-h7 .topbar::before { content: ''; display: block; height: 6px; background: color-mix(in srgb, var(--c-nav-bg) 70%, #000); }
.hdr-h7 .brand { font-weight: 800; }
.hdr-h8 .topbar { background: transparent; border: 0; padding: .6rem .6rem 0; }
.hdr-h8 .topbar-inner { background: var(--c-nav-bg); border-radius: 18px; box-shadow: var(--shadow-lg); border: 2px solid color-mix(in srgb, var(--c-primary) 22%, transparent); }
.hdr-h9 .topbar-inner { min-height: 70px; }
.hdr-h9 .brand { font-family: var(--f-head); font-style: italic; font-weight: 600; font-size: 1.35rem; letter-spacing: .01em; }
.hdr-h9 .topbar { border-bottom: 1px solid color-mix(in srgb, var(--c-accent) 60%, transparent); box-shadow: 0 4px 0 -3px color-mix(in srgb, var(--c-accent) 60%, transparent); }
.hdr-h9 .space-switch { border-radius: 2px; text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; }
.hdr-h10 .topbar { background: color-mix(in srgb, var(--c-nav-bg) 72%, transparent); -webkit-backdrop-filter: blur(14px) saturate(160%); backdrop-filter: blur(14px) saturate(160%); border-bottom: 1px solid color-mix(in srgb, var(--c-nav-text) 12%, transparent); }

/* Calendar section bar */
.calnav { background: var(--c-surface); border-bottom: 1px solid var(--c-border); position: sticky; top: var(--topbar-h); z-index: 1020; }
.calnav-inner { max-width: var(--content-max); margin: 0 auto; display: flex; align-items: center; justify-content: center; gap: .15rem; padding: .35rem .75rem; overflow-x: auto; scrollbar-width: none; }
.calnav-inner::-webkit-scrollbar { display: none; }
.calnav-link { display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .8rem; border-radius: 10px; color: var(--c-muted); font-weight: 600; font-size: .9rem; white-space: nowrap; border: 0; background: transparent; text-decoration: none !important; line-height: 1.2; }
.calnav-link:hover { color: var(--c-text); background: var(--c-soft-2); }
.calnav-link.active { color: var(--c-primary); background: var(--c-soft); }
.hdr-h3 .calnav-link.active, .hdr-h9 .calnav-link.active { background: transparent; box-shadow: inset 0 -2px 0 var(--c-primary); border-radius: 0; }
.hdr-h4 .calnav-link.active { background: var(--c-primary); color: var(--c-primary-text); }

/* ---------- Page shell ---------- */
.app-main { flex: 1 0 auto; }
.app-container { max-width: var(--content-max); margin: 0 auto; padding: 1.4rem 1rem 3rem; }
.app-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; max-width: var(--content-max); width: 100%; margin: 0 auto; padding: 1.2rem 1rem 1.6rem; font-size: .8rem; color: var(--c-muted); }
.app-footer a { color: var(--c-muted); font-weight: 600; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: 1.2rem; }
.page-title { font-size: 1.55rem; font-weight: 700; margin: 0; }
.page-sub { color: var(--c-muted); margin: .15rem 0 0; font-size: .92rem; }
.page-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.section-title { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--c-muted); margin: 1.4rem 0 .6rem; display: flex; align-items: center; gap: .5rem; }
.section-title .line { flex: 1; height: 1px; background: var(--c-border); }

/* ---------- Cards (10 layouts) ---------- */
.card, .panel { background: var(--c-surface); color: var(--c-text); border: 1px solid var(--c-border); border-radius: var(--radius); box-shadow: var(--shadow-sm); --bs-card-bg: var(--c-surface); --bs-card-border-color: var(--c-border); --bs-card-cap-bg: transparent; }
.card-header { background: transparent; border-bottom: 1px solid var(--c-border); font-weight: 600; }
.card-footer { background: transparent; }
.panel { padding: 1.1rem 1.2rem; margin-bottom: var(--gap); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .8rem; }
.panel-title { font-size: 1rem; font-weight: 700; margin: 0; display: flex; align-items: center; gap: .5rem; }
.card-c1 .card, .card-c1 .panel { box-shadow: var(--shadow); border-color: transparent; }
.card-c2 .card, .card-c2 .panel { border-radius: 22px; box-shadow: 0 10px 30px color-mix(in srgb, var(--c-primary) 12%, rgba(0,0,0,.06)); border-color: transparent; }
.card-c3 .card, .card-c3 .panel { box-shadow: none; border-radius: 8px; }
.card-c4 .card, .card-c4 .panel { border: 2px solid var(--c-text); border-radius: 10px; box-shadow: 5px 5px 0 var(--c-text); }
.card-c5 .card, .card-c5 .panel { background: var(--c-soft); border-color: transparent; box-shadow: none; border-radius: 18px; }
.card-c6 .card, .card-c6 .panel { border-radius: 26px 6px 26px 6px; box-shadow: var(--shadow); border-color: transparent; }
.card-c7 .card, .card-c7 .panel { border-radius: 3px; border-left: 4px solid var(--c-primary); box-shadow: var(--shadow-sm); }
.card-c8 .card, .card-c8 .panel { border-radius: 18px; border: 0; border-top: 6px solid var(--c-primary); box-shadow: 0 8px 24px color-mix(in srgb, var(--c-primary) 15%, transparent); }
.card-c8 .panel:nth-child(3n+2) { border-top-color: var(--c-accent); }
.card-c9 .card, .card-c9 .panel { border: 1px solid color-mix(in srgb, var(--c-accent) 70%, transparent); outline: 1px solid color-mix(in srgb, var(--c-accent) 35%, transparent); outline-offset: 3px; border-radius: 4px; box-shadow: none; }
.card-c10 .card, .card-c10 .panel { background: color-mix(in srgb, var(--c-surface) 72%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border: 1px solid color-mix(in srgb, var(--c-text) 12%, transparent); box-shadow: 0 8px 30px rgba(0,0,0,.18); }

/* ---------- Lists & items ---------- */
.list-clean { list-style: none; margin: 0; padding: 0; }
.item-row { display: flex; align-items: center; gap: .75rem; padding: .7rem .2rem; border-bottom: 1px solid var(--c-border); }
.item-row:last-child { border-bottom: 0; }
.item-main { flex: 1; min-width: 0; }
.item-title { font-weight: 600; color: var(--c-text); display: block; overflow: hidden; text-overflow: ellipsis; }
a.item-title:hover { color: var(--c-primary); }
.item-meta { font-size: .82rem; color: var(--c-muted); }
.item-actions { display: flex; align-items: center; gap: .25rem; flex: none; }
.chip { display: inline-flex; align-items: center; gap: .3rem; padding: .15rem .55rem; border-radius: 999px; font-size: .74rem; font-weight: 600; background: var(--c-soft-2); color: var(--c-muted); white-space: nowrap; }
.chip-primary { background: var(--c-soft); color: var(--c-primary); }
.chip-warn { background: #fef3c7; color: #92400e; } .chip-danger { background: #fee2e2; color: #991b1b; } .chip-ok { background: #dcfce7; color: #166534; } .chip-info { background: #e0f2fe; color: #075985; }
.theme-dark .chip-warn { background: #422006; color: #fcd34d; } .theme-dark .chip-danger { background: #450a0a; color: #fca5a5; } .theme-dark .chip-ok { background: #052e16; color: #86efac; } .theme-dark .chip-info { background: #082f49; color: #7dd3fc; }
.dept-pill { display: inline-flex; align-items: center; padding: .12rem .55rem; border-radius: 999px; font-size: .74rem; font-weight: 700; }
.empty { text-align: center; padding: 2.2rem 1rem; color: var(--c-muted); }
.empty .bi { font-size: 2.2rem; display: block; margin-bottom: .5rem; opacity: .55; }
.empty p { margin: 0 0 1rem; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--gap); margin-bottom: var(--gap); }
.stat { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); padding: .9rem 1rem; }
.stat .num { font-size: 1.6rem; font-weight: 800; line-height: 1.1; font-family: var(--f-head); }
.stat .lbl { font-size: .8rem; color: var(--c-muted); }
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: var(--gap); }
.tile { display: flex; flex-direction: column; gap: .35rem; padding: 1rem 1.1rem; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); color: var(--c-text); text-decoration: none !important; transition: transform .12s ease, box-shadow .12s ease; }
.tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); color: var(--c-text); }
.tile .bi { font-size: 1.4rem; color: var(--c-primary); }

/* Avatars */
.avatar { --av-h: 230; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; object-fit: cover; flex: none; background: hsl(var(--av-h) 60% 88%); color: hsl(var(--av-h) 55% 30%); font-weight: 700; }
.avatar-xs { width: 24px; height: 24px; font-size: .62rem; } .avatar-sm { width: 32px; height: 32px; font-size: .75rem; } .avatar-md { width: 42px; height: 42px; font-size: .9rem; } .avatar-lg { width: 72px; height: 72px; font-size: 1.4rem; } .avatar-xl { width: 110px; height: 110px; font-size: 2rem; }
.theme-dark .avatar { background: hsl(var(--av-h) 40% 25%); color: hsl(var(--av-h) 70% 85%); }

/* ---------- Side menu ---------- */
.side-menu { width: 300px !important; background: var(--c-surface); color: var(--c-text); }
.side-nav, .side-foot { display: flex; flex-direction: column; gap: .1rem; }
.side-foot { border-top: 1px solid var(--c-border); padding-top: .6rem; margin-top: 1rem; }
.side-link { display: flex; align-items: center; gap: .75rem; padding: .55rem .75rem; border-radius: 10px; color: var(--c-text); font-weight: 500; text-decoration: none !important; }
.side-link .bi { font-size: 1.1rem; color: var(--c-muted); width: 1.3rem; text-align: center; }
.side-link:hover { background: var(--c-soft-2); color: var(--c-text); }
.side-link.active { background: var(--c-soft); color: var(--c-primary); }
.side-link.active .bi { color: var(--c-primary); }
.side-badge { margin-left: auto; background: var(--c-primary); color: var(--c-primary-text); border-radius: 999px; font-size: .7rem; font-weight: 700; padding: .05rem .45rem; }

/* ---------- Notifications dropdown ---------- */
.notif-drop { width: min(380px, 94vw); border-radius: 14px; overflow: hidden; border: 1px solid var(--c-border); box-shadow: var(--shadow-lg); background: var(--c-surface); }
.notif-tabs { display: grid; grid-template-columns: 1fr 1fr 48px; border-bottom: 1px solid var(--c-border); }
.notif-tab { border: 0; background: var(--c-surface); padding: .7rem .5rem; font-weight: 600; color: var(--c-muted); font-size: .9rem; }
.notif-tab.active { color: var(--c-primary); box-shadow: inset 0 -2px 0 var(--c-primary); }
.notif-readall { border-left: 1px solid var(--c-border); color: var(--c-muted); }
.notif-list { max-height: 60vh; overflow-y: auto; }
.notif-item { display: flex; gap: .6rem; padding: .7rem .9rem; border-bottom: 1px solid var(--c-border); color: var(--c-text); text-decoration: none !important; font-size: .9rem; }
.notif-item:hover { background: var(--c-soft-2); color: var(--c-text); }
.notif-item.unread { background: color-mix(in srgb, var(--c-primary) 6%, var(--c-surface)); }
.notif-item.unread .notif-t::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--c-primary); margin-right: .4rem; vertical-align: middle; }
.notif-t { font-weight: 600; }
.notif-b { color: var(--c-muted); font-size: .84rem; }
.notif-when { color: var(--c-muted); font-size: .74rem; }
.notif-more { display: block; text-align: center; padding: .6rem; font-weight: 600; font-size: .88rem; }
.notif-ic { width: 32px; height: 32px; border-radius: 50%; flex: none; display: inline-flex; align-items: center; justify-content: center; background: var(--c-soft); color: var(--c-primary); }
.notif-ic.urgent { background: #fee2e2; color: #b91c1c; }

/* ---------- Modals ---------- */
.modal-content { border-radius: 18px; border: 0; background: var(--c-surface); color: var(--c-text); box-shadow: var(--shadow-lg); }
.modal-header { position: sticky; top: 0; z-index: 5; background: var(--c-surface); border-bottom: 1px solid var(--c-border); border-radius: 18px 18px 0 0; gap: .75rem; }
.modal-title { font-weight: 700; font-size: 1.08rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.modal-header .btn-close { flex: none; margin: 0 0 0 auto; }
.modal-header .head-actions { display: flex; gap: .4rem; flex: none; }
.modal-footer { border-top: 1px solid var(--c-border); gap: .5rem; }
.modal-dialog-scrollable .modal-content { max-height: calc(100vh - 2rem); }
.theme-dark .btn-close { filter: invert(1) grayscale(100%) brightness(200%); }
.modal-backdrop.stack-2 { z-index: 1065; } .modal.stack-2 { z-index: 1070; }
.modal-backdrop.stack-3 { z-index: 1075; } .modal.stack-3 { z-index: 1080; }
.modal-backdrop.stack-4 { z-index: 1085; } .modal.stack-4 { z-index: 1090; }

/* Toasts */
.toast-stack { position: fixed; z-index: 2000; right: 1rem; bottom: 1rem; display: flex; flex-direction: column; gap: .5rem; max-width: min(380px, calc(100vw - 2rem)); }
.cl-toast { background: #1f2330; color: #fff; padding: .7rem 1rem; border-radius: 12px; box-shadow: var(--shadow-lg); font-size: .9rem; display: flex; align-items: center; gap: .6rem; animation: toastIn .18s ease-out; }
.cl-toast.error { background: #b91c1c; } .cl-toast.success { background: #166534; }
@keyframes toastIn { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }

/* Switcher */
.space-row { display: flex; align-items: center; gap: .8rem; padding: .7rem .75rem; border-radius: 12px; color: var(--c-text); text-decoration: none !important; border: 1px solid transparent; }
.space-row:hover { background: var(--c-soft-2); color: var(--c-text); }
.space-row.current { border-color: color-mix(in srgb, var(--c-primary) 35%, transparent); background: var(--c-soft); }
.space-row small { display: block; color: var(--c-muted); font-size: .8rem; }
.space-swatch { width: 40px; height: 40px; border-radius: 12px; flex: none; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: .85rem; overflow: hidden; }
.space-swatch img { width: 100%; height: 100%; object-fit: contain; }
.space-swatch.has-logo { padding: 4px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.space-swatch.is-personal { background: #ccfbf1; color: #0f766e; font-size: 1.2rem; }
.space-group { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--c-muted); margin: 1rem .3rem .3rem; }
.qa-preview { background: var(--c-soft); border-radius: 10px; padding: .6rem .8rem; font-size: .88rem; }

/* ---------- Calendar grid (FullCalendar) + 10 layouts ---------- */
.cal-toolbar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; justify-content: space-between; margin-bottom: .8rem; }
.cal-wrap { background: var(--c-surface); border-radius: var(--radius); padding: .8rem; border: 1px solid var(--c-border); }
.fc { --fc-border-color: var(--c-border); --fc-page-bg-color: var(--c-surface); --fc-neutral-bg-color: var(--c-soft-2); --fc-today-bg-color: var(--c-today); --fc-event-bg-color: var(--c-event-bg); --fc-event-border-color: var(--c-event-bg); --fc-event-text-color: var(--c-event-text); --fc-button-bg-color: var(--c-primary); --fc-button-border-color: var(--c-primary); --fc-button-text-color: var(--c-primary-text); --fc-button-hover-bg-color: color-mix(in srgb, var(--c-primary) 85%, #000); --fc-button-hover-border-color: color-mix(in srgb, var(--c-primary) 85%, #000); --fc-button-active-bg-color: color-mix(in srgb, var(--c-primary) 75%, #000); --fc-button-active-border-color: color-mix(in srgb, var(--c-primary) 75%, #000); --fc-list-event-hover-bg-color: var(--c-soft-2); color: var(--c-text); }
.fc .fc-toolbar { flex-wrap: wrap; gap: .5rem; }
.fc .fc-toolbar-title { font-family: var(--f-head); font-size: 1.3rem; font-weight: 700; }
.fc .fc-button { border-radius: 9px; text-transform: capitalize; font-weight: 600; font-size: .85rem; padding: .35rem .7rem; box-shadow: none !important; }
.fc .fc-col-header-cell { background: var(--c-grid-head-bg); color: var(--c-grid-head-text); }
.fc .fc-col-header-cell-cushion { color: var(--c-grid-head-text); font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; padding: .5rem .2rem; text-decoration: none; }
.fc .fc-daygrid-day-number { color: var(--c-text); font-weight: 600; font-size: .85rem; text-decoration: none; }
.fc .fc-event { border-radius: 6px; padding: 1px 4px; font-size: .78rem; cursor: pointer; }
.fc .fc-daygrid-event-dot { border-color: var(--c-event-bg); }
.fc .fc-list-event-title a, .fc .fc-list-day-cushion a { color: var(--c-text); }
.fc .fc-list-day-cushion { background: var(--c-soft-2); }
.fc-event.ev-task { border-style: dashed !important; }
.fc-event.ev-cancelled { text-decoration: line-through; opacity: .75; }
.fc-event.ev-personal { border-left-width: 4px !important; }
.fc-event.ev-liked::after { content: '\2665'; margin-left: 3px; }
@media (max-width: 640px) {
  .fc .fc-toolbar { flex-direction: column; align-items: stretch; }
  .fc .fc-toolbar-chunk { display: flex; justify-content: center; }
  .fc .fc-toolbar-title { font-size: 1.1rem; text-align: center; }
}
.grid-g2 .fc-theme-standard td, .grid-g2 .fc-theme-standard th, .grid-g2 .fc-scrollgrid { border-color: transparent; }
.grid-g2 .fc .fc-daygrid-day-frame { background: var(--c-soft-2); margin: 3px; border-radius: 12px; min-height: 88px; }
.grid-g2 .fc .fc-day-today .fc-daygrid-day-frame { background: var(--c-today); }
.grid-g2 .fc .fc-daygrid-day.fc-day-today { background: transparent; }
.grid-g2 .fc .fc-col-header-cell { background: transparent; }
.grid-g3 .fc-theme-standard td, .grid-g3 .fc-theme-standard th { border-left-color: transparent; border-right-color: transparent; }
.grid-g3 .fc-scrollgrid { border-left: 0 !important; border-right: 0 !important; }
.grid-g3 .fc .fc-col-header-cell { background: transparent; }
.grid-g3 .fc .fc-event { border-radius: 2px; background: transparent !important; color: var(--c-text) !important; border: 0 !important; border-left: 3px solid var(--c-event-bg) !important; }
.grid-g4 .fc .fc-col-header-cell { background: var(--c-grid-head-bg); }
.grid-g4 .fc .fc-col-header-cell-cushion { font-size: .95rem; font-weight: 900; padding: .8rem .2rem; }
.grid-g4 .fc-theme-standard td, .grid-g4 .fc-theme-standard th { border-width: 2px; border-color: var(--c-text); }
.grid-g4 .fc .fc-event { border-radius: 0; font-weight: 700; }
.grid-g4 .fc .fc-daygrid-day-number { font-size: 1.1rem; font-weight: 900; }
.grid-g5 .fc .fc-day-sat, .grid-g5 .fc .fc-day-sun { background: color-mix(in srgb, var(--c-accent) 9%, var(--c-surface)); }
.grid-g5 .fc .fc-event { border-radius: 10px; }
.grid-g6 .fc .fc-daygrid-day-frame { border-radius: 14px; }
.grid-g6 .fc .fc-daygrid-day-number { width: 30px; height: 30px; margin: 4px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; }
.grid-g6 .fc .fc-day-today .fc-daygrid-day-number { background: var(--c-primary); color: var(--c-primary-text); }
.grid-g6 .fc .fc-day-today { background: transparent !important; }
.grid-g6 .fc .fc-event { border-radius: 8px; }
.grid-g7 .fc { font-size: .78rem; }
.grid-g7 .fc .fc-daygrid-day-frame { min-height: 60px; }
.grid-g7 .fc .fc-event { font-size: .7rem; padding: 0 3px; border-radius: 2px; }
.grid-g7 .fc .fc-col-header-cell-cushion { padding: .3rem .2rem; font-size: .72rem; }
.grid-g8 .fc .fc-event { border-radius: 999px; padding: 1px 8px; font-weight: 600; }
.grid-g8 .fc .fc-daygrid-day-number { font-weight: 800; }
.grid-g8 .fc .fc-col-header-cell { border-radius: 12px 12px 0 0; }
.grid-g8 .fc .fc-button { border-radius: 999px; }
.grid-g9 .fc .fc-daygrid-day-number { font-family: var(--f-head); font-size: 1.05rem; font-style: italic; font-weight: 500; }
.grid-g9 .fc .fc-col-header-cell-cushion { font-family: var(--f-head); letter-spacing: .14em; font-weight: 500; }
.grid-g9 .fc-theme-standard td, .grid-g9 .fc-theme-standard th { border-color: color-mix(in srgb, var(--c-accent) 40%, transparent); }
.grid-g9 .fc .fc-event { border-radius: 0; background: transparent !important; color: var(--c-primary) !important; border: 1px solid var(--c-primary) !important; }
.grid-g10 .cal-wrap { background: #0b0f19; }
.grid-g10 .fc { --fc-page-bg-color: #0b0f19; --fc-border-color: #243049; color: #e5e7eb; --fc-neutral-bg-color: #111827; }
.grid-g10 .fc .fc-daygrid-day-number { color: #f8fafc; }
.grid-g10 .fc .fc-col-header-cell { background: #000; }
.grid-g10 .fc .fc-col-header-cell-cushion { color: #facc15; }
.grid-g10 .fc .fc-event { border-radius: 4px; font-weight: 700; }
.grid-g10 .fc .fc-list-day-cushion { background: #111827; }
.fc-legend { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .6rem; }

/* Layer toggles */
.layer-toggles { display: flex; flex-wrap: wrap; gap: .4rem; }
.layer-toggle { display: inline-flex; align-items: center; gap: .4rem; border: 1px solid var(--c-border); border-radius: 999px; padding: .3rem .7rem; font-size: .82rem; font-weight: 600; background: var(--c-surface); color: var(--c-text); cursor: pointer; user-select: none; }
.layer-toggle input { display: none; }
.layer-toggle .sw { width: 12px; height: 12px; border-radius: 4px; }
.layer-toggle:has(input:not(:checked)) { opacity: .55; }

/* ---------- Event page ---------- */
.event-hero { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-start; justify-content: space-between; }
.event-title { font-size: 1.7rem; font-weight: 800; margin: .3rem 0 .4rem; }
.event-facts { display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; color: var(--c-muted); font-size: .92rem; }
.event-facts span { display: inline-flex; align-items: center; gap: .35rem; }
.event-desc { font-size: .98rem; }
.event-desc img { max-width: 100%; height: auto; border-radius: 10px; }
.capacity-bar { height: 8px; background: var(--c-soft-2); border-radius: 999px; overflow: hidden; }
.capacity-bar > span { display: block; height: 100%; background: var(--c-primary); }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--gap); align-items: start; }
@media (max-width: 991px) { .two-col { grid-template-columns: 1fr; } }
.like-btn { border: 1px solid var(--c-border); background: var(--c-surface); border-radius: 999px; padding: .35rem .8rem; color: #e11d48; font-weight: 600; }
.like-btn.liked { background: #ffe4e6; border-color: #fecdd3; }
.theme-dark .like-btn.liked { background: #4c0519; border-color: #881337; }
.live-note { border: 1px dashed var(--c-border); border-radius: 10px; padding: .6rem .8rem; margin: .6rem 0; background: var(--c-soft-2); }

/* ---------- Threads ---------- */
.thread { display: flex; flex-direction: column; gap: .7rem; }
.thread-list { display: flex; flex-direction: column; gap: .7rem; max-height: 520px; overflow-y: auto; padding-right: .2rem; }
.msg { display: flex; gap: .6rem; }
.msg-bubble { background: var(--c-soft-2); border-radius: 4px 14px 14px 14px; padding: .55rem .8rem; max-width: 100%; min-width: 0; }
.msg.mine { flex-direction: row-reverse; }
.msg.mine .msg-bubble { background: var(--c-soft); border-radius: 14px 4px 14px 14px; }
.msg-head { font-size: .78rem; color: var(--c-muted); display: flex; gap: .5rem; align-items: center; }
.msg-head strong { color: var(--c-text); }
.msg-body { font-size: .93rem; overflow-wrap: anywhere; }
.msg-body p:last-child { margin-bottom: 0; }
.msg-body img { max-width: 100%; border-radius: 8px; }
.msg-files { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .4rem; }
.msg-files img { width: 84px; height: 84px; object-fit: cover; border-radius: 8px; cursor: zoom-in; }
.msg.hidden-msg .msg-bubble { opacity: .55; font-style: italic; }
.msg-reply { margin-left: 2.6rem; }
.msg-tools { display: flex; gap: .2rem; }
.msg-tools .btn { padding: 0 .3rem; font-size: .75rem; }
.thread-form { display: flex; flex-direction: column; gap: .4rem; }
.thread-form textarea { resize: vertical; min-height: 44px; }
.thread-row { display: flex; gap: .8rem; align-items: center; padding: .8rem .9rem; border-bottom: 1px solid var(--c-border); color: var(--c-text); text-decoration: none !important; }
.thread-row:hover { background: var(--c-soft-2); color: var(--c-text); }
.thread-row.unread .item-title::after { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--c-primary); margin-left: .45rem; vertical-align: middle; }

/* ---------- Tasks ---------- */
.list-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--gap); align-items: start; }
.task-list-card .panel-title .sw { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.task { display: flex; align-items: flex-start; gap: .6rem; padding: .55rem .1rem; border-bottom: 1px solid var(--c-border); }
.task:last-child { border-bottom: 0; }
.task-check { width: 22px; height: 22px; border-radius: 7px; border: 2px solid color-mix(in srgb, var(--c-text) 30%, transparent); background: transparent; display: inline-flex; align-items: center; justify-content: center; color: transparent; flex: none; margin-top: 1px; padding: 0; }
.task-check:hover { border-color: var(--c-primary); }
.task.done .task-check { background: var(--c-primary); border-color: var(--c-primary); color: var(--c-primary-text); }
.task.done .task-title { text-decoration: line-through; color: var(--c-muted); }
.task-title { font-weight: 500; cursor: pointer; overflow-wrap: anywhere; }
.task.due-today:not(.done) .task-title { color: #b45309; font-weight: 700; }
.task.overdue:not(.done) .task-due { color: #b91c1c; font-weight: 700; }
.task-due { font-size: .78rem; color: var(--c-muted); }
.task .item-actions { opacity: .75; }
.task:hover .item-actions { opacity: 1; }
.pin-on { color: #d97706 !important; }

/* ---------- Notes ---------- */
.notes-shell { display: grid; grid-template-columns: 310px minmax(0, 1fr); gap: var(--gap); align-items: start; }
@media (max-width: 860px) { .notes-shell { grid-template-columns: 1fr; } }
.tree { list-style: none; padding-left: 0; margin: 0; }
.tree .tree { padding-left: 1rem; }
.tree-row { display: flex; align-items: center; gap: .3rem; padding: .3rem .4rem; border-radius: 8px; cursor: pointer; color: var(--c-text); font-size: .92rem; }
.tree-row:hover { background: var(--c-soft-2); }
.tree-row.active { background: var(--c-soft); color: var(--c-primary); font-weight: 600; }
.tree-toggle { border: 0; background: transparent; width: 20px; padding: 0; color: var(--c-muted); }
.tree-toggle.empty { visibility: hidden; }
.tree-sw { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.tree-root { font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--c-muted); margin: .8rem .4rem .2rem; }
.tree .collapsed > .tree { display: none; }
.note-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--gap); }
.note-card { background: var(--c-surface); border: 1px solid var(--c-border); border-top: 5px solid var(--note-c, var(--c-border)); border-radius: 12px; padding: .8rem .9rem; cursor: pointer; display: flex; flex-direction: column; gap: .35rem; min-height: 120px; }
.note-card:hover { box-shadow: var(--shadow); }
.note-card h6 { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.note-card .ex { font-size: .84rem; color: var(--c-muted); flex: 1; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; }
.note-body { overflow-wrap: anywhere; }
.note-body img { max-width: 100%; }

/* ---------- My Day ---------- */
.day-hero { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; background: linear-gradient(120deg, var(--c-primary), color-mix(in srgb, var(--c-primary) 55%, var(--c-accent))); color: var(--c-primary-text); padding: 1.3rem 1.5rem; border-radius: 20px; margin-bottom: var(--gap); }
.day-hero h1 { font-size: 1.6rem; font-weight: 800; margin: 0; }
.day-hero p { margin: .2rem 0 0; opacity: .9; }
.day-hero .btn { background: rgba(255,255,255,.18); color: inherit; border: 1px solid rgba(255,255,255,.35); }
.day-hero .btn:hover { background: rgba(255,255,255,.28); color: inherit; }
.day-cols { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: var(--gap); align-items: start; }
@media (max-width: 991px) { .day-cols { grid-template-columns: 1fr; } }
.agenda-day { font-weight: 800; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--c-muted); margin: .8rem 0 .3rem; }
.agenda-item { display: flex; gap: .75rem; align-items: flex-start; padding: .55rem .6rem; border-radius: 10px; color: var(--c-text); text-decoration: none !important; }
.agenda-item:hover { background: var(--c-soft-2); color: var(--c-text); }
.agenda-time { width: 70px; flex: none; font-size: .8rem; color: var(--c-muted); font-weight: 600; padding-top: .1rem; }
.agenda-bar { width: 4px; align-self: stretch; border-radius: 4px; flex: none; }
.src-tag { font-size: .7rem; font-weight: 700; padding: .05rem .45rem; border-radius: 999px; background: var(--c-soft-2); color: var(--c-muted); }

/* ---------- Media ---------- */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .75rem; }
.media-item { position: relative; border: 1px solid var(--c-border); border-radius: 12px; overflow: hidden; background: var(--c-soft-2); aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.media-item img, .media-item video { width: 100%; height: 100%; object-fit: cover; }
.media-item .bi { font-size: 2rem; color: var(--c-muted); }
.media-item .media-name { position: absolute; left: 0; right: 0; bottom: 0; font-size: .72rem; padding: .25rem .4rem; background: linear-gradient(transparent, rgba(0,0,0,.7)); color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.media-item.selected { outline: 3px solid var(--c-primary); outline-offset: -3px; }
.media-item .media-check { position: absolute; top: 6px; left: 6px; }
.file-chip { display: inline-flex; align-items: center; gap: .35rem; border: 1px solid var(--c-border); border-radius: 8px; padding: .25rem .5rem; font-size: .8rem; background: var(--c-surface); color: var(--c-text); }
.thumb { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; border: 1px solid var(--c-border); }
.lightbox { position: fixed; inset: 0; z-index: 3000; background: rgba(0,0,0,.88); display: flex; align-items: center; justify-content: center; }
.lightbox img, .lightbox video { max-width: 94vw; max-height: 88vh; border-radius: 8px; }
.lightbox .lb-close { position: absolute; top: 1rem; right: 1rem; color: #fff; background: rgba(255,255,255,.14); border: 0; width: 44px; height: 44px; border-radius: 50%; font-size: 1.4rem; }

/* ---------- Colors (CallinkColors) ---------- */
.color-btn { width: 36px; height: 36px; border-radius: 9px; border: 1px solid #9ca3af; padding: 0; background: var(--sw, #fff); box-shadow: inset 0 0 0 2px rgba(255,255,255,.5); vertical-align: middle; position: relative; }
.color-btn.none { background: repeating-linear-gradient(45deg, #fff, #fff 5px, #e5e7eb 5px, #e5e7eb 10px); }
.color-field { display: inline-flex; align-items: center; gap: .5rem; }
.color-field { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; }
.color-field .cf-label { font-size: .7rem; color: var(--c-muted); line-height: 1.1; }
.cc-sheet .cc-label { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--c-muted); margin: .8rem 0 .4rem; }
.cc-row { display: flex; flex-wrap: wrap; gap: .45rem; }
.cc-sw { width: 36px; height: 36px; border-radius: 9px; border: 1px solid #9ca3af; cursor: pointer; padding: 0; }
.cc-sw.active { outline: 3px solid var(--c-primary); outline-offset: 2px; }
.cc-sw.none { background: repeating-linear-gradient(45deg, #fff, #fff 5px, #e5e7eb 5px, #e5e7eb 10px); }
.cc-custom { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.cc-preview { width: 84px; height: 84px; border-radius: 14px; border: 1px solid var(--c-border); flex: none; }
.cc-wheel { width: 150px; height: 150px; border-radius: 50%; position: relative; background: radial-gradient(circle closest-side, #fff, transparent), conic-gradient(red, yellow, lime, cyan, blue, magenta, red); cursor: crosshair; flex: none; touch-action: none; }
.cc-dot { position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.4); transform: translate(-50%, -50%); pointer-events: none; }
.cc-light { width: 100%; }
.cc-inputs { display: grid; grid-template-columns: repeat(4, 1fr); gap: .4rem; margin-top: .6rem; }
.cc-inputs .form-control { padding: .3rem .4rem; font-size: .8rem; text-align: center; }

/* ---------- Theme previews ---------- */
.preset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .7rem; }
.preset-card { border: 2px solid var(--c-border); border-radius: 14px; overflow: hidden; cursor: pointer; background: var(--c-surface); text-align: left; padding: 0; }
.preset-card.active { border-color: var(--c-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-primary) 25%, transparent); }
.preset-card .pv-bar { height: 22px; }
.preset-card .pv-body { padding: .5rem; display: flex; gap: .3rem; }
.preset-card .pv-chip { height: 18px; flex: 1; border-radius: 5px; }
.preset-card .pv-name { padding: .3rem .6rem .5rem; font-weight: 700; font-size: .85rem; color: var(--c-text); }
.layout-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .5rem; }
.layout-opt { border: 2px solid var(--c-border); border-radius: 10px; padding: .5rem; text-align: center; font-size: .8rem; font-weight: 600; cursor: pointer; background: var(--c-surface); color: var(--c-text); }
.layout-opt input { display: none; }
.layout-opt:has(input:checked) { border-color: var(--c-primary); color: var(--c-primary); background: var(--c-soft); }
.layout-opt .mini { height: 34px; border-radius: 6px; margin-bottom: .35rem; background: var(--c-soft-2); position: relative; overflow: hidden; }

/* Settings cards */
.settings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: var(--gap); }
.setting-card { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 1rem 1.1rem; display: flex; gap: .8rem; align-items: flex-start; }
.setting-card .bi-lead { font-size: 1.3rem; color: var(--c-primary); background: var(--c-soft); width: 42px; height: 42px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.setting-card h6 { margin: 0 0 .15rem; font-weight: 700; }
.setting-card p { margin: 0; font-size: .84rem; color: var(--c-muted); }
.setting-card .btn { margin-left: auto; flex: none; }

/* ---------- Plain (auth) layout ---------- */
.plain-wrap { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2rem 1rem; background: radial-gradient(1200px 500px at 10% -10%, color-mix(in srgb, var(--c-primary) 16%, transparent), transparent), radial-gradient(900px 500px at 110% 110%, color-mix(in srgb, var(--c-accent) 14%, transparent), transparent), var(--c-bg); }
.plain-brand { display: inline-flex; align-items: center; gap: .6rem; font-weight: 800; font-size: 1.35rem; color: var(--c-text); margin-bottom: 1.2rem; text-decoration: none !important; font-family: var(--f-head); }
.plain-brand img { height: 40px; }
.plain-card { width: 100%; max-width: 430px; background: var(--c-surface); border-radius: 20px; padding: 1.8rem; box-shadow: var(--shadow-lg); }
.plain-card.wide { max-width: 640px; }
.plain-foot { margin-top: 1.2rem; font-size: .8rem; color: var(--c-muted); }
.auth-title { font-size: 1.45rem; font-weight: 800; margin-bottom: .3rem; }
.oauth-btn { width: 100%; justify-content: center; border: 1px solid var(--c-border); background: var(--c-surface); color: var(--c-text); }
.oauth-btn:hover { background: var(--c-soft-2); }
.divider-or { display: flex; align-items: center; gap: .8rem; color: var(--c-muted); font-size: .8rem; margin: 1rem 0; }
.divider-or::before, .divider-or::after { content: ''; flex: 1; height: 1px; background: var(--c-border); }
.error-code { font-size: 3.2rem; font-weight: 900; color: var(--c-primary); font-family: var(--f-head); line-height: 1; margin-bottom: .6rem; }
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Marketing ---------- */
.hero { padding: 3.2rem 0 2rem; display: grid; grid-template-columns: 1.1fr .9fr; gap: 2rem; align-items: center; }
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; padding-top: 1.5rem; } }
.hero h1 { font-size: clamp(2rem, 5vw, 3.3rem); font-weight: 900; line-height: 1.05; letter-spacing: -.03em; margin-bottom: 1rem; }
.hero h1 span { display: block; }
.hero h1 span:nth-child(2) { color: var(--c-primary); }
.hero .lead { font-size: 1.12rem; color: var(--c-muted); max-width: 36rem; }
.hero-art { border-radius: 24px; overflow: hidden; box-shadow: var(--shadow-lg); aspect-ratio: 4 / 3; background: var(--c-soft); }
.hero-art img { width: 100%; height: 100%; object-fit: cover; }
.who-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .7rem; }
.who { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: 14px; padding: 1rem; text-align: center; font-weight: 700; }
.who .bi { display: block; font-size: 1.6rem; color: var(--c-primary); margin-bottom: .3rem; }
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .8rem; }
.step { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: 14px; padding: 1rem 1rem 1rem 3.2rem; position: relative; font-weight: 600; }
.step::before { counter-increment: step; content: counter(step); position: absolute; left: 1rem; top: .95rem; width: 28px; height: 28px; border-radius: 50%; background: var(--c-primary); color: var(--c-primary-text); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: .85rem; }
.band { background: var(--c-surface); border-radius: 24px; padding: 2rem; margin: 2.5rem 0; border: 1px solid var(--c-border); }
.feature-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .8rem; }
.feature { display: flex; gap: .7rem; align-items: flex-start; }
.feature .bi { font-size: 1.3rem; color: var(--c-accent); }
.site-cards { display: flex; flex-wrap: wrap; gap: 1.2rem; }
.site-card { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: 18px; padding: 1.2rem; display: flex; gap: 1.2rem; overflow: hidden; box-shadow: var(--shadow-sm); }
.site-card h3 { font-size: 1.2rem; font-weight: 800; margin: 0 0 .4rem; }
.site-card p { color: var(--c-muted); margin: 0; }
.site-card .sc-img { flex: 0 0 45%; max-width: 45%; display: flex; align-items: center; justify-content: center; }
.site-card .sc-img img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 12px; }
.site-card .sc-text { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
.site-card.lay-text_left { flex-direction: row; }
.site-card.lay-title_top { flex-direction: row; flex-wrap: wrap; }
.site-card.lay-title_top > h3 { flex: 0 0 100%; }
.site-card.lay-pic_middle, .site-card.lay-pic_top { flex-direction: column; }
.site-card.lay-pic_middle .sc-img, .site-card.lay-pic_top .sc-img { max-width: 100%; flex: none; }
.site-card.lay-pic_left { flex-direction: row-reverse; }
@media (max-width: 700px) { .site-card { flex-direction: column !important; width: 100% !important; } .site-card .sc-img { max-width: 100%; } }

/* ---------- Admin ---------- */
.admin-shell { display: flex; flex: 1; max-width: 1400px; margin: 0 auto; width: 100%; }
.admin-nav { width: 250px; padding: 1rem .6rem; border-right: 1px solid var(--c-border); background: var(--c-surface); }
@media (min-width: 992px) { .admin-nav { position: sticky; top: var(--topbar-h); height: calc(100vh - var(--topbar-h)); overflow-y: auto; } }
.admin-main { flex: 1; min-width: 0; padding: 1.4rem 1.4rem 3rem; }
.admin-topbar { background: #111827; color: #f9fafb; --c-nav-text: #f9fafb; --c-nav-bg: #111827; }
.admin-lock-note { font-size: .78rem; opacity: .75; }
.table { --bs-table-bg: transparent; --bs-table-color: var(--c-text); --bs-table-border-color: var(--c-border); --bs-table-hover-bg: var(--c-soft-2); --bs-table-hover-color: var(--c-text); }
.table > :not(caption) > * > * { padding: .6rem .6rem; }
.table thead th { font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--c-muted); font-weight: 700; }
.table-wrap { overflow-x: auto; }

/* ---------- Misc ---------- */
.qr-box canvas, .qr-box img, .qr-box svg { width: 180px; height: 180px; }
.drag-strip { display: flex; gap: .8rem; overflow-x: auto; padding-bottom: .5rem; scroll-snap-type: x mandatory; }
.drag-strip > * { scroll-snap-align: start; }
.typeahead { position: relative; }
.typeahead-menu { position: absolute; z-index: 1100; left: 0; right: 0; top: 100%; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: 10px; box-shadow: var(--shadow-lg); max-height: 260px; overflow-y: auto; margin-top: 2px; }
.typeahead-item { display: flex; gap: .5rem; align-items: center; padding: .5rem .7rem; cursor: pointer; }
.typeahead-item:hover, .typeahead-item.active { background: var(--c-soft); }
.typeahead-item.disabled { opacity: .55; cursor: default; }
.typeahead-item.disabled:hover { background: transparent; }
.picked-chips { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .4rem; }
.gear-btn { color: var(--c-muted); }
.note-editor-wrap .note-editor { border-radius: 10px; border-color: var(--c-border) !important; }
.note-editor .note-toolbar { background: var(--c-soft-2); }
.note-editor .note-editable { background: var(--c-surface); color: var(--c-text); }
.sortable-ghost { opacity: .4; }
.announce-banner { border-radius: 14px; padding: .8rem 1rem; background: color-mix(in srgb, var(--c-accent) 14%, var(--c-surface)); border: 1px solid color-mix(in srgb, var(--c-accent) 40%, transparent); margin-bottom: .6rem; }
.announce-banner h6 { margin: 0 0 .2rem; font-weight: 800; }
.kbd-hint { font-size: .72rem; color: var(--c-muted); }
@media (max-width: 575px) {
  .app-container { padding: 1rem .75rem 2.5rem; }
  .page-title { font-size: 1.3rem; }
  .space-switch { max-width: 44vw; padding: .3rem .55rem; }
  .brand-name { display: none; }
  .hdr-h5 .brand-name { display: inline; }
}
@media print { .topbar, .calnav, .app-footer, .side-menu { display: none !important; } }

/* Layout picker thumbnails (calendar settings) */
.layout-opt .mini::before, .layout-opt .mini::after { content: ""; position: absolute; }
.lo-h1::before { inset: 0 0 60% 0; background: var(--c-surface); border-bottom: 2px solid var(--c-border); }
.lo-h2::before { inset: 0 0 60% 0; background: linear-gradient(90deg, var(--c-primary), var(--c-accent)); }
.lo-h3::before { left: 0; right: 0; top: 38%; height: 2px; background: var(--c-primary); }
.lo-h4::before { inset: 0 0 55% 0; background: #111; }
.lo-h5::before { left: 35%; right: 35%; top: 6px; height: 6px; border-radius: 3px; background: var(--c-primary); }
.lo-h6::before { left: 20%; right: 20%; top: 5px; height: 9px; border-radius: 9px; background: var(--c-primary); }
.lo-h7::before { inset: 0 0 72% 0; background: var(--c-primary); } .lo-h7::after { left: 0; right: 0; top: 28%; height: 8px; background: var(--c-surface); border-bottom: 1px solid var(--c-border); }
.lo-h8::before { left: 8%; right: 8%; top: 4px; height: 10px; border-radius: 6px; background: var(--c-surface); box-shadow: 0 2px 5px rgba(0,0,0,.2); }
.lo-h9::before { left: 30%; right: 30%; top: 6px; height: 6px; border-top: 1px solid var(--c-primary); border-bottom: 1px solid var(--c-primary); }
.lo-h10::before { inset: 0 0 60% 0; background: color-mix(in srgb, var(--c-primary) 30%, transparent); backdrop-filter: blur(2px); }
.lo-c1::before { inset: 6px 14px; background: var(--c-surface); border-radius: 6px; box-shadow: 0 2px 6px rgba(0,0,0,.15); }
.lo-c2::before { inset: 6px 14px; background: var(--c-surface); border-radius: 14px; }
.lo-c3::before { inset: 6px 14px; border: 1px solid var(--c-border); background: var(--c-surface); }
.lo-c4::before { inset: 6px 14px; border: 2px solid var(--c-text); border-radius: 4px; }
.lo-c5::before { inset: 6px 14px; background: color-mix(in srgb, var(--c-primary) 15%, var(--c-surface)); border-radius: 6px; }
.lo-c6::before { inset: 6px 14px; background: var(--c-surface); border-radius: 14px 2px 14px 2px; }
.lo-c7::before { inset: 6px 14px; background: var(--c-surface); border-left: 4px solid var(--c-primary); }
.lo-c8::before { inset: 6px 14px; background: var(--c-surface); border-top: 5px solid var(--c-primary); border-radius: 4px; }
.lo-c9::before { inset: 5px 12px; border: 3px double var(--c-primary); }
.lo-c10::before { inset: 6px 14px; background: rgba(255,255,255,.5); border: 1px solid rgba(255,255,255,.8); border-radius: 8px; }
.mini[class*="lo-g"]::before { inset: 4px 8px; background-image: linear-gradient(var(--c-border) 1px, transparent 1px), linear-gradient(90deg, var(--c-border) 1px, transparent 1px); background-size: 14px 9px; }
.lo-g2::before { background-image: radial-gradient(circle, var(--c-surface) 4px, transparent 5px) !important; background-size: 14px 10px !important; }
.lo-g3::before { background-image: linear-gradient(var(--c-border) 1px, transparent 1px) !important; background-size: 100% 9px !important; }
.lo-g4::before { border-top: 7px solid var(--c-text); }
.lo-g5::after { right: 8px; top: 4px; bottom: 4px; width: 14px; background: color-mix(in srgb, var(--c-accent) 30%, transparent); }
.lo-g6::before { background-image: radial-gradient(circle, var(--c-border) 3px, transparent 4px) !important; }
.lo-g7::before { background-size: 9px 6px !important; }
.lo-g8::after { left: 14px; top: 12px; width: 30px; height: 6px; border-radius: 6px; background: var(--c-primary); }
.lo-g9::before { background-image: linear-gradient(var(--c-accent) 1px, transparent 1px) !important; background-size: 100% 12px !important; }
.lo-g10::before { background-color: #000; background-image: linear-gradient(#fff 1px, transparent 1px), linear-gradient(90deg, #fff 1px, transparent 1px) !important; }

.cc-inputs { display: grid; grid-template-columns: 1fr 1fr 1fr 1.6fr; gap: .4rem; margin-top: .5rem; }
.cc-inputs .form-control { padding: .35rem .4rem; text-align: center; font-size: .85rem; min-width: 0; }
.cc-row { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: .6rem; }
/* Overlay color rows */
.ov-row { padding: .7rem 0; border-bottom: 1px solid var(--c-border); }
.ov-row:last-of-type { border-bottom: 0; }
.ov-title { margin-bottom: .4rem; }
.ov-colors { display: flex; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.ov-chip { align-self: center; padding: .25rem .6rem; border-radius: 6px; font-size: .8rem; font-weight: 600; }
.saved-chip { display: inline-flex; align-items: center; gap: .25rem; border: 1px solid var(--c-border); border-radius: 10px; padding: .2rem .35rem; }
/* Custom dropdown (#1) */
select.cl-select-native { position: absolute !important; width: 1px !important; height: 1px !important; opacity: 0 !important; pointer-events: none !important; overflow: hidden; clip: rect(0 0 0 0); }
.cl-select-btn { text-align: left; display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; padding-right: 2.25rem; min-width: 7rem; max-width: 100%; cursor: pointer; background-color: var(--c-surface); color: var(--c-text); }
.cl-select-btn.w-auto { display: inline-block; width: auto; }
.cl-select-btn .cl-select-text { display: block; overflow: hidden; text-overflow: ellipsis; }
.cl-sheet-wrap { position: fixed; inset: 0; z-index: 2100; background: rgba(15,23,42,.45); display: flex; align-items: center; justify-content: center; padding: 1rem; animation: clFade .12s ease; }
.cl-sheet { background: var(--c-surface); color: var(--c-text); border-radius: 16px; width: 100%; max-width: 420px; max-height: 80vh; display: flex; flex-direction: column; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.cl-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .9rem 1rem .6rem; border-bottom: 1px solid var(--c-border); }
.cl-sheet-search { padding: .6rem 1rem 0; }
.cl-sheet-list { overflow-y: auto; padding: .4rem .5rem .6rem; }
.cl-sheet-group { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--c-muted); padding: .6rem .6rem .2rem; }
.cl-opt { display: flex; align-items: center; gap: .65rem; padding: .6rem .6rem; border-radius: 10px; cursor: pointer; margin: 0; }
.cl-opt:hover { background: var(--c-soft-2); }
.cl-opt input { width: 1.15rem; height: 1.15rem; flex: none; accent-color: var(--c-primary); }
.cl-opt.disabled { opacity: .5; cursor: default; }
.cl-sheet-foot { display: flex; justify-content: flex-end; gap: .5rem; padding: .7rem 1rem; border-top: 1px solid var(--c-border); }
body.cl-sheet-open { overflow: hidden; }
@keyframes clFade { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 575.98px) {
  .cl-sheet-wrap { align-items: flex-end; padding: 0; }
  .cl-sheet { max-width: none; border-radius: 18px 18px 0 0; max-height: 85vh; padding-bottom: env(safe-area-inset-bottom); animation: clUp .18s ease; }
}
@keyframes clUp { from { transform: translateY(40px); } to { transform: none; } }
/* Calendar nav: wraps, never scrolls sideways (#10); tile grid on phones */
.calnav-inner { flex-wrap: wrap; overflow: visible; }
.cl-menu { padding-bottom: 1rem; }
.cl-menu-item { display: flex; align-items: center; gap: .7rem; width: 100%; padding: .7rem .7rem; border-radius: 10px; color: var(--c-text); text-decoration: none !important; border: 0; background: transparent; text-align: left; font-weight: 600; }
.cl-menu-item:hover { background: var(--c-soft-2); color: var(--c-text); }
.cl-menu-item .bi { font-size: 1.1rem; color: var(--c-primary); width: 1.3rem; text-align: center; }
.cl-menu-item.text-danger .bi, .cl-menu-item.text-danger { color: #dc2626; }
@media (max-width: 767.98px) {
  .calnav { position: static; }
  .calnav-inner { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: .3rem; padding: .5rem; }
  .calnav-link { flex-direction: column; gap: .15rem; padding: .45rem .2rem; font-size: .72rem; white-space: normal; text-align: center; justify-content: center; }
  .calnav-link .bi { font-size: 1.15rem; }
}
/* Never wider than the screen (#12) */
html, body { max-width: 100%; overflow-x: clip; } /* clip, not hidden: keeps the header able to stay locked */
.app-main, .app-container { min-width: 0; max-width: 100%; }
.app-container > * { max-width: 100%; }
img, video, iframe { max-width: 100%; }
.modal-dialog { max-width: min(var(--bs-modal-width, 500px), calc(100vw - 1rem)); }
.modal-lg, .modal-xl { --bs-modal-width: 800px; }
.table-wrap, .table-responsive { max-width: 100%; overflow-x: auto; }
.event-desc, .note-body, .msg-body { overflow-wrap: anywhere; }
.fc { max-width: 100%; }
@media (max-width: 575.98px) {
  .page-head { flex-wrap: wrap; }
  .page-actions { flex-wrap: wrap; }
  .fc .fc-daygrid-day-frame { min-height: 3.2rem; }
  .fc .fc-col-header-cell-cushion { font-size: .68rem; padding: .35rem 0; }
}
/* Calendar note visibility */
.vis-people{max-height:280px;overflow:auto;border:1px solid var(--line,#e5e7eb);border-radius:.5rem;padding:.25rem .5rem}
.vis-person{display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:.3rem 0;border-bottom:1px solid var(--line,#eef0f3)}
.vis-person:last-child{border-bottom:0}
.vis-person .cl-select-btn,.vis-person select{max-width:9rem;flex:0 0 auto}
/* Swipe gallery (announcements) */
.gallery{position:relative;margin:.25rem 0 .75rem}
.gallery-track{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;gap:.5rem;border-radius:.75rem;scrollbar-width:none;-webkit-overflow-scrolling:touch}
.gallery-track::-webkit-scrollbar{display:none}
.gallery-slide{flex:0 0 100%;scroll-snap-align:center;margin:0;background:#0f172a;border-radius:.75rem;display:flex;align-items:center;justify-content:center;max-height:60vh;overflow:hidden}
.gallery-slide img,.gallery-slide video{max-width:100%;max-height:60vh;object-fit:contain;display:block}
.gallery-dots{display:flex;justify-content:center;gap:.35rem;margin-top:.4rem}
.gallery-dots span{width:.45rem;height:.45rem;border-radius:50%;background:#cbd5e1}
.gallery-dots span.on{background:var(--c-primary,#4f46e5)}
/* Announcement banner (compact) */
.announce-banner.compact{display:flex;align-items:center;gap:.75rem;cursor:pointer;padding:.6rem .8rem;text-align:left;width:100%}
.announce-banner.compact .ann-thumb{width:48px;height:48px;border-radius:.5rem;object-fit:cover;flex:0 0 48px;background:#e2e8f0;display:flex;align-items:center;justify-content:center;overflow:hidden}
.announce-banner.compact .ann-thumb img{width:100%;height:100%;object-fit:cover}
.announce-banner.compact .ann-name{font-weight:700;flex:1;min-width:0}
/* Calendar header (#14) */
.cal-head{display:flex;flex-direction:column;align-items:center;gap:.4rem;margin:.25rem 0 .75rem}
.cal-head-row{display:flex;align-items:center;justify-content:center;gap:.5rem;flex-wrap:wrap}
.cal-head h2{font-size:1.35rem;font-weight:800;margin:0}
.day-group{font-size:.75rem;text-transform:uppercase;letter-spacing:.04em;color:var(--muted,#64748b);font-weight:700;margin:.75rem 0 .25rem}
.day-item{display:flex;gap:.6rem;align-items:center;padding:.45rem .5rem;border-radius:.5rem;text-decoration:none;color:inherit}
.day-item:hover{background:rgba(100,116,139,.08)}
.day-item .sw{flex:0 0 .8rem;height:.8rem;border-radius:.25rem}
.day-item .t{font-size:.8rem;color:var(--muted,#64748b);white-space:nowrap}
.task.done .task-title{text-decoration:line-through;opacity:.7}
.task-done-by{font-size:.78rem;color:#15803d;font-weight:600;margin-top:.1rem}
.task-done-by.muted{color:var(--c-muted,#64748b);font-weight:500}
.task .item-main{padding-left:.15rem}
.tree-root-link{display:flex;align-items:center;gap:.4rem;text-decoration:none;color:inherit;border-radius:.5rem;padding:.35rem .5rem}
.tree-root-link:hover{background:var(--c-soft-2)}
.tree-root-link.active{background:var(--c-soft);color:var(--c-primary)}
.flex-none{flex:none}
.feed-row{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.5rem;padding:.6rem 0;border-bottom:1px solid var(--c-border)}
.feed-row:last-of-type{border-bottom:0}
/* Notifications: one row each (#34) */
.notif-row{display:flex;align-items:center;gap:.55rem;width:100%;padding:.6rem .9rem;border:0;border-bottom:1px solid var(--c-border);background:var(--c-surface);color:var(--c-text);text-align:left;font-size:.92rem;min-width:0}
.notif-row:hover{background:var(--c-soft-2)}
.notif-row:last-child{border-bottom:0}
.notif-row .notif-ic{width:30px;height:30px;font-size:.95rem}
.notif-dot{width:8px;height:8px;border-radius:50%;flex:none;background:transparent}
.notif-row.unread{background:color-mix(in srgb,var(--c-primary) 6%,var(--c-surface))}
.notif-row.unread .notif-dot{background:var(--c-primary)}
.notif-row.unread .notif-t1{font-weight:700}
.notif-t1{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:500}
.notif-res{color:var(--c-muted);font-weight:500}
.notif-short{flex:none;color:var(--c-muted);font-size:.78rem}
/* Bell dropdown lives in the (themed) header: always use page text colors inside it */
.topbar .notif-drop, .topbar .notif-drop a:not(.btn), .topbar .notif-drop .notif-row{color:var(--c-text)}
.topbar .notif-drop .notif-more{color:var(--c-primary)}
.topbar .notif-drop .notif-tab{color:var(--c-muted)}
.topbar .notif-drop .notif-tab.active{color:var(--c-primary)}

/* ---------- Locked header + calendar tabs (#28, #30) ---------- */
:root { --hdr-h: var(--topbar-h); --stick-h: var(--topbar-h); }
html { scroll-padding-top: calc(var(--stick-h) + 12px); }
.topbar { position: sticky; top: 0; z-index: 1030; }
.calnav { position: sticky !important; top: var(--hdr-h); z-index: 1020; }
@media (max-width: 767.98px) {
  body.cal-scrolled .calnav-inner { display: flex; flex-wrap: nowrap; overflow-x: auto; gap: .25rem; padding: .3rem .5rem; justify-content: flex-start; }
  body.cal-scrolled .calnav-link { flex: none; padding: .45rem .7rem; }
  body.cal-scrolled .calnav-link span { display: none; }
}
/* Popups: only the title row with the "x" stays put; Cancel/Save stay at the end of the content */
.modal-header { position: sticky; top: 0; z-index: 6; }
.modal-dialog-scrollable { height: auto; }
.modal-dialog-scrollable .modal-content { max-height: none; overflow: visible; }
.modal-dialog-scrollable .modal-body { overflow: visible; }
.modal-content { overflow: visible; }
.modal { scroll-padding-top: 70px; }

/* ---------- Phones held upright: switcher on its own header row (#31) ---------- */
@media (max-width: 767.98px) and (orientation: portrait) {
  .topbar .topbar-inner { display: flex !important; flex-wrap: wrap; row-gap: .35rem; }
  .topbar .brand { order: 1; flex: 1 1 auto; min-width: 0; }
  .topbar .brand-logo { height: 36px; max-width: 55vw; }
  .topbar .brand:has(.brand-logo) .brand-name { display: none; }
  .topbar .brand-name { max-width: 50vw; }
  .topbar .topbar-actions { order: 2; margin-left: auto; grid-column: auto; grid-row: auto; }
  .topbar .space-switch { order: 3; flex: 1 0 100%; max-width: 100%; justify-content: flex-start; }
  .topbar .space-switch .space-label { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; }
}

/* ---------- Back to top (#29) ---------- */
.to-top { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 1040; width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--c-primary); color: var(--c-primary-text); box-shadow: var(--shadow-lg); display: inline-flex; align-items: center; justify-content: center; font-size: 1.2rem; opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity .2s, transform .2s; }
.to-top.show { opacity: .92; transform: none; pointer-events: auto; }
.to-top:hover { opacity: 1; }

/* ---------- Departments + Overlay inside the calendar card (#32) ---------- */
.cal-card-tools { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .6rem; flex-wrap: wrap; }
.cal-card-tools .left { display: flex; align-items: center; gap: .4rem; min-width: 0; }
.table-wrap, .table-responsive, td, th { position: relative; } /* keeps hidden labels inside tables from widening the page */
/* 01.27.01: a table card grows with its rows and never gets its own scrollbar on screens wide enough for the table (the gear menu on the last row used to make it scroll). Narrow screens keep sideways scrolling; their menus open as fixed popups so they are not clipped. */
@media (min-width: 768px) { .table-wrap { overflow: visible; } }
.task-check.disabled { opacity: .35; cursor: default; }
.task-check.disabled:hover { border-color: color-mix(in srgb, var(--c-text) 30%, transparent); }

/* ---------- Master calendar (My Day) ---------- */
.mc { padding: .75rem .75rem .25rem; margin-bottom: 1rem; }
.mc-head { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-bottom: .5rem; }
.mc-title { font-size: 1.1rem; font-weight: 700; margin: 0; }
.mc-legend { display: flex; gap: .35rem; flex-wrap: wrap; min-width: 0; }
.mc-head .mc-legend { flex: 1 0 100%; order: 3; } /* header row: month + gear + move; calendar chips on the row below */
.mc-head { flex-wrap: wrap; } .mc-head .mc-title { flex: 1 1 auto; min-width: 0; }
.mc-chip { display: inline-flex; align-items: center; gap: .3rem; font-size: .72rem; padding: .1rem .45rem; border-radius: 999px; background: var(--c-soft); max-width: 11rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-chip .sw { width: .6rem; height: .6rem; border-radius: 3px; flex: 0 0 auto; }
.mc-dow { display: grid; grid-template-columns: repeat(7, 1fr); font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: var(--c-muted, #6b7280); text-align: center; padding-bottom: .25rem; }
.mc-clip { overflow: hidden; transition: height .45s ease; position: relative; }
.mc-inner { transition: transform .45s ease; will-change: transform; }
.mc .fc .fc-scrollgrid, .mc .fc td, .mc .fc th { border-color: var(--c-border); }
.mc .fc .fc-daygrid-day-frame { min-height: 4.6rem; cursor: pointer; }
.mc .fc .fc-daygrid-day-number { font-size: .78rem; padding: 2px 4px; }
.mc .fc .fc-day-today { background: color-mix(in srgb, var(--c-primary, #4f46e5) 9%, transparent); }
.mc .fc .fc-day-today .fc-daygrid-day-number { background: var(--c-primary, #4f46e5); color: #fff; border-radius: 999px; min-width: 1.5em; text-align: center; margin: 2px; }
.mc .fc .mc-out .fc-daygrid-day-number { opacity: .45; }
.mc .fc .mc-out { background: color-mix(in srgb, var(--c-border) 25%, transparent); }
.mc .fc .fc-daygrid-event { margin: 1px 2px; border-radius: 4px; font-size: .7rem; line-height: 1.25; padding: 0 2px; }
.mc-ev { display: flex; align-items: center; gap: 3px; min-width: 0; overflow: hidden; }
.mc-ev-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc-tag { font-size: .58rem; font-weight: 700; padding: 0 3px; border-radius: 3px; background: rgba(255,255,255,.28); flex: 0 0 auto; letter-spacing: .02em; }
.mc-time { opacity: .85; flex: 0 0 auto; }
.mc .ev-task.mc-task-outline { border-width: 1px; border-style: solid; background: var(--c-surface); }
.mc .ev-task.mc-task-outline .mc-tag { background: currentColor; color: var(--c-surface); }
.mc .ev-overdue { box-shadow: 0 0 0 1px #991b1b inset; font-weight: 600; animation: mcPulse 2.4s ease-in-out infinite; }
@keyframes mcPulse { 50% { filter: brightness(1.15); } }
@media (prefers-reduced-motion: reduce) { .mc-clip, .mc-inner { transition: none; } .mc .ev-overdue { animation: none; } }
.mc .fc .fc-daygrid-more-link { font-size: .68rem; }
.mc-more { display: flex; align-items: center; justify-content: center; gap: .35rem; width: 100%; border: 0; background: none; color: var(--c-primary, #4f46e5); font-weight: 600; font-size: .85rem; padding: .45rem 0 .35rem; }
.mc-more .bi { transition: transform .3s ease; }
.mc-open .mc-more .bi { transform: rotate(180deg); }
.mc-day-overdue { background: color-mix(in srgb, #dc2626 8%, transparent); }
.mc-set-row { display: flex; align-items: center; gap: .6rem; padding: .35rem 0; border-bottom: 1px solid var(--c-border); }
.mc-set-row .color-field { flex: 0 0 auto; }
@media (max-width: 576px) {
  .mc { padding: .5rem .35rem .15rem; }
  .mc .fc .fc-daygrid-day-frame { min-height: 3.9rem; }
  .mc .fc .fc-daygrid-event { font-size: .62rem; }
  .mc-time { display: none; }
}
.mc .fc-event.ev-liked::after { content: none; }

/* #51 Never show an empty card */
.panel:empty, .setting-card:empty, .is-empty-card { display: none !important; }

/* ---------- My Day cards (#50) ---------- */
.day-hero { position: relative; padding-right: 3.6rem; }
.md-gear { position: absolute; top: .7rem; right: .7rem; width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.18); color: inherit; display: inline-flex; align-items: center; justify-content: center; font-size: 1.1rem; }
.md-gear:hover { background: rgba(255,255,255,.3); }
.md-grid { display: flex; flex-direction: column; }
.md-card { min-width: 0; }
.md-head { flex-wrap: nowrap; }
.md-head .panel-title { min-width: 0; margin: 0; overflow-wrap: break-word; flex: 1 1 auto; } /* #92: take the free room (Firefox measured the title a gap too narrow and wrapped its last word) */
.md-acts { display: flex; align-items: center; gap: .5rem; flex: none; }
.md-move { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--c-border); background: var(--c-surface); color: var(--c-muted); display: inline-flex; align-items: center; justify-content: center; cursor: grab; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; flex: none; }
.md-move:hover, .md-move:focus-visible { color: var(--c-primary); border-color: var(--c-primary); }
.md-move.holding { background: var(--c-soft); color: var(--c-primary); }
.md-sub { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--c-muted); margin: .4rem 0 .2rem; }
.md-empty { text-align: center; color: var(--c-muted); padding: .8rem .5rem; }
.md-empty .bi { font-size: 1.6rem; display: block; opacity: .55; margin-bottom: .3rem; }
.md-empty p { margin: 0 0 .6rem; font-size: .92rem; }
.md-sw { width: 12px; height: 12px; border-radius: 4px; flex: none; }
.md-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--c-primary); margin-right: .4rem; vertical-align: middle; }
.md-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
.md-links .md-link { display: flex; flex-direction: column; align-items: center; gap: .25rem; padding: .7rem .3rem; border-radius: 12px; background: var(--c-soft); color: var(--c-text); text-decoration: none; font-size: .85rem; font-weight: 600; }
.md-links .md-link .bi { font-size: 1.35rem; color: var(--c-primary); }
.md-links .md-link:hover { background: color-mix(in srgb, var(--c-primary) 12%, var(--c-surface)); }
.task.is-overdue .task-title { color: var(--bs-danger, #dc3545); }
.flex-none { flex: none; }
/* Wide screens: two columns, cards packed with no big holes (row spans set by myday.js). */
@media (min-width: 992px) {
  .md-grid.is-masonry { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-auto-rows: 4px; column-gap: var(--gap); }
  .md-grid.is-masonry > .md-card { margin-bottom: 0; align-self: start; }
  .md-grid.is-masonry > .md-wide { grid-column: 1 / -1; }
}
/* Dragging */
.md-card.md-dragging { position: fixed !important; z-index: 1080; pointer-events: none; box-shadow: 0 18px 40px rgba(0,0,0,.22); transform: rotate(.6deg) scale(1.01); background: var(--c-surface); opacity: 1; margin: 0 !important; }
.md-ph { border: 2px dashed var(--c-primary); border-radius: var(--radius, 16px); background: color-mix(in srgb, var(--c-primary) 6%, transparent); margin-bottom: var(--gap); }
.md-grid.is-masonry > .md-ph { margin-bottom: 0; }
body.md-drag-on { -webkit-user-select: none; user-select: none; cursor: grabbing; }
.md-card.md-moved { animation: mdFlash 1s ease; }
@keyframes mdFlash { 0% { box-shadow: 0 0 0 3px var(--c-primary); } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { .md-card.md-dragging { transform: none; } .md-card.md-moved { animation: none; } }

/* ---------- Site admin (#53) ---------- */
.layout-admin .topbar.admin-topbar, .layout-admin .admin-topbar .topbar-inner { background: #111827 !important; color: #f9fafb; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; margin: 0 !important; max-width: none !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
.layout-admin .topbar.admin-topbar { padding: 0 !important; position: sticky; top: 0; }
.layout-admin .admin-topbar::before { display: none !important; }
.layout-admin .admin-topbar .brand, .layout-admin .admin-topbar .icon-btn { color: #f9fafb; }
.layout-admin .admin-topbar .brand-name { display: inline !important; color: #f9fafb; }
.admin-back { color: #f9fafb; border: 1px solid rgba(255,255,255,.45); background: rgba(255,255,255,.08); }
.admin-back:hover, .admin-back:focus-visible { color: #111827; background: #f9fafb; border-color: #f9fafb; }
@media (max-width: 420px) { .admin-back span { display: none; } }
.admin-nav-group { font-size: .7rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--c-muted); margin: 1rem .75rem .25rem; }
.admin-filter { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: var(--gap); }
.admin-filter .form-control { flex: 1 1 220px; min-width: 0; }
.admin-filter .form-select { flex: 0 1 230px; }
.admin-row { flex-wrap: wrap; }
.admin-row .item-actions { display: flex; flex-wrap: wrap; gap: .35rem; }
@media (max-width: 575px) { .admin-row .item-actions { width: 100%; justify-content: flex-end; } }
.route-row { padding: .55rem 0; border-bottom: 1px solid var(--c-border); }
.route-row:last-of-type { border-bottom: 0; }
.ct-field { padding: .45rem 0; border-bottom: 1px dashed var(--c-border); }
.theme-sw { width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--c-border); display: inline-block; }
.theme-logo-pv { height: 40px; display: inline-flex; align-items: center; padding: 4px 8px; border: 1px solid var(--c-border); border-radius: 8px; background: #fff; max-width: 100%; }
.theme-logo-pv img { height: 30px; max-width: 200px; object-fit: contain; }
.theme-home-pv { height: 60px; max-width: 100%; object-fit: cover; border-radius: 8px; display: block; }
.admin-person .avatar-lg { flex: none; }

/* ---------- Build design popup (#58) ---------- */
.db-start { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--gap); }
.db-choice { display: flex; flex-direction: column; align-items: flex-start; gap: .35rem; text-align: left; padding: 1.3rem 1.2rem; border: 2px solid var(--c-border); border-radius: var(--radius, 16px); background: var(--c-surface); color: var(--c-text); }
.db-choice:hover:not(:disabled), .db-choice:focus-visible { border-color: var(--c-primary); background: var(--c-soft); }
.db-choice:disabled { opacity: .55; }
.db-choice strong { font-size: 1.1rem; }
.db-choice span:last-child { color: var(--c-muted); font-size: .9rem; }
.db-choice-ic { width: 48px; height: 48px; border-radius: 14px; background: var(--c-soft); color: var(--c-primary); display: inline-flex; align-items: center; justify-content: center; font-size: 1.5rem; }
.db-sizes, .db-tpls { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; }
.db-size, .db-tpl { display: flex; flex-direction: column; align-items: center; gap: .15rem; padding: .7rem .5rem; border: 2px solid var(--c-border); border-radius: 14px; background: var(--c-surface); color: var(--c-text); text-align: center; min-width: 0; }
.db-size:hover, .db-tpl:hover { border-color: color-mix(in srgb, var(--c-primary) 50%, var(--c-border)); }
.db-size.active, .db-tpl.active { border-color: var(--c-primary); background: var(--c-soft); box-shadow: 0 0 0 2px color-mix(in srgb, var(--c-primary) 25%, transparent); }
.db-size strong, .db-tpl strong { font-size: .9rem; line-height: 1.2; overflow-wrap: anywhere; }
.db-size span, .db-tpl span:not(.db-tpl-img) { font-size: .78rem; color: var(--c-muted); }
.db-size small { font-size: .72rem; color: var(--c-muted); line-height: 1.2; }
.db-shape-box { height: 62px; display: flex; align-items: center; justify-content: center; margin-bottom: .2rem; }
.db-shape { display: inline-flex; align-items: center; justify-content: center; border: 2px solid var(--c-primary); border-radius: 5px; background: color-mix(in srgb, var(--c-primary) 10%, transparent); }
.db-shape-custom { width: 46px; height: 46px; border-style: dashed; color: var(--c-primary); font-weight: 800; }
.db-tpl-img { width: 100%; aspect-ratio: 4 / 5; border-radius: 10px; background: var(--c-soft-2); overflow: hidden; display: flex; align-items: center; justify-content: center; margin-bottom: .3rem; }
.db-tpl-img img { width: 100%; height: 100%; object-fit: contain; }
.db-foot { gap: .5rem; flex-wrap: nowrap; }
@media (max-width: 575px) { .db-foot { flex-wrap: wrap; } .db-foot > div { flex-basis: 100%; } .db-sizes, .db-tpls { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Site admin → Design templates ---------- */
.dt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--gap); }
.dt-tile { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius, 16px); overflow: hidden; display: flex; flex-direction: column; }
.dt-tile.is-off { opacity: .65; }
.dt-thumb { aspect-ratio: 4 / 3; background: var(--c-soft-2); display: flex; align-items: center; justify-content: center; font-size: 2rem; color: var(--c-muted); }
.dt-thumb img { width: 100%; height: 100%; object-fit: contain; }
.dt-body { padding: .7rem .8rem; min-width: 0; }

.media-item { position: relative; }
.media-badge { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 50%; background: var(--c-primary); color: var(--c-primary-text, #fff); display: inline-flex; align-items: center; justify-content: center; font-size: .8rem; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.media-item .media-badge .bi { font-size: .8rem !important; width: auto; height: auto; color: inherit; opacity: 1; }

/* ===== 01.12.00 ===== */
/* #64 Personal reminder button (alarm clock) */
.rem-btn { flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 2px; position: relative; width: 34px; height: 34px; padding: 0; border: 1px solid var(--c-border); border-radius: 50%; background: var(--c-surface); color: var(--c-muted, #6b7280); cursor: pointer; transition: background .12s ease, color .12s ease; }
.rem-btn:hover, .rem-btn:focus-visible { background: var(--c-soft-2); color: var(--c-primary); }
.rem-btn .bi { font-size: .95rem; line-height: 1; }
.rem-btn.is-set { color: var(--c-primary); border-color: color-mix(in srgb, var(--c-primary) 45%, var(--c-border)); background: color-mix(in srgb, var(--c-primary) 10%, var(--c-surface)); }
.rem-btn .rem-n { position: absolute; top: -5px; right: -5px; min-width: 16px; height: 16px; padding: 0 3px; border-radius: 8px; background: var(--c-primary); color: var(--c-primary-text, #fff); font-size: .62rem; font-weight: 700; line-height: 16px; text-align: center; }
.rem-btn.rem-tiny { width: 28px; height: 28px; border-color: transparent; background: transparent; }
.rem-btn.rem-tiny .bi { font-size: .85rem; }
.agenda-wrap { display: flex; align-items: center; gap: .25rem; }
.agenda-wrap > .agenda-item { flex: 1 1 auto; min-width: 0; }
.tile-wrap { position: relative; }
.tile-wrap > .tile { height: 100%; }
.tile-wrap > .rem-btn { position: absolute; right: 10px; bottom: 10px; z-index: 2; }
.item-row > .rem-btn, .task .item-actions .rem-btn { margin-left: .25rem; }
.rem-slot { background: var(--c-soft-2); }
#remModal .modal-body .panel { box-shadow: none; }
.media-badge-rem { top: auto; bottom: 30px; right: 6px; background: var(--c-surface); color: var(--c-primary); }
/* #61 Media sections + Design studio */
.media-tabs { flex-wrap: nowrap; overflow-x: auto; gap: .35rem; scrollbar-width: none; }
.media-tabs::-webkit-scrollbar { display: none; }
.media-tabs .nav-link { white-space: nowrap; border-radius: 999px; padding: .4rem .9rem; color: var(--c-text); background: var(--c-soft-2); }
.media-tabs .nav-link.active { background: var(--c-primary); color: var(--c-primary-text, #fff); }
.media-badge-left { right: auto; left: 6px; }
.design-item { border-style: solid; }
.design-item img { width: 100%; height: 100%; object-fit: contain; background: repeating-conic-gradient(var(--c-soft-2) 0 25%, var(--c-surface) 0 50%) 0 0 / 16px 16px; }
.design-item .media-name { white-space: normal; line-height: 1.25; }
.design-item .media-name strong { font-size: .78rem; }
button.media-item { padding: 0; font: inherit; color: inherit; width: 100%; }
.dv-page { display: block; max-width: 100%; height: auto; margin: 0 auto; border: 1px solid var(--c-border); border-radius: 8px; }
.doc-view { background: var(--c-soft-2); }
.doc-view .doc-page { display: block; margin: 0 auto 12px; max-width: 100%; height: auto; background: #fff; box-shadow: 0 1px 6px rgba(0,0,0,.15); }
.doc-text { white-space: pre-wrap; word-break: break-word; background: var(--c-surface); padding: 1rem; border-radius: 8px; margin: 0; font-size: .85rem; }
.no-save img, .no-save video, .no-save canvas { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.shared-view .breadcrumb { font-size: .9rem; }
/* #61 Design slot settings */
.ds-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .15rem 1rem; }
.ds-checks .form-check { margin: 0; }

/* ===== 01.13.00 ===== */
/* #69 Invitation picture in the notice popup */
.nm-invite { display: block; width: 100%; max-height: 60vh; object-fit: contain; margin: .75rem 0 .25rem; border-radius: 12px; border: 1px solid var(--c-border); background: var(--c-soft-2); cursor: zoom-in; }
.nm-more { display: inline-flex; align-items: center; gap: .3rem; margin-top: .5rem; font-weight: 600; }
/* #67 Menus slide in from the right */
.side-menu.offcanvas-end { border-left: 1px solid var(--c-border); }
@media (max-width: 991.98px) { .admin-nav.offcanvas-end { border-right: 0; border-left: 1px solid var(--c-border); } }
/* #70 Header lines up with the page: same width and side margins as the content below */
.topbar-inner, .calnav-inner { max-width: none; }
.topbar-inner { padding-left: 1rem; padding-right: 1rem; }
.hdr-h6 .topbar { padding-left: 1rem; padding-right: 1rem; }
.hdr-h6 .topbar-inner { max-width: none; margin: 0; }
.hdr-h8 .topbar { padding: .6rem 1rem 0; }
.app-footer { max-width: none; }
@media (max-width: 575px) {
  .topbar-inner { padding-left: .75rem; padding-right: .75rem; }
  .hdr-h6 .topbar, .hdr-h8 .topbar { padding-left: .75rem; padding-right: .75rem; }
  .app-footer { padding-left: .75rem; padding-right: .75rem; }
}
/* #68 Designer look preview: like the designer's dark top bar */
.designer-logo-pv { display: inline-flex; align-items: center; gap: .6rem; max-width: 100%; background: #16181d; color: #e8eaf0; border-radius: 10px; padding: .45rem .8rem; font-weight: 600; }
.designer-logo-pv img { height: 30px; max-width: 160px; object-fit: contain; }
.designer-logo-pv span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* #66 Design template popup: steps, file cards */
.dt-step { display: flex; align-items: center; gap: .55rem; margin-bottom: .5rem; }
.dt-step h6 { margin: 0; font-weight: 700; }
.dt-num { width: 24px; height: 24px; border-radius: 50%; background: var(--c-primary); color: var(--c-primary-text, #fff); display: inline-flex; align-items: center; justify-content: center; font-size: .8rem; font-weight: 700; }
.dt-file { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; padding: .75rem; border: 1px dashed var(--c-border); border-radius: 12px; background: var(--c-soft-2); }
.dt-file.is-ok { border-style: solid; border-color: color-mix(in srgb, #16a34a 45%, var(--c-border)); background: color-mix(in srgb, #16a34a 7%, var(--c-surface)); }
.dt-file.is-bad { border-style: solid; border-color: color-mix(in srgb, #dc2626 45%, var(--c-border)); background: color-mix(in srgb, #dc2626 6%, var(--c-surface)); }
.dt-file-ic { font-size: 1.6rem; color: var(--c-muted); line-height: 1; }
.dt-file.is-ok .dt-file-ic { color: #16a34a; }
.dt-file.is-bad .dt-file-ic { color: #dc2626; }
.dt-thumb-pv { width: 64px; height: 64px; border-radius: 10px; border: 1px solid var(--c-border); background: var(--c-surface); display: flex; align-items: center; justify-content: center; overflow: hidden; color: var(--c-muted); font-size: 1.4rem; flex: none; }
.dt-thumb-pv img { width: 100%; height: 100%; object-fit: cover; }
.dt-size { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; font-size: .9rem; color: var(--c-muted); }
.dt-size strong { color: var(--c-text); }
/* 01.14.00 Quick links card spans the full width: one row of links on wider screens */
@media (min-width: 768px) { .md-wide .md-links { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

/* 01.15.00 — #75 My tasks sections, move popup, shared lists */
.section-title .section-title-btn { text-transform: none; letter-spacing: 0; font-weight: 600; padding: .1rem .5rem; }
.move-list .item-row { gap: .6rem; align-items: center; cursor: pointer; }
.move-list .item-row[hidden] { display: none !important; }
.move-list .sw { width: .7rem; height: .7rem; border-radius: 50%; flex: 0 0 auto; display: inline-block; }
.task-list-card .panel-title .list-share-chip { font-size: .7rem; font-weight: 600; vertical-align: middle; }

/* 01.15.00 — #76 Design templates in category folders + zip import */
.dt-crumb { font-size: .85rem; margin-bottom: .2rem; }
.dt-crumb a { text-decoration: none; }
.dt-folders { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: var(--gap); }
.dt-folder { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius, 16px); overflow: hidden; display: flex; flex-direction: column; color: inherit; text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.dt-folder:hover, .dt-folder:focus { border-color: var(--c-primary); box-shadow: 0 4px 14px rgba(0,0,0,.06); color: inherit; text-decoration: none; }
.dt-folder:hover * { text-decoration: none; }
.dt-folder-pics { aspect-ratio: 4 / 3; background: var(--c-soft-2); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 2px; overflow: hidden; }
.dt-folder-pics img { min-width: 0; min-height: 0; }
.dt-folder-pics img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dt-folder-pics img:only-child { grid-column: 1 / -1; grid-row: 1 / -1; }
.dt-folder-pics.is-empty { display: flex; align-items: center; justify-content: center; font-size: 2.4rem; color: var(--c-muted); }
.dt-folder-body { padding: .7rem .85rem; }
.dt-folder-new { align-items: center; justify-content: center; gap: .4rem; min-height: 140px; border-style: dashed; font-weight: 600; color: var(--c-muted); font-size: 1rem; }
.dt-folder-new .bi { font-size: 1.8rem; }
.dt-zip-pick { cursor: pointer; }
.dti-sum .chip { font-size: .8rem; }
.dt-thumb { overflow: hidden; }
.dt-thumb img { min-height: 0; max-height: 100%; display: block; }
@media (max-width: 575px) { .dt-grid, .dt-folders { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; } .dt-folder-body, .dt-body { padding: .55rem .6rem; } }

/* 01.15.01 — template category tools */
.dt-folder { position: relative; }
.dt-folder-link { display: flex; flex-direction: column; flex: 1; color: inherit; text-decoration: none; }
.dt-folder-link:hover, .dt-folder-link:focus { color: inherit; text-decoration: none; }
.dt-folder-menu { position: absolute; top: .45rem; right: .45rem; z-index: 2; }
.dt-folder-gear { background: rgba(255,255,255,.92); border: 1px solid var(--c-border); border-radius: 999px; width: 2rem; height: 2rem; padding: 0; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.dt-folder-gear:hover { background: #fff; }
.dt-cat-list .item-row { align-items: center; gap: .6rem; }
.dt-cat-num { width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--c-soft-2); color: var(--c-muted); font-size: .75rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.dt-cat-list .item-actions { display: flex; gap: .1rem; flex-wrap: nowrap; }

/* 01.15.02 — #77 "Use a template": category dropdown + search on one line */
.db-tpl-filter { display: flex; gap: .5rem; align-items: stretch; }
.db-tpl-filter .db-tpl-cat { flex: 0 1 45%; min-width: 0; }
.db-tpl-filter .db-tpl-cat[hidden] { display: none; }
.db-tpl-filter .db-tpl-cat .cl-select-btn { width: 100%; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.db-tpl-filter [data-db-q] { flex: 1 1 auto; min-width: 0; }
@media (max-width: 575px) { .db-tpl-filter { flex-direction: column; } .db-tpl-filter .db-tpl-cat { flex-basis: auto; } }

/* #78 (01.16.00) Calendar gear (replaces the Manage tab) + Calendar view icons in its sheet */
.cal-head-top{display:grid;grid-template-columns:1fr auto 1fr;width:100%;align-items:center}
.cal-head-top h2{text-align:center}
.cal-gear-slot{justify-self:end;display:flex}
.cal-gear{display:inline-flex;align-items:center;justify-content:center;width:42px;height:42px;flex:none;border-radius:12px;border:1px solid var(--c-border);background:var(--c-surface);color:var(--c-primary);font-size:1.3rem;box-shadow:0 1px 3px rgba(0,0,0,.08);cursor:pointer;transition:background .15s}
@media (hover:hover){.cal-gear:hover{background:var(--c-soft)}}
.cal-gear.active{background:var(--c-primary);color:var(--c-primary-text);border-color:var(--c-primary)}
.cal-gear-row{display:flex;justify-content:flex-end;margin:-.25rem 0 .5rem}
.cal-views{display:grid;grid-template-columns:repeat(4,1fr);gap:.5rem;padding:.25rem .1rem .5rem}
.cal-view-tile{display:flex;flex-direction:column;align-items:center;gap:.25rem;padding:.6rem .25rem;border:1px solid var(--c-border);border-radius:12px;background:var(--c-surface);color:var(--c-text);font-size:.8rem;font-weight:600;cursor:pointer}
.cal-view-tile .bi{font-size:1.35rem;color:var(--c-muted)}
.cal-view-tile:hover{background:var(--c-soft-2)}
.cal-view-tile.active{border-color:var(--c-primary);background:var(--c-soft);color:var(--c-primary)}
.cal-view-tile.active .bi{color:var(--c-primary)}
.page-head.has-cal-gear{position:relative}
@media (max-width:767.98px){
  .page-head.has-cal-gear > :first-child{padding-right:52px}
  .page-head.has-cal-gear .cal-gear{position:absolute;top:0;right:0}
  .page-head.has-cal-gear .page-actions{padding-right:52px} /* 01.27.02: keep the page's own buttons (New event...) clear of the corner gear */
}

/* #79 (01.17.00) Email templates */
.et-subj{color:var(--c-text)}
.et-looks{display:grid;grid-template-columns:repeat(4,1fr);gap:.6rem}
@media (max-width:767.98px){.et-looks{grid-template-columns:repeat(2,1fr)}}
.et-look{display:block;cursor:pointer;margin:0}
.et-look input{position:absolute;opacity:0;pointer-events:none}
.et-look-card{display:flex;flex-direction:column;gap:.2rem;height:100%;padding:.5rem;border:1px solid var(--c-border);border-radius:12px;background:var(--c-surface)}
.et-look-card strong{font-size:.85rem}
.et-look-card small{font-size:.72rem;color:var(--c-muted);line-height:1.25}
.et-look input:checked + .et-look-card{border-color:var(--c-primary);box-shadow:0 0 0 2px var(--c-primary) inset;background:var(--c-soft)}
.et-look input:focus-visible + .et-look-card{outline:2px solid var(--c-primary);outline-offset:2px}
.et-thumb{position:relative;display:block;height:64px;border-radius:8px;background:#eef0f4;overflow:hidden;margin-bottom:.25rem}
.et-thumb i,.et-thumb b,.et-thumb s,.et-thumb u{position:absolute;display:block;left:14%;right:14%}
.et-thumb b{top:10px;bottom:6px;background:#fff;border-radius:4px}
.et-thumb i{top:10px;height:13px;background:var(--c-primary);border-radius:4px 4px 0 0;z-index:1}
.et-thumb s{left:22%;right:30%;height:3px;background:#cbd2dc;z-index:1;top:30px}
.et-thumb s + s{top:37px;right:42%}
.et-thumb u{left:22%;width:24%;right:auto;height:7px;top:46px;background:var(--c-primary);border-radius:3px;z-index:1}
.et-thumb-clean i{height:3px}
.et-thumb-bold i{height:24px}
.et-thumb-bold s{top:39px}.et-thumb-bold s + s{top:45px}.et-thumb-bold u{top:52px;border-radius:6px}
.et-thumb-minimal{background:#fff;border:1px solid var(--c-border)}
.et-thumb-minimal i{height:3px;background:#9ca3af;right:60%;top:12px}
.et-thumb-minimal b{background:transparent}
.et-vars{display:flex;flex-wrap:wrap;gap:.35rem}
.et-var{display:inline-flex;flex-direction:column;align-items:flex-start;gap:0;padding:.3rem .55rem;border:1px solid var(--c-border);border-radius:10px;background:var(--c-soft-2);font:600 .8rem/1.2 ui-monospace,SFMono-Regular,Menlo,monospace;color:var(--c-primary);cursor:pointer}
.et-var small{font:400 .68rem/1.2 inherit;font-family:inherit;color:var(--c-muted);font-family:system-ui,sans-serif}
.et-var:hover{background:var(--c-soft)}
.et-preview{border:1px solid var(--c-border);border-radius:12px;overflow:hidden;background:#fff}
.et-preview-head{display:flex;gap:.5rem;align-items:center;justify-content:space-between;padding:.4rem .6rem;border-bottom:1px solid var(--c-border);background:var(--c-soft-2);min-width:0}
.et-preview iframe{display:block;width:100%;height:440px;border:0;background:#fff}
@media (max-width:991.98px){.et-preview iframe{height:380px}}

/* #81 (01.18.00) Design templates: subcategories + select several templates */
.dt-subhead { font-size: .95rem; font-weight: 700; color: var(--c-muted); margin: 0 0 .6rem; display: flex; align-items: center; gap: .4rem; }
.dt-tile { position: relative; }
.dt-check { position: absolute; top: .45rem; left: .45rem; z-index: 2; margin: 0; width: 2rem; height: 2rem; border-radius: 10px; background: color-mix(in srgb, var(--c-surface) 88%, transparent); box-shadow: 0 1px 4px rgba(0,0,0,.15); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.dt-check .form-check-input { margin: 0; width: 1.15rem; height: 1.15rem; cursor: pointer; }
.dt-tile.is-picked { border-color: var(--c-primary); box-shadow: 0 0 0 2px var(--c-primary); opacity: 1; }
.dt-selbar { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; margin: 0 0 .6rem; }
.dt-bulk { position: sticky; bottom: calc(.75rem + env(safe-area-inset-bottom, 0px)); z-index: 20; margin-top: 1rem; display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: 14px; padding: .55rem .7rem; box-shadow: 0 8px 28px rgba(0,0,0,.18); }
.dt-bulk[hidden] { display: none; }
.dt-cat-row { padding-left: calc(var(--dt-depth, 0) * 1.1rem); }
@media (max-width: 575px) { .dt-bulk { gap: .3rem; } .dt-bulk .btn { padding: .3rem .55rem; } }

/* #82 (01.19.00) "Use a template" popup: Filter link + filter sheet */
.db-filter-links { display: flex; align-items: center; gap: .1rem; flex: none; }
.db-filter-links[hidden] { display: none; }
.db-filter-link, .db-filter-clear { padding: .25rem .4rem; text-decoration: none; white-space: nowrap; font-weight: 600; }
.db-filter-link.is-on { color: var(--c-primary); }
.db-filter-clear { font-weight: 400; font-size: .9rem; color: var(--c-muted); }
.db-fsheet .cl-sheet-group { display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap; }
.db-fhint { font-weight: 400; text-transform: none; letter-spacing: 0; }
.db-fchips { display: flex; flex-wrap: wrap; gap: .4rem; padding: .25rem .6rem .5rem; }
.db-fchip { border: 1px solid var(--c-border); background: var(--c-surface); color: var(--c-text); border-radius: 999px; padding: .35rem .8rem; font-size: .9rem; line-height: 1.2; display: inline-flex; align-items: center; gap: .35rem; }
.db-fchip:hover:not(:disabled) { border-color: var(--c-primary); }
.db-fchip.active { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.db-fchip:disabled { opacity: .45; cursor: default; }
.db-fchip-n { font-size: .75rem; opacity: .75; }
.db-fsheet .cl-sheet-foot { display: flex; justify-content: space-between; gap: .5rem; padding: .7rem 1rem; border-top: 1px solid var(--c-border); }
@media (max-width: 575px) { .db-filter-links { justify-content: flex-end; } }
.db-tpl-filter .db-tpl-cat { flex: 0 1 260px; min-width: 200px; }
@media (max-width: 575px) { .db-tpl-filter .db-tpl-cat { flex-basis: auto; min-width: 0; } .db-filter-links { margin-top: -.25rem; } }

/* #84 (01.19.03) master calendar: "Show all its tasks" per calendar; other people's tasks faded */
.mc-full { margin-top: .2rem !important; font-size: .85rem; }
.mc-full .form-check-input { transform: scale(.85); transform-origin: left center; }
.mc-full.is-off { opacity: .45; }
.mc .ev-task.mc-task-other { opacity: .5; border-style: dashed; }
.day-item.mc-day-other { opacity: .6; }

/* #85 (01.20.00) several people on a calendar task */
.ta-people { max-height: 45vh; overflow-y: auto; border: 1px solid var(--c-border); border-radius: 12px; padding: .35rem .75rem; }
.ta-person { padding: .35rem 0 .35rem 1.9rem; margin: 0; border-bottom: 1px solid var(--c-border); }
.ta-person:last-child { border-bottom: 0; }
/* 01.21.00: pick folders (Design templates) */
.dt-folder.is-picked { border-color: var(--c-primary); box-shadow: 0 0 0 2px var(--c-primary); }
.dt-folder > .dt-check { left: .45rem; top: .45rem; }
/* 01.22.00 (#91): the My Day icon in the header shows when you are on My Day */
.topbar .icon-btn.is-active { background: color-mix(in srgb, currentColor 14%, transparent); }
#quickAddModal .cl-menu-item { width: 100%; }
/* 01.22.00 (#93) Idle slideshow */
.ss-wrap { position: fixed; inset: 0; z-index: 3000; background: #000; opacity: 0; transition: opacity .3s ease; cursor: none; overflow: hidden; touch-action: none; }
.ss-wrap.ss-in { opacity: 1; }
.ss-stage { position: absolute; inset: 0; }
.ss-slide { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; opacity: 0; }
.ss-slide img, .ss-slide video { width: 100%; height: 100%; object-fit: contain; display: block; background: #000; }
.ss-fit-cover .ss-slide img, .ss-fit-cover .ss-slide video { object-fit: cover; }
.ss-t-none .ss-slide.ss-show { opacity: 1; }
.ss-t-fade .ss-slide { transition: opacity .8s ease; }
.ss-t-fade .ss-slide.ss-show { opacity: 1; }
.ss-t-slide .ss-slide { opacity: 1; transform: translateX(100%); transition: transform .8s ease; }
.ss-t-slide .ss-slide.ss-show { transform: translateX(0); }
.ss-t-slide .ss-slide.ss-out { transform: translateX(-100%); }
.ss-name { position: absolute; left: 1.2rem; bottom: 1rem; color: #fff; font-size: 1.1rem; font-weight: 600; text-shadow: 0 1px 6px rgba(0,0,0,.8); max-width: 80%; pointer-events: none; }
body.ss-on { overflow: hidden; }
@media (prefers-reduced-motion: reduce) { .ss-t-fade .ss-slide, .ss-t-slide .ss-slide { transition: none; } }
.media-ss-chip { font-size: .8rem; line-height: 1; padding: .2rem .3rem; border-radius: 999px; color: var(--c-muted); flex: none; }
.media-ss-chip.is-active { color: var(--c-primary); background: var(--c-soft); }

/* 01.22.01 (#94) One folder look everywhere: an open manila folder (tab, back panel, tilted front pocket, pictures peeking out). */
.fi { --fc: #f5b93a; --fb: color-mix(in srgb, var(--fc) 78%, #000); display: inline-block; position: relative; width: 1.3em; height: 1em; vertical-align: -.14em; flex: none; line-height: 1; }
.fi::before { content: ""; position: absolute; left: 0; top: 0; width: 50%; height: 30%; background: var(--fb); border-radius: 2px 2px 0 0; }
.fi::after { content: ""; position: absolute; left: 0; right: 0; top: 14%; bottom: 0; background: var(--fb); border-radius: 0 2px 2px 2px; }
.fi i { position: absolute; left: 0; right: 0; top: 38%; bottom: 0; z-index: 1; background: var(--fc); border-radius: 2px; clip-path: polygon(4% 0, 96% 0, 100% 100%, 0 100%); }
.fi-lg { font-size: 3rem; }
.media-item .fi-lg { font-size: 3.2rem; }
.feature .fi { font-size: 1.3rem; margin-top: .1rem; }
.tree-row .fi { font-size: 1.15rem; }
.task-list-card .panel-title .fi { font-size: 1.15rem; }
.chip .fi { font-size: .95em; }
.dt-subhead .fi, .dt-crumb .fi { font-size: 1.05em; }

/* big folder card (Design templates categories) */
.dt-folder[data-df-folder] { background: none; border: 0; border-radius: 0; overflow: visible; box-shadow: none; }
.dt-folder[data-df-folder]:hover, .dt-folder[data-df-folder]:focus { border: 0; box-shadow: none; }
.dt-folder[data-df-folder].is-picked { box-shadow: none; }
.dt-folder[data-df-folder].is-picked .fd { filter: drop-shadow(0 0 0 var(--c-primary)) drop-shadow(0 0 3px var(--c-primary)) drop-shadow(0 0 3px var(--c-primary)); }
.fd { --fc: #f5b93a; --fb: color-mix(in srgb, var(--fc) 78%, #000); --ink: color-mix(in srgb, var(--fc) 22%, #000); position: relative; aspect-ratio: 1.12 / 1; transition: transform .15s; }
.dt-folder:hover .fd { transform: translateY(-2px); }
.fd-tab { position: absolute; left: 0; top: 0; width: 44%; height: 16%; border-radius: 9px 9px 0 0; background: var(--fb); }
.fd-back { position: absolute; left: 0; right: 0; top: 10%; bottom: 0; border-radius: 0 10px 10px 10px; background: var(--fb); }
.fd-pics { position: absolute; left: 6%; right: 6%; top: 15%; height: 50%; display: flex; gap: 3px; padding: 4px; background: #fff; border-radius: 4px; box-shadow: 0 1px 2px rgba(0,0,0,.25); overflow: hidden; }
.fd-pics img { flex: 1 1 0; min-width: 0; height: 100%; object-fit: cover; border-radius: 3px; display: block; }
.fd-front { position: absolute; left: 0; right: 0; top: 42%; bottom: 0; background: var(--fc); color: var(--ink); border-radius: 10px; padding: .45rem .75rem; display: flex; flex-direction: column; justify-content: center; clip-path: polygon(2.5% 0, 97.5% 0, 100% 100%, 0 100%); box-shadow: inset 0 1px 0 rgba(255,255,255,.4); }
.fd-name { font-weight: 700; font-size: .95rem; line-height: 1.2; }
.fd-sub { font-size: .75rem; opacity: .8; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dt-folder[data-df-folder] .dt-check { top: .75rem; }
.dt-folder[data-df-folder] .dt-folder-menu { top: .75rem; }
@media (max-width: 575px) { .fd-name { font-size: .85rem; } .fd-front { padding: .35rem .55rem; } }

/* 01.22.02 (#95) Folder lists: colour rail cards. Each top folder is a card with a thick edge in the folder's colour;
   its sub-folders sit inside the card. Compact rows; the up / down / gear buttons stay but are small squares. */
.tree-toggle { height: 28px; width: 22px; display: inline-flex; align-items: center; justify-content: center; flex: none; line-height: 1; padding: 0; }
.tree-toggle .bi { font-size: .8rem; line-height: 1; }
.tree-row { min-height: 36px; padding: .15rem .35rem; gap: .35rem; }
.tree-row > a { min-width: 0; line-height: 1.2; }
.tree-row .btn-ghost { width: 28px; height: 28px; padding: 0; display: inline-flex; align-items: center; justify-content: center; flex: none; border-radius: 8px; line-height: 1; }
.tree-row .btn-ghost .bi { font-size: .95rem; line-height: 1; }
.tree-row .dropdown { flex: none; line-height: 1; }
.tree .tree { padding-left: 1.15rem; }
.tree-top, .tree-top .tree { margin: 0; }
.tree-top > .tree-node, .tree-card { border: 1px solid var(--c-border); border-left: 5px solid var(--rail, #f5b93a); border-radius: 4px 12px 12px 4px; background: var(--c-surface); margin: .4rem 0; padding: .1rem .15rem .15rem; }
.tree-top > .tree-node:has(> .tree-row.active), .tree-card:has(> .tree-row.active) { background: var(--c-soft); }
.tree-top > .tree-node > .tree-row:hover { background: transparent; }
.tree-top .tree .tree-row { min-height: 34px; border-top: 1px solid var(--c-border); border-radius: 0; }
.tree-top .tree .tree .tree-row { border-top-style: dashed; }
.tree-top .tree-row.active { background: var(--c-soft); }
.tree-top > .tree-node > .tree-row.active { background: transparent; }
.tree-top .tree .tree-row .fi { font-size: 1rem; }
.tree-card .tree-row { background: transparent !important; }
aside.panel > .tree-row { margin: .1rem 0; }
@media (max-width: 575px) { .tree-row .btn-ghost { width: 30px; height: 30px; } .tree-row { gap: .25rem; } }

/* 01.25.02: the document viewer can open on top of another popup (note, task, event). */
#docModal { z-index: 1070; }
.modal-backdrop ~ .modal-backdrop { z-index: 1065; }

/* 01.25.03: upload bar — shown while any file uploads (CL.upload in app.js); file pickers are locked meanwhile. */
.cl-upbar { position: fixed; z-index: 2100; left: 50%; top: calc(env(safe-area-inset-top, 0px) + 12px); transform: translate(-50%, -140%); width: min(440px, calc(100vw - 32px)); background: var(--c-surface, #fff); color: inherit; border: 1px solid color-mix(in srgb, var(--c-primary) 30%, transparent); border-radius: 14px; box-shadow: var(--shadow-lg, 0 8px 30px rgba(0,0,0,.18)); padding: .65rem .85rem .6rem; transition: transform .2s ease-out; pointer-events: none; }
.cl-upbar.show { transform: translate(-50%, 0); }
.cl-upbar-row { display: flex; align-items: center; gap: .55rem; font-size: .9rem; font-weight: 600; }
.cl-upbar-row .spinner-border { color: var(--c-primary); flex: none; }
.cl-upbar-text { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-upbar-pct { flex: none; font-variant-numeric: tabular-nums; color: var(--c-primary); }
.cl-upbar-track { height: 8px; border-radius: 99px; background: var(--c-soft-2, rgba(0,0,0,.08)); margin-top: .45rem; overflow: hidden; }
.cl-upbar-fill { height: 100%; width: 0; border-radius: 99px; background: var(--c-primary); transition: width .2s linear; }
.cl-upbar.is-saving .cl-upbar-fill { background-image: linear-gradient(45deg, rgba(255,255,255,.3) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.3) 50%, rgba(255,255,255,.3) 75%, transparent 75%, transparent); background-size: 16px 16px; animation: clUpStripes .8s linear infinite; }
.cl-upbar-note { font-size: .75rem; color: var(--c-muted, #6b7280); margin-top: .3rem; }
@keyframes clUpStripes { from { background-position: 0 0; } to { background-position: 16px 0; } }
body.cl-uploading label:has(> input[type=file]), body.cl-uploading input[type=file] { opacity: .55; cursor: progress; }
@media (prefers-reduced-motion: reduce) { .cl-upbar { transition: none; } .cl-upbar.is-saving .cl-upbar-fill { animation: none; } }

/* 01.25.04: note cards — buttons in one centred row on top, then the full-width title, then the text. */
.note-card-tools { display: flex; align-items: center; justify-content: center; gap: .15rem; margin: -.3rem -.4rem .1rem; padding-bottom: .3rem; border-bottom: 1px solid var(--c-border); cursor: default; }
.note-card h6 { overflow-wrap: break-word; word-break: normal; hyphens: auto; line-height: 1.25; }

/* 01.25.05: one line per Enter. The editor makes a paragraph for each Enter; paragraphs get no extra gap,
   in the editor and wherever the text is shown. An empty line (Enter twice) still makes a gap. */
.note-editor .note-editable p, .event-desc p, .note-body p, .live-note p, .rich-view p { margin: 0; }
.note-editor .note-editable ul, .note-editor .note-editable ol, .event-desc ul, .event-desc ol, .note-body ul, .note-body ol, .live-note ul, .live-note ol, .rich-view ul, .rich-view ol { margin: 0; padding-left: 1.4rem; }
.note-editor .note-editable h1, .note-editor .note-editable h2, .note-editor .note-editable h3, .note-editor .note-editable h4, .note-editor .note-editable h5, .note-editor .note-editable h6,
.event-desc :is(h1,h2,h3,h4,h5,h6), .note-body :is(h1,h2,h3,h4,h5,h6), .live-note :is(h1,h2,h3,h4,h5,h6), .rich-view :is(h1,h2,h3,h4,h5,h6) { margin: .3rem 0 0; }
.note-editor .note-editable blockquote, .event-desc blockquote, .note-body blockquote, .rich-view blockquote { margin: 0 0 0 .4rem; padding-left: .7rem; border-left: 3px solid var(--c-border); }

/* 01.26.00 (#101) My Day pins */
.mdp-list .mdp-row { gap: .5rem; align-items: center; }
.mdp-ic { flex: none; width: 1.9rem; height: 1.9rem; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; background: var(--c-soft); color: var(--c-primary); }
.mdp-row .item-main { min-width: 0; }
.mdp-row .item-title { overflow-wrap: anywhere; }
.mdp-state { margin-left: .35rem; font-size: .72rem; vertical-align: middle; }
.mdp-sub { display: block; }
.mdp-acts { flex: none; display: inline-flex; align-items: center; gap: .1rem; margin-left: auto; }
.mdp-row.is-finished .mdp-ic, .mdp-row.is-finished .item-main { opacity: .55; }
.mdp-row.is-finished .item-title { text-decoration: line-through; }
.mdp-card.is-compact .mdp-sub { display: none; }
.mdp-steps { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--c-border); margin-top: .4rem; padding-top: .3rem; }
.mdp-pop .mdp-card { box-shadow: none; border: 0; padding: 0; margin: 0; }
.mdp-pop .mdp-card .md-move { display: none; }
/* Stand-alone "Pin to My Day" icon (items without a gear): a little bolder than our usual icon buttons. */
.mdpin-btn { display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; border-radius: 50%; border: 1.5px solid color-mix(in srgb, var(--c-primary) 45%, transparent); background: color-mix(in srgb, var(--c-primary) 10%, var(--c-surface)); color: var(--c-primary); font-size: 1rem; flex: none; cursor: pointer; }
.mdpin-btn:hover { background: color-mix(in srgb, var(--c-primary) 18%, var(--c-surface)); }
.mdpin-btn.is-on { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }
.chip-check { display: inline-flex; align-items: center; gap: .3rem; padding: .25rem .6rem; border: 1px solid var(--c-border); border-radius: 99px; font-size: .85rem; cursor: pointer; }
.mdp-pop .md-head .panel-title { visibility: hidden; }

/* 01.26.01: PDF viewer zoom (buttons, two fingers, mouse wheel) and moving around when zoomed. */
.doc-view { touch-action: pan-x pan-y; overflow: auto; position: relative; }
.doc-zoom { margin: 0 auto; padding-bottom: 3.5rem; }
.doc-zoom .doc-page { max-width: none; }
.doc-view.is-zoomed { cursor: grab; }
.doc-view.is-dragging { cursor: grabbing; user-select: none; }
.doc-zoombar { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 5; display: flex; align-items: center; gap: .2rem; padding: .25rem .35rem; border-radius: 99px; background: rgba(31, 35, 48, .88); color: #fff; box-shadow: var(--shadow-lg); }
.doc-zoombar[hidden] { display: none; }
.doc-zoombar button { border: 0; background: transparent; color: #fff; width: 2.4rem; height: 2.4rem; border-radius: 50%; font-size: 1.15rem; display: inline-flex; align-items: center; justify-content: center; }
.doc-zoombar button:hover, .doc-zoombar button:focus-visible { background: rgba(255, 255, 255, .16); }
.doc-zoombar span { min-width: 3.4rem; text-align: center; font-size: .85rem; font-variant-numeric: tabular-nums; }
#docModal .modal-content { position: relative; }
/* The document viewer scrolls inside its own body (needed for zoom and moving around), with the header and zoom bar fixed. */
#docModal .modal-dialog { height: calc(100% - 3.5rem); }
#docModal .modal-content { height: 100%; max-height: none; overflow: hidden; display: flex; flex-direction: column; }
#docModal .modal-body.doc-view { overflow: auto; flex: 1 1 auto; min-height: 0; }
@media (max-width: 767.98px) { #docModal .modal-dialog { height: 100%; } }
#docModal { padding-right: 0 !important; } /* no gap on the right on phones (Bootstrap scrollbar padding) */
@media (max-width: 767.98px) { #docModal .modal-dialog { max-width: none; width: 100vw; margin: 0; } }

/* 01.26.02: events and tasks stay inside their day box (month grids: calendar pages, master calendar, public calendar).
   Text that doesn't fit is cut with "…"; events that really span several days still stretch across them. */
.fc .fc-daygrid-day-events { min-width: 0; }
/* 01.26.03: no max-width on the event holder — events lasting several days are one holder stretched across the days */
.fc .fc-daygrid-event-harness:not(.fc-daygrid-event-harness-abs) { overflow: hidden; }
.fc .fc-daygrid-dot-event { overflow: hidden; min-width: 0; max-width: 100%; }
.fc .fc-daygrid-dot-event .fc-event-time, .fc .fc-daygrid-dot-event .fc-event-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fc .fc-daygrid-dot-event .fc-event-time { flex: 0 1 auto; }
.fc .fc-daygrid-dot-event .fc-event-title { flex: 1 1 0; }
.fc .fc-daygrid-dot-event .fc-daygrid-event-dot { flex: none; }
.fc .fc-daygrid-block-event .fc-event-main, .fc .fc-daygrid-block-event .fc-event-main-frame { min-width: 0; overflow: hidden; }
.fc .fc-daygrid-block-event .fc-event-time, .fc .fc-daygrid-block-event .fc-event-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 575.98px) {
  .fc .fc-daygrid-event { font-size: .68rem; padding-left: 1px; padding-right: 1px; }
  .fc .fc-daygrid-dot-event .fc-daygrid-event-dot { margin: 0 2px 0 0; border-width: 3px; }
}

/* ---------- 01.27.00 (#102) Calendar event styles (evs-*) and task styles (tks-*) ----------
   Colors come from the feed through --evc (event/list color) and --evt (text on that color). */
.fc .fc-event.evs:not(.fc-list-event), .fc .fc-event.tks:not(.fc-list-event) { --evc: var(--c-event-bg); --evt: var(--c-event-text); }
.fc .fc-event.evs:not(.fc-list-event), .fc .fc-event.tks:not(.fc-list-event) { box-shadow: none; }
.fc .fc-event.evs .fc-event-main, .fc .fc-event.tks .fc-event-main { color: inherit !important; } /* FullCalendar puts the text color inline */
/* Events */
.fc .fc-event.evs-dot:not(.fc-list-event) { background: transparent !important; border: 0 !important; color: var(--c-text) !important; display: flex; align-items: center; }
.fc .fc-event.evs-dot:not(.fc-list-event)::before { content: ''; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--evc); margin: 0 3px 0 1px; }
.fc .fc-event.evs-dot .fc-event-time, .fc .fc-event.evs-dot .mc-time { color: var(--evc); font-weight: 600; }
.fc .fc-event.evs-solid:not(.fc-list-event) { background: var(--evc) !important; border: 1px solid var(--evc) !important; color: var(--evt) !important; }
.fc .fc-event.evs-soft:not(.fc-list-event) { background: color-mix(in srgb, var(--evc) 16%, var(--c-surface)) !important; border: 0 !important; border-left: 3px solid var(--evc) !important; border-radius: 4px !important; color: var(--c-text) !important; }
.fc .fc-event.evs-outline:not(.fc-list-event) { background: var(--c-surface) !important; border: 1.5px solid var(--evc) !important; color: var(--evc) !important; }
.fc .fc-event.evs-pill:not(.fc-list-event) { background: var(--evc) !important; border: 1px solid var(--evc) !important; color: var(--evt) !important; border-radius: 999px !important; padding-left: 7px; padding-right: 7px; }
.fc .fc-event.evs-pill .fc-event-time, .fc .fc-event.evs-pill .mc-time { display: none; }
/* Tasks */
.fc .fc-event.tks-dashed:not(.fc-list-event) { background: transparent !important; border: 1.5px dashed var(--evc) !important; color: var(--evc) !important; }
.fc .fc-event.tks-check:not(.fc-list-event) { background: transparent !important; border: 0 !important; color: var(--c-text) !important; }
.fc .fc-event.tks-check .fc-event-time, .fc .fc-event.tks-check .mc-time { color: var(--evc); font-weight: 600; }
.fc .fc-event.tks-soft:not(.fc-list-event) { background: color-mix(in srgb, var(--evc) 16%, var(--c-surface)) !important; border: 0 !important; border-left: 3px solid var(--evc) !important; border-radius: 4px !important; color: var(--c-text) !important; }
.fc .fc-event.tks-solid:not(.fc-list-event) { background: var(--evc) !important; border: 1px solid var(--evc) !important; border-style: solid !important; color: var(--evt) !important; }
.fc .fc-event.tks-minimal:not(.fc-list-event) { background: transparent !important; border: 0 !important; color: var(--c-text) !important; }
.fc .fc-event.tks-minimal .fc-event-title, .fc .fc-event.tks-minimal .mc-ev-title { text-decoration: underline; text-decoration-color: var(--evc); text-decoration-thickness: 2px; text-underline-offset: 2px; }
.fc .fc-event.tks-minimal .fc-event-time, .fc .fc-event.tks-minimal .mc-time { color: var(--evc); }
.mc .fc-event.tks.mc-task-other { opacity: .5; }
/* Grid layouts that restyle every event (e.g. "Lines only") don't override the chosen styles. */
.grid-g3 .fc .fc-event.evs-solid, .grid-g3 .fc .fc-event.evs-pill { background: var(--evc) !important; color: var(--evt) !important; }

/* Settings: style pickers with a small preview */
.evstyle-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .5rem; }
.evstyle-opt { display: flex; flex-direction: column; gap: .35rem; border: 1px solid var(--c-border); border-radius: 10px; padding: .55rem .6rem; cursor: pointer; background: var(--c-surface); }
.evstyle-opt:has(input:checked) { border-color: var(--c-primary); box-shadow: 0 0 0 2px color-mix(in srgb, var(--c-primary) 25%, transparent); }
.evstyle-opt input { position: absolute; opacity: 0; pointer-events: none; }
.evstyle-opt .nm { font-size: .85rem; font-weight: 600; }
.evs-pv { --evc: #2563eb; --evt: #fff; font-size: .75rem; border-radius: 5px; padding: 2px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 3px; }
.evs-pv b { font-weight: 600; }
.evs-pv.pv-dot { color: var(--c-text); } .evs-pv.pv-dot::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--evc); flex: none; } .evs-pv.pv-dot b { color: var(--evc); }
.evs-pv.pv-solid { background: var(--evc); color: var(--evt); }
.evs-pv.pv-soft { background: color-mix(in srgb, var(--evc) 16%, var(--c-surface)); border-left: 3px solid var(--evc); color: var(--c-text); }
.evs-pv.pv-outline { border: 1.5px solid var(--evc); color: var(--evc); }
.evs-pv.pv-pill { background: var(--evc); color: var(--evt); border-radius: 999px; } .evs-pv.pv-pill b { display: none; }
.evs-pv.tk { --evc: #f59e0b; }
.evs-pv.pv-dashed { border: 1.5px dashed var(--evc); color: var(--evc); }
.evs-pv.pv-check { color: var(--c-text); } .evs-pv.pv-check b { color: var(--evc); }
.evs-pv.pv-minimal { color: var(--c-text); } .evs-pv.pv-minimal span { text-decoration: underline; text-decoration-color: var(--evc); text-decoration-thickness: 2px; } .evs-pv.pv-minimal b { color: var(--evc); }
.evs-pv.tk.pv-solid { background: var(--evc); color: #fff; }

/* 01.28.00 (#103, #104): one media popup — Folders · Files · Add new media */
.cl-mp .modal-body { background: var(--c-soft-2, #f6f4ef); }
.cl-mp .mp-grid { display: grid; gap: .75rem; grid-template-columns: 1fr; grid-template-areas: "folders" "files" "add"; }
.cl-mp .mp-folders { grid-area: folders; } .cl-mp .mp-files { grid-area: files; min-width: 0; } .cl-mp .mp-add { grid-area: add; }
.cl-mp .card { border-radius: 14px; overflow: hidden; }
.cl-mp .mp-h { display: flex; align-items: center; gap: .4rem; font-weight: 600; font-size: .92rem; }
.cl-mp .mp-flist { max-height: 28vh; overflow-y: auto; padding: .35rem; }
.cl-mp .mp-frow { display: flex; align-items: center; gap: .5rem; width: 100%; border: 0; background: transparent; text-align: left; padding: .45rem .6rem; padding-left: calc(.6rem + var(--d, 0) * 1rem); border-radius: 9px; color: inherit; font-size: .9rem; }
.cl-mp .mp-frow span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-mp .mp-frow .bi-folder-fill { color: #d9a441; }
.cl-mp .mp-frow:hover { background: var(--c-soft-2, #f1efe9); }
.cl-mp .mp-frow.active { background: var(--c-primary); color: #fff; }
.cl-mp .mp-frow.active .bi { color: #fff; }
.cl-mp .mp-media { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: .5rem; }
.cl-mp .mp-drop { display: flex; align-items: center; gap: .75rem; width: 100%; padding: .9rem 1rem; border: 2px dashed var(--c-border); border-radius: 12px; cursor: pointer; }
.cl-mp .mp-drop:hover { border-color: var(--c-primary); }
.cl-mp .mp-drop > .bi { font-size: 1.6rem; color: var(--c-primary); }
.cl-mp .mp-status:not(:empty) { margin-top: .6rem; display: grid; gap: .25rem; }
.cl-mp .mp-line { overflow-wrap: anywhere; }
.cl-mp .mp-foot { flex-wrap: nowrap; }
.cl-mp .mp-sel { min-width: 0; }
@media (min-width: 768px) {
  .cl-mp .mp-grid { grid-template-columns: 260px minmax(0, 1fr); grid-template-areas: "folders files" "add files"; align-items: start; }
  .cl-mp .mp-flist { max-height: 46vh; }
  .cl-mp .mp-media { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
}
/* The editor's link box opens inside its popup, above the text. */
.note-editor .note-modal { z-index: 1080; }
.note-editor .note-modal-backdrop { z-index: 1075; }
.cl-mp .mp-foot { position: sticky; bottom: 0; z-index: 2; background: var(--c-surface); border-radius: 0 0 18px 18px; box-shadow: 0 -6px 14px rgba(0,0,0,.06); }
.cl-mp .modal-header { position: sticky; top: 0; z-index: 2; background: var(--c-surface); border-radius: 18px 18px 0 0; }
.note-editable img { max-width: 100%; height: auto; }

/* ---------- 01.29.00 (#106): calendar bar = "Icon bubbles" — one row, labels always shown, equal buttons spread evenly ---------- */
.calnav .calnav-inner, body.cal-scrolled .calnav .calnav-inner {
  display: flex; flex-wrap: nowrap; overflow: visible; justify-content: space-evenly; align-items: flex-start;
  gap: 0; width: 100%; max-width: 480px; margin: 0 auto; padding: .4rem .5rem .35rem; }
.calnav .calnav-link, body.cal-scrolled .calnav .calnav-link {
  flex: 0 1 52px; width: 52px; min-width: 44px; display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  gap: .2rem; padding: 0; background: transparent !important; box-shadow: none !important; border-radius: 0;
  color: var(--c-muted); font-size: .69rem; font-weight: 600; line-height: 1.15; white-space: nowrap; text-align: center; }
.calnav .calnav-link span, body.cal-scrolled .calnav .calnav-link span { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.calnav .calnav-link .bi {
  width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; font-size: 1rem !important;
  background: var(--c-soft-2); color: var(--c-muted); transition: background .15s, color .15s, box-shadow .15s; }
.calnav .calnav-link:hover .bi { background: var(--c-soft); color: var(--c-text); }
.calnav .calnav-link.active { color: var(--c-primary); }
.calnav .calnav-link.active .bi { background: var(--c-primary); color: var(--c-primary-text, #fff); box-shadow: 0 3px 8px color-mix(in srgb, var(--c-primary) 35%, transparent); }
body.cal-scrolled .calnav .calnav-link .bi { width: 30px; height: 30px; font-size: .92rem !important; }
@media (max-width: 359.98px) { .calnav .calnav-link, body.cal-scrolled .calnav .calnav-link { flex-basis: 48px; width: 48px; font-size: .64rem; } }

/* ---------- 01.29.00 (#108): text editor — Text | HTML switch, Insert block menu, emoji, preview ---------- */
.cl-ed-tabs { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .35rem; }
.cl-ed-seg { display: inline-flex; padding: 3px; background: var(--c-soft-2); border-radius: 11px; }
.cl-ed-seg button { border: 0; background: transparent; padding: .28rem .8rem; border-radius: 8px; font-size: .82rem; font-weight: 600; color: var(--c-muted); display: inline-flex; align-items: center; gap: .3rem; }
.cl-ed-seg button.active { background: var(--c-surface); color: var(--c-text); box-shadow: 0 1px 3px rgba(0,0,0,.14); }
.cl-ed-prev { font-size: .82rem; text-decoration: none; }
.note-editor.cl-ed-html .note-codable { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .82rem; background: #1e1e2a; color: #e8e6f3; }
.cl-ed-preview { margin-top: .5rem; border: 1px dashed var(--c-border); border-radius: 12px; padding: .75rem .9rem; background: var(--c-surface); }
.cl-ed-prev-h { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--c-muted); margin-bottom: .5rem; }
.note-dropdown-menu.cl-ed-blocks { min-width: 220px; }
.note-dropdown-menu.cl-ed-blocks .note-dropdown-item { display: flex; align-items: center; gap: .5rem; padding: .4rem .7rem; font-size: .88rem; }
.note-dropdown-menu.cl-ed-emoji { width: 248px; grid-template-columns: repeat(8, 1fr); padding: 4px; }
.note-btn-group.open .note-dropdown-menu.cl-ed-emoji { display: grid; }
.note-dropdown-menu.cl-ed-emoji .note-dropdown-item { padding: 4px 0; text-align: center; font-size: 1.15rem; line-height: 1.3; }
.note-editor .note-toolbar .note-btn-group { margin-bottom: 3px; }
.note-editor.fullscreen { z-index: 1090 !important; background: var(--c-surface); }

/* Blocks — the same look in the editor and wherever the text is shown */
a.cl-btn { display: inline-block; padding: .55rem 1.15rem; border-radius: 999px; background: var(--c-primary); color: var(--c-primary-text, #fff) !important; font-weight: 700; text-decoration: none !important; }
a.cl-btn.cl-btn-outline { background: transparent; color: var(--c-primary) !important; box-shadow: inset 0 0 0 2px var(--c-primary); }
.cl-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: .5rem 0; }
.cl-col { min-width: 0; }
@media (max-width: 575.98px) { .cl-cols { grid-template-columns: 1fr; } }
.cl-card { border: 1px solid var(--c-border); border-radius: 14px; padding: .9rem 1rem; margin: .5rem 0; background: var(--c-surface); box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.cl-card > :last-child, .cl-notice > :last-child, .cl-col > :last-child, .cl-imgtext-body > :last-child { margin-bottom: 0; }
.cl-notice { border-radius: 12px; padding: .7rem .9rem; margin: .5rem 0; border-left: 5px solid; }
.cl-notice-info { background: #eef4ff; border-color: #3b82f6; color: #1e3a6b; }
.cl-notice-warn { background: #fff6e5; border-color: #f59e0b; color: #6b4304; }
.cl-notice-ok { background: #eafaf0; border-color: #22c55e; color: #14532d; }
.cl-imgtext { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 1rem; align-items: center; margin: .5rem 0; }
.cl-imgtext-img img { width: 100%; height: auto; border-radius: 12px; }
@media (max-width: 575.98px) { .cl-imgtext { grid-template-columns: 1fr; } }
table.cl-sched { width: 100%; border-collapse: collapse; margin: .5rem 0; font-size: .95em; }
table.cl-sched th, table.cl-sched td { padding: .45rem .6rem; border-bottom: 1px solid var(--c-border); text-align: left; vertical-align: top; }
table.cl-sched th { font-size: .78em; text-transform: uppercase; letter-spacing: .04em; color: var(--c-muted); }
table.cl-sched td:first-child { white-space: nowrap; font-weight: 700; width: 1%; }
.event-desc table:not(.cl-sched), .note-body table:not(.cl-sched), .note-editable table:not(.cl-sched) { border-collapse: collapse; max-width: 100%; }
.event-desc table:not(.cl-sched) td, .event-desc table:not(.cl-sched) th, .note-body table:not(.cl-sched) td, .note-body table:not(.cl-sched) th { border: 1px solid var(--c-border); padding: .35rem .5rem; }
.event-desc iframe, .note-body iframe, .note-editable iframe, .ann-body iframe { display: block; width: 100%; max-width: 640px; height: auto; aspect-ratio: 16 / 9; border: 0; border-radius: 12px; }
.event-desc blockquote, .note-body blockquote, .note-editable blockquote { border-left: 4px solid var(--c-border); padding: .2rem 0 .2rem .9rem; color: var(--c-muted); margin: .6rem 0; }
.event-desc img, .note-body img { max-width: 100%; height: auto; }
.note-editor.cl-ed-html .note-toolbar { display: none; }

/* ---------- 01.29.00 (#107): event details — Description · News · Media · Design ---------- */
.ev-dt-tabs { display: flex; gap: 3px; padding: 3px; background: var(--c-soft-2); border-radius: 12px; margin-bottom: .55rem; }
.ev-dt-tabs button { flex: 1 1 0; min-width: 0; border: 0; background: transparent; border-radius: 9px; padding: .4rem .2rem; display: flex; flex-direction: column; align-items: center; gap: .1rem; font-size: .74rem; font-weight: 600; color: var(--c-muted); }
.ev-dt-tabs button .bi { font-size: 1.05rem; }
.ev-dt-tabs button span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-dt-tabs button.active { background: var(--c-surface); color: var(--c-primary); box-shadow: 0 1px 4px rgba(0,0,0,.14); }
@media (min-width: 576px) { .ev-dt-tabs button { flex-direction: row; justify-content: center; gap: .4rem; font-size: .85rem; } }
.ev-dt-pick:not(:empty) { margin-bottom: .5rem; }
.ev-dt-card { display: flex; align-items: center; gap: .7rem; padding: .5rem; border: 1px solid var(--c-border); border-radius: 12px; background: var(--c-surface); }
.ev-dt-thumb { flex: 0 0 64px; width: 64px; height: 64px; border-radius: 10px; overflow: hidden; background: var(--c-soft-2); display: grid; place-items: center; }
.ev-dt-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ev-dt-thumb .bi { font-size: 1.5rem; color: var(--c-muted); }
.ev-dt-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ev-dt-txt b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-dt-txt small { color: var(--c-muted); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ev-dt-news-list { margin-top: .5rem; max-height: 300px; overflow-y: auto; border: 1px solid var(--c-border); border-radius: 12px; padding: .25rem; }
.ev-dt-news-row { display: flex; align-items: center; gap: .6rem; width: 100%; border: 0; background: transparent; text-align: left; padding: .45rem; border-radius: 9px; color: inherit; }
.ev-dt-news-row:hover { background: var(--c-soft-2); }
.ev-dt-news-row img, .ev-dt-news-row > .bi { flex: 0 0 44px; width: 44px; height: 44px; border-radius: 8px; object-fit: cover; display: grid; place-items: center; background: var(--c-soft-2); color: var(--c-muted); }
.ev-dt-news-row span { min-width: 0; display: flex; flex-direction: column; }
.ev-dt-news-row b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-dt-news-row small { color: var(--c-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* On the event page */
.ev-detail-media, .ev-detail-design { padding: 0; overflow: hidden; }
.ev-media img, .ev-media video { display: block; width: 100%; height: auto; max-height: 80vh; object-fit: contain; background: #000; }
.ev-media img { background: transparent; cursor: zoom-in; }
.ev-news { display: flex; flex-direction: column; gap: .8rem; }
.ev-news-pic { width: 100%; max-height: 360px; object-fit: cover; border-radius: 12px; }
.ev-news-kicker { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--c-primary); display: flex; align-items: center; gap: .35rem; }
.ev-news-title { font-size: 1.25rem; margin: .2rem 0 .4rem; }
.ev-news-link { display: inline-flex; align-items: center; gap: .35rem; margin-top: .6rem; font-weight: 600; }

/* ---------- 01.30.00 (#109): the calendar gear sits in the same row as the page's own buttons, same height ---------- */
.page-head.cal-gear-inline .page-actions { display: flex; align-items: center; gap: .5rem; flex-wrap: nowrap; }
.page-head.cal-gear-inline .page-actions > .btn { min-height: 42px; display: inline-flex; align-items: center; gap: .35rem; }
@media (max-width: 767.98px) {
  .page-head.cal-gear-inline > :first-child { padding-right: 0; }
  .page-head.cal-gear-inline .page-actions { padding-right: 0; margin-left: auto; }
  .page-head.cal-gear-inline .page-actions .cal-gear { position: static; }
}

/* ---------- 01.30.00 (#110): event cards on the Events page ---------- */
.ev-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .75rem; }
.ev-card { position: relative; display: flex; flex-direction: column; gap: .5rem; min-width: 0; padding: .75rem .75rem .55rem; background: var(--c-surface);
  border: 1px solid var(--c-border); border-top: 4px solid var(--dc, var(--c-primary)); border-radius: 14px; box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.ev-card:hover { box-shadow: var(--shadow); }
.ev-card.is-cancelled { opacity: .7; }
.ev-card.is-cancelled .ev-card-title a { text-decoration: line-through; }
.ev-card-title { font-size: .98rem; font-weight: 700; line-height: 1.25; margin: 0; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ev-card-title a { color: var(--c-text); text-decoration: none; }
.ev-card-row { display: flex; align-items: center; justify-content: space-between; gap: .4rem; min-width: 0; font-size: .8rem; }
.ev-card-date { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; font-weight: 600; }
.ev-card-date small { color: var(--c-muted); font-weight: 500; }
.ev-card-dept { flex: 0 1 auto; min-width: 0; max-width: 55%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .72rem; }
.ev-card-rem { justify-content: flex-start; color: var(--c-muted); }
.ev-card-rem span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-card-foot { margin-top: auto; padding-top: .35rem; border-top: 1px solid var(--c-border); }
.ev-card-signups { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-card-gear { position: relative; z-index: 2; }
.ev-card-gear .gear-btn { padding: .15rem .35rem; }
/* 01.30.00 (#111): up to 7 buttons (Calendar, Events, Tasks, Notes, Q&A, News, Map) — equal shares of the row so every name fits */
.calnav .calnav-link, body.cal-scrolled .calnav .calnav-link { flex: 1 1 0; width: auto; min-width: 0; max-width: 72px; }
.calnav .calnav-inner, body.cal-scrolled .calnav .calnav-inner { max-width: 520px; padding-left: .25rem; padding-right: .25rem; }
@media (max-width: 380px) { .calnav .calnav-link, body.cal-scrolled .calnav .calnav-link { font-size: .62rem; } }

/* ---------- 01.30.00 (#112): block editor ---------- */
.cl-ed { position: relative; }
.cl-ed-box { position: relative; border: 1px solid var(--c-border); border-radius: 12px; background: var(--c-surface); }
.cl-ed.is-focus .cl-ed-box { border-color: var(--c-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-primary) 15%, transparent); }
.cl-ed-bar { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; gap: 2px; padding: 4px; overflow-x: auto; scrollbar-width: none; background: var(--c-soft-2); border-bottom: 1px solid var(--c-border); border-radius: 12px 12px 0 0; }
.cl-ed-bar::-webkit-scrollbar { display: none; }
.cl-ed-btn { flex: none; display: inline-flex; align-items: center; justify-content: center; gap: .25rem; min-width: 34px; height: 34px; padding: 0 .4rem; border: 0; border-radius: 8px; background: transparent; color: var(--c-text); font-size: .85rem; }
.cl-ed-btn .bi { font-size: 1rem; }
.cl-ed-btn:hover { background: var(--c-surface); }
.cl-ed-btn.on { background: var(--c-surface); color: var(--c-primary); box-shadow: inset 0 0 0 1px var(--c-border); }
.cl-ed-wide span { font-weight: 600; white-space: nowrap; }
.cl-ed-add { background: var(--c-primary); color: var(--c-primary-text, #fff); }
.cl-ed-add:hover { background: var(--c-primary); filter: brightness(1.08); }
.cl-ed-sep { flex: none; width: 1px; height: 22px; background: var(--c-border); margin: 0 3px; }
.cl-ed-body { padding: .7rem .9rem .9rem; padding-right: 2.6rem; cursor: text; }
.cl-ed-pm { outline: none; min-height: inherit; }
.cl-ed-pm > * + * { margin-top: .55rem; }
.cl-ed-pm p { margin: 0; }
.cl-ed-pm p.is-editor-empty:first-child::before { content: attr(data-placeholder); float: left; height: 0; color: var(--c-muted); pointer-events: none; }
.cl-ed-pm img { max-width: 100%; height: auto; border-radius: 10px; }
.cl-ed-pm img.ProseMirror-selectednode, .cl-ed-pm .cl-video.ProseMirror-selectednode { outline: 3px solid var(--c-primary); outline-offset: 2px; }
.cl-ed-pm table { border-collapse: collapse; width: 100%; }
.cl-ed-pm td, .cl-ed-pm th { border: 1px solid var(--c-border); padding: .35rem .5rem; vertical-align: top; min-width: 3em; }
.cl-ed-pm .selectedCell { background: color-mix(in srgb, var(--c-primary) 12%, transparent); }
.cl-ed-pm .cl-col, .cl-ed-pm .cl-imgtext > div { border: 1px dashed var(--c-border); border-radius: 10px; padding: .4rem .5rem; }
.cl-ed-pm .cl-video iframe { pointer-events: none; }
.cl-ed-pm a { color: var(--c-primary); }
.cl-ed-handle { position: absolute; right: 4px; z-index: 4; display: flex; flex-direction: column; gap: 2px; padding: 2px; border-radius: 10px; background: var(--c-surface); border: 1px solid var(--c-border); box-shadow: 0 2px 6px rgba(0,0,0,.1); }
.cl-ed-handle button { width: 28px; height: 26px; border: 0; border-radius: 7px; background: transparent; color: var(--c-muted); display: grid; place-items: center; font-size: .85rem; }
.cl-ed-handle button:hover:not(:disabled) { background: var(--c-soft-2); color: var(--c-text); }
.cl-ed-handle button:disabled { opacity: .3; }
.cl-ed-code { width: 100%; min-height: 200px; padding: .7rem .8rem; border: 1px solid var(--c-border); border-radius: 12px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .82rem; line-height: 1.5; background: #1e1e2a; color: #e8e6f3; resize: vertical; }
.cl-ed-menu { position: absolute; z-index: 1100; min-width: 200px; max-width: min(300px, calc(100vw - 16px)); max-height: 320px; overflow-y: auto; padding: 4px; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.cl-ed-menu > button { display: flex; align-items: center; gap: .55rem; width: 100%; border: 0; background: transparent; text-align: left; padding: .45rem .6rem; border-radius: 8px; color: var(--c-text); font-size: .9rem; }
.cl-ed-menu > button:hover { background: var(--c-soft-2); }
.cl-ed-menu > button .bi { color: var(--c-primary); }
.cl-ed-swatches { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; padding: 6px; }
.cl-ed-swatches button { width: 100%; aspect-ratio: 1; border: 1px solid rgba(0,0,0,.12); border-radius: 50%; }
.cl-ed-menu-emoji { width: 272px; }
.cl-ed-emoji { display: grid; grid-template-columns: repeat(8, 1fr); }
.cl-ed-emoji button { border: 0; background: transparent; font-size: 1.2rem; padding: 4px 0; border-radius: 6px; }
.cl-ed-emoji button:hover { background: var(--c-soft-2); }
.cl-ed.is-full { position: fixed; inset: 0; z-index: 1095; background: var(--c-surface); padding: .75rem; overflow-y: auto; }
.cl-ed.is-full .cl-ed-body { min-height: calc(100vh - 140px) !important; }
body.cl-ed-full-on { overflow: hidden; }
.cl-video { margin: .5rem 0; }
.cl-video iframe { display: block; width: 100%; max-width: 640px; height: auto; aspect-ratio: 16 / 9; border: 0; border-radius: 12px; }
.cl-ed-bar { flex-wrap: wrap; overflow-x: visible; }

/* ---------- 01.31.00 (#113): Q&A — Ask a question, the filter and the gear in one row ---------- */
.page-actions.qa-actions { display: flex; align-items: center; gap: .5rem; flex-wrap: nowrap; }
.page-actions.qa-actions > .btn { min-height: 42px; display: inline-flex; align-items: center; gap: .35rem; white-space: nowrap; flex: none; }
.page-actions.qa-actions > .form-select { height: 42px; min-width: 0; flex: 0 1 auto; max-width: 220px; }
@media (max-width: 767.98px) {
  .page-head .page-actions.qa-actions { width: 100%; padding-right: 0; margin-left: 0; }
  .page-actions.qa-actions > .form-select { flex: 1 1 auto; max-width: none; }
  .page-actions.qa-actions .cal-gear { position: static; margin-left: 0; }
}
@media (max-width: 359.98px) { .page-actions.qa-actions > .btn { padding-left: .7rem; padding-right: .7rem; } .qa-ask-more { display: none; } }

/* ---------- 01.31.00 (#115): event popups — Details is its own section; the switches sit together ---------- */
.ev-dt { padding-bottom: 1rem; margin-bottom: .25rem; border-bottom: 1px solid var(--c-border); }
.ev-opts { display: flex; flex-direction: column; align-items: flex-start; gap: .4rem; }
.ev-opts .form-check { margin: 0; min-height: 0; }
.ev-opts .form-check[hidden] { display: none; }
.ev-opts + * { margin-top: 0; }

/* ---------- 01.32.00 (#117): Files popup — both upload buttons in one row, text wraps inside the button ---------- */
.tf-btns { display: flex; gap: .5rem; align-items: stretch; }
.tf-btns > .btn { flex: 1 1 0; min-width: 0; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; white-space: normal; line-height: 1.2; text-align: center; padding-top: .45rem; padding-bottom: .45rem; }
.tf-btns > .btn .bi { flex: none; }

/* ---------- 01.33.00 (#120): Events page — search box and magnifier always on one row ---------- */
.ev-search { flex: 1 1 200px; width: auto; max-width: 360px; flex-wrap: nowrap; }
.ev-search .form-control { min-width: 0; }

/* ---------- 02.00.00 Paid version: plan and billing, tickets, door scanner ---------- */
.bl-current { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 1.2rem; }
.bl-use { margin-bottom: .7rem; }
.bl-use .progress { height: .5rem; margin-top: .25rem; }
.bl-plans { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: var(--gap); margin-bottom: 1rem; }
.bl-plan { display: flex; flex-direction: column; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 1rem 1.1rem; box-shadow: var(--shadow-sm); min-width: 0; }
.bl-plan.current { border-color: var(--c-primary); box-shadow: 0 0 0 2px color-mix(in srgb, var(--c-primary) 25%, transparent); }
.bl-plan-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.bl-plan-head h3 { font-size: 1.05rem; font-weight: 700; margin: 0; }
.bl-price { font-size: 1.6rem; font-weight: 800; margin-top: .3rem; }
.bl-price small { font-size: .85rem; font-weight: 600; color: var(--c-muted); }
.bl-blocks { list-style: none; padding: 0; margin: .3rem 0 1rem; font-size: .86rem; }
.bl-blocks li { padding: .18rem 0; }
.bl-addons { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .8rem; }
.bl-addon { border: 1px solid var(--c-border); border-radius: var(--radius-sm); padding: .8rem; }
.bl-qty { width: 4.5rem; }
.bl-prov { width: auto; }
.bl-rate { max-width: 5.5rem; }
.bl-keys { border: 1px solid var(--c-border); border-radius: var(--radius-sm); padding: .8rem; height: 100%; }
.bl-log .item-meta { white-space: normal; }
@media (max-width: 767.98px) { .bl-current { grid-template-columns: 1fr; } }

.tk-wrap { max-width: 640px; margin: 0 auto; }
.tk-event { margin-bottom: 1rem; }
.tk-kicker { font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--c-primary); display: flex; align-items: center; gap: .35rem; }
.tk-title { font-size: 1.6rem; font-weight: 800; margin: .2rem 0 .4rem; overflow-wrap: anywhere; }
.tk-facts { display: flex; flex-direction: column; gap: .2rem; color: var(--c-muted); font-size: .92rem; }
.tk-facts .bi { margin-right: .3rem; }
.tk-form { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow-sm); }
.tk-types { display: flex; flex-direction: column; gap: .6rem; }
.tk-type { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: .6rem; align-items: center; padding: .7rem; border: 1px solid var(--c-border); border-radius: var(--radius-sm); }
.tk-type.off { opacity: .6; }
.tk-type-name { font-weight: 700; }
.tk-type-price { font-weight: 700; white-space: nowrap; }
.tk-qty { display: flex; align-items: center; gap: .25rem; }
.tk-qty input { width: 3.2rem; text-align: center; -moz-appearance: textfield; }
.tk-qty input::-webkit-outer-spin-button, .tk-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.tk-promo { margin-top: .8rem; max-width: 320px; }
.tk-total { margin-top: .9rem; padding-top: .7rem; border-top: 1px dashed var(--c-border); }
.tk-line { display: flex; justify-content: space-between; gap: 1rem; font-size: .92rem; padding: .1rem 0; }
.tk-line-total { font-weight: 800; font-size: 1.05rem; margin-top: .3rem; }
.tk-buyer { margin-top: 1rem; }
.tk-fine { margin-top: .9rem; font-size: .8rem; color: var(--c-muted); display: flex; flex-direction: column; gap: .25rem; }
.tk-fine .bi { margin-right: .3rem; }
.tk-lost { margin-top: 1rem; font-size: .9rem; }
.tk-lost summary { cursor: pointer; color: var(--c-primary); }
.tk-list { display: flex; flex-direction: column; gap: .5rem; margin-top: .5rem; }
.tk-mini { display: flex; align-items: center; gap: .75rem; padding: .55rem .7rem; border: 1px solid var(--c-border); border-radius: var(--radius-sm); background: var(--c-surface); color: inherit; text-decoration: none; }
.tk-mini:hover { border-color: var(--c-primary); }
.tk-mini img { border-radius: 6px; background: #fff; flex: none; }
.tk-mini-ph { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 6px; background: var(--c-soft-2); color: var(--c-muted); flex: none; }
.tk-mini-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.tk-mini-main span, .tk-mini-main code { font-size: .82rem; color: var(--c-muted); }
.tk-past { opacity: .75; }
.tk-ticket { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); }
.tk-ticket-top { padding: 1.1rem 1.2rem; background: var(--c-soft); }
.tk-ticket-qr { padding: 1.2rem; text-align: center; border-top: 2px dashed var(--c-border); }
.tk-ticket-qr img { max-width: 100%; height: auto; background: #fff; border-radius: 10px; }
.tk-ticket.is-refunded .tk-ticket-qr img, .tk-ticket.is-void .tk-ticket-qr img { filter: grayscale(1); opacity: .25; }
.tk-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1.15rem; letter-spacing: .08em; margin-top: .4rem; }
.tk-holder { font-weight: 700; }
.tk-ticket-foot { padding: .7rem 1.2rem; border-top: 1px solid var(--c-border); }
.tk-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.tk-box .btn-primary { font-weight: 700; }
.tk-tabs { flex-wrap: nowrap; overflow-x: auto; gap: .25rem; scrollbar-width: thin; }
.tk-tabs .nav-link { white-space: nowrap; }
.tk-days { max-width: 5rem; }
.tk-price-tag { min-width: 4.6rem; font-weight: 800; text-align: center; padding: .25rem .4rem; border-radius: 8px; background: var(--c-soft); color: var(--c-primary); flex: none; }
.tk-price-tag small { font-weight: 600; font-size: .7rem; }
.tk-code-tag { font-weight: 700; padding: .2rem .5rem; border-radius: 6px; background: var(--c-soft-2); flex: none; }
.tk-dot { width: .7rem; height: .7rem; border-radius: 50%; background: var(--c-border); flex: none; }
.tk-dot.in { background: #16a34a; }
.tk-dev { max-width: 14rem; font-size: .72rem; }
.tk-danger { border-color: #fecaca; }
@media (max-width: 575.98px) {
  .tk-type { grid-template-columns: minmax(0, 1fr) auto; }
  .tk-qty { grid-column: 1 / -1; justify-content: flex-end; }
  .tk-title { font-size: 1.35rem; }
}

.sc-wrap { max-width: 560px; margin: 0 auto; }
.sc-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .6rem; }
.sc-title { font-weight: 800; font-size: 1.15rem; }
.sc-net { display: inline-flex; align-items: center; gap: .35rem; font-size: .8rem; font-weight: 700; padding: .2rem .6rem; border-radius: 999px; background: #dcfce7; color: #166534; flex: none; }
.sc-net .dot { width: .5rem; height: .5rem; border-radius: 50%; background: currentColor; }
.sc-net.off { background: #fee2e2; color: #991b1b; }
.sc-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin-bottom: .7rem; text-align: center; }
.sc-stats div { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius-sm); padding: .4rem; }
.sc-stats strong { display: block; font-size: 1.3rem; }
.sc-stats span { font-size: .72rem; color: var(--c-muted); }
.sc-cam { position: relative; aspect-ratio: 1 / 1; background: #111827; border-radius: 16px; overflow: hidden; }
.sc-cam video { width: 100%; height: 100%; object-fit: cover; display: block; }
.sc-frame { position: absolute; inset: 18%; border: 3px solid rgba(255, 255, 255, .8); border-radius: 18px; pointer-events: none; }
.sc-start { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 1rem; background: rgba(17, 24, 39, .75); }
.sc-start[hidden] { display: none; }
.sc-result { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 1.2rem; color: #fff; cursor: pointer; }
.sc-result[hidden] { display: none; }
.sc-result.ok { background: rgba(22, 163, 74, .93); }
.sc-result.warn { background: rgba(217, 119, 6, .94); }
.sc-result.bad { background: rgba(220, 38, 38, .94); }
.sc-result-ic { font-size: 4rem; line-height: 1; }
.sc-result-msg { font-size: 1.35rem; font-weight: 800; margin-top: .5rem; overflow-wrap: anywhere; }
.sc-result-sub { font-size: .9rem; opacity: .9; margin-top: .3rem; }
.sc-tools { display: flex; gap: .5rem; justify-content: center; margin: .5rem 0; }
.sc-manual, .sc-lookup, .sc-offline, .sc-conflicts { margin-top: .9rem; }
.legal-page { max-width: 760px; margin: 0 auto; }
.legal-page p, .legal-page li { line-height: 1.65; }
.sc-head > .min-w-0 { flex: 1 1 auto; min-width: 0; }

/* ---------- 02.01.00 (#124): on desktop the space/calendar name sits in the center of the header ---------- */
@media (min-width: 992px) {
  body:not(.hdr-h5) .topbar-inner:has(> .space-switch) { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); column-gap: .6rem; }
  body:not(.hdr-h5) .topbar-inner:has(> .space-switch) > .brand { justify-self: start; }
  body:not(.hdr-h5) .topbar-inner:has(> .space-switch) > .space-switch { justify-self: center; max-width: 34vw; }
  body:not(.hdr-h5) .topbar-inner:has(> .space-switch) > .topbar-actions { justify-self: end; margin-left: 0; }
}

/* ---------- 02.01.00 (#126): plans and add-ons are centered on the Plan and billing page ---------- */
.bl-plans { display: flex; flex-wrap: wrap; justify-content: center; }
.bl-plans > .bl-plan { flex: 0 1 280px; min-width: 230px; }
.bl-addons { display: flex; flex-wrap: wrap; justify-content: center; }
.bl-addons > .bl-addon { flex: 0 1 320px; min-width: 260px; }
.bl-addons-wrap .list-clean { max-width: 640px; margin-left: auto; margin-right: auto; }
.bl-sell-cards { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); margin-bottom: var(--gap); }

/* ---------- 02.01.00 (#123): Site admin → Errors ---------- */
.er-strip { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 6px; align-items: end; height: 120px; }
.er-day { display: flex; flex-direction: column; align-items: stretch; height: 100%; border-radius: 6px; outline-offset: 2px; }
.er-day:hover, .er-day:focus-visible { background: var(--c-soft); }
.er-bars { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; min-height: 0; }
.er-bar { display: block; background: var(--c-primary); border-radius: 4px 4px 0 0; min-height: 4px; }
.er-bar-serious { background: #dc2626; }
.er-n { font-size: .68rem; text-align: center; color: var(--c-muted); height: 1em; line-height: 1; margin-top: 3px; }
.er-d { font-size: .68rem; text-align: center; color: var(--c-muted); line-height: 1; }
.er-key { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--c-primary); vertical-align: -1px; }
.er-key-serious { background: #dc2626; }
.er-row { text-decoration: none !important; color: inherit; }
.er-row:hover { background: var(--c-soft); }
.er-row.is-fixed { opacity: .65; }
.er-pre { background: var(--c-soft-2); border: 1px solid var(--c-border); border-radius: var(--radius-sm); padding: .7rem .8rem; font-size: .78rem; white-space: pre-wrap; word-break: break-word; max-height: 360px; overflow: auto; margin: 0; }
.er-event { padding: .6rem 0; border-top: 1px solid var(--c-border); } .er-event:first-of-type { border-top: 0; }
.er-msg { word-break: break-word; }
.er-dl dt { color: var(--c-muted); font-weight: 600; font-size: .86rem; } .er-dl dd { margin-bottom: .5rem; }
@media (max-width: 575.98px) { .er-n { display: none; } .er-strip { gap: 3px; } }

/* 02.02.00 Payments split, display cards everywhere */
.ev-side-cards { display: grid; gap: .75rem; }
.ev-side-cards .setting-card p { overflow-wrap: anywhere; }
.py-keys { border: 1px solid var(--c-border); border-radius: var(--radius); padding: .9rem 1rem; height: 100%; }

/* 02.02.01 Layer guard: while a menu or popup is open the page behind stays still */
html.cl-layer-open, html.cl-layer-open body { overscroll-behavior: none; }
html.cl-layer-open .to-top { opacity: 0 !important; pointer-events: none !important; }
.dropdown-menu, .modal, .offcanvas, .offcanvas-body, .cl-sheet-list, .notif-list, .typeahead-menu, .cl-ed-menu { overscroll-behavior: contain; }

/* 02.02.03: plan rows — price, name, chips, count and buttons on row 1; all plan details on a full-width row 2 */
.item-row.plan-row { flex-wrap: wrap; row-gap: .45rem; }
.plan-row > .plan-details { flex: 0 0 100%; order: 9; min-width: 0; padding-top: .45rem; border-top: 1px dashed var(--c-border); color: var(--c-muted, inherit); line-height: 1.6; }
.plan-row .item-title { white-space: normal; overflow: visible; text-overflow: clip; }
.plan-row .item-title .chip { white-space: normal; max-width: 100%; }

/* ---------- 02.03.00 Appointments (#135) ---------- */
.bk-wrap { max-width: 720px; margin: 0 auto; }
.bk-head { margin-bottom: 1rem; }
.bk-steps { display: flex; flex-wrap: wrap; gap: .35rem; list-style: none; padding: 0; margin: 0 0 1rem; font-size: .78rem; color: var(--c-muted); }
.bk-steps li { padding: .2rem .6rem; border-radius: 99px; background: var(--c-soft-2); }
.bk-steps li.on { background: var(--c-primary); color: var(--c-primary-text, #fff); font-weight: 700; }
.bk-h { font-size: 1.1rem; font-weight: 800; margin: 0 0 .6rem; }
.bk-cards { display: flex; flex-direction: column; gap: .5rem; }
.bk-card { display: flex; align-items: center; gap: .75rem; width: 100%; text-align: left; padding: .8rem .9rem; border: 1px solid var(--c-border); border-radius: var(--radius); background: var(--c-surface); color: var(--c-text); box-shadow: var(--shadow-sm); min-height: 56px; }
.bk-card:hover, .bk-card:focus-visible { border-color: var(--c-primary); outline: none; }
.bk-dot { width: 14px; height: 14px; border-radius: 50%; flex: none; }
.bk-card-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.bk-card-title { font-weight: 700; overflow-wrap: anywhere; }
.bk-card-sub { font-size: .84rem; color: var(--c-muted); overflow-wrap: anywhere; }
.bk-card-right { font-weight: 700; white-space: nowrap; }
.bk-any { display: inline-grid; place-items: center; background: var(--c-soft); color: var(--c-primary); }
.bk-week { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .4rem; align-items: center; }
.bk-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .3rem; }
.bk-day { display: flex; flex-direction: column; align-items: center; gap: 0; padding: .4rem .1rem; border: 1px solid var(--c-border); border-radius: var(--radius-sm); background: var(--c-surface); color: var(--c-text); line-height: 1.15; min-width: 0; }
.bk-day .bk-wd { font-size: .7rem; text-transform: uppercase; color: var(--c-muted); font-weight: 700; }
.bk-day .bk-dn { font-size: 1.15rem; font-weight: 800; }
.bk-day .bk-mo { font-size: .7rem; color: var(--c-muted); }
.bk-day .bk-n { font-size: .66rem; color: var(--c-primary); font-weight: 700; white-space: nowrap; }
.bk-day.none { opacity: .45; cursor: default; }
.bk-day.active { border-color: var(--c-primary); background: var(--c-soft); box-shadow: 0 0 0 2px var(--c-primary) inset; }
.bk-slots { margin-top: .8rem; }
.bk-daytitle { font-weight: 700; margin-bottom: .4rem; }
.bk-times { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: .4rem; }
.bk-time { min-height: 42px; font-weight: 600; }
.bk-time.active { background: var(--c-primary); color: var(--c-primary-text, #fff); }
.bk-empty { padding: .8rem; border: 1px dashed var(--c-border); border-radius: var(--radius-sm); color: var(--c-muted); font-size: .92rem; }
.bk-sum { display: flex; gap: .7rem; align-items: flex-start; padding: .75rem .9rem; border-radius: var(--radius); background: var(--c-soft); }
.bk-sum .bi { font-size: 1.4rem; color: var(--c-primary); }
.bk-fact { display: flex; gap: .7rem; align-items: flex-start; padding: .35rem 0; }
.bk-fact > .bi { font-size: 1.15rem; color: var(--c-primary); width: 32px; text-align: center; flex: none; }
.bk-fact .avatar { flex: none; }
@media (max-width: 575.98px) { .bk-week { grid-template-columns: minmax(0, 1fr); } .bk-week [data-bk-prev], .bk-week [data-bk-next] { display: none; } .bk-days { grid-template-columns: repeat(7, minmax(44px, 1fr)); overflow-x: auto; } }
.ap-linkbar { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin: 0 0 .8rem; }
.ap-linkbar input { flex: 1 1 220px; min-width: 0; }
.ap-row { display: flex; align-items: center; gap: .4rem; border-bottom: 1px solid var(--c-border); }
.ap-row:last-child { border-bottom: 0; }
.ap-row-main { display: flex; align-items: center; gap: .7rem; flex: 1; min-width: 0; padding: .55rem .2rem; background: none; border: 0; text-align: left; color: inherit; }
.ap-row-link { color: inherit; text-decoration: none; padding: .55rem .2rem; gap: .7rem; }
.ap-row-main:hover .item-title, .ap-row-link:hover .item-title { color: var(--c-primary); }
.ap-time { display: flex; flex-direction: column; width: 72px; flex: none; font-weight: 700; font-size: .92rem; line-height: 1.2; }
.ap-time small { font-weight: 500; color: var(--c-muted); font-size: .74rem; }
.ap-pending { border-left: 5px solid #3b82f6; }
.ap-dl { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: .25rem .6rem; margin: 0; font-size: .92rem; }
.ap-dl dt { color: var(--c-muted); font-weight: 600; }
.ap-dl dd { margin: 0; overflow-wrap: anywhere; }
.ap-pre { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--c-muted); min-height: 1em; }
.ap-week { display: flex; flex-direction: column; gap: .35rem; }
.ap-day { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: .5rem; align-items: start; padding: .35rem 0; border-bottom: 1px solid var(--c-border); }
.ap-day-name { margin: .3rem 0 0; }
.ap-ranges { display: flex; flex-direction: column; gap: .3rem; }
.ap-range { display: flex; align-items: center; gap: .35rem; }
.ap-range input { max-width: 130px; }
.ap-addrange { align-self: flex-start; }
.ap-closed { padding-top: .4rem; }
.ap-day .ap-closed[hidden], .ap-day .ap-ranges[hidden] { display: none !important; }
.ap-day > .ap-closed { grid-column: 2; grid-row: 1; }
.ap-svc-dot { width: 12px; height: 12px; border-radius: 50%; flex: none; margin-top: .35rem; align-self: flex-start; }
.ap-slotlist .bk-times { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
@media (max-width: 575.98px) { .ap-day { grid-template-columns: minmax(0, 1fr); } .ap-day > .ap-closed { grid-column: 1; grid-row: auto; } }

/* 02.04.00: two clear spaces — My space (teal) and Groups (accent) */
.space-kind { font-size: .62rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; padding: .08rem .38rem; border-radius: 999px; background: color-mix(in srgb, var(--c-nav-text) 14%, transparent); flex: none; }
.space-switch.in-mine { border-color: color-mix(in srgb, #14b8a6 55%, transparent); }
.calnav .calnav-link.calnav-home { color: #0f766e; }
.calnav .calnav-link.calnav-home .bi { background: #ccfbf1; color: #0f766e; }
/* Phones: the header's Group chip and the menu's "← My space" take you back; the bar keeps its room for the group's own tabs. */
@media (max-width: 575.98px) { .calnav .calnav-link.calnav-home { display: none; } }

/* 02.05.00 (#139): menu = three big buttons (My Day, My space, My groups) + quiet account items */
.side-bigs { display: flex; flex-direction: column; gap: .55rem; }
.side-big { display: flex; align-items: center; gap: .8rem; padding: .8rem .85rem; border-radius: 16px; border: 1.5px solid transparent; color: var(--c-text); text-decoration: none !important; transition: box-shadow .15s, transform .15s; }
.side-big:hover { color: var(--c-text); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(20,20,60,.08); }
.side-big-ic { width: 44px; height: 44px; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.3rem; color: #fff; flex: none; }
.side-big-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.side-big-tx b { font-size: 1.08rem; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-big-sub { display: flex; align-items: center; gap: .4rem; min-width: 0; font-size: .78rem; color: var(--c-muted); }
.side-big-st { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-big-tx strong { color: var(--c-text); font-weight: 600; }
.side-big-go { color: var(--c-muted); opacity: .7; flex: none; }
.side-big-n { flex: none; font-size: .7rem; line-height: 1.35; font-weight: 700; border-radius: 999px; padding: .05rem .5rem; background: #5457e6; color: #fff; }
.side-big-n.is-red { background: #e5484d; }
.side-big.is-day { background: #fff0d6; } .side-big.is-day .side-big-ic { background: #e8890c; }
.side-big.is-mine { background: #d9f7f2; } .side-big.is-mine .side-big-ic { background: #0f9d8e; }
.side-big.is-groups { background: #e8e9ff; } .side-big.is-groups .side-big-ic { background: #5457e6; }
.side-big.on { box-shadow: 0 4px 14px rgba(20,20,60,.08); }
.side-big.is-day.on { border-color: #e8890c; } .side-big.is-mine.on { border-color: #0f9d8e; } .side-big.is-groups.on { border-color: #5457e6; }
.side-you { border-top: 1px solid var(--c-border); margin-top: 1rem; padding-top: .7rem; display: flex; flex-direction: column; gap: .05rem; }
.side-you-label { font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--c-muted); margin: 0 .75rem .2rem; }
.side-link.side-quiet { padding: .45rem .75rem; font-size: .93rem; font-weight: 500; color: color-mix(in srgb, var(--c-text) 80%, transparent); }
.side-link.side-quiet .bi { font-size: 1rem; }
.side-out { border-top: 1px solid var(--c-border); padding-top: .5rem; margin-top: 1rem; }
.space-dot.is-groups { background: #5457e6; }
.space-switch.in-groups { border-color: color-mix(in srgb, #5457e6 50%, transparent); }
.space-swatch.is-groups { background: #e8e9ff; color: #5457e6; font-size: 1.2rem; }

/* 02.05.00 (#139): My space and My groups pages */
.hub-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem 1.2rem; background: var(--c-surface); border-radius: 20px; padding: 1rem 1.1rem; border-top: 5px solid #0f9d8e; box-shadow: 0 6px 20px rgba(60,60,120,.07); margin-bottom: .4rem; }
.hub-head.is-groups { border-top-color: #5457e6; }
.hub-title { font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; margin: 0; display: flex; align-items: center; gap: .5rem; }
.hub-head.is-mine .hub-title .bi { color: #0f9d8e; } .hub-head.is-groups .hub-title .bi { color: #5457e6; }
.hub-sub { margin: .2rem 0 0; color: var(--c-muted); font-size: .92rem; }
.hub-needs { display: flex; flex-wrap: wrap; gap: .5rem; }
.hub-pill { display: inline-flex; align-items: center; gap: .4rem; border-radius: 999px; padding: .35rem .8rem; font-size: .85rem; font-weight: 600; text-decoration: none !important; border: 1px solid; }
.hub-pill.is-red { background: #fff4f2; color: #b42318; border-color: #fcd5cf; }
.hub-pill.is-blue { background: #eef4ff; color: #2a56c6; border-color: #cfdcff; }
.hub-sec { font-size: .72rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--c-muted); margin: 1.2rem .3rem .55rem; }
.hub-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
@media (min-width: 768px) { .hub-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .hub-grid.hub-grid-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.hub-tile { position: relative; display: flex; flex-direction: column; gap: .1rem; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: 16px; padding: .8rem; min-height: 96px; color: var(--c-text); text-decoration: none !important; transition: box-shadow .15s, transform .15s, border-color .15s; }
.hub-tile:hover { color: var(--c-text); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(20,20,60,.08); border-color: color-mix(in srgb, #0f9d8e 35%, var(--c-border)); }
.hub-tile b { font-size: .98rem; line-height: 1.2; }
.hub-tile > span:last-child { font-size: .76rem; color: var(--c-muted); line-height: 1.25; }
.hub-ic { width: 36px; height: 36px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.1rem; background: #d9f7f2; color: #0b6b61; margin-bottom: .45rem; }
.hub-tile.is-groups .hub-ic { background: #e8e9ff; color: #3a3dbf; }
.hub-tile.is-groups:hover { border-color: color-mix(in srgb, #5457e6 35%, var(--c-border)); }
.hub-badge { position: absolute; top: .6rem; right: .6rem; background: #e5484d; color: #fff; border-radius: 999px; font-size: .7rem; font-weight: 700; padding: .05rem .45rem; }
.hub-groups { display: grid; grid-template-columns: minmax(0, 1fr); gap: .75rem; margin-top: .8rem; }
@media (min-width: 900px) { .hub-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.hub-gcard { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: 18px; padding: .9rem; box-shadow: 0 4px 14px rgba(60,60,120,.05); }
.hub-gtop { display: flex; align-items: center; gap: .75rem; color: var(--c-text); text-decoration: none !important; }
.hub-gtop:hover { color: var(--c-text); }
.hub-gtop > .min-w-0 { min-width: 0; flex: 1; display: flex; flex-direction: column; line-height: 1.2; }
.hub-gtop b { font-size: 1.02rem; }
.hub-gtop small { color: var(--c-muted); font-size: .78rem; }
.space-swatch.hub-sw { width: 46px; height: 46px; border-radius: 13px; font-size: .9rem; }
.hub-role { flex: none; font-size: .7rem; font-weight: 700; border-radius: 999px; padding: .15rem .6rem; background: #f0f1f5; color: #4a5068; }
.hub-role.is-owner, .hub-role.is-admin { background: #e8e9ff; color: #3a3dbf; }
.hub-short { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .75rem; }
.hub-short a { display: inline-flex; align-items: center; gap: .35rem; border: 1px solid var(--c-border); background: var(--c-soft-2); border-radius: 10px; padding: .35rem .65rem; font-size: .8rem; font-weight: 600; color: var(--c-text); text-decoration: none !important; }
.hub-short a:hover { border-color: color-mix(in srgb, #5457e6 40%, var(--c-border)); color: #3a3dbf; }
.hub-short a .bi { color: #5457e6; }
.hub-cta { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
.hub-cta .btn { flex: 1 1 180px; }
.hub-empty { text-align: center; padding: 1.6rem 1rem; margin-top: .8rem; }
.hub-empty > .bi { font-size: 2rem; color: #5457e6; display: block; margin-bottom: .4rem; }

/* 02.05.00 (#137): owner bar on your own public profile (the page itself is what visitors see) */
.pp-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem .8rem; background: #1f2340; color: #fff; padding: .55rem 1rem; font-size: .88rem; }
.pp-bar-acts { display: flex; gap: .4rem; flex-wrap: wrap; }

/* 02.06.00 (#140): My groups top buttons + Waiting for approval cards */
.hub-cta-top { margin: .2rem 0 1rem; }
.hub-pending { opacity: .92; border-style: dashed; }
.hub-role.is-pending { background: #fff4d6; color: #8a5a00; white-space: nowrap; }
.hub-pending .hub-gtop { cursor: default; }
@media (min-width: 768px) { .hub-cta-top .btn { flex: 0 0 auto; min-width: 180px; } }

/* 02.06.02 (#143): font size box in the editor toolbar (pt) */
.cl-ed-size { flex: none; display: inline-flex; align-items: center; height: 34px; border: 1px solid var(--c-border); border-radius: 8px; background: var(--c-surface); padding-left: .35rem; margin: 0 .1rem; }
.cl-ed-size:focus-within { border-color: var(--c-primary); box-shadow: 0 0 0 2px color-mix(in srgb, var(--c-primary) 18%, transparent); }
.cl-ed-size-in { width: 2.6rem; border: 0; outline: 0; background: transparent; color: var(--c-text); font-size: .85rem; font-weight: 600; text-align: right; padding: 0; }
.cl-ed-size-in.is-bad { color: #dc2626; }
.cl-ed-size-u { font-size: .72rem; color: var(--c-muted); margin-left: .15rem; }
.cl-ed-size .cl-ed-size-dd { min-width: 24px; height: 32px; padding: 0 .2rem; }
.cl-ed-size .cl-ed-size-dd .bi { font-size: .75rem; }
.cl-ed-menu.cl-ed-sizes { min-width: 120px; max-height: 300px; }
.cl-ed-menu.cl-ed-sizes > button { padding: .3rem .6rem; }
.cl-ed-menu.cl-ed-sizes > button.on { background: var(--c-soft-2); color: var(--c-primary); font-weight: 600; }

/* 02.06.03 (#144): the editor toolbar stays visible under whatever is fixed above it while scrolling —
   in popups under the popup's title row, on pages under the header (and group bar). Offsets set by app.js. */
.cl-ed-bar { top: var(--cl-ed-top, 0px); }
.modal .cl-ed-bar { top: var(--cl-mh, 0px); box-shadow: 0 2px 6px rgba(20,20,60,.06); }
.cl-ed.is-full .cl-ed-bar { top: 0; }

/* 02.06.04 (#145): Floating card header — the strip around the card (where the page shows through when scrolling)
   gets the page background at 50% opacity, so content behind it is softened. The card itself is unchanged. */
.hdr-h8 .topbar { background: color-mix(in srgb, var(--c-bg) 50%, transparent); }

/* 02.06.05 (#146): an empty line typed in the editor is saved as an empty paragraph <p></p>. In the editor it is one line high;
   in shown text it collapsed to nothing, so the empty rows between sections were lost. Give it one line, exactly like the editor. */
:is(.event-desc, .note-body, .live-note, .rich-view, .ann-body, .cl-ed-preview) p:empty::after { content: "\00a0"; }
:is(.event-desc, .note-body, .live-note, .rich-view, .ann-body, .cl-ed-preview) p:empty:last-child::after { content: none; } /* no extra empty line at the very end */

/* 02.06.06 (#147): My Day blue box — four soft tap cards (like the big menu buttons), one row, box no taller than before. */
.dh-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; flex: 1 1 100%; margin-right: -2.1rem; }
.dh-card { position: relative; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem; padding: .5rem .2rem .45rem; border: 0; border-radius: 14px; color: #1f2937; text-decoration: none !important; font: inherit; box-shadow: 0 2px 8px rgba(10,10,60,.12); transition: transform .12s, box-shadow .12s; }
.dh-card:hover { color: #1f2937; transform: translateY(-1px); box-shadow: 0 5px 14px rgba(10,10,60,.18); }
.dh-card:active { transform: translateY(0); }
.dh-ic { width: 30px; height: 30px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: .95rem; flex: none; }
.dh-lbl { font-size: .74rem; font-weight: 650; line-height: 1.15; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.dh-n { position: absolute; top: -6px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: #e5484d; color: #fff; font-size: .68rem; font-weight: 700; line-height: 20px; text-align: center; border: 2px solid #fff; }
.dh-card.is-add { background: #e3edff; } .dh-card.is-add .dh-ic { background: #2f6fe4; }
.dh-card.is-need { background: #fff0d6; } .dh-card.is-need .dh-ic { background: #e8890c; }
.dh-card.is-mine { background: #d9f7f2; } .dh-card.is-mine .dh-ic { background: #0f9d8e; }
.dh-card.is-grp { background: #e8e9ff; } .dh-card.is-grp .dh-ic { background: #5457e6; }
@media (max-width: 767.98px) { .day-hero { gap: .8rem; } }
/* Wider screens: greeting on the left, the four cards on the right, icon beside the name (keeps the box as low as before). */
@media (min-width: 768px) {
  .dh-cards { flex: 0 1 auto; width: auto; margin-right: 0; grid-template-columns: repeat(4, auto); }
  .dh-card { flex-direction: row; gap: .5rem; padding: .45rem .8rem .45rem .5rem; }
  .dh-lbl { font-size: .85rem; }
}
@media (min-width: 768px) and (max-width: 1099.98px) { .dh-cards { flex: 1 1 100%; margin-right: -2.1rem; grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.dh-long { display: none; }
@media (min-width: 1100px) { .dh-short { display: none; } .dh-long { display: inline; } }
@media (min-width: 768px) and (max-width: 1099.98px) { .day-hero:has(.dh-cards) { row-gap: .7rem; padding-top: 1.1rem; padding-bottom: 1.1rem; } }
@media (max-width: 400px) { .dh-cards { gap: .4rem; } .dh-lbl { white-space: normal; font-size: .7rem; } .dh-card { padding-left: .15rem; padding-right: .15rem; } }

/* 02.06.07 (#148): Needs your answer card removed — three cards share the row. */
.dh-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (min-width: 768px) { .dh-cards { grid-template-columns: repeat(3, auto); } }
@media (min-width: 768px) and (max-width: 1099.98px) { .dh-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
