@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap");

:root {
  --paper: #eef3f5;
  --paper-2: #e8f1f4;
  --ink: #142028;
  --muted: #5a6b75;
  --line: #d7e2e6;
  --navy: #0b1520;
  --navy-2: #1c2e3a;
  --accent: #14b8a6;
  --accent2: #0f9f8f;
  --good: #0f9f8f;
  --warn: #d97706;
  --bad: #e11d48;
  --card-mint: #e4f7f3;
  --shadow: 0 18px 50px rgba(20, 32, 40, 0.1);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

html {
  font-size: 14px;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: Manrope, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  display: block;
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 8%, rgba(20, 184, 166, 0.07), transparent 24%),
    radial-gradient(circle at 90% 25%, rgba(20, 184, 166, 0.05), transparent 22%),
    var(--paper);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

h1,
h2,
.serif {
  font-weight: 800;
  letter-spacing: -0.045em;
}

h1 {
  margin: 0 0 18px;
  font-size: 28px;
  line-height: 1.15;
}

header {
  background: none;
  color: inherit;
  text-align: left;
  box-shadow: none;
  margin: 0 0 8px;
  border-radius: 0;
  animation: none;
}

main {
  margin-left: 220px;
  padding: 36px 28px 80px;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  max-width: none;
  transition: margin-left 0.25s ease;
}

body.sidebar-hidden main {
  margin-left: 0;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(20, 184, 166, 0.28);
  border-color: #b8e7e1;
}

input[type="date"] {
  display: inline-block;
  min-height: 36px;
  color-scheme: light;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="date"],
select,
.status-select,
#pageSizeSelect {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 14px;
  background: #fff;
  color: var(--ink);
  box-sizing: border-box;
}

input[type="text"] {
  width: 100%;
}

#search {
  width: 200px;
}

input[type="file"] {
  margin-top: 0;
  border: 1px solid var(--line);
  padding: 6px;
  border-radius: 12px;
  background: #fff;
}

button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  margin-left: 0;
  border-radius: 13px;
  font-weight: 800;
  font-size: 13px;
  border: 1px solid transparent;
  background: var(--accent);
  color: #05211e;
  box-shadow: 0 12px 30px rgba(20, 184, 166, 0.22);
  cursor: pointer;
  transition: 0.25s ease;
}

button:hover:not(:disabled) {
  background: var(--accent2);
  transform: translateY(-2px);
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

#clearBtn,
#resetFilters,
.btn-ghost {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--line);
  color: var(--ink);
  box-shadow: none;
}

#clearBtn:hover,
#resetFilters:hover,
.btn-ghost:hover:not(:disabled) {
  background: #fff;
  border-color: #b8e7e1;
}

.eyebrow {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 800;
  color: var(--accent2);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.eyebrow span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: dotPulse 2s infinite;
}

@keyframes dotPulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(20, 184, 166, 0.35);
  }
  50% {
    box-shadow: 0 0 0 7px rgba(20, 184, 166, 0);
  }
}

.brand-name {
  display: inline-block;
  font-size: 18px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.03em;
  white-space: nowrap;
  background: linear-gradient(
    110deg,
    #0b1520 0%,
    #134e4a 18%,
    #14b8a6 36%,
    #5eead4 50%,
    #14b8a6 64%,
    #134e4a 82%,
    #0b1520 100%
  );
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: logoShimmer 5.5s ease-in-out infinite;
}

@keyframes logoShimmer {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 23px;
  box-shadow: 0 12px 35px rgba(20, 32, 40, 0.05);
}

.app-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  display: flex;
  width: 220px;
  height: 100vh;
  flex-direction: column;
  padding: 28px 18px 20px;
  color: #dbe9ec;
  background: var(--navy);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  transition: transform 0.25s ease;
}

body.sidebar-hidden .app-sidebar {
  transform: translateX(-100%);
}

.app-sidebar .brand-name {
  margin-bottom: 18px;
  padding: 4px 10px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-nav {
  display: grid;
  gap: 5px;
  list-style: none;
  padding: 0;
  margin: 0;
  position: static;
  width: auto;
  height: auto;
  background: none;
  animation: none;
  border-radius: 0;
}

.sidebar-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 5px;
}

.sidebar-nav ul li {
  margin: 0;
}

.sidebar-link {
  display: flex;
  width: 100%;
  min-height: 42px;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border: 0;
  border-radius: 12px;
  border-left: 0;
  color: #9fb1b7;
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  box-shadow: none;
  cursor: pointer;
}

.sidebar-nav ul li a {
  color: #9fb1b7;
  text-decoration: none;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  border-radius: 12px;
  border-left: 0;
  font-weight: 700;
  transition: 0.2s ease;
}

.sidebar-link svg,
.sidebar-nav ul li a svg {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sidebar-link:hover,
.sidebar-link.is-active,
.sidebar-nav ul li a:hover,
.sidebar-nav ul li a.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border-left: 0;
}

.sidebar-link.is-active,
.sidebar-nav ul li a.active {
  box-shadow: inset 3px 0 0 var(--accent);
  font-weight: 800;
}

.sidebar-foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 16px;
}

.sidebar-user {
  padding: 0 12px;
  color: #9fb1b7;
  font-size: 12px;
  font-weight: 700;
}

.sidebar-toggle {
  position: fixed;
  top: 21px;
  left: 184px;
  z-index: 50;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: #9fb1b7;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: none;
  cursor: pointer;
  transition: left 0.25s ease, color 0.2s ease, background 0.2s ease;
}

.sidebar-toggle:hover {
  color: #fff;
  background: var(--accent2);
  transform: none;
}

.sidebar-toggle svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.sidebar-toggle .icon-show {
  display: none;
}

body.sidebar-hidden .sidebar-toggle {
  left: 16px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.88);
  border-color: var(--line);
  box-shadow: 0 8px 24px rgba(20, 32, 40, 0.1);
}

body.sidebar-hidden .sidebar-toggle .icon-hide {
  display: none;
}

body.sidebar-hidden .sidebar-toggle .icon-show {
  display: block;
}

.filter-search,
.advanced-filters,
.upload-container {
  margin-top: 0;
  margin-bottom: 16px;
  background: #fff;
  padding: 16px 18px;
  border-radius: 23px;
  border: 1px solid var(--line);
  box-shadow: 0 12px 35px rgba(20, 32, 40, 0.05);
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: flex-start;
  font-weight: 700;
  color: var(--muted);
  font-size: 13px;
}

.advanced-filters {
  display: block;
  background: #fff;
}

.filter-search label,
.upload-container label,
.filter-row label {
  margin-right: 0;
  font-weight: 800;
  color: var(--muted);
  white-space: nowrap;
  font-size: 12px;
}

.filter-search select,
.filter-search input[type="text"],
.filter-search input[type="date"] {
  width: 150px;
  margin-right: 0;
}

.filter-search {
  gap: 10px 12px;
  padding: 12px 14px;
}

.filter-search #search {
  width: 180px;
}

.filter-search > .filter-row select {
  width: 136px;
}

.filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-dates {
  display: none;
  flex: 1 0 100%;
  gap: 10px 16px;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.filter-dates.is-open {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
}

.date-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: 2px 16px;
}

.date-group:first-child {
  padding-left: 0;
}

.date-group + .date-group {
  border-left: 1px solid var(--line);
}

.date-group-title {
  color: var(--accent2);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.filter-dates .filter-row {
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
}

.date-field {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.filter-dates .date-field input[type="date"] {
  width: 100%;
  min-width: 0;
  flex: 1;
}

#toggleDates.is-active {
  border-color: #b8e7e1;
  background: var(--card-mint);
  color: #0b6b61;
}

.advanced-filters .filter-section {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
}

.advanced-filters .filter-row {
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-width: 150px;
  flex: 1;
  margin: 0;
}

.advanced-filters .filter-row input,
.advanced-filters .filter-row select {
  width: 100%;
  min-width: 120px;
}

.advanced-filters h3 {
  margin: 0 0 14px;
  color: var(--accent2);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.table-toolbar {
  position: relative;
  display: flex;
  justify-content: flex-end;
  margin: 2px 0 10px;
}

.icon-btn {
  width: 40px;
  height: 40px;
  padding: 0;
}

.icon-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.column-settings[hidden] {
  display: none;
}

.column-settings {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  width: 240px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 8px;
}

.column-settings label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.column-settings .btn-ghost {
  margin-top: 6px;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 23px;
  background: #fff;
  box-shadow: 0 12px 35px rgba(20, 32, 40, 0.05);
}

.table-scroll table {
  margin-top: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

#parcelsTable {
  width: max-content;
  min-width: 100%;
  margin-top: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  table-layout: fixed;
}

#parcelsTable th {
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

#parcelsTable td {
  overflow: hidden;
}

#parcelsTable .status-select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

#parcelsTable col.is-col-hidden {
  visibility: collapse;
  width: 0 !important;
}

#parcelsTable th.is-col-hidden,
#parcelsTable td.is-col-hidden {
  width: 0;
  max-width: 0;
  min-width: 0;
  padding: 0;
  border-width: 0;
  font-size: 0;
  line-height: 0;
  overflow: hidden;
  white-space: nowrap;
}

#parcelsTable th.is-col-hidden *,
#parcelsTable td.is-col-hidden * {
  display: none;
}

.col-resizer {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
  width: 6px;
  height: 100%;
  cursor: col-resize;
  touch-action: none;
}

.col-resizer::after {
  content: "";
  position: absolute;
  top: 18%;
  bottom: 18%;
  left: 50%;
  width: 1px;
  transform: translateX(-50%);
  border-radius: 1px;
  background: #b7c5cb;
}

.col-resizer:hover,
body.is-col-resizing .col-resizer:hover {
  background: rgba(20, 184, 166, 0.12);
}

.col-resizer:hover::after,
body.is-col-resizing .col-resizer::after {
  background: var(--accent);
  width: 2px;
}

body.is-col-resizing {
  cursor: col-resize;
  user-select: none;
}

#callsTable {
  width: max-content;
  min-width: 100%;
  margin-top: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  table-layout: fixed;
}

#callsTable th {
  position: relative;
  overflow: hidden;
  white-space: normal;
  line-height: 1.25;
  padding-right: 14px;
  hyphens: auto;
}

#callsTable td {
  overflow: hidden;
}

.call-phone {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.call-phone-time {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
  white-space: normal;
}

.call-phone-time.is-call-window {
  color: #16803c;
  font-weight: 800;
}

#callsTable tbody tr.is-new-order {
  background: rgba(20, 184, 166, 0.14);
}

#callsTable tbody tr.is-new-order:nth-child(even) {
  background: rgba(20, 184, 166, 0.18);
}

#callsTable tbody tr.is-new-order:hover {
  background: rgba(20, 184, 166, 0.24);
}

#callsTable tbody tr.is-paid-closed {
  background: #e8ecef;
  color: #5a6b75;
}

#callsTable tbody tr.is-paid-closed:nth-child(even) {
  background: #e2e7ea;
}

#callsTable tbody tr.is-paid-closed:hover {
  background: #dde3e7;
}

#callsTable tbody tr.is-paid-closed .call-select:disabled,
#callsTable tbody tr.is-paid-closed .call-note:disabled,
#callsTable tbody tr.is-paid-closed .call-money-input:disabled,
#callsTable tbody tr.is-paid-closed .call-offer-input:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.call-offers {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.call-offer,
.call-offer-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.call-offer input,
.call-offer-filter input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  margin-top: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 23px;
  overflow: hidden;
  box-shadow: 0 12px 35px rgba(20, 32, 40, 0.05);
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 12px 14px;
  text-align: left;
}

th {
  background: var(--paper-2);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
  font-weight: 800;
}

tbody tr:nth-child(even) {
  background: #f7fbfb;
}

tbody tr:hover {
  background: var(--card-mint);
}

td {
  font-size: 14px;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.call-select {
  width: 100%;
  min-width: 168px;
  max-width: none;
}

.call-note {
  width: 100%;
  min-width: 160px;
  text-overflow: ellipsis;
}

.page-toolbar a.btn-ghost,
.filter-search a.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.85);
  font-weight: 800;
}

.calls-lead {
  margin: -8px 0 16px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.calls-export-bar {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 12px;
}

.call-money {
  display: flex;
  align-items: center;
  gap: 6px;
}

.call-money input {
  width: 120px;
  min-width: 96px;
}

.call-money input:disabled {
  background: #f3f6f7;
  color: var(--muted);
  cursor: not-allowed;
}

.call-money span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.call-new-order {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.call-new-order[hidden] {
  display: none;
}

.call-new-order-input {
  width: 100%;
  min-width: 0;
}

.call-new-order-status {
  min-height: 16px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

.call-new-order-status.is-missing {
  color: var(--muted);
  font-weight: 700;
}

.call-new-order-status.is-bought {
  color: var(--good);
}

.call-new-order-status.is-refused {
  color: var(--bad);
}

.storage-date {
  color: var(--warn);
  font-weight: 800;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
  align-items: start;
}

.settings-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(20, 32, 40, 0.04);
  padding: 12px;
}

.settings-card-title {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 800;
}

.settings-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: min(62vh, 520px);
  overflow: auto;
}

.settings-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px 28px 52px 28px;
  gap: 4px;
  align-items: center;
  padding: 4px 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fbfc;
}

.settings-item-input {
  width: 100%;
  min-width: 0;
  padding: 6px 8px;
  font-size: 13px;
}

.settings-item .icon-btn {
  width: 28px;
  height: 28px;
  min-width: 28px;
  font-size: 13px;
  font-weight: 800;
}

.settings-pos {
  width: 52px;
  min-width: 52px;
  padding: 6px 4px;
  font-size: 12px;
}

.settings-remove {
  color: var(--muted);
  line-height: 1;
}

.settings-remove:hover {
  color: var(--bad);
}

.settings-add {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px;
  gap: 6px;
  margin-top: 8px;
}

.settings-add input {
  min-width: 0;
  padding: 6px 10px;
  font-size: 13px;
}

.settings-add-btn {
  width: 36px;
  height: 36px;
  padding: 0;
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
}

.settings-card-from {
  margin-bottom: 14px;
  max-width: 420px;
}

.settings-sms-card {
  margin-bottom: 14px;
  width: 100%;
  max-width: 900px;
  box-sizing: border-box;
}

.settings-sms-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.settings-sms-head {
  justify-content: space-between;
  align-items: flex-start;
}

.settings-sms-head .settings-hint {
  margin-bottom: 0;
}

.settings-title-with-info {
  display: flex;
  align-items: center;
  gap: 7px;
}

.settings-title-with-info .settings-card-title {
  margin-bottom: 0;
}

.settings-info {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  border: 1px solid #aebdc3;
  border-radius: 50%;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  font-style: normal;
  line-height: 1;
  cursor: help;
}

.settings-info-tooltip {
  position: absolute;
  z-index: 20;
  top: calc(100% + 9px);
  left: 50%;
  width: 290px;
  max-width: calc(100vw - 40px);
  padding: 9px 11px;
  box-sizing: border-box;
  border-radius: 10px;
  background: #25343b;
  color: #fff;
  box-shadow: 0 8px 24px rgba(20, 32, 40, .2);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, -4px);
  transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
}

.settings-info-tooltip::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  border: 6px solid transparent;
  border-bottom-color: #25343b;
  transform: translateX(-50%);
}

.settings-info:hover .settings-info-tooltip,
.settings-info:focus .settings-info-tooltip,
.settings-info:focus-visible .settings-info-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.settings-info:focus-visible {
  outline: 3px solid rgba(20, 184, 166, .26);
  outline-offset: 2px;
}

.settings-time-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.settings-info-small {
  flex-basis: 15px;
  width: 15px;
  height: 15px;
  font-size: 9px;
}

.settings-info-small .settings-info-tooltip {
  width: auto;
  min-width: 96px;
  text-align: center;
  white-space: nowrap;
}

.settings-switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  cursor: pointer;
}

.settings-switch input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  position: relative;
  flex: 0 0 44px;
  width: 44px;
  height: 26px;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  border: 1px solid #bac7cc;
  border-radius: 20px;
  background: #dbe3e7;
  cursor: pointer;
}

.settings-switch input[type="checkbox"]::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(20, 32, 40, .2);
  transition: transform .18s;
}

.settings-switch input[type="checkbox"]:checked {
  background: var(--accent);
  border-color: var(--accent2);
}

.settings-switch input[type="checkbox"]:checked::before {
  transform: translateX(18px);
}

.settings-sms-schedule {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 420px));
  gap: 12px;
  margin-top: 18px;
}

.settings-sms-period {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f7fafb;
}

.settings-sms-period-title {
  display: block;
  margin-bottom: 10px;
  color: var(--text);
  font-size: 13px;
}

.settings-sms-period-fields {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) 120px;
  gap: 10px;
}

.settings-sms-period .settings-from-field {
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 0;
}

.settings-sms-period .settings-from-field > span {
  font-size: 11px;
}

.settings-sms-period input[type="time"],
.settings-sms-period select {
  width: 100%;
  min-width: 0;
  height: 40px;
  padding: 8px 12px;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.settings-sms-period input[type="time"] {
  color-scheme: light;
}

.settings-sms-period input[type="time"]:focus,
.settings-sms-period select:focus {
  outline: 2px solid rgba(20, 184, 166, .28);
  border-color: #9edbd3;
}

.settings-switch input[type="checkbox"]:focus-visible {
  outline: 3px solid rgba(20, 184, 166, .32);
  outline-offset: 2px;
}

.settings-import-card {
  margin-bottom: 14px;
}

.settings-import-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.settings-import-row input[type="file"] {
  max-width: 320px;
}

.settings-import-report {
  margin-top: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.45;
}

.settings-import-report.is-error {
  color: #be123c;
}

.settings-import-block {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f7fbfb;
  border: 1px solid var(--line);
  color: var(--ink);
  font-weight: 600;
  word-break: break-word;
}

.settings-import-block span {
  color: var(--muted);
}

.settings-hint {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

.settings-from-field {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 800;
  color: var(--muted);
}

.settings-from-field input[type="date"] {
  flex: 1;
  min-width: 0;
  max-width: 180px;
}

.settings-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.settings-status {
  color: var(--accent2);
  font-size: 13px;
  font-weight: 800;
}

.settings-status.is-error {
  color: var(--bad);
}

@media (max-width: 1100px) {
  .settings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .settings-sms-schedule {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .settings-sms-head {
    display: grid;
  }

  .settings-sms-period-fields {
    grid-template-columns: 1fr;
  }
}

.upload-container {
  display: none;
  gap: 10px;
}

.upload-container.is-open {
  display: flex;
}

#toggleUpload {
  flex: 0 0 auto;
  margin-bottom: 18px;
}

.upload-container input[type="file"] {
  max-width: 280px;
  flex-grow: 1;
}

.upload-container button {
  white-space: nowrap;
}

.notification {
  position: fixed;
  top: 18px;
  right: 18px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 10px 12px;
  align-items: start;
  min-width: 220px;
  max-width: 320px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  box-shadow: 0 16px 40px rgba(20, 32, 40, 0.12);
  z-index: 10000;
  animation: notifyIn 0.28s ease-out;
  font-family: inherit;
  backdrop-filter: blur(8px);
}

.notification::before {
  content: '';
  grid-column: 1;
  grid-row: 1 / span 2;
  align-self: start;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--card-mint);
  box-shadow: inset 0 0 0 1px #cceee8;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230b6b61' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 14px;
}

.notification.error::before {
  background-color: #ffe4ea;
  box-shadow: inset 0 0 0 1px #ffd0d8;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23be123c' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 6 6 18M6 6l12 12'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 12px;
}

.notification.info::before {
  background-color: #e8f1f4;
  box-shadow: inset 0 0 0 1px #d7e2e6;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231c2e3a' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 8h.01M11 12h1v5h1'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 14px;
}

.notification.success,
.notification.error,
.notification.info {
  background: rgba(255, 255, 255, 0.96);
}

.notification-title {
  grid-column: 2;
  grid-row: 1;
  margin: 0;
  padding-right: 4px;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.25;
  align-self: center;
}

.notification-content {
  grid-column: 2;
  grid-row: 2;
  margin: 0;
  padding-right: 4px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--muted);
}

.notification-close {
  position: static;
  grid-column: 3;
  grid-row: 1;
  width: 24px;
  height: 24px;
  margin: -2px -4px 0 0;
  background: transparent;
  border: none;
  box-shadow: none;
  color: var(--muted);
  font-size: 18px;
  font-weight: 600;
  padding: 0;
  line-height: 1;
  opacity: 0.7;
  border-radius: 8px;
  justify-self: end;
}

.notification-close:hover {
  opacity: 1;
  background: #f0f4f5;
  color: var(--ink);
  transform: none;
}

@keyframes notifyIn {
  from {
    transform: translateY(-8px) translateX(12px);
    opacity: 0;
  }
  to {
    transform: translateY(0) translateX(0);
    opacity: 1;
  }
}

@keyframes slideIn {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.sms-history-btn {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: none;
  border-radius: 11px;
  padding: 6px 10px;
  font-size: 12px;
}

.sms-history-btn:hover {
  background: var(--card-mint);
  border-color: #b8e7e1;
  transform: none;
}

.delete-parcel-btn {
  padding: 6px 10px;
  background: #ffe4ea;
  color: #be123c;
  border: 1px solid #ffd0d8;
  box-shadow: none;
  border-radius: 11px;
  font-size: 12px;
  white-space: nowrap;
}

.delete-parcel-btn:hover {
  background: #ffd0d8;
  transform: none;
}

.col-actions {
  width: 90px;
  text-align: center;
}

.track-cell {
  white-space: nowrap;
}

.track-number {
  margin-right: 4px;
}

.copy-track-btn {
  margin-left: 2px;
  padding: 3px 5px;
  background: transparent;
  color: #7a8a91;
  border: none;
  box-shadow: none;
  border-radius: 8px;
  vertical-align: middle;
  line-height: 0;
}

.copy-track-btn svg {
  width: 14px;
  height: 14px;
  display: block;
}

.copy-track-btn:hover {
  background: var(--card-mint);
  color: var(--accent2);
  transform: none;
}

.copy-track-btn.copied,
.copy-track-btn.copied:hover {
  background: var(--card-mint);
  color: var(--accent2);
}

.sms-history-modal,
.client-modal {
  position: fixed;
  inset: 0;
  background: rgba(11, 21, 32, 0.45);
  z-index: 9999;
}

.sms-history-modal {
  display: flex;
  align-items: center;
  justify-content: center;
}

.client-modal {
  display: none;
}

.sms-history-content,
.client-modal-content {
  width: min(760px, 92vw);
  max-height: 80vh;
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 23px;
  padding: 20px 22px;
  box-shadow: var(--shadow);
}

.client-modal-content {
  width: min(1000px, 92vw);
  max-height: 85vh;
  margin: 40px auto;
}

.sms-history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.sms-history-header h3,
.client-info h3,
.orders-history h3 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-transform: none;
}

#closeSmsHistoryModal,
.close-modal {
  background: transparent;
  border: none;
  box-shadow: none;
  color: var(--muted);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

#closeSmsHistoryModal:hover,
.close-modal:hover {
  color: var(--ink);
  background: transparent;
  transform: none;
}

.sms-history-item {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  margin-bottom: 10px;
  background: var(--paper-2);
}

.client-info {
  margin-bottom: 20px;
  padding: 16px 18px;
  border-radius: 18px;
  background: var(--card-mint);
  border: 1px solid #cceee8;
}

.client-info p {
  margin: 8px 0;
  color: var(--ink);
}

.client-info strong {
  color: var(--muted);
}

.orders-table th {
  background: var(--paper-2);
  color: var(--muted);
}

.orders-table tr:hover {
  background: var(--card-mint);
}

.status-delivered {
  background: var(--card-mint);
  color: #0b6b61;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 999px;
}

.status-not-delivered {
  background: #ffe4ea;
  color: #be123c;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 999px;
}

.status-in-transit {
  background: #e8f1f4;
  color: var(--navy-2);
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 999px;
}

.status-ready {
  background: #fff4e5;
  color: #b45309;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 999px;
}

.status-created {
  background: var(--paper-2);
  color: var(--muted);
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 999px;
}

.phone-link {
  color: inherit;
  cursor: pointer;
  font-weight: 800;
}

.phone-link:hover {
  color: var(--accent2);
}

#paginationControls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

#paginationControls button {
  min-width: 36px;
  padding: 6px 10px;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: none;
  border-radius: 11px;
}

#paginationControls button:hover:not(:disabled):not(.active-page) {
  background: var(--card-mint);
  color: var(--ink);
  transform: none;
}

#paginationControls button.active-page,
#paginationControls button.active-page:disabled {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
  font-weight: 800;
  opacity: 1;
  cursor: default;
  box-shadow: none;
}

#paginationControls button:disabled:not(.active-page) {
  background: var(--paper-2);
  color: #9aa7ad;
  border-color: var(--line);
  opacity: 1;
}

.sync-message {
  margin: 0 0 16px;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 14px;
  font-weight: 700;
}

.sync-success {
  background: var(--card-mint);
  color: #0b6b61;
  border: 1px solid #cceee8;
}

.sync-error {
  background: #ffe4ea;
  color: #be123c;
  border: 1px solid #ffd0d8;
}

.hidden {
  display: none;
}

input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent2);
  cursor: pointer;
}

.dashboard {
  max-width: 1280px;
  transition: opacity 0.22s ease, transform 0.22s ease, filter 0.22s ease;
}

.dashboard.is-refreshing {
  opacity: 0.42;
  transform: translateY(6px);
  filter: saturate(0.85);
  pointer-events: none;
}

.dash-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  padding: 18px 20px;
  border: 1px solid #cfe7e2;
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(20, 184, 166, 0.14), rgba(228, 247, 243, 0.55) 42%, rgba(255, 255, 255, 0.92)),
    radial-gradient(circle at 88% 18%, rgba(20, 184, 166, 0.18), transparent 28%);
  box-shadow: 0 14px 40px rgba(20, 32, 40, 0.05);
  animation: dash-fade-up 0.45s ease both;
}

.dash-kicker {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #0b6b61;
}

.dashboard h1 {
  margin: 0;
  font-size: 30px;
}

.dash-hero-sub {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.dash-period-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(11, 21, 32, 0.92);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.dash-toolbar {
  margin-bottom: 14px;
  animation: dash-fade-up 0.5s ease both;
  animation-delay: 0.04s;
}

.dash-panel .dash-toolbar {
  animation: none;
  margin-top: -2px;
}

.dash-period-form {
  margin: 0;
}

.dash-period-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.dash-panel {
  margin-bottom: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 12px 34px rgba(20, 32, 40, 0.04);
  animation: dash-fade-up 0.55s ease both;
}

.dash-panel:nth-of-type(2) {
  animation-delay: 0.08s;
}

.dash-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.dash-panel-head--toggle {
  align-items: center;
  gap: 10px;
  margin-bottom: 0;
  padding: 4px 4px 4px 2px;
}

.dash-panel--collapsible:not(.is-collapsed) .dash-panel-head--toggle {
  margin-bottom: 14px;
}

button.dash-panel-toggle,
button.dash-panel-toggle:hover:not(:disabled),
button.dash-panel-toggle:focus,
button.dash-panel-toggle:active {
  display: flex;
  flex: 1;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: var(--ink);
  box-shadow: none;
  text-align: left;
  font-weight: inherit;
  font-size: inherit;
  transform: none;
  cursor: pointer;
}

button.dash-panel-toggle:hover:not(:disabled) {
  background: #f3f8f8;
  border-color: #d7e2e6;
  transform: none;
}

.dash-panel-toggle-copy h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--ink);
}

.dash-panel-toggle-copy p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}

.dash-panel-chevron {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  position: relative;
  flex-shrink: 0;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.dash-panel-chevron::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 9px;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

.dash-panel--collapsible:not(.is-collapsed) .dash-panel-chevron {
  background: var(--card-mint);
  border-color: #cceee8;
}

.dash-panel--collapsible:not(.is-collapsed) .dash-panel-chevron::before {
  top: 12px;
  transform: rotate(-135deg);
}

button.dash-panel-toggle:hover .dash-panel-chevron {
  border-color: #b7ebe3;
}

.dash-panel-head h2 {
  margin: 0;
  font-size: 1.15rem;
}

.dash-panel-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.dash-panel-link {
  flex-shrink: 0;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid #cceee8;
  background: var(--card-mint);
  color: #0b6b61;
  font-size: 12px;
  font-weight: 800;
  transition: 0.2s ease;
}

.dash-panel-link:hover {
  background: #d7f4ee;
  transform: translateY(-1px);
}

.dash-track-grid {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 12px;
}

.dash-hero-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100%;
  padding: 18px;
  border-radius: 18px;
  background: linear-gradient(160deg, #0b1520 0%, #1c2e3a 70%, #0f766e 140%);
  color: #fff;
  box-shadow: 0 16px 36px rgba(11, 21, 32, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dash-hero-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 42px rgba(11, 21, 32, 0.28);
}

.dash-hero-card-label,
.dash-hero-card-note {
  font-size: 12px;
  font-weight: 700;
  opacity: 0.72;
}

.dash-hero-card-value {
  margin: 18px 0 10px;
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1;
}

.dash-status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.dash-status-card,
.dash-kpi {
  display: block;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.dash-status-card:hover,
.dash-kpi:hover,
.dash-list-row:hover {
  transform: translateY(-2px);
  border-color: #b7ebe3;
  box-shadow: 0 10px 24px rgba(20, 32, 40, 0.06);
}

.dash-status-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.dash-status-value,
.dash-kpi-value {
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--ink);
}

.dash-status-pct {
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
}

.dash-status-label,
.dash-kpi-label {
  display: block;
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
}

.dash-bar {
  display: block;
  height: 6px;
  border-radius: 999px;
  background: #e8eef1;
  overflow: hidden;
}

.dash-bar > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #14b8a6, #0f9f8f);
  transition: width 0.45s ease;
}

.tone-neutral .dash-bar > span { background: linear-gradient(90deg, #94a3b8, #64748b); }
.tone-info .dash-bar > span { background: linear-gradient(90deg, #38bdf8, #0284c7); }
.tone-warn .dash-kpi-value { color: #b45309; }
.tone-warn .dash-bar > span { background: linear-gradient(90deg, #fbbf24, #d97706); }
.tone-good .dash-kpi-value { color: #0b6b61; }
.tone-good .dash-bar > span { background: linear-gradient(90deg, #2dd4bf, #0f9f8f); }
.tone-bad .dash-status-value,
.tone-bad .dash-kpi-value { color: #be123c; }
.tone-info .dash-kpi-value { color: #0369a1; }
.tone-bad .dash-bar > span { background: linear-gradient(90deg, #fb7185, #e11d48); }

.tone-neutral { background: #f7fafb; }
.tone-info { background: #f0f9ff; border-color: #d7ebf8; }
.tone-warn { background: #fff8ee; border-color: #f3e0c2; }
.tone-good { background: var(--card-mint); border-color: #cceee8; }
.tone-bad { background: #fff1f4; border-color: #ffd0d8; }
.tone-money { background: linear-gradient(180deg, #e4f7f3, #fff); border-color: #cceee8; }

.dash-kpi-row {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.dash-kpi-row--outcomes {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.dash-outcomes-title {
  margin: 2px 0 10px;
  font-size: 0.92rem;
  font-weight: 800;
}

.dash-kpi-sub {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}

.dash-kpi-money {
  font-size: 1.15rem;
}

.dash-breakdown-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.9fr;
  gap: 12px;
}

.dash-breakdown {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.dash-breakdown h3 {
  margin: 0 0 12px;
  font-size: 0.92rem;
  font-weight: 800;
}

.dash-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dash-list-row {
  display: block;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: #f7fbfb;
}

.dash-list-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.dash-list-meta strong {
  color: var(--ink);
  font-size: 0.95rem;
}

.dash-empty {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

@keyframes dash-fade-up {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1100px) {
  .dash-kpi-row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .dash-kpi-row--outcomes {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dash-breakdown-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .dash-hero,
  .dash-panel-head,
  .dash-track-grid {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .dash-track-grid {
    display: flex;
    flex-direction: column;
  }

  .dash-status-grid,
  .dash-kpi-row,
  .dash-kpi-row--outcomes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .dash-status-grid,
  .dash-kpi-row,
  .dash-kpi-row--outcomes {
    grid-template-columns: 1fr;
  }

  .dashboard h1 {
    font-size: 24px;
  }
}

.filter-section {
  padding: 0 0 8px;
}

/* daterangepicker: global table/td styles break dual-month layout */
.daterangepicker {
  font-family: Manrope, Arial, sans-serif;
  z-index: 4000;
}

.daterangepicker .calendar-table {
  background: #fff;
  border: none;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
}

.daterangepicker .calendar-table table {
  width: 100%;
  margin: 0;
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  overflow: visible;
  border-collapse: collapse;
  border-spacing: 0;
}

.daterangepicker .calendar-table th,
.daterangepicker .calendar-table td {
  padding: 0;
  border: 1px solid transparent;
  border-bottom: 1px solid transparent;
  background: transparent;
  text-align: center;
  text-transform: none;
  letter-spacing: normal;
  font-size: 12px;
  font-weight: 600;
  color: inherit;
  min-width: 32px;
  width: 32px;
  height: 24px;
  line-height: 24px;
  white-space: nowrap;
  vertical-align: middle;
}

.daterangepicker .calendar-table th.month {
  width: auto;
  min-width: 0;
  font-weight: 800;
}

.daterangepicker tbody tr:nth-child(even),
.daterangepicker tbody tr:hover {
  background: transparent;
}

.daterangepicker td.active,
.daterangepicker td.active:hover {
  background-color: #14b8a6;
  border-color: transparent;
  color: #fff;
}

.daterangepicker td.in-range {
  background-color: #e4f7f3;
  color: #142028;
}

.daterangepicker .ranges li.active {
  background-color: #14b8a6;
}

.form_main {
  border: 0;
  height: auto;
  max-width: none;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.period-btn {
  padding: 8px 14px;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 13px;
  box-shadow: none;
  font-size: 13px;
  font-weight: 800;
}

.period-btn:hover {
  background: var(--card-mint);
  border-color: #b8e7e1;
  transform: translateY(-2px);
  box-shadow: none;
}

.period-btn.active {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
  box-shadow: none;
}

.period-btn.active:hover {
  background: var(--navy-2);
}

.page-toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
  flex-wrap: wrap;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.rating-stars {
  color: var(--warn);
  font-weight: 800;
  letter-spacing: 0.04em;
}

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-wrap {
  width: min(420px, 100%);
}

.login-container {
  background: #fff;
  padding: 24px;
  border-radius: 23px;
  border: 1px solid var(--line);
  box-shadow: 0 12px 35px rgba(20, 32, 40, 0.05);
  width: 100%;
}

.login-container h2 {
  margin: 0 0 16px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.045em;
}

.login-container label {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.login-container input[type="text"],
.login-container input[type="password"] {
  width: 100%;
  padding: 10px 12px;
  border-radius: 16px;
}

.login-container button {
  margin-top: 18px;
  width: 100%;
}

#errorMessage {
  color: var(--bad);
  margin: 0 0 12px;
  text-align: left;
  font-weight: 700;
  display: none;
}

#errorMessage.show {
  display: block;
}

@media (max-width: 700px) {
  .app-sidebar {
    position: sticky;
    width: 100%;
    height: auto;
    min-height: 64px;
    flex-flow: row wrap;
    align-items: center;
    gap: 4px;
    padding: 10px 14px;
  }

  body.sidebar-hidden .app-sidebar {
    display: none;
  }

  .sidebar-toggle,
  body.sidebar-hidden .sidebar-toggle {
    top: 16px;
    right: 14px;
    left: auto;
  }

  .app-sidebar .brand-name {
    margin-right: auto;
    margin-bottom: 0;
    padding: 8px;
    border-bottom: 0;
    font-size: 16px;
  }

  .sidebar-nav,
  .sidebar-nav ul {
    display: flex;
    gap: 2px;
  }

  .sidebar-link,
  .sidebar-nav ul li a {
    width: auto;
    min-height: 36px;
    padding: 0 9px;
    font-size: 11px;
  }

  .sidebar-foot {
    margin: 0;
    flex-direction: row;
    align-items: center;
  }

  main,
  body.sidebar-hidden main {
    margin-left: 0;
    padding: 24px 14px 48px;
  }

  .filter-dates.is-open {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .date-group {
    padding: 0;
  }

  .date-group + .date-group {
    border-left: 0;
    padding-top: 12px;
    border-top: 1px solid var(--line);
  }
}
