:root {
  --ink: #18181b;
  --ink-secondary: #3f3f46;
  --ink-muted: #71717a;
  --line: #e4e4e7;
  --line-soft: #f0f0f2;
  --line-dark: #d4d4d8;
  --surface: #ffffff;
  --surface-tint: #fafafa;
  --surface-head: #f4f4f5;
  --shell-bg: #f3f4f6;
  --accent: #18181b;
  --font-main: "Noto Sans Thai", "Sarabun", "IBM Plex Sans Thai", "Leelawadee UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: var(--font-main);
  font-size: 13px;
  line-height: 1.48;
  color: var(--ink);
  background: var(--shell-bg);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Shared Buttons & Controls */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 6px 12px;
  background: #ffffff;
  color: var(--ink);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease, transform 0.12s ease;
}

.btn:hover {
  background: var(--surface-head);
  border-color: var(--line-dark);
}

.btn-primary {
  background: #18181b;
  border-color: #18181b;
  color: #ffffff;
  box-shadow: 0 1px 2px rgba(24, 24, 27, 0.14);
}

.btn-primary:hover {
  background: #27272a;
  border-color: #27272a;
}

.btn-secondary {
  background: #ffffff;
  border-color: var(--line);
  color: var(--ink);
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--ink-muted);
}

.btn-ghost:hover {
  background: var(--surface-head);
  color: var(--ink);
}

.btn-icon {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 9px;
  font-size: 14px;
}

.btn-sm {
  padding: 4px 9px;
  font-size: 11.5px;
  border-radius: 7px;
}

/* App Shell: Sidebar + Floating Main White Canvas */
.app-shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  gap: 12px;
  min-height: 100vh;
  padding: 12px;
  max-width: 1680px;
  margin: 0 auto;
  align-items: start;
}

/* ==========================================================================
   Left Sidebar (Inspired by Tasklify / Linear)
   ========================================================================== */
.home-sidebar {
  position: sticky;
  top: 12px;
  height: calc(100vh - 24px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 6px 6px;
}

.sb-top {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sb-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 4px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid transparent;
}

.sb-brand-mark {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: #18181b;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sb-brand-text {
  flex: 1;
  min-width: 0;
}

.sb-brand-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.sb-brand-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.sb-pro-pill {
  padding: 1px 6px;
  border-radius: 999px;
  background: #18181b;
  color: #ffffff;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.sb-brand-sub {
  display: block;
  font-size: 11px;
  color: var(--ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sb-icon-btn {
  width: 26px;
  height: 26px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--ink-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sb-icon-btn:hover {
  background: #ffffff;
  border-color: var(--line);
  color: var(--ink);
}

.sb-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 10px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid var(--line);
  cursor: text;
  transition: border-color 0.14s ease, box-shadow 0.14s ease;
}

.sb-search-box:focus-within {
  border-color: #18181b;
  box-shadow: 0 0 0 3px rgba(24, 24, 27, 0.06);
}

.sb-search-ico {
  color: var(--ink-muted);
  flex-shrink: 0;
}

.sb-search-input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  outline: none;
  font-family: inherit;
  font-size: 12px;
  color: var(--ink);
}

.sb-kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 5px;
  background: var(--surface-head);
  border: 1px solid var(--line);
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--ink-muted);
}

.sb-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-right: 2px;
}

.sb-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sb-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
}

.sb-group-lbl {
  padding: 0 8px;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sb-group-head .sb-group-lbl {
  padding: 0;
}

.sb-mini-action {
  border: none;
  background: transparent;
  color: var(--ink-muted);
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  padding: 2px 5px;
  border-radius: 5px;
}

.sb-mini-action:hover {
  background: rgba(255, 255, 255, 0.8);
  color: var(--ink);
}

.sb-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sb-nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5.5px 8px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 500;
  color: #52525b;
  border: none;
  transition: background-color 0.12s ease, color 0.12s ease;
}

.sb-nav-item:hover {
  background: #ececef;
  color: #18181b;
}

.sb-nav-item.is-active {
  background: #e9e9ec;
  color: #18181b;
  font-weight: 600;
}

.sb-nav-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.sb-nav-item svg {
  color: #71717a;
  flex-shrink: 0;
}

.sb-nav-item.is-active svg {
  color: #18181b;
}

.sb-count {
  min-width: 14px;
  padding: 0 2px;
  background: transparent;
  color: #a1a1aa;
  font-size: 10.5px;
  font-weight: 500;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.sb-nav-item.is-active .sb-count {
  background: transparent;
  color: #18181b;
  font-weight: 600;
}

.sb-badge-a3 {
  padding: 0 5px;
  border-radius: 4px;
  background: #f4f4f5;
  border: 1px solid #e4e4e7;
  color: #71717a;
  font-size: 9px;
  font-weight: 600;
}

.sb-nav-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sb-nav-parent {
  width: 100%;
  background: transparent;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

.sb-nav-right {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.sb-nav-chev {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #a1a1aa;
  transition: transform 0.14s ease, color 0.14s ease;
}

.sb-nav-group.is-expanded .sb-nav-chev {
  transform: rotate(90deg);
  color: #18181b;
}

.sb-nav-sub {
  margin-left: 12px;
  padding: 2px 0 3px 9px;
  border-left: 1px solid #d4d4d8;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.sb-nav-sub[hidden] {
  display: none;
}

.sb-nav-sub-lbl {
  padding: 4px 8px 1px;
  font-size: 9.5px;
  font-weight: 700;
  color: #a1a1aa;
  letter-spacing: 0.02em;
}

.sb-nav-sub-item {
  display: flex;
  align-items: center;
  padding: 4.5px 8px;
  border-radius: 6px;
  font-size: 11.2px;
  font-weight: 500;
  color: #52525b;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background-color 0.12s ease, color 0.12s ease;
}

.sb-nav-sub-item:hover {
  background: #ececef;
  color: #18181b;
}

.sb-nav-sub-item.is-active {
  background: #e9e9ec;
  color: #18181b;
  font-weight: 600;
}

.sb-divider {
  height: 1px;
  background: #e4e4e7;
  margin: 2px 6px;
}

/* Sidebar Projects List */
.sb-project-select-wrap {
  padding: 2px 6px 4px;
}

.sb-project-select {
  width: 100%;
  height: 30px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  outline: none;
}

.sb-proj-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sb-proj-wrap {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.sb-proj-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  border-radius: 7px;
  padding-right: 4px;
  transition: background-color 0.12s ease;
}

.sb-proj-row:hover {
  background: #ececef;
}

.sb-proj-row.is-active {
  background: #e9e9ec;
}

.sb-proj-row .sb-proj-item {
  flex: 1 1 auto;
  min-width: 0;
  padding: 5.5px 4px 5.5px 8px;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.sb-proj-row.is-active .sb-proj-item {
  color: #18181b;
  font-weight: 600;
}

.sb-proj-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 5.5px 8px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: #52525b;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.12s ease, color 0.12s ease;
}

.sb-proj-item:hover {
  background: #ececef;
  color: var(--ink);
}

.sb-proj-item.is-active {
  background: #e9e9ec;
  color: var(--ink);
  font-weight: 600;
}

.sb-proj-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.sb-proj-ico {
  width: 14px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #71717a;
  flex-shrink: 0;
}

.sb-proj-dot {
  width: 7px;
  height: 7px;
  margin: 0 3.5px;
  border-radius: 999px;
  display: inline-block;
  flex-shrink: 0;
}

.sb-proj-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sb-proj-right {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
}

.sb-proj-num {
  font-size: 10.5px;
  font-weight: 500;
  color: #a1a1aa;
  font-variant-numeric: tabular-nums;
  padding-right: 2px;
}

.sb-proj-row.is-active .sb-proj-num,
.sb-proj-item.is-active .sb-proj-num {
  color: #18181b;
  font-weight: 600;
}

.sb-proj-chev {
  width: 18px;
  height: 18px;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: #a1a1aa;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  transition: transform 0.14s ease, color 0.12s ease, background-color 0.12s ease;
}

.sb-proj-chev:hover {
  background: rgba(24, 24, 27, 0.06);
  color: #18181b;
}

.sb-proj-wrap.is-expanded .sb-proj-chev svg {
  transform: rotate(90deg);
}

.sb-proj-sub {
  margin-left: 11px;
  padding: 1px 0 2px 9px;
  border-left: 1px solid #d4d4d8;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.sb-proj-sub-archive {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  width: 100%;
  padding: 4px 8px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #71717a;
  font-family: inherit;
  font-size: 11px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.12s ease, color 0.12s ease;
}

.sb-proj-sub-archive:hover {
  background: #ececef;
  color: var(--ink);
}

.sb-proj-sub-archive.is-active {
  background: #e9e9ec;
  color: #18181b;
  font-weight: 600;
}

.sb-proj-sub-left {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sb-proj-sub-left svg {
  color: #a1a1aa;
  flex-shrink: 0;
}

.sb-proj-sub-archive:hover .sb-proj-sub-left svg,
.sb-proj-sub-archive.is-active .sb-proj-sub-left svg {
  color: #18181b;
}

.sb-proj-sub-num {
  font-size: 10.5px;
  font-weight: 500;
  color: #a1a1aa;
  font-variant-numeric: tabular-nums;
}

.sb-proj-sub-num.has-items {
  color: #18181b;
  font-weight: 600;
}

/* Sidebar Footer Storage */
.sb-footer {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid #e4e4e7;
}

.storage-card {
  padding: 4px 6px;
  border: none;
  background: transparent;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.storage-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 10px;
}

.storage-title {
  font-weight: 600;
  color: var(--ink-muted);
}

.storage-text {
  color: var(--ink-muted);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.storage-track {
  width: 100%;
  height: 3px;
  border-radius: 999px;
  background: #e4e4e7;
  overflow: hidden;
}

.storage-fill {
  height: 100%;
  border-radius: 999px;
  background: #71717a;
  transition: width 0.25s ease;
}

.storage-compact-btn {
  width: auto;
  height: auto;
  margin-top: 0;
  padding: 1px 5px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #ffffff;
  color: var(--ink-secondary);
  font-family: inherit;
  font-size: 9.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.storage-compact-btn:hover {
  background: #f4f4f5;
  border-color: var(--line-dark, #d4d4d8);
  color: #18181b;
}

.storage-compact-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.storage-fill.is-warn {
  background: #d97706;
}

.storage-fill.is-danger {
  background: #dc2626;
}

.sb-footer-links {
  display: flex;
}

.sb-footer-btn {
  width: 100%;
  text-align: center;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.8);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-secondary);
}

.sb-footer-btn:hover {
  background: #ffffff;
  color: var(--ink);
}

/* ==========================================================================
   Right Floating White Workspace Canvas
   ========================================================================== */
.home-canvas {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(24, 24, 27, 0.03);
  padding: 16px 24px 36px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

/* Top Bar */
.canvas-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-soft);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
}

.bc-root {
  color: var(--ink-muted);
  font-weight: 500;
}

.bc-sep {
  color: #cbd5e1;
}

.bc-curr {
  color: var(--ink);
  font-weight: 700;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--surface-head);
  border: 1px solid var(--line);
  color: var(--ink);
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.hero-badge:hover {
  background: #e4e4e7;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Typography & Theme Pill */
.font-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-tint);
  font-size: 11.5px;
}

.font-pill-lbl {
  color: var(--ink-muted);
  font-weight: 600;
}

.font-pill select {
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  outline: none;
  cursor: pointer;
}

.color-picker-input {
  width: 20px;
  height: 20px;
  padding: 1px;
  border: 1px solid var(--line-dark);
  border-radius: 5px;
  background: #ffffff;
  cursor: pointer;
}

.btn-icon-reset {
  width: 22px;
  height: 22px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.btn-icon-reset:hover {
  color: var(--ink);
  background: var(--surface-head);
}

.theme-dot-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 4px;
  padding-left: 6px;
  border-left: 1px solid var(--line);
}

.theme-dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 1.5px solid rgba(24, 24, 27, 0.25);
  padding: 0;
  cursor: pointer;
}

.theme-dot.is-active {
  outline: 2px solid #18181b;
  outline-offset: 1px;
}

.save-status-pill {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-muted);
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--surface-tint);
  border: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}

.quick-new-wrap {
  position: relative;
}

.quick-new-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: 250px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(24, 24, 27, 0.14);
  padding: 6px;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.quick-new-menu[hidden] {
  display: none;
}

.quick-new-head {
  padding: 5px 8px;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--ink-muted);
  text-transform: uppercase;
}

.quick-new-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}

.quick-new-item:hover {
  background: var(--surface-head);
}

.qn-tag {
  min-width: 34px;
  text-align: center;
  padding: 1px 5px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 700;
}

.tag-a4 { background: #ede9fe; color: #5b21b6; }
.tag-sr { background: #d1fae5; color: #065f46; }
.tag-sd { background: #e0e7ff; color: #3730a3; }
.tag-pc { background: #fef3c7; color: #92400e; }

/* Greeting Row */
.canvas-greeting {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.greeting-main {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.hero-logo-box {
  width: 54px;
  height: 54px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: var(--surface-tint);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.hero-logo-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}

.hero-logo-ph {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
}

.hero-title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.25;
}

.hero-desc {
  margin: 3px 0 0;
  font-size: 12.5px;
  color: var(--ink-muted);
}

.greeting-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Announcement Pill Bar (Tasklify style) */
.announce-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 14px;
  border-radius: 12px;
  border: 1px solid #e4e4e7;
  background: linear-gradient(90deg, #faf5ff 0%, #f5f7ff 45%, #fff7ed 100%);
}

.announce-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.announce-pill {
  padding: 3px 8px;
  border-radius: 7px;
  background: linear-gradient(135deg, #6366f1 0%, #ec4899 100%);
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.announce-text {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-secondary);
}

.announce-btn {
  padding: 4px 10px;
  border-radius: 7px;
  border: 1px solid var(--line-dark);
  background: #ffffff;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink);
}

.announce-btn:hover {
  background: var(--surface-head);
}

/* 4 KPI Cards (Image 1 + Image 3 hybrid) */
.kpi-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.stat-card {
  padding: 14px 16px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.14s ease, box-shadow 0.14s ease, transform 0.14s ease;
}

.stat-card:hover {
  border-color: var(--line-dark);
  box-shadow: 0 6px 18px rgba(24, 24, 27, 0.05);
  transform: translateY(-1px);
}

.stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stat-ico {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ico-dark { background: #18181b; color: #ffffff; }
.ico-amber { background: #fef3c7; color: #b45309; }
.ico-emerald { background: #d1fae5; color: #047857; }
.ico-indigo { background: #e0e7ff; color: #4338ca; }

.stat-link {
  border: none;
  background: transparent;
  padding: 2px 4px;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-muted);
  cursor: pointer;
}

.stat-link:hover {
  color: var(--ink);
}

.stat-val-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.kpi-val {
  font-size: 24px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.stat-sub-pct {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}

.stat-lbl {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-muted);
}

.stat-bar-track {
  width: 100%;
  height: 5px;
  border-radius: 999px;
  background: var(--surface-head);
  overflow: hidden;
  margin-top: 2px;
}

.stat-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.3s ease;
}

.fill-slate { background: #18181b; }
.fill-amber { background: #f59e0b; }
.fill-emerald { background: #10b981; }
.fill-indigo { background: #6366f1; }

/* Section Shared */
.home-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.home-section[hidden] {
  display: none;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.section-title {
  margin: 0;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink);
}

.section-note {
  font-size: 11.5px;
  color: var(--ink-muted);
}

/* Compact Minimal Quick Create Tab Strip */
.quick-pill-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.qp-card {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 5px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #ffffff;
  transition: background-color 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}

.qp-card:hover {
  background: var(--surface-head);
  box-shadow: 0 2px 6px rgba(24, 24, 27, 0.05);
  border-color: var(--line-dark);
}

.qp-violet,
.qp-sky,
.qp-amber,
.qp-emerald,
.qp-teal,
.qp-indigo,
.qp-rose,
.qp-slate {
  background: #fafafa;
}

.qp-ico {
  min-width: 24px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9.5px;
  font-weight: 800;
  color: var(--ink-secondary);
}

.qp-body {
  display: inline-flex;
  align-items: center;
}

.qp-title {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}

.qp-sub,
.qp-arrow {
  display: none;
}

/* Workspace View Bar */
.workspace-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0 4px;
  border-top: 1px solid var(--line-soft);
}

.view-tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border-radius: 10px;
  background: var(--surface-head);
  border: 1px solid var(--line);
}

.view-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--ink-muted);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.view-tab:hover {
  color: var(--ink);
}

.view-tab.is-active {
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(24, 24, 27, 0.08);
}

.home-proj-tabs-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-top: -6px;
}

.home-proj-tabs {
  flex-wrap: wrap;
}

.home-proj-tab {
  white-space: nowrap;
}

.proj-tab-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  display: inline-block;
  flex-shrink: 0;
}

.finder-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.chip-group {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
}

.filter-chip {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink-muted);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}

.filter-chip:hover {
  background: var(--surface-head);
  color: var(--ink);
}

.filter-chip.is-active {
  background: #18181b;
  border-color: #18181b;
  color: #ffffff;
}

.home-status-select {
  height: 29px;
  padding: 3px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  outline: none;
}

.finder-count {
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--surface-head);
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-secondary);
}

/* ==========================================================================
   Kanban View (Image 1 Style)
   ========================================================================== */
.kanban-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.kb-col {
  background: #f8f9fa;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.kb-col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 2px 4px;
}

.kb-col-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
}

.kb-pill-pending { background: #fef3c7; color: #92400e; }
.kb-pill-done { background: #dcfce7; color: #166534; }
.kb-pill-obsolete { background: #f4f4f5; color: #52525b; }

.kb-col-cnt {
  padding: 1px 7px;
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink-secondary);
  font-size: 10.5px;
  font-weight: 700;
  border: 1px solid rgba(24, 24, 27, 0.08);
}

.kb-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.kb-card {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 11px 12px;
  border-radius: 11px;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(24, 24, 27, 0.03);
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}

.kb-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-dark);
  box-shadow: 0 8px 20px rgba(24, 24, 27, 0.07);
}

.kb-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.kb-code-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.kb-docno {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-muted);
}

.kb-mod-tag {
  padding: 1px 7px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
}

.kb-top-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.kb-del-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #a1a1aa;
  cursor: pointer;
  transition: background-color 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}

.kb-del-btn:hover {
  background: #fef2f2;
  border-color: #fecaca;
  color: #dc2626;
}

.btn-danger-ghost {
  color: #a1a1aa;
}

.btn-danger-ghost:hover {
  background: #fef2f2;
  border-color: #fecaca;
  color: #dc2626;
}

.kb-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.38;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.kb-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 6px;
  border-top: 1px dashed var(--line);
  font-size: 11px;
  color: var(--ink-muted);
}

.kb-proj-chip {
  padding: 1px 7px;
  border-radius: 5px;
  background: var(--surface-head);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--ink-secondary);
}

.kb-empty {
  padding: 18px 10px;
  text-align: center;
  font-size: 11.5px;
  color: var(--ink-muted);
  border: 1px dashed var(--line-dark);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.5);
}

.kb-add-btn {
  width: 100%;
  padding: 7px 10px;
  border-radius: 9px;
  border: 1px dashed var(--line-dark);
  background: #ffffff;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-secondary);
  text-align: center;
}

.kb-add-btn:hover {
  background: var(--surface-head);
  color: var(--ink);
}

/* ==========================================================================
   Grouped Lists View (Image 2 Linear Style)
   ========================================================================== */
.grouped-lists-wrap {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.list-group-box {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
}

.list-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 14px;
  background: #fafafa;
  border-bottom: 1px solid var(--line);
}

.list-group-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
}

.list-group-rows {
  display: flex;
  flex-direction: column;
}

.list-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 90px 100px 125px 74px;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--line-soft);
  transition: background-color 0.12s ease;
}

.list-row:last-child {
  border-bottom: none;
}

.list-row:hover {
  background: #fafafa;
}

.list-row-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.list-row-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-row-sub {
  font-size: 11px;
  color: var(--ink-muted);
}

/* Module Cards Grid */
.module-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.module-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  transition: border-color 0.14s ease, box-shadow 0.14s ease;
}

.module-card:hover {
  border-color: var(--line-dark);
  box-shadow: 0 6px 18px rgba(24, 24, 27, 0.05);
}

.module-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.module-code {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--surface-head);
  font-size: 10px;
  font-weight: 700;
  color: var(--ink-secondary);
}

.module-count-pill {
  padding: 2px 8px;
  border-radius: 999px;
  background: #18181b;
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 700;
}

.module-name {
  margin: 6px 0 3px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}

.module-desc {
  margin: 0;
  font-size: 11.5px;
  color: var(--ink-muted);
  line-height: 1.4;
}

.module-recent {
  border-top: 1px dashed var(--line);
  padding-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.module-recent-lbl {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--ink-muted);
}

.module-recent-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 7px;
  border-radius: 7px;
  background: var(--surface-tint);
  font-size: 11.5px;
}

.module-recent-item:hover {
  background: var(--surface-head);
}

.module-recent-title {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
}

.module-recent-code {
  font-size: 10.5px;
  color: var(--ink-muted);
  flex-shrink: 0;
}

.module-recent-empty {
  font-size: 11px;
  color: var(--ink-muted);
  padding: 3px 0;
}

.module-foot {
  display: flex;
  gap: 6px;
}

.module-foot .btn {
  flex: 1;
}

/* Projects Grid */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
  gap: 10px;
}

.project-card {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.14s ease, box-shadow 0.14s ease;
}

.project-card:hover {
  border-color: var(--line-dark);
  box-shadow: 0 4px 12px rgba(24, 24, 27, 0.05);
}

.project-card.is-selected {
  border-color: #18181b;
  background: #fafafa;
  box-shadow: inset 0 0 0 1px #18181b;
}

.proj-logo {
  width: 40px;
  height: 40px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--surface-head);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  font-size: 11.5px;
  font-weight: 800;
  color: var(--ink-secondary);
}

.proj-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 3px;
}

.proj-info {
  flex: 1;
  min-width: 0;
}

.proj-code-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.proj-code {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink);
}

.proj-abbr {
  padding: 0 5px;
  border-radius: 4px;
  background: var(--surface-head);
  font-size: 10px;
  font-weight: 700;
  color: var(--ink-muted);
}

.proj-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.proj-stats {
  font-size: 11px;
  color: var(--ink-muted);
}

/* Unified Spreadsheet Table */
.finder-card {
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 14px;
  background: #ffffff;
}

.finder-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.finder-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.finder-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.finder-table thead th {
  background: #fafafa;
  color: var(--ink-muted);
  font-size: 11px;
  font-weight: 700;
  text-align: left;
  padding: 9px 11px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.finder-table tbody td {
  padding: 9px 11px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}

.finder-table tbody tr:last-child td {
  border-bottom: none;
}

.finder-table tbody tr:hover td {
  background: #fafafa;
}

.mod-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--surface-head);
  border: 1px solid var(--line);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--ink-secondary);
}

.st-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  background: #fef3c7;
  color: #92400e;
}

.st-badge.is-done {
  background: #dcfce7;
  color: #166534;
}

.st-badge.is-obsolete {
  background: #f4f4f5;
  color: #52525b;
}

.finder-empty {
  text-align: center;
  padding: 26px !important;
  color: var(--ink-muted);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1220px) {
  .kpi-cards-grid,
  .module-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .kanban-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
    padding: 8px;
  }
  .home-sidebar {
    position: static;
    height: auto;
    padding: 8px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--line);
    border-radius: 14px;
  }
  .sb-nav {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .sb-footer {
    display: none;
  }
  .list-row {
    grid-template-columns: minmax(0, 1fr) 80px 110px 68px;
  }
  .list-row > :nth-child(3) {
    display: none;
  }
}

@media (max-width: 680px) {
  .home-canvas {
    padding: 14px;
  }
  .kpi-cards-grid,
  .module-grid,
  .kanban-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Timeline / Gantt View (Inspired by Reference Schedule Board)
   ========================================================================== */
.timeline-shell {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tl-controls-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.tl-controls-left,
.tl-controls-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.tl-month-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #ffffff;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-secondary);
}

.tl-nav-pair {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
}

.tl-nav-btn {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: var(--ink-secondary);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tl-nav-btn:hover {
  background: var(--surface-head);
  color: var(--ink);
}

.tl-nav-btn + .tl-nav-btn {
  border-left: 1px solid var(--line);
}

.tl-month-title {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-left: 4px;
}

.tl-toggle-lbl {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-muted);
  cursor: pointer;
}

.tl-quick-months {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.tl-qmonth-btn {
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-tint);
  color: var(--ink-muted);
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.tl-qmonth-btn:hover,
.tl-qmonth-btn.is-active {
  background: #18181b;
  border-color: #18181b;
  color: #ffffff;
}

.tl-group-card {
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #ffffff;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(24, 24, 27, 0.03);
}

.tl-scroller {
  width: 100%;
  overflow-x: auto;
}

.tl-grid-table {
  min-width: 1120px;
  position: relative;
}

.tl-row {
  display: grid;
  grid-template-columns: 235px minmax(0, 1fr);
  border-bottom: 1px solid var(--line-soft);
  position: relative;
}

.tl-row:last-child {
  border-bottom: none;
}

.tl-head-row {
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}

.tl-group-head-cell {
  position: sticky;
  left: 0;
  z-index: 6;
  background: #ffffff;
  border-right: 1px solid var(--line);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
}

.tl-head-meta {
  font-size: 10px;
  font-weight: 700;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tl-group-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: none;
  background: transparent;
  padding: 0;
  width: 100%;
  text-align: left;
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  color: var(--ink);
  cursor: pointer;
}

.tl-group-name-wrap {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.tl-group-sq {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}

.tl-days-track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--tl-days, 31), minmax(28px, 1fr));
  align-items: center;
  min-height: 36px;
}

.tl-head-track {
  min-height: 54px;
  padding-top: 22px;
  align-items: stretch;
}

.tl-day-cell {
  height: 100%;
  border-right: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
  position: relative;
}

.tl-day-cell.is-weekend {
  background: #fafafa;
}

.tl-day-btn {
  border: none;
  background: transparent;
  width: 100%;
  height: 100%;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-muted);
  border-right: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.tl-day-btn:hover {
  background: #f4f4f5;
  color: var(--ink);
}

.tl-day-btn.is-focus {
  color: #1d4ed8;
  font-weight: 800;
}

.tl-focus-pill {
  position: absolute;
  top: 3px;
  transform: translateX(-50%);
  padding: 2px 8px;
  border-radius: 6px;
  background: #18181b;
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  z-index: 5;
  pointer-events: none;
  box-shadow: 0 2px 6px rgba(24, 24, 27, 0.22);
}

.tl-focus-line {
  position: absolute;
  top: 48px;
  bottom: 6px;
  width: 2px;
  background: #2563eb;
  transform: translateX(-50%);
  z-index: 4;
  pointer-events: none;
}

.tl-focus-line::before,
.tl-focus-line::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #2563eb;
  transform: translateX(-50%);
}

.tl-focus-line::before {
  top: -3px;
}

.tl-focus-line::after {
  bottom: -3px;
}

.tl-row-label {
  position: sticky;
  left: 0;
  z-index: 5;
  background: #ffffff;
  border-right: 1px solid var(--line);
  padding: 7px 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.tl-row:hover .tl-row-label {
  background: #fafafa;
}

.tl-row-doc {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tl-row-sub {
  font-size: 10px;
  color: var(--ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tl-track-bg {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(var(--tl-days, 31), minmax(28px, 1fr));
  pointer-events: none;
}

.tl-bar {
  position: relative;
  z-index: 2;
  grid-row: 1;
  margin: 4px 2px;
  padding: 4px 9px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border: 1px solid transparent;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.tl-bar:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(24, 24, 27, 0.1);
  z-index: 3;
}

.tl-bar-a4 { background: #ede9fe; color: #4c1d95; border-color: #ddd6fe; }
.tl-bar-sr { background: #d1fae5; color: #064e3b; border-color: #a7f3d0; }
.tl-bar-sd { background: #dbeafe; color: #1e3a8a; border-color: #bfdbfe; }
.tl-bar-pc { background: #fef3c7; color: #78350f; border-color: #fde68a; }

.tl-bar.is-undated {
  background: #f4f4f5;
  color: #52525b;
  border: 1px dashed #d4d4d8;
}

.tl-bar.is-overdue {
  background: #fee2e2;
  color: #991b1b;
  border-color: #fca5a5;
}

.tl-bar.is-cont-left {
  border-top-left-radius: 2px;
  border-bottom-left-radius: 2px;
  border-left: 3px solid currentColor;
}

.tl-bar.is-cont-right {
  border-top-right-radius: 2px;
  border-bottom-right-radius: 2px;
  border-right: 3px solid currentColor;
}

.tl-row-top-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.sched-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--surface-tint);
  color: var(--ink-secondary);
  font-family: inherit;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  width: fit-content;
  max-width: 100%;
  transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.sched-btn:hover {
  background: var(--surface-head);
  border-color: var(--line-dark);
  color: var(--ink);
}

.sched-btn.is-set {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.sched-btn.is-overdue {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}

/* Schedule Modal */
.sched-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(24, 24, 27, 0.36);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.sched-backdrop[hidden] {
  display: none;
}

.sched-dialog {
  width: 100%;
  max-width: 410px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 15px;
  box-shadow: 0 20px 50px rgba(24, 24, 27, 0.18);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sched-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.sched-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

.sched-doc-sub {
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--ink-muted);
}

.sched-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sched-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-secondary);
}

.sched-lbl-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.sched-quick-link {
  border: none;
  background: transparent;
  padding: 0;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  color: #2563eb;
  cursor: pointer;
}

.sched-quick-link:hover {
  text-decoration: underline;
}

.sched-dur-pill {
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--surface-head);
  color: var(--ink-secondary);
  font-size: 10.5px;
  font-weight: 700;
}

.sched-date-input {
  height: 36px;
  padding: 6px 10px;
  border: 1px solid var(--line-dark);
  border-radius: 9px;
  background: #ffffff;
  color: var(--ink);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  outline: none;
}

.sched-date-input:focus {
  border-color: #18181b;
  box-shadow: 0 0 0 3px rgba(24, 24, 27, 0.08);
}

.sched-presets {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding-top: 2px;
}

.sched-preset-lbl {
  font-size: 11px;
  color: var(--ink-muted);
  font-weight: 600;
}

.sched-preset-btn {
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-tint);
  color: var(--ink);
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.sched-preset-btn:hover {
  background: #18181b;
  border-color: #18181b;
  color: #ffffff;
}

.sched-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--line-soft);
}

.sched-foot-right {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Shared Project Manager & Per-Project Archive Modal on Home */
.proj-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(24, 24, 27, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.proj-modal-backdrop[hidden] {
  display: none;
}

.proj-modal {
  width: 100%;
  max-width: 740px;
  max-height: 88vh;
  background: #ffffff;
  border: 1px solid #d4d4d8;
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(24, 24, 27, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.proj-modal-head {
  padding: 14px 18px;
  border-bottom: 1px solid #e4e4e7;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  background: #fafafa;
}

.proj-modal-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #18181b;
}

.proj-modal-sub {
  margin: 3px 0 0;
  font-size: 11.5px;
  color: #71717a;
}

.proj-modal-close {
  border: 1px solid #d4d4d8;
  background: #ffffff;
  color: #18181b;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
  flex: 0 0 auto;
}

.proj-modal-body {
  padding: 12px 18px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.proj-card-wrap {
  border: 1px solid #e4e4e7;
  border-radius: 10px;
  background: #ffffff;
  overflow: hidden;
}

.proj-card-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: #ffffff;
}

.proj-card-idx {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #18181b;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.proj-logo-drop {
  position: relative;
  width: 96px;
  height: 48px;
  flex: 0 0 auto;
  border: 1.5px dashed #d4d4d8;
  border-radius: 6px;
  background: #fafafa;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  padding: 3px;
}

.proj-logo-drop.has-logo {
  border-style: solid;
  background: #ffffff;
}

.proj-logo-drop img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.proj-logo-ph {
  font-size: 10.5px;
  font-weight: 700;
  color: #71717a;
}

.proj-logo-clr {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: none;
  background: rgba(24, 24, 27, 0.8);
  color: #ffffff;
  font-size: 10px;
  line-height: 15px;
  padding: 0;
  cursor: pointer;
}

.proj-fields-grid {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: 105px 115px 1fr;
  gap: 8px;
}

.proj-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.proj-field span {
  font-size: 10.5px;
  font-weight: 700;
  color: #71717a;
}

.proj-field input {
  border: 1px solid #d4d4d8;
  border-radius: 5px;
  padding: 5px 8px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: #18181b;
  background: #fafafa;
  outline: none;
}

.proj-del-btn {
  flex: 0 0 auto;
  padding: 5px 9px !important;
  font-size: 11px !important;
}

.proj-archive-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 12px;
  background: #fafafa;
  border-top: 1px solid #f0f0f2;
}

.proj-archive-stats {
  font-size: 11px;
  font-weight: 600;
  color: #52525b;
}

.proj-archive-actions {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.btn-xs {
  padding: 3px 8px !important;
  font-size: 10.5px !important;
  border-radius: 6px !important;
}

.btn-danger-hover:hover {
  color: #b91c1c !important;
  background: #fef2f2 !important;
  border-color: #fecaca !important;
}

.proj-modal-foot {
  padding: 12px 18px;
  border-top: 1px solid #e4e4e7;
  background: #fafafa;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Desktop / PWA Disk Folder Sync Card */
.disk-sync-card {
  padding: 6px 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.disk-sync-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.disk-sync-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 600;
  color: var(--ink-secondary);
}

.disk-sync-status {
  font-size: 9.5px;
  color: #a1a1aa;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.disk-sync-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}

.disk-btn {
  flex: 1 1 auto;
  padding: 3px 6px;
  border-radius: 5px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink-secondary);
  font-family: inherit;
  font-size: 10px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}

.disk-btn:hover {
  background: #f4f4f5;
  color: #18181b;
}

.disk-btn.is-primary {
  background: #f4f4f5;
  border-color: var(--line-dark);
  color: #18181b;
  font-weight: 600;
}

.disk-btn.is-primary:hover {
  background: #18181b;
  border-color: #18181b;
  color: #ffffff;
}

.toolbar-more-wrap {
  position: relative;
  display: inline-flex;
}

.toolbar-more-menu {
  position: absolute;
  top: calc(100% + 5px);
  right: 0;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(24, 24, 27, 0.09);
  padding: 8px;
  z-index: 60;
}

.toolbar-more-menu[hidden] {
  display: none !important;
}

.home-font-popover {
  min-width: 280px;
}

.home-font-popover .font-pill {
  flex-wrap: wrap;
  border: none;
  background: transparent;
  padding: 2px;
}

/* Archive Tab & Lock Badges */
.view-tab-cnt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 17px;
  height: 17px;
  padding: 0 5px;
  border-radius: 999px;
  background: #f4f4f5;
  color: #3f3f46;
  font-size: 10.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.view-tab.is-active .view-tab-cnt {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

.archive-shell {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.archive-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.archive-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
}

.archive-row-main {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 240px;
  flex: 1 1 320px;
}

.archive-row-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.archive-row-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.archive-row-meta {
  font-size: 11.5px;
  color: var(--ink-muted);
}

.lock-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
}

.lock-pill.is-locked {
  background: #f4f4f5;
  color: #3f3f46;
  border: 1px solid #e4e4e7;
}

.lock-pill.is-unlocked {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.archive-row-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.archive-proj-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #ffffff;
}

.archive-proj-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid #f0f0f2;
}

.archive-proj-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
}

.archive-proj-title svg {
  color: #71717a;
  flex-shrink: 0;
}

.archive-proj-count {
  padding: 1px 7px;
  border-radius: 999px;
  background: #f4f4f5;
  color: #52525b;
  border: 1px solid #e4e4e7;
  font-size: 10.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.archive-proj-rows {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

/* Google Drive Cloud Sync Modal & Sidebar Pill */
.disk-drive-pill {
  padding: 1px 6px;
  border-radius: 999px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  font-size: 9.5px;
  font-weight: 600;
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.disk-btn.is-drive {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.disk-btn.is-drive:hover {
  background: #dbeafe;
  color: #1e40af;
}

.drive-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(15, 23, 42, 0.48);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.drive-modal-dialog {
  width: 100%;
  max-width: 560px;
  max-height: 92vh;
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid #e4e4e7;
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.22);
  color: #18181b;
}

.drive-modal-dialog .proj-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid #ececef;
}

.drive-modal-dialog .proj-modal-header h2 {
  margin: 0;
  font-size: 15.5px;
  font-weight: 700;
}

.drive-modal-dialog .proj-modal-close {
  border: 1px solid #e4e4e7;
  background: #ffffff;
  color: #52525b;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 13px;
}

.drive-modal-dialog .proj-modal-close:hover {
  background: #f4f4f5;
  color: #18181b;
}

.drive-modal-body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.drive-field-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.drive-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: #3f3f46;
}

.drive-field input,
.drive-admin-row input {
  width: 100%;
  box-sizing: border-box;
  padding: 7px 10px;
  border: 1px solid #d4d4d8;
  border-radius: 7px;
  font-family: inherit;
  font-size: 12.5px;
  color: #18181b;
  background: #ffffff;
}

.drive-auth-box {
  padding: 10px 12px;
  border: 1px solid #e4e4e7;
  border-radius: 9px;
  background: #fafafa;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.drive-auth-row,
.drive-sync-actions,
.drive-admin-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.drive-admin-row input {
  flex: 1 1 180px;
}

.drive-modal-dialog .disk-btn {
  flex: 0 1 auto;
  padding: 6px 11px;
  font-size: 12px;
  border-radius: 7px;
}

.drive-modal-dialog .disk-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.drive-gis-host {
  display: flex;
  justify-content: center;
  padding: 4px 0;
}

.drive-user-status {
  font-size: 12px;
  color: #3f3f46;
  line-height: 1.5;
}

.drive-role-pill {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 999px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
  font-size: 11px;
  font-weight: 600;
}

.drive-progress-wrap {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.drive-progress-track {
  height: 8px;
  width: 100%;
  background: #e4e4e7;
  border-radius: 999px;
  overflow: hidden;
}

.drive-progress-fill {
  height: 100%;
  background: #2563eb;
  transition: width 0.2s ease;
}

.drive-progress-text {
  font-size: 11.5px;
  color: #52525b;
}

.drive-modal-overlay[hidden],
.drive-admin-row[hidden],
.drive-gis-host[hidden],
.drive-progress-wrap[hidden],
.drive-error-box[hidden] {
  display: none !important;
}

.drive-error-box {
  padding: 9px 11px;
  border-radius: 8px;
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 12px;
  line-height: 1.45;
}

/* Full-Screen Auth Login Gate & Logout Pill */
body.auth-locked {
  overflow: hidden !important;
}

.auth-gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 99990;
  background:
    radial-gradient(circle at 20% 20%, rgba(37, 99, 235, 0.08), transparent 45%),
    radial-gradient(circle at 80% 80%, rgba(24, 24, 27, 0.06), transparent 50%),
    #f4f4f5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}

.auth-gate-card {
  width: 100%;
  max-width: 430px;
  background: #ffffff;
  border: 1px solid #e4e4e7;
  border-radius: 18px;
  padding: 26px 24px 22px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
  color: #18181b;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-gate-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-gate-mark {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: #18181b;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.auth-gate-brand-row {
  display: flex;
  align-items: center;
  gap: 7px;
}

.auth-gate-brand-name {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.auth-gate-brand-sub {
  margin: 2px 0 0;
  font-size: 12px;
  color: #71717a;
}

.auth-gate-title {
  margin: 2px 0 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #18181b;
}

.auth-gate-desc {
  margin: 0;
  font-size: 13px;
  color: #52525b;
  line-height: 1.5;
}

.auth-gate-notice {
  padding: 8px 11px;
  border-radius: 9px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  font-size: 12px;
  line-height: 1.45;
}

.auth-gate-google-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
}

.auth-gis-host {
  display: flex;
  justify-content: center;
  min-height: 40px;
}

.auth-gate-hint {
  margin: 0;
  font-size: 11.5px;
  color: #71717a;
  text-align: center;
  line-height: 1.4;
}

.auth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 9px;
  border: 1px solid #d4d4d8;
  background: #ffffff;
  color: #18181b;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.auth-btn:hover:not(:disabled) {
  background: #f4f4f5;
  border-color: #a1a1aa;
}

.auth-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.auth-btn-google {
  border-color: #cbd5e1;
  background: #ffffff;
}

.auth-btn-google.is-subtle {
  font-size: 11.5px;
  padding: 6px 10px;
  color: #52525b;
  background: #fafafa;
}

.auth-btn-primary {
  background: #18181b;
  border-color: #18181b;
  color: #ffffff;
}

.auth-btn-primary:hover:not(:disabled) {
  background: #27272a;
  border-color: #27272a;
}

.auth-btn-ghost {
  font-size: 11.5px;
  padding: 5px 10px;
  color: #52525b;
}

.auth-gate-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11.5px;
  color: #a1a1aa;
}

.auth-gate-divider::before,
.auth-gate-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e4e4e7;
}

.auth-gate-admin-form {
  display: flex;
  gap: 8px;
  align-items: center;
}

.auth-pass-wrap {
  position: relative;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
}

.auth-pass-input {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 34px 9px 11px;
  border: 1px solid #d4d4d8;
  border-radius: 9px;
  font-family: inherit;
  font-size: 13px;
  color: #18181b;
  background: #ffffff;
}

.auth-pass-toggle {
  position: absolute;
  right: 6px;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 4px;
  font-size: 13px;
  opacity: 0.65;
}

.auth-pass-toggle:hover {
  opacity: 1;
}

.auth-gate-advanced {
  border-top: 1px solid #f0f0f2;
  padding-top: 10px;
  font-size: 12px;
  color: #52525b;
}

.auth-gate-advanced summary {
  cursor: pointer;
  font-weight: 600;
  user-select: none;
}

.auth-gate-adv-body {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-gate-adv-actions {
  display: flex;
  justify-content: flex-end;
}

.auth-gate-notice[hidden],
.auth-gis-host[hidden] {
  display: none !important;
}

.disk-auth-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 4px 6px;
  margin-bottom: 5px;
  border-radius: 6px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  font-size: 10.5px;
  color: #166534;
}

.disk-auth-user {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.disk-auth-user em {
  font-style: normal;
  font-weight: 500;
  opacity: 0.85;
}

.disk-auth-logout-btn {
  flex-shrink: 0;
  padding: 1px 7px;
  border-radius: 5px;
  border: 1px solid #fecaca;
  background: #ffffff;
  color: #b91c1c;
  font-family: inherit;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
}

.disk-auth-logout-btn:hover {
  background: #fef2f2;
}

.home-auth-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 4px 3px 9px;
  border-radius: 999px;
  background: #f4f4f5;
  border: 1px solid #e4e4e7;
  font-size: 11.5px;
  color: #27272a;
}

.home-auth-email {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.home-auth-logout {
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid #fecaca;
  background: #ffffff;
  color: #b91c1c;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.home-auth-logout:hover {
  background: #fef2f2;
}

@media print {
  body.auth-locked > :not(#docFormsAuthGate) {
    display: none !important;
  }
}
