/* =========================================================
   FlowPilot AI — Reusable components
   ========================================================= */

/* ---------- Layout helpers ---------- */
.grid { display: grid; gap: 16px; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.g-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.g-main-side { grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr); }
.align-start { align-items: start; }
.g-side-main { grid-template-columns: 260px minmax(0, 1fr); }
.span-2 { grid-column: span 2; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; align-items: center; gap: 8px; }
.row-wrap { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ml-auto { margin-left: auto; }
.mt-0{margin-top:0}.mt-4{margin-top:4px}.mt-8{margin-top:8px}.mt-12{margin-top:12px}.mt-16{margin-top:16px}.mt-24{margin-top:24px}
.mb-0{margin-bottom:0}.mb-8{margin-bottom:8px}.mb-12{margin-bottom:12px}.mb-16{margin-bottom:16px}.mb-24{margin-bottom:24px}
.w-100 { width: 100%; }
.hidden { display: none !important; }

/* ---------- Buttons ---------- */
.btn {
  --b-bg: #fff; --b-fg: var(--fp-text); --b-bd: var(--fp-border); --b-hover: var(--fp-slate-50);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 16px; border-radius: var(--fp-radius);
  background: var(--b-bg); color: var(--b-fg); border: 1px solid var(--b-bd);
  font: 600 13.5px/1 var(--fp-font); white-space: nowrap; cursor: pointer;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease, transform .05s ease;
  text-decoration: none; position: relative; user-select: none;
}
.btn:hover { background: var(--b-hover); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { box-shadow: var(--fp-focus); border-radius: var(--fp-radius); }
.btn .ic { width: 16px; height: 16px; }
.btn-primary { --b-bg: var(--fp-primary); --b-fg: #fff; --b-bd: var(--fp-primary); --b-hover: var(--fp-primary-600); }
.btn-success { --b-bg: var(--fp-success); --b-fg: #fff; --b-bd: var(--fp-success); --b-hover: var(--fp-success-600); }
.btn-ai { --b-bg: var(--fp-purple); --b-fg: #fff; --b-bd: var(--fp-purple); --b-hover: var(--fp-purple-600); }
.btn-warning { --b-bg: var(--fp-warning); --b-fg: var(--fp-text); --b-bd: var(--fp-warning); --b-hover: var(--fp-warning-600); }
.btn-danger { --b-bg: var(--fp-danger); --b-fg: #fff; --b-bd: var(--fp-danger); --b-hover: var(--fp-danger-600); }
.btn-secondary { --b-bg: #fff; --b-fg: var(--fp-text); --b-bd: var(--fp-border); --b-hover: var(--fp-slate-50); }
.btn-ghost { --b-bg: transparent; --b-fg: var(--fp-text-2); --b-bd: transparent; --b-hover: var(--fp-slate-100); }
.btn-link { --b-bg: transparent; --b-fg: var(--fp-primary); --b-bd: transparent; --b-hover: var(--fp-primary-50); padding: 0 8px; }
.btn-danger-ghost { --b-bg: transparent; --b-fg: var(--fp-danger); --b-bd: transparent; --b-hover: var(--fp-danger-50); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 12.5px; gap: 6px; }
.btn-sm .ic { width: 14px; height: 14px; }
.btn-xs { height: 26px; padding: 0 9px; font-size: 12px; gap: 5px; border-radius: 6px; }
.btn-xs .ic { width: 13px; height: 13px; }
.btn-lg { height: 44px; padding: 0 20px; font-size: 14.5px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }
.btn.is-loading { color: transparent !important; pointer-events: none; }
.btn.is-loading > * { visibility: hidden; }
.btn.is-loading::after {
  content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--b-fg); border-right-color: transparent; animation: fp-spin .7s linear infinite;
}
.btn-secondary.is-loading::after, .btn-ghost.is-loading::after { border-color: var(--fp-primary); border-right-color: transparent; }
@keyframes fp-spin { to { transform: rotate(360deg); } }
.btn-group { display: inline-flex; gap: 8px; flex-wrap: wrap; }

.icon-btn {
  width: 36px; height: 36px; border-radius: var(--fp-radius); border: 0; background: transparent;
  color: var(--fp-text-2); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; position: relative;
}
.icon-btn:hover { background: var(--fp-slate-100); color: var(--fp-text); }
.icon-btn.sm { width: 30px; height: 30px; }
.icon-btn.sm .ic { width: 16px; height: 16px; }

/* ---------- Cards ---------- */
.card { background: var(--fp-card); border: 1px solid var(--fp-border); border-radius: var(--fp-radius-lg); box-shadow: var(--fp-shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--fp-border); min-height: 56px; flex-wrap: wrap; }
.card-head h2, .card-head h3 { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.card-head .card-sub { color: var(--fp-text-2); font-size: 12.5px; font-weight: 400; }
.card-body { padding: 18px; }
.card-body.tight { padding: 12px 18px; }
.card-body.flush { padding: 0; }
.card-foot { padding: 12px 18px; border-top: 1px solid var(--fp-border); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.card.clickable { cursor: pointer; transition: box-shadow .15s ease, border-color .15s ease, transform .15s ease; }
.card.clickable:hover { box-shadow: var(--fp-shadow-md); border-color: var(--fp-border-2); transform: translateY(-1px); }
a.card { color: inherit; display: block; }
a.card:hover { text-decoration: none; }

.card-ai { border-color: var(--fp-purple-100); background: linear-gradient(180deg, #FBF8FF 0%, #fff 60%); }
.card-ai .card-head { border-bottom-color: var(--fp-purple-100); }
.card-ai .card-head h2, .card-ai .card-head h3 { color: #5B21B6; }
.accent-left { position: relative; overflow: hidden; }
.accent-left::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--acc, var(--fp-primary)); }

.title-ic { width: 30px; height: 30px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.title-ic .ic { width: 16px; height: 16px; }

/* Tone helpers (light tints) */
.tone-blue { background: var(--fp-primary-50); color: var(--fp-primary); }
.tone-green { background: var(--fp-success-50); color: var(--fp-success); }
.tone-orange { background: var(--fp-warning-50); color: #B45309; }
.tone-purple { background: var(--fp-purple-50); color: var(--fp-purple); }
.tone-red { background: var(--fp-danger-50); color: var(--fp-danger); }
.tone-slate { background: var(--fp-slate-50); color: var(--fp-text-2); }

/* ---------- KPI cards ---------- */
.kpi { padding: 18px; display: flex; gap: 14px; align-items: flex-start; position: relative; overflow: hidden; }
.kpi .kpi-ic { width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.kpi .kpi-ic .ic { width: 22px; height: 22px; }
.kpi .kpi-val { font-size: 26px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.kpi .kpi-label { color: var(--fp-text-2); font-size: 13px; font-weight: 500; }
.kpi .kpi-meta { font-size: 12px; margin-top: 6px; display: flex; align-items: center; gap: 4px; color: var(--fp-text-2); }
.kpi .kpi-meta .up { color: var(--fp-success); } .kpi .kpi-meta .down { color: var(--fp-danger); }
.kpi::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--acc, var(--fp-primary)); opacity: .85; }
.kpi .kpi-go { position: absolute; top: 14px; right: 14px; color: var(--fp-text-3); }
.kpi.clickable:hover .kpi-go { color: var(--fp-primary); }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 11px;
  font-size: 11.5px; font-weight: 600; white-space: nowrap; line-height: 1; border: 1px solid transparent;
}
.badge .ic { width: 12px; height: 12px; }
.badge .bdot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.b-blue { background: var(--fp-primary-50); color: #0B5ED7; border-color: var(--fp-primary-100); }
.b-green { background: var(--fp-success-50); color: #047A45; border-color: var(--fp-success-100); }
.b-orange { background: var(--fp-warning-50); color: #B45309; border-color: var(--fp-warning-100); }
.b-purple { background: var(--fp-purple-50); color: #6D28D9; border-color: var(--fp-purple-100); }
.b-red { background: var(--fp-danger-50); color: #C81E1E; border-color: var(--fp-danger-100); }
.b-slate { background: var(--fp-slate-50); color: #475569; border-color: var(--fp-border); }
.b-dark { background: var(--fp-header); color: #fff; }
.ai-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--fp-purple); background: var(--fp-purple-50); border: 1px solid var(--fp-purple-100); border-radius: 4px; padding: 1px 6px; }
.ai-tag .ic { width: 11px; height: 11px; }
.edited-tag { font-size: 10.5px; font-weight: 700; text-transform: uppercase; color: #0B5ED7; background: var(--fp-primary-50); border: 1px solid var(--fp-primary-100); border-radius: 4px; padding: 1px 6px; }

/* Source chips */
.src { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--fp-text); white-space: nowrap; }
.src-ic { width: 26px; height: 26px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.src-ic .ic { width: 14px; height: 14px; }
.src-ic.sm { width: 20px; height: 20px; border-radius: 5px; }
.src-ic.sm .ic { width: 12px; height: 12px; }
.src-ic.lg { width: 44px; height: 44px; border-radius: 11px; }
.src-ic.lg .ic { width: 22px; height: 22px; }
.src-gmail { background: #FDECEA; color: #D93025; }
.src-slack { background: #F3E8F5; color: #611F69; }
.src-teams { background: #ECEBFB; color: #4B53BC; }
.src-whatsapp { background: #E6F7EC; color: #128C4A; }
.src-gmeet { background: #E6F4EA; color: #0B8043; }
.src-fathom { background: #E8F0FE; color: #1A56DB; }
.src-system { background: var(--fp-purple-50); color: var(--fp-purple); }

/* ---------- Avatars ---------- */
.avatar { width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: #fff; flex: 0 0 auto; background: var(--fp-primary); letter-spacing: .02em; }
.avatar.sm { width: 26px; height: 26px; font-size: 10.5px; }
.avatar.xs { width: 22px; height: 22px; font-size: 9.5px; }
.avatar.lg { width: 44px; height: 44px; font-size: 15px; }
.avatar-stack { display: inline-flex; }
.avatar-stack .avatar { border: 2px solid #fff; margin-left: -8px; }
.avatar-stack .avatar:first-child { margin-left: 0; }
.person { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.person .p-name { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Progress ---------- */
.progress { height: 8px; background: var(--fp-slate-100); border-radius: 4px; overflow: hidden; min-width: 80px; }
.progress > span { display: block; height: 100%; background: var(--fp-primary); border-radius: 4px; transition: width .4s ease; }
.progress.green > span { background: var(--fp-success); }
.progress.orange > span { background: var(--fp-warning); }
.progress.red > span { background: var(--fp-danger); }
.progress-row { display: flex; align-items: center; gap: 10px; }
.progress-row .pct { font-size: 12px; font-weight: 600; color: var(--fp-text-2); min-width: 34px; text-align: right; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.form-grid .full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .field-label { font-size: 13px; font-weight: 600; color: var(--fp-text); display: flex; align-items: center; gap: 6px; }
.field .req { color: var(--fp-danger); }
.field .hint { font-size: 12px; color: var(--fp-text-2); }
.field .error-msg { font-size: 12px; color: var(--fp-danger); display: none; align-items: center; gap: 4px; }
.field.has-error .error-msg { display: flex; }
.field.has-error .input, .field.has-error .select, .field.has-error .textarea { border-color: var(--fp-danger); background: #FFFBFB; }
.input, .select, .textarea {
  width: 100%; height: 38px; border: 1px solid var(--fp-border-2); border-radius: var(--fp-radius);
  background: #fff; color: var(--fp-text); font: 14px var(--fp-font); padding: 0 12px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.textarea { height: auto; min-height: 96px; padding: 10px 12px; resize: vertical; line-height: 1.55; }
.select { appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; cursor: pointer; }
.select[multiple] { height: auto; min-height: 110px; padding: 6px; background-image: none; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--fp-primary); box-shadow: var(--fp-focus); }
.input[readonly], .input:disabled, .select:disabled, .textarea[readonly] { background: var(--fp-slate-50); color: var(--fp-text-2); }
.input-sm, .select-sm { height: 34px; font-size: 13px; }
.input-icon { position: relative; }
.input-icon > .ic { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--fp-text-3); pointer-events: none; width: 16px; height: 16px; }
.input-icon .input { padding-left: 34px; }
.input-icon .trail { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13.5px; user-select: none; }
.check input { width: 16px; height: 16px; accent-color: var(--fp-primary); cursor: pointer; margin: 0; }
.check-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; }
.fieldset { border: 1px solid var(--fp-border); border-radius: var(--fp-radius-lg); padding: 16px 18px; }
.fieldset-title { font-weight: 600; margin-bottom: 4px; }

/* Switch */
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { width: 40px; height: 22px; border-radius: 11px; background: var(--fp-border-2); position: relative; transition: background .2s ease; flex: 0 0 auto; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .2s ease; }
.switch input:checked + .track { background: var(--fp-success); }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch input:focus-visible + .track { box-shadow: var(--fp-focus); }
.switch input:disabled + .track { opacity: .5; }
.switch .sw-label { font-size: 13px; font-weight: 500; }

.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--fp-border); }
.setting-row:last-child { border-bottom: 0; }
.setting-row .s-title { font-weight: 600; }
.setting-row .s-desc { color: var(--fp-text-2); font-size: 12.5px; margin-top: 2px; }
.setting-row .s-ctrl { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; }

/* ---------- Toolbar / filters ---------- */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 18px; border-bottom: 1px solid var(--fp-border); }
.toolbar .input-icon { flex: 1 1 240px; max-width: 340px; }
.toolbar .select { width: auto; min-width: 140px; }
.seg { display: inline-flex; background: var(--fp-slate-100); border-radius: var(--fp-radius); padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 6px 12px; border-radius: 6px; font: 600 12.5px var(--fp-font); color: var(--fp-text-2); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.seg button:hover { color: var(--fp-text); }
.seg button.active { background: #fff; color: var(--fp-primary); box-shadow: var(--fp-shadow-sm); }
.seg .count { background: var(--fp-slate-100); color: var(--fp-text-2); border-radius: 9px; padding: 0 6px; font-size: 11px; }
.seg button.active .count { background: var(--fp-primary-50); color: var(--fp-primary); }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--fp-border); overflow-x: auto; scrollbar-width: none; padding: 0 6px; }
.tabs::-webkit-scrollbar { display: none; }
.tab { border: 0; background: transparent; padding: 13px 14px 11px; font: 600 13.5px var(--fp-font); color: var(--fp-text-2); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; display: inline-flex; align-items: center; gap: 7px; }
.tab:hover { color: var(--fp-text); }
.tab.active { color: var(--fp-primary); border-bottom-color: var(--fp-primary); }
.tab .count { background: var(--fp-slate-100); color: var(--fp-text-2); border-radius: 9px; padding: 1px 7px; font-size: 11px; }
.tab.active .count { background: var(--fp-primary-50); color: var(--fp-primary); }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fp-fade .2s ease; }
@keyframes fp-fade { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }

/* ---------- Tables ---------- */
.table-wrap { width: 100%; overflow-x: auto; position: relative; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--fp-text-2); font-weight: 600; padding: 10px 12px; background: #FAFBFD; border-bottom: 1px solid var(--fp-border); white-space: nowrap; }
.table th.sortable { cursor: pointer; user-select: none; }
.table th.sortable:hover { color: var(--fp-text); }
.table th .sort-ic { display: inline-flex; vertical-align: middle; margin-left: 4px; opacity: .45; }
.table th.sorted .sort-ic { opacity: 1; color: var(--fp-primary); }
.table th .sort-ic .ic { width: 12px; height: 12px; }
.table td { padding: 12px 12px; border-bottom: 1px solid var(--fp-border); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr.clickable { cursor: pointer; }
.table tbody tr:hover td { background: #FAFCFF; }
.table .t-title { font-weight: 600; color: var(--fp-text); }
.table .t-title:hover { color: var(--fp-primary); }
.table .t-sub { font-size: 12px; color: var(--fp-text-2); margin-top: 2px; }
.table .t-actions { display: flex; gap: 4px; justify-content: flex-end; align-items: center; flex-wrap: nowrap; }
.table td.num, .table th.num { text-align: right; }
.table-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--fp-border); flex-wrap: wrap; color: var(--fp-text-2); font-size: 13px; }
.pager { display: flex; align-items: center; gap: 4px; }
.pager button { min-width: 32px; height: 32px; border: 1px solid var(--fp-border); background: #fff; border-radius: 6px; font: 600 12.5px var(--fp-font); color: var(--fp-text); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0 8px; }
.pager button:hover:not(:disabled) { border-color: var(--fp-primary); color: var(--fp-primary); }
.pager button.active { background: var(--fp-primary); border-color: var(--fp-primary); color: #fff; }
.pager button:disabled { opacity: .45; cursor: not-allowed; }
.pager .ic { width: 15px; height: 15px; }
tr.row-flash td { animation: fp-flash 1.8s ease; }
@keyframes fp-flash { 0% { background: var(--fp-success-50); } 100% { background: transparent; } }
.overdue { color: var(--fp-danger); font-weight: 600; }
.due-soon { color: #B45309; font-weight: 600; }

/* ---------- Lists ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--fp-border); color: inherit; }
.list-item:last-child { border-bottom: 0; }
a.list-item:hover, .list-item.clickable:hover { background: #FAFCFF; text-decoration: none; cursor: pointer; }
.list-item .li-main { flex: 1; min-width: 0; }
.list-item .li-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item .li-sub { color: var(--fp-text-2); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item .li-end { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; color: var(--fp-text-2); font-size: 12.5px; }

/* Pending activity tiles */
.pending-tile { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: var(--fp-radius-lg); border: 1px solid var(--fp-border); background: #fff; color: inherit; transition: box-shadow .15s ease, border-color .15s ease; }
.pending-tile:hover { text-decoration: none; box-shadow: var(--fp-shadow-md); border-color: var(--fp-border-2); }
.pending-tile .pt-ic { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.pending-tile .pt-val { font-size: 22px; font-weight: 700; line-height: 1; }
.pending-tile .pt-label { font-size: 12.5px; color: var(--fp-text-2); margin-top: 4px; }
.pending-tile .ic-go { margin-left: auto; color: var(--fp-text-3); }

/* ---------- Detail key/values ---------- */
.kv { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 10px 16px; font-size: 13.5px; margin: 0; }
.kv dt { color: var(--fp-text-2); font-weight: 500; }
.kv dd { margin: 0; font-weight: 500; min-width: 0; word-wrap: break-word; }
.kv-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.kv-card { border: 1px solid var(--fp-border); border-radius: var(--fp-radius); padding: 10px 12px; background: #fff; }
.kv-card .k { font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--fp-text-2); font-weight: 600; }
.kv-card .v { font-weight: 600; margin-top: 4px; }

.section-title { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--fp-text-2); font-weight: 700; margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.bullets { margin: 0; padding-left: 18px; }
.bullets li { margin-bottom: 6px; }
.bullets li::marker { color: var(--fp-text-3); }
.quote-box { background: var(--fp-slate-50); border: 1px solid var(--fp-border); border-left: 3px solid var(--fp-border-2); border-radius: var(--fp-radius); padding: 14px 16px; white-space: pre-wrap; line-height: 1.65; font-size: 13.5px; }
.transcript { max-height: 420px; overflow-y: auto; }
.transcript .t-line { display: grid; grid-template-columns: 56px 140px minmax(0,1fr); gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--fp-border); font-size: 13px; }
.transcript .t-time { color: var(--fp-text-3); font-family: var(--fp-mono); font-size: 12px; }
.transcript .t-who { font-weight: 600; }

/* Callouts */
.callout { display: flex; gap: 12px; padding: 12px 14px; border-radius: var(--fp-radius); border: 1px solid; font-size: 13.5px; align-items: flex-start; }
.callout .ic { margin-top: 1px; }
.callout .c-title { font-weight: 600; }
.callout-warning { background: var(--fp-warning-50); border-color: var(--fp-warning-100); color: #92400E; }
.callout-info { background: var(--fp-primary-50); border-color: var(--fp-primary-100); color: #0B4FB3; }
.callout-ai { background: var(--fp-purple-50); border-color: var(--fp-purple-100); color: #5B21B6; }
.callout-danger { background: var(--fp-danger-50); border-color: var(--fp-danger-100); color: #991B1B; }
.callout-success { background: var(--fp-success-50); border-color: var(--fp-success-100); color: #065F46; }
.callout .c-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* AI field rows */
.ai-field { padding: 12px 0; border-bottom: 1px solid var(--fp-purple-100); }
.ai-field:last-child { border-bottom: 0; }
.ai-field .af-label { font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--fp-text-2); font-weight: 700; display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.ai-field .af-val { font-weight: 500; }
.ai-thinking { display: flex; flex-direction: column; gap: 10px; padding: 8px 0; }
.ai-step { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--fp-text-2); }
.ai-step .ic { color: var(--fp-text-3); }
.ai-step.done { color: var(--fp-text); }
.ai-step.done .ic { color: var(--fp-ai-green); }
.ai-step.running .ic { color: var(--fp-purple); animation: fp-spin 1s linear infinite; }
.skeleton { background: linear-gradient(90deg, var(--fp-slate-100) 25%, #F6F8FB 50%, var(--fp-slate-100) 75%); background-size: 200% 100%; animation: fp-shimmer 1.2s infinite; border-radius: 6px; height: 12px; }
@keyframes fp-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.confidence { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--fp-text-2); }
.confidence .bar { width: 60px; height: 6px; border-radius: 3px; background: var(--fp-purple-100); overflow: hidden; }
.confidence .bar span { display: block; height: 100%; background: var(--fp-purple); }

/* ---------- Timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline li { position: relative; padding: 0 0 18px 34px; }
.timeline li::before { content: ""; position: absolute; left: 11px; top: 26px; bottom: 0; width: 2px; background: var(--fp-border); }
.timeline li:last-child { padding-bottom: 0; }
.timeline li:last-child::before { display: none; }
.timeline .tl-dot { position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.timeline .tl-dot .ic { width: 13px; height: 13px; }
.timeline .tl-title { font-weight: 600; font-size: 13.5px; }
.timeline .tl-meta { color: var(--fp-text-2); font-size: 12px; }
.timeline .tl-body { font-size: 13px; color: var(--fp-text-2); margin-top: 2px; }

/* ---------- Chat / conversation ---------- */
.thread { display: flex; flex-direction: column; gap: 14px; }
.bubble { max-width: 85%; padding: 12px 14px; border-radius: 12px; font-size: 13.5px; border: 1px solid var(--fp-border); background: #fff; white-space: pre-wrap; }
.bubble.in { align-self: flex-start; border-top-left-radius: 4px; }
.bubble.out { align-self: flex-end; background: var(--fp-primary-50); border-color: var(--fp-primary-100); border-top-right-radius: 4px; }
.bubble .b-meta { font-size: 11.5px; color: var(--fp-text-2); margin-bottom: 4px; font-weight: 600; display: flex; gap: 8px; }

/* ---------- Empty state ---------- */
.empty { text-align: center; padding: 40px 20px; color: var(--fp-text-2); }
.empty .e-ic { width: 56px; height: 56px; border-radius: 16px; margin: 0 auto 12px; display: flex; align-items: center; justify-content: center; background: var(--fp-slate-50); color: var(--fp-text-3); }
.empty .e-ic .ic { width: 26px; height: 26px; }
.empty .e-title { font-weight: 600; color: var(--fp-text); font-size: 15px; margin-bottom: 4px; }
.empty .btn { margin-top: 14px; }

/* ---------- Dropdown ---------- */
.dropdown { position: relative; display: inline-block; }
.dropdown-menu {
  position: absolute; right: 0; top: calc(100% + 6px); min-width: 220px; background: #fff; color: var(--fp-text);
  border: 1px solid var(--fp-border); border-radius: var(--fp-radius-lg); box-shadow: var(--fp-shadow-lg);
  padding: 6px; z-index: 50; display: none; text-align: left;
}
.dropdown.open > .dropdown-menu { display: block; animation: fp-fade .15s ease; }
.dropdown-menu.left { left: 0; right: auto; }
.dd-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; background: transparent; border-radius: 6px; font: 500 13.5px var(--fp-font); color: var(--fp-text); cursor: pointer; text-align: left; text-decoration: none; }
.dd-item:hover { background: var(--fp-slate-50); text-decoration: none; }
.dd-item .ic { width: 16px; height: 16px; color: var(--fp-text-2); }
.dd-item.danger { color: var(--fp-danger); }
.dd-item.danger .ic { color: var(--fp-danger); }
.dd-sep { height: 1px; background: var(--fp-border); margin: 6px 0; }
.dd-head { padding: 10px; display: flex; gap: 10px; align-items: center; }
.notif-menu { width: 380px; max-width: calc(100vw - 24px); padding: 0; }
.notif-menu .nm-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--fp-border); }
.notif-menu .nm-list { max-height: 380px; overflow-y: auto; }
.notif { display: flex; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--fp-border); color: var(--fp-text); }
.notif:hover { background: var(--fp-slate-50); text-decoration: none; }
.notif.unread { background: #F7FAFF; }
.notif .n-title { font-weight: 600; font-size: 13px; }
.notif .n-body { font-size: 12.5px; color: var(--fp-text-2); }
.notif .n-time { font-size: 11.5px; color: var(--fp-text-3); margin-top: 2px; }
.notif .unread-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--fp-primary); margin-top: 6px; flex: 0 0 auto; }
.notif-menu .nm-foot { padding: 10px; text-align: center; }

/* ---------- Modal ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(15,23,42,.55); z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px 16px; overflow-y: auto; animation: fp-fadein .15s ease; }
@keyframes fp-fadein { from { opacity: 0; } to { opacity: 1; } }
.modal { background: #fff; border-radius: 14px; box-shadow: var(--fp-shadow-lg); width: 100%; max-width: 560px; display: flex; flex-direction: column; max-height: 88vh; animation: fp-pop .18s ease; }
.modal.lg { max-width: 780px; }
.modal.sm { max-width: 440px; }
@keyframes fp-pop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; align-items: flex-start; gap: 12px; padding: 18px 20px 14px; border-bottom: 1px solid var(--fp-border); }
.modal-head h3 { font-size: 16.5px; }
.modal-head .m-sub { color: var(--fp-text-2); font-size: 13px; margin-top: 2px; }
.modal-head .icon-btn { margin-left: auto; margin-top: -4px; }
.modal-body { padding: 18px 20px; overflow-y: auto; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--fp-border); display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; background: #FCFDFE; border-radius: 0 0 14px 14px; }
.modal-foot .left { margin-right: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.confirm-ic { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
body.modal-open { overflow: hidden; }

/* ---------- Toasts ---------- */
.toast-stack { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; }
.toast { display: flex; gap: 12px; align-items: flex-start; min-width: 300px; max-width: 420px; background: #fff; border: 1px solid var(--fp-border); border-left: 4px solid var(--t, var(--fp-success)); border-radius: 10px; box-shadow: var(--fp-shadow-lg); padding: 12px 14px; animation: fp-toast .25s ease; font-size: 13.5px; }
.toast .ic { color: var(--t, var(--fp-success)); margin-top: 1px; }
.toast .t-title { font-weight: 600; }
.toast .t-msg { color: var(--fp-text-2); font-size: 12.5px; }
.toast .t-close { margin-left: auto; border: 0; background: transparent; color: var(--fp-text-3); cursor: pointer; padding: 0; }
.toast.out { animation: fp-toast-out .2s ease forwards; }
@keyframes fp-toast { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fp-toast-out { to { opacity: 0; transform: translateX(20px); } }

/* ---------- Inbox (Client Messages) ---------- */
.inbox { display: grid; grid-template-columns: 230px minmax(320px, 400px) minmax(0, 1fr); gap: 0; height: calc(100vh - var(--fp-header-h) - 150px); min-height: 560px; overflow: hidden; }
.inbox-col { border-right: 1px solid var(--fp-border); overflow-y: auto; min-width: 0; }
.inbox-col:last-child { border-right: 0; }
.folder { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 12px; border: 0; background: transparent; border-radius: 7px; font: 500 13.5px var(--fp-font); color: var(--fp-text); cursor: pointer; text-align: left; }
.folder:hover { background: var(--fp-slate-50); }
.folder.active { background: var(--fp-primary-50); color: var(--fp-primary); font-weight: 600; }
.folder .ic { width: 16px; height: 16px; color: var(--fp-text-2); }
.folder.active .ic { color: var(--fp-primary); }
.folder .f-count { margin-left: auto; font-size: 11.5px; color: var(--fp-text-2); font-weight: 600; }
.folder.active .f-count { color: var(--fp-primary); }
.folder-group { padding: 12px 10px 6px; }
.folder-group .section-title { padding: 0 2px; margin-bottom: 6px; }
.msg-item { display: block; padding: 13px 16px; border-bottom: 1px solid var(--fp-border); cursor: pointer; position: relative; color: inherit; }
.msg-item:hover { background: #FAFCFF; text-decoration: none; }
.msg-item.active { background: var(--fp-primary-50); box-shadow: inset 3px 0 0 var(--fp-primary); }
.msg-item.unread .mi-sender { font-weight: 700; }
.msg-item.unread::after { content: ""; position: absolute; right: 14px; top: 18px; width: 8px; height: 8px; border-radius: 50%; background: var(--fp-primary); }
.msg-item .mi-top { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; padding-right: 14px; }
.msg-item .mi-sender { font-weight: 600; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-item .mi-time { font-size: 11.5px; color: var(--fp-text-2); white-space: nowrap; }
.msg-item .mi-subject { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-item .mi-preview { font-size: 12.5px; color: var(--fp-text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 2px 0 8px; }
.msg-item .mi-meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.preview-pane { padding: 20px 22px; }
.inbox-mobile-back { display: none; }

/* ---------- Workflow diagram ---------- */
.flow { display: flex; align-items: stretch; gap: 0; overflow-x: auto; padding: 8px 4px 16px; }
.flow-node { flex: 1 1 0; min-width: 128px; width: auto; border-radius: 12px; border: 1px solid; padding: 14px; background: #fff; position: relative; display: flex; flex-direction: column; gap: 8px; }
.flow-node .fn-ic { width: 34px; height: 34px; border-radius: 9px; display: flex; align-items: center; justify-content: center; }
.flow-node .fn-type { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.flow-node .fn-title { font-weight: 600; font-size: 13.5px; line-height: 1.3; }
.flow-node .fn-desc { font-size: 12px; color: var(--fp-text-2); }
.flow-node.n-trigger { border-color: var(--fp-primary-100); background: var(--fp-primary-50); }
.flow-node.n-trigger .fn-ic { background: var(--fp-primary); color: #fff; }
.flow-node.n-trigger .fn-type { color: var(--fp-primary); }
.flow-node.n-ai { border-color: var(--fp-purple-100); background: var(--fp-purple-50); }
.flow-node.n-ai .fn-ic { background: var(--fp-purple); color: #fff; }
.flow-node.n-ai .fn-type { color: var(--fp-purple); }
.flow-node.n-approval { border-color: var(--fp-warning-100); background: var(--fp-warning-50); }
.flow-node.n-approval .fn-ic { background: var(--fp-warning); color: var(--fp-text); }
.flow-node.n-approval .fn-type { color: #B45309; }
.flow-node.n-success { border-color: var(--fp-success-100); background: var(--fp-success-50); }
.flow-node.n-success .fn-ic { background: var(--fp-success); color: #fff; }
.flow-node.n-success .fn-type { color: var(--fp-success); }
.flow-node.n-failure { border-color: var(--fp-danger-100); background: var(--fp-danger-50); }
.flow-node.n-failure .fn-ic { background: var(--fp-danger); color: #fff; }
.flow-node.n-failure .fn-type { color: var(--fp-danger); }
.flow-node.dim { opacity: .55; filter: grayscale(.6); }
.flow-arrow { flex: 0 0 30px; display: flex; align-items: center; justify-content: center; position: relative; }
.flow-arrow::before { content: ""; position: absolute; left: 4px; right: 10px; top: 50%; height: 2px; background: var(--fp-border-2); }
.flow-arrow::after { content: ""; position: absolute; right: 4px; top: calc(50% - 5px); border: 5px solid transparent; border-left: 7px solid var(--fp-border-2); border-right: 0; }
.flow-branch { margin-top: 10px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font-size: 12.5px; color: var(--fp-text-2); }
.flow-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--fp-text-2); }
.flow-legend span { display: inline-flex; align-items: center; gap: 6px; }
.flow-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.mini-flow { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; font-size: 11.5px; }
.mini-flow .mf-step { padding: 3px 8px; border-radius: 5px; font-weight: 600; white-space: nowrap; }
.mini-flow .ic { width: 12px; height: 12px; color: var(--fp-text-3); }

/* Step log */
.step-log { list-style: none; margin: 0; padding: 0; }
.step-log li { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--fp-border); font-size: 13px; align-items: flex-start; }
.step-log li:last-child { border-bottom: 0; }
.step-log .sl-time { margin-left: auto; color: var(--fp-text-3); font-family: var(--fp-mono); font-size: 12px; white-space: nowrap; }

/* ---------- Charts (CSS/SVG) ---------- */
.bar-chart { display: flex; align-items: flex-end; gap: 10px; height: 180px; padding: 10px 4px 0; border-bottom: 1px solid var(--fp-border); }
.bar-chart .bc-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; min-width: 0; }
.bar-chart .bc-bars { display: flex; gap: 3px; align-items: flex-end; height: 100%; width: 100%; justify-content: center; }
.bar-chart .bc-bar { width: 100%; max-width: 18px; border-radius: 4px 4px 0 0; background: var(--fp-primary); min-height: 2px; transition: height .5s ease; position: relative; }
.bar-chart .bc-bar.green { background: var(--fp-success); }
.bar-chart .bc-bar.purple { background: var(--fp-purple); }
.bar-chart .bc-bar:hover::after { content: attr(data-v); position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%); background: var(--fp-text); color: #fff; font-size: 11px; padding: 2px 6px; border-radius: 4px; white-space: nowrap; }
.bar-chart-labels { display: flex; gap: 10px; padding: 6px 4px 0; }
.bar-chart-labels span { flex: 1; text-align: center; font-size: 11.5px; color: var(--fp-text-2); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--fp-text-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.hbar { display: grid; grid-template-columns: 150px minmax(0, 1fr) 40px; gap: 10px; align-items: center; font-size: 13px; padding: 6px 0; }
.hbar .hb-track { height: 10px; background: var(--fp-slate-100); border-radius: 5px; overflow: hidden; display: flex; }
.hbar .hb-track span { display: block; height: 100%; }
.donut-wrap { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }

/* ---------- Integration cards ---------- */
.integ-card { display: flex; flex-direction: column; }
.integ-card .ic-head { display: flex; gap: 14px; align-items: flex-start; padding: 18px; }
.integ-card .ic-name { font-weight: 600; font-size: 15px; }
.integ-card .ic-desc { color: var(--fp-text-2); font-size: 12.5px; margin-top: 2px; }
.integ-card .ic-body { padding: 0 18px 14px; display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--fp-text-2); flex: 1; }
.integ-card .ic-foot { padding: 12px 18px; border-top: 1px solid var(--fp-border); display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }

.settings-card { display: flex; gap: 14px; padding: 18px; align-items: flex-start; height: 100%; }
.settings-card .sc-title { font-weight: 600; font-size: 15px; }
.settings-card .sc-desc { color: var(--fp-text-2); font-size: 13px; margin-top: 2px; }
.settings-card .sc-meta { margin-top: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.settings-nav { position: sticky; top: calc(var(--fp-header-h) + 20px); padding: 8px; }
.settings-nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 7px; color: var(--fp-text); font-weight: 500; font-size: 13.5px; }
.settings-nav a:hover { background: var(--fp-slate-50); text-decoration: none; }
.settings-nav a.active { background: var(--fp-primary-50); color: var(--fp-primary); font-weight: 600; }
.settings-nav a .ic { width: 16px; height: 16px; color: var(--fp-text-2); }
.settings-nav a.active .ic { color: var(--fp-primary); }
.sticky-actions { position: sticky; bottom: 0; background: rgba(248,250,252,.92); backdrop-filter: blur(6px); padding: 14px 0; display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--fp-border); margin-top: 16px; z-index: 5; }

/* Steps (connection flow) */
.conn-steps { display: flex; flex-direction: column; gap: 12px; }
.conn-step { display: flex; gap: 12px; align-items: center; font-size: 13.5px; color: var(--fp-text-2); }
.conn-step .cs-dot { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--fp-border-2); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex: 0 0 auto; background: #fff; }
.conn-step.active { color: var(--fp-text); font-weight: 600; }
.conn-step.active .cs-dot { border-color: var(--fp-primary); color: var(--fp-primary); }
.conn-step.done { color: var(--fp-text); }
.conn-step.done .cs-dot { border-color: var(--fp-success); background: var(--fp-success); color: #fff; }

/* Auth pages */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); background: #fff; }
.auth-brand { background: var(--fp-sidebar); color: #fff; padding: 48px 56px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-brand::before { content: ""; position: absolute; width: 520px; height: 520px; right: -180px; top: -160px; border-radius: 50%; background: radial-gradient(circle, rgba(22,119,255,.35), transparent 65%); }
.auth-brand::after { content: ""; position: absolute; width: 460px; height: 460px; left: -160px; bottom: -200px; border-radius: 50%; background: radial-gradient(circle, rgba(124,58,237,.3), transparent 65%); }
.auth-brand > * { position: relative; z-index: 1; }
.auth-brand .ab-logo { width: 280px; max-width: 100%; }
.auth-brand h2 { color: #fff; font-size: 28px; line-height: 1.25; max-width: 460px; letter-spacing: -.01em; }
.auth-brand .ab-points { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-direction: column; gap: 14px; }
.auth-brand .ab-points li { display: flex; gap: 12px; align-items: flex-start; color: #CBD5E1; font-size: 14px; }
.auth-brand .ab-points .ic { color: #60A5FA; margin-top: 2px; }
.auth-brand .ab-foot { color: #7F93AD; font-size: 12.5px; }
.auth-form-wrap { display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: var(--fp-bg); }
.auth-form { width: 100%; max-width: 400px; }
.auth-form .af-logo { width: 220px; margin: 0 auto 8px; display: block; }
.auth-form .card-body { padding: 28px; }
.auth-form h1 { font-size: 21px; margin-bottom: 4px; }
.auth-center { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--fp-bg); }

/* Misc */
.divider-v { width: 1px; align-self: stretch; background: var(--fp-border); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 14px; background: var(--fp-slate-50); border: 1px solid var(--fp-border); font-size: 12.5px; font-weight: 500; }
.chip button { border: 0; background: transparent; padding: 0; cursor: pointer; color: var(--fp-text-3); display: inline-flex; }
.chip button:hover { color: var(--fp-danger); }
.stat-inline { display: flex; gap: 24px; flex-wrap: wrap; }
.stat-inline .si-v { font-size: 20px; font-weight: 700; }
.stat-inline .si-l { font-size: 12px; color: var(--fp-text-2); }
.date-pill { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px; border: 1px solid var(--fp-border); border-radius: var(--fp-radius); background: #fff; color: var(--fp-text-2); font-weight: 500; font-size: 13px; }
.report-doc { font-size: 13.5px; line-height: 1.65; }
.report-doc h3 { margin: 18px 0 8px; font-size: 14px; }
.report-doc h3:first-child { margin-top: 0; }
.highlight-new { animation: fp-flash 2s ease; }
.code-note { font-family: var(--fp-mono); font-size: 12px; background: var(--fp-slate-50); border: 1px solid var(--fp-border); border-radius: 6px; padding: 2px 6px; }
.logo-preview { border: 1px dashed var(--fp-border-2); border-radius: var(--fp-radius-lg); padding: 18px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.logo-preview .lp-light { background: #fff; border: 1px solid var(--fp-border); border-radius: 10px; padding: 14px; }
.logo-preview .lp-dark { background: var(--fp-sidebar); border-radius: 10px; padding: 14px; }
.logo-preview img { height: 48px; width: auto; display: block; }

/* Compact tables preference (Settings → General) */
body.compact .table td { padding: 7px 12px; }
body.compact .list-item { padding: 8px 18px; }
.input-trail { position: relative; }
.input-trail .input { padding-right: 44px; }
.input-trail .trail { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); }
.row > .input, .row > .input-icon, .row > .input-trail { min-width: 0; flex: 1 1 auto; }
@media (max-width: 480px) { #keySaved { flex-wrap: wrap; } #keySaved > .input { flex-basis: 100%; } #keySaved .mono { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; } }
.callout > div:not(.c-actions) { flex: 1 1 auto; min-width: 0; }
