/* Kaizen GDrive SaaS — design tokens from the Claude Design canvas */
:root {
  --accent: #0B6B8F; --accent-dark: #0B4F6B; --accent-soft: #E6F0F5; --accent-hover: #084F6A;
  --teal: #2FB7A2; --navy: #0E2A3A;
  --fg: #15202B; --fg-2: #4B5663; --fg-3: #6B7682; --fg-4: #8A94A0; --fg-5: #9AA4AE;
  --border: #E1E6EB; --border-soft: #EEF1F4; --ground: #F4F6F8; --panel: #fff; --surface: #FAFBFC; --chip: #EEF1F4;
  --amber: #D97706; --amber-fg: #8A5A05; --amber-bg: #FFF8E8; --amber-border: #F3E2B3; --amber-avatar: #FFF1E6;
  --red: #B42318; --red-bg: #FDECEA; --red-border: #F1C4C0; --red-dark: #7F1D1D;
  --green: #15803D; --green-bg: #EAF6EE; --green-border: #BFE3CC; --green-fg: #14532D;
  --purple: #5B21B6; --purple-bg: #F3E8FF; --purple-dark: #3B0764;
  --radius: 14px; --radius-sm: 10px; --radius-xs: 9px;
  --font: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); color: var(--fg); background: var(--ground); font-size: 14.5px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled, a[aria-disabled="true"] { opacity: .55; cursor: not-allowed; pointer-events: none; }
h1, h2, h3 { margin: 0; letter-spacing: -0.2px; }
h1 { font-size: 26px; font-weight: 700; letter-spacing: -0.3px; }
h2 { font-size: 16px; font-weight: 700; }
p { margin: 0; }
ul { list-style: none; margin: 0; padding: 0; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- buttons, inputs, chips ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: var(--radius-sm); border: 1.5px solid var(--border); background: var(--panel); font-weight: 600; font-size: 14px; color: var(--fg); text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--surface); color: var(--fg); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
.btn.dark { background: var(--fg); border-color: var(--fg); color: #fff; }
.btn.dark:hover { background: #000; color: #fff; }
.btn.danger { color: var(--red); border-color: var(--red-border); }
.btn.danger:hover { background: var(--red-bg); color: var(--red); }
.btn.danger-solid { background: var(--red); border-color: var(--red); color: #fff; }
.btn.danger-solid:hover { background: #8f1c13; color: #fff; }
.btn.purple { background: var(--purple); border-color: var(--purple); color: #fff; }
.btn.sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: var(--radius-xs); }
.btn.xs { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn.icon { padding: 0 9px; color: var(--fg-3); }
.btn.icon:hover { color: var(--fg); }
.tbl tr.hid td { opacity: .6; }
.tbl tr.hid:hover td { opacity: 1; }
/* select mode + batch progress */
.pick { width: 17px; height: 17px; accent-color: var(--accent); cursor: pointer; margin: 0; display: block; }
.selbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 18px; background: var(--accent-soft); border-bottom: 1px solid var(--border-soft); font-size: 13.5px; color: var(--accent-dark); }
.tbl tr.picked td, .frow.picked { background: var(--accent-soft); }
.amber-fg { color: var(--amber-fg); }
#lic-bar.notice { padding: 10px 24px; font-size: 13.5px; }
.tbl tr[data-pickrow] { cursor: pointer; }
.files-list.selecting .frow { grid-template-columns: 24px minmax(0, 1fr) 150px 84px 130px 180px; }
/* ".files-list .frow" (not just ".frow") so these win over the base .frow rule further down, which comes later in the file */
@container (max-width: 760px) {
  .files-list .frow { grid-template-columns: minmax(0, 1fr) 120px 76px 180px; } .frow .chg { display: none; }
  .files-list.selecting .frow { grid-template-columns: 24px minmax(0, 1fr) 120px 76px 180px; }
}
@container (max-width: 540px) {
  .files-list .frow { grid-template-columns: minmax(0, 1fr) 100px 80px; } .frow .sz { display: none; }
  .files-list .frow .nm .szi { display: inline; } .files-list .frow .nm .sub.szi { display: block; }
  .files-list.selecting .frow { grid-template-columns: 24px minmax(0, 1fr) 100px 80px; }
  .rbtn { padding: 0 8px; } .rbtn .lbl { display: none; }
}
.batch .batch-rows { max-height: 320px; overflow: auto; }
.brow { display: flex; align-items: center; gap: 10px; padding: 8px 20px; border-bottom: 1px solid var(--border-soft); font-size: 13.5px; }
.brow:last-child { border-bottom: 0; }
.brow.wait { color: var(--fg-3); } .brow.run { background: var(--surface); }
.brow .bmsg { max-width: 45%; } .brow.fail .bmsg { color: var(--red); } .brow.warn .bmsg { color: var(--amber-fg); } .brow.ok .bmsg { color: var(--green-fg); }
.bmark { width: 16px; display: inline-flex; justify-content: center; flex: none; } .bdot { width: 6px; height: 6px; border-radius: 50%; background: var(--border); display: inline-block; }
.btn.block { width: 100%; height: 48px; font-size: 16px; }
.linkish { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 600; cursor: pointer; }
.linkish:hover { color: var(--accent-hover); text-decoration: underline; }
.input { height: 40px; border: 1.5px solid #CBD3DA; border-radius: var(--radius-sm); padding: 0 12px; background: #fff; width: 100%; font-size: 14px; }
.input::placeholder { color: var(--fg-4); }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(11,107,143,.15); }
.input.lg { height: 48px; font-size: 16px; border-radius: var(--radius-sm); padding: 0 14px; }
select.input { padding-right: 32px; appearance: none; 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='%234B5663' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; width: auto; font-weight: 600; }
select.input.sm { height: 34px; font-size: 13px; border-radius: 8px; padding: 0 28px 0 10px; }
.label { font-size: 13px; font-weight: 600; color: var(--fg); display: block; margin-bottom: 8px; }
.hint { font-size: 13px; color: var(--fg-3); line-height: 1.45; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.chip { height: 34px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--border); background: #fff; color: #2B3640; font-weight: 500; font-size: 13.5px; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.chip.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-dark); font-weight: 600; }
.chip.on.red { border-color: var(--red); background: var(--red-bg); color: var(--red); }
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--chip); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.pill.red { background: var(--red-bg); color: var(--red); }
.pill.amber { background: var(--amber-bg); color: var(--amber-fg); }
.pill.green { background: var(--green-bg); color: var(--green-fg); }
.pill.purple { background: var(--purple-bg); color: var(--purple); }
.pill.xs { padding: 2px 8px; font-size: 11.5px; vertical-align: middle; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--fg-3); flex: none; }
.dot.red { background: var(--red); } .dot.amber { background: var(--amber); } .dot.green { background: var(--green); } .dot.lg { width: 10px; height: 10px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-dark); font-weight: 700; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.avatar.amber { background: var(--amber-avatar); color: var(--amber-fg); }
.avatar.grey { background: var(--chip); color: var(--fg-2); }
.avatar.red { background: var(--red-bg); color: var(--red); }
.avatar.sm { width: 30px; height: 30px; font-size: 12px; } .avatar.xs { width: 24px; height: 24px; font-size: 10.5px; border: 2px solid #fff; } .avatar.lg { width: 56px; height: 56px; font-size: 20px; }
.muted { color: var(--fg-3); font-size: 13px; }
.small { font-size: 12.5px; color: var(--fg-3); }
.strong { font-weight: 600; }
.num { font-variant-numeric: tabular-nums; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.grow { flex: 1 1 200px; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- cards ---------- */
.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); }
.card.red { border-color: var(--red-border); } .card.amber { border-color: var(--amber-border); }
.card-head { padding: 16px 20px; border-bottom: 1px solid var(--border-soft); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.card-body { padding: 16px 20px; }
.card-row { display: flex; align-items: center; gap: 14px; padding: 14px 20px; border-bottom: 1px solid var(--border-soft); flex-wrap: wrap; }
.card-row:last-child { border-bottom: 0; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.tile { text-decoration: none; color: inherit; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.tile:hover { border-color: #CBD3DA; color: inherit; }
.tile .t { font-size: 13px; font-weight: 600; color: var(--fg-2); }
.tile .n { font-size: 36px; font-weight: 700; letter-spacing: -1px; line-height: 1; }
.tile .l { font-size: 13.5px; color: var(--accent); font-weight: 600; }
.tile.red { border-color: var(--red-border); } .tile.red .t, .tile.red .n, .tile.red .l { color: var(--red); }
.tile.amber { border-color: var(--amber-border); } .tile.amber .t, .tile.amber .n, .tile.amber .l { color: var(--amber-fg); }
.notice { border-radius: var(--radius); padding: 16px 22px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 14.5px; line-height: 1.5; }
.notice.amber { background: var(--amber-bg); border: 1px solid var(--amber-border); color: #5C4A12; }
.notice.green { background: var(--green-bg); border: 1px solid var(--green-border); color: var(--green-fg); }
.notice.red { background: var(--red-bg); border: 1px solid var(--red-border); color: var(--red-dark); }
.notice.grey { background: var(--surface); border: 1px solid var(--border); color: var(--fg-2); }
.empty { padding: 36px 20px; text-align: center; color: var(--fg-3); font-size: 14px; }
.loading { padding: 28px 20px; color: var(--fg-3); font-size: 14px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spin { display: inline-block; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid #D5DCE3; border-top-color: var(--accent); animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation-duration: 2s; } }
.skel { display: inline-block; height: 14px; border-radius: 6px; background: linear-gradient(90deg, #EEF1F4, #F6F8FA, #EEF1F4); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { from { background-position: 200% 0 } to { background-position: -200% 0 } }
@media (prefers-reduced-motion: reduce) { .skel { animation: none; } }

table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; color: var(--fg-3); font-size: 12.5px; font-weight: 600; padding: 12px 16px; border-bottom: 1px solid var(--border-soft); white-space: nowrap; }
.tbl td { padding: 14px 16px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl th:first-child, .tbl td:first-child { padding-left: 20px; } .tbl th:last-child, .tbl td:last-child { padding-right: 20px; text-align: right; }
.tbl-wrap { overflow-x: auto; }
.tbl .person { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.tbl .person:hover .nm { color: var(--accent); }
.tbl .nm { font-weight: 600; display: block; } .tbl .em { font-size: 12.5px; color: var(--fg-3); display: block; }

/* ---------- auth ---------- */
.auth { min-height: 100vh; display: flex; flex-wrap: wrap; align-items: stretch; }
.auth-side { flex: 1 1 420px; min-width: 0; background: var(--navy); color: #E8F1F5; padding: 56px 64px; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; }
.auth-side .brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; font-weight: 700; font-size: 18px; }
.auth-side .brand-mark { width: 36px; height: 36px; }
.auth-side h1 { font-size: 40px; line-height: 1.1; font-weight: 700; letter-spacing: -0.5px; max-width: 460px; }
.auth-side .points { display: flex; flex-direction: column; gap: 18px; font-size: 16px; line-height: 1.5; color: #C9D8E0; max-width: 460px; }
.auth-side .points > div { display: flex; gap: 14px; align-items: flex-start; }
.auth-side .points b { color: #fff; font-weight: 600; }
.auth-side .foot { font-size: 13px; color: #8FAAB8; }
.auth-main { flex: 999 1 560px; min-width: 0; display: flex; align-items: center; justify-content: center; padding: 48px 24px; }
.auth-card { width: 100%; max-width: 440px; background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 36px 36px 28px; display: flex; flex-direction: column; gap: 22px; }
.auth-card.wide { max-width: 640px; }
.auth-card h2 { font-size: 24px; font-weight: 700; }
.auth-card .lead { font-size: 15px; line-height: 1.5; color: var(--fg-2); }
.auth-card .foot { border-top: 1px solid var(--border-soft); padding-top: 14px; font-size: 13px; color: var(--fg-3); line-height: 1.5; }
.auth-card .err { color: var(--red); font-size: 13.5px; }
.code-input { height: 60px; border-radius: 12px; font-size: 30px; letter-spacing: 12px; text-align: center; padding: 0 16px; }
.steps { display: flex; align-items: center; gap: 14px; font-size: 13px; color: var(--fg-3); flex-wrap: wrap; }
.steps .st { display: inline-flex; align-items: center; gap: 6px; } .steps .st.on { color: var(--fg); font-weight: 600; }
.steps .n { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid #CBD3DA; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; }
.steps .st.done .n { background: var(--teal); color: var(--navy); border-color: var(--teal); font-weight: 700; } .steps .st.on .n { background: var(--accent); color: #fff; border-color: var(--accent); }
.steps .ln { width: 28px; height: 1px; background: #CBD3DA; }
.dos { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.dos > div { border: 1px solid var(--border); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.dos .h { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.dos ul { padding-left: 18px; list-style: disc; font-size: 14px; line-height: 1.6; color: var(--fg-2); }
.gbtn { display: flex; align-items: center; justify-content: center; gap: 10px; height: 50px; border-radius: var(--radius-sm); background: var(--fg); color: #fff; border: 0; font-weight: 600; font-size: 16px; width: 100%; }
.gbtn:hover { background: #000; }

/* ---------- app shell ---------- */
.viewas-bar { background: var(--purple-dark); color: #F3E8FF; padding: 0 24px; min-height: 40px; display: flex; align-items: center; gap: 12px; font-size: 13.5px; flex-wrap: wrap; }
.viewas-bar b { font-weight: 700; } .viewas-bar .linkish { color: #fff; margin-left: auto; }
.app { min-height: 100vh; display: flex; flex-direction: column; }
.topbar { background: #fff; border-bottom: 1px solid var(--border); padding: 0 24px; min-height: 60px; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; position: sticky; top: 0; z-index: 20; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); }
.brand-mark { width: 28px; height: 28px; border-radius: 8px; background: var(--teal); display: inline-flex; align-items: center; justify-content: center; }
.brand-name { font-weight: 700; font-size: 16px; }
.tenant-chip { display: flex; align-items: center; gap: 8px; padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px; font-size: 13px; color: var(--fg-2); max-width: 100%; }
.tenant-chip b { color: var(--fg); font-weight: 600; }
.tenant-chip:has(.switcher) { padding: 0; border: 0; }
.switcher { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 8px 0 12px; border: 1.5px solid #D8B4FE; border-radius: 999px; background: #FAF5FF; max-width: 100%; }
.switcher select { border: 0; background: transparent; height: 34px; max-width: 320px; font-size: 13.5px; font-weight: 600; color: #4C1D95; cursor: pointer; }
.switcher select:focus { outline: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.topbar-spacer { flex: 1 1 100px; min-width: 0; }
.topbar-search input { height: 36px; width: 280px; max-width: 100%; border: 1.5px solid var(--border); border-radius: var(--radius-sm); padding: 0 12px; background: #F8FAFB; }
.account { position: relative; }
.account-btn { height: 36px; display: flex; align-items: center; gap: 8px; border: 0; background: none; color: var(--fg); padding: 0 4px; }
.account-btn .avatar { background: var(--accent); color: #fff; }
.menu { position: absolute; right: 0; top: 44px; background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 12px 32px rgba(20,40,60,.14); padding: 6px; min-width: 240px; z-index: 30; }
.menu .mi { display: block; width: 100%; text-align: left; padding: 10px 12px; border-radius: 8px; border: 0; background: none; font-size: 14px; color: var(--fg); text-decoration: none; }
.menu .mi:hover { background: var(--surface); }
.menu .mh { padding: 8px 12px 6px; font-size: 12.5px; color: var(--fg-3); }
.pp { position: fixed; z-index: 60; background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 12px 32px rgba(20,40,60,.14); padding: 6px; max-height: 340px; overflow: auto; }
.pp-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.pp-item:hover, .pp-item.on { background: var(--accent-soft); }
.pp-item .avatar.sm { width: 30px; height: 30px; font-size: 12px; }
.pp-txt { min-width: 0; } .pp-n { font-size: 14px; font-weight: 600; color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pp-e { font-size: 12.5px; color: var(--fg-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pp-foot { padding: 8px 10px 4px; font-size: 12px; color: var(--fg-3); border-top: 1px solid var(--border); margin-top: 4px; }
.shell { display: flex; flex: 1; }
.sidenav { flex: 0 0 220px; padding: 20px 14px; display: flex; flex-direction: column; gap: 4px; border-right: 1px solid var(--border); background: var(--surface); }
.sidenav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius-sm); color: #2B3640; text-decoration: none; font-weight: 500; font-size: 14.5px; }
.sidenav a:hover { background: #F0F3F6; color: #15202B; }
.sidenav a.active { background: var(--accent-soft); color: var(--accent-dark); font-weight: 600; }
.sidenav .sp { flex: 1 1 24px; }
.main { flex: 999 1 560px; min-width: 0; padding: 28px 32px 48px; display: flex; flex-direction: column; gap: 22px; max-width: 1180px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head .sub { font-size: 14px; color: var(--fg-2); margin-top: 4px; }
.tabbar { display: none; }
.busy { position: fixed; inset: 0; background: rgba(21, 32, 43, .38); z-index: 80; display: flex; align-items: center; justify-content: center; padding: 16px; }
.busy-box { background: #fff; border-radius: 14px; padding: 18px 22px; display: flex; gap: 14px; align-items: center; box-shadow: 0 16px 48px rgba(20, 40, 60, .25); max-width: 440px; width: 100%; }
.spin.lg { width: 26px; height: 26px; border-width: 3px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); background: var(--fg); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 50; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: var(--red); }

/* ---------- home ---------- */
.decision { gap: 14px; }
.decision .txt { flex: 1 1 320px; min-width: 0; font-size: 14.5px; line-height: 1.45; }
.decision .acts { display: flex; gap: 8px; flex-wrap: wrap; }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 16px; }
.feed li { display: flex; gap: 12px; padding: 10px 20px; font-size: 14px; line-height: 1.45; }
.feed li .when { font-size: 12.5px; color: var(--fg-3); }

/* ---------- files ---------- */
.files-layout { display: flex; gap: 18px; flex-wrap: wrap; align-items: flex-start; }
.files-list { flex: 999 1 480px; min-width: 0; container-type: inline-size; }
.crumbs { padding: 12px 18px; border-bottom: 1px solid var(--border-soft); display: flex; align-items: center; gap: 8px; font-size: 13.5px; flex-wrap: wrap; }
.crumbs a { text-decoration: none; font-weight: 600; } .crumbs .sep { color: var(--fg-5); } .crumbs .cur { font-weight: 600; }
.frow { width: 100%; text-align: left; display: grid; grid-template-columns: minmax(0, 1fr) 150px 84px 130px 180px; column-gap: 10px; align-items: center; padding: 9px 18px; border: 0; border-bottom: 1px solid var(--border-soft); background: #fff; color: var(--fg); cursor: pointer; user-select: none; }
.frow:focus-visible { outline-offset: -2px; }
.frow .nm .fname { color: inherit; text-decoration: none; } .frow .nm .fname:hover { color: var(--accent); text-decoration: underline; }
.frow .act { display: flex; justify-content: flex-end; gap: 6px; min-height: 30px; }
.rbtn { height: 30px; padding: 0 10px; border-radius: 8px; border: 1.5px solid var(--border); background: #fff; color: var(--fg-2); font: inherit; font-size: 12.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 5px; text-decoration: none; white-space: nowrap; cursor: pointer; }
.rbtn:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-dark); }
.rbtn.share { color: var(--accent-dark); border-color: #BFD6E2; background: #F4F9FB; }
.frow.sel .rbtn.share { background: var(--accent); border-color: var(--accent); color: #fff; }
.pill.lk { display: inline-flex; align-items: center; gap: 4px; }
.frow.head { font-size: 12.5px; color: var(--fg-3); font-weight: 600; padding: 8px 18px; cursor: default; }
.frow:not(.head):hover { background: var(--surface); } .frow.sel { background: #F0F6F9; }
.frow .nm { display: flex; align-items: center; gap: 10px; min-width: 0; font-weight: 500; }
.frow .nm .txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.frow .who { display: flex; align-items: center; gap: 0; min-width: 0; overflow: hidden; }
.frow .who .pill { max-width: 100%; overflow: hidden; text-overflow: ellipsis; } .frow .who .avatar { margin-left: -6px; } .frow .who .avatar:first-child { margin-left: 0; }
.frow .who .cnt { font-size: 12.5px; color: var(--fg-3); margin-left: 8px; }
.frow .chg { font-size: 12.5px; color: var(--fg-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.frow .sz { font-size: 12.5px; color: var(--fg-2); text-align: right; white-space: nowrap; }
.frow.head .sz { color: inherit; }
.frow .nm .sub { display: block; font-size: 12px; font-weight: 400; color: var(--fg-3); line-height: 1.3; overflow: hidden; text-overflow: ellipsis; }
.frow .nm .szi { display: none; }
.share-panel { flex: 1 1 340px; max-width: 440px; min-width: 0; display: flex; flex-direction: column; }
.share-panel[hidden] { display: none; }
.share-panel .ph { padding: 16px 44px 16px 20px; border-bottom: 1px solid var(--border-soft); position: relative; }
.share-panel .pclose { position: absolute; top: 12px; right: 12px; height: 30px; }
.share-panel .ph .k { font-size: 12.5px; color: var(--fg-3); font-weight: 600; }
.share-panel .ph h2 { font-size: 17px; overflow-wrap: anywhere; margin-top: 2px; }
.perm { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid #F3F5F7; }
.perm:last-child { border-bottom: 0; }
.perm .who { flex: 1 1 120px; min-width: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .perm .who .nm { display: block; font-size: 14px; font-weight: 600; } .perm .who .em { display: block; font-size: 12px; color: var(--fg-3); }

/* ---------- activity ---------- */
.day { padding: 10px 20px; background: var(--surface); border-bottom: 1px solid var(--border-soft); font-size: 12.5px; font-weight: 600; color: var(--fg-3); }
.ev { display: flex; gap: 14px; padding: 14px 20px; border-bottom: 1px solid var(--border-soft); align-items: flex-start; }
.ev:last-child { border-bottom: 0; }
.ev .txt { flex: 1 1 320px; min-width: 0; font-size: 14.5px; line-height: 1.5; }
.ev .txt b { font-weight: 600; } .ev .txt a { font-weight: 600; text-decoration: none; }
.ev .meta { font-size: 12.5px; color: var(--fg-3); margin-top: 2px; }

/* ---------- settings / misc ---------- */
.switch { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; cursor: pointer; }
.switch input { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; }
.progress { height: 12px; background: #E9EDF2; border-radius: 6px; overflow: hidden; }
.progress > div { height: 100%; background: var(--accent); border-radius: 6px; transition: width .4s; }
.progress.indeterminate > div { width: 30%; animation: slide 1.6s linear infinite; }
@keyframes slide { from { margin-left: -30% } to { margin-left: 100% } }
.stats4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; font-size: 13px; color: var(--fg-2); }
.stats4 b { display: block; font-size: 16px; color: var(--fg); font-weight: 700; }
.options { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.opt { text-align: left; border: 1.5px solid var(--border); background: #fff; border-radius: 12px; padding: 14px 16px; color: var(--fg); }
.opt.on { border-color: var(--accent); background: var(--accent-soft); }
.opt .t { font-weight: 700; font-size: 14.5px; } .opt .d { font-size: 12.5px; color: var(--fg-2); margin-top: 2px; }

/* ---------- phone ---------- */
@media (max-width: 760px) {
  body { font-size: 14px; }
  .auth-side { padding: 40px 24px; } .auth-side h1 { font-size: 30px; } .auth-main { padding: 28px 16px; } .auth-card { padding: 28px 22px; }
  .topbar { padding: 10px 16px; gap: 10px; }
  .topbar-search { order: 10; flex-basis: 100%; } .topbar-search input { width: 100%; }
  .tenant-chip { display: none; }
  .sidenav { display: none; }
  .main { padding: 16px 16px 92px; gap: 14px; }
  h1 { font-size: 22px; }
  .tabbar { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; position: fixed; left: 0; right: 0; bottom: 0; background: #fff; border-top: 1px solid var(--border); padding: 8px 8px calc(10px + env(safe-area-inset-bottom, 0px)); z-index: 20; }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 4px; text-decoration: none; color: var(--fg-3); font-size: 11px; font-weight: 500; padding: 4px 0; }
  .tabbar a.active { color: var(--accent-dark); font-weight: 600; }
  .card-head, .card-row, .card-body { padding-left: 14px; padding-right: 14px; }
  .tbl th:first-child, .tbl td:first-child { padding-left: 14px; } .tbl th:last-child, .tbl td:last-child { padding-right: 14px; }
  .share-panel { max-width: none; flex-basis: 100%; }
  .tile .n { font-size: 28px; }
  .decision .acts { width: 100%; } .decision .acts .btn { flex: 1; }
  .ev { padding: 12px 14px; } .day { padding: 8px 14px; }
}
