/* CRM Pro: reference-inspired glass, with readable information density. */
:root {
  --muted: #c0b9b4;
  --line: #ffffff18;
  --surface: #3b3530;
  --panel: rgba(39, 35, 33, 0.92);
  --radius: 20px;
}
body {
  background:
    linear-gradient(#1c181966, #1c181977),
    url("/backdrop.svg") center/cover fixed;
  font-size: 14px;
}
.shell {
  grid-template-columns: 220px minmax(0, 1fr) 270px;
  padding: 18px;
  gap: 16px;
  max-width: 1920px;
}
.rail,
.workspace,
.aside {
  border-radius: 21px;
  background: linear-gradient(160deg, #302b2bdc, #302620cf);
  backdrop-filter: blur(24px);
  border: 1px solid #ffffff15;
  box-shadow: 0 12px 40px #0002;
}
.rail {
  height: calc(100vh - 36px);
  top: 18px;
  padding: 18px 12px;
  justify-content: flex-start;
  align-items: stretch;
  overflow: hidden;
  gap: 0;
}
.rail-brand {
  display: flex;
  gap: 11px;
  align-items: center;
  padding: 3px 5px 18px;
}
.rail .brand-icon {
  position: static;
  display: grid;
  width: 38px;
  height: 38px;
  background: #ff7b35;
  color: #25190f;
  border-radius: 11px;
  font-size: 15px;
  font-weight: 800;
  flex-shrink: 0;
  margin: 0;
}
.rail-brand strong {
  font-size: 13px;
  display: block;
}
.rail-brand small {
  font-size: 9px;
  display: block;
  color: #b2a9a4;
  margin-top: 5px;
  max-width: 135px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rail-links {
  overflow: auto;
  flex: 1;
  scrollbar-width: thin;
  scrollbar-color: #665043 transparent;
}
.nav-group {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: #aa9990;
  margin: 20px 11px 9px;
}
.nav-group:first-child {
  margin-top: 5px;
}
.navbtn {
  width: 100%;
  min-height: 40px;
  height: auto;
  flex-direction: row;
  justify-content: flex-start;
  gap: 12px;
  padding: 10px 12px;
  margin: 3px 0;
  border-radius: 11px;
  font-size: 12px;
}
.navbtn span {
  display: block;
  font-size: 12px;
  text-align: left;
}
.navbtn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.navbtn:hover::after {
  display: none;
}
.navbtn.active {
  background: #ff7b35;
  color: #23170f;
  box-shadow: 0 4px 12px #ff7b3520;
  font-weight: 700;
}
.navbtn:hover:not(.active) {
  background: #ffffff07;
}
.rail-user {
  display: flex;
  gap: 9px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding: 15px 4px 0;
  margin-top: 13px;
}
.rail-user strong {
  font-size: 10px;
  display: block;
}
.rail-user small {
  font-size: 9px;
  display: block;
  color: #ac9c93;
  margin-top: 4px;
}
.rail-user .avatar {
  height: 31px;
  width: 31px;
  font-size: 10px;
}
.rail-user button {
  margin-left: auto;
  padding: 5px;
  min-height: 28px;
  border: 0;
}
.workspace {
  padding: 25px 26px;
  min-height: calc(100vh - 36px);
}
.topbar {
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 22px;
}
.topbar h1 {
  font-size: 22px;
}
.topbar small {
  font-size: 10px;
}
.searchbox {
  max-width: 270px;
  margin-left: auto;
  min-width: 190px;
}
.searchbox input {
  font-size: 11px;
  min-height: 36px;
  height: 36px;
}
.topbar-tools {
  display: flex;
  gap: 8px;
}
.topbar-tools button {
  font-size: 11px;
  min-height: 36px;
  padding: 8px 11px;
}
.count {
  background: #ff7b35;
  color: #24190d;
  border-radius: 50%;
  padding: 2px 5px;
  margin-left: 5px;
  font-size: 9px;
}
#page-context {
  display: flex;
  gap: 8px;
  align-items: center;
  color: #a89990;
  font-size: 10px;
  border-top: 1px solid var(--line);
  padding: 13px 0 19px;
  letter-spacing: 0.2px;
}
#page-context strong {
  color: #d9c7ba;
  font-weight: 600;
}
#page-context small {
  margin-left: auto;
  font-size: 10px;
}
.page-head,
.is-overview .page-head {
  display: flex;
  margin-bottom: 21px;
}
.page-head h1 {
  font-size: 25px;
}
.page-head p {
  font-size: 12px;
}
.page-head .actions button {
  font-size: 11px;
}
.metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 21px;
}
.metric {
  padding: 16px 13px;
  min-height: 108px;
  height: auto;
  border-radius: 14px;
}
.metric .label {
  font-size: 10px;
  white-space: normal;
}
.metric strong {
  font-size: 24px;
  line-height: 1.15;
  margin: 12px 0 8px;
}
.metric small {
  font-size: 9px;
  line-height: 1.5;
  white-space: normal;
  overflow: visible;
}
.metric-symbol {
  width: 18px;
  height: 18px;
  font-size: 11px;
  flex-shrink: 0;
}
.is-overview .split {
  display: grid;
}
.is-overview .light-panel {
  padding: 20px;
  border-radius: 15px;
  min-height: 0;
}
.is-overview .light-panel h2 {
  font-size: 14px;
}
.is-overview .light-panel .section-title {
  margin-bottom: 12px;
}
.is-overview .light-panel .section-title > small {
  display: block;
  font-size: 9px;
}
.is-overview .pipeline-bars {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}
.is-overview .pipeline-bar:nth-child(n + 5) {
  display: block;
}
.is-overview .pipeline-bar {
  padding: 12px 8px;
}
.is-overview .pipeline-bar small {
  font-size: 8px;
}
.is-overview .pipeline-bar strong {
  font-size: 18px;
  margin: 7px 0;
  line-height: 1.2;
}
.is-overview .bar {
  height: 3px;
}
.aside {
  display: block;
  padding: 20px 16px;
  height: calc(100vh - 36px);
  top: 18px;
}
.profile {
  gap: 9px;
}
.profile .avatar {
  width: 34px;
  height: 34px;
  font-size: 11px;
}
.profile strong {
  font-size: 12px;
}
.profile small {
  font-size: 9px;
}
.mini-stats {
  margin: 18px 0;
  padding: 12px 7px;
  line-height: 1.3;
}
.mini-stats strong {
  font-size: 15px;
  line-height: 1.3;
}
.mini-stats small {
  font-size: 8px;
  line-height: 1.3;
  display: block;
}
.calendar-surface {
  padding: 15px 10px;
  margin-bottom: 20px;
}
.calendar-title {
  margin-bottom: 13px;
}
.calendar-title strong {
  font-size: 11px;
}
.calendar-title button {
  width: 22px;
  min-height: 22px;
  font-size: 11px;
}
.calendar-grid {
  gap: 3px;
}
.calendar-grid span {
  font-size: 9px;
  padding: 7px 0;
  line-height: 12px;
}
.calendar-grid .dayname {
  font-size: 8px;
}
.aside .section-title h3 {
  font-size: 12px;
}
.aside .section-title a {
  font-size: 9px;
}
.schedule-item {
  min-height: 64px;
  padding: 13px 60px 13px 12px;
}
.schedule-item strong {
  font-size: 10px;
}
.schedule-item small {
  font-size: 8px;
}
.schedule-item button {
  font-size: 8px;
  min-height: 25px;
  top: 18px;
  right: 9px;
}
.aside-footer {
  font-size: 9px;
}
.section-title h2 {
  font-size: 15px;
}
.list-item strong {
  font-size: 12px;
}
.list-item small {
  font-size: 10px;
}
.shortcut-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 15px;
}
.shortcut-grid button {
  display: flex;
  flex-direction: column;
  gap: 9px;
  align-items: flex-start;
  padding: 18px;
  text-align: left;
  background: #ffffff04;
  border-color: var(--line);
  border-radius: 13px;
}
.shortcut-grid svg {
  height: 20px;
  width: 20px;
  color: #ff9a5b;
}
.shortcut-grid strong {
  font-size: 12px;
}
.shortcut-grid small {
  font-size: 10px;
}
.table-wrap {
  border-radius: 13px;
  background: #211e1b35;
}
.table-wrap table {
  font-variant-numeric: tabular-nums;
}
th {
  font-size: 9px;
  background: #3b322bee;
  padding: 14px 12px;
  position: sticky;
  top: 0;
}
td {
  font-size: 12px;
  padding: 14px 12px;
  max-width: 370px;
}
td small {
  font-size: 10px;
  overflow-wrap: anywhere;
  max-width: 290px;
  white-space: normal;
}
.table-wrap .actions {
  flex-wrap: nowrap;
}
td .actions button {
  font-size: 10px;
}
.row-check {
  display: inline-block;
  width: 15px;
  height: 15px;
  min-height: 15px;
  padding: 0;
  margin: 0;
  accent-color: #ff7b35;
}
.bulk-toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  padding: 11px 0;
}
.bulk-toolbar small {
  margin-right: auto;
  font-size: 10px;
}
.bulk-toolbar button {
  font-size: 10px;
  min-height: 28px;
}
.integration-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.integration-grid h2 {
  font-size: 16px;
  margin-bottom: 9px;
}
.integration-grid p {
  font-size: 11px;
  margin-bottom: 12px;
}
.integration-icon {
  height: 38px;
  width: 38px;
  display: grid;
  place-items: center;
  background: #ff7b3512;
  border-radius: 11px;
  color: #ffaa77;
  margin-bottom: 16px;
}
.integration-icon svg {
  height: 23px;
  width: 23px;
}
.detail-panel {
  background: #ffffff02;
  border: 1px solid #ffffff12;
}
.pro-form-section {
  margin-top: 10px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.pro-form-section h3 {
  margin-bottom: 15px;
}
.branch-row,
.custom-row {
  display: grid;
  grid-template-columns: 1fr 1.7fr 32px;
  gap: 10px;
  align-items: end;
  margin-bottom: 12px;
}
.branch-row label,
.custom-row label {
  margin: 0;
}
.branch-row button,
.custom-row button {
  min-height: 42px;
}
.catalogue-picker {
  display: grid;
  grid-template-columns: 1.5fr 1fr auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 20px;
  padding: 15px;
  background: #ffffff05;
  border-radius: 12px;
}
.catalogue-picker label {
  margin: 0;
}
.catalogue-picker button {
  min-height: 42px;
}
.modal-body .metrics {
  grid-template-columns: 1fr 1fr;
}
.modal-body td {
  white-space: normal;
}
dialog {
  border-radius: 18px;
  border-color: #a8784b5c;
  background: #302720;
}
dialog::backdrop {
  background: #0c0806a8;
  backdrop-filter: blur(8px);
}
input,
select,
textarea {
  background: #201b18;
  border-color: #6c56444f;
  font-size: 12px;
}
label {
  font-size: 11px;
}
.empty {
  padding: 35px 15px;
}
.empty h3 {
  font-size: 16px;
}
.empty p {
  font-size: 12px;
}
.page-head .actions {
  max-width: 60%;
  justify-content: flex-end;
}
.kanban {
  padding-bottom: 12px;
}
.column {
  min-width: 210px;
  background: #211c19aa;
}
.deal-card {
  background: #42342aea;
}
.deal-card[draggable="true"] {
  cursor: grab;
}
.deal-card:active {
  cursor: grabbing;
}
.badge {
  font-size: 9px;
}
.pro-form-section .checkbox {
  font-size: 11px;
}
@media (max-width: 1500px) {
  .shell {
    grid-template-columns: 200px minmax(0, 1fr);
  }
  .aside {
    display: none;
  }
  .metrics strong {
    font-size: 23px;
  }
  .integration-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 1000px) {
  .shell {
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
  }
  .rail {
    height: calc(100vh - 24px);
    top: 12px;
    padding: 15px 9px;
  }
  .rail-brand strong {
    font-size: 11px;
  }
  .rail-brand small {
    font-size: 8px;
  }
  .workspace {
    padding: 20px;
    min-height: calc(100vh - 24px);
  }
  .topbar h1 {
    font-size: 19px;
  }
  .topbar-tools {
    margin-left: auto;
  }
  .metrics {
    grid-template-columns: 1fr 1fr;
  }
  .metric strong {
    font-size: 24px;
  }
  .is-overview .pipeline-bars {
    grid-template-columns: repeat(3, 1fr);
  }
  .shortcut-grid {
    grid-template-columns: 1fr 1fr;
  }
  .integration-grid {
    grid-template-columns: 1fr 1fr;
  }
  .navbtn {
    min-height: 37px;
    padding: 8px 10px;
  }
  .navbtn span {
    font-size: 11px;
  }
  .nav-group {
    font-size: 8px;
  }
  .page-head .actions {
    max-width: 100%;
    justify-content: flex-start;
  }
  .topbar small {
    font-size: 10px;
  }
  .searchbox {
    max-width: none;
  }
  .split,
  .settings-grid {
    grid-template-columns: 1fr;
  }
  .calendar-grid span {
    font-size: 9px;
  }
  .greeting-wave {
    width: 19px;
    height: 19px;
  }
}
@media (max-width: 700px) {
  .shell {
    display: block;
    padding: 9px 9px 86px;
  }
  .rail {
    position: fixed;
    top: auto;
    bottom: 0;
    width: 100%;
    height: 71px;
    left: 0;
    right: 0;
    padding: 6px 8px;
    border-radius: 16px 16px 0 0;
    background: #2c251ff5;
    z-index: 10;
    display: block;
  }
  .rail-brand,
  .rail-user,
  .nav-group {
    display: none;
  }
  .rail-links {
    display: flex;
    gap: 5px;
    height: 58px;
    overflow-x: auto;
    overflow-y: hidden;
  }
  .navbtn {
    width: 58px;
    min-width: 58px;
    height: 54px;
    min-height: 54px;
    flex-direction: column;
    gap: 4px;
    justify-content: center;
    margin: 0;
    padding: 7px 3px;
  }
  .navbtn svg {
    width: 19px;
    height: 19px;
  }
  .navbtn span {
    display: block;
    font-size: 7px;
    text-align: center;
    line-height: 1.2;
    max-width: 56px;
  }
  .workspace {
    padding: 19px 15px;
    min-height: calc(100vh - 100px);
    border-radius: 19px;
  }
  .topbar h1 {
    font-size: 18px;
  }
  .topbar small {
    font-size: 9px;
  }
  .topbar-tools {
    margin: 0;
    justify-content: flex-end;
    width: 100%;
  }
  .topbar-tools button {
    font-size: 10px;
  }
  .searchbox {
    flex-basis: 100%;
    margin: 0;
    max-width: none;
  }
  .searchbox input {
    font-size: 11px;
    min-height: 35px;
  }
  #page-context {
    font-size: 9px;
    padding-top: 12px;
  }
  #page-context small {
    font-size: 8px;
  }
  .page-head,
  .is-overview .page-head {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 17px;
  }
  .page-head h1 {
    font-size: 22px;
  }
  .page-head p {
    font-size: 11px;
  }
  .metrics {
    gap: 9px;
    grid-template-columns: 1fr 1fr;
  }
  .metric {
    padding: 14px 11px;
    min-height: 108px;
    height: auto;
  }
  .metric strong {
    font-size: 20px;
    line-height: 1.2;
    margin: 12px 0 7px;
  }
  .metric .label {
    font-size: 9px;
    white-space: normal;
  }
  .metric small {
    font-size: 8px;
    line-height: 1.4;
    white-space: normal;
  }
  .metric-symbol {
    width: 15px;
    height: 15px;
    font-size: 9px;
  }
  .is-overview .pipeline-bars {
    grid-template-columns: 1fr 1fr;
  }
  .is-overview .light-panel {
    padding: 15px;
  }
  .is-overview .light-panel h2 {
    font-size: 13px;
  }
  .is-overview .pipeline-bar strong {
    font-size: 19px;
  }
  .is-overview .pipeline-bar small {
    font-size: 9px;
  }
  .is-overview .pipeline-bar {
    padding: 12px;
  }
  .aside {
    display: none;
  }
  .shortcut-grid {
    grid-template-columns: 1fr 1fr;
  }
  .shortcut-grid button {
    padding: 13px;
  }
  .shortcut-grid strong {
    font-size: 11px;
  }
  .shortcut-grid small {
    font-size: 9px;
  }
  .integration-grid {
    grid-template-columns: 1fr;
  }
  .branch-row,
  .custom-row {
    grid-template-columns: 1fr 1fr 28px;
  }
  .catalogue-picker {
    grid-template-columns: 1fr;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .detail-grid {
    grid-template-columns: 1fr;
  }
  .bulk-toolbar small {
    width: 100%;
  }
  .pro-form-section .form-grid {
    grid-template-columns: 1fr;
  }
  dialog {
    width: calc(100vw - 20px);
    max-height: 92vh;
  }
  .modal-body {
    max-height: calc(92vh - 150px);
  }
  .modal-body .metrics {
    grid-template-columns: 1fr 1fr;
  }
  .table-wrap {
    max-width: 100%;
  }
  .toolbar input {
    max-width: 100%;
  }
  .progress-row {
    grid-template-columns: 80px 1fr 70px;
  }
}
@media print {
  body {
    background: #fff !important;
  }
  .bulk-toolbar,
  .topbar-tools {
    display: none !important;
  }
}
.public-page {
  min-height: 100vh;
  display: block;
  background: #ece9e4;
  padding: 32px 16px;
  color: #232a34;
  overflow: auto;
}
.public-card {
  max-width: 940px;
  margin: 0 auto;
  background: #fff;
  padding: 32px;
  border-radius: 20px;
  box-shadow: 0 16px 60px #202a3512;
}
.public-card h1 {
  font-size: 28px;
  margin: 6px 0;
}
.public-card h2 {
  font-size: 20px;
  margin: 24px 0 14px;
}
.public-card p {
  line-height: 1.6;
}
.public-header {
  display: flex;
  gap: 18px;
  align-items: center;
  border-bottom: 1px solid #e4e7eb;
  padding-bottom: 20px;
  margin-bottom: 24px;
}
.portal-quote {
  border: 1px solid #e2e6eb;
  border-radius: 14px;
  padding: 20px;
  margin: 20px 0;
}
.public-card canvas {
  display: block;
  width: 100%;
  max-width: 640px;
  height: 180px;
  border: 2px dashed #bcc6d3;
  border-radius: 12px;
  background: #fff;
  touch-action: none;
}
.public-card label {
  display: block;
  margin: 14px 0;
}
.public-card .check {
  display: flex;
  align-items: center;
  gap: 10px;
}
.public-card .check input {
  width: auto;
}
.honeypot {
  position: absolute;
  left: -10000px;
}
@media (max-width: 600px) {
  .public-page {
    padding: 12px;
  }
  .public-card {
    padding: 20px;
  }
  .public-card h1 {
    font-size: 24px;
  }
}
@media (max-width: 700px) {
  .metric strong {
    font-size: 17px;
    letter-spacing: -0.35px;
    white-space: nowrap;
  }
  .navbtn {
    width: 68px;
    min-width: 68px;
  }
  .navbtn span {
    font-size: 9px;
    max-width: 65px;
  }
  .navbtn {
    height: 58px;
  }
  .rail {
    height: 76px;
  }
  .rail-links {
    height: 64px;
  }
}
