* { box-sizing: border-box; }

/* Light is the site-wide default regardless of system preference; dark mode only */
/* applies once the user has explicitly switched to it (persisted via localStorage, */
/* see the inline theme script in head.ejs / dash-head.ejs) and stays sticky until */
/* they switch back — the JS always tags <html data-theme> on load, so this bare */
/* :root block only matters as the no-JS fallback. */
:root {
  color-scheme: dark;
  --bg: #262624;
  --panel-bg: #30302e;
  --panel-border: #45443f;
  --text: #f5f4ef;
  --text-secondary: #c2c0b6;
  --text-muted: #9a988e;
  --text-faint: #918f85;
  --border: #45443f;
  --border-strong: #55534c;
  --navbar-bg: #1e1e1c;
  --navbar-text: #f5f4ef;
  --accent: #d97757;
  --accent-hover: #c86a4d;
  --accent-contrast: #ffffff;
  --accent-soft-bg: #3a2c24;
  --accent-soft-text: #e2967a;
  --link: #d97757;
  --input-bg: #35342f;
  --input-border: #55534c;
  --code-bg: #3a3935;
  --row-hover: #35342f;
  --category-bg: #35342f;
  --category-border: #45443f;
  --surface-soft: #35342f;
  --surface-soft-border: #45443f;
  --auth-backdrop-bg: #1e1e1c;
  --modal-overlay-bg: rgba(0,0,0,0.7);
  --alert-error-bg: #3a2323;
  --alert-error-text: #f5a89e;
  --alert-error-border: #5c2f2f;
  --alert-success-bg: #1f3327;
  --alert-success-text: #7fd99a;
  --alert-success-border: #2f4d3a;
  --shadow-soft: rgba(0,0,0,0.35);
  --shadow-strong: rgba(0,0,0,0.5);
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f5f5;
  --panel-bg: #ffffff;
  --panel-border: #dddddd;
  --text: #333333;
  --text-secondary: #666666;
  --text-muted: #999999;
  --text-faint: #8a97a3;
  --border: #eeeeee;
  --border-strong: #dddddd;
  --navbar-bg: #2c3e50;
  --navbar-text: #ecf0f1;
  --accent: #2a6ebb;
  --accent-hover: #1f5a9e;
  --accent-contrast: #ffffff;
  --accent-soft-bg: #eaf2fc;
  --accent-soft-text: #1f5a9e;
  --link: #2a6ebb;
  --input-bg: #ffffff;
  --input-border: #cccccc;
  --code-bg: #f0f2f5;
  --row-hover: #fafcff;
  --category-bg: #eef2f6;
  --category-border: #dde5ed;
  --surface-soft: #f8fafc;
  --surface-soft-border: #eef1f4;
  --auth-backdrop-bg: #eef1f4;
  --modal-overlay-bg: rgba(0,0,0,0.5);
  --alert-error-bg: #fdecea;
  --alert-error-text: #922b21;
  --alert-error-border: #f5c6cb;
  --alert-success-bg: #e9f7ef;
  --alert-success-text: #1e7e34;
  --alert-success-border: #c3e6cb;
  --shadow-soft: rgba(0,0,0,0.12);
  --shadow-strong: rgba(0,0,0,0.18);
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  transition: background 0.15s ease, color 0.15s ease;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

code {
  font-family: "Courier New", Courier, monospace;
  background: var(--code-bg);
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 13px;
}

.theme-toggle {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.3);
  color: var(--navbar-text);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
}
.theme-toggle:hover { background: rgba(255,255,255,0.1); }
.theme-toggle svg { width: 16px; height: 16px; }

.contact-panel {
  text-align: center;
  padding: 40px 30px;
}
.contact-icon { margin-bottom: 16px; }
.contact-panel h2 { border: none; padding: 0; margin: 0 0 8px; }
.contact-sub { color: var(--text-secondary); font-size: 13px; margin-bottom: 22px; }
a.contact-btn.btn { display: inline-block; padding: 13px 30px; font-size: 16px; }

.api-key-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-soft);
  border: 1px solid var(--surface-soft-border);
  border-radius: 3px;
  padding: 10px 12px;
}
.api-key-row code {
  flex: 1;
  background: none;
  padding: 0;
  word-break: break-all;
}

.navbar {
  background: var(--navbar-bg);
  padding: 12px 20px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
}
.navbar .brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-size: 20px;
  font-weight: bold;
  justify-self: start;
}
.navbar .brand:hover { text-decoration: none; }
.navbar .brand .brand-accent { color: var(--accent); }
.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 7px;
  display: block;
}
.navbar .nav-center {
  justify-self: center;
  display: flex;
  gap: 28px;
}
.navbar .nav-center a {
  color: var(--navbar-text);
  font-size: 14px;
}
.navbar .nav-center a:hover { color: #5dade2; text-decoration: none; }

.navbar .nav-links {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 16px;
  padding-right: 6px;
}
.navbar .nav-links a {
  color: var(--navbar-text);
  font-size: 14px;
}
.navbar .nav-links a:hover { color: #5dade2; text-decoration: none; }
.navbar .nav-links .btn-outline {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.4);
  color: #fff !important;
}
.navbar .nav-links .btn-outline:hover { background: rgba(255,255,255,0.1); }

@media (max-width: 700px) {
  .navbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    row-gap: 10px;
  }
  .navbar .brand { justify-self: unset; width: 100%; justify-content: center; }
  .navbar .nav-center { justify-self: unset; flex-wrap: wrap; justify-content: center; gap: 10px 20px; width: 100%; }
  .navbar .nav-links { justify-self: unset; flex-wrap: wrap; justify-content: center; width: 100%; padding-right: 0; }
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 24px 20px;
}
.container-wide { max-width: 1400px; }

.panel {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 3px;
  padding: 16px 20px;
  margin-bottom: 20px;
}
.panel h2 {
  margin-top: 0;
  font-size: 21px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}
.order-description-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.order-avg-time {
  font-size: 13px;
  font-weight: normal;
  color: var(--text-muted);
  white-space: nowrap;
}

@media (max-width: 700px) {
  table { display: block; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }

  /* On the services catalog specifically, hide the lower-priority columns (ID/Min/Max —
     all still available via the "Info" button) so Service/Rate/Order stay visible without
     needing to scroll the table at all, instead of leaving the Order button off-screen. */
  .catalog-table {
    table-layout: fixed;
    display: table;
    overflow-x: visible;
    white-space: normal;
  }
  .catalog-table th:nth-child(1),
  .catalog-table th:nth-child(4),
  .catalog-table th:nth-child(5),
  .catalog-table th:nth-child(6),
  .catalog-table tr.service-row td:nth-child(1),
  .catalog-table tr.service-row td:nth-child(4),
  .catalog-table tr.service-row td:nth-child(5),
  .catalog-table tr.service-row td:nth-child(6) {
    display: none;
  }
  .catalog-table th:nth-child(2), .catalog-table td:nth-child(2) { width: 50%; }
  .catalog-table th:nth-child(3), .catalog-table td:nth-child(3) { width: 25%; }
  .catalog-table th:nth-child(7), .catalog-table td:nth-child(7) { width: 25%; }
  .catalog-table tr.service-row td:nth-child(2) { white-space: normal; word-break: break-word; }
  .catalog-table th { white-space: normal; }
  .catalog-table tr.service-row td { padding-top: 18px; padding-bottom: 18px; }
  .catalog-table .actions-cell {
    white-space: normal;
  }
  .catalog-table .actions-cell-inner {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }
  .catalog-table .actions-cell .btn { margin-left: 0; text-align: center; }
  .catalog-table .actions-cell .btn:not(:last-child) { margin-bottom: 14px; }

  /* API param tables (Param/Required/Description) — same fixed-layout technique so
     descriptions wrap in place instead of forcing a horizontal scroll for 3 short columns. */
  .api-params {
    table-layout: fixed;
    display: table;
    overflow-x: visible;
    white-space: normal;
  }
  .api-params th, .api-params td { white-space: normal; overflow-wrap: break-word; padding: 6px 6px; }
  .api-params th:nth-child(1), .api-params td:nth-child(1) { width: 29%; }
  .api-params th:nth-child(2), .api-params td:nth-child(2) { width: 27%; }
  .api-params th:nth-child(3), .api-params td:nth-child(3) { width: 44%; }
  .api-params code { padding: 2px 4px; }
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
th, td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}
th {
  background: var(--code-bg);
  font-weight: bold;
  border-bottom: 2px solid var(--panel-border);
}
tr:hover td { background: var(--row-hover); }

.category-row td {
  background: var(--category-bg);
  font-weight: bold;
  color: var(--text);
  padding: 8px 10px;
  border-bottom: 1px solid var(--category-border);
}
:root:not([data-theme="light"]) .category-row td {
  background: rgba(217, 119, 87, 0.12);
  border-bottom-color: rgba(217, 119, 87, 0.3);
}

.section-spacer td {
  padding: 0;
  border: none;
  height: 14px;
  background: transparent;
}

.category-label {
  display: inline-block;
  font-size: 16px;
  letter-spacing: 0.2px;
  line-height: 1.6;
}

.actions-cell {
  white-space: nowrap;
  text-align: left;
}
.actions-cell .btn { margin-left: 6px; }
.actions-cell .btn:first-child { margin-left: 0; }

.catalog-table thead th {
  background: var(--accent-soft-bg);
  color: var(--accent-soft-text);
}
:root:not([data-theme="light"]) .catalog-table thead th {
  background: var(--code-bg);
  color: var(--text);
  border-bottom: 2px solid var(--accent);
}
.catalog-table .actions-cell { text-align: right; }
.catalog-table tr.service-row td:nth-child(4),
.catalog-table tr.service-row td:nth-child(5) {
  font-size: 12px;
  color: var(--text-muted);
}
.avg-time-cell { color: var(--text-muted); white-space: nowrap; font-size: 12px; }
.avg-time-value { display: inline-flex; align-items: center; gap: 4px; }
.avg-time-icon { flex-shrink: 0; opacity: 0.75; }
.catalog-table th:nth-child(6), .catalog-table td:nth-child(6) { text-align: center; }
.catalog-table tr.service-row td:nth-child(2) {
  max-width: 480px;
  white-space: normal;
  overflow-wrap: break-word;
}
.dash-main .catalog-table tr.service-row td:nth-child(2) { font-size: 14.5px; }
.dash-main .catalog-table tr.service-row td:nth-child(3) { font-size: 14.5px; }
.catalog-table th:nth-child(3), .catalog-table td:nth-child(3) { text-align: center; }

.btn-info { background: #7f8c8d; }
.btn-info:hover { background: #6c7a7a; }

.panel h2.step-heading {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  margin: 0 0 14px;
  padding-bottom: 0;
  border-bottom: none;
  font-size: 13px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-faint);
}
.panel h2.step-heading:not(:first-child) { margin-top: 32px; }
.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: bold;
  flex-shrink: 0;
}

.platform-tabs {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-bottom: 22px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.platform-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border: 1px solid var(--panel-border);
  border-radius: 24px;
  color: var(--text-secondary);
  background: var(--panel-bg);
  font-size: 15px;
  font-weight: bold;
  box-shadow: 0 1px 2px var(--shadow-soft);
}
.platform-tab svg { flex-shrink: 0; }
.platform-tab:hover {
  border-color: var(--border-strong);
  background: var(--surface-soft);
  text-decoration: none;
}
.platform-tab.active {
  background: var(--accent-soft-bg);
  border-color: var(--accent);
  color: var(--accent-soft-text);
  box-shadow: 0 1px 3px var(--shadow-soft);
}
.platform-tab-disabled {
  cursor: not-allowed;
  position: relative;
}
.platform-tab-disabled:hover { border-color: var(--panel-border); background: var(--panel-bg); }
/* Opacity lives on the icon/label wrapper only, not the whole tab — otherwise it also
   washes out the "Coming soon" badge, which should stay fully vivid. */
.platform-tab-disabled-content { display: inline-flex; align-items: center; gap: 8px; opacity: 0.6; }
.platform-tab-badge {
  position: absolute;
  top: -9px;
  right: -10px;
  background: none;
  color: #fff;
  border: 1px solid #fff;
  font-size: 10px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  padding: 3px 8px;
  border-radius: 10px;
  white-space: nowrap;
  box-shadow: 0 1px 2px var(--shadow-soft);
  opacity: 0.8;
}
:root[data-theme="light"] .platform-tab-badge { background: var(--accent); color: #fff; border-color: var(--accent); opacity: 1; }

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

.auth-backdrop {
  min-height: calc(100vh - 53px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background: var(--auth-backdrop-bg);
}
.auth-box {
  background: var(--panel-bg);
  border-radius: 6px;
  box-shadow: 0 4px 24px var(--shadow-soft);
  padding: 28px 30px;
  width: 100%;
  max-width: 380px;
  position: relative;
}
.auth-close {
  position: absolute;
  top: 12px;
  right: 14px;
  font-size: 20px;
  line-height: 1;
  color: var(--text-muted);
}
.auth-close:hover { color: var(--text); text-decoration: none; }
.auth-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.auth-tab {
  flex: 1;
  text-align: center;
  padding: 10px 0 12px;
  font-weight: bold;
  font-size: 14px;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.auth-tab:hover { text-decoration: none; color: var(--text-secondary); }
.auth-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.auth-box h2 { margin: 0 0 4px; font-size: 18px; text-align: center; border: none; padding: 0; color: var(--text); }
.auth-box .auth-sub { text-align: center; color: var(--text-muted); font-size: 12px; margin-bottom: 18px; }
#auth-panel-login h2, #auth-panel-register h2 { margin-bottom: 22px; }

.btn.btn-large { padding: 15px 20px; font-size: 17px; }

input.two-fa-code-input {
  font-size: 30px;
  letter-spacing: 10px;
  text-align: center;
  font-weight: bold;
  padding: 14px 12px;
  max-width: 260px;
  width: 100%;
  margin: 10px 0;
  display: block;
}
/* The login page's code entry sits in a centered auth box, so keep it centered only there. */
.auth-box input.two-fa-code-input { margin: 10px auto; }

.modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--modal-overlay-bg);
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.modal-box {
  background: var(--panel-bg);
  border-radius: 4px;
  padding: 20px 24px;
  width: 90%;
  max-width: 420px;
  position: relative;
}
.modal-box h3 { margin: 0 0 7px; padding-right: 24px; font-size: 16px; color: var(--text); }
#si-name { margin-bottom: 16px; }
.modal-description { color: var(--text-secondary); font-size: 15px; line-height: 1.6; margin-bottom: 18px; white-space: pre-line; }
.modal-description-list {
  margin: 0 0 18px;
  padding-left: 0;
  list-style: none;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.6;
}
.modal-description-list li { margin-bottom: 10px; }
.modal-description-list .line-icon { margin-right: 0.45em; }
.modal-description-list li:last-child { margin-bottom: 0; }
.modal-close {
  position: absolute;
  top: 10px;
  right: 14px;
  border: none;
  background: none;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  color: var(--text-muted);
}
.modal-close:hover { color: var(--text); }

.modal-section-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin: 16px 0 8px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}
.modal-box .modal-section-title:first-of-type { border-top: none; padding-top: 0; }

.modal-list {
  display: flex;
  flex-direction: column;
  margin-bottom: 4px;
}
.modal-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 4px;
  border-bottom: 1px solid var(--border);
}
.modal-row:last-child { border-bottom: none; }
.modal-row-icon { font-size: 16px; width: 20px; text-align: center; flex-shrink: 0; }
.modal-row-label { flex: 1; font-size: 13px; color: var(--text-secondary); }
.modal-row-value { font-size: 14px; font-weight: bold; color: var(--text); text-align: right; }

.modal-order-btn {
  display: block;
  width: 100%;
  text-align: center;
  margin-top: 16px;
}

.api-quickfacts {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}
.api-quickfact {
  display: flex;
  gap: 12px;
  align-items: baseline;
  padding: 8px 10px;
  background: var(--surface-soft);
  border: 1px solid var(--surface-soft-border);
  border-radius: 3px;
}
.api-quickfact-label {
  flex: 0 0 90px;
  font-size: 12px;
  font-weight: bold;
  text-transform: uppercase;
  color: var(--text-faint);
}
.api-quickfact-value {
  flex: 1 1 0;
  min-width: 0;
  overflow-wrap: break-word;
}
.api-quickfact-value code { overflow-wrap: break-word; }

.api-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.api-toc a {
  padding: 6px 14px;
  border: 1px solid var(--panel-border);
  border-radius: 20px;
  background: var(--surface-soft);
  color: var(--accent);
  font-size: 13px;
  font-family: "Courier New", Courier, monospace;
}
.api-toc a:hover { background: var(--accent-soft-bg); text-decoration: none; }

.api-action-title {
  font-family: "Courier New", Courier, monospace;
  background: var(--navbar-bg);
  color: #fff;
  display: inline-block;
  padding: 4px 12px;
  border-radius: 3px;
  margin: 0 0 12px;
  font-size: 15px;
}

.api-params { margin: 16px 0; }
.api-params td, .api-params th { font-size: 13px; }

.api-example { margin-top: 18px; }
.api-example-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-faint);
  margin-bottom: 6px;
  font-weight: bold;
}

.code-block {
  background: var(--code-bg);
  border: 1px solid var(--panel-border);
  border-radius: 3px;
  padding: 12px 14px;
  font-family: "Courier New", Courier, monospace;
  font-size: 13px;
  overflow-x: auto;
  white-space: pre;
  margin: 0;
  color: var(--text);
}

.btn {
  -webkit-appearance: none;
  appearance: none;
  display: inline-block;
  padding: 7px 16px;
  background: var(--accent);
  color: #fff !important;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  font-size: 13px;
  font-weight: bold;
  font-family: inherit;
  box-shadow: 0 1px 2px var(--shadow-soft);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.btn:hover {
  background: var(--accent-hover);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px var(--shadow-strong);
}
.btn:active { transform: translateY(0); box-shadow: 0 1px 2px var(--shadow-soft); }
.btn-small { padding: 4px 12px; font-size: 12px; }
.btn-green { background: #27ae60; }
.btn-green:hover { background: #1e8449; }
.btn-red { background: #c0392b; }
.btn-red:hover { background: #922b21; }

.btn-outline {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent) !important;
  box-shadow: none;
}
.btn-outline:hover { background: var(--accent-soft-bg); }

@keyframes copy-btn-pop {
  0% { transform: scale(1); }
  35% { transform: scale(1.1); }
  100% { transform: scale(1); }
}
.copy-btn-flash {
  background: #27ae60 !important;
  animation: copy-btn-pop 0.25s ease;
}
.copy-btn-flash:hover { background: #27ae60 !important; }

form.inline { display: inline; }

input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
  opacity: 1;
  cursor: pointer;
  zoom: 1.5;
}

input[type=text], input[type=email], input[type=password], input[type=number] {
  padding: 6px 8px;
  border: 1px solid var(--input-border);
  border-radius: 3px;
  font-size: 13px;
  width: 100%;
  max-width: 320px;
  background: var(--input-bg);
  color: var(--text);
}
.auth-box input[type=email], .auth-box input[type=password] {
  padding: 12px 14px;
  font-size: 15px;
  border-radius: 6px;
}
.auth-box label { margin: 20px 0 8px; }
label { display: block; margin: 10px 0 4px; font-weight: bold; font-size: 13px; color: var(--text); }
label.order-sublabel { font-size: 12px; color: var(--text-secondary); margin-top: 0; }

.alert {
  padding: 10px 14px;
  border-radius: 3px;
  margin-bottom: 16px;
  font-size: 13px;
}
.alert-error { background: var(--alert-error-bg); color: var(--alert-error-text); border: 1px solid var(--alert-error-border); }
.alert-success { background: var(--alert-success-bg); color: var(--alert-success-text); border: 1px solid var(--alert-success-border); }

.balance {
  font-size: 22px;
  font-weight: bold;
  color: #27ae60;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 11px;
  color: #fff;
  background: #7f8c8d;
  text-transform: uppercase;
}
.badge-pending { background: #e67e22; }
.badge-completed { background: #27ae60; }
.badge-processing, .badge-in-progress, .badge-active { background: #2980b9; }
.badge-partial { background: #d4ac0d; }
.badge-canceled, .badge-rejected { background: #c0392b; }
.badge-refunded { background: #7f8c8d; }
.badge-approved { background: #27ae60; }
.badge-paid { background: #27ae60; }
.badge-open { background: #2980b9; }
.badge-closed { background: #7f8c8d; }

.seo-block h2 {
  font-size: 15px;
  color: var(--text-faint);
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 10px;
}
.seo-block p {
  font-size: 12px;
  color: var(--text-faint);
  line-height: 1.7;
  margin: 0 0 10px;
}
.seo-block p:last-child { margin-bottom: 0; }

footer {
  text-align: center;
  padding: 20px;
  color: var(--text-muted);
  font-size: 12px;
}
.footer-links { margin-bottom: 14px; }
.footer-links a { color: var(--text-secondary); }
.footer-links a:hover { color: var(--accent); }
.footer-sep { margin: 0 8px; color: var(--border-strong); }

.legal-page h3 { margin: 22px 0 8px; font-size: 15px; color: var(--text); }
.legal-page h3:first-of-type { margin-top: 16px; }
.legal-page p, .legal-page li { font-size: 13px; line-height: 1.6; color: var(--text-secondary); }
.legal-page ul { padding-left: 20px; }
.legal-updated { color: var(--text-muted); font-size: 12px; margin-top: -6px; }

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

.dash-sidebar {
  width: 230px;
  flex-shrink: 0;
  background: var(--panel-bg);
  border-right: 1px solid var(--panel-border);
  display: flex;
  flex-direction: column;
  padding: 20px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.dash-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: bold;
  color: var(--text);
  margin-bottom: 28px;
  padding: 0 6px;
}
.dash-brand:hover { text-decoration: none; }
.dash-brand .brand-logo { width: 30px; height: 30px; }
.dash-brand .brand-accent { color: var(--accent); }

.dash-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.dash-nav-divider {
  height: 1px;
  background: var(--border);
  margin: 16px 6px;
}
.dash-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
}
.dash-nav-item:hover { background: var(--surface-soft); text-decoration: none; color: var(--text); }
.dash-nav-item.active { background: var(--accent-soft-bg); color: var(--accent-soft-text); }
.dash-nav-icon { width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.dash-nav-icon svg { width: 17px; height: 17px; }

.dash-sidebar-footer {
  border-top: 1px solid var(--border);
  padding-top: 8px;
  margin-top: auto;
}
.dash-docs-link { color: var(--text-muted); margin-bottom: 6px; }
.dash-user-email {
  font-size: 12px;
  color: var(--text-muted);
  padding: 8px 6px 0;
  margin-bottom: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-top: 1px solid var(--border);
}

.dash-main {
  flex: 1;
  padding: 28px 32px;
  max-width: 1080px;
}
.dash-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.dash-page-title {
  font-size: 22px;
  margin: 0;
  color: var(--text);
}
.dash-topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.balance-chip {
  background: var(--surface-soft);
  border: 1px solid var(--surface-soft-border);
  color: #27ae60;
  font-weight: bold;
  font-size: 14px;
  padding: 7px 14px;
  border-radius: 20px;
  display: inline-block;
}
.balance-chip:hover { text-decoration: none; background: var(--accent-soft-bg); }
.lang-select {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-soft);
  border: 1px solid var(--surface-soft-border);
  border-radius: 20px;
  padding: 6px 12px;
  color: var(--text-secondary);
}
.lang-select select {
  border: none;
  background: none;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: bold;
}
.dash-topbar .theme-toggle {
  border: 1px solid var(--panel-border);
  color: var(--text-secondary);
}
.dash-topbar .theme-toggle:hover { background: var(--surface-soft); }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  padding: 16px 18px;
}
.stat-card-label {
  font-size: 12px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 6px;
}
.stat-card-value { font-size: 24px; font-weight: bold; color: var(--text); }

@media (max-width: 800px) {
  .dash-layout { flex-direction: column; }
  .dash-sidebar { width: 100%; height: auto; position: static; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .dash-nav { flex-direction: row; flex-wrap: wrap; }
  .dash-sidebar-footer { display: flex; align-items: center; gap: 10px; border-top: none; margin-top: 0; }
  .dash-main { padding: 20px; }
}

.catalog-filterbar {
  display: flex;
  align-items: stretch;
  background: var(--surface-soft);
  border: 1px solid var(--surface-soft-border);
  border-radius: 24px;
  overflow: visible;
  margin-bottom: 16px;
}
.catalog-filter-dropdown-wrap { position: relative; }
.catalog-filter-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 10px 16px;
  border-radius: 24px 0 0 24px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: bold;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  height: 100%;
}
.catalog-filter-btn:hover { background: var(--accent-hover); }
.catalog-filter-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  box-shadow: 0 4px 16px var(--shadow-soft);
  min-width: 240px;
  max-height: 320px;
  overflow-y: auto;
  z-index: 20;
  margin-top: 6px;
  padding: 6px;
}
.catalog-filter-option {
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.catalog-filter-option:hover { background: var(--surface-soft); }
.catalog-filter-option.active { background: var(--accent-soft-bg); color: var(--accent-soft-text); font-weight: bold; }

.catalog-search-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  color: var(--text-muted);
}
.catalog-search-wrap input {
  border: none;
  background: none;
  flex: 1;
  font-size: 13px;
  padding: 10px 0;
  color: var(--text);
  max-width: none;
}
.catalog-search-wrap input:focus { outline: none; }

.stat-card-with-action {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.stat-add-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  border: none;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.stat-add-btn:hover { background: var(--accent-hover); text-decoration: none; }

.danger-zone { border-color: var(--alert-error-border); }
.danger-zone h2 { color: var(--alert-error-text); }

.balance-value { color: #27ae60; font-size: 30px; }

.heleket-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 24px 0 0;
  padding: 12px 16px;
  background: var(--surface-soft);
  border: 1px solid var(--surface-soft-border);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 13px;
}
.heleket-badge svg { flex-shrink: 0; color: var(--accent); }
.heleket-badge strong { color: var(--text); }

#topup-form label { margin: 0 0 10px; }
.amount-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}
.amount-chip {
  min-width: 64px;
  padding: 10px 18px;
  border-radius: 20px;
  border: 1px solid var(--panel-border);
  background: var(--surface-soft);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: bold;
  text-align: center;
  cursor: pointer;
}
.amount-chip:hover { background: var(--accent-soft-bg); }
.amount-chip.active { background: var(--accent); color: #fff; border-color: var(--accent); }

.topup-submit-row { margin-top: 26px; }

.integration-panel { border-color: var(--accent); }
.integration-panel h2 { border: none; padding: 0; display: flex; align-items: center; gap: 10px; }
.optional-badge {
  font-size: 11px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-faint);
  background: var(--surface-soft);
  border: 1px solid var(--surface-soft-border);
  border-radius: 12px;
  padding: 3px 10px;
}
.integration-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0;
}
.integration-copy-confirm { color: #27ae60; font-size: 13px; font-weight: bold; }
.integration-prompt-block {
  max-height: 420px;
  white-space: pre-wrap;
}

.service-preview {
  display: flex;
  gap: 20px;
  margin-top: 12px;
  padding: 12px 16px;
  background: var(--surface-soft);
  border: 1px solid var(--surface-soft-border);
  border-radius: 6px;
}
.service-preview-row { display: flex; flex-direction: column; gap: 2px; }
.service-preview-label { font-size: 11px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.4px; }
.service-preview-value { font-size: 15px; font-weight: bold; color: var(--text); }
.field-hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
#service-select { min-height: 200px; }

.mass-order-textarea {
  width: 100%;
  min-height: 220px;
  padding: 12px 14px;
  border: 1px solid var(--input-border);
  border-radius: 6px;
  background: var(--input-bg);
  color: var(--text);
  font-family: "Courier New", Courier, monospace;
  font-size: 13px;
  resize: vertical;
}
.mass-order-ok { color: #1e8449; font-weight: bold; }
.mass-order-fail { color: var(--alert-error-text); font-weight: bold; }

.loyalty-current {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--surface-soft);
  border: 1px solid var(--surface-soft-border);
  border-radius: 6px;
  padding: 12px 16px;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 8px;
}
.loyalty-tier-badge { font-size: 14px; color: var(--text); }
.loyalty-tier-badge strong { color: var(--accent); }
.loyalty-spend { font-size: 13px; color: var(--text-secondary); }
.loyalty-progress-wrap { margin-bottom: 4px; }
.loyalty-progress-bar {
  height: 8px;
  background: var(--surface-soft);
  border: 1px solid var(--surface-soft-border);
  border-radius: 4px;
  overflow: hidden;
}
.loyalty-progress-fill { height: 100%; background: var(--accent); }
.loyalty-progress-label { font-size: 12px; color: var(--text-muted); margin-top: 6px; }
.loyalty-row-active td { background: var(--accent-soft-bg); font-weight: bold; }

.chat-form {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.chat-form input {
  flex: 1;
  max-width: none;
  padding: 12px 14px;
  font-size: 15px;
  border-radius: 8px;
}
.chat-form button {
  padding: 12px 24px;
  font-size: 14px;
}

.ticket-header {
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}
.ticket-header h2 { margin: 0; border: none; padding: 0; flex: 1; }

.ticket-thread {
  height: 420px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 16px;
  background: var(--surface-soft);
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 16px 0;
}
.ticket-empty { text-align: center; color: var(--text-muted); margin: auto; font-size: 13px; }
.ticket-row { display: flex; }
.ticket-row-self { justify-content: flex-start; }
.ticket-row-other { justify-content: flex-start; }
.ticket-bubble {
  max-width: 78%;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
}
.ticket-row-self .ticket-bubble { background: var(--accent); color: #fff; border-bottom-left-radius: 2px; }
.ticket-row-other .ticket-bubble { background: var(--panel-bg); border: 1px solid var(--panel-border); color: var(--text); border-bottom-left-radius: 2px; }
.ticket-bubble-label { font-size: 11px; font-weight: bold; margin-bottom: 4px; opacity: 0.85; }
.ticket-bubble-text { font-size: 14px; line-height: 1.5; word-wrap: break-word; white-space: pre-wrap; }
.ticket-bubble-time { font-size: 10px; margin-top: 6px; opacity: 0.7; }

.ticket-actions { margin-top: 14px; }

.filter-tabs { display: flex; gap: 8px; }
.filter-tab {
  padding: 6px 14px;
  border: 1px solid var(--panel-border);
  border-radius: 20px;
  color: var(--text-secondary);
  background: var(--surface-soft);
  font-size: 13px;
}
.filter-tab:hover { background: var(--accent-soft-bg); text-decoration: none; }
.filter-tab.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.service-type-tabs { margin-top: 10px; flex-wrap: wrap; }
.service-type-tabs .filter-tab { display: inline-flex; align-items: center; gap: 6px; }

.order-select-wrap { position: relative; margin-top: 14px; }
.order-select-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--input-border);
  border-radius: 8px;
  padding: 10px 14px;
  background: var(--input-bg);
  color: var(--text-muted);
  cursor: text;
}
.order-select-trigger.open { border-color: var(--accent); }
.order-select-trigger.needs-attention {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft-bg);
}
.order-select-trigger.needs-attention input::placeholder { color: var(--accent-soft-text); }
.order-select-trigger input {
  border: none;
  background: none;
  flex: 1;
  font-size: 14px;
  color: var(--text);
  padding: 0;
  max-width: none;
}
.order-select-trigger input:focus { outline: none; }
#order-select-chevron { flex-shrink: 0; transition: transform 0.15s ease; }
.order-select-trigger.open #order-select-chevron { transform: rotate(180deg); }

.order-select-panel {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 6px;
  max-height: 460px;
  overflow-y: auto;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  background: var(--panel-bg);
  box-shadow: 0 8px 24px var(--shadow-strong);
  z-index: 30;
}
.order-category-label {
  background: var(--category-bg);
  color: var(--text);
  font-weight: bold;
  font-size: 15px;
  padding: 8px 14px;
  position: sticky;
  top: 0;
  z-index: 1;
}
.order-service-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.order-service-row:hover { background: var(--surface-soft); }
.order-service-row.selected { background: var(--accent-soft-bg); box-shadow: inset 3px 0 0 var(--accent); }
.order-service-row-main { min-width: 0; }
.order-service-row-name {
  font-size: 15px;
  color: var(--text);
  white-space: normal;
  overflow-wrap: break-word;
}
.order-service-row-meta {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.order-service-id-badge {
  display: inline-block;
  background: var(--accent-soft-bg);
  color: var(--accent-soft-text);
  border-radius: 3px;
  padding: 1px 6px;
  font-size: 12px;
  font-weight: 600;
}
.service-id-badge {
  display: inline-block;
  background: var(--accent-soft-bg);
  border-radius: 3px;
  padding: 1px 6px;
}
.order-service-row-rate {
  font-size: 14px;
  font-weight: bold;
  color: var(--text);
  white-space: nowrap;
  flex-shrink: 0;
  text-align: right;
}
.order-service-row-rate span { display: block; font-size: 12px; font-weight: normal; color: var(--text-muted); }

.order-selected-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 18px 0;
}
.order-stat {
  background: var(--surface-soft);
  border: 1px solid var(--surface-soft-border);
  border-radius: 8px;
  padding: 10px 14px;
  text-align: center;
}
.order-stat-label { font-size: 11px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.4px; }
.order-stat-value { font-size: 15px; font-weight: bold; color: var(--text); margin-top: 2px; }

input.payout-amount-input { max-width: 200px; display: inline-block; }
select.payout-method-select {
  padding: 6px 8px;
  border: 1px solid var(--input-border);
  border-radius: 3px;
  font-size: 13px;
  width: 100%;
  max-width: 320px;
  background: var(--input-bg);
  color: var(--text);
}
.payout-submit-btn { margin-left: 10px; }

input.subject-input-large { font-size: 16px; padding: 10px 12px; max-width: none; width: 100%; }

input.amount-input-large { font-size: 18px; padding: 12px 14px; max-width: 260px; width: 100%; }

.mode-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}
@media (max-width: 600px) {
  .mode-picker { grid-template-columns: 1fr; }
}
.mode-card {
  display: block;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: 14px 16px;
  background: var(--surface-soft);
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease;
  position: relative;
}
.mode-card:hover { border-color: var(--accent); }
.mode-card.selected {
  border-color: var(--accent);
  background: var(--accent-soft-bg);
  cursor: default;
}
.mode-card.selected::after {
  content: "Active";
  position: absolute;
  top: 12px;
  right: 14px;
  font-size: 10px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--accent);
}
.mode-card-title { font-size: 15px; font-weight: bold; color: var(--text); margin-bottom: 4px; padding-right: 50px; }
.mode-card-desc { font-size: 12px; color: var(--text-secondary); line-height: 1.5; }

.referral-panel-intro { margin: 0 0 16px; color: var(--text-secondary); }
.referral-lifetime-note {
  margin: 18px 0 0;
  padding: 10px 14px;
  background: var(--alert-success-bg);
  border: 1px solid var(--alert-success-border);
  border-radius: 8px;
  color: var(--alert-success-text);
  font-size: 13px;
  font-weight: normal;
  line-height: 1.5;
}

.mode-confirm-body { color: var(--text-secondary); line-height: 1.6; margin: 0 0 20px; }
.mode-confirm-actions { display: flex; gap: 10px; }

.referral-mode-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.referral-mode-tab {
  padding: 10px 18px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  font-size: 14px;
  font-weight: bold;
  color: var(--text-muted);
  cursor: pointer;
  margin-bottom: -1px;
}
.referral-mode-tab:hover { color: var(--text); }
.referral-mode-tab.active { color: var(--accent); border-bottom-color: var(--accent); }

.referral-calc { text-align: center; }
.referral-calc label { display: block; font-weight: bold; font-size: 13px; color: var(--text); margin-bottom: 14px; }
.referral-calc-volume { font-size: 22px; font-weight: bold; color: var(--accent); margin: 10px 0 20px; }
.referral-calc-stats { margin-top: 10px; }

.range-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: var(--surface-soft-border);
  outline: none;
  cursor: pointer;
}
.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--panel-bg);
  box-shadow: 0 1px 4px var(--shadow-strong);
  cursor: pointer;
}
.range-slider::-moz-range-thumb {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--panel-bg);
  box-shadow: 0 1px 4px var(--shadow-strong);
  cursor: pointer;
}

.mode-confirm-cancel { background: var(--surface-soft); color: var(--text) !important; box-shadow: none; }
.mode-confirm-cancel:hover { background: var(--border); }
.mode-confirm-submit { flex: 1; }


input.order-detail-input,
select.order-detail-input {
  font-size: 14px;
  padding: 10px 14px;
  border-radius: 8px;
  max-width: none;
  width: 100%;
  height: 42px;
  box-sizing: border-box;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--text);
}
input.order-detail-input[readonly] { background: var(--surface-soft); color: var(--text-secondary); cursor: default; }
select.order-detail-input {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239a988e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px;
}

.order-two-col-row { display: flex; gap: 16px; }
.order-two-col { flex: 1; min-width: 0; }

.subscription-fields-help {
  background: var(--surface-soft);
  border: 1px solid var(--surface-soft-border);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 16px;
}
.subscription-help-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}
.subscription-help-row:not(:last-child) { margin-bottom: 8px; }
.subscription-help-icon { flex-shrink: 0; }

.expiry-input-wrap { position: relative; }
#expiry-display { padding-right: 38px; cursor: pointer; }
#expiry-display.order-detail-input[readonly] { background: var(--input-bg); color: var(--text); cursor: pointer; }
.expiry-clear-btn {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  z-index: 1;
}
.expiry-clear-btn:hover { color: var(--text); background: var(--surface-soft); }

.calendar-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  min-width: 280px;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  box-shadow: 0 8px 24px var(--shadow-strong);
  padding: 14px;
  z-index: 20;
}
.calendar-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.calendar-title { font-size: 14px; font-weight: bold; color: var(--text); }
.calendar-nav-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.calendar-nav-btn:hover { background: var(--surface-soft); color: var(--text); }
.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 11px;
  color: var(--text-faint);
  font-weight: bold;
  margin-bottom: 4px;
}
.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}
.calendar-day {
  aspect-ratio: 1;
  border: none;
  background: none;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.calendar-day:hover:not(.calendar-day-disabled) { background: var(--surface-soft); }
.calendar-day-today { box-shadow: inset 0 0 0 1px var(--accent); color: var(--accent); font-weight: bold; }
.calendar-day-selected { background: var(--accent) !important; color: #fff !important; font-weight: bold; }
.calendar-day-disabled { color: var(--text-faint); cursor: not-allowed; opacity: 0.4; }
.calendar-day-empty { cursor: default; }

.qty-input-wrap { position: relative; }
#topup-form .qty-input-wrap { max-width: 260px; }
input.qty-input { padding-right: 42px; -moz-appearance: textfield; }
input.qty-input::-webkit-inner-spin-button,
input.qty-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.qty-stepper {
  position: absolute;
  top: 5px;
  right: 5px;
  bottom: 5px;
  width: 30px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.qty-step-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: var(--surface-soft);
  border: 1px solid var(--input-border);
  border-radius: 5px;
  color: var(--text-muted);
  cursor: pointer;
}
.qty-step-btn:hover { background: var(--accent-soft-bg); border-color: var(--accent); color: var(--accent); }
.qty-step-btn:active { background: var(--accent); border-color: var(--accent); color: #fff; }
#order-form label { margin: 18px 0 6px; }
.order-submit-row { margin-top: 28px; display: flex; justify-content: center; }

.dripfeed-section {
  margin-top: 18px;
  padding: 14px 16px;
  background: var(--surface-soft);
  border: 1px solid var(--surface-soft-border);
  border-radius: 8px;
}
.dripfeed-toggle-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: bold;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  margin: 0;
}
.dripfeed-toggle-label input[type=checkbox] {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 18px;
  height: 18px;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  flex-shrink: 0;
  border: 1px solid var(--input-border);
  border-radius: 4px;
  background: var(--input-bg);
  cursor: pointer;
  position: relative;
  vertical-align: middle;
}
.dripfeed-toggle-label input[type=checkbox]:checked {
  background: var(--accent);
  border-color: var(--accent);
}
.dripfeed-toggle-label input[type=checkbox]:checked::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.dripfeed-fields { margin-top: 14px; }
.dripfeed-info-hint {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 14px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}
.dripfeed-info-icon { flex-shrink: 0; color: var(--text-faint); margin-top: 1px; }
.order-submit-btn { width: 60%; min-width: 280px; }

/* RTL support (Arabic). Flex/grid containers below already mirror automatically via the
   `dir` attribute — only rules using physical left/right values need explicit overrides here.
   Scoped to "usable and readable," not pixel-perfect mirroring of every micro-detail. */
[dir="rtl"] .navbar .nav-links { padding-right: 0; padding-left: 6px; }
[dir="rtl"] table th, [dir="rtl"] table td { text-align: right; }
[dir="rtl"] .actions-cell { text-align: right; }
[dir="rtl"] .actions-cell .btn { margin-left: 0; margin-right: 6px; }
[dir="rtl"] .actions-cell .btn:first-child { margin-right: 0; }
[dir="rtl"] .catalog-table .actions-cell { text-align: left; }
[dir="rtl"] .auth-close, [dir="rtl"] .modal-close { right: auto; left: 14px; }
[dir="rtl"] .modal-box h3 { padding-right: 0; padding-left: 24px; }
[dir="rtl"] .modal-row-value { text-align: left; }
[dir="rtl"] .legal-page ul { padding-left: 0; padding-right: 20px; }
[dir="rtl"] .order-service-row-rate { text-align: left; }
[dir="rtl"] .payout-submit-btn { margin-left: 0; margin-right: 10px; }
[dir="rtl"] .mode-card.selected::after { right: auto; left: 14px; }
[dir="rtl"] .mode-card-title { padding-right: 0; padding-left: 50px; }
[dir="rtl"] input.qty-input { padding-right: 12px; padding-left: 42px; }
[dir="rtl"] .qty-stepper { right: auto; left: 5px; }
[dir="rtl"] .platform-tab-badge { right: auto; left: -10px; }
[dir="rtl"] .expiry-clear-btn { right: auto; left: 4px; }
[dir="rtl"] #expiry-display { padding-right: 14px; padding-left: 38px; }
[dir="rtl"] select.order-detail-input { padding-right: 14px; padding-left: 34px; background-position: left 12px center; }
