:root {
  --brand-primary: #155eef;
  --brand-secondary: #0b1f4d;
  --brand-accent: #13b5ea;
  --bg: #f4f7fb;
  --surface: #fff;
  --surface-2: #f8fafc;
  --text: #172033;
  --muted: #68738a;
  --line: #e5e9f1;
  --success: #15996c;
  --warning: #d58b18;
  --danger: #d9435f;
  --info: #2675e8;
  --sidebar: 260px;
  --radius: 16px;
  --shadow: 0 12px 32px rgba(23, 32, 51, 0.08);
  --shadow-sm: 0 5px 18px rgba(23, 32, 51, 0.07);
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family:
    Inter,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--text);
  background: var(--bg);
  font-size: 14px;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
img {
  max-width: 100%;
}
.icon {
  display: block;
  flex: none;
}
.app-shell {
  min-height: 100vh;
  display: flex;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar);
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #081630, #0c2250 62%, #0a1b3d);
  color: #dfe9ff;
  z-index: 40;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}
.sidebar-brand {
  height: 76px;
  padding: 17px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.sidebar-brand img {
  width: 178px;
  height: 49px;
  object-fit: contain;
  object-position: left center;
}
.sidebar-close {
  display: none;
  color: #fff;
}
.company-chip {
  margin: 16px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.045);
  border-radius: 14px;
}
.company-mark,
.user-avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(
    145deg,
    var(--brand-primary),
    var(--brand-accent)
  );
  color: white;
  font-weight: 800;
  box-shadow: 0 6px 18px rgba(19, 181, 234, 0.2);
}
.company-chip div:last-child,
.sidebar-user {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.company-chip strong,
.sidebar-user strong {
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.company-chip small,
.sidebar-user small {
  margin-top: 3px;
  color: #9eb0d0;
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-nav {
  flex: 1;
  padding: 4px 12px 20px;
  overflow: auto;
}
.sidebar-nav::-webkit-scrollbar {
  width: 4px;
}
.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 8px;
}
.nav-section {
  padding: 18px 10px 7px;
  color: #6f87b4;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 11px;
  margin: 3px 0;
  color: #b7c6e4;
  border-radius: 11px;
  font-weight: 500;
  transition: 0.18s;
}
.nav-link .icon {
  opacity: 0.88;
}
.nav-link:hover {
  color: white;
  background: rgba(255, 255, 255, 0.07);
  transform: translateX(2px);
}
.nav-link.active {
  color: white;
  background: linear-gradient(
    90deg,
    rgba(21, 94, 239, 0.46),
    rgba(19, 181, 234, 0.18)
  );
  box-shadow: inset 3px 0 0 var(--brand-accent);
}
.sidebar-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.sidebar-footer .user-avatar {
  width: 34px;
  height: 34px;
  font-size: 12px;
}
.sidebar-user {
  flex: 1;
}
.icon-btn {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: inherit;
  display: grid;
  place-items: center;
  transition: 0.18s;
}
.icon-btn:hover {
  background: rgba(130, 150, 190, 0.12);
}
.main-area {
  min-width: 0;
  flex: 1;
  margin-left: var(--sidebar);
}
.topbar {
  height: 76px;
  position: sticky;
  top: 0;
  z-index: 25;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
}
.topbar-subtitle {
  display: block;
  color: var(--muted);
  margin-top: 3px;
}
.mobile-menu {
  display: none;
}
.global-search {
  width: min(620px, 55vw);
  height: 42px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  border: 1px solid var(--line);
  background: #f8fafc;
  border-radius: 12px;
  position: relative;
  transition: 0.2s;
}
.global-search:focus-within {
  background: white;
  border-color: rgba(21, 94, 239, 0.45);
  box-shadow: 0 0 0 4px rgba(21, 94, 239, 0.08);
}
.global-search input {
  border: 0;
  outline: 0;
  background: transparent;
  flex: 1;
  min-width: 0;
  color: var(--text);
}
.global-search kbd {
  font-size: 10px;
  padding: 3px 6px;
  border: 1px solid #d9dee9;
  border-radius: 5px;
  color: #8791a5;
  background: #fff;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.03);
}
.search-suggestions {
  position: absolute;
  left: 0;
  right: 0;
  top: 48px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 8px;
  display: none;
  max-height: 420px;
  overflow: auto;
}
.search-suggestions.open {
  display: block;
}
.search-suggestions a {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 10px;
  border-radius: 9px;
}
.search-suggestions a:hover {
  background: #f3f6fb;
}
.search-suggestions small {
  color: var(--muted);
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.notification-btn {
  position: relative;
  color: #48546b;
}
.notification-btn span {
  position: absolute;
  right: 2px;
  top: 1px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--danger);
  color: white;
  font-size: 9px;
  display: grid;
  place-items: center;
  font-weight: 700;
}
.topbar-profile {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-left: 12px;
  border-left: 1px solid var(--line);
}
.user-avatar.small {
  width: 34px;
  height: 34px;
  font-size: 11px;
}
.topbar-profile div:last-child {
  display: flex;
  flex-direction: column;
}
.topbar-profile strong {
  font-size: 12px;
}
.topbar-profile small {
  font-size: 10px;
  color: var(--muted);
  margin-top: 2px;
}
.page-wrap {
  padding: 26px 28px 50px;
  max-width: 1680px;
  margin: 0 auto;
}
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}
.page-title h1 {
  margin: 0;
  font-size: 26px;
  letter-spacing: -0.035em;
}
.page-title p {
  margin: 7px 0 0;
  color: var(--muted);
  max-width: 720px;
  line-height: 1.55;
}
.page-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}
.btn {
  border: 1px solid transparent;
  border-radius: 10px;
  min-height: 40px;
  padding: 0 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 13px;
  transition: 0.18s;
  white-space: nowrap;
}
.btn:hover {
  transform: translateY(-1px);
}
.btn-primary {
  background: linear-gradient(135deg, var(--brand-primary), #3277ff);
  color: #fff;
  box-shadow: 0 7px 18px rgba(21, 94, 239, 0.19);
}
.btn-primary:hover {
  filter: brightness(1.04);
}
.btn-secondary {
  background: white;
  border-color: var(--line);
  color: #34405a;
}
.btn-secondary:hover {
  border-color: #cbd3e1;
  background: #fafbfe;
}
.btn-danger {
  background: #fff1f3;
  border-color: #ffd7df;
  color: #c93651;
}
.btn-success {
  background: #e9fbf4;
  border-color: #c5f1df;
  color: #087b53;
}
.btn-ghost {
  background: transparent;
  color: var(--muted);
}
.btn-sm {
  min-height: 32px;
  padding: 0 10px;
  font-size: 11px;
  border-radius: 8px;
}
.btn-block {
  width: 100%;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}
.card-header h2,
.card-header h3 {
  margin: 0;
  font-size: 15px;
}
.card-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.card-body {
  padding: 20px;
}
.card-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  background: #fbfcfe;
  border-radius: 0 0 var(--radius) var(--radius);
}
.grid {
  display: grid;
  gap: 18px;
}
.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.grid-main {
  grid-template-columns: minmax(0, 1.7fr) minmax(320px, 0.8fr);
}
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(190px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.metric-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 13px;
  padding: 18px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 15px;
  box-shadow: var(--shadow-sm);
  transition: 0.2s;
}
.metric-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: #d7deeb;
}
.metric-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(
    145deg,
    rgba(21, 94, 239, 0.12),
    rgba(19, 181, 234, 0.08)
  );
  color: var(--brand-primary);
}
.metric-label {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}
.metric-value {
  display: block;
  font-size: 22px;
  letter-spacing: -0.03em;
  margin-top: 4px;
}
.metric-card small {
  display: block;
  color: var(--muted);
  margin-top: 3px;
  font-size: 10px;
}
.metric-arrow {
  color: #a5afbf;
}
.filters {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px;
  margin-bottom: 17px;
}
.filters .field {
  min-width: 150px;
  flex: 1;
}
.filters .search-field {
  min-width: 260px;
  flex: 2;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field > label,
.form-grid > label,
label.form-label {
  font-size: 11px;
  color: #566178;
  font-weight: 700;
}
.form-control,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="date"],
input[type="datetime-local"],
input[type="url"],
select,
textarea {
  width: 100%;
  border: 1px solid #dfe4ed;
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  min-height: 40px;
  padding: 9px 11px;
  outline: 0;
  transition: 0.18s;
}
.form-control:focus,
input:focus,
select:focus,
textarea:focus {
  border-color: rgba(21, 94, 239, 0.55);
  box-shadow: 0 0 0 4px rgba(21, 94, 239, 0.08);
}
textarea {
  min-height: 100px;
  resize: vertical;
}
.form-grid {
  margin: 20px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}
.form-grid .span-2 {
  grid-column: span 2;
}
.form-section {
  margin-bottom: 24px;
}
.form-section-title {
  font-size: 13px;
  margin: 0 0 13px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.hint {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.5;
}
.check-row {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 8px;
  font-weight: 500 !important;
  color: var(--text) !important;
}
.check-row input {
  width: 16px;
  height: 16px;
}
.table-wrap {
  overflow: auto;
}
.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}
.table th {
  background: #f8fafc;
  padding: 11px 14px;
  text-align: left;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.055em;
  color: #69758b;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.table td {
  padding: 13px 14px;
  border-bottom: 1px solid #edf0f5;
  vertical-align: middle;
}
.table tbody tr:last-child td {
  border-bottom: 0;
}
.table tbody tr:hover {
  background: #fbfcfe;
}
.table .actions {
  display: flex;
  justify-content: flex-end;
  gap: 5px;
}
.cell-title {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.cell-title strong {
  font-size: 12px;
}
.cell-title small {
  color: var(--muted);
  font-size: 10px;
}
.money {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.025em;
  text-transform: uppercase;
  white-space: nowrap;
}
.badge-neutral {
  background: #eef1f6;
  color: #5d687c;
}
.badge-primary {
  background: #eaf0ff;
  color: #155eef;
}
.badge-success {
  background: #e7f8f1;
  color: #087d57;
}
.badge-warning {
  background: #fff4df;
  color: #a36708;
}
.badge-danger {
  background: #ffedf1;
  color: #c53450;
}
.badge-info {
  background: #e8f4ff;
  color: #1670bd;
}
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.empty-state {
  text-align: center;
  padding: 45px 20px;
  color: var(--muted);
}
.empty-state .empty-icon {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
  background: #f0f4fa;
  color: #7a88a2;
}
.empty-state h3 {
  margin: 0;
  color: var(--text);
}
.empty-state p {
  max-width: 420px;
  margin: 8px auto 18px;
  line-height: 1.6;
}
.pagination {
  display: flex;
  justify-content: center;
  gap: 5px;
  list-style: none;
  padding: 16px;
  margin: 0;
}

.cardconflabel {
  display: flex;
  font-size: 11px;
  color: #566178;
  font-weight: 700;
}

.cardconflabel label{
  width: 50%;
}

.pagination .page-link {
  min-width: 32px;
  height: 32px;
  padding: 0 9px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  display: grid;
  place-items: center;
}
.pagination .active .page-link {
  background: var(--brand-primary);
  color: white;
  border-color: var(--brand-primary);
}
.toast {
  position: fixed;
  right: 24px;
  top: 92px;
  z-index: 100;
  max-width: 430px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 14px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  animation: toastIn 0.25s ease;
  background: white;
  border: 1px solid var(--line);
}
.toast-success {
  border-left: 4px solid var(--success);
}
.toast-error {
  border-left: 4px solid var(--danger);
}
.toast button {
  margin-left: auto;
  border: 0;
  background: none;
  color: var(--muted);
}
@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.tabs {
  display: flex;
  gap: 5px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
  overflow: auto;
}
.tab-link {
  padding: 11px 13px;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}
.tab-link.active {
  color: var(--brand-primary);
  border-color: var(--brand-primary);
}
.tab-panel {
  display: none;
}
.tab-panel.active {
  display: block;
}
.profile-hero {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 22px;
}
.profile-avatar {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(
    145deg,
    var(--brand-primary),
    var(--brand-accent)
  );
  color: white;
  font-size: 22px;
  font-weight: 800;
}
.profile-info {
  flex: 1;
}
.profile-info h1 {
  margin: 0 0 5px;
  font-size: 22px;
}
.profile-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 11px;
}
.profile-actions {
  display: flex;
  gap: 8px;
}
.summary-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid var(--line);
}
.summary-item {
  padding: 15px 18px;
  border-right: 1px solid var(--line);
}
.summary-item:last-child {
  border-right: 0;
}
.summary-item small {
  display: block;
  color: var(--muted);
  font-size: 10px;
}
.summary-item strong {
  display: block;
  margin-top: 5px;
  font-size: 15px;
}
.timeline {
  position: relative;
  padding-left: 24px;
}
.timeline:before {
  content: "";
  position: absolute;
  left: 8px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: #e3e8f2;
}
.timeline-item {
  position: relative;
  padding: 0 0 19px 16px;
}
.timeline-dot {
  position: absolute;
  left: -21px;
  top: 3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: white;
  border: 3px solid var(--brand-primary);
  box-shadow: 0 0 0 4px #eef3ff;
}
.timeline-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.timeline-head strong {
  font-size: 12px;
}
.timeline-head time {
  color: var(--muted);
  font-size: 10px;
}
.timeline-body {
  margin-top: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  background: #fbfcfe;
  border-radius: 11px;
  color: #4f5c73;
  line-height: 1.55;
}
.timeline-footer {
  margin-top: 8px;
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 10px;
}
.kanban {
  display: grid;
  grid-template-columns: repeat(6, minmax(260px, 1fr));
  gap: 12px;
  overflow: auto;
  padding-bottom: 12px;
}
.kanban-column {
  background: #eef2f7;
  border-radius: 14px;
  min-height: 500px;
  padding: 10px;
}
.kanban-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 5px 11px;
}
.kanban-header h3 {
  margin: 0;
  font-size: 12px;
}
.kanban-header span {
  font-size: 10px;
  color: var(--muted);
}
.kanban-total {
  font-size: 10px;
  color: var(--muted);
  padding: 0 5px 9px;
}
.kanban-cards {
  min-height: 420px;
}
.deal-card {
  background: white;
  border: 1px solid #e1e6ef;
  border-radius: 12px;
  padding: 13px;
  margin-bottom: 9px;
  box-shadow: 0 4px 12px rgba(31, 46, 73, 0.055);
  cursor: grab;
}
.deal-card.dragging {
  opacity: 0.45;
  transform: rotate(1deg);
}
.kanban-column.drag-over {
  outline: 2px dashed var(--brand-primary);
  outline-offset: -4px;
}
.deal-card h4 {
  margin: 0 0 5px;
  font-size: 12px;
}
.deal-card .customer {
  color: var(--muted);
  font-size: 10px;
}
.deal-card .deal-value {
  font-size: 14px;
  font-weight: 800;
  margin: 12px 0 9px;
}
.deal-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #edf0f4;
  padding-top: 9px;
}
.owner-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 9px;
  color: var(--muted);
}
.owner-chip span {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  color: white;
  background: var(--brand-secondary);
  font-weight: 700;
}
.due-chip {
  font-size: 9px;
  color: var(--muted);
}
.due-chip.overdue {
  color: var(--danger);
  font-weight: 700;
}
.stage-pipeline {
  display: flex;
  gap: 3px;
  margin: 15px 0 20px;
}
.stage-step {
  flex: 1;
  text-align: center;
  padding: 9px 6px;
  background: #edf1f6;
  color: #778298;
  font-size: 9px;
  font-weight: 700;
  position: relative;
}
.stage-step:first-child {
  border-radius: 9px 0 0 9px;
}
.stage-step:last-child {
  border-radius: 0 9px 9px 0;
}
.stage-step.done {
  background: #dfe9ff;
  color: var(--brand-primary);
}
.stage-step.current {
  background: var(--brand-primary);
  color: white;
}
.activity-list {
  display: flex;
  flex-direction: column;
}
.activity-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.activity-item:last-child {
  border-bottom: 0;
}
.activity-date {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #f2f5fa;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.activity-date strong {
  font-size: 15px;
}
.activity-date small {
  font-size: 8px;
  color: var(--muted);
  text-transform: uppercase;
}
.activity-date.overdue {
  background: #fff0f3;
  color: var(--danger);
}
.activity-info strong {
  display: block;
  font-size: 12px;
}
.activity-info small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 4px;
}
.activity-actions {
  display: flex;
  gap: 5px;
}
.chart {
  width: 100%;
  height: 260px;
  position: relative;
}
.chart canvas {
  width: 100%;
  height: 100%;
}
.progress {
  height: 8px;
  background: #edf1f6;
  border-radius: 99px;
  overflow: hidden;
}
.progress > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--brand-primary), var(--brand-accent));
  border-radius: 99px;
}
.goal-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
}
.goal-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.goal-head strong {
  font-size: 12px;
}
.goal-head span {
  font-size: 11px;
  font-weight: 800;
  color: var(--brand-primary);
}
.goal-values {
  display: flex;
  justify-content: space-between;
  margin-top: 9px;
  color: var(--muted);
  font-size: 10px;
}
.item-builder {
  border: 1px solid var(--line);
  border-radius: 13px;
  overflow: hidden;
}
.item-row {
  display: grid;
  grid-template-columns: 2fr 0.65fr 1fr 1fr auto;
  gap: 8px;
  align-items: end;
  padding: 11px;
  border-bottom: 1px solid var(--line);
}
.item-row:last-child {
  border-bottom: 0;
}
.item-row .field {
  gap: 4px;
}
.item-row label {
  font-size: 9px;
}
.item-remove {
  margin-bottom: 1px;
}
.proposal-paper {
  max-width: 930px;
  margin: 0 auto;
  background: white;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 50px;
  min-height: 1120px;
}
.proposal-brand {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  border-bottom: 3px solid var(--brand-primary);
  padding-bottom: 20px;
}
.proposal-brand img {
  width: 180px;
  max-height: 75px;
  object-fit: contain;
  object-position: left;
}
.proposal-brand .issuer {
  text-align: right;
  font-size: 10px;
  line-height: 1.6;
  color: #526078;
}
.proposal-title {
  display: flex;
  justify-content: space-between;
  margin: 28px 0;
}
.proposal-title h1 {
  margin: 0;
  font-size: 24px;
  color: var(--brand-secondary);
}
.proposal-title strong {
  display: block;
  text-align: right;
}
.proposal-parties {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 25px;
}
.proposal-box {
  border: 1px solid #dfe4ed;
  padding: 14px;
  border-radius: 10px;
}
.proposal-box h3 {
  margin: 0 0 8px;
  font-size: 10px;
  text-transform: uppercase;
  color: var(--brand-primary);
}
.proposal-box p {
  margin: 3px 0;
  font-size: 11px;
}
.proposal-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
}
.proposal-table th {
  background: var(--brand-secondary);
  color: white;
  text-align: left;
  padding: 10px;
  font-size: 9px;
}
.proposal-table td {
  padding: 10px;
  border-bottom: 1px solid #e6e9ef;
  font-size: 10px;
}
.proposal-totals {
  margin-left: auto;
  width: 340px;
}
.proposal-totals div {
  display: flex;
  justify-content: space-between;
  padding: 7px 0;
  border-bottom: 1px solid #e9edf3;
}
.proposal-totals .grand {
  font-size: 15px;
  font-weight: 800;
  color: var(--brand-primary);
  border-top: 2px solid var(--brand-primary);
}
.proposal-terms {
  margin-top: 28px;
}
.proposal-terms h3 {
  font-size: 11px;
  color: var(--brand-secondary);
  margin: 15px 0 5px;
}
.proposal-terms p {
  font-size: 10px;
  color: #47536a;
  line-height: 1.65;
  white-space: pre-line;
}
.proposal-footer {
  margin-top: 50px;
  padding-top: 15px;
  border-top: 1px solid #dfe4ed;
  text-align: center;
  color: #778197;
  font-size: 9px;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 14, 31, 0.56);
  z-index: 90;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-backdrop.open {
  display: flex;
}
.modal {
  background: white;
  border-radius: 16px;
  width: min(620px, 100%);
  max-height: 90vh;
  overflow: auto;
  box-shadow: 0 30px 80px rgba(5, 14, 31, 0.3);
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}
.modal-header h3 {
  margin: 0;
}
.modal-body {
  padding: 20px;
}
.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.color-input {
  display: flex;
  align-items: center;
  gap: 9px;
}
.color-input input[type="color"] {
  width: 44px;
  height: 40px;
  padding: 3px;
}
.logo-preview {
  height: 70px;
  max-width: 240px;
  object-fit: contain;
  background: #edf2f8;
  border-radius: 10px;
  padding: 8px;
}
.master-label {
  margin: 16px;
  padding: 8px 12px;
  border: 1px solid rgba(19, 181, 234, 0.28);
  background: rgba(19, 181, 234, 0.1);
  color: #73d9ff;
  border-radius: 9px;
  text-align: center;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
}
.login-body {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(420px, 1.1fr) minmax(420px, 0.9fr);
  background: white;
}
.login-visual {
  position: relative;
  overflow: hidden;
  background: radial-gradient(
    circle at 20% 15%,
    #173d8c 0,
    #0b214c 42%,
    #07152e 100%
  );
  padding: 45px 7vw;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.visual-glow {
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: rgba(19, 181, 234, 0.2);
  filter: blur(80px);
  right: -180px;
  bottom: -190px;
}
.login-logo {
  object-fit: contain;
  object-position: left;
  position: relative;
  z-index: 1;
}
.login-copy {
  margin: auto 0;
  max-width: 650px;
  position: relative;
  z-index: 1;
}
.eyebrow {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.15em;
  color: var(--brand-accent);
}
.login-copy h1 {
  font-size: 48px;
  line-height: 1.08;
  letter-spacing: -0.05em;
  margin: 18px 0;
}
.login-copy p {
  font-size: 16px;
  line-height: 1.65;
  color: #b9c9e7;
  max-width: 560px;
}
.login-features {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  margin-top: 28px;
}
.login-features span {
  padding: 8px 11px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 11px;
  color: #d8e6ff;
}
.login-panel {
  display: grid;
  place-items: center;
  padding: 45px;
  background: linear-gradient(180deg, #fff, #f7f9fc);
}
.login-card {
  width: min(390px, 100%);
}
.login-icon {
  display: none;
  width: 255px;
  height: 155px;
  object-fit: contain;
}
.login-card h2 {
  font-size: 30px;
  margin: 10px 0 5px;
  letter-spacing: -0.04em;
}
.login-card > p {
  color: var(--muted);
  margin: 0 0 28px;
}
.login-card > label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 15px;
  font-size: 11px;
  font-weight: 700;
}
.password-field {
  display: flex;
  position: relative;
}
.password-field input {
  padding-right: 68px;
}
.password-field button {
  position: absolute;
  right: 5px;
  top: 5px;
  height: 30px;
  border: 0;
  background: #f0f3f8;
  border-radius: 7px;
  font-size: 9px;
  color: #536078;
}
.form-alert {
  padding: 11px;
  border-radius: 9px;
  background: #fff0f3;
  color: #b82d48;
  margin-bottom: 15px;
  font-size: 11px;
}
.demo-credentials {
  margin-top: 18px;
  border: 1px dashed #d8deea;
  background: #f8fafc;
  padding: 12px;
  border-radius: 10px;
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 10px;
}
.demo-credentials strong {
  color: var(--text);
}
.demo-credentials code {
  color: var(--brand-primary);
}
.sidebar-overlay {
  display: none;
}
.split-view {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 18px;
}
.settings-nav {
  position: sticky;
  top: 100px;
  height: max-content;
}
.settings-nav button {
  width: 100%;
  text-align: left;
  padding: 11px;
  border: 0;
  background: none;
  border-radius: 9px;
  color: var(--muted);
  font-weight: 600;
}
.settings-nav button.active {
  background: #edf3ff;
  color: var(--brand-primary);
}
.settings-panel {
  display: none;
}
.settings-panel.active {
  display: block;
}
.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.mini-stat {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.mini-stat small {
  display: block;
  color: var(--muted);
  font-size: 10px;
}
.mini-stat strong {
  display: block;
  font-size: 20px;
  margin-top: 5px;
}
.audit-json {
  max-width: 320px;
  white-space: pre-wrap;
  font-size: 9px;
  color: #68738a;
}
.notification-list {
  display: flex;
  flex-direction: column;
}
.notification-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
  align-items: start;
}
.notification-item.unread {
  background: #f5f8ff;
}
.notification-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: #eaf1ff;
  color: var(--brand-primary);
  display: grid;
  place-items: center;
}
.notification-item p {
  margin: 4px 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}
.notification-item time {
  font-size: 9px;
  color: var(--muted);
}
.search-results-list {
  display: grid;
  gap: 9px;
}
.search-result {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  background: white;
  border-radius: 12px;
}
.search-result:hover {
  border-color: #cdd7e8;
  box-shadow: var(--shadow-sm);
}
.search-result .result-type {
  width: 85px;
  color: var(--brand-primary);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}
.search-result strong {
  font-size: 12px;
}
.search-result small {
  display: block;
  color: var(--muted);
  margin-top: 3px;
}
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.inline-form {
  display: flex;
  gap: 8px;
  align-items: end;
}
.report-table {
  font-size: 11px;
}
.report-table th,
.report-table td {
  padding: 9px;
}
.report-summary {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.report-summary span {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
}
.text-muted {
  color: var(--muted);
}
.text-danger {
  color: var(--danger);
}
.text-success {
  color: var(--success);
}
.text-right {
  text-align: right;
}
.nowrap {
  white-space: nowrap;
}
.w-full {
  width: 100%;
}
.mb-0 {
  margin-bottom: 0;
}
.mt-2 {
  margin-top: 8px;
}
.mt-3 {
  margin-top: 14px;
}
.mb-3 {
  margin-bottom: 14px;
}
.hidden {
  display: none !important;
}
@media (max-width: 1280px) {
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .summary-strip {
    grid-template-columns: repeat(3, 1fr);
  }
  .summary-item:nth-child(3) {
    border-right: 0;
  }
  .grid-main {
    grid-template-columns: 1fr;
  }
  .stat-row {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 900px) {
  :root {
    --sidebar: 270px;
  }
  .sidebar {
    transform: translateX(-100%);
    transition: 0.25s;
  }
  .sidebar.open {
    transform: none;
  }
  .sidebar-close,
  .mobile-menu {
    display: grid;
  }
  .sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(4, 12, 28, 0.48);
    z-index: 35;
  }
  .sidebar-overlay.open {
    display: block;
  }
  .main-area {
    margin-left: 0;
  }
  .topbar {
    padding: 0 16px;
    height: 68px;
  }
  .global-search {
    width: min(560px, calc(100vw - 170px));
  }
  .topbar-profile {
    display: none;
  }
  .page-wrap {
    padding: 20px 16px 40px;
  }
  .page-header {
    align-items: flex-start;
  }
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-grid .span-2 {
    grid-column: span 1;
  }
  .split-view {
    grid-template-columns: 1fr;
  }
  .settings-nav {
    position: static;
    display: flex;
    overflow: auto;
  }
  .settings-nav button {
    width: auto;
    white-space: nowrap;
  }
  .login-body {
    grid-template-columns: 1fr;
  }
  .login-visual {
    display: none;
  }
  .login-panel {
    min-height: 100vh;
  }
  .login-icon {
    width: 100%;
    display: block;
  }
  .item-row {
    grid-template-columns: 1fr 1fr;
  }
  .item-row .field:first-child {
    grid-column: span 2;
  }
  .proposal-paper {
    padding: 28px;
  }
  .proposal-parties {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 620px) {
  .global-search kbd {
    display: none;
  }
  .global-search {
    width: calc(100vw - 125px);
  }
  .topbar-actions {
    gap: 2px;
  }
  .page-header {
    flex-direction: column;
  }
  .page-actions {
    width: 100%;
  }
  .page-actions .btn {
    flex: 1;
  }
  .metrics-grid,
  .grid-4,
  .stat-row {
    grid-template-columns: 1fr;
  }
  .summary-strip {
    grid-template-columns: 1fr 1fr;
  }
  .summary-item {
    border-bottom: 1px solid var(--line);
  }
  .summary-item:nth-child(2n) {
    border-right: 0;
  }
  .profile-hero {
    flex-direction: column;
  }
  .profile-actions {
    width: 100%;
  }
  .profile-actions .btn {
    flex: 1;
  }
  .filters {
    align-items: stretch;
  }
  .filters .field,
  .filters .search-field {
    min-width: 100%;
  }
  .table td,
  .table th {
    padding: 10px;
  }
  .item-row {
    grid-template-columns: 1fr;
  }
  .item-row .field:first-child {
    grid-column: span 1;
  }
  .proposal-paper {
    padding: 18px;
  }
  .proposal-brand,
  .proposal-title {
    flex-direction: column;
    gap: 15px;
  }
  .proposal-brand .issuer,
  .proposal-title strong {
    text-align: left;
  }
  .proposal-totals {
    width: 100%;
  }
  .login-panel {
    padding: 26px;
  }
  .modal-backdrop {
    padding: 8px;
  }
  .toast {
    left: 12px;
    right: 12px;
    top: 80px;
  }
  .activity-item {
    grid-template-columns: auto 1fr;
  }
  .activity-actions {
    grid-column: 2;
  }
}
.native-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(110px, 1fr));
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: auto;
  background: var(--line);
  gap: 1px;
}
.calendar-weekday {
  padding: 10px;
  background: #f7f9fc;
  text-align: center;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--muted);
  min-width: 110px;
}
.calendar-day {
  min-height: 112px;
  background: #fff;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.calendar-day.is-outside {
  background: #fafbfc;
  color: #a4adbc;
}
.calendar-day.is-today {
  box-shadow: inset 0 0 0 2px var(--brand-primary);
}
.calendar-day-number {
  font-size: 11px;
  font-weight: 800;
}
.calendar-event {
  display: block;
  border-left: 3px solid var(--brand-primary);
  background: #eef4ff;
  border-radius: 6px;
  padding: 5px 6px;
  font-size: 9px;
  line-height: 1.3;
}
.calendar-event.priority-urgent {
  border-color: var(--danger);
  background: #fff0f3;
}
.calendar-event.priority-high {
  border-color: var(--warning);
  background: #fff8e8;
}
.calendar-event.status-overdue {
  color: var(--danger);
}
.calendar-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}
.tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: #e9edf4;
  border-radius: 11px;
  width: max-content;
}
.tabs button {
  border: 0;
  background: transparent;
  padding: 8px 14px;
  border-radius: 8px;
  color: var(--muted);
  font-weight: 700;
}
.tabs button.active {
  background: #fff;
  color: var(--text);
  box-shadow: var(--shadow-sm);
}
.tab-panel {
  display: none;
}
.tab-panel.active {
  display: block;
}
@media (max-width: 800px) {
  .native-calendar {
    grid-template-columns: repeat(7, minmax(92px, 1fr));
  }
  .calendar-day {
    min-height: 96px;
  }
  .calendar-controls strong {
    display: none;
  }
}

/* Secure attachments */
.attachment-upload {
  display: grid;
  grid-template-columns: minmax(180px, 0.75fr) minmax(260px, 1.35fr) auto;
  gap: 12px;
  align-items: end;
  padding: 14px;
  border: 1px dashed var(--border);
  border-radius: 14px;
  background: var(--surface-soft);
}
.attachment-upload .field {
  margin: 0;
}
.attachment-upload .field span {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.attachment-upload input {
  width: 100%;
}
@media (max-width: 760px) {
  .attachment-upload {
    grid-template-columns: 1fr;
  }
  .attachment-upload .btn {
    width: 100%;
  }
}
.product-detail-hero {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  align-items: center;
}
.product-detail-hero img,
.product-placeholder {
  width: 220px;
  height: 180px;
  object-fit: contain;
  border-radius: 16px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
}
.product-placeholder {
  display: grid;
  place-items: center;
  color: var(--text-muted);
}
.spec-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.spec-grid > div {
  padding: 12px 14px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.spec-grid small {
  color: var(--text-muted);
}
.rich-text {
  line-height: 1.75;
}
.table-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}
@media (max-width: 760px) {
  .product-detail-hero {
    grid-template-columns: 1fr;
  }
  .product-detail-hero img,
  .product-placeholder {
    width: 100%;
  }
  .spec-grid {
    grid-template-columns: 1fr;
  }
}
.timeline-file {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
}
.timeline-file:hover {
  text-decoration: underline;
}

/* Correção do menu lateral responsivo e recolhível. */
.sidebar,
.main-area {
  transition:
    transform 0.25s ease,
    margin-left 0.25s ease,
    visibility 0.25s ease;
}
.sidebar-toggle {
  display: grid;
  flex: 0 0 auto;
  color: #44516a;
}
.topbar-leading {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

@media (min-width: 901px) {
  .app-shell.sidebar-collapsed .sidebar {
    transform: translateX(-101%);
    visibility: hidden;
    pointer-events: none;
  }
  .app-shell.sidebar-collapsed .main-area {
    margin-left: 0;
  }
  .sidebar-overlay {
    display: none !important;
  }
}

@media (max-width: 900px) {
  .sidebar {
    width: min(86vw, 320px);
    max-width: 320px;
    transform: translate3d(-105%, 0, 0);
    visibility: hidden;
    pointer-events: none;
    box-shadow: 18px 0 48px rgba(4, 12, 28, 0.24);
  }
  .sidebar.open {
    transform: translate3d(0, 0, 0);
    visibility: visible;
    pointer-events: auto;
  }
  .sidebar-overlay {
    display: block;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
      opacity 0.25s ease,
      visibility 0.25s ease;
  }
  .sidebar-overlay.open {
    display: block;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  .sidebar-toggle {
    display: grid;
  }
  body.sidebar-open {
    overflow: hidden;
    touch-action: none;
  }
  .topbar {
    gap: 10px;
  }
  .topbar-leading {
    flex: 1;
  }
}

@media (max-width: 620px) {
  .sidebar {
    width: min(90vw, 310px);
  }
  .sidebar-brand {
    height: 68px;
    padding: 13px 16px;
  }
  .sidebar-brand img {
    width: 160px;
    height: 43px;
  }
  .topbar-leading .topbar-subtitle {
    display: none;
  }
}

input {
  width: 100%;
  border: 1px solid #dfe4ed;
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  min-height: 40px;
  padding: 9px 11px;
  outline: 0;
  transition: 0.18s;
}

.inputcheckbox{
  width: 2%;
  border: 1px solid #dfe4ed;
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  min-height: 0px;
  padding: 9px 11px;
  outline: 0;
  transition: 0.18s;
}

/* AtlasCRM: identidade visual dinâmica por empresa */
.sidebar:not(.master-sidebar) {
  background: linear-gradient(180deg, color-mix(in srgb, var(--brand-secondary) 92%, #000), var(--brand-secondary) 62%, color-mix(in srgb, var(--brand-secondary) 82%, #000));
}
.nav-link.active {
  background: linear-gradient(90deg, color-mix(in srgb, var(--brand-primary) 55%, transparent), color-mix(in srgb, var(--brand-accent) 24%, transparent));
  box-shadow: inset 3px 0 0 var(--brand-accent);
}
.nav-link:hover { background: color-mix(in srgb, var(--brand-primary) 18%, transparent); }
.btn-primary {
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-accent));
  box-shadow: 0 7px 18px color-mix(in srgb, var(--brand-primary) 24%, transparent);
}
.stage-step.current { background: var(--brand-primary); }
.stage-step.done { background: color-mix(in srgb, var(--brand-primary) 14%, white); color: var(--brand-primary); }
.pagination .active .page-link { background: var(--brand-primary); border-color: var(--brand-primary); }
.settings-nav button.active { background: color-mix(in srgb, var(--brand-primary) 9%, white); color: var(--brand-primary); }

/* Evita que a identidade visual de uma empresa desapareça atrás de cores fixas. */
.color-input input[type="color"] { accent-color: var(--brand-primary); }
.mini-stat-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.mini-stat{padding:13px;border:1px solid var(--line);border-radius:12px;background:var(--surface-2)}.mini-stat small{display:block;color:var(--muted);font-size:10px}.mini-stat strong{display:block;margin-top:4px;font-size:16px;color:var(--brand-secondary)}.money small{display:block;color:var(--muted);font-size:10px;font-weight:500;margin-top:2px}@media(max-width:700px){.mini-stat-grid{grid-template-columns:1fr}}


/* AtlasCRM — compatibilidade dos componentes legados */
:root {
  --primary: var(--brand-primary);
  --border: var(--line);
  --surface-soft: var(--surface-2);
  --text-muted: var(--muted);
}

/* Identidade visual da empresa: valores definidos pelo Blade em :root. */
.sidebar:not(.master-sidebar) {
  background: var(--brand-secondary);
}
.sidebar:not(.master-sidebar) .nav-link.active {
  background: var(--brand-primary);
  box-shadow: inset 3px 0 0 var(--brand-accent);
}
.sidebar:not(.master-sidebar) .nav-link:hover {
  background: rgba(255,255,255,.09);
}
.sidebar:not(.master-sidebar) .btn-primary,
.main-area .btn-primary {
  background: var(--brand-primary);
}
.sidebar:not(.master-sidebar) .company-mark,
.sidebar:not(.master-sidebar) .user-avatar {
  background: linear-gradient(145deg, var(--brand-primary), var(--brand-accent));
}
.sidebar:not(.master-sidebar) .nav-link.active .icon {
  color: #fff;
}

@media (max-width: 900px) {
  .app-shell { width: 100%; }
  .main-area { width: 100%; min-width: 0; margin-left: 0 !important; }
  .topbar { width: 100%; }
  .sidebar-toggle { display: grid !important; visibility: visible !important; }
  .sidebar-close { display: grid !important; }
}

/* ==========================================================
   AtlasCRM · Comissões — layout estável e responsivo
   ========================================================== */
.commission-page-header { margin-bottom: 18px; }
.commission-metrics { margin-bottom: 18px; }
.commission-filters { align-items: flex-end; }
.commission-filter-actions { display: flex; gap: 8px; align-items: center; padding-bottom: 1px; }
.commission-card { overflow: hidden; }
.commission-card-header { margin-bottom: 0; }
.commission-card-header p { margin: 3px 0 0; }
.commission-table-wrap { width: 100%; }
.commission-table { min-width: 1080px; }
.commission-table th:last-child,
.commission-table td:last-child { min-width: 245px; }
.commission-table .money { white-space: nowrap; }
.strong-money { font-weight: 800; color: var(--text); }
.balance-money { font-weight: 700; }
.commission-deal { font-weight: 650; color: var(--text); }
.commission-person small { max-width: 180px; }
.commission-actions { justify-content: flex-start !important; flex-wrap: wrap; }
.actions-heading { text-align: right !important; }
.commission-pagination { padding: 14px 18px; border-top: 1px solid var(--line); }
.commission-modal-backdrop { padding: 18px; }
.commission-modal { width: min(680px, 100%); }
.commission-history-modal { width: min(900px, 100%); }
.modal-kicker { display: block; margin-bottom: 4px; color: var(--brand-primary); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.payment-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 12px; background: #f7f9fc; border: 1px solid var(--line); border-radius: 12px; }
.payment-summary div { display: flex; flex-direction: column; gap: 3px; }
.payment-summary span { font-size: 10px; color: var(--muted); }
.payment-summary strong { font-size: 14px; }
.payment-history-table { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.payment-history-table .table { min-width: 680px; }
.history-action { text-align: right; }
.compact-empty { padding: 20px !important; }
.inline-alert { padding: 11px 13px; border-radius: 10px; font-size: 12px; margin-bottom: 14px; }
.inline-alert.warning { background: #fff8e8; color: #8a5a00; border: 1px solid #f4dfaa; }
.split-grid { display: grid; gap: 8px; }
.split-grid-head, .split-row { display: grid; grid-template-columns: 1fr 150px; gap: 10px; align-items: center; }
.split-grid-head { padding: 0 2px 3px; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.split-row select, .percent-input { min-width: 0; }
.percent-input { position: relative; }
.percent-input input { padding-right: 32px; }
.percent-input span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 12px; pointer-events: none; }

@media (max-width: 900px) {
  .commission-filters { grid-template-columns: 1fr; }
  .commission-filter-actions { padding-bottom: 0; }
  .commission-table { min-width: 980px; }
}

@media (max-width: 600px) {
  .commission-filter-actions { width: 100%; }
  .commission-filter-actions .btn { flex: 1; }
  .payment-summary { grid-template-columns: 1fr; }
  .commission-modal-backdrop { padding: 8px; }
  .commission-modal { max-height: calc(100vh - 16px); border-radius: 14px; }
  .commission-modal .modal-header,
  .commission-modal .modal-body,
  .commission-modal .modal-footer { padding-left: 15px; padding-right: 15px; }
  .split-grid-head, .split-row { grid-template-columns: 1fr 115px; }
}
