@font-face {
  font-family: "Dyar Panorama";
  src: url("./assets/PanoramaNaskhMobile-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0020, U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF;
}

:root {
  color-scheme: dark;
  --ink: #f0eee5;
  --muted: #b6c4be;
  --bg: #101f20;
  --bg-end: #20302f;
  --line: rgba(214, 230, 218, .17);
  --edge: rgba(237, 244, 225, .32);
  --surface: rgba(19, 40, 39, .48);
  --field: rgba(8, 24, 25, .65);
  --table: rgba(14, 30, 31, .81);
  --table-head: rgba(36, 57, 53, .88);
  --hover: rgba(186, 208, 193, .055);
  --accent: #b6cbbd;
  --copper: #bc987b;
  --focus: #d6ba92;
  --shadow: 0 16px 40px rgba(0, 10, 11, .16);
  --active: #d5ddd2;
  --active-ink: #122f2a;
  --error: #f3b99f;
}
:root[data-theme="light"] {
  color-scheme: light;
  --ink: #153e36;
  --muted: #4d6259;
  --bg: #d5d2c9;
  --bg-end: #bdc4b9;
  --line: rgba(25, 64, 53, .18);
  --edge: rgba(255, 255, 242, .8);
  --surface: rgba(249, 245, 232, .34);
  --field: rgba(254, 252, 242, .65);
  --table: rgba(240, 239, 226, .84);
  --table-head: rgba(209, 217, 201, .92);
  --hover: rgba(9, 77, 64, .045);
  --accent: #00534b;
  --copper: #86654d;
  --focus: #805d39;
  --shadow: 0 16px 40px rgba(28, 54, 41, .08);
  --active: #174e43;
  --active-ink: #faf7ea;
  --error: #923e26;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(125deg, var(--bg), var(--bg-end));
  color: var(--ink);
  font: 400 17px/1.7 "Dyar Panorama", Tahoma, Arial, sans-serif;
  font-synthesis: none;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
}
button:disabled { cursor: default; opacity: .55; }
strong, b, h1, h2 { font-weight: 400; }
p { margin: 5px 0; color: var(--muted); }
[hidden] { display: none !important; }
.ambient { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: -1; }
.ambient::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 92% 4%, rgba(0, 100, 84, .22), transparent 47%),
    radial-gradient(ellipse at 4% 64%, rgba(155, 106, 76, .11), transparent 48%);
}
.ambient i { position: absolute; width: 720px; height: 720px; border: 1px solid rgba(173, 204, 182, .09); border-radius: 38%; transform: rotate(-35deg); }
.ambient i:first-child { right: -430px; top: -460px; box-shadow: inset 0 0 100px rgba(85, 149, 121, .06); }
.ambient i:nth-child(2) { left: -500px; top: 230px; border-color: rgba(192, 149, 112, .1); }
.ambient i:nth-child(3) { right: 30%; bottom: -690px; width: 1000px; height: 1000px; }
.shell { max-width: 1480px; padding: 30px 40px 20px; margin: auto; }
.glass, .metric {
  position: relative;
  background: linear-gradient(128deg, rgba(246, 251, 235, .10), transparent 48%, rgba(166, 198, 177, .035)), var(--surface);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 var(--edge), inset 1px 0 0 rgba(255, 255, 255, .035), var(--shadow);
  /* Sharp, tinted transparency: no frost or background blur. */
}
.top {
  min-height: 160px; border-radius: 25px; padding: 20px 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  background: linear-gradient(118deg, rgba(250, 255, 234, .07), transparent 45%), rgba(12, 37, 35, .92);
  color: #efeee3;
}
.brand-lockup { display: flex; align-items: center; gap: 24px; flex-shrink: 0; }
.brand-lockup img { display: block; object-fit: contain; filter: brightness(0) invert(94%) sepia(8%); }
.company-logo { width: 152px; height: 112px; object-fit: cover !important; }
.project-logo { width: 136px; height: 92px; }
.brand-divider { width: 1px; height: 60px; background: rgba(232, 235, 216, .20); }
.workspace-title { padding-inline-start: 12px; }
.workspace-title strong { display: block; font-size: 25px; line-height: 1.6; }
.workspace-title small { color: #b7c7bc; font-size: 14px; }
.eyebrow { font-size: 13px; color: var(--copper); display: block; margin-bottom: 5px; }
.workspace-title .eyebrow { color: #c9b599; }
.header-actions { display: grid; justify-items: end; gap: 15px; }
.theme-toggle {
  display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 43px;
  border: 1px solid rgba(236, 241, 222, .24); border-radius: 24px; padding: 6px 17px;
  background: linear-gradient(140deg, rgba(255, 255, 237, .13), rgba(255, 255, 237, .02));
  box-shadow: inset 0 1px 0 rgba(255, 255, 243, .22); color: #f4f0e3; white-space: nowrap;
}
.theme-toggle:hover { background-color: rgba(232, 240, 217, .08); }
.moon-icon { display: none; }
[data-theme="light"] .moon-icon { display: block; }
[data-theme="light"] .sun-icon { display: none; }
.demo { color: #bdc9bc; font-size: 12px; display: flex; align-items: center; gap: 8px; }
.demo i { width: 6px; height: 6px; border-radius: 50%; background: #c0a484; }
nav { display: flex; gap: 7px; width: fit-content; max-width: 100%; padding: 6px; border-radius: 28px; margin-top: 27px; overflow-x: auto; }
nav button { border: 1px solid transparent; border-radius: 23px; padding: 9px 24px; min-height: 46px; background: transparent; color: var(--muted); white-space: nowrap; }
nav button[aria-selected="true"] { background: var(--active); color: var(--active-ink); box-shadow: inset 0 1px 0 rgba(255, 255, 240, .2), 0 2px 8px rgba(0, 0, 0, .08); }
nav button:hover:not([aria-selected="true"]) { color: var(--ink); background: var(--hover); }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 35px 0 24px; }
h1 { margin: 0; font-size: 30px; line-height: 1.55; }
.page-head p { font-size: 16px; }
.tag { color: var(--muted); border: 1px solid var(--line); border-radius: 22px; padding: 7px 15px; font-size: 13px; white-space: nowrap; }
.tag b { margin-inline-start: 6px; }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.home-metrics { grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: stretch; }
.metric { border-radius: 22px; padding: 23px; min-width: 0; }
.home-metrics .metric { min-height: 238px; display: grid; grid-template-rows: 56px 78px 1fr; }
.metric-label { color: var(--muted); display: block; font-size: 16px; }
.metric-label[dir="ltr"] { text-align: right; }
.value { display: block; font-size: 43px; line-height: 1.5; font-variant-numeric: tabular-nums; margin: 9px 0; letter-spacing: -.5px; }
.metric small { color: var(--muted); font-size: 13px; line-height: 1.75; display: block; }
.home-note { font-size: 14px; margin-top: 23px; display: flex; align-items: baseline; gap: 10px; }
.home-note span { width: 5px; height: 5px; background: var(--copper); border-radius: 50%; flex-shrink: 0; }
.home-bottom { margin-top: 73px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; color: var(--muted); font-size: 14px; }
.home-bottom span:last-child { font: 11px/2 Arial, sans-serif; letter-spacing: 2px; }
.table-metrics { display: grid; grid-template-columns: minmax(230px, 1fr) minmax(0, 2fr); gap: 16px; margin-bottom: 24px; align-items: stretch; }
.broker-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.table-metrics .metric { min-height: 175px; }
.table-metrics .value { font-size: 37px; margin: 6px 0; }
.broker-name { display: block; font-size: 24px; line-height: 1.7; margin: 13px 0 6px; overflow-wrap: anywhere; }
.follow-metrics { margin-bottom: 24px; }
.follow-metrics .metric { min-height: 166px; }
.follow-metrics .value { font-size: 35px; margin: 5px 0; }
.table-wrap { overflow: auto; background: var(--table); border-radius: 22px; }
table { width: 100%; border-collapse: collapse; min-width: 1350px; text-align: right; }
th { background: var(--table-head); font-weight: 400; color: var(--muted); white-space: nowrap; padding: 19px 16px; border-bottom: 1px solid var(--line); font-size: 15px; }
td { padding: 20px 16px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 16px; line-height: 1.8; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--hover); }
td:first-child { min-width: 155px; }
.phone { direction: ltr; display: inline-block; font: 14px/2.15 Arial, sans-serif; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--ink); }
.platform { font: 13px/2.3 Arial, sans-serif; color: var(--muted); white-space: nowrap; }
.cell-input, .cell-select, .cell-note { width: 100%; border: 1px solid var(--line); border-radius: 9px; background: var(--field); padding: 7px 10px; min-height: 41px; }
.cell-input { min-width: 137px; max-width: 190px; }
.cell-select { min-width: 132px; }
.cell-select option { background: var(--bg); color: var(--ink); }
.cell-select.status { min-width: 195px; }
.cell-note { resize: vertical; min-width: 180px; min-height: 78px; max-width: 250px; }
.transfer-cell { text-align: center; vertical-align: middle; }
.transfer-check { width: 21px; height: 21px; accent-color: var(--accent); cursor: pointer; }
.transfer-check:disabled { cursor: default; opacity: .4; }
.row-action { border: 1px solid var(--line); border-radius: 18px; padding: 7px 14px; background: var(--surface); box-shadow: inset 0 1px 0 var(--edge); color: var(--ink); white-space: nowrap; min-height: 39px; font-size: 14px; }
.row-action:hover { border-color: var(--accent); }
.frozen-label { display: block; font-size: 13px; color: var(--muted); white-space: nowrap; margin-bottom: 9px; }
.reopen-action { color: var(--accent); }
.text-full { white-space: pre-wrap; overflow-wrap: anywhere; min-width: 180px; max-width: 360px; }
.empty { padding: 34px; text-align: center; color: var(--muted); }
.save-message { min-height: 28px; margin-top: 12px; font-size: 13px; color: var(--muted); }
.error-message { color: var(--error); }
.foot { margin-top: 35px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
@media (max-width: 1200px) {
  .shell { padding: 25px; }
  .top { gap: 20px; padding: 20px; }
  .brand-lockup { gap: 15px; }
  .company-logo { width: 129px; height: 104px; }
  .project-logo { width: 112px; height: 82px; }
  .workspace-title strong { font-size: 22px; }
  .home-metrics { overflow-x: auto; grid-template-columns: repeat(5, minmax(205px, 1fr)); padding: 1px 1px 15px; }
  .broker-cards { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
}
@media (max-width: 800px) {
  .top { flex-wrap: wrap; }
  .workspace-title { flex: 1; padding: 0; }
  .header-actions { display: flex; align-items: center; justify-content: space-between; width: 100%; padding-top: 15px; border-top: 1px solid rgba(236, 241, 222, .12); }
  .table-metrics { grid-template-columns: 1fr; }
  .broker-cards { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
  .table-metrics .metric { min-height: 155px; }
}
@media (max-width: 560px) {
  .shell { padding: 17px 14px; }
  .top { padding: 17px; border-radius: 22px; gap: 18px; }
  .brand-lockup { justify-content: center; width: 100%; gap: 27px; }
  .company-logo { width: 136px; height: 105px; }
  .project-logo { width: 118px; height: 87px; }
  .workspace-title { text-align: center; }
  .workspace-title strong { font-size: 22px; }
  .workspace-title .eyebrow { display: none; }
  nav { margin-top: 20px; gap: 2px; padding: 5px; }
  nav button { padding: 8px 13px; font-size: 14px; min-height: 43px; }
  .page-head { margin-top: 28px; align-items: flex-start; flex-wrap: wrap; gap: 12px; }
  h1 { font-size: 27px; }
  .page-head p { font-size: 15px; }
  .metric { padding: 20px; }
  .home-metrics { gap: 12px; grid-template-columns: repeat(5, 215px); }
  .home-metrics .metric { min-height: 238px; }
  .home-bottom { margin-top: 43px; flex-direction: column; gap: 4px; }
  .follow-metrics { gap: 8px; }
  .follow-metrics .metric { padding: 13px 10px; min-height: 154px; }
  .follow-metrics .metric-label { font-size: 13px; line-height: 1.7; min-height: 44px; }
  .follow-metrics .value { font-size: 31px; }
  .follow-metrics small { font-size: 11px; }
  .broker-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .broker-cards .metric:only-child { grid-column: 1 / -1; }
  .broker-card { padding: 16px; }
  .broker-name { font-size: 21px; }
  .foot { margin-top: 20px; font-size: 11px; gap: 5px; }
}
@media (prefers-reduced-transparency: reduce) {
  .metric { background: var(--bg-end); }
  .table-wrap { background: var(--bg); }
}
@media (prefers-reduced-motion: no-preference) {
  button { transition: background-color .18s, border-color .18s, color .18s; }
}

/* Team login, sync and save feedback use the existing brand palette. */
.connection-badge { color: #bdc9bc; font-size: 12px; display: flex; align-items: center; gap: 8px; }
.connection-badge i { width: 6px; height: 6px; border-radius: 50%; background: #c0a484; }
.header-logout { background: none; border: 0; color: #c9d2c7; font-size: 13px; text-decoration: underline; text-underline-offset: 4px; }
.auth-panel { max-width: 480px; margin: 44px auto; border-radius: 24px; padding: 30px; }
.auth-panel h1 { font-size: 27px; }
.auth-panel p { font-size: 15px; }
.auth-panel form { display: grid; gap: 12px; margin: 22px 0; }
.auth-panel label { font-size: 15px; }
.auth-panel input { width: 100%; min-height: 48px; border-radius: 10px; border: 1px solid var(--line); background: var(--field); padding: 8px 12px; }
.auth-submit { background: var(--active) !important; color: var(--active-ink) !important; min-height: 46px; }
.workspace-status { border-radius: 18px; padding: 15px 20px; margin-top: 25px; display: flex; align-items: center; justify-content: space-between; gap: 14px; font-size: 14px; }
.workspace-buttons { display: flex; gap: 8px; flex-shrink: 0; }
.row-feedback { margin-top: 8px; display: grid; gap: 8px; font-size: 12px; line-height: 1.7; min-width: 165px; max-width: 340px; }
.row-feedback:empty { display: none; }
.row-feedback .row-action { font-size: 12px; white-space: normal; }
.row-save-status { color: var(--muted); }
.conflict-values { display: grid; gap: 5px; padding: 9px; border: 1px solid var(--line); border-radius: 8px; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 260px; overflow: auto; }
.conflict-values strong { color: var(--copper); }
.discard-action { color: var(--muted); background: transparent; }
.cell-input:disabled, .cell-select:disabled, .cell-note:disabled { opacity: .65; }
@media (max-width: 560px) {
  .auth-panel { padding: 23px; margin-top: 28px; }
  .header-actions { flex-wrap: wrap; gap: 12px; }
  .workspace-status { align-items: flex-start; flex-direction: column; padding: 15px; }
  .workspace-buttons { flex-wrap: wrap; width: 100%; }
}
