:root {
  --bg: #f4f6fb;
  --panel: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --primary: #4f46e5;
  --primary-600: #4338ca;
  --primary-soft: #eef2ff;
  --green: #059669;
  --green-soft: #ecfdf5;
  --amber: #d97706;
  --amber-soft: #fffbeb;
  --red: #dc2626;
  --red-soft: #fef2f2;
  --sky: #0284c7;
  --sidebar: #0b1220;
  --radius: 14px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  font-variant-numeric: tabular-nums;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1,
h2,
h3 {
  letter-spacing: -0.01em;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 11px;
}

.nowrap {
  white-space: nowrap;
}

.right {
  text-align: right;
}

.clamp {
  display: block;
  max-width: 340px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mt {
  margin-top: 16px;
}

.sep {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 20px 0;
}

.hint {
  margin: 0;
  font-size: 11px;
  color: var(--muted);
}

/* ------------------------------------------------------------------ layout */

.app {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex: 0 0 250px;
  flex-direction: column;
  gap: 26px;
  width: 250px;
  height: 100vh;
  padding: 22px 16px;
  color: #cbd5e1;
  background: linear-gradient(180deg, #0b1220 0%, #101b30 100%);
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px;
  color: #ffffff;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  display: grid;
  flex: 0 0 42px;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #ffffff;
  border-radius: 12px;
  background: linear-gradient(135deg, #6366f1, #22d3ee);
  box-shadow: 0 8px 24px rgba(79, 70, 229, 0.45);
}

.brand-mark svg {
  width: 23px;
  height: 23px;
}

.brand-text strong {
  display: block;
  font-size: 17px;
  letter-spacing: 0.1em;
  line-height: 1.2;
}

.brand-text small {
  display: block;
  font-size: 10px;
  letter-spacing: 0.04em;
  color: #94a3b8;
}

.nav {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 3px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 500;
  color: #94a3b8;
  border-left: 3px solid transparent;
  border-radius: 10px;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-link:hover {
  color: #e2e8f0;
  background: rgba(148, 163, 184, 0.08);
  text-decoration: none;
}

.nav-link.active {
  color: #e0e7ff;
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.26), rgba(99, 102, 241, 0.06));
  border-left-color: #818cf8;
}

.ico {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.sidebar-bottom {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.server-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  font-size: 11px;
  color: #94a3b8;
  border-radius: 10px;
  background: rgba(148, 163, 184, 0.07);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.15);
}

.logout {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  font-size: 12px;
  color: #94a3b8;
  border-radius: 10px;
}

.logout:hover {
  color: #fca5a5;
  background: rgba(248, 113, 113, 0.08);
  text-decoration: none;
}

.main {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 32px 14px;
}

.heading h1 {
  margin: 0;
  font-size: 24px;
  letter-spacing: -0.02em;
}

.heading p {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 5px;
  font-size: 13px;
  font-weight: 500;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.btn.mobile-logout {
  display: none;
}

.avatar {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-soft);
  border-radius: 50%;
}

.content {
  flex: 1;
  padding: 10px 32px 32px;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 32px;
  font-size: 11px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

/* ------------------------------------------------------------------ buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  text-decoration: none;
}

.btn:focus-visible {
  outline: 3px solid rgba(99, 102, 241, 0.25);
  outline-offset: 1px;
}

.btn-primary {
  color: #ffffff;
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

.btn-primary:hover {
  background: var(--primary-600);
  border-color: var(--primary-600);
}

.btn-danger {
  color: var(--red);
  background: #ffffff;
  border-color: #fecaca;
}

.btn-danger:hover {
  background: var(--red-soft);
  border-color: #fca5a5;
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
}

.btn-ghost:hover {
  background: #eef2f7;
  border-color: transparent;
}

.btn-sm {
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 8px;
  font-weight: 600;
}

/* ------------------------------------------------------------------ cards */

.card {
  min-width: 0;
  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  margin-bottom: 20px;
}

.card:last-child {
  margin-bottom: 0;
}

.card.narrow {
  max-width: 780px;
}

.card h2 {
  margin: 0;
  font-size: 15px;
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.card-head p {
  margin: 3px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.link {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.layout-sidebar {
  display: grid;
  grid-template-columns: 350px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.layout-sidebar > *,
.grid-2 > * {
  min-width: 0;
}

.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(320px, 1fr);
  gap: 20px;
  align-items: start;
  margin-bottom: 20px;
}

.grid-2.grid-equal {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-2 > .card {
  margin-bottom: 0;
}

/* ------------------------------------------------------------------ stats */

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.stat {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.stat-icon {
  display: grid;
  flex: 0 0 44px;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
}

.stat-icon svg {
  width: 21px;
  height: 21px;
}

.stat-icon.indigo { background: #eef2ff; color: #4f46e5; }
.stat-icon.emerald { background: #ecfdf5; color: #059669; }
.stat-icon.sky { background: #e0f2fe; color: #0284c7; }
.stat-icon.amber { background: #fffbeb; color: #d97706; }

.stat-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.stat strong {
  display: block;
  font-size: 26px;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.stat-suffix {
  margin-left: 2px;
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
}

.stat small {
  display: block;
  font-size: 10px;
  color: var(--muted);
}

/* ------------------------------------------------------------------ tables */

.table-wrap {
  min-width: 0;
  max-width: 100%;
  margin: 0 -4px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th {
  padding: 10px 12px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--muted);
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
}

td {
  padding: 11px 12px;
  vertical-align: middle;
  border-bottom: 1px solid #f1f5f9;
}

tbody tr:hover {
  background: #f8fafc;
}

tbody tr:last-child td {
  border-bottom: 0;
}

td.right {
  text-align: right;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
}

.table-actions form {
  margin: 0;
}

.strong-link {
  font-weight: 600;
  color: var(--text);
}

.strong-link:hover {
  color: var(--primary);
}

/* ------------------------------------------------------------------ badges */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  border-radius: 999px;
}

.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.badge.online { color: #047857; background: #ecfdf5; }
.badge.offline { color: #64748b; background: #f1f5f9; }
.badge.pending { color: #b45309; background: #fffbeb; }
.badge.sent { color: #1d4ed8; background: #eff6ff; }
.badge.done { color: #047857; background: #ecfdf5; }
.badge.failed { color: #b91c1c; background: #fef2f2; }
.badge.cancelled { color: #64748b; background: #f1f5f9; }
.badge.plain { color: #475569; background: #f1f5f9; }

/* ------------------------------------------------------------------ forms */

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.form-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.form-grid .field {
  margin-bottom: 0;
}

.field.full {
  grid-column: 1 / -1;
}

label {
  font-size: 12px;
  font-weight: 600;
  color: #334155;
}

input,
select,
textarea {
  width: 100%;
  padding: 9px 11px;
  font: inherit;
  font-size: 13px;
  color: var(--text);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 9px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #a5b4fc;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

input:disabled {
  color: var(--muted);
  background: #f8fafc;
}

textarea {
  min-height: 84px;
  resize: vertical;
}

textarea.mono {
  font-size: 12px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  color: #475569;
}

.checkbox-row input {
  width: auto;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}

.filters .field {
  min-width: 155px;
  margin-bottom: 0;
}

.filters-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.search {
  display: flex;
  gap: 8px;
}

.search input {
  min-width: 190px;
}

.row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

/* ------------------------------------------------------------------ misc */

.flash {
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid transparent;
  border-radius: 10px;
}

.flash-success {
  color: #065f46;
  background: #ecfdf5;
  border-color: #a7f3d0;
}

.flash-error {
  color: #991b1b;
  background: #fef2f2;
  border-color: #fecaca;
}

.flash-info {
  color: #1e40af;
  background: #eff6ff;
  border-color: #bfdbfe;
}

.empty {
  padding: 40px 16px;
  font-size: 12px;
  text-align: center;
  color: var(--muted);
}

.empty strong {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
  color: var(--text);
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  font-size: 12px;
  color: var(--muted);
}

.pagination .btns {
  display: flex;
  gap: 8px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.chip {
  padding: 5px 11px;
  font-size: 11px;
  color: var(--muted);
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.chip strong {
  color: var(--text);
}

.device-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.device-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #f1f5f9;
}

.device-list li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.device-name {
  font-size: 13px;
  font-weight: 600;
}

.device-meta {
  margin-top: 2px;
  font-size: 11px;
  color: var(--muted);
}

.device-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}

.device-time {
  font-size: 10px;
  color: var(--muted);
}

.guide .copy-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.guide .copy-row code {
  padding: 8px 12px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 13px;
  color: #e2e8f0;
  background: #0f172a;
  border-radius: 8px;
}

.steps {
  margin: 0 0 14px;
  padding-left: 18px;
  font-size: 12.5px;
  color: #475569;
}

.steps li {
  margin-bottom: 6px;
}

.kv {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 9px 18px;
  margin: 0;
  font-size: 13px;
}

.kv dt {
  color: var(--muted);
}

.kv dd {
  margin: 0;
  font-weight: 500;
  text-align: right;
}

.kv.kv-grid {
  grid-template-columns: 120px minmax(0, 1fr) 140px minmax(0, 1fr);
}

.kv.kv-grid dd:nth-of-type(2n) {
  text-align: left;
}

.danger-zone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: #fffdfd;
  border-color: #fecaca;
}

.danger-zone h2,
.danger-card h2 {
  color: #991b1b;
}

.danger-zone form {
  margin: 0;
}

.danger-card {
  background: #fffdfd;
  border-color: #fecaca;
}

/* ------------------------------------------------------------------ login */

.login-body {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
  background:
    radial-gradient(900px 500px at 8% 6%, rgba(79, 70, 229, 0.35), transparent 60%),
    radial-gradient(800px 500px at 95% 90%, rgba(14, 165, 233, 0.18), transparent 55%),
    #0b1220;
}

.login-card {
  width: min(420px, 100%);
  padding: 36px;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 30px 80px rgba(2, 6, 23, 0.55);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.login-brand .brand-text strong {
  color: var(--text);
}

.login-card h1 {
  margin: 0 0 6px;
  font-size: 23px;
}

.login-card p.sub {
  margin: 0 0 24px;
  font-size: 13px;
  color: var(--muted);
}

.login-card .field {
  margin-bottom: 15px;
}

.login-card .btn {
  width: 100%;
  padding: 11px;
  margin-top: 4px;
}

.login-foot {
  margin-top: 22px;
  font-size: 11px;
  text-align: center;
  color: var(--muted);
}

/* ------------------------------------------------------------------ responsive */

@media (max-width: 1180px) {
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .layout-sidebar {
    grid-template-columns: 320px minmax(0, 1fr);
  }
}

@media (max-width: 980px) {
  .app {
    display: block;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 40;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    width: 100%;
    height: auto;
    padding: 10px 14px;
    overflow-x: auto;
    box-shadow: 0 8px 24px rgba(2, 6, 23, 0.22);
  }

  .brand {
    flex: 0 0 auto;
    padding: 0;
  }

  .brand-mark {
    flex-basis: 36px;
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }

  .brand-text small {
    display: none;
  }

  .nav {
    flex-direction: row;
    gap: 2px;
    overflow-x: auto;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }

  .nav-link {
    padding: 8px 10px;
    font-size: 12px;
    white-space: nowrap;
    border-left: 0;
    border-bottom: 2px solid transparent;
  }

  .nav-link.active {
    border-bottom-color: #818cf8;
    background: rgba(99, 102, 241, 0.15);
  }

  .sidebar-bottom {
    display: none;
  }

  .topbar {
    flex-direction: column;
    padding: 18px 18px 8px;
  }

  .content {
    padding: 8px 18px 24px;
  }

  .footer {
    padding: 14px 18px;
  }

  .user-chip {
    display: none;
  }

  .btn.mobile-logout {
    display: inline-flex;
  }

  .grid-2,
  .grid-2.grid-equal,
  .layout-sidebar {
    grid-template-columns: 1fr;
  }

  .kv.kv-grid {
    grid-template-columns: 110px minmax(0, 1fr);
  }

  .kv.kv-grid dd:nth-of-type(2n) {
    text-align: right;
  }
}

@media (max-width: 760px) {
  .table-wrap {
    margin: 0;
    overflow: visible;
  }

  .table-wrap table,
  .table-wrap thead,
  .table-wrap tbody,
  .table-wrap tr,
  .table-wrap th,
  .table-wrap td {
    display: block;
    width: 100%;
  }

  .table-wrap thead {
    display: none;
  }

  .table-wrap tbody tr {
    margin-bottom: 12px;
    padding: 2px 14px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 12px;
  }

  .table-wrap tbody tr:last-child {
    margin-bottom: 0;
  }

  .table-wrap tbody tr:hover {
    background: #ffffff;
  }

  .table-wrap td {
    display: grid;
    grid-template-columns: minmax(92px, 36%) minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    padding: 9px 0;
    text-align: left;
    border-bottom: 1px dashed #eef2f7;
    overflow-wrap: anywhere;
  }

  .table-wrap td:last-child {
    border-bottom: 0;
  }

  .table-wrap td::before {
    content: attr(data-label);
    padding-top: 1px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.05em;
    line-height: 1.6;
    text-transform: uppercase;
    color: var(--muted);
  }

  .table-wrap td:not([data-label])::before {
    content: none;
  }

  .table-wrap td.right {
    text-align: left;
  }

  .table-wrap td:not([data-label]) {
    display: block;
  }

  .table-wrap td > .cell-body {
    min-width: 0;
  }

  .table-wrap td.nowrap,
  .table-wrap td .nowrap {
    white-space: normal;
  }

  .table-wrap td input[type="text"],
  .table-wrap td input[type="number"] {
    width: 100%;
  }

  .table-wrap td .table-actions {
    justify-content: flex-start;
  }

  .table-wrap td .table-actions form {
    flex: 0 0 auto;
  }

  .table-wrap td input,
  .table-wrap td select {
    max-width: 100%;
  }

  .table-wrap td .day-row {
    min-width: 0;
  }

  .table-wrap .clamp {
    max-width: 100%;
  }
}

@media (max-width: 640px) {
  .topbar {
    padding: 16px 14px 8px;
  }

  .content {
    padding: 8px 14px 22px;
  }

  .footer {
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 14px;
    text-align: center;
  }

  .topbar-actions {
    width: 100%;
  }

  .topbar-actions > .btn,
  .topbar-actions > form,
  .topbar-actions > a.btn {
    flex: 1 1 auto;
  }

  .topbar-actions form .btn {
    width: 100%;
  }

  .topbar-actions > a.mobile-logout {
    flex: 0 0 auto;
    width: auto;
    margin-left: auto;
  }

  .btn {
    min-height: 40px;
  }

  input,
  select,
  textarea {
    font-size: 16px;
  }

  .stats {
    grid-template-columns: 1fr;
  }

  .form-grid,
  .form-grid.three {
    grid-template-columns: 1fr;
  }

  .table-wrap td {
    grid-template-columns: minmax(84px, 32%) minmax(0, 1fr);
  }

  .pagination {
    flex-direction: column;
    align-items: stretch;
  }

  .pagination .btns {
    width: 100%;
  }

  .pagination .btns .btn {
    flex: 1;
  }

  .device-list li {
    flex-direction: column;
    align-items: flex-start;
  }

  .device-side {
    align-items: flex-start;
  }

  .card-head {
    gap: 10px;
  }

  .heading h1 {
    font-size: 20px;
  }

  .card {
    padding: 16px;
  }

  .filters .field {
    flex: 1 1 100%;
    min-width: 100%;
  }

  .filters-actions {
    width: 100%;
    margin-left: 0;
  }

  .filters-actions .btn {
    flex: 1;
  }

  .card-head {
    flex-direction: column;
  }

  .search {
    width: 100%;
  }

  .search input {
    flex: 1;
    min-width: 0;
  }

  .danger-zone {
    flex-direction: column;
    align-items: flex-start;
  }

  .clamp {
    max-width: 220px;
  }

  .login-card {
    padding: 26px;
  }
}

@media (max-width: 480px) {
  .sidebar .brand-text {
    display: none;
  }

  .nav-link {
    padding: 8px;
  }

  .nav-link .ico {
    width: 16px;
    height: 16px;
    flex-basis: 16px;
  }

  .heading h1 {
    font-size: 19px;
  }

  .stat {
    padding: 14px;
  }

  .stat-icon {
    flex-basis: 38px;
    width: 38px;
    height: 38px;
    border-radius: 10px;
  }

  .stat strong {
    font-size: 22px;
  }

  .kv.kv-grid {
    grid-template-columns: 1fr;
  }

  .kv.kv-grid dd,
  .kv.kv-grid dd:nth-of-type(2n) {
    text-align: left;
  }

  .kv.kv-grid dd {
    padding-bottom: 6px;
  }

  .clamp {
    max-width: 100%;
  }

  .login-card {
    padding: 20px;
  }

  .code-block {
    font-size: 11px;
  }
}

/* ------------------------------------------------------------------ import & shifts */

.day-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
}

.day-check {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 500;
  color: #475569;
}

.day-check input {
  width: auto;
}

.option-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.option-list .checkbox-row {
  margin: 0;
}

.req {
  color: var(--red);
  font-weight: 700;
}

.code-block {
  margin: 0;
  padding: 12px 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.6;
  color: #e2e8f0;
  background: #0b1220;
  border-radius: 10px;
  overflow-x: auto;
  white-space: pre;
}

td input[type="text"],
td input[type="time"],
td input[type="number"] {
  padding: 6px 8px;
  font-size: 12px;
}

td .day-row {
  min-width: 210px;
}
