:root {
  --anta-canvas: var(--bg);
  --anta-text: var(--ink);
  --anta-text-muted: var(--muted);
  --anta-success: var(--green);
  --anta-warning: var(--orange-ink);
  --anta-danger: var(--red-ink);
}
.panel,
.card {
  box-shadow: 0 3px 16px var(--brand-alpha-10);
}
.shell {
  transition: grid-template-columns 0.2s;
}
.shell.collapsed {
  grid-template-columns: 82px minmax(0, 1fr);
}
.collapsed .sidebar {
  padding-inline: 12px;
}
.collapsed .brand {
  font-size: 18px;
  letter-spacing: 1px;
}
.collapsed .brand-sub,
.collapsed .nav-label,
.collapsed .sidebar-foot {
  display: none;
}
.collapsed .nav a {
  justify-content: center;
  padding: 13px 8px;
}
.sidebar-toggle {
  padding: 7px 10px;
  background: var(--surface-alpha-14);
  border-color: var(--surface-alpha-30);
  color: white;
  margin-top: 22px;
}
.sidebar-toggle:hover {
  background: var(--surface-alpha-24);
}
.sidebar .nav {
  margin-top: 20px;
}
.topbar .crumb {
  color: var(--anta-text-muted);
  font-size: 12px;
}
.notification-button {
  position: relative;
}
.notification-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  background: var(--anta-danger);
  margin-left: 6px;
}
.contract-hero {
  padding: 28px;
  background: linear-gradient(120deg, var(--surface), var(--bg));
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-bottom: 24px;
}
.contract-hero h1 {
  margin: 10px 0;
}
.hero-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.hero-line .actions {
  justify-content: flex-end;
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 22px;
  font-size: 12px;
}
.hero-meta b {
  display: block;
  margin-top: 5px;
  font-size: 14px;
}
.tabs {
  display: flex;
  gap: 26px;
  border-bottom: 1px solid var(--anta-border);
  margin-bottom: 25px;
  overflow: auto;
}
.tabs button {
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--anta-text-muted);
  padding: 15px 0;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  font-weight: 500;
}
.tabs button[aria-selected="true"] {
  color: var(--anta-primary);
  border-bottom-color: var(--anta-primary);
  font-weight: 700;
}
.workflow-track {
  display: flex;
  gap: 0;
  overflow-x: auto;
  padding: 24px 8px 30px;
  scroll-snap-type: x proximity;
}
.workflow-node {
  flex: 1;
  min-width: 210px;
  position: relative;
  padding: 0 18px;
  scroll-snap-align: start;
}
.workflow-node:after {
  content: "";
  position: absolute;
  left: 45px;
  right: -20px;
  top: 20px;
  height: 2px;
  background: var(--line);
}
.workflow-node:last-child:after {
  display: none;
}
.workflow-dot {
  position: relative;
  z-index: 1;
  border-radius: 50%;
  height: 42px;
  width: 42px;
  background: var(--bg);
  border: 5px solid white;
  color: var(--muted);
  display: grid;
  place-items: center;
  font-weight: 700;
  box-shadow: 0 0 0 1px var(--line);
}
.workflow-node.done .workflow-dot {
  background: var(--green);
  color: white;
}
.workflow-node.current .workflow-dot {
  background: var(--anta-primary);
  color: white;
}
.workflow-node.blocked .workflow-dot {
  background: var(--avatar-gold);
  color: white;
}
.workflow-node.late .workflow-dot {
  background: var(--red-ink);
  color: white;
}
.workflow-node .step-open {
  border: 0;
  padding: 15px 0 8px;
  text-align: left;
  background: transparent;
  display: block;
  line-height: 1.5;
  font-size: 13px;
}
.workflow-node small {
  display: block;
  margin-top: 6px;
}
.workflow-node meter {
  width: 140px;
  margin-top: 9px;
}
.workflow-scroll-note {
  font-size: 11px;
  color: var(--anta-text-muted);
  padding: 0 22px 15px;
}
.drawer {
  position: fixed;
  inset: 0 0 0 auto;
  margin: 0;
  width: min(960px, 95vw);
  height: 100dvh;
  max-height: 100dvh;
  border-radius: 16px 0 0 16px;
  padding: 0;
  transform: translateX(0);
  animation: drawer-in 0.2s ease;
}
.drawer::backdrop {
  background: var(--ink-alpha-66);
}
.drawer-head {
  position: sticky;
  top: 0;
  z-index: 3;
  background: white;
  display: flex;
  justify-content: space-between;
  padding: 17px 24px;
  border-bottom: 1px solid var(--anta-border);
  align-items: center;
}
.drawer-body {
  padding: 24px;
  background: var(--anta-canvas);
  min-height: calc(100% - 70px);
}
.drawer .grid-two {
  grid-template-columns: minmax(0, 1fr);
}
.drawer .page-heading h1 {
  font-size: 23px;
}
.drawer .page-heading {
  display: block;
}
.drawer .page-heading > .actions {
  margin-top: 18px;
}
.drawer .detail-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.drawer .back {
  display: none;
}
@keyframes drawer-in {
  from {
    transform: translateX(60px);
    opacity: 0.4;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
.overview-cards {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
}
.card-symbol {
  display: grid;
  place-items: center;
  background: var(--bg);
  color: var(--anta-primary);
  height: 30px;
  width: 30px;
  border-radius: 8px;
  font-size: 16px;
}
.mini-stats {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin: 16px 0 0;
}
.mini-stat {
  font-size: 12px;
  color: var(--anta-text-muted);
  background: white;
  border: 1px solid var(--anta-border);
  padding: 9px 13px;
  border-radius: 8px;
}
.mini-stat b {
  color: var(--anta-text);
  margin-right: 5px;
}
.chart-legend {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 11px;
  margin-bottom: 20px;
}
.chart-bar {
  display: grid;
  grid-template-columns: 120px 1fr 32px;
  gap: 12px;
  align-items: center;
  margin: 17px 0;
  font-size: 12px;
}
.chart-bar meter {
  width: 100%;
  height: 20px;
  accent-color: var(--anta-primary);
}
.chart-note {
  font-size: 11px;
  color: var(--anta-text-muted);
  line-height: 1.7;
}
.filter-panel {
  background: white;
  border: 1px solid var(--anta-border);
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 22px;
}
.filter-panel .filters {
  margin: 0;
}
.range-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--anta-text-muted);
  white-space: nowrap;
}
.range-label input[type="range"] {
  min-width: 90px;
  max-width: 160px;
  padding: 0;
  accent-color: var(--anta-primary);
}
.date-pair {
  display: flex;
  align-items: center;
  gap: 8px;
}
.date-pair input {
  min-width: 140px;
}
.view-switch {
  display: flex;
  gap: 5px;
}
.view-switch button {
  padding: 8px 12px;
  font-size: 12px;
}
.view-switch button.selected {
  background: var(--royal-soft);
  color: var(--anta-primary);
  border-color: var(--input-hover);
}
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-top: 1px solid var(--anta-border);
  font-size: 12px;
  gap: 12px;
}
.pagination .actions {
  gap: 6px;
}
.pagination button {
  padding: 7px 11px;
}
.sort-head {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  text-transform: inherit;
  letter-spacing: inherit;
  color: inherit;
}
.contract-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding: 20px;
}
.contract-tile {
  border: 1px solid var(--anta-border);
  border-radius: 12px;
  padding: 20px;
  min-width: 0;
}
.contract-tile .tile-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
}
.contract-tile h3 {
  font-size: 16px;
  line-height: 1.5;
  margin: 17px 0 6px;
}
.contract-tile p {
  font-size: 12px;
  color: var(--anta-text-muted);
  margin: 6px 0 20px;
}
.contract-tile meter {
  width: 100%;
  height: 8px;
}
.tile-bottom {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  margin-top: 14px;
  gap: 10px;
}
.finance-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}
.finance-card {
  padding: 18px;
  background: var(--surface);
  border-radius: 9px;
}
.finance-card b {
  display: block;
  margin-top: 8px;
  font-size: 18px;
}
.finance-card small {
  font-size: 11px;
}
.accordion {
  border: 1px solid var(--anta-border);
  border-radius: 10px;
  margin: 12px 0;
  background: white;
}
.accordion summary {
  padding: 16px 18px;
  cursor: pointer;
  font-weight: 600;
  line-height: 1.6;
}
.accordion .panel-body {
  border-top: 1px solid var(--anta-border);
}
.issue-card {
  background: white;
  border: 1px solid var(--anta-border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 15px;
}
.issue-card-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
}
.issue-card h3 {
  margin: 10px 0;
}
.issue-card .meta {
  font-size: 11px;
  color: var(--anta-text-muted);
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}
.issue-card .proposal {
  margin-top: 16px;
  background: var(--bg);
  padding: 13px 16px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.7;
}
.response {
  padding: 14px 16px;
  background: var(--surface);
  border-radius: 9px;
  margin: 12px 0;
  font-size: 13px;
}
.response small {
  display: block;
  margin-top: 7px;
}
.issue-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 20px 0;
  font-size: 12px;
}
.issue-facts b {
  display: block;
  margin-bottom: 6px;
}
.issue-facts p {
  margin: 0;
}
.kanban {
  display: grid;
  grid-template-columns: repeat(6, minmax(235px, 1fr));
  gap: 16px;
  overflow: auto;
  padding-bottom: 16px;
}
.kanban-column {
  background: var(--bg);
  border-radius: 12px;
  padding: 14px;
  min-height: 300px;
}
.kanban-column h3 {
  margin: 0 0 16px;
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}
.kanban-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 2px 6px var(--ink-alpha-08);
}
.kanban-card b {
  font-size: 13px;
  line-height: 1.6;
  display: block;
  margin-bottom: 12px;
}
.kanban-card small {
  display: block;
  margin-top: 10px;
}
.permission-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 15px 0;
}
.permission-grid label {
  background: var(--surface);
  padding: 12px;
  border-radius: 7px;
  display: flex;
  gap: 9px;
  align-items: flex-start;
  font-size: 12px;
}
.permission-grid input {
  width: auto;
  margin-top: 2px;
}
.admin-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}
.editor-step {
  border: 1px solid var(--anta-border);
  padding: 17px;
  border-radius: 10px;
  background: var(--surface);
  margin-bottom: 16px;
}
.editor-step .form-grid {
  gap: 12px;
}
.editor-step .actions {
  margin-bottom: 14px;
  justify-content: space-between;
}
.editor-step select[multiple] {
  min-height: 80px;
}
.wide-modal {
  width: min(1000px, 96vw);
}
.import-summary {
  display: flex;
  gap: 20px;
  padding: 16px;
  background: var(--bg);
  margin-bottom: 18px;
  border-radius: 8px;
}
.notification-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  border-bottom: 1px solid var(--anta-border);
  padding: 16px;
}
.notification-item:last-child {
  border: 0;
}
.notification-item.unread {
  background: var(--bg);
}
.notification-item p {
  margin: 0 0 8px;
  font-size: 13px;
}
.notification-item small {
  font-size: 11px;
}
.small-label {
  display: grid;
  gap: 6px;
  font-size: 11px;
  color: var(--anta-text-muted);
}
.toolbar-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
}
.tab-count {
  font-size: 10px;
  padding: 3px 6px;
  border-radius: 5px;
  background: var(--bg);
  margin-left: 6px;
}
.inline-hint {
  font-size: 11px;
  color: var(--anta-text-muted);
  line-height: 1.7;
}
.file-drop {
  border: 2px dashed var(--input-hover);
  border-radius: 12px;
  padding: 25px;
  background: var(--surface);
  display: grid;
  gap: 12px;
  text-align: center;
}
.file-drop input {
  background: white;
}
.status-banner {
  padding: 15px 20px;
  border-radius: 9px;
  background: var(--bg);
  font-size: 12px;
  margin-bottom: 20px;
  line-height: 1.7;
}
@media (max-width: 1150px) {
  .contract-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .finance-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .overview-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .filter-panel .date-pair {
    width: 100%;
  }
}
@media (max-width: 700px) {
  .shell.collapsed {
    display: block;
  }
  .sidebar-toggle {
    position: absolute;
    right: 16px;
    top: 0;
  }
  .collapsed .sidebar .nav,
  .collapsed .sidebar .brand-sub {
    display: none;
  }
  .collapsed .brand {
    font-size: 24px;
  }
  .collapsed .sidebar {
    padding: 18px;
  }
  .collapsed .nav-label {
    display: block;
  }
  .hero-line {
    display: block;
  }
  .hero-line .actions {
    justify-content: flex-start;
    margin-top: 20px;
  }
  .contract-hero {
    padding: 20px;
  }
  .hero-meta {
    gap: 18px;
  }
  .contract-card-grid {
    grid-template-columns: minmax(0, 1fr);
    padding: 15px;
  }
  .toolbar-row {
    flex-wrap: wrap;
  }
  .drawer {
    width: 100vw;
    border-radius: 0;
  }
  .drawer-body {
    padding: 16px;
  }
  .drawer .detail-grid {
    grid-template-columns: 1fr 1fr;
  }
  .drawer-head {
    padding: 14px 16px;
  }
  .tabs {
    gap: 21px;
  }
  .finance-card b {
    font-size: 15px;
  }
  .date-pair {
    flex-wrap: wrap;
  }
  .date-pair input {
    min-width: 0;
  }
  .filters .date-pair > * {
    min-width: 0 !important;
  }
  .range-label {
    flex-wrap: wrap;
  }
  .permission-grid,
  .issue-facts {
    grid-template-columns: 1fr;
  }
  .pagination {
    flex-wrap: wrap;
  }
  .filter-panel {
    padding: 14px;
  }
  .issue-card-header {
    flex-wrap: wrap;
  }
  .overview-cards {
    gap: 12px;
  }
  .card strong {
    font-size: 28px;
  }
  .admin-toolbar {
    flex-wrap: wrap;
  }
  .small-label {
    width: 100%;
  }
  .user .notification-button {
    font-size: 0;
  }
  .user .notification-button:before {
    content: "◎";
    font-size: 16px;
  }
  .workflow-node {
    min-width: 190px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
