@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  --yellow: #ffd629;
  --yellow-dark: #e9bb00;
  --ink: #202020;
  --muted: #777b82;
  --line: #e9eaed;
  --surface: #ffffff;
  --background: #f7f8fa;
  --green: #21875b;
  --red: #c74747;
  --radius: 16px;
  --shadow: 0 8px 30px rgba(25, 30, 40, .045);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--background);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

button:focus-visible, a:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(255, 214, 41, .55);
  outline-offset: 2px;
}

button:disabled { opacity: .55; cursor: not-allowed; }
a { color: inherit; text-decoration: none; }

.app-shell { min-height: 100vh; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  width: 252px;
  padding: 27px 18px 16px;
  background: #fff;
  border-right: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 7px;
  margin-bottom: 43px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 13px;
  background: var(--ink);
  color: #fff;
  font-family: 'Manrope', sans-serif;
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -2px;
}

.brand-mark span { color: var(--yellow); }

.brand-copy { display: flex; flex-direction: column; gap: 3px; }
.brand-copy strong { font: 800 18px 'Manrope', sans-serif; letter-spacing: -.8px; }
.brand-copy strong span { color: #a68b00; }
.brand-copy small { color: #999; font-size: 9px; letter-spacing: 1.5px; font-weight: 700; }

.nav-caption, .overline {
  color: #9a9da4;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.4px;
}

.nav-caption { padding: 0 11px; margin-bottom: 12px; }
.navigation { display: grid; gap: 5px; }

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 45px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  color: #686b72;
  background: transparent;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  transition: background .18s, color .18s;
}

.nav-item:hover { background: #f7f7f7; color: var(--ink); }
.nav-item.active { background: #fff8d8; color: #25220e; }

.nav-item.active::before {
  position: absolute;
  left: 0;
  top: 11px;
  bottom: 11px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--yellow-dark);
  content: '';
}

.nav-symbol {
  display: grid;
  place-items: center;
  width: 21px;
  font-size: 19px;
  color: #81848b;
}

.nav-item.active .nav-symbol { color: #8a7100; }

.nav-count {
  margin-left: auto;
  padding: 3px 7px;
  border-radius: 6px;
  background: #f1f1f1;
  color: #666;
  font-size: 10px;
}

.sidebar-bottom { margin-top: auto; }

.sidebar-promo {
  padding: 16px 14px;
  border: 1px solid #f0e8bf;
  border-radius: 13px;
  background: linear-gradient(140deg, #fffdf3, #fff9d9);
}

.promo-symbol {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-bottom: 12px;
  border-radius: 8px;
  background: var(--yellow);
  font-size: 16px;
}

.sidebar-promo strong { display: block; font-size: 12px; }
.sidebar-promo p { margin: 7px 0 0; color: #77715c; font-size: 11px; line-height: 1.6; }

.sidebar-credit {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 19px 4px 0;
  color: #8a8c92;
  font-size: 11px;
}

.online-dot { width: 7px; height: 7px; border-radius: 50%; background: #50b887; }

.main-area { min-height: 100vh; margin-left: 252px; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  min-height: 105px;
  padding: 22px 36px;
  background: rgba(255,255,255,.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.topbar-heading { display: flex; align-items: center; gap: 12px; }

.topbar h1 {
  margin: 5px 0 3px;
  font: 800 24px 'Manrope', sans-serif;
  letter-spacing: -.8px;
}

.topbar p { margin: 0; color: var(--muted); font-size: 12px; }
.topbar-actions { display: flex; align-items: center; gap: 13px; }
.today-label { color: #81848b; font-size: 11px; }

.content-area { max-width: 1700px; margin: 0 auto; padding: 31px 36px 42px; }

.welcome-row, .section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 22px;
}

.welcome-row h2, .section-heading h2 {
  margin: 0 0 6px;
  font: 800 21px 'Manrope', sans-serif;
  letter-spacing: -.65px;
}

.welcome-row p, .section-heading p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.yellow-period { color: #d5ae00; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px;
  margin-bottom: 21px;
}

.stat-card {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.stat-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.stat-top > span:first-child { color: #737780; font-size: 11px; font-weight: 600; }

.stat-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
}

.icon-yellow { background: #fff3b8; color: #8e7500; }
.icon-gray { background: #f0f1f3; color: #656871; }
.icon-green { background: #e1f5e9; color: var(--green); }
.icon-red { background: #fde9e7; color: var(--red); }
.icon-dark { background: #282828; color: var(--yellow); }

.stat-card > strong {
  display: block;
  overflow-wrap: anywhere;
  margin: 18px 0 7px;
  font: 800 clamp(21px, 2vw, 29px) 'Manrope', sans-serif;
  letter-spacing: -1px;
}

.stat-card > small { color: #9699a0; font-size: 10px; line-height: 1.5; }

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr);
  gap: 19px;
  margin-bottom: 20px;
}

.panel {
  min-width: 0;
  margin-bottom: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.dashboard-grid .panel { margin-bottom: 0; }

.panel-heading, .panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  padding: 21px 22px 0;
}

.panel-heading h3, .panel-header h3 { margin: 0; font: 800 14px 'Manrope', sans-serif; }
.panel-heading p, .panel-header p { margin: 5px 0 0; color: #9699a0; font-size: 11px; line-height: 1.5; }

.text-button {
  border: 0;
  padding: 4px 0;
  background: transparent;
  color: #6e5b00;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.chart-wrap { position: relative; height: 245px; padding: 22px; }
.activity-list { padding: 14px 22px 20px; }

.activity-preview {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid #f0f0f0;
}

.activity-preview:last-child { border-bottom: 0; }

.activity-marker {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--yellow-dark);
}

.activity-preview-content { min-width: 0; flex: 1; }
.activity-preview strong { display: block; font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
.activity-preview small { display: block; margin-top: 4px; color: #999; font-size: 10px; }
.activity-date { color: #777; font-size: 10px; white-space: nowrap; }

.table-scroll { width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; text-align: left; }

.data-table th {
  padding: 14px 17px;
  border-top: 1px solid #f1f1f1;
  border-bottom: 1px solid #f0f0f0;
  background: #fbfbfc;
  color: #9699a0;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.data-table td {
  padding: 15px 17px;
  border-bottom: 1px solid #f2f2f2;
  color: #555962;
  font-size: 11px;
  vertical-align: middle;
}

.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fffdf5; }
.data-table td:first-child { color: var(--ink); }

.contact-cell { display: flex; align-items: center; gap: 10px; min-width: 150px; }

.avatar {
  display: grid;
  place-items: center;
  width: 33px;
  height: 33px;
  flex: 0 0 33px;
  border-radius: 10px;
  background: #fff3b8;
  color: #6f5a00;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.contact-info { min-width: 0; }
.contact-info strong { display: block; font-size: 11px; font-weight: 700; }
.contact-info small { display: block; max-width: 180px; margin-top: 3px; overflow: hidden; color: #999; font-size: 10px; text-overflow: ellipsis; }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 8px;
  border-radius: 6px;
  background: #f0f1f3;
  color: #60636b;
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}

.badge-new { background: #f1f1f1; color: #666; }
.badge-contact { background: #e9f1ff; color: #3866a3; }
.badge-qualification { background: #f0eaff; color: #7651a5; }
.badge-proposal { background: #fff1d8; color: #96651b; }
.badge-negotiation { background: #fff5b9; color: #7b6400; }
.badge-won { background: #e1f5e9; color: #21875b; }
.badge-lost { background: #fde9e7; color: #b53b3b; }

.action-buttons { display: flex; align-items: center; gap: 5px; }

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border: 1px solid #ebebeb;
  border-radius: 7px;
  background: #fff;
  color: #656870;
  font-size: 13px;
}

.icon-button:hover { border-color: #e2c32e; background: #fffbea; }
.icon-button.danger:hover { border-color: #efc1bd; background: #fff2f1; color: #b53b3b; }
.table-footer { padding: 14px 18px; border-top: 1px solid #f1f1f1; color: #9699a0; font-size: 10px; }
.empty-state { padding: 35px 18px !important; text-align: center; color: #999 !important; line-height: 1.7; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 39px;
  padding: 0 15px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 700;
  transition: transform .15s, background .15s, border-color .15s;
  white-space: nowrap;
}

.button:hover { transform: translateY(-1px); }
.button-primary { background: var(--yellow); color: #222; border-color: var(--yellow); }
.button-primary:hover { background: #f4ca13; }
.button-secondary { background: #fff; color: #444; border-color: #e5e6e9; }
.button-secondary:hover { background: #f9f9f9; border-color: #d2d3d6; }
.button-small { min-height: 32px; padding: 0 11px; font-size: 10px; }

.select-control, .input-control, .form-field input,
.form-field select, .form-field textarea {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid #e5e6e9;
  border-radius: 9px;
  outline: none;
  background: #fff;
  color: #36383e;
  font-size: 11px;
}

.select-control { width: auto; }

.input-control:focus, .select-control:focus,
.form-field input:focus, .form-field select:focus,
.form-field textarea:focus {
  border-color: #d9b51a;
  box-shadow: 0 0 0 3px rgba(255,214,41,.14);
}

.input-control::placeholder, .form-field input::placeholder,
.form-field textarea::placeholder { color: #a8aab0; }

.toolbar { display: flex; gap: 10px; padding: 19px 20px; }
.search-input { flex: 1; min-width: 170px; }
.toolbar .select-control { max-width: 205px; }

.section-heading { margin-bottom: 23px; }

.pipeline-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 17px;
  margin-bottom: 18px;
  padding: 17px 20px;
  border: 1px solid #f0e6b5;
  border-radius: 13px;
  background: #fffbed;
}

.pipeline-summary > span:first-child { color: #756b43; font-size: 11px; }
.pipeline-summary strong { font: 800 19px 'Manrope', sans-serif; }
.pipeline-note { color: #8b846a; font-size: 10px; }

.pipeline-board {
  display: grid;
  grid-template-columns: repeat(7, minmax(215px, 1fr));
  gap: 12px;
  overflow-x: auto;
  align-items: start;
  padding-bottom: 15px;
}

.pipeline-column {
  min-width: 215px;
  padding: 11px;
  border: 1px solid #e8e9ec;
  border-radius: 13px;
  background: #f0f1f4;
}

.pipeline-column.drag-over { outline: 2px dashed #d2ad13; background: #fff9d9; }

.pipeline-column-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 7px;
  padding: 5px 3px 13px;
}

.pipeline-column-head strong { font-size: 11px; }

.pipeline-column-head span {
  display: grid;
  place-items: center;
  min-width: 23px;
  height: 23px;
  padding: 0 5px;
  border-radius: 7px;
  background: #fff;
  color: #777;
  font-size: 10px;
}

.pipeline-cards { display: grid; gap: 9px; min-height: 45px; }

.pipeline-card {
  padding: 13px;
  border: 1px solid #e7e7e7;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 3px 10px rgba(20,20,20,.025);
  cursor: grab;
}

.pipeline-card:active { cursor: grabbing; }
.pipeline-card strong { display: block; overflow-wrap: anywhere; font-size: 11px; }
.pipeline-card p { margin: 5px 0 10px; color: #999; font-size: 10px; }
.pipeline-card-value { font: 800 14px 'Manrope', sans-serif; }

.pipeline-card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #f1f1f1;
  color: #999;
  font-size: 9px;
}

.pipeline-card select {
  max-width: 100%;
  margin-top: 10px;
  padding: 7px;
  border: 1px solid #e6e6e6;
  border-radius: 7px;
  background: #fff;
  font-size: 10px;
}

.pipeline-card .card-edit { border: 0; background: transparent; color: #6e5b00; font-size: 10px; font-weight: 700; }

.budget-placeholder { padding: 20px; }

.full-activity-list { padding: 0 21px; }

.activity-row {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 17px 0;
  border-bottom: 1px solid #f0f0f0;
}

.activity-row:last-child { border-bottom: 0; }

.activity-check {
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  margin-top: 1px;
  accent-color: #d5ae00;
  cursor: pointer;
}

.activity-row-main { min-width: 0; flex: 1; }
.activity-row-title { font-size: 12px; font-weight: 700; overflow-wrap: anywhere; }
.activity-row-title.done { color: #999; text-decoration: line-through; }

.activity-row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
  color: #999;
  font-size: 10px;
}

.activity-row-note { margin-top: 8px; color: #777; font-size: 11px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.activity-row-date { color: #777; font-size: 10px; white-space: nowrap; }
.activity-row-date.overdue { color: var(--red); font-weight: 700; }
.activity-stats { margin-top: 3px; }

.main-footer {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 18px 36px;
  border-top: 1px solid var(--line);
  background: #fff;
  color: #999;
  font-size: 10px;
}

.main-footer strong { color: #555; }
.footer-divider { margin: 0 7px; color: #d4b01d; }

.mobile-menu {
  display: none;
  place-items: center;
  width: 37px;
  height: 37px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  font-size: 17px;
}

.mobile-overlay { display: none; }
.sidebar-close { display: none; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  padding: 20px;
  background: rgba(22,23,26,.55);
  backdrop-filter: blur(4px);
}

.modal-backdrop.open { display: flex; }

.modal {
  width: min(100%, 650px);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 25px;
  border: 1px solid rgba(255,255,255,.5);
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 25px 90px rgba(0,0,0,.2);
}

.modal-compact { max-width: 490px; }

.modal-header { display: flex; justify-content: space-between; gap: 15px; margin-bottom: 22px; }
.modal-header h2 { margin: 6px 0 5px; font: 800 21px 'Manrope', sans-serif; letter-spacing: -.5px; }
.modal-header p { margin: 0; color: #9699a0; font-size: 11px; line-height: 1.5; }

.modal-x {
  width: 31px;
  height: 31px;
  flex: 0 0 31px;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  background: #fff;
  color: #666;
  font-size: 22px;
  line-height: 1;
}

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.form-field { display: grid; gap: 7px; min-width: 0; margin-bottom: 15px; }
.form-field label { color: #54565d; font-size: 11px; font-weight: 700; }
.form-field input, .form-field select, .form-field textarea { font-size: 12px; }
.form-field textarea { min-height: 83px; padding: 11px 12px; resize: vertical; }
.full-width { grid-column: 1 / -1; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 8px; padding-top: 18px; border-top: 1px solid #f0f0f0; }

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 200;
  max-width: min(380px, calc(100vw - 32px));
  padding: 13px 17px;
  border: 1px solid #333;
  border-radius: 10px;
  background: #222;
  color: #fff;
  font-size: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,.17);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity .2s, transform .2s;
}

.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { border-color: #8b3434; background: #862d2d; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.page { display: none; }
.page.active { display: block; animation: appear .2s ease; }

@keyframes appear {
  from { opacity: .5; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (min-width: 1600px) {
  .content-area { padding-right: 46px; padding-left: 46px; }
}

@media (max-width: 1250px) {
  .sidebar { width: 225px; }
  .main-area { margin-left: 225px; }
  .content-area { padding-right: 23px; padding-left: 23px; }
  .topbar { padding-right: 23px; padding-left: 23px; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-grid { grid-template-columns: minmax(0, 1fr); }
  .chart-wrap { height: 260px; }
}

@media (max-width: 850px) {
  .sidebar {
    width: min(285px, 86vw);
    transform: translateX(-105%);
    transition: transform .25s ease;
    box-shadow: none;
  }

  .sidebar.open { transform: translateX(0); box-shadow: 20px 0 50px rgba(0,0,0,.12); }
  .sidebar-close { display: grid; place-items: center; width: 30px; height: 30px; margin-left: auto; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: 21px; }
  .brand { margin-bottom: 34px; }
  .sidebar-header { display: flex; align-items: center; }
  .sidebar-header .brand { flex: 1; margin-bottom: 34px; }
  .mobile-overlay.visible { position: fixed; inset: 0; z-index: 25; display: block; background: rgba(0,0,0,.35); }
  .main-area { margin-left: 0; }
  .mobile-menu { display: grid; }
  .topbar { min-height: 90px; padding: 17px 22px; }
  .topbar h1 { font-size: 21px; }
  .today-label { display: none; }
  .main-footer { padding: 17px 22px; }
}

@media (max-width: 600px) {
  body { font-size: 13px; }
  .topbar { align-items: flex-start; gap: 10px; padding: 15px 14px; }
  .topbar-heading { align-items: flex-start; gap: 9px; }
  .mobile-menu { width: 33px; height: 33px; flex: 0 0 33px; margin-top: 6px; }
  .topbar h1 { margin-top: 4px; font-size: 19px; }
  .topbar p { max-width: 230px; font-size: 10px; line-height: 1.5; }
  .overline { font-size: 8px; letter-spacing: 1px; }
  .topbar-actions { align-self: center; }
  .topbar-actions .button { width: 38px; min-width: 38px; height: 38px; padding: 0; font-size: 0; }
  .topbar-actions .button span { font-size: 22px; }
  .content-area { padding: 22px 13px 28px; }
  .welcome-row, .section-heading { align-items: flex-start; flex-direction: column; gap: 13px; margin-bottom: 17px; }
  .welcome-row h2, .section-heading h2 { font-size: 19px; }
  .welcome-row p, .section-heading p { font-size: 11px; }
  .welcome-row > .select-control { width: 100%; }
  .section-heading > .button, .section-heading > div + .button { align-self: stretch; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-bottom: 13px; }
  .stat-card { padding: 14px 12px; border-radius: 12px; }
  .stat-top { align-items: flex-start; gap: 6px; }
  .stat-top > span:first-child { max-width: 105px; font-size: 10px; line-height: 1.4; }
  .stat-icon { width: 27px; height: 27px; flex-basis: 27px; border-radius: 8px; font-size: 11px; }
  .stat-card > strong { margin: 13px 0 6px; font-size: clamp(19px, 6vw, 25px); }
  .stat-card > small { font-size: 9px; }
  .dashboard-grid { gap: 13px; margin-bottom: 13px; }
  .panel { margin-bottom: 13px; border-radius: 12px; }
  .panel-heading, .panel-header { padding: 17px 14px 0; }
  .panel-heading h3, .panel-header h3 { font-size: 13px; }
  .panel-heading p, .panel-header p { font-size: 10px; }
  .chart-wrap { height: 220px; padding: 17px 10px; }
  .activity-list { padding: 12px 14px 15px; }
  .activity-date { font-size: 9px; }
  .button { min-height: 38px; padding: 0 12px; font-size: 10px; }
  .toolbar { flex-direction: column; padding: 14px; }
  .toolbar .select-control, .toolbar .input-control { width: 100%; max-width: none; min-height: 42px; }
  .table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .data-table { min-width: 720px; }
  .data-table th { padding: 12px 13px; }
  .data-table td { padding: 13px; }
  .pipeline-summary { align-items: flex-start; flex-direction: column; gap: 7px; padding: 15px; }
  .pipeline-note { line-height: 1.5; }
  .pipeline-board { grid-template-columns: repeat(7, minmax(230px, 1fr)); }
  .report-actions { display: flex; flex-wrap: wrap; gap: 8px; }
  .report-actions .button { flex: 1; }
  .main-footer { flex-direction: column; gap: 8px; padding: 17px 14px; font-size: 9px; }
  .modal-backdrop { align-items: flex-end; padding: 0; }
  .modal { width: 100%; max-height: 92dvh; padding: 21px 16px calc(18px + env(safe-area-inset-bottom)); border-radius: 18px 18px 0 0; }
  .modal-header h2 { font-size: 19px; }
  .form-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .full-width { grid-column: auto; }
  .form-field { margin-bottom: 14px; }
  .form-field input, .form-field select { min-height: 44px; }
  .modal-actions { position: sticky; bottom: -18px; background: #fff; padding: 14px 0 0; }
  .modal-actions .button { flex: 1; }
  .full-activity-list { padding: 0 14px; }
  .activity-row { gap: 9px; }
  .activity-row-date { font-size: 9px; }
  .today-label { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* =========================================
   KOMPANY FLOW — TELA DE DEMONSTRAÇÃO
   ========================================= */

.demo-login {
  --login-yellow: #ffd000;
  --login-dark: #101010;
  --login-muted: #a3a3a3;

  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 28px 6.5%;
  overflow: auto;
  color: #fff;
  background:
    radial-gradient(ellipse at 8% 85%, rgba(255, 208, 0, 0.09), transparent 32%),
    radial-gradient(ellipse at 90% 15%, rgba(255, 208, 0, 0.06), transparent 30%),
    #101010;
  font-family: inherit;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.demo-login.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.login-top,
.login-footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.login-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
}

.login-brand-mark,
.login-card-symbol {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 208, 0, 0.6);
  border-radius: 12px;
  color: #fff;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -2px;
}

.login-brand-mark span,
.login-brand-name span,
.login-card-symbol span {
  color: var(--login-yellow);
}

.login-brand-name {
  font-size: 20px;
  font-weight: 750;
  letter-spacing: -0.7px;
}

.login-version {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 13px;
  border: 1px solid #333;
  border-radius: 30px;
  color: #c9c9c9;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
}

.login-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--login-yellow);
  box-shadow: 0 0 12px rgba(255, 208, 0, 0.5);
}

.login-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.75fr);
  align-items: center;
  gap: clamp(40px, 8vw, 120px);
  width: 100%;
  max-width: 1160px;
  margin: 55px auto;
}

.login-copy { max-width: 620px; }

.login-eyebrow,
.login-card-eyebrow {
  color: var(--login-yellow);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
}

.login-copy h1 {
  margin: 22px 0;
  color: #fff;
  font-size: clamp(38px, 5.1vw, 66px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -2.8px;
}

.login-copy h1 span { color: var(--login-yellow); }

.login-copy > p {
  max-width: 500px;
  margin: 0;
  color: #aaa;
  font-size: 16px;
  line-height: 1.85;
}

.login-features {
  display: grid;
  gap: 17px;
  margin-top: 32px;
}

.login-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #e5e5e5;
  font-size: 14px;
}

.feature-check {
  display: grid;
  place-items: center;
  flex: 0 0 23px;
  width: 23px;
  height: 23px;
  border-radius: 7px;
  background: rgba(255, 208, 0, 0.12);
  color: var(--login-yellow);
  font-size: 13px;
  font-weight: 800;
}

.login-card {
  width: 100%;
  max-width: 410px;
  justify-self: end;
  padding: clamp(26px, 4vw, 42px);
  border: 1px solid #333;
  border-radius: 22px;
  background: linear-gradient(145deg, #1b1b1b, #151515);
  box-shadow: 0 25px 90px rgba(0, 0, 0, 0.3);
}

.login-card-symbol {
  width: 48px;
  height: 48px;
  margin-bottom: 30px;
  border-radius: 14px;
  font-size: 26px;
}

.login-card-eyebrow { color: #999; font-size: 10px; }

.login-card h2 {
  margin: 9px 0 10px;
  color: #fff;
  font-size: 29px;
  font-weight: 800;
  letter-spacing: -1px;
}

.login-card-description {
  margin: 0;
  color: #aaa;
  font-size: 13px;
  line-height: 1.7;
}

.login-demo-info {
  display: flex;
  align-items: center;
  gap: 13px;
  margin: 28px 0 23px;
  padding: 16px;
  border: 1px solid #343434;
  border-radius: 12px;
  background: #202020;
}

.login-demo-icon {
  display: grid;
  place-items: center;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(255, 208, 0, 0.12);
  color: var(--login-yellow);
  font-size: 23px;
}

.login-demo-info strong,
.login-demo-info small { display: block; }

.login-demo-info strong {
  margin-bottom: 5px;
  color: #f5f5f5;
  font-size: 12px;
}

.login-demo-info small {
  color: #999;
  font-size: 11px;
  line-height: 1.5;
}

.login-submit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 54px;
  padding: 0 18px;
  border: 0;
  border-radius: 11px;
  background: var(--login-yellow);
  color: #111;
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.login-submit span { font-size: 20px; transition: transform 0.2s ease; }
.login-submit:hover { background: #ffe05b; transform: translateY(-2px); }
.login-submit:hover span { transform: translateX(3px); }

.login-submit:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 4px;
}

.login-card-note {
  margin: 17px 0 0;
  color: #777;
  font-size: 10px;
  text-align: center;
}

.login-footer {
  position: relative;
  z-index: 1;
  padding-top: 20px;
  border-top: 1px solid #292929;
  color: #777;
  font-size: 10px;
  letter-spacing: 0.7px;
}

/* Responsividade da tela de entrada */
@media (max-width: 850px) {
  .demo-login { padding: 24px 5%; }

  .login-content {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 38px;
    max-width: 540px;
    margin: 55px auto;
  }

  .login-copy { text-align: center; }

  .login-copy h1 {
    font-size: clamp(39px, 8vw, 58px);
    letter-spacing: -1.8px;
  }

  .login-copy > p { margin-inline: auto; font-size: 14px; }
  .login-features { display: inline-grid; text-align: left; }
  .login-card { justify-self: center; max-width: 460px; }
}

@media (max-width: 480px) {
  .demo-login { padding: 20px 20px 16px; }
  .login-brand-mark { width: 38px; height: 38px; font-size: 21px; }
  .login-brand-name { font-size: 17px; }
  .login-version { gap: 6px; padding: 8px; font-size: 8px; letter-spacing: 0.5px; }
  .login-content { gap: 30px; margin: 38px auto; }
  .login-eyebrow { font-size: 9px; letter-spacing: 1.4px; }

  .login-copy h1 {
    margin: 16px 0;
    font-size: clamp(34px, 9vw, 43px);
  }

  .login-copy > p { font-size: 13px; line-height: 1.7; }
  .login-features { gap: 13px; margin-top: 23px; }
  .login-feature { font-size: 12px; }
  .login-card { padding: 25px 21px; border-radius: 17px; }
  .login-card-symbol { margin-bottom: 23px; }
  .login-card h2 { font-size: 25px; }
  .login-footer { gap: 12px; font-size: 8px; letter-spacing: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .demo-login,
  .login-submit,
  .login-submit span { transition: none; }
}

/* Campos do login */
.login-form {
  display: grid;
  gap: 19px;
  margin-top: 27px;
}

.login-field { display: grid; gap: 9px; }

.login-field label {
  color: #e7e7e7;
  font-size: 12px;
  font-weight: 700;
}

.login-field input {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 49px;
  padding: 0 14px;
  border: 1px solid #3a3a3a;
  border-radius: 9px;
  outline: none;
  background: #111;
  color: #fff;
  font: inherit;
  font-size: 13px;
  transition: border-color 0.2s ease;
}

.login-field input::placeholder { color: #777; }

.login-field input:focus {
  border-color: #ffd000;
  box-shadow: 0 0 0 3px rgba(255, 208, 0, 0.1);
}

.login-password-wrap { position: relative; display: flex; align-items: center; }
.login-password-wrap input { padding-right: 82px; }

.login-password-toggle {
  position: absolute;
  right: 12px;
  padding: 6px 0;
  border: 0;
  background: transparent;
  color: #ffd000;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.login-error { margin: -5px 0 0; color: #ff8d8d; font-size: 12px; line-height: 1.5; }
.login-error[hidden] { display: none !important; }
.demo-login[hidden] { display: none !important; }

/* =========================================
   KOMPANY FLOW — TELA INICIAL + LOGIN
   ========================================= */

/* Mantém o fundo cinza original do Kompany Flow */
body {
  background: var(--background);
  color: var(--ink);
}

/* Mantém a plataforma escondida antes do login */
.app-shell {
  display: none;
}

.demo-login {
  --flow-yellow: #ffd51a;
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: block;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: auto;
  padding: 0;
  color: #f8f8fa;
  background:
    radial-gradient(ellipse at 0% 0%, rgba(255,213,26,.13), transparent 26%),
    radial-gradient(ellipse at 100% 100%, rgba(255,213,26,.12), transparent 27%),
    linear-gradient(135deg,#101012 0%,#151519 52%,#0b0b0d 100%);
}

.demo-login::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .14;
  background-image: radial-gradient(rgba(255,255,255,.25) .55px,transparent .7px);
  background-size: 5px 5px;
}

.flow-welcome {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 80px 22px 105px;
  text-align: center;
}

.flow-welcome-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  animation: flowEnter .65s ease both;
}

.flow-logo-mark {
  width: 120px;
  height: 120px;
  display: grid;
  place-items: center;
  position: relative;
  margin-bottom: 21px;
  border: 2px solid var(--flow-yellow);
  border-radius: 21px;
  background: rgba(10,10,12,.72);
  color: #fff;
  box-shadow: 0 0 35px rgba(255,213,26,.06);
  font-family: Manrope, Arial, sans-serif;
  font-size: 70px;
  font-weight: 800;
  letter-spacing: -7px;
  padding-right: 7px;
}

.flow-logo-mark span { color: var(--flow-yellow); }

.flow-welcome h1 {
  margin: 0;
  color: #f7f7f8;
  font-family: Manrope, Arial, sans-serif;
  font-size: clamp(35px,5vw,56px);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -2px;
}

.flow-welcome h1 span { color: var(--flow-yellow); }

.flow-welcome p {
  margin: 22px 0 0;
  color: #a6a6ae;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 4px;
}

.flow-access-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  min-width: 278px;
  min-height: 58px;
  margin-top: 50px;
  padding: 0 26px;
  border: 0;
  border-radius: 13px;
  color: #111;
  background: var(--flow-yellow);
  box-shadow: 0 10px 35px rgba(255,213,26,.16);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .2s ease,background .2s ease,box-shadow .2s ease;
}

.flow-access-button span { font-size: 22px; transition: transform .2s ease; }

.flow-access-button:hover {
  transform: translateY(-2px);
  background: #ffe04a;
  box-shadow: 0 14px 42px rgba(255,213,26,.22);
}

.flow-access-button:hover span { transform: translateX(4px); }

.login-footer {
  position: absolute;
  z-index: 1;
  bottom: 27px;
  left: 16px;
  right: 16px;
  display: flex;
  justify-content: center;
  color: #8d8d94;
  font-size: 11px;
  letter-spacing: 1.5px;
}

.flow-login-view {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 78px 22px 65px;
  animation: flowEnter .35s ease both;
}

.flow-login-view[hidden],
.flow-welcome[hidden] { display: none !important; }

.flow-back-button {
  position: absolute;
  top: 27px;
  left: max(24px,calc((100vw - 440px)/2));
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  padding: 10px 0;
  background: transparent;
  color: #c5c5cc;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.flow-back-button:hover { color: var(--flow-yellow); }

.flow-login-view .login-card {
  width: min(100%,440px);
  padding: 38px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 22px;
  background: rgba(27,27,30,.9);
  box-shadow: 0 28px 100px rgba(0,0,0,.38);
  backdrop-filter: blur(18px);
}

.flow-login-view .login-card-symbol {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 25px;
  border: 1.5px solid var(--flow-yellow);
  border-radius: 13px;
  color: #fff;
  background: #111;
  font: 800 29px Manrope,Arial,sans-serif;
  letter-spacing: -3px;
}

.flow-login-view .login-card-symbol span { color: var(--flow-yellow); }

.flow-login-view .login-card-eyebrow {
  color: var(--flow-yellow);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.8px;
}

.flow-login-view .login-card h2 {
  margin: 12px 0 8px;
  color: #fff;
  font: 800 29px/1.2 Manrope,Arial,sans-serif;
  letter-spacing: -1px;
}

.flow-login-view .login-card-description {
  margin: 0 0 24px;
  color: #a8a8b0;
  font-size: 13px;
  line-height: 1.7;
}

.flow-login-view .login-form { display: flex; flex-direction: column; gap: 17px; }
.flow-login-view .login-field { display: flex; flex-direction: column; gap: 8px; }

.flow-login-view .login-field label {
  color: #dedee2;
  font-size: 12px;
  font-weight: 700;
}

.flow-login-view .login-field input {
  width: 100%;
  min-height: 47px;
  box-sizing: border-box;
  padding: 0 13px;
  border: 1px solid #414148;
  border-radius: 9px;
  outline: none;
  color: #f6f6f8;
  background: #202024;
  font: inherit;
  font-size: 13px;
}

.flow-login-view .login-field input::placeholder { color: #777780; }

.flow-login-view .login-field input:focus {
  border-color: var(--flow-yellow);
  box-shadow: 0 0 0 3px rgba(255,213,26,.09);
}

.flow-login-view .login-password-wrap { position: relative; display: flex; align-items: center; }
.flow-login-view .login-password-wrap input { padding-right: 76px; }

.flow-login-view .login-password-toggle {
  position: absolute;
  right: 11px;
  border: 0;
  color: var(--flow-yellow);
  background: transparent;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.flow-login-view .login-error { margin: 0; color: #ff9696; font-size: 12px; line-height: 1.5; }
.flow-login-view .login-error[hidden] { display: none !important; }

.flow-login-view .login-submit {
  width: 100%;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 2px;
  padding: 0 17px;
  border: 0;
  border-radius: 10px;
  color: #111;
  background: var(--flow-yellow);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: background .2s ease,transform .2s ease;
}

.flow-login-view .login-submit:hover { background: #ffe04a; transform: translateY(-1px); }
.flow-login-view .login-submit span { font-size: 20px; }
.flow-login-view .login-card-note { margin: 23px 0 0; color: #77777f; font-size: 11px; text-align: center; }
.demo-login.is-hidden { display: none !important; }

@keyframes flowEnter {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 600px) {
  .flow-logo-mark { width: 94px; height: 94px; border-radius: 18px; font-size: 55px; letter-spacing: -6px; }
  .flow-welcome h1 { font-size: clamp(30px,8vw,42px); letter-spacing: -1.5px; }
  .flow-welcome p { max-width: 280px; font-size: 9px; line-height: 1.8; letter-spacing: 2.5px; }
  .flow-access-button { min-width: 245px; min-height: 54px; margin-top: 38px; }
  .login-footer { bottom: 20px; font-size: 9px; }
  .flow-login-view { padding: 76px 18px 45px; }
  .flow-back-button { top: 18px; left: 22px; }
  .flow-login-view .login-card { padding: 28px 23px; border-radius: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .flow-welcome-brand, .flow-login-view { animation: none; }
  .flow-access-button, .flow-access-button span { transition: none; }
}

/* Correção do ponto no símbolo da Kompany Flow */
.flow-logo-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  letter-spacing: 0;
}

.flow-logo-mark span {
  display: inline-block;
  position: relative;
  left: -5px;
  top: -7px;
  color: var(--flow-yellow);
  font-size: 0.65em;
  line-height: 1;
  letter-spacing: 0;
}

/* Centralização da tela de acesso — Kompany Flow */
#flowLoginView {
  width: 100%;
  min-height: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}

/* Centraliza o conteúdo e mantém os campos alinhados */
#flowLoginView > * {
  margin-left: auto;
  margin-right: auto;
}

#flowLoginView form {
  width: 100%;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

#flowLoginView input {
  width: 100%;
  box-sizing: border-box;
}

#flowLoginView button {
  max-width: 100%;
}

/* Adaptação para celulares */
@media (max-width: 600px) {
  #flowLoginView {
    padding: 28px 20px;
  }

  #flowLoginView form {
    max-width: 100%;
  }
}