:root {
  --brand: #852c84;
  --magenta: #d946ef;
  --cyan: #18e3ee;
  --blue: #6677ff;
  --ink: #f8fbff;
  --muted: #aeb8d8;
  --panel: rgba(19, 27, 55, .74);
  --panel-strong: rgba(22, 31, 67, .92);
  --stroke: rgba(214, 226, 255, .14);
  --shadow: 0 28px 90px rgba(0, 0, 0, .42);
  --font-heading: "PeydaWeb", "YekanBakh", Tahoma, Arial, sans-serif;
  --font-body: "YekanBakh", Tahoma, Arial, sans-serif;
}
@font-face {
  font-family: "PeydaWeb";
  src: url("/assets/fonts/PeydaWeb-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "YekanBakh";
  src: url("/assets/fonts/YekanBakh-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
* { box-sizing: border-box; }
html {
  max-width: 100%;
  overflow-x: clip;
  scrollbar-width: thin;
  scrollbar-color: rgba(24, 227, 238, .45) rgba(255, 255, 255, .04);
}
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(24, 227, 238, .45) rgba(255, 255, 255, .04);
}
*::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
*::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, .035);
  border-radius: 999px;
}
*::-webkit-scrollbar-thumb {
  min-height: 42px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(24, 227, 238, .56), rgba(217, 70, 239, .48));
  border: 2px solid rgba(10, 16, 36, .88);
}
*::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(24, 227, 238, .78), rgba(217, 70, 239, .66));
}
*::-webkit-scrollbar-corner {
  background: transparent;
}
body {
  margin: 0;
  max-width: 100%;
  overflow-x: clip;
  font-family: var(--font-body);
  background: #0a1024;
  color: var(--ink);
}
#app {
  min-width: 0;
  max-width: 100%;
  overflow-x: clip;
}
body::before {
  content: "";
  position: fixed;
  inset: -20%;
  background:
    radial-gradient(circle at 12% 16%, rgba(133, 44, 132, .55), transparent 28%),
    radial-gradient(circle at 88% 22%, rgba(24, 227, 238, .24), transparent 24%),
    radial-gradient(circle at 54% 92%, rgba(217, 70, 239, .22), transparent 30%),
    linear-gradient(135deg, #0a1024 0%, #121932 48%, #080d1f 100%);
  z-index: -2;
}
button, input, textarea, select { font: inherit; }
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: .72;
}
h1, h2, h3, h4, h5, h6, .brand strong, .stat strong, th {
  font-family: var(--font-heading);
  font-weight: 500;
}
.app {
  --sidebar-logo-divider-y: 126px;
  width: 100%;
  min-width: 0;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 288px 1fr;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 48px 48px;
  transition: none;
}
.app.sidebar-collapsed {
  grid-template-columns: 68px minmax(0, 1fr);
}
.shell-app {
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: linear-gradient(145deg, rgba(13,19,43,.9), rgba(11,16,35,.78));
  box-shadow: var(--shadow);
  overflow: visible;
}
.sidebar {
  position: relative;
  z-index: 20;
  margin: 0;
  background: rgba(12, 18, 42, .72);
  border: 0;
  border-left: 1px solid var(--stroke);
  border-radius: 0;
  color: #fff;
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(28px);
  transition: padding .22s ease, gap .22s ease;
}
.sidebar::after {
  content: "";
  position: absolute;
  top: var(--sidebar-logo-divider-y);
  inset-inline: 18px;
  height: 1px;
  background: rgba(255,255,255,.12);
  pointer-events: none;
}
.sidebar-toggle {
  position: absolute;
  top: calc(var(--sidebar-logo-divider-y) - 15px);
  left: 0;
  transform: translateX(-50%);
  z-index: 12;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  line-height: 0;
  border: 1px solid rgba(148, 163, 184, .3);
  border-radius: 50%;
  color: #dbe5ff;
  background: #151e40;
  box-shadow: 0 8px 20px rgba(2, 6, 23, .34);
  transition: color .18s ease, background .18s ease, border-color .18s ease, transform .18s ease;
}
.sidebar-toggle svg {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  width: 17px;
  height: 17px;
  transform: translate(-50%, -50%);
}
.sidebar-toggle:hover {
  color: #fff;
  border-color: rgba(34, 211, 238, .5);
  background: #1b2a55;
  transform: translateX(-50%) scale(1.06);
}
.sidebar-toggle:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 4px rgba(24, 227, 238, .14), 0 8px 20px rgba(2, 6, 23, .34);
}
.app.sidebar-collapsed .sidebar {
  padding: 24px 18px;
  gap: 24px;
}
.app.sidebar-collapsed .sidebar-toggle {
  top: calc(var(--sidebar-logo-divider-y) - 15px);
  left: 0;
  transform: translateX(-50%);
}
.app.sidebar-collapsed .sidebar-toggle:hover {
  transform: translateX(-50%) scale(1.06);
}
.app.sidebar-collapsed .roles {
  display: none;
}
.app.sidebar-logo-hidden .brand {
  opacity: 0;
  visibility: hidden;
  transform: none;
  pointer-events: none;
  transition-delay: 0s, 0s, 0s, 0s, 0s, .18s;
}
.app.sidebar-collapsed .brand {
  max-height: 140px;
}
.app.sidebar-collapsed .sidebar nav button {
  width: 40px;
  height: 40px;
  min-height: 40px;
  padding: 0;
  gap: 0;
  justify-content: center;
  border-radius: 8px;
  transition: background .18s ease, border-color .18s ease, box-shadow .18s ease, color .18s ease, opacity .18s ease;
}
.app.sidebar-collapsed .sidebar nav button span {
  width: 0;
  max-width: 0;
  flex-basis: 0;
}
.app.sidebar-labels-hidden .sidebar nav button span {
  opacity: 0;
  visibility: hidden;
  transform: none;
  pointer-events: none;
  transition-delay: 0s, 0s, 0s, .18s;
}
.app.sidebar-collapsed .sidebar nav button svg {
  width: 20px;
  height: 20px;
}
.app.sidebar-collapsed .sidebar nav button.active,
.app.sidebar-collapsed .sidebar nav button:hover {
  transform: none;
}
.brand {
  display: grid;
  place-items: center;
  max-height: 140px;
  overflow: hidden;
  padding: 10px 8px 20px;
  border-bottom: 1px solid transparent;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity .18s ease, transform .18s ease, max-height .22s ease, padding .22s ease, border-color .18s ease, visibility 0s linear 0s;
}
.brand img {
  width: 238px;
  height: 96px;
  object-fit: contain;
  background: rgba(255,255,255,.06);
  border-radius: 14px;
  padding: 7px;
}
.brand strong { display: block; font-size: 22px; }
.brand span { color: var(--muted); font-size: 12px; }
nav { display: grid; gap: 8px; }
nav button, .panel button {
  border: 0;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition:
    transform .18s ease,
    background .18s ease,
    border-color .18s ease,
    box-shadow .18s ease,
    color .18s ease,
    opacity .18s ease;
}
nav button:not(:disabled):hover,
.panel button:not(:disabled):hover,
.route-chip:hover,
.seo-tab:hover,
.seo-subtab:hover,
.user-menu-trigger:hover,
.user-menu-item:hover,
.choice-item:hover {
  transform: translateY(-1px);
}
nav button:not(:disabled):active,
.panel button:not(:disabled):active,
.user-menu-trigger:not(:disabled):active,
.user-menu-item:not(:disabled):active,
.seo-tab:not(:disabled):active,
.seo-subtab:not(:disabled):active {
  transform: translateY(0) scale(.985);
}
nav button:focus-visible,
.panel button:focus-visible,
.route-chip:focus-visible,
.user-menu-trigger:focus-visible,
.user-menu-item:focus-visible,
.seo-tab:focus-visible,
.seo-subtab:focus-visible,
.choice-item:focus-within {
  outline: 0;
  box-shadow:
    0 0 0 1px rgba(255,255,255,.12),
    0 0 0 4px rgba(24,227,238,.14);
}
nav button {
  position: relative;
  justify-content: flex-start;
  color: #dbe5ff;
  background: transparent;
  padding: 12px;
}
nav button svg { width: 18px; height: 18px; }
nav button svg {
  flex: 0 0 auto;
}
nav button span {
  display: block;
  width: auto;
  max-width: 220px;
  min-width: 0;
  flex-basis: auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  transition: opacity .18s ease, transform .18s ease, max-width .22s ease, visibility 0s linear 0s;
}
nav button.active, nav button:hover {
  background: linear-gradient(90deg, rgba(133, 44, 132, .92), rgba(126, 87, 255, .36));
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.11);
  transform: translateX(-2px);
}
.roles { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.roles span {
  border: 1px solid rgba(255,255,255,.16);
  color: #cbd5e1;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 11px;
}
@media (min-width: 921px) {
  .sidebar {
    position: sticky;
    top: 0;
    align-self: start;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    padding: 16px 14px;
    gap: 14px;
    overflow: visible;
  }
  .sidebar::after {
    inset-inline: 14px;
  }
  .app.sidebar-collapsed .sidebar {
    padding: 16px 14px;
    gap: 14px;
  }
  .sidebar .brand {
    flex: 0 0 auto;
    max-height: 110px;
    padding: 0 6px 10px;
  }
  .app.sidebar-collapsed .brand {
    max-height: 110px;
    padding: 0 6px 10px;
  }
  .sidebar nav {
    flex: 1 1 auto;
    min-height: 0;
    align-content: start;
    gap: 5px;
    padding-inline: 2px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .app.sidebar-collapsed .sidebar nav {
    justify-items: center;
    padding-inline: 0;
  }
  .sidebar nav button {
    min-height: 38px;
    padding: 9px 10px;
  }
  .sidebar .roles {
    flex: 0 0 auto;
    gap: 6px;
    margin-top: 0;
  }
}
.grid.two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.content { padding: 24px; min-width: 0; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}
.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: min(520px, 48vw);
}
.route-chip {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  color: #83f6ff;
  text-decoration: none;
  background: rgba(24,227,238,.09);
  border: 1px solid rgba(24,227,238,.24);
  border-radius: 14px;
  padding: 0 12px;
  direction: ltr;
  transition:
    transform .18s ease,
    background .18s ease,
    border-color .18s ease,
    box-shadow .18s ease,
    color .18s ease;
}
.route-chip:hover {
  background: rgba(24,227,238,.14);
  border-color: rgba(24,227,238,.34);
  box-shadow: 0 10px 24px rgba(24,227,238,.12);
}
h1, h2, p { margin: 0; }
h1 { font-size: 28px; }
.topbar p { color: var(--muted); margin-top: 8px; }
.search {
  min-width: 300px;
  height: 44px;
  background: rgba(255,255,255,.055);
  border: 1px solid var(--stroke);
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  backdrop-filter: blur(18px);
}
.search input { border: 0; outline: 0; width: 100%; background: transparent; color: #fff; }
.search input::placeholder { color: #95a0c2; }
.user-menu {
  position: relative;
}
.user-menu-trigger {
  height: 44px;
  padding: 6px 10px;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.055);
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: none;
  transition:
    transform .18s ease,
    background .18s ease,
    border-color .18s ease,
    box-shadow .18s ease;
}
.user-menu-trigger:hover {
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.2);
  box-shadow: 0 10px 24px rgba(0,0,0,.16);
}
.user-menu.open .user-menu-trigger {
  border-color: rgba(24,227,238,.3);
  box-shadow: inset 0 0 0 1px rgba(24,227,238,.12);
}
.user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid rgba(255,255,255,.14);
}
.user-avatar-empty {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(133,44,132,.72), rgba(24,227,238,.18));
  font-family: var(--font-heading);
}
.user-menu-copy {
  display: grid;
  gap: 2px;
  text-align: right;
}
.user-menu-copy strong {
  font-family: var(--font-heading);
  font-size: 14px;
  line-height: 1.05;
}
.user-menu-copy span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1;
}
.user-menu-caret {
  color: #95a0c2;
  font-size: 12px;
}
.user-menu-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 180px;
  display: grid;
  gap: 4px;
  padding: 8px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(18, 27, 61, .98);
  box-shadow: 0 10px 24px rgba(0,0,0,.18);
  z-index: 20;
}
.user-menu-item {
  min-height: 40px;
  justify-content: flex-start;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.02);
  color: #f8fbff;
  box-shadow: none;
  transition:
    transform .18s ease,
    background .18s ease,
    border-color .18s ease,
    box-shadow .18s ease,
    color .18s ease;
}
.user-menu-item:hover {
  background: rgba(255,255,255,.07);
  border-color: rgba(255,255,255,.2);
  box-shadow: 0 10px 20px rgba(0,0,0,.14);
}
.user-menu-item.danger {
  color: #fecaca;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 0;
}
.stats.compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.stats.compact .stat {
  padding: 12px;
}
.stats.compact .stat strong {
  font-size: 24px;
}
.stat, .panel {
  position: relative;
  background: linear-gradient(160deg, rgba(26,37,80,.78), rgba(15,22,50,.62));
  border: 1px solid var(--stroke);
  border-radius: 22px;
  box-shadow: 0 18px 42px rgba(0,0,0,.22);
  overflow: hidden;
  transition: transform .25s ease, border-color .25s ease;
}
.stat:hover, .panel:hover { transform: translateY(-3px); border-color: rgba(255,255,255,.24); }
.stat {
  padding: 18px;
  display: grid;
  gap: 10px;
}
.stat::before {
  content: "";
  position: absolute;
  inset: auto auto -32px -28px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--cyan), transparent 65%);
  opacity: .22;
}
.stat svg { color: var(--cyan); }
.stat span { color: var(--muted); }
.stat strong { font-size: 30px; }
.grid.two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.grid.three {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.stack { display: grid; gap: 18px; }
.panel { padding: 18px; }
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(6, 10, 24, .56);
  backdrop-filter: blur(10px);
}
.modal-card {
  width: min(920px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow: auto;
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.modal-head h2 {
  margin: 0;
}
.user-form-modal {
  padding: 20px;
}
.user-detail-modal {
  width: min(920px, calc(100vw - 32px));
  padding: 20px;
}
.user-archive-modal {
  width: min(1120px, calc(100vw - 32px));
  padding: 20px;
}
.role-form-modal {
  width: min(980px, calc(100vw - 32px));
  padding: 20px;
}
.customer-form-modal {
  width: min(980px, calc(100vw - 32px));
  padding: 20px;
}
.customer-detail-modal,
.customer-archive-modal,
.customer-contacts-modal {
  width: min(1120px, calc(100vw - 32px));
  padding: 20px;
}
.customer-projects-modal {
  width: min(1500px, calc(100vw - 24px));
  padding: 20px;
}
.customer-projects-modal .project-tasks-panel .table-wrap { overflow-x: hidden; }
.customer-projects-modal .project-tasks-panel table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}
.customer-projects-modal .project-tasks-panel th,
.customer-projects-modal .project-tasks-panel td {
  padding-inline: 7px;
  vertical-align: middle;
}
.customer-projects-modal .project-tasks-panel th:first-child,
.customer-projects-modal .project-tasks-panel td:first-child {
  width: 24%;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.75;
}
.customer-projects-modal .project-tasks-panel th:nth-child(2),
.customer-projects-modal .project-tasks-panel td:nth-child(2) { width: 110px; }
.customer-projects-modal .project-tasks-panel th:nth-child(3),
.customer-projects-modal .project-tasks-panel td:nth-child(3) {
  width: 62px;
  text-align: center;
}
.customer-projects-modal .project-tasks-panel th:nth-child(4),
.customer-projects-modal .project-tasks-panel td:nth-child(4) {
  width: 76px;
  text-align: center;
}
.customer-projects-modal .project-tasks-panel th:nth-child(5),
.customer-projects-modal .project-tasks-panel td:nth-child(5) { width: 112px; }
.customer-projects-modal .project-tasks-panel th:nth-child(4),
.customer-projects-modal .project-tasks-panel th:nth-child(5) {
  padding-inline: 12px;
  white-space: nowrap;
}
.customer-projects-modal .project-tasks-panel th:nth-child(6),
.customer-projects-modal .project-tasks-panel td:nth-child(6) { width: 88px; }
.customer-projects-modal .project-tasks-panel th:nth-child(7),
.customer-projects-modal .project-tasks-panel td:nth-child(7) { width: 100px; }
.customer-projects-modal .project-tasks-panel th:nth-child(8),
.customer-projects-modal .project-tasks-panel td:nth-child(8) {
  width: 132px;
  white-space: normal;
  line-height: 1.65;
  text-align: center;
}
.customer-projects-modal .project-tasks-panel th:nth-child(9),
.customer-projects-modal .project-tasks-panel td:nth-child(9) { width: 224px; }
.customer-projects-modal .project-tasks-panel td:nth-child(9) .row-actions {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
}
.project-detail-modal {
  display: grid;
  grid-template-rows: auto auto auto auto minmax(0, 1fr) auto;
  overflow: hidden;
}
.project-detail-modal > .panel:has(.project-task-table-shell) {
  min-height: 0;
  overflow: hidden;
}
.project-task-table-shell {
  min-height: 0;
}
.project-task-table-shell .table-wrap {
  max-height: clamp(320px, 45vh, 560px);
  overflow: auto;
  overscroll-behavior: contain;
  padding-bottom: 2px;
}
.project-task-table-shell thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(19, 31, 63, .98);
  backdrop-filter: blur(12px);
}
.customer-projects-modal .task-detail-backdrop { z-index: 180; }
.customer-projects-modal .task-detail-modal {
  width: min(960px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 20px;
}
.project-info-backdrop { z-index: 125; }
.project-info-modal { width: min(980px, calc(100vw - 28px)); }
.project-info-search {
  width: min(420px, 100%);
  margin-bottom: 14px;
}
.project-info-table-wrap { min-height: 190px; }
.project-info-table { min-width: 620px; table-layout: fixed; }
.project-info-table th:first-child,
.project-info-table td:first-child { width: 30%; }
.project-info-table th:last-child,
.project-info-table td:last-child { width: 132px; }
.project-info-table input { width: 100%; min-width: 0; }
.project-info-table .row-actions { justify-content: center; }
.project-info-value {
  display: block;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.project-info-empty-row td { padding: 0; }
.invoice-modal {
  width: min(1380px, calc(100vw - 32px));
}
.invoice-form,
.invoice-lines,
.settings-subsection {
  display: grid;
  gap: 14px;
  min-width: 0;
}
.invoice-lines-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.invoice-lines-head h3,
.settings-subsection h3 {
  margin: 0;
  font-size: 16px;
}
.invoice-line {
  display: grid;
  grid-template-columns: 62px minmax(150px, 1.25fr) minmax(160px, 1.5fr) 90px 130px 120px 130px 42px;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 8px;
  background: rgba(255, 255, 255, .025);
}
.invoice-tax-toggle {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
}
.invoice-tax-toggle input {
  width: auto;
  accent-color: var(--magenta);
}
.invoice-line-total {
  color: #e2e8f0;
  font-weight: 700;
  white-space: nowrap;
}
.invoice-summary {
  width: min(460px, 100%);
  margin-inline-start: auto;
  display: grid;
  gap: 0;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 8px;
  overflow: hidden;
}
.invoice-summary p {
  margin: 0;
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(148, 163, 184, .12);
}
.invoice-summary p:last-child { border-bottom: 0; }
.invoice-grand-total {
  color: #6ee7b7;
  background: rgba(16, 185, 129, .08);
}
.settings-subsection {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(148, 163, 184, .16);
}
.settings-subsection.settings-connection {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}
.backup-path-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}
.backup-path-input {
  direction: ltr;
  text-align: left;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 12px;
}
.backup-path-list p {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, .16);
  border-radius: 6px;
  background: rgba(15, 23, 42, .2);
}
.backup-path-list code {
  direction: ltr;
  unicode-bidi: plaintext;
  overflow-wrap: anywhere;
  color: #83f6ff;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 12px;
}
.wallboard-period-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}
.wallboard-remote-section {
  overflow: visible;
}
.wallboard-remote-heading,
.wallboard-remote-controls,
.wallboard-slide-picker {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.wallboard-remote-heading {
  justify-content: space-between;
}
.wallboard-remote-heading > div {
  display: grid;
  gap: 6px;
}
.wallboard-online-status,
.wallboard-playback-state {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 6px;
  color: var(--muted);
  background: rgba(15, 23, 42, .28);
  white-space: nowrap;
  font-size: 12px;
}
.wallboard-online-status.online,
.wallboard-playback-state.playing {
  color: #6ee7b7;
  border-color: rgba(16, 185, 129, .42);
  background: rgba(16, 185, 129, .1);
}
.wallboard-online-status.offline,
.wallboard-playback-state.paused {
  color: #fbbf24;
  border-color: rgba(245, 158, 11, .4);
  background: rgba(245, 158, 11, .09);
}
.wallboard-remote-controls {
  flex-wrap: wrap;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, .16);
  border-radius: 8px;
  background: rgba(15, 23, 42, .2);
}
.wallboard-remote-controls .icon-btn {
  width: 40px;
  height: 40px;
  padding: 0;
}
.wallboard-slide-picker {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) max-content;
  align-items: end;
}
.wallboard-slide-picker .field {
  margin: 0;
}
.wallboard-slide-picker > button {
  min-height: 44px;
}
.gsc-auto-update-grid {
  grid-template-columns: minmax(180px, 260px) minmax(220px, 320px);
  justify-content: start;
}
.gsc-auto-update-settings .panel-head {
  align-items: center;
}
.gsc-auto-update-settings .compact-choice {
  min-width: 112px;
}
.gsc-auto-update-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.gsc-auto-update-meta p {
  margin: 0;
  padding: 8px 10px;
  border: 1px solid rgba(148, 163, 184, .16);
  border-radius: 6px;
  color: var(--muted);
  background: rgba(15, 23, 42, .2);
}
.gsc-auto-update-meta .warning {
  flex-basis: 100%;
}
.wallboard-period-select[open] {
  z-index: 100;
}
.settings-page .panel {
  overflow: visible;
}
.wallboard-period-select .lov-select-menu {
  position: absolute;
  inset: auto 0 auto 0;
  top: calc(100% + 8px);
  margin-top: 0;
  max-height: 220px;
  background: #111d3d;
}
.currency-input {
  direction: ltr;
  text-align: right;
  unicode-bidi: plaintext;
}
@media (max-width: 720px) {
  .wallboard-period-grid { grid-template-columns: 1fr; }
  .gsc-auto-update-grid { grid-template-columns: 1fr; }
}
.payment-destination-list {
  display: grid;
  gap: 8px;
  width: min(720px, 100%);
}
.payment-destination-row,
.payment-destination-add {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}
.payment-destination-row input,
.payment-destination-add input {
  width: 100%;
  min-width: 0;
}
.payment-destination-row .icon-btn {
  width: 40px;
  height: 40px;
  padding: 0;
}
.task-template-backdrop {
  z-index: 110;
}
.task-template-modal {
  width: min(1320px, calc(100vw - 32px));
}
.task-template-toolbar {
  justify-content: flex-start;
}
.task-template-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.task-template-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--template-color) 55%, rgba(148, 163, 184, .2));
  border-top: 4px solid var(--template-color);
  border-radius: 8px;
  background: rgba(255, 255, 255, .025);
}
.task-template-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.task-template-card h3 {
  margin: 0;
  font-size: 16px;
}
.task-template-task-editor {
  display: grid;
  gap: 14px;
  padding-top: 16px;
  border-top: 1px solid rgba(148, 163, 184, .16);
}
.task-template-task-editor h3 {
  margin: 0;
  font-size: 16px;
}
.task-template-choice-grid {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}
.task-template-select-all {
  width: fit-content;
  min-width: 190px;
}
.task-template-person {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.task-template-date-input {
  width: 145px;
  min-width: 145px;
}
.contacts-modal-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.contacts-inline-add {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}
.contacts-inline-add h3 {
  margin: 0;
  font-size: 16px;
}
.contacts-inline-add .inline-form {
  margin-bottom: 0;
}
.panel h2 { font-size: 18px; }
.panel button {
  background: linear-gradient(135deg, var(--brand), #7c5cff);
  color: #fff;
  min-height: 38px;
  padding: 0 13px;
  box-shadow: 0 12px 30px rgba(133,44,132,.35);
  border: 1px solid rgba(255,255,255,.08);
}
.panel button:not(.ghost):not(.danger):not(:disabled):hover {
  background: linear-gradient(135deg, #953394, #8870ff);
  border-color: rgba(255,255,255,.16);
  box-shadow: 0 16px 34px rgba(133,44,132,.42);
}
.panel button.ghost {
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.16);
  box-shadow: none;
}
.panel button.ghost:not(.danger):not(:disabled):hover {
  background: rgba(255,255,255,.09);
  border-color: rgba(255,255,255,.26);
  box-shadow: 0 10px 22px rgba(0,0,0,.12);
}
.panel button.danger {
  color: #fecaca;
  border-color: rgba(248, 113, 113, .28);
  background: rgba(248, 113, 113, .08);
}
.panel button.danger:not(:disabled):hover {
  background: rgba(248, 113, 113, .14);
  border-color: rgba(248, 113, 113, .42);
  box-shadow: 0 12px 24px rgba(127, 29, 29, .18);
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.form-grid.compact-form {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.jalali-date-input {
  direction: ltr;
  text-align: right;
}
.jalali-calendar-popover {
  position: fixed;
  z-index: 220;
  width: 286px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, .28);
  border-radius: 14px;
  background: #111a38;
  box-shadow: 0 22px 54px rgba(2, 6, 23, .38);
  direction: rtl;
}
.jalali-calendar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.jalali-calendar-head strong {
  color: #f8fafc;
  font-size: 14px;
  font-weight: 700;
}
.jalali-calendar-nav {
  width: 34px;
  min-width: 34px;
  height: 34px;
  padding: 0;
  font-size: 22px;
  line-height: 1;
  color: #dbe5ff;
  border: 1px solid rgba(148, 163, 184, .24);
  background: rgba(255,255,255,.055);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}
.jalali-calendar-nav:not(:disabled):hover {
  color: #fff;
  border-color: rgba(34, 211, 238, .42);
  background: rgba(34, 211, 238, .12);
}
.jalali-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
}
.jalali-calendar-weekday {
  display: grid;
  place-items: center;
  height: 26px;
  color: #93a1c6;
  font-size: 12px;
  font-weight: 700;
}
.jalali-calendar-empty {
  min-height: 34px;
}
.jalali-calendar-day {
  min-width: 0;
  height: 34px;
  padding: 0;
  border-radius: 10px;
  border-color: rgba(148, 163, 184, .16);
  background: rgba(255,255,255,.035);
  color: #e5e7eb;
}
.jalali-calendar-day:hover {
  border-color: rgba(34, 211, 238, .42);
  background: rgba(34, 211, 238, .1);
}
.jalali-calendar-day.today {
  border-color: rgba(245, 158, 11, .55);
  color: #fde68a;
}
.jalali-calendar-day.selected {
  border-color: rgba(168, 85, 247, .72);
  background: linear-gradient(135deg, rgba(168, 85, 247, .82), rgba(6, 182, 212, .72));
  color: white;
}
.attachment-list {
  display: grid;
  gap: 6px;
  min-height: 46px;
  padding: 7px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 12px;
  background: rgba(255,255,255,.035);
}
.attachment-list.empty {
  align-content: center;
  color: var(--muted);
  font-size: 13px;
}
.attachment-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 34px;
  padding: 4px 6px 4px 4px;
  border-radius: 10px;
  background: rgba(255,255,255,.04);
}
.attachment-list-item span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.inline-form {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 18px;
  background: rgba(255,255,255,.035);
}
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.task-filter-field {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  width: auto;
  max-width: 100%;
}
.task-filter-field select {
  min-width: 150px;
}
.task-filter-head {
  margin-top: 8px;
}
.task-title-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 190px;
}
.task-title-link {
  min-height: 30px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: #f8fafc;
  font-weight: 700;
  text-align: right;
}
.task-title-link:hover {
  color: #67e8f9;
  background: transparent;
  box-shadow: none;
}
.task-check-btn.checked {
  color: #22c55e;
  border-color: rgba(34, 197, 94, .45);
  background: rgba(34, 197, 94, .1);
}
.task-check-btn.overdue {
  color: #fb7185;
  border-color: rgba(251, 113, 133, .46);
  background: rgba(251, 113, 133, .1);
}
.task-detail-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 14px;
  background: rgba(255,255,255,.035);
}
.task-detail-backdrop { z-index: 130; }
.task-detail-modal {
  width: min(920px, calc(100vw - 28px));
  max-height: min(760px, calc(100vh - 28px));
  overflow-y: auto;
}
.task-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.task-detail-head h3 {
  margin: 0;
  font-size: 16px;
}
.task-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.task-template-shared-schedule {
  padding: 12px;
  border-block: 1px solid rgba(148, 163, 184, .14);
  background: rgba(255, 255, 255, .018);
}
.crm-list-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.crm-list-toolbar .crm-filterbar {
  flex: 1 1 440px;
  display: block;
  width: auto;
  margin-bottom: 0;
}
.crm-list-toolbar .crm-search {
  width: 100%;
}
.crm-list-actions {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}
.toolbar-actions {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.toolbar-spacer {
  flex: 1 1 auto;
}
.empty-state {
  display: grid;
  place-items: center;
  min-height: 120px;
  border: 1px dashed rgba(255,255,255,.18);
  border-radius: 16px;
  color: var(--muted);
  background: rgba(255,255,255,.025);
  text-align: center;
  padding: 18px;
}
.table-wrap { overflow-x: auto; }
.table-wrap:has(.column-filter[open]) {
  min-height: 300px;
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}
th, td {
  text-align: right;
  border-bottom: 1px solid rgba(255,255,255,.08);
  padding: 13px 10px;
  white-space: nowrap;
}
th { color: #93a1c6; font-weight: 600; background: rgba(255,255,255,.025); }
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(24,227,238,.12);
  color: #76f6ff;
  border: 1px solid rgba(24,227,238,.28);
  font-size: 12px;
}
.badge.success {
  color: #bbf7d0;
  background: rgba(34,197,94,.13);
  border-color: rgba(34,197,94,.32);
}
.badge.danger {
  color: #fecaca;
  background: rgba(239,68,68,.13);
  border-color: rgba(248,113,113,.34);
}
.my-tasks-page .my-task-priority.priority-overdue {
  color: #fecaca;
  background: rgba(239,68,68,.16);
  border-color: rgba(248,113,113,.48);
}
.my-tasks-page .my-task-priority.priority-today {
  color: #bfdbfe;
  background: rgba(59,130,246,.16);
  border-color: rgba(96,165,250,.48);
}
.my-tasks-page .my-task-priority.priority-future {
  color: #bbf7d0;
  background: rgba(34,197,94,.14);
  border-color: rgba(74,222,128,.42);
}
.my-tasks-page .my-task-status.status-done {
  color: #bbf7d0;
  background: rgba(34,197,94,.16);
  border-color: rgba(74,222,128,.46);
}
.my-tasks-page .my-task-status.status-approved {
  color: #dcfce7;
  background: rgba(21,128,61,.34);
  border-color: rgba(34,197,94,.72);
  box-shadow: inset 0 0 0 1px rgba(187,247,208,.08);
}
.status-badge.active {
  color: #bbf7d0;
  background: rgba(34, 197, 94, .13);
  border-color: rgba(34, 197, 94, .34);
}
.status-badge.inactive {
  color: #fecaca;
  background: rgba(248, 113, 113, .13);
  border-color: rgba(248, 113, 113, .36);
}
.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.department-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.department {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.045);
  border-radius: 14px;
  padding: 0 12px;
  color: #dbe5ff;
}
.department svg {
  color: var(--cyan);
}
.choice-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 8px;
}
.choice-item {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 12px;
  padding: 8px 10px;
  background: rgba(255,255,255,.04);
  color: #dbe5ff;
  cursor: pointer;
  transition:
    transform .18s ease,
    background .18s ease,
    border-color .18s ease,
    box-shadow .18s ease;
}
.choice-item:hover {
  background: rgba(255,255,255,.07);
  border-color: rgba(255,255,255,.2);
  box-shadow: 0 10px 20px rgba(0,0,0,.12);
}
.choice-item input {
  width: auto;
  accent-color: var(--magenta);
}
.profile-upload {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}
.profile-upload img,
.profile-preview img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.14);
}
.profile-placeholder {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  border: 1px dashed rgba(255,255,255,.22);
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}
.profile-upload input {
  align-self: center;
}
.profile-upload small {
  grid-column: 2;
  color: var(--muted);
}
.profile-preview {
  margin-bottom: 14px;
}
.profile-thumb {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.065);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 14px;
}
.profile-thumb-empty {
  background: linear-gradient(135deg, rgba(133,44,132,.72), rgba(24,227,238,.18));
}
.policy-list {
  display: grid;
  gap: 10px;
}
.policy-list p {
  margin: 0;
  padding: 13px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.045);
  border-radius: 14px;
  color: #dbe5ff;
}
.policy-list strong {
  font-family: var(--font-heading);
  color: #fff;
  font-weight: 100;
  text-align: justify;
}
.table-filter-heading {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.column-filter {
  position: relative;
}
.column-filter summary {
  width: 28px;
  min-width: 28px;
  min-height: 28px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 9px;
  color: #dbe5ff;
  background: rgba(255,255,255,.045);
  cursor: pointer;
  list-style: none;
}
.column-filter summary::-webkit-details-marker {
  display: none;
}
.column-filter[open] summary,
.column-filter summary:hover {
  color: #fff;
  border-color: rgba(24,227,238,.34);
  background: rgba(24,227,238,.12);
}
.column-filter summary:focus-visible {
  outline: 0;
  box-shadow:
    0 0 0 1px rgba(255,255,255,.1),
    0 0 0 3px rgba(24,227,238,.18);
}
.column-filter-menu {
  position: absolute;
  z-index: 80;
  top: calc(100% + 8px);
  right: 0;
  min-width: 170px;
  max-height: 230px;
  overflow-x: hidden;
  overflow-y: auto;
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid rgba(148,163,184,.28);
  border-radius: 14px;
  background: rgba(19,29,64,.98);
  box-shadow: 0 20px 45px rgba(0,0,0,.34);
}
.column-filter-menu button {
  width: 100%;
  justify-content: flex-start;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px;
  color: #dbe5ff;
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.6;
  text-align: right;
  background: rgba(255,255,255,.035);
  box-shadow: none;
}
.column-filter-menu button:hover {
  color: #fff;
  border-color: rgba(255,255,255,.2);
  background: rgba(255,255,255,.075);
}
.column-filter-menu button.active {
  color: #fff;
  border-color: rgba(24,227,238,.44);
  background: rgba(24,227,238,.16);
  box-shadow: inset 3px 0 0 rgba(24,227,238,.72);
}
.lov-select {
  position: relative;
  width: 100%;
}
.lov-select summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--stroke);
  border-radius: 14px;
  color: #fff;
  background: rgba(35, 46, 88, .82);
  cursor: pointer;
  list-style: none;
}
.lov-select summary::-webkit-details-marker {
  display: none;
}
.lov-select summary span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lov-select-icon {
  color: #dbe5ff;
}
.lov-select[open] summary,
.lov-select summary:hover {
  border-color: rgba(24,227,238,.34);
  background: rgba(24,227,238,.12);
}
.lov-select-menu {
  position: absolute;
  z-index: 90;
  top: calc(100% + 8px);
  right: 0;
  left: 0;
  max-height: 240px;
  overflow-y: auto;
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid rgba(148,163,184,.28);
  border-radius: 14px;
  background: rgba(19,29,64,.98);
  box-shadow: 0 20px 45px rgba(0,0,0,.34);
}
.lov-select-up .lov-select-menu {
  top: auto;
  bottom: calc(100% + 8px);
}
.payment-destination-select[open] {
  z-index: 100;
}
.payment-modal {
  width: min(1180px, calc(100vw - 32px));
}
.payment-history {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}
.payment-history h3 {
  margin: 0;
  font-size: 16px;
}
.payment-history .table-wrap {
  max-height: 300px;
  overflow: auto;
}
.invoice-payment-view > .form-grid {
  position: relative;
  z-index: 2;
}
.invoice-payment-view .payment-history {
  position: relative;
  z-index: 1;
}
.finance-page,
.finance-page .panel {
  min-width: 0;
}
.finance-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.finance-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 10px;
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, .2);
  border-radius: 6px;
  background: rgba(15, 23, 42, .2);
}
.finance-legend-item i {
  width: 10px;
  height: 10px;
  border: 2px solid currentColor;
  border-radius: 3px;
  background: color-mix(in srgb, currentColor 18%, transparent);
}
.finance-legend-item strong {
  color: inherit;
  font-size: 12px;
}
.finance-legend-item.status-paid { color: #7cfc00; }
.finance-legend-item.status-partial { color: #facc15; }
.finance-legend-item.status-unpaid { color: #fb923c; }
.finance-legend-item.status-overdue { color: #f87171; }
.finance-legend-item.recurring { color: #f0abfc; }
.finance-legend-item.recurring > .icon {
  width: 15px;
  height: 15px;
}
.finance-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding-bottom: 5px;
  overflow-x: auto;
}
.finance-tabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 12px;
  color: #b9c4df;
  border: 1px solid rgba(148, 163, 184, .24);
  border-radius: 6px;
  background: rgba(15, 23, 42, .22);
}
.finance-tabs button:hover,
.finance-tabs button.active {
  color: #fff;
  border-color: rgba(34, 211, 238, .48);
  background: rgba(8, 145, 178, .15);
}
.finance-tabs button .badge {
  min-width: 25px;
  min-height: 23px;
  padding: 0 6px;
  color: #a5f3fc;
  border-color: rgba(34, 211, 238, .28);
  background: rgba(8, 145, 178, .13);
}
.finance-tab-content {
  display: grid;
  gap: 12px;
  min-width: 0;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(148, 163, 184, .16);
}
.finance-tab-head {
  display: grid;
  grid-template-columns: auto minmax(280px, 520px);
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.finance-tab-head > h3 {
  margin: 0;
  font-size: 16px;
}
.finance-search {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 10px;
  border: 1px solid rgba(148, 163, 184, .24);
  border-radius: 6px;
  background: rgba(15, 23, 42, .22);
}
.finance-search > .icon {
  width: 18px;
  height: 18px;
  color: #67e8f9;
}
.finance-search input {
  width: 100%;
  min-height: 38px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.finance-search input:focus {
  box-shadow: none;
}
.finance-search .icon-btn {
  width: 30px;
  min-width: 30px;
  height: 30px;
  min-height: 30px;
  padding: 0;
}
@media (max-width: 720px) {
  .finance-tab-head { grid-template-columns: 1fr; }
  .finance-search { width: 100%; }
}
.finance-table-wrap {
  max-width: 100%;
}
.finance-table-wrap table {
  min-width: 1050px;
}
.finance-invoice-row td {
  transition: background .16s ease, border-color .16s ease;
}
.finance-invoice-row.status-paid td { background: rgba(124, 252, 0, .018); }
.finance-invoice-row.status-partial td { background: rgba(250, 204, 21, .018); }
.finance-invoice-row.status-unpaid td { background: rgba(251, 146, 60, .018); }
.finance-invoice-row.status-overdue td { background: rgba(248, 113, 113, .025); }
.finance-invoice-row.status-overdue .finance-invoice-amount,
.finance-invoice-row.status-overdue .finance-invoice-paid,
.finance-invoice-row.status-overdue .finance-remaining-value {
  color: #fb7185;
  font-weight: 700;
}
.finance-invoice-row.status-paid td:first-child { border-inline-start: 3px solid rgba(124, 252, 0, .72); }
.finance-invoice-row.status-partial td:first-child { border-inline-start: 3px solid rgba(250, 204, 21, .72); }
.finance-invoice-row.status-unpaid td:first-child { border-inline-start: 3px solid rgba(251, 146, 60, .72); }
.finance-invoice-row.status-overdue td:first-child { border-inline-start: 3px solid rgba(248, 113, 113, .78); }
.finance-status-badge {
  min-width: 104px;
  border-radius: 6px;
  font-weight: 700;
}
.finance-status-badge.status-paid {
  color: #7cfc00;
  border-color: rgba(124, 252, 0, .64);
  background: rgba(124, 252, 0, .1);
}
.finance-status-badge.status-partial {
  color: #facc15;
  border-color: rgba(250, 204, 21, .58);
  background: rgba(250, 204, 21, .1);
}
.finance-status-badge.status-unpaid {
  color: #fb923c;
  border-color: rgba(251, 146, 60, .6);
  background: rgba(251, 146, 60, .11);
}
.finance-status-badge.status-overdue {
  color: #f87171;
  border-color: rgba(248, 113, 113, .65);
  background: rgba(248, 113, 113, .11);
}
.finance-status-badge.status-cancelled {
  color: #94a3b8;
  border-color: rgba(148, 163, 184, .42);
  background: rgba(100, 116, 139, .13);
}
.finance-invoice-number {
  display: inline-flex;
  direction: ltr;
  unicode-bidi: plaintext;
  color: #dbeafe;
  font-weight: 700;
  align-items: center;
  gap: 5px;
}
.finance-recurring-icon {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  color: #f0abfc;
}
.finance-paged-table {
  display: grid;
  min-width: 0;
}
.finance-pagination {
  margin-top: 12px;
}
.finance-project-badge {
  max-width: 230px;
  min-height: 28px;
  white-space: normal;
  line-height: 1.55;
}
.finance-remaining-value {
  color: #f8fafc;
  white-space: nowrap;
}
.finance-customers-table table {
  min-width: 900px;
}
.finance-customer-row.has-debt td {
  background: rgba(251, 146, 60, .018);
}
.finance-customer-row.settled td {
  background: rgba(124, 252, 0, .018);
}
.finance-customer-debt {
  white-space: nowrap;
}
.finance-customer-debt.positive { color: #fb923c; }
.finance-customer-debt.settled { color: #7cfc00; }
.finance-customer-invoices-modal {
  width: min(1420px, calc(100vw - 32px));
}
.finance-customer-invoices-modal .panel-head > div {
  display: grid;
  gap: 5px;
}
.finance-customer-invoices-modal .panel-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.finance-payment-backdrop {
  z-index: 90;
}
.lov-select-menu button {
  width: 100%;
  justify-content: flex-start;
  min-height: 36px;
  padding: 7px 10px;
  border-radius: 10px;
  color: #dbe5ff;
  background: transparent;
  box-shadow: none;
}
.lov-select-menu button:hover,
.lov-select-menu button.active {
  color: #fff;
  border-color: rgba(24,227,238,.34);
  background: rgba(24,227,238,.14);
}
.due-date-overdue {
  color: #fb7185;
  font-weight: 700;
}
.customer-summary-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.customer-summary-grid p {
  display: flex;
  gap: 6px;
  align-items: center;
  min-height: 48px;
  overflow-wrap: anywhere;
}
.customer-summary-grid .summary-label {
  color: var(--muted);
  white-space: nowrap;
}
@media (max-width: 900px) {
  .customer-summary-grid {
    grid-template-columns: 1fr;
  }
}
.auth-note {
  margin-top: 14px;
}
.auth-debug-code {
  color: #83f6ff;
  font-family: var(--font-heading);
}
.timeline {
  display: grid;
  gap: 10px;
}
.timeline > div {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.timeline small {
  color: var(--muted);
}
.pipeline {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.pipeline span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.1);
  color: #dbe5ff;
}
.pipeline .active {
  background: rgba(24,227,238,.12);
  border-color: rgba(24,227,238,.34);
  color: #84f6ff;
}
.convert-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.convert-step {
  min-height: 142px;
  padding: 16px;
  border-radius: 20px;
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.1);
}
.convert-step h3 {
  margin: 10px 0;
  font-size: 16px;
}
.convert-step p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
  margin: 0;
}
.form { display: grid; gap: 12px; }
label { display: grid; gap: 7px; color: var(--muted); }
input, textarea, select {
  width: 100%;
  border: 1px solid var(--stroke);
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(255,255,255,.055);
  color: #fff;
}
select {
  min-height: 44px;
  cursor: pointer;
  color-scheme: dark;
  background-color: rgba(35, 46, 88, .82);
}
select option {
  color: #eef4ff;
  background: #182243;
}
select option:checked,
select option:hover {
  color: #fff;
  background: #263a7a;
}
select optgroup {
  color: #aeb8d8;
  background: #121a36;
}
textarea { min-height: 92px; resize: vertical; }
.crm-filterbar {
  display: grid;
  grid-template-columns: minmax(260px, 1.2fr) minmax(420px, 1.8fr);
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
}
.crm-filterbar label {
  gap: 5px;
  font-size: 12px;
}
.crm-filterbar input,
.crm-filterbar select {
  min-height: 38px;
  border-radius: 12px;
  padding: 8px 11px;
}
.crm-search {
  align-self: end;
}
.crm-filter-chips {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 10px;
}
.crm-page .table-wrap {
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px;
}
.crm-page table {
  min-width: 920px;
}
.row-actions {
  display: inline-flex;
  gap: 7px;
  align-items: center;
}
.action-group {
  padding: 4px;
  border-radius: 12px;
  background: rgba(255,255,255,.025);
}
.related-actions {
  border: 1px solid rgba(34, 211, 238, .12);
}
.primary-actions {
  border: 1px solid rgba(148, 163, 184, .12);
}
.row-actions button {
  min-height: 32px;
  padding: 0 10px;
}
.icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}
.panel button.icon-btn {
  width: 34px;
  min-width: 34px;
  min-height: 34px;
  padding: 0;
  border-radius: 11px;
}
.panel button.icon-btn.danger {
  color: #fca5a5;
  background: rgba(239, 68, 68, .12);
  border-color: rgba(248, 113, 113, .36);
}
.panel button.icon-btn.danger:not(:disabled):hover {
  color: #fecaca;
  background: rgba(239, 68, 68, .2);
  border-color: rgba(248, 113, 113, .5);
}
.icon-btn.close-icon-btn,
.panel button.icon-btn.close-icon-btn {
  color: #fda4af;
  background: rgba(190, 24, 93, .12);
  border-color: rgba(251, 113, 133, .3);
}
.icon-btn.close-icon-btn:not(:disabled):hover,
.panel button.icon-btn.close-icon-btn:not(:disabled):hover {
  color: #ffe4e6;
  background: rgba(225, 29, 72, .2);
  border-color: rgba(251, 113, 133, .48);
}
.warning {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(251, 191, 36, .36);
  color: #fde68a;
  background: rgba(251, 191, 36, .1);
}
.warning p {
  margin: 0 0 6px;
}
.warning p:last-child {
  margin-bottom: 0;
}
.warning .table-wrap {
  margin-top: 10px;
  border-color: rgba(251, 191, 36, .2);
}
.notice,
.form-errors {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 8px;
}
.notice {
  border: 1px solid rgba(34,197,94,.3);
  color: #bbf7d0;
  background: rgba(34,197,94,.10);
}
.form-errors {
  border: 1px solid rgba(248,113,113,.34);
  color: #fecaca;
  background: rgba(239,68,68,.10);
}
.form-errors p {
  margin: 0 0 6px;
}
.form-errors p:last-child {
  margin-bottom: 0;
}
.compact-message {
  margin-bottom: 0;
}
.gsc-secret-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}
.gsc-secret-control .badge {
  min-width: 82px;
  text-align: center;
}
.success {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(34, 197, 94, .32);
  color: #bbf7d0;
  background: rgba(34, 197, 94, .1);
}
.crm-hub-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: 14px;
}
.seo-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.seo-tab {
  min-height: 42px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 14px;
  padding: 0 14px;
  color: #dbe5ff;
  background: rgba(255,255,255,.045);
  cursor: pointer;
  transition:
    transform .18s ease,
    background .18s ease,
    border-color .18s ease,
    box-shadow .18s ease,
    color .18s ease;
}
.seo-tab.active,
.seo-tab:hover {
  color: #fff;
  background: linear-gradient(135deg, rgba(133,44,132,.92), rgba(24,227,238,.16));
  border-color: rgba(255,255,255,.22);
  box-shadow: 0 12px 24px rgba(133,44,132,.18);
}
.seo-subtabs {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  padding: 5px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 16px;
  background: rgba(255,255,255,.04);
}
.seo-subtab {
  min-height: 36px;
  border: 0;
  border-radius: 12px;
  padding: 0 14px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  transition:
    transform .18s ease,
    background .18s ease,
    color .18s ease,
    box-shadow .18s ease;
}
.seo-subtab.active,
.seo-subtab:hover {
  color: #fff;
  background: rgba(133,44,132,.76);
  box-shadow: 0 10px 20px rgba(133,44,132,.16);
}
.seo-tool-grid {
  display: grid;
  grid-template-columns: minmax(360px, .72fr) minmax(0, 1.28fr);
  gap: 18px;
  align-items: start;
}
.seo-site-stats-grid {
  display: grid;
  grid-template-columns: minmax(340px, .72fr) minmax(0, 1.28fr);
  gap: 18px;
  align-items: start;
  min-height: 0;
}
.settings-tabs button {
  min-height: 42px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 14px;
  padding: 0 16px;
  color: #dbe5ff;
  background: rgba(255,255,255,.045);
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.settings-tabs button.active,
.settings-tabs button:hover {
  color: #fff;
  border-color: rgba(255,255,255,.22);
  background: linear-gradient(135deg, rgba(133,44,132,.92), rgba(24,227,238,.16));
  box-shadow: 0 12px 24px rgba(133,44,132,.18);
}
.sms-main-tabs { margin: 0; }
.sms-compose-grid,
.sms-phonebook-layout {
  display: grid;
  grid-template-columns: minmax(320px, .9fr) minmax(380px, 1.1fr);
  gap: 18px;
  align-items: start;
}
.sms-compose-section,
.sms-phonebook-form {
  display: grid;
  gap: 14px;
  min-width: 0;
}
.sms-compose-section h3,
.sms-phonebook-form h3,
.sms-phonebook-card h3 {
  margin: 0;
  font-size: 16px;
}
.sms-phonebook-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.sms-contact-selector {
  display: grid;
  gap: 8px;
  min-width: 0;
}
.sms-contact-picker-field {
  display: grid;
  gap: 7px;
}
.sms-contact-picker-field > span {
  color: var(--muted);
  font-size: 13px;
}
.sms-contact-picker-trigger {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.sms-contact-picker-trigger .badge { min-width: 34px; }
.sms-contact-picker-backdrop { z-index: 140; }
.sms-contact-picker-modal {
  width: min(760px, calc(100vw - 32px));
  padding: 20px;
  overflow: hidden;
}
.sms-contact-picker-modal .modal-head > div {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.sms-contact-picker-modal .modal-head h2 { width: 100%; }
.sms-contact-picker-count { color: #67e8f9; }
.sms-contact-picker-modal .sms-contact-list {
  max-height: min(520px, 55vh);
  padding-inline-end: 5px;
}
.sms-contact-picker-actions {
  justify-content: flex-start;
  margin-top: 16px;
}
.sms-contact-list {
  max-height: 330px;
  overflow-y: auto;
  display: grid;
  align-content: start;
  gap: 6px;
  padding-inline-end: 4px;
}
.sms-contact-option {
  min-height: 52px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid rgba(148, 163, 184, .16);
  border-radius: 7px;
  background: rgba(255, 255, 255, .025);
  cursor: pointer;
}
.sms-contact-option:hover {
  border-color: rgba(24, 227, 238, .35);
  background: rgba(24, 227, 238, .045);
}
.sms-contact-option:has(input:checked) {
  border-color: rgba(24, 227, 238, .48);
  background: rgba(24, 227, 238, .08);
}
.sms-contact-option input { width: auto; accent-color: var(--magenta); }
.sms-contact-copy { min-width: 0; display: grid; gap: 3px; }
.sms-contact-copy strong,
.sms-contact-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sms-contact-copy small { color: var(--muted); }
.sms-shortcodes { display: flex; flex-wrap: wrap; gap: 7px; direction: ltr; justify-content: flex-end; }
.sms-shortcode { min-height: 32px; padding: 0 9px; font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
.sms-message-input { min-height: 190px; }
.sms-send-summary {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-block: 1px solid rgba(148, 163, 184, .16);
}
.sms-send-summary strong { color: #67e8f9; font-size: 20px; }
.sms-phonebook-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.sms-phonebook-card {
  min-width: 0;
  display: grid;
  gap: 14px;
  padding: 13px;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 8px;
  background: rgba(255, 255, 255, .025);
}
.sms-phonebook-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
@media (max-width: 920px) {
  .sms-compose-grid,
  .sms-phonebook-layout { grid-template-columns: 1fr; }
  .sms-phonebook-choice-grid,
  .sms-phonebook-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .project-info-search { width: 100%; }
}

/* Internal staff chat */
.app:has(.chat-page-root) {
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}
.content:has(.chat-page-root) {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100%;
  min-height: 0;
  overflow: hidden;
}
.content:has(.chat-page-root) #outlet,
.chat-page-root,
.chat-page {
  min-height: 0;
  height: 100%;
}
.chat-page {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.chat-shell {
  direction: rtl;
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  min-height: 0;
  height: 100%;
  flex: 1 1 auto;
  overflow: hidden;
  border: 1px solid var(--stroke);
  border-radius: 8px;
  background: rgba(11, 22, 52, .86);
  box-shadow: 0 22px 48px rgba(0, 0, 0, .22);
}
.chat-conversations {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  border-inline-end: 1px solid var(--stroke);
  background: rgba(255, 255, 255, .025);
}
.chat-conversations-head,
.chat-pane-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 66px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--stroke);
}
.chat-conversations-head {
  justify-content: space-between;
}
.chat-conversations-head > div {
  display: flex;
  gap: 6px;
}
.chat-conversations-head .icon-btn,
.chat-composer-row .icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  min-height: 38px;
  padding: 0;
  color: #eef3ff;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 8px;
  background: rgba(255, 255, 255, .045);
  box-shadow: none;
  line-height: 0;
  vertical-align: middle;
}
.chat-conversations-head .icon-btn .icon,
.chat-composer-row .icon-btn .icon {
  display: block;
  margin: 0;
}
.chat-conversations-head .icon-btn:hover,
.chat-conversations-head .icon-btn:focus-visible {
  color: #7ff5ff;
  border-color: rgba(24, 227, 238, .42);
  background: rgba(24, 227, 238, .12);
}
.chat-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 12px;
  padding: 0 10px;
  min-height: 40px;
  border: 1px solid var(--stroke);
  border-radius: 7px;
  background: rgba(255, 255, 255, .045);
}
.chat-search .icon {
  flex: 0 0 auto;
  width: 17px;
  color: #83f6ff;
}
.chat-search input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
}
.chat-conversation-list {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 8px 10px;
}
.chat-conversation-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 66px;
  margin: 0;
  padding: 8px;
  color: #e9edff;
  text-align: right;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.chat-conversation-item:hover {
  background: rgba(255, 255, 255, .05);
}
.chat-conversation-item.active {
  background: linear-gradient(90deg, rgba(143, 67, 201, .22), rgba(24, 227, 238, .1));
  box-shadow: inset -3px 0 0 #22d3ee;
}
.chat-buzz-sender-avatar {
  border: 3px solid #fb7185 !important;
  box-shadow: 0 0 0 3px rgba(225, 29, 72, .2), 0 0 22px rgba(225, 29, 72, .72);
  animation: chat-buzz-avatar-pulse 1.05s ease-in-out infinite;
}
.chat-buzz-label {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-width: 0;
  max-width: 170px;
  overflow: hidden;
  color: #fda4af;
  font-size: 10px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-buzz-label .icon { width: 12px; height: 12px; flex: 0 0 12px; }
@keyframes chat-buzz-avatar-pulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(225, 29, 72, .15), 0 0 14px rgba(225, 29, 72, .5); }
  50% { box-shadow: 0 0 0 5px rgba(225, 29, 72, .24), 0 0 28px rgba(225, 29, 72, .82); }
}
.chat-avatar {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  overflow: hidden;
  object-fit: cover;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(113, 245, 255, .5);
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #30446f, #73398d);
  font-family: var(--font-heading);
}
.chat-presence-avatar {
  position: relative;
  display: inline-flex;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
}
.chat-online-dot {
  position: absolute;
  inset-inline-start: 0;
  inset-block-end: 1px;
  width: 11px;
  height: 11px;
  border: 2px solid #101b38;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, .12);
}
.chat-group-avatar {
  color: #b8ffca;
  border-color: rgba(74, 222, 128, .5);
  background: rgba(22, 101, 52, .3);
}
.chat-group-avatar .icon {
  width: 21px;
}
.chat-conversation-copy {
  display: grid;
  min-width: 0;
  gap: 4px;
}
.chat-conversation-title {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
}
.chat-conversation-copy strong,
.chat-conversation-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-conversation-title strong { min-width: 0; }
.chat-conversation-pin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: #67e8f9;
}
.chat-conversation-pin .icon { width: 13px; height: 13px; }
.chat-online-label,
.chat-person-online,
.chat-pane-head .chat-pane-online {
  color: #4ade80;
}
.chat-online-label {
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 700;
}
.chat-conversation-copy small,
.chat-conversation-meta time {
  color: var(--muted);
  font-size: 11px;
}
.chat-conversation-meta {
  display: grid;
  justify-items: end;
  gap: 5px;
}
.chat-unread-count,
.nav-chat-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 21px;
  height: 21px;
  padding: 0 6px;
  border-radius: 11px;
  color: #071225;
  background: #5eead4;
  font-size: 11px;
  font-weight: 800;
}
.chat-unread-count {
  flex: 0 0 auto;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 50%;
  color: #fff;
  background: #e11d48;
  box-shadow: 0 0 0 3px rgba(225, 29, 72, .12);
  font-size: 10px;
  line-height: 1;
}
.nav-chat-badge {
  margin-inline-start: auto;
  color: #fff;
  background: #e11d48;
}
.sidebar-labels-hidden .nav-chat-badge {
  position: absolute;
  inset-block-start: 2px;
  inset-inline-start: 2px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  font-size: 9px;
}
.chat-list-empty,
.chat-no-messages {
  padding: 30px 16px;
  color: var(--muted);
  text-align: center;
}
.chat-pane {
  position: relative;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  background:
    linear-gradient(rgba(12, 22, 50, .92), rgba(12, 22, 50, .92)),
    radial-gradient(circle at 20% 10%, rgba(24, 227, 238, .08), transparent 35%);
}
.chat-pane.is-dragging-files::after {
  content: "فایل یا تصویر را برای ارسال رها کنید";
  position: absolute;
  inset: 10px;
  z-index: 12;
  display: grid;
  place-items: center;
  border: 2px dashed rgba(34, 211, 238, .8);
  border-radius: 10px;
  background: rgba(5, 15, 39, .78);
  color: #a5f3fc;
  font-size: 16px;
  font-weight: 700;
  pointer-events: none;
}
.chat-global-notification {
  position: fixed;
  z-index: 10050;
  inset-inline-start: 22px;
  inset-block-end: 22px;
  width: min(420px, calc(100vw - 44px));
  min-height: 82px;
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  align-items: center;
  gap: 13px;
  padding: 14px 16px;
  text-align: right;
  color: #f8fbff;
  border: 1px solid rgba(34, 211, 238, .42);
  border-radius: 8px;
  background: #102344;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .48);
  opacity: 0;
  transform: translateY(22px) scale(.97);
  transition: opacity .22s ease, transform .22s ease;
}
.chat-global-notification.visible { opacity: 1; transform: translateY(0) scale(1); }
.chat-global-notification.is-buzz {
  width: min(520px, calc(100vw - 44px));
  min-height: 112px;
  grid-template-columns: 64px minmax(0, 1fr);
  border: 2px solid #fb7185;
  background: #581426;
  box-shadow: 0 24px 70px rgba(225, 29, 72, .48);
  animation: chat-global-buzz-pulse .75s ease-in-out 4;
}
.chat-global-notification-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  color: #dffbff;
  background: rgba(34, 211, 238, .15);
  font-size: 25px;
  font-weight: 900;
}
.chat-global-notification.is-buzz .chat-global-notification-mark {
  width: 62px;
  height: 62px;
  color: #fff;
  background: #e11d48;
  font-size: 38px;
}
.chat-global-notification > span:last-child { display: grid; gap: 5px; min-width: 0; }
.chat-global-notification strong { font-size: 15px; }
.chat-global-notification small { color: #cbd5e1; font-size: 12px; }
.chat-global-notification.is-buzz strong { font-size: 20px; }
.chat-global-notification.is-buzz small { color: #ffe4e6; font-size: 14px; }
@keyframes chat-global-buzz-pulse {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(0) scale(1.035); }
}
.chat-pane > .chat-pane-head { grid-row: 1; }
.chat-pane > .chat-pinned-region { grid-row: 2; }
.chat-pane > .chat-messages { grid-row: 3; }
.chat-pane > .chat-composer { grid-row: 4; }
.chat-pane-head h2 {
  margin: 0 0 3px;
  font-size: 17px;
}
.chat-pane-identity,
.chat-pane-tools {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
}
.chat-pane-identity { flex: 1 1 auto; }
.chat-pane-tools {
  flex: 0 1 auto;
  margin-inline-start: auto;
  gap: 6px;
}
.chat-pane-tools > .icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  color: #dce8ff;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 8px;
  background: rgba(255, 255, 255, .045);
  box-shadow: none;
}
.chat-pane-tools > .icon-btn:hover,
.chat-pane-tools > .icon-btn:focus-visible,
.chat-pane-tools > .icon-btn.active {
  color: #8cf7ff;
  border-color: rgba(34, 211, 238, .42);
  background: rgba(34, 211, 238, .12);
}
.chat-pane-tools > .icon-btn .icon { width: 17px; height: 17px; margin: 0; }
.chat-pane-tools > .chat-buzz-button {
  color: #fde68a;
  border-color: rgba(250, 204, 21, .34);
}
.chat-pane-tools > .chat-buzz-button:hover,
.chat-pane-tools > .chat-buzz-button:focus-visible {
  color: #fff4b8;
  border-color: rgba(250, 204, 21, .62);
  background: rgba(250, 204, 21, .13);
}
.chat-pane-tools .chat-member-stack { margin-inline-start: 4px; }
.chat-message-search {
  display: flex;
  align-items: center;
  gap: 7px;
  width: clamp(190px, 24vw, 340px);
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid rgba(34, 211, 238, .3);
  border-radius: 8px;
  background: rgba(7, 20, 48, .92);
}
.chat-message-search .icon { width: 16px; height: 16px; color: #67e8f9; }
.chat-message-search input {
  min-width: 0;
  width: 100%;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
}
.chat-pane-head p {
  color: var(--muted);
  font-size: 12px;
}
.chat-member-stack {
  display: flex;
  margin-inline-start: auto;
  direction: ltr;
}
.chat-member-stack .chat-avatar {
  width: 30px;
  height: 30px;
  flex-basis: 30px;
  margin-left: -7px;
  border: 2px solid #111b39;
}
.chat-member-stack .chat-presence-avatar {
  width: 30px;
  height: 30px;
  flex-basis: 30px;
  margin-left: -7px;
}
.chat-member-stack .chat-presence-avatar .chat-avatar {
  margin-left: 0;
}
.chat-member-stack .chat-online-dot {
  width: 9px;
  height: 9px;
  inset-block-end: -1px;
}
.chat-pinned-region {
  direction: rtl;
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  border-bottom: 1px solid rgba(34, 211, 238, .18);
  background: rgba(10, 34, 62, .9);
}
.chat-pinned-region.empty { display: none; }
.chat-pinned-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: max-content;
  color: #67e8f9;
  font-size: 11px;
}
.chat-pinned-label .icon { width: 15px; height: 15px; }
.chat-pinned-list {
  min-width: 0;
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-block: 1px 3px;
  scrollbar-width: thin;
  scrollbar-color: rgba(34, 211, 238, .55) transparent;
}
.chat-pinned-item {
  min-width: min(270px, 55vw);
  max-width: 360px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
  align-items: center;
  gap: 4px;
  padding: 3px 4px 3px 8px;
  border: 1px solid rgba(34, 211, 238, .22);
  border-radius: 7px;
  background: rgba(255, 255, 255, .045);
}
.chat-pinned-jump {
  min-width: 0;
  display: grid;
  gap: 1px;
  padding: 2px 4px;
  color: #edf5ff;
  text-align: right;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.chat-pinned-jump:hover,
.chat-pinned-jump:focus-visible { color: #fff; background: transparent; box-shadow: none; }
.chat-pinned-jump strong,
.chat-pinned-jump span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-pinned-jump strong { color: #67e8f9; font-size: 10px; }
.chat-pinned-jump span { font-size: 11px; }
.chat-pinned-remove {
  width: 28px !important;
  height: 28px;
  min-height: 28px;
  padding: 5px !important;
  color: #aeb9d5;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.chat-messages {
  direction: ltr;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 18px clamp(12px, 3vw, 38px);
  scrollbar-gutter: stable;
  overflow-anchor: none;
}
.chat-message {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin-bottom: 12px;
}
.chat-message.mine {
  justify-content: flex-end;
}
.chat-message.theirs {
  justify-content: flex-start;
  flex-direction: row;
}
.chat-message-avatar {
  width: 30px;
  height: 30px;
  flex-basis: 30px;
}
.chat-message-stack {
  position: relative;
  display: grid;
  gap: 4px;
  max-width: min(680px, 76%);
}
.chat-message.mine .chat-message-stack {
  justify-items: end;
}
.chat-message.theirs .chat-message-stack {
  justify-items: start;
}
.chat-message-bubble {
  direction: rtl;
  text-align: right;
  display: grid;
  gap: 7px;
  width: 100%;
  max-width: 100%;
  padding: 10px 12px 7px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 8px;
  background: rgba(255, 255, 255, .065);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .12);
}
.chat-message-bubble.has-direct-reply {
  cursor: default;
}
.chat-message-bubble.has-direct-reply:hover {
  border-color: rgba(103, 232, 249, .28);
}
.chat-message.pinned .chat-message-bubble {
  box-shadow: inset 0 0 0 1px rgba(34, 211, 238, .32), 0 8px 22px rgba(0, 0, 0, .12);
}
.chat-message-highlight .chat-message-bubble {
  animation: chat-message-highlight 3.4s ease;
}
@keyframes chat-message-highlight {
  0%, 100% { box-shadow: 0 8px 22px rgba(0, 0, 0, .12); }
  35% { box-shadow: 0 0 0 3px rgba(34, 211, 238, .35), 0 8px 26px rgba(34, 211, 238, .2); }
}
.chat-message.mine .chat-message-bubble {
  border-color: rgba(34, 211, 238, .3);
  background: rgba(17, 94, 89, .48);
}
.chat-message-bubble p {
  margin: 0;
  font-size: 14px;
  line-height: 1.9;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.chat-message-link {
  direction: ltr;
  unicode-bidi: isolate;
  color: #67e8f9;
  text-decoration: underline;
  text-decoration-color: rgba(103, 232, 249, .45);
  text-underline-offset: 3px;
}
.chat-message.mine .chat-message-link {
  color: #fde68a;
  text-decoration-color: rgba(253, 230, 138, .52);
}
.chat-message.theirs .chat-message-link {
  color: #c4b5fd;
  text-decoration-color: rgba(196, 181, 253, .52);
}
.chat-message.mine .chat-message-link:hover { color: #fef3c7; }
.chat-message.theirs .chat-message-link:hover { color: #ddd6fe; }
.chat-message-sender {
  color: #77f1ff;
  font-size: 12px;
}
.chat-message-meta {
  direction: ltr;
  display: inline-flex;
  align-items: center;
  justify-self: end;
  gap: 5px;
}
.chat-message-meta small {
  color: #8f9bbb;
  font-size: 10px;
}
.chat-message-pin {
  display: inline-flex;
  color: #67e8f9;
}
.chat-message-pin .icon { width: 12px; height: 12px; }
.chat-message-menu {
  position: absolute;
  z-index: 7;
  top: auto;
  bottom: 0;
  transform: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.chat-message.mine .chat-message-menu {
  left: -47px;
}
.chat-message.theirs .chat-message-menu {
  right: -47px;
}
.chat-message-menu-trigger {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 40px !important;
  height: 40px;
  min-height: 40px;
  padding: 4px !important;
  color: #8995b4;
  border: 0 !important;
  border-radius: 7px;
  background: transparent !important;
  box-shadow: none !important;
  opacity: .62;
}
.chat-message-menu-trigger:hover,
.chat-message-menu-trigger:focus-visible {
  color: #d7e1f8;
  background: transparent !important;
  box-shadow: none !important;
  opacity: 1;
}
.chat-message-menu-trigger .icon {
  width: 30px;
  height: 30px;
  margin: 0;
}
.chat-message-actions {
  position: absolute;
  z-index: 8;
  top: auto;
  bottom: 0;
  transform: none;
  direction: rtl;
  display: grid;
  grid-auto-flow: row;
  grid-template-columns: 34px;
  align-items: center;
  justify-items: center;
  gap: 4px;
  min-width: max-content;
  padding: 4px;
  border: 1px solid rgba(148, 163, 184, .25);
  border-radius: 8px;
  background: #172243;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .32);
}
.chat-message.mine .chat-message-actions {
  right: 44px;
}
.chat-message.theirs .chat-message-actions {
  left: 44px;
}
.chat-message-actions .icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 7px;
  border-radius: 7px;
}
.chat-message-actions .icon-btn .icon {
  display: block;
  width: 18px;
  height: 18px;
  margin: 0;
}
.chat-day-separator {
  direction: rtl;
  display: grid;
  grid-template-columns: minmax(20px, 1fr) auto minmax(20px, 1fr);
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 10px 0 18px;
  color: #aeb9d5;
  font-size: 11px;
}
.chat-day-separator::before,
.chat-day-separator::after {
  content: "";
  height: 1px;
  background: rgba(148, 163, 184, .18);
}
.chat-day-separator span {
  padding: 4px 10px;
  border: 1px solid rgba(34, 211, 238, .18);
  border-radius: 999px;
  background: rgba(9, 24, 53, .88);
  unicode-bidi: isolate;
}
.chat-message-actions .icon-btn.danger {
  color: #fda4af;
  border-color: rgba(244, 63, 94, .32);
  background: rgba(127, 29, 29, .2);
}
.chat-message-actions .icon-btn.active {
  color: #67e8f9;
  border-color: rgba(34, 211, 238, .38);
  background: rgba(8, 145, 178, .2);
}
.chat-forwarded-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #67e8f9;
  font-size: 11px;
}
.chat-forwarded-label .icon {
  width: 14px;
  height: 14px;
}
.chat-reply-quote {
  display: grid;
  gap: 2px;
  width: 100%;
  min-height: 0;
  padding: 6px 9px;
  color: #dce7ff;
  text-align: right;
  border: 0;
  border-inline-start: 3px solid #22d3ee;
  border-radius: 4px;
  background: rgba(5, 18, 42, .42);
  box-shadow: none;
  cursor: pointer;
}
.chat-reply-quote:focus-visible {
  outline: 2px solid rgba(34, 211, 238, .7);
  outline-offset: 2px;
}
.chat-reply-quote strong {
  color: #67e8f9;
  font-size: 11px;
}
.chat-reply-quote span {
  overflow: hidden;
  color: #aeb9d5;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: text;
  user-select: text;
}
.chat-message-text {
  cursor: text;
  user-select: text;
}
.chat-deleted-text {
  color: #8f9bbb;
  font-style: italic;
}
.chat-message.deleted .chat-message-bubble {
  border-style: dashed;
  background: rgba(255, 255, 255, .035);
}
.chat-message-bubble time {
  color: #9ba7c9;
  font-size: 13px;
}
.chat-receipt {
  display: inline-flex;
  direction: ltr;
  align-items: center;
  color: #a7b0ca;
  font-family: Arial, sans-serif;
  font-size: 13px;
  line-height: 1;
}
.chat-receipt span {
  display: inline-block;
  width: 8px;
}
.chat-receipt.seen {
  color: #38bdf8;
}
.chat-attachment {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 8px;
  color: #eef3ff;
  text-align: right;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 8px;
  background: rgba(255, 255, 255, .045);
  box-shadow: none;
}
.chat-attachment .icon {
  color: #67e8f9;
}
.chat-attachment span {
  display: grid;
  gap: 2px;
}
.chat-attachment small {
  color: var(--muted);
}
.chat-image-attachment {
  position: relative;
  display: block;
  width: min(360px, 100%);
  min-width: 220px;
  padding: 0;
  overflow: hidden;
  color: #eef3ff;
  text-align: right;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 8px;
  background: rgba(5, 14, 34, .62);
  box-shadow: none;
}
.chat-image-attachment:disabled {
  opacity: 1;
}
.chat-image-attachment.is-ready:hover {
  border-color: rgba(103, 232, 249, .5);
  background: rgba(8, 145, 178, .1);
}
.chat-image-attachment > img {
  display: block;
  width: 100%;
  height: 210px;
  object-fit: cover;
  background: #071329;
}
.chat-image-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 150px;
  color: var(--muted);
}
.chat-image-loading .icon {
  width: 22px;
  color: #67e8f9;
}
.chat-image-caption {
  display: grid;
  gap: 2px;
  padding: 7px 9px;
}
.chat-image-caption strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-image-caption small {
  color: var(--muted);
  font-size: 10px;
}
.chat-image-backdrop {
  z-index: 260;
  padding: 18px;
}
.chat-image-modal {
  width: min(1120px, calc(100vw - 36px));
  max-height: calc(100vh - 36px);
  padding: 14px;
  overflow: hidden;
}
.chat-image-modal .modal-head {
  margin-bottom: 10px;
}
.chat-image-modal .modal-head > div:first-child {
  display: grid;
  min-width: 0;
  gap: 3px;
}
.chat-image-modal .modal-head h2 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-image-modal .modal-head small {
  color: var(--muted);
}
.chat-image-modal-actions {
  display: flex !important;
  align-items: center;
  gap: 7px !important;
}
.chat-image-stage {
  display: grid;
  place-items: center;
  min-height: 280px;
  height: min(76vh, 760px);
  overflow: auto;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 7px;
  background: rgba(2, 8, 23, .72);
}
.chat-image-stage img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.chat-image-stage.loading {
  color: var(--muted);
}
.chat-composer {
  position: relative;
  z-index: 3;
  display: grid;
  min-height: 62px;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--stroke);
  background: rgba(5, 12, 31, .75);
}
.chat-composer-context {
  direction: rtl;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-inline-start: 3px solid #22d3ee;
  border-radius: 6px;
  background: rgba(34, 211, 238, .08);
}
.chat-composer-context > .icon {
  color: #67e8f9;
}
.chat-composer-context > span {
  display: grid;
  min-width: 0;
}
.chat-composer-context strong {
  color: #67e8f9;
  font-size: 11px;
}
.chat-composer-context small {
  overflow: hidden;
  color: #aeb9d5;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-composer-context .icon-btn {
  width: 28px;
  height: 28px;
  min-height: 28px;
  padding: 5px;
}
.chat-composer-row {
  display: grid;
  grid-template-columns: 38px 38px minmax(0, 1fr) 42px;
  align-items: end;
  gap: 7px;
}
.chat-composer-text {
  width: 100%;
  min-height: 42px;
  max-height: 124px;
  overflow-y: hidden;
  resize: none;
  padding: 10px 12px;
  line-height: 1.7;
}
.chat-send-button {
  color: #fff;
  border-color: rgba(255, 255, 255, .08);
  background: linear-gradient(135deg, var(--brand), #7c5cff);
  box-shadow: 0 12px 30px rgba(133, 44, 132, .35);
}
.chat-send-button:not(:disabled):hover {
  border-color: rgba(255, 255, 255, .16);
  background: linear-gradient(135deg, #953394, #8870ff);
  box-shadow: 0 16px 34px rgba(133, 44, 132, .42);
}
.chat-emoji-picker {
  position: absolute;
  inset-inline-start: 55px;
  inset-block-end: 60px;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(8, 34px);
  gap: 4px;
  padding: 8px;
  border: 1px solid var(--stroke);
  border-radius: 8px;
  background: #182446;
  box-shadow: 0 18px 42px rgba(0, 0, 0, .38);
}
.chat-emoji-picker button {
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  box-shadow: none;
  font-family: "Segoe UI Emoji", sans-serif;
  font-size: 19px;
}
.chat-emoji-picker button:hover {
  background: rgba(255, 255, 255, .1);
}
.chat-forward-modal {
  width: min(520px, calc(100vw - 28px));
}
.chat-forward-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 11px;
  color: #cbd5e1;
  border: 1px solid rgba(34, 211, 238, .22);
  border-radius: 7px;
  background: rgba(8, 145, 178, .08);
}
.chat-forward-preview .icon {
  color: #67e8f9;
}
.chat-forward-preview span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-forward-list {
  max-height: min(440px, 56vh);
  overflow-y: auto;
}
.chat-pending-files {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chat-pending-files > span {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 3px 5px 3px 9px;
  border: 1px solid rgba(24, 227, 238, .2);
  border-radius: 6px;
  background: rgba(24, 227, 238, .07);
  font-size: 12px;
}
.chat-pending-files > span.has-image {
  padding-inline-start: 5px;
}
.chat-pending-image {
  width: 42px;
  height: 34px;
  flex: 0 0 42px;
  object-fit: cover;
  border: 1px solid rgba(103, 232, 249, .25);
  border-radius: 5px;
}
.chat-pending-files .icon-btn {
  width: 25px;
  height: 25px;
  min-height: 25px;
  padding: 0;
}
.chat-empty-pane {
  align-content: center;
  justify-items: center;
  gap: 10px;
  color: var(--muted);
  text-align: center;
}
.chat-empty-icon {
  width: 52px;
  height: 52px;
  color: #67e8f9;
}
.chat-picker-modal,
.chat-group-modal {
  width: min(620px, calc(100vw - 32px));
  max-height: min(760px, calc(100dvh - 40px));
  overflow: hidden;
}
.chat-files-modal {
  display: grid;
  grid-template-rows: auto auto minmax(160px, 1fr) auto;
  width: min(980px, calc(100vw - 32px));
  max-height: min(780px, calc(100dvh - 40px));
  overflow: hidden;
}
.chat-files-modal .modal-head > div:first-child { min-width: 0; }
.chat-files-modal .modal-head h2 { margin-bottom: 3px; }
.chat-file-filters {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-block-end: 4px;
}
.chat-file-filters button {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 7px 13px;
  border-radius: 7px;
}
.chat-file-filters button.active {
  color: #fff;
  border-color: rgba(34, 211, 238, .5);
  background: linear-gradient(135deg, rgba(13, 148, 136, .82), rgba(79, 70, 229, .72));
}
.chat-files-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 8px;
  min-height: 0;
  overflow-y: auto;
  padding-inline-end: 3px;
}
.chat-file-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 36px;
  align-items: center;
  gap: 10px;
  min-height: 76px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 8px;
  background: rgba(255, 255, 255, .035);
}
.chat-file-preview,
.chat-file-type-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  min-height: 58px;
  padding: 0;
  overflow: hidden;
  color: #7dd3fc;
  border: 1px solid rgba(125, 211, 252, .22);
  border-radius: 7px;
  background: rgba(14, 116, 144, .12);
  box-shadow: none;
}
.chat-file-preview img { width: 100%; height: 100%; object-fit: cover; }
.chat-file-type-icon .icon { width: 24px; height: 24px; }
.chat-file-card-copy { display: grid; gap: 4px; min-width: 0; }
.chat-file-card-copy strong,
.chat-file-card-copy small,
.chat-file-card-copy time {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-file-card-copy small,
.chat-file-card-copy time { color: var(--muted); font-size: 11px; }
.chat-file-card > .icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
}
.chat-group-modal {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto auto;
}
.chat-picker-search {
  width: 100%;
}
.chat-group-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}
.chat-people-list {
  display: grid;
  gap: 5px;
  min-height: 0;
  max-height: 470px;
  overflow-y: auto;
  padding-inline-end: 3px;
}
.chat-people-list > button,
.chat-people-list > label {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 58px;
  padding: 7px 9px;
  color: #fff;
  text-align: right;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 8px;
  background: rgba(255, 255, 255, .035);
  box-shadow: none;
}
.chat-people-list.selectable > label {
  grid-template-columns: auto 42px minmax(0, 1fr);
  cursor: pointer;
}
.chat-people-list > button:hover,
.chat-people-list > label:hover {
  border-color: rgba(24, 227, 238, .3);
  background: rgba(24, 227, 238, .08);
}
.chat-people-list span {
  display: grid;
  gap: 3px;
}
.chat-people-list small {
  color: var(--muted);
}
.chat-group-actions {
  justify-content: flex-start;
}

@media (max-width: 900px) {
  .app:has(.chat-page-root) {
    height: auto;
    min-height: 100dvh;
    overflow: visible;
  }
  .content:has(.chat-page-root) {
    height: auto;
    min-height: 100dvh;
    overflow: visible;
  }
  .chat-shell {
    grid-template-columns: 280px minmax(0, 1fr);
    height: min(760px, calc(100dvh - 180px));
  }
  .chat-pane-head { align-items: flex-start; flex-wrap: wrap; }
  .chat-pane-tools { width: 100%; margin-inline-start: 0; }
  .chat-message-search { flex: 1 1 180px; width: auto; }
  .chat-files-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 680px) {
  .chat-shell {
    grid-template-columns: 1fr;
    grid-template-rows: 230px minmax(0, 1fr);
    height: calc(100dvh - 185px);
  }
  .chat-conversations {
    border-inline-end: 0;
    border-bottom: 1px solid var(--stroke);
  }
  .chat-conversations-head {
    min-height: 52px;
  }
  .chat-search {
    margin-block: 6px;
  }
  .chat-message-bubble {
    max-width: 88%;
  }
  .chat-member-stack {
    display: none;
  }
  .chat-pinned-region {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 6px 10px;
  }
  .chat-pinned-item { min-width: min(250px, 76vw); }
  .chat-emoji-picker {
    inset-inline-start: 12px;
    grid-template-columns: repeat(8, minmax(26px, 1fr));
    max-width: calc(100vw - 48px);
  }
}
.site-sheet-actions {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 18px;
  background: rgba(255,255,255,.035);
}
.sheet-income-checkbox {
  display: grid;
  place-items: center;
}
.sheet-income-checkbox input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #10b981;
  cursor: pointer;
}
.site-stats-top-actions {
  direction: ltr;
  justify-content: flex-start;
  margin-top: 0;
}
.site-stats-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
  padding: 10px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  background: rgba(255,255,255,.035);
}
.site-select-button,
.site-refresh-button {
  min-height: 42px;
  white-space: nowrap;
}
.site-refresh-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.site-refresh-button .icon {
  width: 18px;
  height: 18px;
}
.site-period-field {
  display: flex;
  align-items: center;
  min-width: 132px;
}
.site-period-field .site-period-select {
  min-width: 132px;
}
.site-period-field .site-period-select summary {
  min-height: 42px;
}
.selected-site-summary {
  display: grid;
  gap: 2px;
  min-width: 210px;
  max-width: 420px;
  padding: 7px 11px;
  border: 1px solid rgba(24,227,238,.2);
  border-radius: 8px;
  background: rgba(24,227,238,.07);
  overflow: hidden;
}
.selected-site-summary strong,
.selected-site-summary small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.selected-site-summary small {
  color: var(--muted);
}
.site-toolbar-date {
  display: grid;
  gap: 3px;
  margin-inline-start: auto;
  color: var(--muted);
  font-size: 12px;
  direction: rtl;
}
.site-picker-field {
  max-width: 520px;
  justify-self: start;
  width: 100%;
  color: #dbe5ff;
}
.site-toolbar-picker {
  flex: 1 1 360px;
  width: min(520px, 100%);
  min-width: min(320px, 100%);
}
.site-toolbar-picker .site-picker-menu {
  min-width: 100%;
}
.site-toolbar-picker .site-picker-option {
  text-align: right;
}
.site-picker-combo {
  position: relative;
}
.site-picker-field input {
  min-height: 44px;
  padding-left: 46px;
  border-color: rgba(24,227,238,.22);
  background: rgba(255,255,255,.06);
}
.site-picker-field input:focus {
  border-color: rgba(24,227,238,.5);
  box-shadow: 0 0 0 3px rgba(24,227,238,.12);
}
.site-picker-toggle {
  position: absolute;
  left: 6px;
  top: 6px;
  width: 32px;
  min-height: 32px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px;
  color: #dbeafe;
  background: rgba(255,255,255,.07);
  cursor: pointer;
}
.site-picker-menu {
  position: absolute;
  z-index: 30;
  inset-inline: 0;
  top: calc(100% + 8px);
  display: none;
  max-height: 280px;
  overflow: auto;
  padding: 8px;
  border: 1px solid rgba(24,227,238,.22);
  border-radius: 16px;
  background: rgba(19, 29, 64, .98);
  box-shadow: 0 22px 50px rgba(0,0,0,.32);
}
.site-picker-combo:focus-within .site-picker-menu {
  display: grid;
  gap: 6px;
}
.site-picker-combo.is-open .site-picker-menu {
  display: grid;
  gap: 6px;
}
.site-picker-option[hidden],
.site-picker-no-result[hidden] {
  display: none !important;
}
.site-picker-option {
  display: grid;
  gap: 3px;
  width: 100%;
  min-height: 50px;
  padding: 9px 11px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: #f8fbff;
  background: transparent;
  text-align: right;
  cursor: pointer;
}
.site-picker-option:hover,
.site-picker-option.active {
  border-color: rgba(24,227,238,.25);
  background: rgba(24,227,238,.1);
}
.site-picker-option small,
.site-picker-empty {
  color: var(--muted);
}
.site-picker-empty {
  padding: 12px;
  text-align: center;
}
.site-stats-modal {
  width: min(720px, calc(100vw - 32px));
  padding: 20px;
}
.site-picker-modal {
  width: min(880px, calc(100vw - 32px));
}
.searchable-picker > input[type="search"] {
  margin-bottom: 12px;
}
.picker-result-list {
  display: grid;
  gap: 7px;
  max-height: min(520px, 62vh);
  overflow-y: auto;
  padding: 2px 2px 2px 6px;
}
.picker-result-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 58px;
  padding: 7px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  background: rgba(255,255,255,.035);
}
.site-picker-row {
  grid-template-columns: minmax(0, 1fr) 34px 34px;
  gap: 10px;
  min-height: 70px;
  padding: 8px;
}
.site-picker-row .picker-result-main {
  min-height: 52px;
  padding: 8px 12px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 7px;
  background: rgba(255,255,255,.025);
}
.site-picker-row.active .picker-result-main {
  border-color: rgba(24,227,238,.28);
  background: linear-gradient(90deg, rgba(133,44,132,.72), rgba(124,92,255,.78));
}
.site-picker-row > .icon-btn {
  align-self: center;
}
.picker-result-row[hidden] {
  display: none !important;
}
.picker-result-row:hover,
.picker-result-row.active {
  border-color: rgba(24,227,238,.35);
  background: rgba(24,227,238,.08);
}
.picker-result-main {
  display: grid;
  gap: 4px;
  min-width: 0;
  width: 100%;
  padding: 5px 7px;
  border: 0;
  color: var(--text);
  background: transparent;
  text-align: right;
}
.panel button.picker-result-row.picker-result-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  padding: 11px 14px;
  border: 1px solid rgba(255,255,255,.1);
  color: var(--text);
  background: rgba(255,255,255,.035);
  box-shadow: none;
}
.panel button.picker-result-row.picker-result-main:not(:disabled):hover {
  border-color: rgba(24,227,238,.35);
  background: rgba(24,227,238,.08);
  box-shadow: none;
}
.picker-result-main strong,
.picker-result-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.picker-result-main small {
  color: var(--muted);
}
.source-picker-field,
.gsc-property-control {
  display: grid;
  gap: 9px;
}
.source-picker-field > span,
.selected-source-label {
  color: var(--muted);
  font-size: 13px;
}
.source-picker-button {
  justify-self: start;
}
.site-editor-modal {
  width: min(820px, calc(100vw - 32px));
  padding: 22px;
}
.site-editor-form {
  gap: 14px;
}
.site-form-section {
  min-width: 0;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  background: rgba(255,255,255,.03);
}
.site-form-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.site-form-section-label {
  color: #dbe5ff;
  font-family: var(--font-heading);
  font-size: 13px;
}
.site-form-section-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.site-form-section .source-picker-button {
  justify-self: auto;
}
.site-form-section .selected-source-row {
  min-height: 54px;
  align-content: center;
}
.site-editor-actions {
  margin-top: 2px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.selected-source-row {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(24,227,238,.2);
  border-radius: 8px;
  background: rgba(24,227,238,.06);
}
.selected-source-row strong,
.selected-source-row small {
  overflow-wrap: anywhere;
}
.selected-source-row small {
  color: var(--muted);
}
.site-stats-list-modal {
  width: min(1080px, calc(100vw - 32px));
}
.excel-import-modal {
  width: min(860px, calc(100vw - 32px));
  max-height: min(760px, calc(100vh - 32px));
  overflow-y: auto;
}
.excel-import-modal .modal-head > div:first-child {
  display: grid;
  gap: 4px;
}
.excel-import-modal .modal-head p {
  margin: 0;
}
.panel button.excel-file-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  border: 1px dashed rgba(24,227,238,.38);
  background: rgba(24,227,238,.06);
  box-shadow: none;
}
.panel button.excel-file-button:not(:disabled):hover {
  border-color: rgba(24,227,238,.65);
  background: rgba(24,227,238,.1);
  box-shadow: none;
}
.excel-import-summary {
  display: grid;
  gap: 10px;
}
.excel-import-file {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  background: rgba(255,255,255,.035);
}
.excel-import-file span {
  color: var(--muted);
}
.excel-sheet-choice-list {
  display: grid;
  gap: 7px;
  max-height: 360px;
  overflow-y: auto;
  padding-inline-end: 4px;
}
.excel-sheet-choice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  background: rgba(255,255,255,.03);
  cursor: pointer;
}
.excel-sheet-choice.selected {
  border-color: rgba(24,227,238,.32);
  background: rgba(24,227,238,.07);
}
.excel-sheet-choice input {
  width: 18px;
  height: 18px;
  accent-color: #16c7d1;
}
.excel-sheet-choice-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.excel-sheet-choice-main strong,
.excel-sheet-choice-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.excel-sheet-choice-main small,
.excel-sheet-target {
  color: var(--muted);
  font-size: 12px;
}
.excel-sheet-target {
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(255,255,255,.05);
  white-space: nowrap;
}
.excel-import-warning {
  padding: 10px 12px;
  border: 1px solid rgba(245,158,11,.25);
  border-radius: 8px;
  color: #fbd38d;
  background: rgba(245,158,11,.07);
  font-size: 13px;
}
.excel-import-actions {
  margin-top: 2px;
}
@media (max-width: 620px) {
  .excel-import-file {
    align-items: flex-start;
    flex-direction: column;
  }
  .excel-sheet-choice {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .excel-sheet-target {
    grid-column: 2;
    justify-self: start;
  }
}
.site-stats-workbook-panel {
  display: grid;
  grid-template-rows: auto auto;
  align-content: start;
  max-height: calc(100dvh - 150px);
  min-height: 0;
  overflow: hidden;
}
.content:has(.site-stats-page) {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}
.content:has(.site-stats-page) > * {
  min-height: 0;
}
.seo-tools-page:has(> .site-stats-page) {
  grid-template-rows: auto minmax(0, 1fr);
  height: 100%;
  min-height: 0;
  overflow: hidden;
}
.site-stats-page {
  grid-template-rows: minmax(0, 1fr);
  height: 100%;
  min-height: 0;
  overflow: hidden;
}
.site-stats-page.has-notice {
  grid-template-rows: auto minmax(0, 1fr);
}
.site-stats-page > .site-stats-workbook-panel {
  height: 100%;
  max-height: none;
}
.site-workbook {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  align-content: start;
  max-height: calc(100dvh - 220px);
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  background: #fff;
  color: #111827;
  box-shadow: 0 18px 38px rgba(0,0,0,.22);
  direction: ltr;
}
.site-sheet-tabs {
  display: flex;
  gap: 0;
  overflow-x: auto;
  padding: 8px 10px 0;
  background: #eef2f7;
  border-bottom: 1px solid #d6deea;
  direction: ltr;
}
.site-sheet-tabs button {
  min-height: 36px;
  border: 0;
  border-inline-end: 1px solid #d6deea;
  padding: 0 18px;
  color: #334155;
  background: #e8edf5;
  cursor: pointer;
  border-radius: 10px 10px 0 0;
}
.site-sheet-tabs button.active,
.site-sheet-tabs button:hover {
  color: #0f172a;
  background: #fff;
  box-shadow: inset 0 -3px 0 #22c55e;
}
.site-sheet-tabs button.sheet-tab-layer-1,
.site-sheet-tabs button.sheet-tab-layer-1.active,
.site-sheet-tabs button.sheet-tab-layer-1:hover {
  color: #fff;
  background: #7e22ce;
}
.site-sheet-tabs button.sheet-tab-layer-2,
.site-sheet-tabs button.sheet-tab-layer-2.active,
.site-sheet-tabs button.sheet-tab-layer-2:hover {
  color: #fff;
  background: #2563eb;
}
.site-sheet-tabs button.sheet-tab-layer-3,
.site-sheet-tabs button.sheet-tab-layer-3.active,
.site-sheet-tabs button.sheet-tab-layer-3:hover {
  color: #fff;
  background: #16a34a;
}
.site-sheet-tabs button.sheet-tab-layer-4,
.site-sheet-tabs button.sheet-tab-layer-4.active,
.site-sheet-tabs button.sheet-tab-layer-4:hover {
  color: #fff;
  background: #ec4899;
}
.site-sheet-tabs button.sheet-tab-off-page,
.site-sheet-tabs button.sheet-tab-off-page.active,
.site-sheet-tabs button.sheet-tab-off-page:hover {
  color: #fff;
  background: #172554;
}
.site-sheet-tabs button.sheet-tab-comments,
.site-sheet-tabs button.sheet-tab-comments.active,
.site-sheet-tabs button.sheet-tab-comments:hover {
  color: #422006;
  background: #facc15;
}
.site-sheet-tabs button.sheet-tab-regex-3,
.site-sheet-tabs button.sheet-tab-regex-3.active,
.site-sheet-tabs button.sheet-tab-regex-3:hover {
  color: #fff;
  background: #16a34a;
}
.site-sheet-tabs button.sheet-tab-result-1,
.site-sheet-tabs button.sheet-tab-result-1.active,
.site-sheet-tabs button.sheet-tab-result-1:hover {
  color: #fff;
  background: linear-gradient(to right, #7e22ce 0%, #dc2626 100%);
}
.site-sheet-tabs button.sheet-tab-result-2,
.site-sheet-tabs button.sheet-tab-result-2.active,
.site-sheet-tabs button.sheet-tab-result-2:hover {
  color: #fff;
  background: linear-gradient(to right, #2563eb 0%, #dc2626 100%);
}
.site-sheet-tabs button.sheet-tab-result-3,
.site-sheet-tabs button.sheet-tab-result-3.active,
.site-sheet-tabs button.sheet-tab-result-3:hover {
  color: #fff;
  background: linear-gradient(to right, #16a34a 0%, #dc2626 100%);
}
.site-sheet-tabs button.sheet-tab-all-result,
.site-sheet-tabs button.sheet-tab-all-result.active,
.site-sheet-tabs button.sheet-tab-all-result:hover {
  color: #fff;
  background: #dc2626;
}
.site-sheet-tabs button.sheet-tab-income,
.site-sheet-tabs button.sheet-tab-income.active,
.site-sheet-tabs button.sheet-tab-income:hover {
  color: #fff;
  background: #0f766e;
}
.site-sheet-tabs button.active {
  box-shadow: inset 0 -3px 0 rgba(255,255,255,.9), inset 0 0 0 1px rgba(255,255,255,.35);
}
.site-sheet-url-preview {
  direction: rtl;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 34px;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 6px 10px;
  color: #64748b;
  background: #f8fafc;
  border-bottom: 1px solid #d6deea;
}
.site-sheet-url-label {
  color: #475569;
  font-family: var(--font-heading);
  white-space: nowrap;
}
.site-sheet-url-value {
  direction: ltr;
  min-width: 0;
  max-height: 58px;
  overflow: auto;
  padding: 5px 8px;
  color: #64748b;
  background: #fff;
  border: 1px solid #dbe3ef;
  border-radius: 6px;
  font-family: Consolas, "Courier New", monospace;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
  user-select: text;
}
.site-sheet-url-preview.has-url .site-sheet-url-value {
  color: #1d4ed8;
  background: #eff6ff;
  border-color: #93c5fd;
}
.site-sheet-url-preview .icon-btn {
  width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  color: #1d4ed8;
  background: #fff;
  border: 1px solid #cbd5e1;
  box-shadow: none;
}
.site-sheet-url-preview .icon-btn.is-copied {
  color: #047857;
  border-color: #34d399;
  background: #ecfdf5;
}
.site-sheet-url-preview .icon-btn:disabled {
  color: #94a3b8;
  cursor: not-allowed;
  opacity: .65;
}
.site-sheet-grid {
  display: grid;
  grid-auto-flow: row;
  align-content: start;
  min-width: 100%;
  min-height: 0;
  max-height: calc(100dvh - 346px);
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
  background: #fff;
}
.site-sheet-grid.result-sheet {
  max-height: calc(100dvh - 346px);
}

.site-income-sheet {
  min-width: 0;
  min-height: 0;
  max-height: calc(100dvh - 346px);
  overflow: hidden;
  background: #f8fafc;
  direction: rtl;
}
.site-income-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 54px;
  padding: 10px 14px;
  color: #0f172a;
  border-bottom: 1px solid #dbe3ef;
}
.income-partial-note {
  color: #9a3412;
  font-size: 13px;
}
.site-income-table-wrap {
  max-height: calc(100dvh - 400px);
  overflow: auto;
  overscroll-behavior: contain;
  direction: rtl;
}
.site-income-table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  color: #172033;
  background: #fff;
}
.site-income-table th,
.site-income-table td {
  min-width: 105px;
  height: 27px;
  padding: 2px 8px;
  border-inline-end: 1px solid #dbe3ef;
  border-bottom: 1px solid #dbe3ef;
  font-size: 12px;
  line-height: 1.35;
  text-align: center;
  white-space: nowrap;
}
.site-income-table .income-indicator-cell {
  position: sticky;
  right: 0;
  z-index: 3;
  min-width: 190px;
  text-align: right;
  background: #eef2f7;
}
.site-income-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  color: #fff;
  background: #0f766e;
}
.site-income-table thead tr:nth-child(2) th { top: 27px; background: #115e59; }
.site-income-table thead .income-indicator-cell { z-index: 4; background: #134e4a; }
.site-income-table .income-amount-cell {
  direction: ltr;
  unicode-bidi: isolate;
  font-weight: 700;
}
.site-income-table .positive,
.income-table .positive { color: #15803d; }
.site-income-table .negative,
.income-table .negative { color: #dc2626; }
.site-income-table .income-total-row th,
.site-income-table .income-total-row td { font-weight: 800; background: #ecfdf5; }
.site-income-table .income-final-row th,
.site-income-table .income-final-row td { font-weight: 900; background: #d1fae5; }
.income-adjustment-notices {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid #cbd5e1;
  background: #f8fafc;
}
.income-adjustment-notice {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid #f59e0b;
  border-radius: 6px;
  color: #92400e;
  background: #fffbeb;
  font-size: 12px;
}
.income-adjustment-notice.first-positive-delay {
  border-color: #ef4444;
  color: #991b1b;
  background: #fef2f2;
}
.income-adjustment-notice.gsc-observation-period {
  border-color: #0ea5e9;
  color: #075985;
  background: #f0f9ff;
}
.site-income-table .income-adjusted { cursor: help; }

.site-personnel-fields,
.seo-income-coefficient-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.personnel-percentage-list { display: grid; gap: 10px; }
.panel:has(.personnel-percentage-list) { overflow: visible; }
.personnel-percentage-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 150px 44px;
  align-items: center;
  gap: 10px;
}
.personnel-percentage-row:has(.lov-select[open]) { z-index: 100; }
.percentage-input { display: flex; align-items: center; gap: 7px; direction: ltr; }
.percentage-input input { min-width: 0; }

.income-page { min-width: 0; }
.income-view-tabs {
  margin: 0;
}
.income-year-toolbar,
.income-detail-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}
.income-year-toolbar details { min-width: 150px; }
.income-detail-toolbar details { min-width: 220px; }
.income-percent-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 9px 12px;
  color: #67e8f9;
  border: 1px solid rgba(34,211,238,.35);
  border-radius: 8px;
  background: rgba(8,145,178,.12);
}
.income-table-wrap {
  max-width: 100%;
  overflow: auto;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
}
.income-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
}
.income-table th,
.income-table td {
  min-width: 124px;
  padding: 13px 12px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  text-align: center;
  white-space: nowrap;
}
.income-table th:first-child { min-width: 190px; text-align: right; }
.income-table thead th { color: var(--muted); background: rgba(255,255,255,.035); }
.income-table tbody tr:last-child th,
.income-table tbody tr:last-child td { border-bottom: 0; }
.income-year-total { color: #67e8f9; font-weight: 800; }
.income-site-url { direction: ltr; text-align: left !important; }

.numeric-value,
input[type="number"] {
  direction: ltr;
  unicode-bidi: isolate;
  font-variant-numeric: tabular-nums;
}
input[type="number"] {
  text-align: right;
}

@media (max-width: 760px) {
  .site-personnel-fields,
  .seo-income-coefficient-grid,
  .rank-trend-summary { grid-template-columns: 1fr; }
  .wallboard-slide-picker { grid-template-columns: 1fr; }
  .wallboard-remote-heading { align-items: flex-start; flex-direction: column; }
  .site-form-section-head {
    align-items: stretch;
    flex-direction: column;
  }
  .site-form-section-actions {
    width: 100%;
  }
  .site-form-section-actions button,
  .site-form-section-head > button {
    flex: 1;
  }
  .personnel-percentage-row { grid-template-columns: minmax(0, 1fr) 110px 44px; }
  .site-income-sheet-head { align-items: flex-start; flex-direction: column; }
}
.sheet-column-header-row {
  position: sticky;
  top: 0;
  z-index: 20;
}
.sheet-title-row,
.sheet-month-header-row,
.sheet-metric-header-row {
  position: sticky;
  z-index: 18;
}
.sheet-title-row,
.sheet-month-header-row {
  top: 27px;
}
.sheet-metric-header-row {
  top: 54px;
}
.site-sheet-row {
  display: grid;
  width: max-content;
  min-width: 100%;
  min-height: 27px;
}
.layer-sheet,
.custom-rtl-sheet {
  direction: rtl;
}
.regex-sheet,
.result-sheet,
.all-result-sheet {
  direction: ltr;
}
.site-sheet-cell {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  min-height: 27px;
  padding: 2px 8px;
  border-right: 1px solid #dadce0;
  border-bottom: 1px solid #dadce0;
  overflow: hidden;
  font-size: 12px;
  line-height: 1.35;
  white-space: nowrap;
  background: #fff;
  justify-content: center;
  text-align: center;
}
.site-sheet-grid .site-sheet-cell {
  justify-content: center !important;
  text-align: center !important;
}
.site-sheet-cell.sheet-editable {
  cursor: cell;
}
.site-sheet-cell.sheet-editable.is-editing {
  cursor: text;
  background: #fff !important;
  box-shadow: inset 0 0 0 2px #1a73e8;
}
.site-sheet-cell.sheet-editable[contenteditable="plaintext-only"] {
  -webkit-user-modify: read-write-plaintext-only;
  user-select: text;
  white-space: nowrap;
}
.site-sheet-cell.sheet-editable:empty::before {
  content: "";
}
.site-sheet-cell.sheet-rank-trend-cell { padding: 1px 5px; }
.site-sheet-cell.sheet-rank-trend-cell.empty { color: #94a3b8; }
.sheet-rank-trend {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  align-items: center;
  gap: 5px;
  width: 100%;
  min-width: 0;
  direction: ltr;
}
button.sheet-rank-trend {
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: inherit;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
}
button.sheet-rank-trend:hover,
button.sheet-rank-trend:focus-visible {
  border: 0;
  background: rgba(6, 182, 212, .08);
  box-shadow: inset 0 0 0 1px rgba(8, 145, 178, .35);
}
.sheet-rank-trend.empty {
  display: flex;
  justify-content: center;
}
.rank-trend-empty-label {
  color: #0e7490;
  font-size: 10px;
  font-weight: 700;
}
.sheet-rank-trend-chart {
  display: block;
  width: 78px;
  height: 22px;
  overflow: visible;
}
.sheet-rank-trend-chart circle {
  cursor: help;
  stroke: #cffafe;
  stroke-width: .45;
}
.sheet-rank-trend small {
  overflow: hidden;
  color: #0f766e;
  font-size: 10px;
  font-weight: 700;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  direction: rtl;
  cursor: help;
}
.sheet-reference-count {
  color: #0f766e;
  font-weight: 800;
}
.rank-trend-modal {
  width: min(1240px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  overflow: auto;
}
.rank-trend-modal .modal-head h2,
.rank-trend-modal .modal-head p { margin: 0; }
.rank-trend-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.rank-trend-detail-chart-wrap {
  padding: 10px;
  overflow-x: auto;
  border: 1px solid rgba(148, 163, 184, .2);
  border-radius: 8px;
  background: #f8fafc;
}
.rank-trend-detail-chart {
  display: block;
  width: 100%;
  min-width: 820px;
  height: auto;
}
.rank-grid-line {
  stroke: #dbe3ef;
  stroke-width: 1;
}
.rank-axis-label,
.rank-axis-date {
  fill: #475569;
  font-family: var(--font-body);
  font-size: 11px;
}
.rank-trend-line {
  fill: none;
  stroke: #0891b2;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.rank-trend-point {
  fill: #06b6d4;
  stroke: #ecfeff;
  stroke-width: 2;
  cursor: help;
}
.rank-trend-point:hover {
  fill: #7e22ce;
  stroke: #f3e8ff;
}
.rank-trend-modal > .table-wrap {
  max-height: 280px;
  overflow: auto;
}
.site-sheet-cell.sheet-date-cell {
  padding: 2px 8px;
  cursor: text;
}
.site-sheet-cell.sheet-date-cell.is-invalid {
  color: #b91c1c;
  background: rgba(239, 68, 68, .08);
  box-shadow: inset 0 0 0 2px #ef4444;
}
.site-sheet-cell.sheet-note-reference {
  padding: 0 4px;
}
.sheet-note-reference-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 100%;
  min-width: 0;
}
.panel button.sheet-note-link,
.panel button.sheet-note-edit {
  min-width: 0;
  min-height: 22px;
  padding: 2px 5px;
  border: 0;
  border-radius: 4px;
  color: #1d4ed8;
  background: transparent;
  box-shadow: none;
  transform: none;
}
.panel button.sheet-note-link {
  overflow: hidden;
  text-decoration: underline;
  text-overflow: ellipsis;
}
.panel button.sheet-note-edit {
  width: 22px;
  flex: 0 0 22px;
  color: #475569;
}
.sheet-note-edit svg {
  width: 13px;
  height: 13px;
}
.panel button.sheet-note-link:not(.ghost):not(.danger):not(:disabled):hover,
.panel button.sheet-note-edit:not(.ghost):not(.danger):not(:disabled):hover {
  color: #0f172a;
  background: #dbeafe;
  border: 0;
  box-shadow: none;
  transform: none;
}
.site-sheet-cell.sheet-row-selector,
.site-sheet-cell.sheet-column-selector {
  justify-content: center;
  text-align: center;
  color: #475569;
  background: #f1f5f9;
  font-weight: 800;
  cursor: pointer;
  user-select: none;
}
.site-sheet-cell.sheet-column-selector {
  position: relative;
  overflow: visible;
  padding: 0;
}
.sheet-column-heading {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  min-height: 28px;
  padding: 2px 8px;
}
.sheet-column-heading > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
}
.sheet-column-resizer {
  position: absolute;
  inset-block: 0;
  inset-inline-end: -6px;
  z-index: 8;
  width: 12px;
  cursor: col-resize;
  touch-action: none;
}
.sheet-column-resizer::after {
  content: "";
  position: absolute;
  inset-block: 4px;
  inset-inline-start: 5px;
  width: 2px;
  border-radius: 2px;
  background: transparent;
}
.sheet-column-resizer:hover::after,
body.is-resizing-sheet-column .sheet-column-resizer::after {
  background: #2563eb;
}
body.is-resizing-sheet-column,
body.is-resizing-sheet-column * {
  cursor: col-resize !important;
  user-select: none !important;
}
.site-sheet-cell.sheet-row-selector {
  position: sticky;
  left: 0;
  z-index: 4;
  border-left: 1px solid #dadce0;
}
.layer-sheet .site-sheet-cell.sheet-row-selector,
.custom-rtl-sheet .site-sheet-cell.sheet-row-selector {
  right: 0;
  left: auto;
}
.site-sheet-cell.sheet-frozen-column {
  position: sticky;
  z-index: 3;
}
.site-sheet-row:not(.sheet-column-header-row):not(.sheet-title-row):not(.sheet-month-header-row):not(.sheet-metric-header-row) .site-sheet-cell.sheet-frozen-column {
  background: #fff;
}
.layer-sheet .site-sheet-cell.sheet-frozen-column-primary {
  right: 44px;
  left: auto;
}
.layer-sheet .site-sheet-cell.sheet-frozen-column-secondary {
  right: calc(44px + var(--sheet-first-column-width, 150px));
  left: auto;
  box-shadow: -2px 0 0 rgba(148,163,184,.2);
}
.layer-sheet .site-sheet-cell.sheet-frozen-column-tertiary {
  right: calc(44px + var(--sheet-first-column-width, 150px) + var(--sheet-second-column-width, 72px));
  left: auto;
  box-shadow: -2px 0 0 rgba(148,163,184,.28);
}
.layer-sheet:not(.layer-sheet-4) .site-sheet-cell.sheet-frozen-column-secondary {
  box-shadow: -2px 0 0 rgba(148,163,184,.28);
}
.result-sheet .site-sheet-cell.sheet-frozen-column-primary {
  left: 44px;
  box-shadow: 2px 0 0 rgba(148,163,184,.28);
}
.result-sheet .site-sheet-cell.sheet-frozen-column-secondary {
  left: calc(44px + var(--sheet-first-column-width, 190px));
  box-shadow: 2px 0 0 rgba(148,163,184,.28);
}
.sheet-column-header-row .site-sheet-cell.sheet-frozen-column,
.sheet-title-row .site-sheet-cell.sheet-frozen-column,
.sheet-month-header-row .site-sheet-cell.sheet-frozen-column,
.sheet-metric-header-row .site-sheet-cell.sheet-frozen-column {
  z-index: 22;
}
.sheet-column-header-row .site-sheet-cell {
  background: #f8fafc;
}
.sheet-column-header-row .site-sheet-cell.sheet-row-selector {
  background: #e2e8f0;
}
.site-sheet-cell.sheet-column-selector:hover,
.site-sheet-cell.sheet-row-selector:hover {
  color: #0f172a;
  background: #dbeafe;
}
.site-sheet-cell.selected-sheet-cell {
  background: #dbeafe !important;
  box-shadow: inset 0 0 0 1px #2563eb;
}
.site-sheet-cell:focus {
  outline: 2px solid #1a73e8;
  outline-offset: -2px;
}
.layer-sheet .site-sheet-cell,
.custom-rtl-sheet .site-sheet-cell {
  direction: rtl;
  text-align: right;
  justify-content: flex-start;
}
.regex-sheet .site-sheet-cell,
.result-sheet .site-sheet-cell,
.all-result-sheet .site-sheet-cell {
  text-align: left;
}
.site-sheet-cell.wide {
  min-width: 0;
}
.site-sheet-cell.url-head {
  color: #fff;
  background: #5f6368;
  font-weight: 700;
  text-decoration: underline;
}
.site-sheet-cell.result-head {
  justify-content: center;
  color: #fff;
  background: linear-gradient(90deg, #f2a3f0, #f326dd);
  font-weight: 800;
}
.site-sheet-cell.sheet-head {
  color: #0f172a;
  background: #dbeafe;
  font-weight: 800;
}
.imported-sheet .site-sheet-cell.imported-sheet-head {
  color: #fff;
  background: #5f6368;
  font-weight: 800;
}
.imported-sheet .site-sheet-cell {
  direction: rtl;
  text-align: right;
  justify-content: flex-start;
}
.layer-sheet .site-sheet-cell.sheet-head {
  color: #fff;
  background: #5f6368;
}
.layer-sheet-1 .sheet-column-header-row .site-sheet-cell {
  color: #fff;
  background: #7e22ce;
}
.layer-sheet-2 .sheet-column-header-row .site-sheet-cell {
  color: #fff;
  background: #2563eb;
}
.layer-sheet-3 .sheet-column-header-row .site-sheet-cell {
  color: #fff;
  background: #16a34a;
}
.layer-sheet-4 .sheet-column-header-row .site-sheet-cell {
  color: #fff;
  background: #ec4899;
}
.custom-sheet-off-page .sheet-column-header-row .site-sheet-cell {
  color: #fff;
  background: #172554;
}
.custom-sheet-comments .sheet-column-header-row .site-sheet-cell {
  color: #422006;
  background: #facc15;
}
.site-sheet-cell.base-head {
  background: #e2e8f0;
}
.site-sheet-cell.month-head,
.site-sheet-cell.month-fill {
  justify-content: center;
  color: #fff;
  background: linear-gradient(90deg, #f59be9, #f521cf);
  font-weight: 900;
}
.site-sheet-cell.month-fill {
  color: transparent;
}
.site-sheet-cell.layer-label {
  justify-content: center;
  color: #fff;
  font-weight: 900;
  text-align: center;
}
.site-sheet-cell.merged-empty {
  color: transparent;
}
.site-sheet-cell.layer-one { background: #a100ff; }
.site-sheet-cell.layer-two { background: #3b82f6; }
.site-sheet-cell.layer-three { background: #84cc16; }
.site-sheet-cell.layer-total { background: #ef1010; }
.site-sheet-cell.metric-label {
  justify-content: center;
  color: #fff;
  font-weight: 800;
}
.site-sheet-cell.metric-click { background: #2563eb; }
.site-sheet-cell.metric-impression { background: #9333ea; }
.site-sheet-cell.metric-ctr { background: #059669; }
.site-sheet-cell.metric-position { background: #f97316; }
.site-sheet-cell.number-cell {
  justify-content: center;
  font-variant-numeric: tabular-nums;
}
.site-sheet-cell.empty-sheet-row {
  grid-column: 1 / -1;
  min-width: 100%;
  color: #64748b;
  background: rgba(241,245,249,.88);
}
.sheet-input {
  width: 100%;
  min-height: 22px;
  border: 0;
  outline: 0;
  padding: 0;
  color: #111827;
  background: transparent;
  font: inherit;
}
.sheet-input:focus {
  background: #fff;
  box-shadow: inset 0 0 0 2px #1a73e8;
}
.site-sheet-cell .ghost {
  min-height: 22px;
  padding: 2px 10px;
  font-size: 11px;
}
.sheet-command-bar {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 8px 10px;
  background: #eef2f7;
  border-bottom: 1px solid #d6deea;
}
.sheet-command-bar .ghost {
  min-height: 30px;
  padding: 4px 14px;
  color: #334155;
  background: #fff;
  border: 1px solid #cbd5e1;
  box-shadow: none;
}
.sheet-command-bar .ghost:disabled {
  opacity: .45;
  cursor: not-allowed;
}
.site-workbook .url-text {
  color: #1d4ed8;
}
.seo-anchor-list {
  display: grid;
  gap: 10px;
}
.seo-anchor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.seo-anchor-head strong {
  font-family: var(--font-heading);
  color: #fff;
}
.seo-anchor-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) auto;
  gap: 10px;
  align-items: end;
  padding: 10px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 16px;
  background: rgba(255,255,255,.035);
}
.seo-anchor-row button {
  min-height: 44px;
}
.seo-html-input {
  min-height: 240px;
  direction: ltr;
  text-align: left;
  font-family: Consolas, "Courier New", monospace;
  line-height: 1.55;
}
.seo-report-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.seo-result-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.seo-result-metric {
  min-height: 84px;
  display: grid;
  align-content: center;
  gap: 6px;
  border-radius: 18px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.14);
}
.seo-result-metric strong {
  font-family: var(--font-heading);
  font-size: 30px;
  line-height: 1;
}
.seo-result-metric span {
  color: var(--muted);
}
.seo-result-metric.passed {
  color: #bbf7d0;
  background: linear-gradient(135deg, rgba(34,197,94,.18), rgba(255,255,255,.045));
  border-color: rgba(34,197,94,.34);
}
.seo-result-metric.failed {
  color: #fecaca;
  background: linear-gradient(135deg, rgba(248,113,113,.18), rgba(255,255,255,.045));
  border-color: rgba(248,113,113,.36);
}
.seo-check-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  min-width: 86px;
  border-radius: 999px;
  padding: 0 10px;
  font-family: var(--font-heading);
  font-size: 12px;
  border: 1px solid transparent;
}
.seo-check-status.passed {
  color: #bbf7d0;
  background: rgba(34,197,94,.13);
  border-color: rgba(34,197,94,.34);
}
.seo-check-status.failed {
  color: #fecaca;
  background: rgba(248,113,113,.13);
  border-color: rgba(248,113,113,.36);
}
.seo-check-message {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.seo-check-message button {
  min-height: 30px;
  padding: 0 10px;
}
.seo-image-evidence-modal {
  width: min(980px, calc(100vw - 32px));
  padding: 20px;
}
.seo-image-evidence-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
}
.seo-image-evidence-card {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 16px;
  background: rgba(255,255,255,.04);
}
.seo-image-evidence-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  border-radius: 12px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
}
.seo-image-evidence-meta {
  display: grid;
  gap: 5px;
}
.seo-image-evidence-meta strong {
  font-family: var(--font-heading);
}
.seo-image-evidence-meta small,
.seo-image-evidence-meta span {
  color: var(--muted);
  font-size: 12px;
}
.seo-report-detail-url,
.seo-report-url-value {
  direction: ltr;
  text-align: left;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.seo-report-url-modal {
  width: min(680px, calc(100vw - 32px));
}
.seo-report-url-value {
  display: block;
  padding: 14px;
  border: 1px solid rgba(34, 211, 238, .22);
  border-radius: 8px;
  color: #a5f3fc;
  background: rgba(8, 47, 73, .24);
}
.seo-reports-pagination .icon-btn {
  width: 34px;
  min-width: 34px;
  min-height: 34px;
  padding: 0;
}
.seo-reports-table table {
  min-width: 0;
  table-layout: auto;
}
.seo-reports-table th,
.seo-reports-table td {
  padding: 10px 3px;
  font-size: 11px;
}
.seo-reports-table .icon-btn {
  width: 28px;
  min-width: 28px;
  min-height: 28px;
}
.seo-reports-table .badge {
  min-height: 24px;
  padding: 0 6px;
  font-size: 11px;
}
.operator-quote {
  margin: 14px 0;
  padding: 14px 16px;
  border: 1px solid rgba(217,70,239,.24);
  border-right: 4px solid var(--magenta);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(217,70,239,.12), rgba(255,255,255,.035));
  color: #f8fbff;
}
.operator-quote strong {
  display: block;
  margin-bottom: 8px;
  font-family: var(--font-heading);
  color: #f5d0fe;
}
.operator-quote p {
  color: #e9d5ff;
  line-height: 2;
}
.seo-score {
  min-width: 108px;
  min-height: 58px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.14);
  font-family: var(--font-heading);
  font-size: 27px;
}
.seo-score.low {
  color: #fecaca;
  background: rgba(248,113,113,.12);
  border-color: rgba(248,113,113,.32);
}
.seo-score.mid {
  color: #fde68a;
  background: rgba(251,191,36,.12);
  border-color: rgba(251,191,36,.32);
}
.seo-score.high {
  color: #bbf7d0;
  background: rgba(34,197,94,.12);
  border-color: rgba(34,197,94,.32);
}
.muted-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.9;
  margin-top: 12px;
}
.url-text {
  direction: ltr;
  unicode-bidi: plaintext;
  text-align: right;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.timeline { margin: 0; padding: 0 22px 0 0; display: grid; gap: 12px; }
.audit-list { display: grid; gap: 10px; }
.audit-list p {
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  padding: 12px;
}
.project-row {
  display: grid;
  grid-template-columns: 1fr 220px;
  align-items: center;
  gap: 18px;
}
.project-row p { color: var(--muted); margin-top: 8px; direction: ltr; text-align: right; }
.progress {
  height: 34px;
  background: rgba(255,255,255,.08);
  border-radius: 999px;
  position: relative;
  overflow: hidden;
}
.progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--magenta));
}
.progress strong {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 13px;
}
.project-management-page .panel {
  overflow: visible;
}
.project-filter-bar {
  min-height: 56px;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 9px 11px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  background: rgba(18,27,59,.68);
  box-shadow: 0 10px 26px rgba(0,0,0,.14);
}
.project-filter-controls,
.project-filter-actions,
.project-filter-control {
  display: inline-flex;
  align-items: center;
}
.project-filter-controls {
  min-width: 0;
  gap: 12px;
}
.project-filter-control {
  gap: 9px;
}
.project-filter-control .table-filter-heading {
  gap: 6px;
  color: #cbd5e1;
  font-size: 12px;
}
.project-filter-control .column-filter summary {
  width: 30px;
  min-width: 30px;
  min-height: 30px;
  border-radius: 8px;
}
.project-filter-value {
  max-width: 190px;
  overflow: hidden;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.project-filter-divider {
  width: 1px;
  height: 26px;
  background: rgba(255,255,255,.1);
}
.project-filter-actions {
  gap: 8px;
  margin-inline-start: auto;
}
.project-filter-bar button {
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, box-shadow .18s ease, color .18s ease;
}
.project-filter-bar .project-create-button {
  min-height: 36px;
  padding: 0 13px;
  color: #fff;
  border: 1px solid rgba(255,255,255,.1);
  background: linear-gradient(135deg, var(--brand), #7c5cff);
  box-shadow: 0 8px 18px rgba(133,44,132,.24);
}
.project-filter-bar .project-create-button:hover {
  border-color: rgba(255,255,255,.18);
  background: linear-gradient(135deg, #953394, #8870ff);
}
.project-filter-bar .project-filter-reset {
  width: 34px;
  min-width: 34px;
  min-height: 34px;
  padding: 0;
  color: #cbd5e1;
  border: 1px solid rgba(255,255,255,.13);
  background: rgba(255,255,255,.04);
}
.project-filter-bar .project-filter-reset:hover {
  color: #fff;
  border-color: rgba(24,227,238,.3);
  background: rgba(24,227,238,.1);
}
.project-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.project-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  gap: 9px;
  min-height: 205px;
  padding: 13px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255,255,255,.09), rgba(255,255,255,.04));
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.project-card:hover {
  transform: translateY(-2px);
  border-color: rgba(24,227,238,.32);
  background: linear-gradient(180deg, rgba(24,227,238,.10), rgba(255,255,255,.045));
}
.project-card-head {
  display: grid;
  align-items: start;
  gap: 4px;
}
.project-card-head > div { min-width: 0; }
.project-card-head h3 {
  margin: 0 0 3px;
  font-size: 16px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.project-card-head p,
.project-description {
  color: var(--muted);
  line-height: 1.9;
}
.project-card-subline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}
.project-card-subline p {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  line-height: 1.6;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.project-card-subline small {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}
.project-card-meta {
  display: grid;
  gap: 7px;
}
.project-card-meta span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #dbeafe;
  font-size: 13px;
}
.project-card-meta-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 1px minmax(0, 1.15fr);
  align-items: center;
  gap: 4px;
  min-width: 0;
}
.project-card-meta-row span {
  min-width: 0;
  gap: 3px;
  font-size: 12px;
  white-space: nowrap;
}
.project-card-meta-divider {
  width: 1px;
  height: 20px;
  background: rgba(148,163,184,.34);
}
.project-department-badge {
  flex: 0 0 auto;
  border-radius: 7px;
  font-weight: 700;
}
.project-status-badge {
  flex: 0 0 auto;
  border-radius: 7px;
  font-weight: 700;
}
.project-status-badge.status-completed {
  color: #7cfc00;
  border-color: rgba(124,252,0,.68);
  background: rgba(124,252,0,.11);
}
.project-status-badge.status-overdue {
  color: #f87171;
  border-color: rgba(239,68,68,.72);
  background: rgba(239,68,68,.13);
}
.project-department-badge.department-web {
  color: #93c5fd;
  border-color: rgba(59,130,246,.48);
  background: rgba(37,99,235,.15);
}
.project-department-badge.department-seo {
  color: #67e8f9;
  border-color: rgba(6,182,212,.48);
  background: rgba(8,145,178,.15);
}
.project-department-badge.department-social {
  color: #f0abfc;
  border-color: rgba(217,70,239,.46);
  background: rgba(192,38,211,.14);
}
.project-department-badge.department-content {
  color: #fde68a;
  border-color: rgba(245,158,11,.48);
  background: rgba(217,119,6,.15);
}
.project-department-badge.department-finance {
  color: #86efac;
  border-color: rgba(34,197,94,.48);
  background: rgba(22,163,74,.15);
}
.project-department-badge.department-support {
  color: #fdba74;
  border-color: rgba(249,115,22,.5);
  background: rgba(234,88,12,.15);
}
.project-department-badge.department-other {
  color: #cbd5e1;
  border-color: rgba(148,163,184,.42);
  background: rgba(100,116,139,.16);
}
.project-progress {
  display: grid;
  grid-template-columns: 1fr 48px;
  gap: 10px;
  align-items: center;
}
.project-progress-track {
  height: 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.09);
  overflow: hidden;
}
.project-progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), #22c55e);
}
.project-progress strong {
  color: #ecfeff;
  text-align: left;
}
.project-card-foot {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  margin-top: auto;
}
.project-card-statuses {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  white-space: nowrap;
}
.project-card-foot small {
  color: var(--muted);
}
.project-detail-modal {
  width: min(1180px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 20px;
  display: grid;
  grid-template-rows: auto auto auto auto minmax(0, 1fr) auto;
  overflow: hidden;
}
.project-task-header-actions {
  align-items: center;
  justify-content: flex-start;
}

@media (max-width: 1200px) {
  .project-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.project-board-screen {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 14px;
  background:
    linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(145deg, #0b1024, #111936 56%, #080d1f);
  background-size: 48px 48px, 48px 48px, auto;
  overflow: hidden;
}
.project-board-screen-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 14px;
  background: rgba(18,26,56,.72);
}
.project-board-screen-head h2 {
  margin: 0;
}
.project-board-screen-head p {
  margin: 4px 0 0;
  color: var(--muted);
}
.project-board-screen-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.project-board-screen button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 14px;
  padding: 9px 14px;
  color: #eaf1ff;
  background: rgba(255,255,255,.055);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}
.project-board-screen button:not(:disabled):hover {
  border-color: rgba(67,214,232,.34);
  background: rgba(67,214,232,.1);
}
.project-board-screen button.danger {
  color: #fecdd3;
  border-color: rgba(248,113,113,.35);
  background: rgba(127,29,29,.22);
}
.project-board-screen button.danger:not(:disabled):hover {
  background: rgba(248,113,113,.18);
}
.project-board-screen .panel {
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  overflow: hidden;
}
.project-board-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.project-board-panel-head h2 {
  margin: 0;
}
.project-board-screen .project-board {
  height: 100%;
  min-height: 0;
}
.board-screen-stats {
  margin: 0;
}
.board-list-backdrop {
  z-index: 160;
}
.board-list-modal,
.task-load-modal,
.project-progress-modal,
.board-task-detail-modal,
.board-task-modal {
  width: min(760px, calc(100vw - 32px));
  padding: 20px;
}
.board-task-modal {
  width: min(1080px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
}
.board-task-modal .project-task-form {
  margin: 0;
}
.board-task-modal .project-task-form h3 {
  display: none;
}
.task-load-modal {
  width: min(1080px, calc(100vw - 32px));
}
.project-progress-modal,
.board-task-detail-modal {
  width: min(980px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
}
.project-progress-modal .stat strong,
.project-detail-modal > .project-detail-grid .stat strong {
  font-size: 20px;
}
.task-recurrence-backdrop {
  z-index: 190;
}
.task-recurrence-modal {
  width: min(680px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 20px;
  overflow: auto;
}
.recurrence-picker-grid {
  margin-top: 4px;
}
.project-form-modal {
  width: min(980px, calc(100vw - 32px));
  padding: 20px;
}
.project-description-field {
  margin-top: 14px;
}
.project-description-field textarea {
  min-height: 110px;
}
.project-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0;
}
.project-task-form {
  display: grid;
  gap: 12px;
  margin: 18px 0;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  background: rgba(255,255,255,.04);
}
.project-task-form h3 {
  margin: 0;
  font-size: 16px;
}
.checkbox-inline-field {
  min-height: 44px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 14px;
  background: rgba(255,255,255,.045);
  color: #dbe5ff;
}
.checkbox-inline-field input {
  width: auto;
  accent-color: var(--cyan);
}
.project-board-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 0;
}
.project-board-list-form {
  display: grid;
  gap: 12px;
  padding: 12px;
  margin-bottom: 14px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 14px;
  background: rgba(255,255,255,.04);
}
.project-board-list-form input[type="color"] {
  min-height: 44px;
  padding: 5px;
}
input[type="color"] {
  cursor: pointer;
}
input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}
input[type="color"]::-webkit-color-swatch {
  border: 0;
  border-radius: 10px;
}
.project-board {
  min-height: 420px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(260px, 300px);
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 0 12px;
}
.project-board-column {
  min-height: 360px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 14px;
  background: rgba(255,255,255,.045);
  overflow: visible;
}
.project-board-column-head {
  min-height: 42px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 13px 13px 0 0;
  color: #fff;
  background: var(--list-color);
  background: linear-gradient(135deg, var(--list-color), color-mix(in srgb, var(--list-color) 72%, #0a1024));
}
.project-board-column-head strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.project-board-column-head span {
  min-width: 24px;
  min-height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(0,0,0,.18);
  font-family: var(--font-heading);
  font-size: 12px;
}
.project-board-column-head .icon-btn {
  color: #fff;
  border-color: rgba(255,255,255,.18);
  background: rgba(0,0,0,.12);
}
.project-board-column-filters {
  min-height: 38px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 0 8px;
  position: relative;
  z-index: 7;
}
.board-schedule-filter {
  position: relative;
}
.board-schedule-filter summary {
  width: 100%;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 8px;
  border: 1px solid rgba(148,163,184,.2);
  border-radius: 8px;
  color: #cbd5e1;
  background: rgba(15,23,52,.76);
  font-size: 11px;
}
.board-schedule-filter summary svg {
  width: 15px;
  height: 15px;
}
.board-schedule-filter summary b {
  min-width: 19px;
  min-height: 19px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: rgba(34,211,238,.22);
  font-size: 10px;
}
.board-schedule-filter.active summary,
.board-schedule-filter[open] summary {
  border-color: rgba(34,211,238,.52);
  color: #e6fbff;
  background: rgba(8,145,178,.18);
}
.board-schedule-filter-menu {
  width: 244px;
  inset-inline-start: 0;
  inset-inline-end: auto;
  padding: 8px;
}
.board-schedule-filter:nth-child(2) .board-schedule-filter-menu {
  inset-inline-start: auto;
  inset-inline-end: 0;
}
.board-filter-options {
  display: grid;
  gap: 5px;
}
.board-filter-options.month-days {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.board-filter-options label {
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 8px;
  border: 1px solid rgba(148,163,184,.16);
  border-radius: 7px;
  color: #dbe5ff;
  background: rgba(255,255,255,.035);
  cursor: pointer;
}
.board-filter-options.month-days label {
  justify-content: center;
  padding: 5px;
}
.board-filter-options label:hover,
.board-filter-options label.selected {
  border-color: rgba(34,211,238,.44);
  background: rgba(8,145,178,.16);
}
.board-filter-options input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--cyan);
}
.board-filter-options.month-days input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.board-filter-clear {
  width: 100%;
  min-height: 34px;
  margin-top: 8px;
}
.project-board-add-task {
  min-height: 36px;
  margin: 0 8px;
  border-radius: 10px;
  color: #dbe5ff;
  background: rgba(255,255,255,.08);
}
.project-board-quick-task {
  display: grid;
  gap: 8px;
  margin: 0 8px;
  padding: 8px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 12px;
  background: rgba(10,16,36,.46);
}
.project-board-cards {
  display: grid;
  gap: 8px;
  padding: 0 8px 10px;
  overflow-y: auto;
}
.project-board-task {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 2px solid rgba(255,255,255,.12);
  border-radius: 12px;
  background: rgba(15,23,52,.86);
  box-shadow: 0 10px 22px rgba(0,0,0,.16);
}
.project-board-task.pending {
  border-color: rgba(255,255,255,.12);
}
.project-board-task.due-today {
  border-color: rgba(59,130,246,.78);
  box-shadow: 0 0 0 1px rgba(59,130,246,.16), 0 10px 22px rgba(0,0,0,.16);
}
.project-board-task.completed {
  border-color: rgba(34,197,94,.72);
  box-shadow: 0 0 0 1px rgba(34,197,94,.14), 0 10px 22px rgba(0,0,0,.16);
}
.project-board-task.approved {
  border-color: rgba(22,101,52,.95);
  box-shadow: 0 0 0 1px rgba(22,101,52,.24), 0 10px 22px rgba(0,0,0,.16);
}
.project-board-task.overdue {
  border-color: rgba(248,113,113,.82);
  box-shadow: 0 0 0 1px rgba(248,113,113,.18), 0 10px 22px rgba(0,0,0,.16);
}
.project-board-task-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px;
}
.project-board-task-head strong {
  min-width: 0;
  white-space: normal;
  line-height: 1.8;
}
.project-board-task-meta {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}
.task-avatar-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.task-avatar {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border: 2px solid rgba(148,163,184,.22);
  border-radius: 999px;
  object-fit: cover;
  background: rgba(255,255,255,.07);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}
.task-avatar-approver {
  border-color: rgba(34,197,94,.88);
  box-shadow: 0 0 0 2px rgba(34,197,94,.14);
}
.task-person-detail {
  min-height: 66px;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--stroke);
  border-radius: 14px;
  background: rgba(255,255,255,.055);
}
.task-person-detail > span:first-child {
  color: var(--muted);
  font-size: 12px;
}
.contact-login-status-field {
  display: grid;
  gap: 7px;
  color: var(--muted);
}
.contact-active-toggle { min-height: 44px; }
.project-board-task-actions {
  justify-content: flex-start;
}
.compact-empty {
  min-height: 74px;
  padding: 14px 10px;
  font-size: 12px;
}
.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.checkbox-grid label {
  min-height: 38px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  background: rgba(255,255,255,.04);
}
.month-days-grid {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}
.ticket-card {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.ticket-detail-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, .9fr);
  gap: 14px;
  align-items: start;
  margin-bottom: 14px;
}
.ticket-detail-modal {
  width: min(1480px, calc(100vw - 32px));
  max-width: min(1480px, calc(100vw - 32px));
  max-height: calc(100vh - 56px);
  overflow: auto;
}
.ticket-create-modal {
  width: min(940px, calc(100vw - 32px));
  max-width: min(940px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow: auto;
}
.ticket-assignment-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 12px;
}
.ticket-summary-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}
.ticket-summary-row p {
  min-width: 0;
  margin: 0;
}
.ticket-priority.priority-low {
  color: #93c5fd;
  border-color: rgba(96,165,250,.48);
  background: rgba(37,99,235,.14);
}
.ticket-priority.priority-medium {
  color: #fde68a;
  border-color: rgba(250,204,21,.46);
  background: rgba(202,138,4,.14);
}
.ticket-priority.priority-high {
  color: #fca5a5;
  border-color: rgba(248,113,113,.52);
  background: rgba(220,38,38,.15);
}
.ticket-status.status-waiting {
  color: #fdba74;
  border-color: rgba(251,146,60,.48);
  background: rgba(234,88,12,.14);
}
.ticket-status.status-assigned {
  color: #c4b5fd;
  border-color: rgba(167,139,250,.48);
  background: rgba(124,58,237,.14);
}
.ticket-status.status-working {
  color: #67e8f9;
  border-color: rgba(34,211,238,.48);
  background: rgba(8,145,178,.14);
}
.ticket-status.status-approval {
  color: #f0abfc;
  border-color: rgba(232,121,249,.48);
  background: rgba(192,38,211,.14);
}
.ticket-status.status-customer {
  color: #fde68a;
  border-color: rgba(250,204,21,.48);
  background: rgba(202,138,4,.14);
}
.ticket-status.status-closed {
  color: #86efac;
  border-color: rgba(74,222,128,.48);
  background: rgba(22,163,74,.14);
}
.project-status-badge.status-active {
  color: #93c5fd;
  border-color: rgba(96,165,250,.46);
  background: rgba(37,99,235,.14);
}
.portal-tabs,
.portal-ticket-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 5px;
}
.portal-tabs button,
.portal-ticket-tabs button {
  flex: 0 0 auto;
  min-height: 42px;
  padding: 0 16px;
  color: #cbd5e1;
  border: 1px solid rgba(148,163,184,.28);
  border-radius: 6px;
  background: rgba(15,23,42,.28);
}
.portal-tabs button.active,
.portal-ticket-tabs button.active {
  color: #fff;
  border-color: rgba(34,211,238,.55);
  background: rgba(8,145,178,.18);
}
.portal-customer-picker {
  max-width: 520px;
}
.portal-tickets-section {
  min-width: 0;
}
.ticket-thread {
  display: grid;
  gap: 12px;
  margin: 14px 0;
}
.ticket-message {
  width: min(76%, 760px);
  padding: 13px 14px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 16px;
  background: rgba(255,255,255,.055);
}
.ticket-message.customer {
  justify-self: start;
  background: rgba(24,227,238,.11);
  border-color: rgba(24,227,238,.24);
}
.ticket-message.employee {
  justify-self: end;
  background: rgba(133,44,132,.18);
  border-color: rgba(205,77,206,.30);
}
.ticket-message.manager {
  justify-self: end;
  background: rgba(255,255,255,.075);
  border-color: rgba(255,255,255,.16);
}
.ticket-message-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
}
.ticket-message p {
  margin: 0;
  color: #f5f7ff;
  line-height: 1.9;
}
.ticket-attachment-box {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 14px;
  background: rgba(255,255,255,.035);
}
.attachment-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.attachment-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(24,227,238,.22);
  background: rgba(24,227,238,.10);
  color: #dffcff;
  font-size: 12px;
}
.chip-remove {
  min-height: 22px;
  padding: 0 7px;
  border-radius: 999px;
}
.compact-toolbar {
  margin-top: 0;
}
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}
.pagination span {
  color: var(--muted);
}
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 48px 48px;
}
.login-card {
  width: min(440px, 100%);
  display: grid;
  gap: 16px;
  padding: 28px;
  border: 1px solid var(--stroke);
  border-radius: 22px;
  background: linear-gradient(160deg, rgba(26,37,80,.86), rgba(15,22,50,.72));
  box-shadow: 0 28px 90px rgba(0,0,0,.34);
  backdrop-filter: blur(24px);
}
.login-logo {
  display: grid;
  place-items: center;
}
.login-logo img {
  width: 85%;
  height: 85%;
  object-fit: contain;
  border-radius: 20px;
  padding: 10px;
  background: rgba(255,255,255,.06);
  border: 0;
}
.login-card h1 {
  text-align: center;
  font-size: 25px;
}
.login-steps {
  display: grid;
  gap: 8px;
  margin: -4px 0 2px;
  padding: 0;
  list-style: none;
}
.login-steps li {
  padding: 9px 12px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 14px;
  color: var(--muted);
  background: rgba(255,255,255,.035);
  font-size: 13px;
  line-height: 1.75;
}
.login-steps li.active {
  color: #f8fbff;
  border-color: rgba(133, 44, 132, .45);
  background: rgba(133, 44, 132, .14);
}
.login-steps li.done {
  color: #bbf7d0;
  border-color: rgba(34, 197, 94, .32);
  background: rgba(34, 197, 94, .1);
}
.login-form-grid,
.login-field {
  display: grid;
  gap: 10px;
}
.login-mode-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 4px;
}
.login-mode-tabs button {
  min-height: 38px;
}
.login-field {
  color: var(--muted);
}
.login-field input {
  min-height: 48px;
}
.login-field input.is-ready {
  border-color: rgba(34, 197, 94, .45);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, .1);
}
.login-code-timer {
  color: var(--muted);
  text-align: center;
}
.login-debug-code {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid rgba(34, 211, 238, .45);
  border-radius: 8px;
  color: #b6f4ff;
  background: rgba(8, 145, 178, .12);
}
.login-debug-code strong {
  color: #fff;
  font-size: 20px;
  letter-spacing: 0;
  direction: ltr;
}
.login-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}
.login-actions button {
  min-height: 44px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  cursor: pointer;
  transition:
    transform .18s ease,
    background .18s ease,
    border-color .18s ease,
    box-shadow .18s ease,
    opacity .18s ease;
}
.login-actions .primary {
  background: linear-gradient(135deg, var(--brand), #7c5cff);
  box-shadow: 0 12px 30px rgba(133,44,132,.35);
}
.login-actions .primary:hover {
  background: linear-gradient(135deg, #953394, #8870ff);
  box-shadow: 0 16px 34px rgba(133,44,132,.42);
}
.login-actions .secondary {
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.16);
}
.login-actions .secondary:hover {
  background: rgba(255,255,255,.09);
  border-color: rgba(255,255,255,.26);
  box-shadow: 0 10px 22px rgba(0,0,0,.12);
}
.login-actions .verify,
.login-actions .verify.ready {
  background: linear-gradient(135deg, #16a34a, #22c55e);
  border: 1px solid rgba(187, 247, 208, .18);
  box-shadow: 0 12px 30px rgba(22, 163, 74, .28);
}
.login-actions .verify.ready:not(:disabled):hover {
  background: linear-gradient(135deg, #15803d, #2bd96b);
  box-shadow: 0 16px 34px rgba(22, 163, 74, .36);
}
.login-actions .verify:disabled {
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: none;
  color: rgba(255,255,255,.48);
}
@media (max-width: 920px) {
  .customer-projects-modal .project-tasks-panel .table-wrap { overflow-x: auto; }
  .customer-projects-modal .project-tasks-panel table {
    min-width: 920px;
    table-layout: auto;
  }
  .app { grid-template-columns: 1fr; }
  .app.sidebar-collapsed { grid-template-columns: 1fr; }
  .shell-app { width: 100%; margin: 0; border-radius: 0; }
  .sidebar { margin: 12px; }
  .app.sidebar-collapsed .sidebar {
    margin: 12px;
    padding: 12px;
  }
  .app.sidebar-collapsed .sidebar-toggle {
    top: 12px;
    left: 18px;
    transform: none;
  }
  .app.sidebar-collapsed .sidebar-toggle:hover { transform: scale(1.06); }
  .app.sidebar-collapsed .sidebar nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 44px;
  }
  .stats, .grid.two, .grid.three { grid-template-columns: 1fr; }
  .stats.compact, .convert-flow, .form-grid, .form-grid.compact-form, .backup-path-list, .crm-filterbar, .crm-filter-chips, .crm-hub-grid, .choice-grid, .seo-tool-grid, .seo-site-stats-grid, .seo-anchor-row, .seo-result-metrics, .site-stats-toolbar, .project-card-grid, .project-detail-grid, .task-detail-grid, .checkbox-grid { grid-template-columns: 1fr; }
  .crm-list-toolbar { align-items: stretch; }
  .crm-list-toolbar .crm-filterbar { flex-basis: 100%; }
  .crm-list-actions { width: 100%; }
  .crm-list-actions button { flex: 1 1 0; }
  .project-filter-bar { align-items: stretch; flex-direction: column; }
  .project-filter-controls { justify-content: space-between; }
  .project-filter-actions { width: 100%; }
  .project-filter-actions .project-create-button { flex: 1; }
  .site-picker-field { max-width: none; }
  .topbar { align-items: stretch; flex-direction: column; }
  .topbar-actions { align-items: stretch; flex-direction: column; min-width: 0; width: 100%; }
  .route-chip { justify-content: flex-start; }
  .search { min-width: 0; width: 100%; }
  .project-row { grid-template-columns: 1fr; }
  .ticket-detail-head { grid-template-columns: 1fr; }
  .ticket-assignment-row,
  .ticket-summary-row { grid-template-columns: 1fr; }
  .ticket-detail-modal,
  .ticket-create-modal { width: calc(100vw - 16px); max-width: calc(100vw - 16px); padding: 14px; }
  .ticket-message { width: 94%; }
  .portal-tabs,
  .portal-ticket-tabs { margin-inline: -4px; padding-inline: 4px; }
  .portal-tabs button,
  .portal-ticket-tabs button { min-height: 44px; padding-inline: 13px; }
  .login-card { padding: 22px; }
  .login-actions { grid-template-columns: 1fr; }
  .task-recurrence-modal .recurrence-picker-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .task-recurrence-modal .month-days-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .invoice-line { grid-template-columns: 1fr; }
  .invoice-line-total { white-space: normal; }
  .task-template-grid { grid-template-columns: 1fr; }
  .task-template-choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .task-template-choice-grid.month-days-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
