/* ============ Airtable recreation — design system ============ */
:root {
  --blue: #2d7ff9;
  --blue-dark: #166ee1;
  --blue-tint: #eaf3fe;
  --blue-tint2: #d7e7fd;
  --text: #1d1f25;
  --text-2: #616670;
  --text-3: #93979f;
  --line: #e5e7eb;
  --line-2: #edeff2;
  --bg: #ffffff;
  --bg-soft: #f7f7f5;
  --bg-hover: #f0f1f3;
  --bg-active: #e9e9e6;
  --red: #f82b60;
  --green: #20c933;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.08);
  --shadow-pop: 0 0 0 1px rgba(29,31,37,.04), 0 4px 8px rgba(29,31,37,.06), 0 12px 32px rgba(29,31,37,.14);
  --shadow-modal: 0 0 0 1px rgba(29,31,37,.05), 0 24px 64px rgba(29,31,37,.24);
  --radius: 6px;
  --radius-lg: 10px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  --mono: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font);
  font-size: 13px;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
#app { height: 100vh; display: flex; flex-direction: column; }
button { font-family: inherit; font-size: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }
.ic { flex: none; display: block; }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-thumb { background: #c9ccd1; border: 3px solid transparent; background-clip: content-box; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background-color: #a9adb5; }
::-webkit-scrollbar-corner { background: transparent; }

/* ---------- Top bar ---------- */
.topbar {
  height: 56px; flex: none; display: flex; align-items: center; gap: 4px;
  padding: 0 12px; background: var(--bg); border-bottom: 1px solid var(--line);
  position: relative; z-index: 40;
}
.tb-menu-btn { width: 32px; height: 32px; border-radius: var(--radius); display: grid; place-items: center; color: var(--text-2); }
.tb-menu-btn:hover { background: var(--bg-hover); }
.tb-base { display: flex; align-items: center; gap: 8px; padding: 4px 8px; border-radius: var(--radius); cursor: pointer; }
.tb-base:hover { background: var(--bg-hover); }
.tb-base-icon { width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center; color: #fff; }
.tb-base-name { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.tb-nav { display: flex; align-items: center; margin: 0 auto; gap: 2px; }
.tb-nav .tb-tab { padding: 7px 12px; border-radius: var(--radius); font-weight: 500; color: var(--text-2); position: relative; }
.tb-nav .tb-tab:hover { background: var(--bg-hover); }
.tb-nav .tb-tab.active { color: var(--text); font-weight: 600; }
.tb-nav .tb-tab.active::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: -9px; height: 2px; border-radius: 2px; background: var(--text); }
.tb-right { display: flex; align-items: center; gap: 6px; }
.tb-btn { display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border-radius: var(--radius); color: var(--text-2); font-weight: 500; }
.tb-btn:hover { background: var(--bg-hover); }
.tb-btn.primary { background: var(--blue); color: #fff; font-weight: 600; }
.tb-btn.primary:hover { background: var(--blue-dark); }
.tb-avatar { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, #ffb25e, #f82b60); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 12px; cursor: pointer; }

/* ---------- Table tabs strip ---------- */
.tabstrip {
  height: 42px; flex: none; display: flex; align-items: center; gap: 2px;
  padding: 0 10px; background: var(--bg-soft); border-bottom: 1px solid var(--line);
  overflow-x: auto; overflow-y: hidden; scrollbar-width: none; z-index: 30;
}
.tabstrip::-webkit-scrollbar { display: none; }
.ttab {
  display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px;
  border-radius: var(--radius); color: var(--text-2); font-weight: 500;
  white-space: nowrap; cursor: pointer; user-select: none; position: relative;
}
.ttab:hover { background: var(--bg-hover); color: var(--text); }
.ttab.active { background: var(--bg); color: var(--text); font-weight: 600; box-shadow: var(--shadow-sm), 0 0 0 1px rgba(29,31,37,.04); }
.ttab .tt-caret { opacity: 0; display: grid; place-items: center; border-radius: 4px; }
.ttab:hover .tt-caret, .ttab.active .tt-caret { opacity: 1; }
.ttab.dragging { opacity: .4; }
.ttab.drop-before::before, .ttab.drop-after::after {
  content: ''; position: absolute; top: 4px; bottom: 4px; width: 2px; background: var(--blue); border-radius: 1px;
}
.ttab.drop-before::before { left: -2px; }
.ttab.drop-after::after { right: -2px; }
.ttab-add { width: 30px; height: 30px; border-radius: var(--radius); display: grid; place-items: center; color: var(--text-2); }
.ttab-add:hover { background: var(--bg-hover); color: var(--text); }
.ttab input { border: none; outline: none; font: inherit; font-weight: 600; background: transparent; width: 120px; }

/* ---------- Body layout ---------- */
.body-row { flex: 1; display: flex; min-height: 0; position: relative; }

/* ---------- View sidebar ---------- */
.sidebar {
  width: 240px; flex: none; background: var(--bg); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; min-height: 0; z-index: 25;
}
.sb-head { padding: 10px 12px 6px; display: flex; align-items: center; justify-content: space-between; }
.sb-title { font-size: 12px; font-weight: 600; color: var(--text-2); }
.sb-search { margin: 0 10px 6px; position: relative; }
.sb-search .ic { position: absolute; left: 8px; top: 7px; color: var(--text-3); }
.sb-search input { width: 100%; height: 28px; padding: 0 8px 0 26px; border: 1px solid var(--line); border-radius: var(--radius); outline: none; font-size: 12.5px; background: var(--bg-soft); }
.sb-search input:focus { border-color: var(--blue); background: #fff; box-shadow: 0 0 0 2px var(--blue-tint2); }
.sb-views { flex: 1; overflow-y: auto; padding: 2px 6px 8px; }
.sb-view {
  display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 8px;
  border-radius: var(--radius); cursor: pointer; color: var(--text-2); font-weight: 500; user-select: none;
}
.sb-view .ic { color: var(--text-3); }
.sb-view:hover { background: var(--bg-hover); }
.sb-view.active { background: var(--bg-active); color: var(--text); font-weight: 600; }
.sb-view.active .ic { color: var(--text); }
.sb-view .sb-view-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-view .sb-dots { opacity: 0; width: 22px; height: 22px; border-radius: 4px; display: grid; place-items: center; }
.sb-view:hover .sb-dots { opacity: 1; }
.sb-view .sb-dots:hover { background: rgba(0,0,0,.08); }
.sb-create { border-top: 1px solid var(--line-2); padding: 8px 10px; }
.sb-create-btn { display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 8px; border-radius: var(--radius); width: 100%; color: var(--text-2); font-weight: 500; }
.sb-create-btn:hover { background: var(--bg-hover); color: var(--text); }
.sb-collapsed-rail { width: 44px; flex: none; border-right: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; padding-top: 10px; gap: 6px; }
.sb-rail-btn { width: 32px; height: 32px; border-radius: var(--radius); display: grid; place-items: center; color: var(--text-2); }
.sb-rail-btn:hover { background: var(--bg-hover); color: var(--text); }

/* ---------- Main view area ---------- */
.view-main { flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--bg); }

/* ---------- View toolbar ---------- */
.toolbar {
  height: 44px; flex: none; display: flex; align-items: center; gap: 2px;
  padding: 0 12px; border-bottom: 1px solid var(--line); background: var(--bg);
  overflow-x: auto; scrollbar-width: none; z-index: 20;
}
.toolbar::-webkit-scrollbar { display: none; }
.tl-viewname { display: flex; align-items: center; gap: 4px; font-weight: 600; font-size: 14px; padding: 4px 6px; border-radius: var(--radius); cursor: pointer; margin-right: 8px; white-space: nowrap; }
.tl-viewname:hover { background: var(--bg-hover); }
.tl-btn {
  display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 9px;
  border-radius: var(--radius); color: var(--text-2); font-weight: 500; white-space: nowrap; position: relative;
}
.tl-btn:hover { background: var(--bg-hover); color: var(--text); }
.tl-btn.on { color: var(--blue-dark); }
.tl-btn.on:hover { color: var(--blue-dark); }
.tl-btn .badge { background: var(--blue); color: #fff; border-radius: 8px; min-width: 16px; height: 16px; font-size: 11px; font-weight: 700; display: grid; place-items: center; padding: 0 4px; }
.tl-sep { width: 1px; height: 20px; background: var(--line); margin: 0 4px; flex: none; }
.tl-spacer { flex: 1; min-width: 8px; }
.tl-search { position: relative; display: flex; align-items: center; }
.tl-search .ic { position: absolute; left: 8px; color: var(--text-3); pointer-events: none; }
.tl-search input { width: 190px; height: 30px; border: 1px solid transparent; border-radius: var(--radius); padding: 0 26px 0 28px; outline: none; background: transparent; transition: width .15s; }
.tl-search input:hover { background: var(--bg-hover); }
.tl-search input:focus { border-color: var(--blue); background: #fff; width: 240px; box-shadow: 0 0 0 2px var(--blue-tint2); }
.tl-search .tl-search-clear { position: absolute; right: 4px; width: 22px; height: 22px; border-radius: 4px; display: grid; place-items: center; color: var(--text-3); }
.tl-search .tl-search-clear:hover { background: var(--bg-hover); color: var(--text); }

/* ---------- Grid ---------- */
.grid-wrap { flex: 1; overflow: auto; position: relative; background: var(--bg); overscroll-behavior: none; }
.grid { display: inline-block; min-width: 100%; }
.g-header { display: flex; position: sticky; top: 0; z-index: 12; background: var(--bg); border-bottom: 1px solid var(--line); height: 34px; }
.g-corner { flex: none; width: 72px; position: sticky; left: 0; z-index: 14; background: var(--bg); border-right: 1px solid var(--line); display: flex; align-items: center; justify-content: center; }
.g-corner .cbx { opacity: 0; }
.g-corner:hover .cbx, .g-corner .cbx.checked { opacity: 1; }
.g-hcell {
  flex: none; display: flex; align-items: center; gap: 6px; padding: 0 8px;
  border-right: 1px solid var(--line-2); color: var(--text-2); font-weight: 600;
  user-select: none; position: relative; cursor: pointer; background: var(--bg); overflow: hidden;
}
.g-hcell:hover { background: var(--bg-soft); }
.g-hcell .ic { color: var(--text-3); }
.g-hcell .gh-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-hcell .gh-caret { opacity: 0; }
.g-hcell:hover .gh-caret { opacity: 1; }
.g-hcell.primary { position: sticky; left: 72px; z-index: 13; box-shadow: 1px 0 0 var(--line-2); }
.g-hcell.dragging { opacity: .35; }
.g-hcell.drop-before { box-shadow: inset 2px 0 0 var(--blue); }
.g-hcell.drop-after { box-shadow: inset -2px 0 0 var(--blue); }
.g-resize { position: absolute; right: -3px; top: 0; bottom: 0; width: 7px; cursor: col-resize; z-index: 3; }
.g-resize:hover::after, .g-resize.on::after { content: ''; position: absolute; left: 3px; top: 0; bottom: 0; width: 1.5px; background: var(--blue); }
.g-hadd { flex: none; width: 60px; display: grid; place-items: center; color: var(--text-3); cursor: pointer; border-right: 1px solid transparent; }
.g-hadd:hover { background: var(--bg-soft); color: var(--text); }

.g-row { display: flex; border-bottom: 1px solid var(--line-2); position: relative; background: var(--bg); }
.g-row:hover { background: #fafafa; }
.g-row.row-sel { background: var(--blue-tint); }
.g-row.row-sel:hover { background: var(--blue-tint); }
.g-row.drop-before::before, .g-row.drop-after::after { content: ''; position: absolute; left: 0; right: 0; height: 2px; background: var(--blue); z-index: 8; }
.g-row.drop-before::before { top: -1px; }
.g-row.drop-after::after { bottom: -1px; }
.g-row.dragging { opacity: .35; }
.g-gutter {
  flex: none; width: 72px; position: sticky; left: 0; z-index: 10;
  background: var(--bg); border-right: 1px solid var(--line);
  display: flex; align-items: center; padding: 0 6px 0 4px; gap: 2px;
}
.g-row:hover .g-gutter, .g-row.row-sel .g-gutter { background: inherit; }
.g-row:hover .g-gutter { background: #fafafa; }
.g-row.row-sel .g-gutter { background: var(--blue-tint); }
.g-colorbar { position: absolute; left: 0; top: 0; bottom: 0; width: 4px; }
.g-grip { width: 14px; display: grid; place-items: center; color: var(--text-3); opacity: 0; cursor: grab; flex: none; }
.g-row:hover .g-grip { opacity: 1; }
.g-grip:active { cursor: grabbing; }
.g-num { flex: 1; text-align: center; color: var(--text-3); font-size: 12px; }
.g-row:hover .g-num { display: none; }
.g-row:hover .cbx, .cbx.checked { display: grid; }
.g-gutter .cbx { display: none; flex: 1; }
.g-expand { width: 20px; height: 20px; border-radius: 4px; display: grid; place-items: center; color: var(--text-3); opacity: 0; flex: none; }
.g-row:hover .g-expand { opacity: 1; }
.g-expand:hover { background: rgba(0,0,0,.07); color: var(--text); }

.cbx { width: 16px; height: 16px; border: 1.5px solid #b9bec7; border-radius: 4px; display: grid; place-items: center; color: #fff; cursor: pointer; background: #fff; flex: none; align-items: center; justify-content: center; }
.cbx.checked { background: var(--blue); border-color: var(--blue); opacity: 1 !important; }
.cbx .ic { display: none; }
.cbx.checked .ic { display: block; }

.g-cell {
  flex: none; padding: 6px 8px; border-right: 1px solid var(--line-2);
  overflow: hidden; position: relative; cursor: default; background: transparent;
  white-space: nowrap; text-overflow: ellipsis; font-size: 13px; line-height: 20px;
}
.g-cell.primary { position: sticky; left: 72px; z-index: 9; background: var(--bg); box-shadow: 1px 0 0 var(--line-2); }
.g-row:hover .g-cell.primary { background: #fafafa; }
.g-row.row-sel .g-cell.primary { background: var(--blue-tint); }
.g-cell.sel { z-index: 5; }
.g-cell .cell-inner { display: flex; align-items: center; gap: 4px; min-width: 0; overflow: hidden; }
.g-cell .txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rh-medium .g-cell, .rh-medium .g-gutter { height: 56px; }
.rh-tall .g-cell, .rh-tall .g-gutter { height: 88px; }
.rh-xtall .g-cell, .rh-xtall .g-gutter { height: 128px; }
.rh-medium .g-cell, .rh-tall .g-cell, .rh-xtall .g-cell { white-space: normal; align-items: flex-start; padding-top: 7px; }
.rh-medium .g-cell .txt, .rh-tall .g-cell .txt, .rh-xtall .g-cell .txt { white-space: pre-wrap; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
.rh-medium .g-cell .txt { -webkit-line-clamp: 2; }
.rh-tall .g-cell .txt { -webkit-line-clamp: 4; }
.rh-xtall .g-cell .txt { -webkit-line-clamp: 6; }
.rh-medium .g-cell .cell-inner, .rh-tall .g-cell .cell-inner, .rh-xtall .g-cell .cell-inner { flex-wrap: wrap; align-content: flex-start; overflow: hidden; max-height: 100%; }
.rh-medium .g-cell { line-height: 20px; }

.g-cell a.cell-link { color: var(--blue-dark); text-decoration: none; }
.g-cell a.cell-link:hover { text-decoration: underline; }
.g-cell .cell-muted { color: var(--text-3); }
.g-cell mark { background: #fff1a8; color: inherit; border-radius: 2px; padding: 0 1px; }

.pill { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 10px; font-size: 12px; font-weight: 500; white-space: nowrap; line-height: 1; }
.pill.lg { height: 22px; font-size: 12.5px; padding: 0 10px; border-radius: 11px; }
.linkchip { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 8px; border-radius: 10px; font-size: 12px; font-weight: 500; background: var(--blue-tint); color: var(--blue-dark); white-space: nowrap; cursor: pointer; }
.linkchip:hover { background: var(--blue-tint2); }
.rating-cell { display: inline-flex; gap: 2px; color: #d7d9de; }
.rating-cell .on { color: var(--rate-c, #fcb400); }
.rating-cell .ic { fill: currentColor; }
.cell-check { color: var(--green); display: grid; place-items: center; width: 100%; }
.cell-check .box { width: 16px; height: 16px; border-radius: 4px; border: 1.5px solid #b9bec7; background: #fff; display: grid; place-items: center; color: transparent; }
.cell-check.on .box { background: var(--green); border-color: var(--green); color: #fff; }
.g-cell.num { text-align: right; }
.g-cell.num .cell-inner { justify-content: flex-end; }

/* selection */
.g-selbox { position: absolute; border: 2px solid var(--blue); border-radius: 1px; z-index: 7; pointer-events: none; box-shadow: 0 0 0 1px rgba(45,127,249,.2); }
.g-selbox .fill-handle { position: absolute; right: -4px; bottom: -4px; width: 7px; height: 7px; background: var(--blue); border: 1px solid #fff; border-radius: 1px; pointer-events: auto; cursor: crosshair; }
.g-range { position: absolute; background: rgba(45,127,249,.08); border: 1px solid rgba(45,127,249,.5); z-index: 6; pointer-events: none; }

/* group header row */
.g-group {
  display: flex; align-items: center; gap: 6px; position: sticky; left: 0;
  padding: 0 10px; height: 34px; background: var(--bg-soft); border-bottom: 1px solid var(--line);
  font-size: 12.5px; color: var(--text-2); user-select: none; cursor: pointer; z-index: 9; min-width: 100%;
}
.g-group .gg-count { color: var(--text-3); font-size: 12px; }
.g-group .gg-caret { display: grid; place-items: center; color: var(--text-2); }
.g-group .gg-label { font-weight: 600; color: var(--text); }
.g-group .gg-agg { color: var(--text-3); font-size: 11.5px; margin-left: 6px; }
.g-group.collapsed { }
.g-subtotal { display: flex; border-bottom: 1px solid var(--line-2); background: #fbfbfa; position: relative; }
.g-subtotal .st-label { flex: none; width: 72px; position: sticky; left: 0; background: #fbfbfa; border-right: 1px solid var(--line); font-size: 11px; color: var(--text-3); display: flex; align-items: center; justify-content: center; }
.g-subtotal .st-cell { flex: none; padding: 5px 8px; border-right: 1px solid var(--line-2); font-size: 11.5px; color: var(--text-2); text-align: right; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.g-subtotal .st-cell .aggfn { color: var(--text-3); font-size: 10px; margin-right: 4px; }

/* add row / footer */
.g-addrow { display: flex; align-items: center; gap: 6px; position: sticky; left: 0; height: 34px; padding: 0 12px; color: var(--text-3); cursor: pointer; border-bottom: 1px solid var(--line-2); min-width: 100%; }
.g-addrow:hover { color: var(--text); background: var(--bg-soft); }
.g-footer { display: flex; position: sticky; bottom: 0; z-index: 12; background: var(--bg); border-top: 1px solid var(--line); height: 32px; }
.g-fcorner { flex: none; width: 72px; position: sticky; left: 0; background: var(--bg); border-right: 1px solid var(--line); font-size: 11.5px; color: var(--text-3); display: flex; align-items: center; justify-content: center; }
.g-fcell { flex: none; display: flex; align-items: center; justify-content: flex-end; gap: 4px; padding: 0 8px; border-right: 1px solid var(--line-2); font-size: 11.5px; color: var(--text-2); cursor: pointer; overflow: hidden; white-space: nowrap; }
.g-fcell:hover { background: var(--bg-soft); }
.g-fcell .aggfn { color: var(--text-3); font-size: 10px; }
.g-fcell.primary { position: sticky; left: 72px; z-index: 10; background: var(--bg); box-shadow: 1px 0 0 var(--line-2); justify-content: flex-start; }
.g-count { position: absolute; right: 12px; bottom: 8px; background: rgba(29,31,37,.82); color: #fff; font-size: 12px; padding: 4px 10px; border-radius: 12px; z-index: 12; pointer-events: none; }

/* cell editor */
.cell-editor { position: absolute; z-index: 60; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-pop); }
.cell-editor input[type=text], .cell-editor input:not([type]) { width: 100%; height: 100%; border: 2px solid var(--blue); border-radius: 1px; outline: none; padding: 5px 7px; font: inherit; background: #fff; }
.cell-editor textarea { width: 100%; height: 100%; border: none; outline: none; padding: 8px; font: inherit; resize: none; line-height: 1.45; }
.cell-editor.text-ed { box-shadow: none; }
.longtext-ed { min-width: 320px; min-height: 140px; border: 2px solid var(--blue) !important; }

/* ---------- Popovers & menus ---------- */
.pop {
  position: absolute; z-index: 200; background: #fff; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-pop); min-width: 200px; max-width: 92vw;
  animation: popIn .09s ease-out;
}
@keyframes popIn { from { opacity: 0; transform: translateY(-3px) scale(.985); } to { opacity: 1; transform: none; } }
.pop-menu { padding: 6px; }
.mi {
  display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 10px 0 8px;
  border-radius: var(--radius); cursor: pointer; color: var(--text); white-space: nowrap; font-weight: 450;
}
.mi .ic { color: var(--text-2); }
.mi:hover { background: var(--bg-hover); }
.mi.danger { color: var(--red); }
.mi.danger .ic { color: var(--red); }
.mi.disabled { color: var(--text-3); cursor: default; }
.mi.disabled .ic { color: var(--text-3); }
.mi.disabled:hover { background: none; }
.mi .mi-sub { margin-left: auto; color: var(--text-3); font-size: 11.5px; }
.mi .mi-check { margin-left: auto; color: var(--blue); }
.mi-sep { height: 1px; background: var(--line-2); margin: 5px 4px; }
.mi-head { padding: 6px 10px 3px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); }
.pop-search { padding: 8px 8px 4px; }
.pop-search input { width: 100%; height: 30px; border: 1px solid var(--line); border-radius: var(--radius); padding: 0 8px; outline: none; }
.pop-search input:focus { border-color: var(--blue); box-shadow: 0 0 0 2px var(--blue-tint2); }
.pop-list { max-height: 280px; overflow-y: auto; padding: 4px 6px 6px; }
.pop-title { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px 6px; font-weight: 600; font-size: 13px; }
.pop-title .x { width: 24px; height: 24px; border-radius: 4px; display: grid; place-items: center; color: var(--text-3); }
.pop-title .x:hover { background: var(--bg-hover); color: var(--text); }

/* select dropdown */
.sel-list { max-height: 260px; overflow-y: auto; padding: 4px 6px 6px; }
.sel-opt { display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 8px; border-radius: var(--radius); cursor: pointer; }
.sel-opt:hover { background: var(--bg-hover); }
.sel-opt .sel-check { margin-left: auto; color: var(--blue); opacity: 0; }
.sel-opt.on .sel-check { opacity: 1; }
.sel-create { display: flex; align-items: center; gap: 8px; padding: 8px; border-top: 1px solid var(--line-2); }
.sel-create input { flex: 1; height: 28px; border: 1px solid var(--line); border-radius: var(--radius); padding: 0 8px; outline: none; }
.sel-create input:focus { border-color: var(--blue); }

/* color picker */
.color-grid { display: grid; grid-template-columns: repeat(5, 28px); gap: 6px; padding: 10px 12px; }
.color-dot { width: 26px; height: 26px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; color: #fff; }
.color-dot:hover { transform: scale(1.12); }
.color-dot.on { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--blue); }

/* date picker */
.datep { width: 240px; padding: 10px; }
.datep-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.datep-head .m { font-weight: 600; font-size: 13px; }
.datep-nav { display: flex; gap: 2px; }
.datep-nav button { width: 24px; height: 24px; border-radius: 4px; display: grid; place-items: center; color: var(--text-2); }
.datep-nav button:hover { background: var(--bg-hover); }
.datep-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; }
.datep-grid .dow { font-size: 10.5px; color: var(--text-3); text-align: center; padding: 3px 0; font-weight: 600; }
.datep-day { height: 28px; border-radius: var(--radius); display: grid; place-items: center; font-size: 12px; cursor: pointer; color: var(--text); }
.datep-day:hover { background: var(--bg-hover); }
.datep-day.other { color: var(--text-3); }
.datep-day.today { box-shadow: inset 0 0 0 1.5px var(--blue); }
.datep-day.on { background: var(--blue); color: #fff; font-weight: 600; }
.datep-foot { display: flex; gap: 6px; margin-top: 8px; }
.datep-foot button { flex: 1; height: 28px; border-radius: var(--radius); font-weight: 500; color: var(--text-2); }
.datep-foot button:hover { background: var(--bg-hover); color: var(--text); }

/* ---------- Field config panel ---------- */
.fieldcfg { width: 340px; max-height: 80vh; display: flex; flex-direction: column; }
.fieldcfg-body { padding: 12px; overflow-y: auto; }
.fieldcfg label.fl { display: block; font-size: 11.5px; font-weight: 600; color: var(--text-2); margin: 10px 0 4px; }
.fieldcfg input.fname { width: 100%; height: 34px; border: 1.5px solid var(--blue); border-radius: var(--radius); padding: 0 10px; outline: none; font-weight: 600; box-shadow: 0 0 0 2px var(--blue-tint2); }
.ftype-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.ftype-opt { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: var(--radius); cursor: pointer; border: 1px solid transparent; }
.ftype-opt:hover { background: var(--bg-hover); }
.ftype-opt.on { border-color: var(--blue); background: var(--blue-tint); }
.ftype-opt .ic { color: var(--text-2); }
.fieldcfg select, .fpicker { width: 100%; height: 32px; border: 1px solid var(--line); border-radius: var(--radius); padding: 0 8px; outline: none; background: #fff; cursor: pointer; display: flex; align-items: center; justify-content: space-between; }
.fieldcfg select:focus { border-color: var(--blue); }
.choice-row { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.choice-row .grip { color: var(--text-3); cursor: grab; }
.choice-row input { flex: 1; height: 30px; border: 1px solid transparent; border-radius: var(--radius); padding: 0 8px; outline: none; background: var(--bg-soft); }
.choice-row input:focus { border-color: var(--blue); background: #fff; }
.choice-row .cdot { width: 22px; height: 22px; border-radius: 50%; cursor: pointer; flex: none; border: 2px solid rgba(0,0,0,.08); }
.choice-row .cdel { width: 24px; height: 24px; border-radius: 4px; display: grid; place-items: center; color: var(--text-3); opacity: 0; }
.choice-row:hover .cdel { opacity: 1; }
.choice-row .cdel:hover { background: var(--bg-hover); color: var(--red); }
.choice-add { display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 8px; border-radius: var(--radius); color: var(--text-2); cursor: pointer; font-weight: 500; }
.choice-add:hover { background: var(--bg-hover); }
.fieldcfg-foot { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line-2); }
.fieldcfg-foot .spacer { flex: 1; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: var(--radius); font-weight: 600; font-size: 13px; cursor: pointer; }
.btn.primary { background: var(--blue); color: #fff; }
.btn.primary:hover { background: var(--blue-dark); }
.btn.ghost { color: var(--text-2); }
.btn.ghost:hover { background: var(--bg-hover); color: var(--text); }
.btn.outline { border: 1px solid var(--line); background: #fff; }
.btn.outline:hover { background: var(--bg-soft); }
.btn.danger { background: var(--red); color: #fff; }
.btn.danger:hover { background: #d91e4f; }
.btn.danger-ghost { color: var(--red); }
.btn.danger-ghost:hover { background: #fdf0f3; }
.btn.sm { height: 26px; padding: 0 9px; font-size: 12px; }
.btn:disabled { opacity: .5; cursor: default; }

/* ---------- Modal ---------- */
.overlay { position: fixed; inset: 0; background: rgba(29,31,37,.42); z-index: 300; display: grid; place-items: center; animation: fadeIn .12s ease-out; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal { background: #fff; border-radius: 14px; box-shadow: var(--shadow-modal); animation: modalIn .14s cubic-bezier(.2,.9,.3,1.2); max-width: 94vw; max-height: 92vh; display: flex; flex-direction: column; }
@keyframes modalIn { from { opacity: 0; transform: scale(.96) translateY(8px); } to { opacity: 1; transform: none; } }
.modal-c { width: 420px; padding: 20px; }
.modal-c h3 { font-size: 16px; margin-bottom: 8px; }
.modal-c p { color: var(--text-2); line-height: 1.5; margin-bottom: 16px; }
.modal-c .mrow { display: flex; justify-content: flex-end; gap: 8px; }

/* expanded record */
.rec-modal { width: min(880px, 94vw); height: min(660px, 90vh); }
.rec-head { display: flex; align-items: center; gap: 8px; padding: 14px 18px; border-bottom: 1px solid var(--line-2); }
.rec-head .rec-title { flex: 1; font-size: 17px; font-weight: 700; border: none; outline: none; padding: 4px 6px; border-radius: var(--radius); min-width: 0; }
.rec-head .rec-title:hover, .rec-head .rec-title:focus { background: var(--bg-hover); }
.rec-nav { display: flex; align-items: center; gap: 2px; }
.rec-nav button { width: 28px; height: 28px; border-radius: var(--radius); display: grid; place-items: center; color: var(--text-2); }
.rec-nav button:hover:not(:disabled) { background: var(--bg-hover); color: var(--text); }
.rec-nav button:disabled { opacity: .35; cursor: default; }
.rec-nav .pos { font-size: 12px; color: var(--text-3); min-width: 56px; text-align: center; }
.rec-body { flex: 1; overflow-y: auto; padding: 16px 18px; }
.rec-field { display: grid; grid-template-columns: 200px 1fr; gap: 10px; align-items: start; margin-bottom: 4px; padding: 5px 8px; border-radius: var(--radius); }
.rec-field:hover { background: var(--bg-soft); }
.rec-field .rf-label { display: flex; align-items: center; gap: 7px; color: var(--text-2); font-weight: 500; padding-top: 5px; font-size: 12.5px; }
.rec-field .rf-label .ic { color: var(--text-3); }
.rec-field .rf-val { min-height: 30px; display: flex; align-items: center; flex-wrap: wrap; gap: 4px; padding: 4px 6px; border-radius: var(--radius); cursor: text; }
.rec-field .rf-val:hover { background: rgba(0,0,0,.03); }
.rec-field .rf-val input[type=text], .rec-field .rf-val input:not([type]) { width: 100%; border: none; outline: none; font: inherit; padding: 4px 0; background: transparent; }
.rec-field .rf-val textarea { width: 100%; border: none; outline: none; font: inherit; resize: vertical; min-height: 60px; background: transparent; line-height: 1.5; }
.rec-field .rf-val .empty { color: var(--text-3); font-size: 12.5px; }
.rec-field .rf-val .rating-cell { font-size: 0; }
.rec-field .rf-val .rating-cell .ic { cursor: pointer; }

/* ---------- Kanban ---------- */
.kanban { flex: 1; display: flex; gap: 10px; padding: 14px; overflow-x: auto; background: #fafaf8; align-items: flex-start; }
.kb-stack { flex: none; width: 270px; background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--radius-lg); display: flex; flex-direction: column; max-height: 100%; }
.kb-stack.dragover { box-shadow: 0 0 0 2px var(--blue-tint2); background: var(--blue-tint); }
.kb-head { display: flex; align-items: center; gap: 7px; padding: 10px 12px 8px; }
.kb-head .cnt { color: var(--text-3); font-size: 12px; }
.kb-head .kb-dots { margin-left: auto; width: 22px; height: 22px; border-radius: 4px; display: grid; place-items: center; color: var(--text-3); opacity: 0; }
.kb-stack:hover .kb-dots { opacity: 1; }
.kb-head .kb-dots:hover { background: var(--bg-hover); }
.kb-cards { flex: 1; overflow-y: auto; padding: 0 8px 4px; min-height: 40px; }
.kb-card { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; margin-bottom: 7px; cursor: grab; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.kb-card:hover { border-color: #cfd3da; box-shadow: 0 2px 6px rgba(0,0,0,.07); }
.kb-card.dragging { opacity: .4; }
.kb-card .kc-title { font-weight: 600; margin-bottom: 6px; line-height: 1.35; }
.kb-card .kc-row { display: flex; align-items: center; gap: 5px; color: var(--text-2); font-size: 12px; margin-top: 3px; min-height: 18px; }
.kb-card .kc-row .ic { color: var(--text-3); }
.kb-card .kc-row .txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kb-card.drop-before { box-shadow: 0 -2px 0 var(--blue); }
.kb-add { display: flex; align-items: center; gap: 6px; margin: 4px 8px 8px; padding: 7px 8px; border-radius: var(--radius); color: var(--text-3); cursor: pointer; font-weight: 500; }
.kb-add:hover { background: var(--bg-hover); color: var(--text); }
.kb-uncat .kb-head .pill { background: #eceef1; color: var(--text-2); }

/* ---------- Gallery ---------- */
.gallery { flex: 1; overflow-y: auto; padding: 16px; background: #fafaf8; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; align-content: start; }
.gal-card { background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; cursor: pointer; transition: box-shadow .12s, transform .12s; }
.gal-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,.1); transform: translateY(-1px); }
.gal-cover { height: 120px; display: grid; place-items: center; color: rgba(255,255,255,.85); position: relative; }
.gal-cover .gal-initial { font-size: 38px; font-weight: 700; color: rgba(255,255,255,.9); }
.gal-body { padding: 10px 12px 12px; }
.gal-title { font-weight: 600; margin-bottom: 7px; font-size: 13.5px; line-height: 1.35; }
.gal-row { display: flex; align-items: center; gap: 6px; color: var(--text-2); font-size: 12px; margin-top: 4px; min-height: 18px; }
.gal-row .gal-flabel { color: var(--text-3); min-width: 64px; flex: none; }
.gal-row .txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Calendar ---------- */
.cal { flex: 1; display: flex; flex-direction: column; min-height: 0; background: var(--bg); }
.cal-head { display: flex; align-items: center; gap: 10px; padding: 10px 16px; }
.cal-head .cal-month { font-size: 16px; font-weight: 700; min-width: 170px; }
.cal-head .btn.sm { height: 28px; }
.cal-dows { display: grid; grid-template-columns: repeat(7, 1fr); padding: 0 8px; }
.cal-dows .dow { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); padding: 4px 8px; }
.cal-grid { flex: 1; display: grid; grid-template-columns: repeat(7, 1fr); grid-auto-rows: 1fr; padding: 0 8px 8px; min-height: 0; }
.cal-day { border: 1px solid var(--line-2); margin: 0 -1px -1px 0; padding: 4px 6px; min-height: 86px; overflow: hidden; position: relative; cursor: default; }
.cal-day.other { background: #fafaf9; }
.cal-day.other .dnum { color: var(--text-3); }
.cal-day.today .dnum { background: var(--blue); color: #fff; }
.cal-day.dropover { background: var(--blue-tint); }
.cal-day .dnum { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 600; margin-bottom: 3px; }
.cal-chip { display: flex; align-items: center; gap: 5px; height: 22px; padding: 0 7px; border-radius: 5px; font-size: 12px; font-weight: 500; margin-bottom: 2px; cursor: grab; color: #fff; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cal-chip:hover { filter: brightness(.94); }
.cal-more { font-size: 11.5px; color: var(--text-2); padding: 1px 7px; border-radius: 4px; cursor: pointer; font-weight: 500; }
.cal-more:hover { background: var(--bg-hover); }

/* ---------- Form view ---------- */
.formwrap { flex: 1; overflow-y: auto; background: #f4f2ee; display: flex; justify-content: center; padding: 40px 16px 80px; }
.form-card { width: min(640px, 100%); }
.form-cover { height: 8px; border-radius: 12px 12px 0 0; background: var(--blue); }
.form-inner { background: #fff; border: 1px solid var(--line); border-top: none; border-radius: 0 0 12px 12px; padding: 30px 36px 34px; box-shadow: var(--shadow-sm); }
.form-title { font-size: 24px; font-weight: 700; margin-bottom: 8px; }
.form-desc { color: var(--text-2); line-height: 1.5; margin-bottom: 24px; }
.ff-row { margin-bottom: 20px; }
.ff-row label { display: flex; align-items: center; gap: 7px; font-weight: 600; margin-bottom: 6px; font-size: 13.5px; }
.ff-row label .req { color: var(--red); }
.ff-row label .ic { color: var(--text-3); }
.ff-row .ff-help { color: var(--text-3); font-size: 12px; margin-top: 4px; }
.ff-input { width: 100%; }
.ff-input input[type=text], .ff-input input:not([type]), .ff-input textarea { width: 100%; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 10px; outline: none; font: inherit; background: #fff; }
.ff-input textarea { min-height: 80px; resize: vertical; line-height: 1.5; }
.ff-input input:focus, .ff-input textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 2px var(--blue-tint2); }
.ff-input .rating-cell .ic { width: 24px; height: 24px; cursor: pointer; }
.ff-choices { display: flex; flex-wrap: wrap; gap: 6px; }
.ff-choice { border: 1.5px solid var(--line); border-radius: 16px; padding: 5px 12px; cursor: pointer; font-weight: 500; }
.ff-choice:hover { border-color: #c3c7cf; }
.ff-choice.on { border-color: transparent; color: #fff; }
.ff-cbx { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.form-actions { display: flex; align-items: center; gap: 10px; margin-top: 26px; }
.form-thanks { text-align: center; padding: 60px 30px; }
.form-thanks .big-ic { width: 56px; height: 56px; border-radius: 50%; background: #e6f7e9; color: var(--green); display: grid; place-items: center; margin: 0 auto 16px; }
.form-thanks h2 { font-size: 20px; margin-bottom: 8px; }
.form-thanks p { color: var(--text-2); margin-bottom: 20px; }

/* ---------- Toasts ---------- */
.toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: 24px; z-index: 500; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  display: flex; align-items: center; gap: 12px; background: #1d1f25; color: #fff;
  padding: 10px 14px; border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.28);
  font-size: 13px; animation: toastIn .18s cubic-bezier(.2,.9,.3,1.2); max-width: 88vw;
}
@keyframes toastIn { from { opacity: 0; transform: translateY(10px) scale(.96); } to { opacity: 1; } }
.toast.out { transition: opacity .2s, transform .2s; opacity: 0; transform: translateY(6px); }
.toast .t-msg { font-weight: 500; }
.toast .t-undo { color: #9ec2ff; font-weight: 700; cursor: pointer; padding: 2px 6px; border-radius: 4px; }
.toast .t-undo:hover { background: rgba(255,255,255,.12); }
.toast .t-x { color: rgba(255,255,255,.6); display: grid; place-items: center; width: 20px; height: 20px; border-radius: 4px; }
.toast .t-x:hover { color: #fff; background: rgba(255,255,255,.12); }

/* ---------- Empty states ---------- */
.empty-state { padding: 60px 20px; text-align: center; color: var(--text-3); }
.empty-state .ic { margin: 0 auto 12px; color: #c9ccd1; }
.empty-state .es-title { font-size: 15px; font-weight: 600; color: var(--text-2); margin-bottom: 4px; }
.empty-state .es-sub { font-size: 13px; }

/* ---------- Selection action bar ---------- */
.selbar {
  position: absolute; left: 50%; transform: translateX(-50%); bottom: 18px; z-index: 100;
  display: flex; align-items: center; gap: 4px; background: #1d1f25; color: #fff;
  border-radius: 10px; padding: 6px; box-shadow: 0 10px 30px rgba(0,0,0,.3); animation: toastIn .16s;
}
.selbar .sb-count { padding: 0 10px; font-weight: 600; font-size: 12.5px; }
.selbar .sb-btn { display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 7px; color: #e8eaee; font-weight: 500; }
.selbar .sb-btn:hover { background: rgba(255,255,255,.12); }
.selbar .sb-btn.danger { color: #ff9db4; }
.selbar .sb-btn.danger:hover { background: rgba(248,43,96,.2); }

/* ---------- Link picker / record picker ---------- */
.recpick-list { max-height: 260px; overflow-y: auto; padding: 4px 6px 6px; }
.recpick-item { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: var(--radius); cursor: pointer; }
.recpick-item:hover { background: var(--bg-hover); }
.recpick-item .rp-name { font-weight: 500; }
.recpick-item .rp-sub { color: var(--text-3); font-size: 11.5px; margin-left: auto; }
.recpick-item .sel-check { margin-left: auto; color: var(--blue); opacity: 0; }
.recpick-item.on .sel-check { opacity: 1; }

/* ---------- Filter/group/sort builder rows ---------- */
.fx-row { display: flex; align-items: center; gap: 6px; padding: 4px 10px; }
.fx-row .fx-where { width: 56px; flex: none; color: var(--text-2); font-size: 12px; text-align: right; }
.fx-row select { height: 28px; border: 1px solid var(--line); border-radius: var(--radius); padding: 0 6px; outline: none; background: #fff; max-width: 150px; }
.fx-row input { height: 28px; border: 1px solid var(--line); border-radius: var(--radius); padding: 0 8px; outline: none; min-width: 0; flex: 1; }
.fx-row input:focus, .fx-row select:focus { border-color: var(--blue); }
.fx-row .fx-del { width: 24px; height: 24px; border-radius: 4px; display: grid; place-items: center; color: var(--text-3); flex: none; }
.fx-row .fx-del:hover { background: var(--bg-hover); color: var(--red); }
.fx-andor { display: flex; align-items: center; gap: 4px; padding: 6px 12px 0; color: var(--text-2); font-size: 12px; }
.fx-andor .seg { display: flex; border: 1px solid var(--line); border-radius: 5px; overflow: hidden; }
.fx-andor .seg button { padding: 2px 8px; font-size: 11.5px; font-weight: 600; color: var(--text-2); }
.fx-andor .seg button.on { background: var(--blue); color: #fff; }
.fx-add { margin: 6px 10px 10px; }
.hidef-row { display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 8px; border-radius: var(--radius); cursor: pointer; }
.hidef-row:hover { background: var(--bg-hover); }
.hidef-row .fname { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hidef-row .ic { color: var(--text-2); }
.hidef-row.off { color: var(--text-3); }
.hidef-row.off .ic { color: var(--text-3); }
.hidef-actions { display: flex; gap: 8px; padding: 6px 8px 2px; }
.hidef-actions button { flex: 1; height: 26px; border-radius: var(--radius); font-size: 12px; font-weight: 600; color: var(--text-2); }
.hidef-actions button:hover { background: var(--bg-hover); color: var(--text); }

/* day popover */
.daypop-list { max-height: 320px; overflow-y: auto; padding: 6px; width: 260px; }
.daypop-list .cal-chip { height: 26px; }

/* context submenu width helpers */
.wide-pop { min-width: 300px; }

/* ---------- Utility ---------- */
.hidden { display: none !important; }
.spacer { flex: 1; }

/* ---------- Mobile / narrow ---------- */
.sb-backdrop { display: none; }
@media (max-width: 860px) {
  .tb-nav { display: none; }
  .tb-btn .tb-label { display: none; }
  .sidebar {
    position: absolute; left: 0; top: 0; bottom: 0; z-index: 120;
    box-shadow: 8px 0 32px rgba(0,0,0,.14); transition: transform .18s ease-out;
  }
  .sidebar.closed { transform: translateX(-102%); }
  .sb-backdrop.show { display: block; position: absolute; inset: 0; background: rgba(29,31,37,.35); z-index: 110; }
  .toolbar { padding: 0 8px; }
  .tl-viewname { font-size: 13px; }
  .tl-search input { width: 110px; }
  .tl-search input:focus { width: 150px; }
  .rec-field { grid-template-columns: 1fr; gap: 2px; }
  .rec-field .rf-label { padding-top: 0; }
  .rec-modal { width: 100vw; height: 100vh; border-radius: 0; }
  .overlay { place-items: stretch; }
  .form-inner { padding: 22px 18px 26px; }
  .formwrap { padding: 16px 8px 60px; }
  .cal-grid { padding: 0 4px 4px; }
  .cal-day { min-height: 64px; padding: 2px 3px; }
  .cal-chip { font-size: 11px; height: 19px; padding: 0 5px; }
  .kanban { padding: 8px; }
  .kb-stack { width: 240px; }
  .gallery { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; padding: 10px; }
  .fieldcfg { width: min(340px, 92vw); }
}
@media (max-width: 560px) {
  .topbar { overflow: hidden; }
  .tb-right .tb-btn.tb-minor { display: none; }
  .tb-base-name { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ttab { padding: 0 8px; }
}
