@font-face {
  font-family: 'IRANSansX';
  src: url('./IRANSansXFaNum-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f5f7fb;
  --bg-secondary: #eef2f8;
  --surface: rgba(255, 255, 255, 0.68);
  --surface-solid: #ffffff;
  --surface-soft: rgba(255, 255, 255, 0.5);
  --text: #0f172a;
  --muted: #64748b;
  --line: rgba(15, 23, 42, 0.08);
  --line-strong: rgba(15, 23, 42, 0.14);
  --primary: #2563eb;
  --primary-2: #4f46e5;
  --primary-soft: rgba(37, 99, 235, 0.12);
  --success-bg: rgba(16, 185, 129, 0.12);
  --success-text: #047857;
  --success-dot: #10b981;
  --danger: #dc2626;
  --danger-soft: rgba(220, 38, 38, 0.11);
  --warning: #b86b00;
  --warning-soft: rgba(245, 158, 11, 0.14);
  --shadow-xl: 0 20px 60px rgba(15, 23, 42, 0.12);
  --shadow-lg: 0 12px 30px rgba(15, 23, 42, 0.10);
  --radius-xl: 32px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --blur: blur(20px);
}

body.dark {
  --bg: #07111f;
  --bg-secondary: #0b1628;
  --surface: rgba(10, 18, 32, 0.62);
  --surface-solid: #0c1729;
  --surface-soft: rgba(255, 255, 255, 0.03);
  --text: #e5eefc;
  --muted: #94a3b8;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --primary: #60a5fa;
  --primary-2: #818cf8;
  --primary-soft: rgba(96, 165, 250, 0.12);
  --success-bg: rgba(16, 185, 129, 0.14);
  --success-text: #6ee7b7;
  --success-dot: #34d399;
  --danger-soft: rgba(220, 38, 38, 0.16);
  --warning-soft: rgba(245, 158, 11, 0.16);
  --shadow-xl: 0 25px 80px rgba(0, 0, 0, 0.42);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.28);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: 'IRANSansX', Tahoma, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 85% 15%, rgba(79, 70, 229, 0.18), transparent 22%),
    radial-gradient(circle at 10% 80%, rgba(37, 99, 235, 0.16), transparent 24%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-secondary) 100%);
  line-height: 1.85;
  transition: background 0.35s ease, color 0.35s ease;
  overflow-x: hidden;
  position: relative;
}

body::before,
body::after {
  content: "";
  position: fixed;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
}

body::before {
  top: -120px;
  right: -80px;
  background: rgba(79, 70, 229, 0.20);
}

body::after {
  bottom: -160px;
  left: -120px;
  background: rgba(37, 99, 235, 0.18);
}

.app-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1220px;
  margin: 0 auto;
  padding: 24px 22px 18px;
}

a {
  color: inherit;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  text-decoration: none;
  min-width: 220px;
}

.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--surface-solid);
  padding: 7px;
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
}

.brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.3;
}

.brand b {
  display: block;
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
}

.topbar nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.topbar nav > a,
.theme-toggle {
  border: 1px solid var(--line);
  background: var(--surface);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  color: var(--text);
  min-height: 44px;
  border-radius: 14px;
  padding: 0 14px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  box-shadow: var(--shadow-lg);
  transition: all 0.25s ease;
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
}

.topbar nav > a:hover,
.theme-toggle:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
}

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
}

.card {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-xl);
  border-radius: var(--radius-xl);
  padding: 28px;
  margin-bottom: 18px;
  transition: background 0.35s ease, border-color 0.35s ease;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.16), transparent 28%, transparent 72%, rgba(255,255,255,0.06)),
    linear-gradient(180deg, rgba(255,255,255,0.08), transparent 20%);
  pointer-events: none;
}

.card > * {
  position: relative;
  z-index: 1;
}

.auth-card {
  max-width: 520px;
  margin: 70px auto 32px;
  padding: 38px;
}

.auth-card h1 {
  font-size: 28px;
  text-align: center;
  margin-bottom: 24px;
}

.auth-card::after {
  content: "";
  position: absolute;
  top: -70px;
  left: -70px;
  width: 180px;
  height: 180px;
  background: var(--primary-soft);
  border-radius: 50%;
  filter: blur(35px);
}

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 10px 0 18px;
}

h1,
h2 {
  color: var(--text);
  font-weight: 900;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
}

h1 {
  font-size: 30px;
}

h2 {
  font-size: 22px;
}

.hint,
.empty {
  color: var(--muted);
}

.hint {
  font-size: 13px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

label {
  display: block;
  margin-bottom: 14px;
  color: var(--text);
  font-weight: 800;
  font-size: 13px;
}

input,
select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.56);
  color: var(--text);
  border-radius: 14px;
  padding: 10px 13px;
  margin-top: 7px;
  font: inherit;
  outline: none;
  transition: all 0.25s ease;
}

body.dark input,
body.dark select {
  background: rgba(255,255,255,0.04);
}

input:focus,
select:focus {
  border-color: rgba(79, 70, 229, 0.45);
  box-shadow: 0 0 0 5px var(--primary-soft);
}

.grid-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.form-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 8px;
}

.btn {
  min-height: 42px;
  padding: 8px 14px;
  border-radius: 14px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 800;
  font-family: inherit;
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(255,255,255,0.56);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.25s ease;
}

body.dark .btn {
  background: rgba(255,255,255,0.04);
}

.btn:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
}

.btn.primary {
  color: #fff;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
  border-color: transparent;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.24);
}

.btn.danger {
  color: #fff;
  background: linear-gradient(135deg, #ef4444 0%, var(--danger) 100%);
  border-color: transparent;
  box-shadow: 0 12px 28px rgba(220, 38, 38, 0.18);
}

.alert {
  position: relative;
  padding: 13px 15px;
  border-radius: 16px;
  margin-bottom: 15px;
  border: 1px solid var(--line);
  background: var(--surface);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  box-shadow: var(--shadow-lg);
}

.alert.success {
  background: var(--success-bg);
  color: var(--success-text);
}

.alert.error {
  background: var(--danger-soft);
  color: var(--danger);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 7px rgba(16, 185, 129, 0.10);
}

.badge.ok {
  background: var(--success-bg);
  color: var(--success-text);
}

.badge.warn {
  background: var(--warning-soft);
  color: var(--warning);
}

.badge.bad {
  background: var(--danger-soft);
  color: var(--danger);
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255,255,255,0.28);
}

body.dark .table-wrap {
  background: rgba(255,255,255,0.025);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th,
td {
  text-align: right;
  border-bottom: 1px solid var(--line);
  padding: 13px 14px;
  vertical-align: middle;
  font-size: 13px;
}

tr:last-child td {
  border-bottom: none;
}

th {
  color: var(--muted);
  font-weight: 900;
  background: rgba(255,255,255,0.32);
}

body.dark th {
  background: rgba(255,255,255,0.04);
}

code {
  direction: ltr;
  unicode-bidi: plaintext;
  display: inline-block;
  background: var(--primary-soft);
  color: var(--primary);
  padding: 3px 7px;
  border-radius: 8px;
  font-family: Consolas, monospace;
  font-size: 12px;
}

.actions {
  display: flex;
  gap: 7px;
  align-items: center;
  flex-wrap: wrap;
}

.actions form {
  display: inline-flex;
  margin: 0;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.stat {
  padding: 18px;
  border-radius: 20px;
  background: var(--surface);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
}

.stat b {
  display: block;
  color: var(--text);
  font-size: 20px;
  margin-bottom: 5px;
}

.stat span {
  color: var(--muted);
  font-size: 12px;
}

.upload-form {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  align-items: end;
}

.details {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px;
  background: rgba(255,255,255,0.24);
}

body.dark .details {
  background: rgba(255,255,255,0.025);
}

.details dt {
  font-weight: 900;
  color: var(--muted);
}

.details dd {
  margin: 0;
  direction: ltr;
  unicode-bidi: plaintext;
  text-align: left;
  color: var(--text);
}

.footer {
  margin-top: 16px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 900px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar nav {
    justify-content: flex-start;
  }

  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .upload-form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .app-shell {
    padding: 16px;
  }

  .topbar nav > a,
  .theme-toggle {
    min-height: 40px;
    padding: 0 11px;
    font-size: 12px;
  }

  .card {
    border-radius: 24px;
    padding: 20px;
  }

  .auth-card {
    margin: 34px auto 20px;
    padding: 24px 20px;
  }

  .auth-card h1,
  h1 {
    font-size: 24px;
  }

  .page-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .grid-form,
  .stats,
  .details {
    grid-template-columns: 1fr;
  }

  .form-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }
}

/* RTL / Persian number fixes */
.num,
.metric,
.fa-date,
.badge,
.stat b,
td,
th {
  unicode-bidi: isolate;
}

.metric,
.fa-date,
.num {
  direction: rtl;
  text-align: right;
  white-space: nowrap;
}

.ltr-input,
input[type="number"],
input[type="password"],
input[name="username"],
input[name="s3_prefix"] {
  direction: ltr;
  text-align: left;
  unicode-bidi: plaintext;
}

input.jalali-date {
  direction: rtl;
  text-align: right;
  cursor: pointer;
  background-image: linear-gradient(135deg, var(--primary-soft), transparent);
}

.gregorian-date {
  display: none !important;
}

.details dd {
  direction: rtl;
  unicode-bidi: isolate;
  text-align: right;
}

.details dd code,
code {
  direction: ltr;
  unicode-bidi: isolate;
  text-align: left;
}

/* Lightweight Jalali datepicker */
.jalali-picker {
  position: absolute;
  z-index: 9999;
  width: 292px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  box-shadow: var(--shadow-xl);
  padding: 12px;
  color: var(--text);
  direction: rtl;
}

body.dark .jalali-picker {
  background: rgba(12, 23, 41, 0.94);
}

.jp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.jp-head strong {
  font-size: 14px;
  font-weight: 900;
}

.jp-head button,
.jp-foot button,
.jp-days button {
  font: inherit;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.56);
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s ease;
}

body.dark .jp-head button,
body.dark .jp-foot button,
body.dark .jp-days button {
  background: rgba(255,255,255,0.04);
}

.jp-head button {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  font-size: 20px;
  line-height: 1;
}

.jp-week,
.jp-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.jp-week {
  margin-bottom: 7px;
}

.jp-week span {
  text-align: center;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.jp-days span,
.jp-days button {
  width: 32px;
  height: 32px;
}

.jp-days button {
  border-radius: 11px;
  font-size: 12px;
}

.jp-days button:hover,
.jp-head button:hover,
.jp-foot button:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
}

.jp-days button.is-selected {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.18);
}

.jp-foot {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
}

.jp-foot button {
  min-height: 34px;
  border-radius: 12px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 800;
}

@media (max-width: 640px) {
  .jalali-picker {
    position: fixed;
    left: 14px !important;
    right: 14px !important;
    top: auto !important;
    bottom: 14px;
    width: auto;
  }

  .jp-days span,
  .jp-days button {
    width: 100%;
  }
}

.field-hint {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}

.auto-prefix-preview {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.34);
  color: var(--muted);
}

body.dark .auto-prefix-preview {
  background: rgba(255, 255, 255, 0.03);
}

.auto-prefix-preview span {
  font-weight: 800;
  color: var(--text);
}

.auto-prefix-preview code {
  direction: ltr;
  unicode-bidi: plaintext;
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 10px;
  color: var(--primary);
  background: var(--primary-soft);
}

.auto-prefix-preview small {
  flex-basis: 100%;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}

.danger-zone .details {
  margin: 18px 0;
}

.delete-confirm-form {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.delete-options {
  display: grid;
  gap: 12px;
}

.delete-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,0.34);
  cursor: pointer;
}

body.dark .delete-option {
  background: rgba(255,255,255,0.03);
}

.delete-option input {
  width: 18px;
  height: 18px;
  margin-top: 4px;
  flex: 0 0 auto;
}

.delete-option strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
}

.delete-option small {
  display: block;
  line-height: 1.9;
  color: var(--muted);
}

.delete-option.danger-choice {
  border-color: rgba(220, 38, 38, 0.24);
  background: var(--danger-soft);
}

/* Transfer progress modal */
.transfer-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(15, 23, 42, 0.34);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  opacity: 1;
  pointer-events: auto;
  transition: opacity .22s ease, visibility .22s ease;
}

.transfer-modal.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.transfer-card {
  width: min(420px, 100%);
  position: relative;
  text-align: center;
  border-radius: 32px;
  padding: 30px 26px 26px;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 82% 10%, rgba(79, 70, 229, .15), transparent 28%),
    radial-gradient(circle at 12% 88%, rgba(37, 99, 235, .13), transparent 32%),
    var(--surface);
  box-shadow: var(--shadow-xl);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  transform: translateY(0) scale(1);
  animation: transferIn .22s ease both;
}

@keyframes transferIn {
  from { transform: translateY(12px) scale(.98); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.transfer-close {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.52);
  color: var(--text);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: transform .2s ease, border-color .2s ease;
}

body.dark .transfer-close {
  background: rgba(255,255,255,.05);
}

.transfer-close:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
}

.transfer-ring {
  --p: 0;
  width: 148px;
  height: 148px;
  margin: 4px auto 18px;
  position: relative;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255,255,255,.32);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 18px 40px rgba(37,99,235,.12);
}

body.dark .transfer-ring {
  background: rgba(255,255,255,.04);
}

.transfer-ring svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.transfer-ring circle {
  fill: none;
  stroke-width: 10;
  cx: 60;
  cy: 60;
  r: 52;
}

.transfer-ring .track {
  stroke: var(--line);
}

.transfer-ring .bar {
  stroke: var(--primary);
  stroke-linecap: round;
  stroke-dasharray: 326.73;
  stroke-dashoffset: calc(326.73 - (326.73 * var(--p)) / 100);
  transition: stroke-dashoffset .25s ease, stroke .25s ease;
  filter: drop-shadow(0 8px 12px rgba(37,99,235,.24));
}

.transfer-modal.is-success .transfer-ring .bar {
  stroke: var(--success-dot);
  filter: drop-shadow(0 8px 12px rgba(16,185,129,.24));
}

.transfer-modal.is-error .transfer-ring .bar {
  stroke: #ef4444;
  filter: drop-shadow(0 8px 12px rgba(239,68,68,.22));
}

.transfer-percent {
  position: relative;
  z-index: 1;
  font-size: 27px;
  font-weight: 900;
  letter-spacing: -.5px;
  color: var(--text);
  direction: ltr;
  unicode-bidi: plaintext;
}

.transfer-state {
  font-weight: 900;
  font-size: 18px;
  color: var(--text);
  margin-bottom: 10px;
}

.transfer-name {
  max-width: 100%;
  direction: ltr;
  unicode-bidi: plaintext;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 8px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.32);
  margin-bottom: 14px;
}

body.dark .transfer-name {
  background: rgba(255,255,255,.035);
}

.transfer-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.transfer-meta span {
  direction: rtl;
  unicode-bidi: plaintext;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.4);
  padding: 12px 10px;
  color: var(--muted);
  font-weight: 800;
  font-size: 13px;
}

body.dark .transfer-meta span {
  background: rgba(255,255,255,.035);
}

.transfer-message {
  min-height: 24px;
  line-height: 1.9;
  color: var(--muted);
  font-size: 13px;
}

.transfer-modal.is-success .transfer-message {
  color: var(--success-text);
  font-weight: 800;
}

.transfer-modal.is-error .transfer-message {
  color: #ef4444;
  font-weight: 800;
}

@media (max-width: 640px) {
  .transfer-card {
    border-radius: 24px;
    padding: 26px 18px 22px;
  }

  .transfer-ring {
    width: 128px;
    height: 128px;
  }

  .transfer-percent {
    font-size: 23px;
  }

  .transfer-meta {
    grid-template-columns: 1fr;
  }
}


/* Customer upload form alignment fixes */
.upload-form label {
  margin-bottom: 0;
}

.upload-form .btn,
.upload-form button.btn {
  min-height: 46px;
  align-self: end;
  margin: 0;
}

@media (max-width: 900px) {
  .upload-form .btn,
  .upload-form button.btn {
    width: 100%;
  }
}

/* Password management checkbox / toggle fix */
.check-row {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  min-height: 56px;
  padding: 14px 16px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,0.42);
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.8;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.16);
}

body.dark .check-row {
  background: rgba(255,255,255,0.03);
}

.check-row:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.check-row input[type="checkbox"] {
  direction: ltr;
  unicode-bidi: isolate;
  appearance: none;
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  min-height: 22px;
  margin: 0;
  padding: 0;
  flex: 0 0 22px;
  border-radius: 8px;
  border: 1px solid rgba(79, 70, 229, 0.35);
  background: rgba(255,255,255,0.66);
  position: relative;
  box-shadow: none;
}

body.dark .check-row input[type="checkbox"] {
  direction: ltr;
  unicode-bidi: isolate;
  background: rgba(255,255,255,0.06);
}

.check-row input[type="checkbox"]:checked {
  border-color: transparent;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5L10 17.5L20 6.5'/%3E%3C/svg%3E") center / 16px 16px no-repeat,
    linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
  box-shadow: 0 8px 18px rgba(79, 70, 229, 0.22);
}

.check-row input[type="checkbox"]:checked::after {
  content: none;
}
