/* Flowboard — page-specific styles */
.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.upnext-row, .item-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--fb-border); }
.upnext-row:last-child, .item-row:last-child { border-bottom: 0; }
.upnext-row .mini-thumb { width: 6px; align-self: stretch; border-radius: 3px; flex: none; }
.upnext-row .t { font-weight: 600; }
.upnext-row .m { font-size: 12px; color: var(--fb-text-muted); }
.upnext-row .acts { display: flex; gap: 4px; opacity: .0; transition: opacity var(--fb-dur-fast); }
.upnext-row:hover .acts, .upnext-row:focus-within .acts { opacity: 1; }
.hl { padding: 14px 16px; border-bottom: 1px solid var(--fb-border); }
.hl:last-child { border-bottom: 0; }
.hl-card { margin: 8px 0 8px 40px; padding: 8px 10px; background: var(--fb-surface-2); border-radius: 8px; border: 1px solid var(--fb-border); font-size: 13px; }
.hl-reply { margin-left: 40px; display: none; } .hl.replying .hl-reply { display: block; }
.side-card { padding: 14px 16px; }
.mini-board { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; color: var(--fb-text); }
.mini-board:hover { background: var(--fb-subtle-hover); text-decoration: none; }

/* Inbox */
.inbox-shell { display: grid; grid-template-columns: 380px minmax(0, 1fr); height: calc(100vh - var(--fb-header-h)); }
.inbox-pane { background: var(--fb-surface); border-right: 1px solid var(--fb-border); display: flex; flex-direction: column; }
.inbox-pane .ip-head { padding: 16px 16px 8px; }
.inbox-pane .ip-body { overflow: auto; padding: 0 12px 90px; flex: 1; }
.inbox-bucket h4 { display: flex; justify-content: space-between; font-size: 12px; color: var(--fb-text-muted); margin: 14px 4px 6px; }
.inbox-bucket .list-cards { padding: 0; gap: 6px; min-height: 30px; border-radius: 8px; }
.inbox-side { overflow: auto; }
.ib-board { height: 100%; display: flex; flex-direction: column; }

/* Planner */
.planner-shell { display: grid; grid-template-columns: 300px minmax(0, 1fr); height: calc(100vh - var(--fb-header-h)); }
.pl-side { background: var(--fb-surface); border-right: 1px solid var(--fb-border); overflow: auto; padding: 16px 12px 90px; }
.pl-main { display: flex; flex-direction: column; overflow: hidden; }
.pl-tools { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--fb-border); background: var(--fb-surface); }
.pl-grid-wrap { flex: 1; overflow: auto; background: var(--fb-surface); }
.pl-grid { display: grid; grid-template-columns: 56px repeat(var(--days, 5), minmax(140px, 1fr)); position: relative; }
.pl-dayhead { position: sticky; top: 0; z-index: 3; background: var(--fb-surface); border-bottom: 1px solid var(--fb-border); padding: 8px; font-size: 12px; font-weight: 600; color: var(--fb-text-2); text-align: center; }
.pl-dayhead.today b { color: var(--fb-primary); }
.pl-dayhead .due-strip { display: flex; flex-direction: column; gap: 3px; margin-top: 6px; }
.pl-hour { height: 56px; border-bottom: 1px solid var(--fb-border); font-size: 11px; color: var(--fb-text-muted); text-align: right; padding: 2px 6px; }
.pl-col { position: relative; border-left: 1px solid var(--fb-border); }
.pl-slot { height: 28px; border-bottom: 1px dashed transparent; }
.pl-slot:nth-child(2n) { border-bottom: 1px solid var(--fb-border); }
.pl-slot.drop { background: var(--fb-primary-soft); }
.pl-block { position: absolute; left: 4px; right: 4px; border-radius: 6px; background: var(--fb-primary-soft); border-left: 3px solid var(--fb-primary); padding: 4px 8px; font-size: 12px; cursor: grab; overflow: hidden; box-shadow: var(--fb-shadow-raised); }
.pl-block b { display: block; font-size: 12.5px; color: var(--fb-text); }
.pl-block .pl-linked { font-size: 11px; color: var(--fb-text-2); display: flex; gap: 4px; align-items: center; margin-top: 2px; }
.pl-now { position: absolute; left: 0; right: 0; height: 2px; background: var(--fb-accent); z-index: 2; }
.pl-card { padding: 8px 10px; border-radius: 8px; background: var(--fb-surface-raised); box-shadow: var(--fb-shadow-raised); margin-bottom: 6px; cursor: grab; font-size: 13px; }
.pl-card .m { font-size: 11.5px; color: var(--fb-text-muted); margin-top: 2px; display: flex; gap: 6px; align-items: center; }

/* Settings */
.settings-card { padding: 20px 24px; margin-bottom: 16px; }
.settings-card h3 { margin-bottom: 4px; } .settings-card > p { color: var(--fb-text-muted); margin-bottom: 16px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--fb-border); }
.set-row:first-of-type { border-top: 0; }
.set-row .d { font-size: 12.5px; color: var(--fb-text-muted); }
.theme-opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.theme-opt { border: 2px solid var(--fb-border); border-radius: 12px; padding: 8px; cursor: pointer; background: var(--fb-surface); text-align: left; }
.theme-opt.sel { border-color: var(--fb-focus); }
.theme-opt .prev { height: 84px; border-radius: 8px; margin-bottom: 8px; display: flex; gap: 5px; padding: 8px; }
.theme-opt .prev i { flex: 1; border-radius: 4px; }
.sc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; }
.sc-row { display: flex; justify-content: space-between; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--fb-border); gap: 12px; }
.profile-hero { display: flex; gap: 20px; align-items: center; padding: 24px; }

/* Admin */
.admin-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.admin-kpis .panel { padding: 14px 16px; }
.admin-kpis .v { font: 700 26px/1.1 var(--fb-font-display); margin-top: 4px; }
.perm-grid td, .perm-grid th { text-align: center; } .perm-grid td:first-child, .perm-grid th:first-child { text-align: left; }
.perm-yes { color: var(--fb-success); } .perm-no { color: var(--fb-text-disabled); }

/* Search */
.search-hero { display: flex; gap: 8px; margin-bottom: 12px; }
.search-hero .input { height: 44px; font-size: 16px; }
.op-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.op-chips button { border: 1px dashed var(--fb-border-strong); background: transparent; border-radius: 14px; padding: 3px 10px; font-family: var(--fb-font-mono); font-size: 12px; cursor: pointer; color: var(--fb-text-2); }
.op-chips button:hover { background: var(--fb-subtle-hover); }
.result { display: flex; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--fb-border); align-items: center; }
.result:hover { background: var(--fb-surface-2); }
.search-overlay { position: fixed; top: 6px; left: 50%; transform: translateX(-50%); width: min(680px, 94vw); z-index: 210; background: var(--fb-surface-overlay); border-radius: 12px; box-shadow: var(--fb-shadow-overlay); overflow: hidden; }
.search-overlay .so-input { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--fb-border); }
.search-overlay .so-input input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 16px; height: 32px; }
.search-overlay .so-body { max-height: 60vh; overflow: auto; padding: 6px 0 10px; }
.so-sec { font-size: 12px; font-weight: 600; color: var(--fb-text-muted); padding: 10px 16px 4px; }
.so-item { display: flex; align-items: center; gap: 10px; padding: 7px 16px; color: var(--fb-text); cursor: pointer; }
.so-item:hover, .so-item.is-kb { background: var(--fb-subtle-hover); text-decoration: none; }

/* Notifications */
.notif { display: flex; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--fb-border); position: relative; }
.notif.unread { background: var(--fb-primary-soft); }
.notif.unread::before { content: ""; position: absolute; left: 4px; top: 22px; width: 6px; height: 6px; border-radius: 50%; background: var(--fb-primary); }
.notif .n-acts { display: flex; gap: 4px; margin-top: 6px; flex-wrap: wrap; }
.notif .n-time { font-size: 12px; color: var(--fb-text-muted); }
.pop .notif { padding: 10px 12px; }

/* Automation */
.auto-row { display: flex; align-items: flex-start; gap: 14px; padding: 14px 16px; border-bottom: 1px solid var(--fb-border); }
.auto-row .auto-ic { width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; background: var(--fb-primary-soft); color: var(--fb-primary); flex: none; }
.auto-row .sentence { font-size: 13px; color: var(--fb-text-2); margin-top: 2px; }
.auto-row.off { opacity: .6; }
.builder-step { border: 1px solid var(--fb-border); border-radius: 12px; padding: 14px 16px; margin-bottom: 12px; background: var(--fb-surface); position: relative; }
.builder-step .step-tag { font-size: 12px; font-weight: 700; color: var(--fb-primary); margin-bottom: 8px; display: flex; gap: 6px; align-items: center; }
.builder-line { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; background: var(--fb-surface-2); border-radius: 8px; padding: 8px 10px; margin-bottom: 6px; }
.builder-line .select, .builder-line .input { width: auto; min-height: 30px; height: 30px; padding: 2px 8px; }
.builder-connector { width: 2px; height: 14px; background: var(--fb-border-strong); margin: -12px 0 0 28px; }
.var-chip { font-family: var(--fb-font-mono); font-size: 11.5px; padding: 2px 6px; border-radius: 4px; background: var(--fb-secondary); cursor: pointer; border: 0; color: var(--fb-text-2); }

/* Mockup index */
.map-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.map-card { padding: 14px 16px; display: flex; gap: 12px; align-items: flex-start; color: var(--fb-text); }
.map-card:hover { text-decoration: none; box-shadow: var(--fb-shadow-hover); }
.map-card .ic-box { width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; background: var(--fb-primary-soft); color: var(--fb-primary); flex: none; }

/* UI kit */
.swatch-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.sw-cell { border-radius: 8px; overflow: hidden; border: 1px solid var(--fb-border); font-size: 11px; }
.sw-cell i { display: block; height: 44px; }
.sw-cell div { padding: 4px 6px; font-family: var(--fb-font-mono); color: var(--fb-text-2); }
.kit-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 12px; }

@media (max-width: 1200px) { .home-grid { grid-template-columns: 1fr; } .admin-kpis { grid-template-columns: repeat(2, 1fr); } .inbox-shell { grid-template-columns: 320px 1fr; } }
.cal-day.is-week { min-height: 360px; }
