/* ============================================================
   OTIX Panel Theme — otixserver.com
   Matches the otix.tools design language:
   white surfaces, orange gradient accents, rounded cards.
   ============================================================ */

:root {
  --otix-orange: #ff6a00;
  --otix-orange-light: #ff9d2e;
  --otix-orange-deep: #f04400;
  --otix-ink: #151517;
  --otix-muted: #6c6c76;
  --otix-line: #e8e8ec;
  --otix-bg: #f6f6f8;
  --otix-card: #ffffff;
  --otix-green: #22c55e;
  --otix-red: #ef4444;
  --otix-amber: #f59e0b;

  --otix-radius: 22px;
  --otix-radius-sm: 14px;
  --otix-shadow: 0 14px 34px rgba(15, 23, 42, 0.06), 0 3px 10px rgba(15, 23, 42, 0.025);
  --otix-shadow-hover: 0 24px 52px rgba(15, 23, 42, 0.12), 0 10px 24px rgba(255, 106, 0, 0.08);
  --sidebar-width: 248px;
  --topbar-height: 66px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  background: var(--otix-bg);
  color: var(--otix-ink);
  font-size: 14.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--otix-orange-deep); text-decoration: none; }
a:hover { color: var(--otix-orange); }

h1, h2, h3, h4 { color: var(--otix-ink); letter-spacing: -0.4px; font-weight: 800; margin: 0; }

::selection { background: rgba(255, 106, 0, 0.18); }

/* ============ Layout shell ============ */

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

.sidebar {
  width: var(--sidebar-width);
  flex: 0 0 var(--sidebar-width);
  background: var(--otix-card);
  border-right: 1px solid var(--otix-line);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 60;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--otix-line);
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--otix-orange-light), var(--otix-orange-deep));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.34), 0 8px 18px rgba(255, 96, 0, 0.3);
  color: #fff;
  font-weight: 900;
  font-size: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-name {
  font-size: 19px;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: var(--otix-ink);
  line-height: 1.1;
}

.brand-name small {
  display: block;
  font-size: 10px;
  font-weight: 700;
  color: var(--otix-muted);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.sidebar-nav {
  flex: 1;
  padding: 14px 12px;
  overflow-y: auto;
}

.sidebar-nav::-webkit-scrollbar { width: 5px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: #e3e3e8; border-radius: 4px; }

.nav-section {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #a3a3ad;
  padding: 14px 12px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 12px;
  margin-bottom: 3px;
  border-radius: 13px;
  color: #3c3c44;
  font-weight: 600;
  font-size: 14px;
  position: relative;
  transition: background 0.18s ease, color 0.18s ease;
}

.nav-item i { width: 20px; text-align: center; font-size: 15px; opacity: 0.75; }
.nav-item:hover { background: #f6f6f8; color: var(--otix-ink); }

.nav-item.active {
  background: linear-gradient(180deg, rgba(255, 157, 46, 0.13), rgba(255, 106, 0, 0.08));
  color: var(--otix-orange-deep);
  box-shadow: inset 0 0 0 1px rgba(255, 106, 0, 0.16);
}

.nav-item.active i { opacity: 1; }

.sidebar-foot {
  padding: 14px;
  border-top: 1px solid var(--otix-line);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 13px;
  transition: background 0.18s ease;
}

.sidebar-user:hover { background: #f6f6f8; }

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 157, 46, 0.16), rgba(255, 106, 0, 0.09));
  box-shadow: inset 0 0 0 1px rgba(255, 106, 0, 0.18);
  color: var(--otix-orange-deep);
  font-weight: 800;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  text-transform: uppercase;
}

.sidebar-user .su-name {
  font-weight: 700;
  font-size: 13.5px;
  color: var(--otix-ink);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user .su-mail {
  font-size: 11.5px;
  color: var(--otix-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

/* ============ Main column ============ */

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

.topbar {
  height: var(--topbar-height);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--otix-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  position: sticky;
  top: 0;
  z-index: 50;
  gap: 14px;
}

.topbar-left { display: flex; align-items: center; gap: 12px; min-width: 0; }

.menu-toggle {
  display: none;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid var(--otix-line);
  background: #fff;
  color: var(--otix-ink);
  font-size: 15px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.page-title {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.balance-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 106, 0, 0.18);
  background: linear-gradient(180deg, rgba(255, 157, 46, 0.13), rgba(255, 106, 0, 0.07));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
  color: #e95100;
  font-weight: 800;
  font-size: 13.5px;
  white-space: nowrap;
}

.balance-chip i { font-size: 12px; }

.content {
  padding: 26px 26px 46px;
  max-width: 1240px;
  width: 100%;
  margin: 0 auto;
}

/* ============ Cards ============ */

.card {
  background: var(--otix-card);
  border: 1px solid var(--otix-line);
  border-radius: var(--otix-radius);
  box-shadow: var(--otix-shadow);
  margin-bottom: 22px;
  overflow: hidden;
}

/* Cards containing an enhanced dropdown must not clip its open menu */
.card:has(.oselect) { overflow: visible; }

.card > .card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid #f0f0f3;
  flex-wrap: wrap;
}

.card-head h3 {
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 9px;
}

.card-head h3 i { color: var(--otix-orange); font-size: 15px; }
.card-head .head-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card-body { padding: 22px; }
.card-body.p0 { padding: 0; }

.card-sub {
  font-size: 12.5px;
  color: var(--otix-muted);
  margin: 3px 0 0;
}

/* ============ Stat grid ============ */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  gap: 18px;
  margin-bottom: 22px;
}

.stat-card {
  background: var(--otix-card);
  border: 1px solid var(--otix-line);
  border-radius: var(--otix-radius);
  box-shadow: var(--otix-shadow);
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 106, 0, 0.26);
  box-shadow: var(--otix-shadow-hover);
}

/* Income hero card (stats page) */
.stat-card.is-income {
  background: linear-gradient(135deg, var(--otix-orange-light), var(--otix-orange-deep));
  border-color: rgba(255, 106, 0, 0.35);
  box-shadow: 0 16px 34px rgba(255, 96, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  color: #fff;
}

.stat-card.is-income .stat-value { color: #fff; }
.stat-card.is-income .stat-label { color: rgba(255, 255, 255, 0.88); }
.stat-card.is-income .stat-icon { background: rgba(255, 255, 255, 0.18); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3); }
.stat-card.is-income:hover { transform: translateY(-4px); box-shadow: 0 22px 44px rgba(255, 96, 0, 0.4); }

.stat-value { font-size: 25px; font-weight: 900; letter-spacing: -0.7px; line-height: 1.1; }
.stat-label { font-size: 12.5px; color: var(--otix-muted); font-weight: 600; margin-top: 3px; }

.stat-icon {
  width: 50px;
  height: 50px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  flex-shrink: 0;
  background: #fff7ed;
  color: #ea580c;
  box-shadow: inset 0 0 0 1px #fed7aa;
}

.stat-icon.is-green { background: #f0fdf4; color: #16a34a; box-shadow: inset 0 0 0 1px #bbf7d0; }
.stat-icon.is-red { background: #fef2f2; color: #dc2626; box-shadow: inset 0 0 0 1px #fecaca; }
.stat-icon.is-amber { background: #fffbeb; color: #d97706; box-shadow: inset 0 0 0 1px #fde68a; }
.stat-icon.is-blue { background: #eff6ff; color: #2563eb; box-shadow: inset 0 0 0 1px #bfdbfe; }
.stat-icon.is-ink { background: #f4f4f6; color: #151517; box-shadow: inset 0 0 0 1px #e4e4e9; }

/* ============ Buttons ============ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 13px;
  padding: 11px 18px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: 0.01em;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}

.btn:focus-visible { outline: 3px solid rgba(255, 106, 0, 0.3); outline-offset: 3px; }

.btn-otix {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.18), transparent 40%),
    linear-gradient(135deg, var(--otix-orange-light), var(--otix-orange-deep));
  color: #fff;
  box-shadow: 0 10px 22px rgba(255, 96, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-otix:hover { transform: translateY(-2px); filter: saturate(1.05); color: #fff; box-shadow: 0 16px 30px rgba(255, 82, 0, 0.34); }
.btn-otix:active { transform: translateY(0) scale(0.985); }

.btn-ghost {
  background: #fff;
  border: 1px solid var(--otix-line);
  color: var(--otix-ink);
}

.btn-ghost:hover { transform: translateY(-2px); box-shadow: 0 10px 25px rgba(0, 0, 0, 0.07); color: var(--otix-ink); background: #fafafa; }

.btn-danger {
  background: linear-gradient(135deg, #f87171, #dc2626);
  color: #fff;
  box-shadow: 0 10px 22px rgba(220, 38, 38, 0.22);
}
.btn-danger:hover { transform: translateY(-2px); color: #fff; }

.btn-success {
  background: linear-gradient(135deg, #34d399, #059669);
  color: #fff;
  box-shadow: 0 10px 22px rgba(5, 150, 105, 0.22);
}
.btn-success:hover { transform: translateY(-2px); color: #fff; }

.btn-sm { padding: 8px 13px; font-size: 12.5px; border-radius: 11px; }
.btn-lg { padding: 14px 26px; font-size: 15px; border-radius: 15px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.disabled { opacity: 0.55; pointer-events: none; }

/* ============ Badges & pills ============ */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 6px currentColor;
}

.pill.is-success { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.pill.is-process { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.pill.is-rejected { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.pill.is-paid { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.pill.is-unpaid { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.pill.is-usage { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.pill.is-refund { background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; }
.pill.is-adjust { background: #f4f4f6; color: #3f3f46; border: 1px solid #e4e4e9; }
.pill.is-admin { background: linear-gradient(180deg, rgba(255, 157, 46, 0.14), rgba(255, 106, 0, 0.08)); color: #e95100; border: 1px solid rgba(255, 106, 0, 0.2); }
.pill.is-plain { background: #f4f4f6; color: #52525b; border: 1px solid #e4e4e9; }
.pill.is-pending { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.pill.is-group-enduser { background: #f4f4f6; color: #52525b; border: 1px solid #e4e4e9; }
.pill.is-group-reseller { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.pill.is-group-king { background: linear-gradient(180deg, rgba(255, 157, 46, 0.16), rgba(255, 106, 0, 0.09)); color: #c2410c; border: 1px solid rgba(255, 106, 0, 0.24); }

/* Custom price rows (per-user pricing modal) */
.cp-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 13px;
  border: 1px solid #ececef;
  border-radius: 13px;
  background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(248,248,250,.92));
  margin-bottom: 8px;
}

.cp-info { min-width: 0; }
.cp-info b { display: block; font-size: 13.5px; color: var(--otix-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-info span { font-size: 12px; color: var(--otix-muted); }
.cp-input { flex-shrink: 0; }

.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid rgba(255, 106, 0, 0.15);
  background: linear-gradient(180deg, rgba(255, 157, 46, 0.13), rgba(255, 106, 0, 0.08));
  color: #e95100;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ============ Forms ============ */

.form-label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: #3f3f46;
  margin: 0 0 6px;
}

.form-control, .form-select, textarea.form-control {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #e4e4e9;
  border-radius: 13px;
  background: #fff;
  color: var(--otix-ink);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
  appearance: none;
}

.form-control:focus, .form-select:focus, textarea.form-control:focus {
  outline: none;
  border-color: rgba(255, 106, 0, 0.55);
  box-shadow: 0 0 0 4px rgba(255, 106, 0, 0.12);
}

.form-control::placeholder { color: #a8a8b2; }

.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236c6c76' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
  cursor: pointer;
}

.form-hint { font-size: 12px; color: var(--otix-muted); margin-top: 5px; }

.form-group { margin-bottom: 16px; }

.form-row { display: flex; gap: 14px; }
.form-row > * { flex: 1; min-width: 0; }

.input-group { display: flex; gap: 8px; }
.input-group .form-control { flex: 1; min-width: 0; }

.check-line { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: #3f3f46; }
.check-line input { width: 16px; height: 16px; accent-color: var(--otix-orange); }

/* ============ Tables ============ */

.table-wrap { overflow-x: auto; }

table.otix-table { width: 100%; border-collapse: collapse; min-width: 560px; }

.otix-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #9c9ca6;
  padding: 13px 16px;
  border-bottom: 1px solid #f0f0f3;
  white-space: nowrap;
}

.otix-table td {
  padding: 13px 16px;
  border-bottom: 1px solid #f4f4f6;
  font-size: 13.5px;
  vertical-align: middle;
}

.otix-table tbody tr { transition: background 0.15s ease; }
.otix-table tbody tr:hover { background: #fffaf6; }
.otix-table tbody tr:last-child td { border-bottom: 0; }

.t-strong { font-weight: 700; }
.t-muted { color: var(--otix-muted); font-size: 12.5px; }
.t-mono { font-family: 'SF Mono', 'Cascadia Code', Consolas, monospace; font-size: 12.5px; }
.t-money { font-weight: 800; color: #15803d; }
.t-money.neg { color: #b91c1c; }
.t-center { text-align: center; }

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

.icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid var(--otix-line);
  background: #fff;
  color: #52525b;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12.5px;
  transition: all 0.16s ease;
}

.icon-btn:hover { border-color: rgba(255, 106, 0, 0.4); color: var(--otix-orange-deep); background: #fffaf6; transform: translateY(-1px); }
.icon-btn.danger:hover { border-color: rgba(220, 38, 38, 0.4); color: #dc2626; background: #fef5f5; }
.icon-btn[disabled] { opacity: 0.45; pointer-events: none; cursor: not-allowed; }

/* ============ Empty state ============ */

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

.empty i { font-size: 30px; color: #d6d6de; margin-bottom: 12px; display: block; }
.empty b { display: block; color: #3f3f46; font-size: 15px; margin-bottom: 4px; }
.empty p { margin: 0; font-size: 13px; }

/* ============ Flash / alerts ============ */

.alert {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 15px 18px;
  border-radius: var(--otix-radius-sm);
  margin-bottom: 20px;
  font-size: 13.5px;
  border: 1px solid;
}

.alert i { font-size: 15px; margin-top: 1px; }
.alert b { display: block; margin-bottom: 2px; font-size: 14px; }

.alert.is-success { background: #f0fdf4; border-color: #bbf7d0; color: #14532d; }
.alert.is-success i { color: #16a34a; }
.alert.is-danger { background: #fef2f2; border-color: #fecaca; color: #7f1d1d; }
.alert.is-danger i { color: #dc2626; }
.alert.is-info { background: #fff7ed; border-color: #fed7aa; color: #7c2d12; }
.alert.is-info i { color: #ea580c; }

/* ============ Pagination ============ */

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px 22px 0;
  border-top: 1px solid #f0f0f3;
  margin-top: 4px;
}

.page-info { font-size: 12.5px; color: var(--otix-muted); }

.page-links { display: flex; gap: 5px; flex-wrap: wrap; }

.page-link {
  min-width: 32px;
  height: 32px;
  padding: 0 9px;
  border-radius: 10px;
  border: 1px solid var(--otix-line);
  background: #fff;
  color: #3f3f46;
  font-size: 12.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.page-link:hover { border-color: rgba(255, 106, 0, 0.45); color: var(--otix-orange-deep); }
.page-link.active { background: linear-gradient(135deg, var(--otix-orange-light), var(--otix-orange-deep)); border-color: transparent; color: #fff; box-shadow: 0 6px 14px rgba(255, 96, 0, 0.28); }
.page-link.disabled { opacity: 0.45; pointer-events: none; }

/* ============ Filter bar ============ */

.filter-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  padding: 16px 22px;
  border-bottom: 1px solid #f0f0f3;
}

.filter-bar form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.filter-bar .grow { flex: 1; min-width: 200px; }

/* ============ Services grid ============ */

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(285px, 1fr));
  gap: 20px;
}

.service-card {
  position: relative;
  background: var(--otix-card);
  border: 1px solid var(--otix-line);
  border-radius: var(--otix-radius);
  box-shadow: var(--otix-shadow);
  padding: 18px;
  display: flex;
  flex-direction: column;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  overflow: hidden;
}

.service-card::before {
  content: "";
  position: absolute;
  top: -80px;
  right: -80px;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255, 157, 46, 0.5), rgba(240, 68, 0, 0.5));
  opacity: 0.06;
  filter: blur(1px);
  pointer-events: none;
}

.service-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 106, 0, 0.3);
  box-shadow: var(--otix-shadow-hover);
}

.service-card.is-inactive { opacity: 0.62; }
.service-card.is-inactive:hover { transform: none; border-color: var(--otix-line); box-shadow: var(--otix-shadow); cursor: not-allowed; }

.service-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.service-icon {
  width: 46px;
  height: 46px;
  border-radius: 15px;
  background: #fff7ed;
  color: #ea580c;
  box-shadow: inset 0 0 0 1px #fed7aa;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.service-card h3 {
  font-size: 15.5px;
  line-height: 1.3;
  margin-bottom: 8px;
  letter-spacing: -0.3px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.service-info {
  font-size: 12px;
  color: var(--otix-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
  margin-bottom: 14px;
  min-height: 54px;
}

.service-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
}

.service-price { font-size: 17px; font-weight: 900; letter-spacing: -0.4px; }
.service-price small { font-size: 11px; color: var(--otix-muted); font-weight: 700; }

.order-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: 12px;
  border: 1px solid rgba(197, 49, 0, 0.18);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.16), transparent 40%),
    linear-gradient(135deg, var(--otix-orange-light), var(--otix-orange-deep));
  color: #fff;
  font-size: 12.5px;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(255, 96, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  white-space: nowrap;
}

/* ============ Modals ============ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 15, 17, 0.45);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.modal-overlay.open { opacity: 1; visibility: visible; }

.modal {
  background: #fff;
  border-radius: var(--otix-radius);
  border: 1px solid var(--otix-line);
  box-shadow: 0 30px 70px rgba(15, 23, 42, 0.28);
  width: 100%;
  max-width: 480px;
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(14px) scale(0.98);
  transition: transform 0.24s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Form sits between head and body/foot — must shrink so modal-body can scroll */
.modal > form {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.modal-overlay.open .modal { transform: translateY(0) scale(1); }

.modal.wide { max-width: 640px; }

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid #f0f0f3;
  flex-shrink: 0;
}

.modal-head h3 { font-size: 16.5px; display: flex; align-items: center; gap: 9px; }
.modal-head h3 i { color: var(--otix-orange); }

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 0;
  background: #f4f4f6;
  color: #52525b;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.16s ease;
}

.modal-close:hover { background: #fecaca; color: #b91c1c; }

.modal-body {
  padding: 22px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.modal-body::-webkit-scrollbar { width: 5px; }
.modal-body::-webkit-scrollbar-thumb { background: #e3e3e8; border-radius: 4px; }

.modal-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  padding: 15px 22px;
  border-top: 1px solid #f0f0f3;
  background: #fafafb;
  border-radius: 0 0 var(--otix-radius) var(--otix-radius);
  flex-wrap: wrap;
  flex-shrink: 0;
}

/* Order modal summary rows */
.om-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 14px;
  border: 1px solid #ececef;
  border-radius: 13px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 248, 250, 0.92));
  margin-bottom: 9px;
  font-size: 13px;
}

.om-row .om-label { color: var(--otix-muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; }
.om-row .om-value { font-weight: 800; text-align: right; }

.om-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 106, 0, 0.2);
  background: linear-gradient(180deg, rgba(255, 157, 46, 0.1), rgba(255, 106, 0, 0.05));
  margin: 14px 0 16px;
}

.om-total .om-label { color: #7c2d12; font-weight: 800; font-size: 13px; }
.om-total .om-value { font-size: 19px; font-weight: 900; color: #e95100; letter-spacing: -0.5px; }

/* ============ Info list (profile / api) ============ */

.info-list { display: flex; flex-direction: column; gap: 12px; }

.info-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid #ececef;
  border-radius: 14px;
  background: #fafafb;
  flex-wrap: wrap;
}

.info-item .ii-label { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--otix-muted); }
.info-item .ii-value { font-weight: 700; font-size: 13.5px; word-break: break-all; text-align: right; }

/* ============ Auth pages ============ */

.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 157, 46, 0.09), transparent 34%),
    radial-gradient(circle at 88% 92%, rgba(240, 68, 0, 0.07), transparent 40%),
    var(--otix-bg);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border: 1px solid var(--otix-line);
  border-radius: 26px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.94);
  padding: 34px 32px 30px;
  position: relative;
  overflow: hidden;
}

.auth-card::after {
  content: "";
  position: absolute;
  top: -110px;
  right: -85px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255, 111, 0, 0.12);
  filter: blur(45px);
  pointer-events: none;
}

.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; position: relative; }
.auth-title { font-size: 22px; font-weight: 900; letter-spacing: -0.6px; margin-bottom: 4px; position: relative; }
.auth-sub { font-size: 13.5px; color: var(--otix-muted); margin-bottom: 24px; position: relative; }

.auth-foot {
  text-align: center;
  font-size: 13px;
  color: var(--otix-muted);
  margin-top: 20px;
  position: relative;
}

.auth-foot a { font-weight: 700; }

/* ============ Toast ============ */

#otixToast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #151517;
  color: #fff;
  border-radius: 14px;
  padding: 13px 17px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.3);
  animation: toastIn 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  max-width: 340px;
}

.toast-item i { color: #ff9d2e; }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============ Progress / bars (stats) ============ */

.bar-row { display: flex; align-items: center; gap: 12px; margin-bottom: 11px; }
.bar-label { flex: 0 0 42%; font-size: 12.5px; font-weight: 700; color: #3f3f46; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { flex: 1; height: 9px; background: #f0f0f3; border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--otix-orange-light), var(--otix-orange-deep)); }
.bar-value { flex: 0 0 auto; font-size: 12px; font-weight: 800; color: var(--otix-muted); min-width: 38px; text-align: right; }

/* ============ Mini day chart ============ */

.day-chart { display: flex; align-items: flex-end; gap: 8px; height: 130px; padding-top: 8px; }

.day-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 7px; height: 100%; justify-content: flex-end; }

.day-bar {
  width: 100%;
  max-width: 38px;
  border-radius: 9px 9px 4px 4px;
  background: linear-gradient(180deg, var(--otix-orange-light), var(--otix-orange-deep));
  min-height: 4px;
  opacity: 0.9;
  transition: opacity 0.18s ease;
}

.day-col:hover .day-bar { opacity: 1; }
.day-num { font-size: 11px; font-weight: 800; color: var(--otix-ink); }
.day-lab { font-size: 10px; color: var(--otix-muted); font-weight: 700; }

/* ============ Dropdown (native <details>) ============ */

details.dropdown { position: relative; }

details.dropdown summary { list-style: none; cursor: pointer; }
details.dropdown summary::-webkit-details-marker { display: none; }

details.dropdown .dropdown-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 240px;
  max-height: 320px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--otix-line);
  border-radius: 16px;
  box-shadow: 0 22px 50px rgba(15, 23, 42, 0.16);
  padding: 7px;
  z-index: 120;
}

.dropdown-menu .dropdown-title {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #a3a3ad;
  padding: 8px 11px 6px;
}

.dropdown-menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 11px;
  color: #3c3c44;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.dropdown-menu a:hover { background: #f6f6f8; color: var(--otix-ink); }
.dropdown-menu a.selected { color: var(--otix-orange-deep); background: linear-gradient(180deg, rgba(255, 157, 46, 0.12), rgba(255, 106, 0, 0.06)); }
.dropdown-menu a i { color: var(--otix-orange); font-size: 12px; }

/* Timezone menu: search + scrollable zone list */
.tz-menu { width: 310px; }

.tz-search {
  width: 100%;
  padding: 9px 12px;
  margin-bottom: 6px;
  border: 1px solid #ececef;
  border-radius: 11px;
  background: #fafafb;
  font-family: inherit;
  font-size: 13px;
  color: var(--otix-ink);
}

.tz-search::placeholder { color: #a8a8b2; }
.tz-search:focus { outline: none; border-color: rgba(255, 106, 0, 0.5); background: #fff; }

.tz-options { max-height: 300px; overflow-y: auto; }
.tz-options::-webkit-scrollbar { width: 5px; }
.tz-options::-webkit-scrollbar-thumb { background: #e3e3e8; border-radius: 4px; }

/* ============ Enhanced select (filter dropdowns) ============ */

.oselect { position: relative; display: inline-block; min-width: 180px; }

.oselect-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid #e4e4e9;
  border-radius: 12px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--otix-ink);
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.oselect-trigger:hover { border-color: rgba(255, 106, 0, 0.4); background: #fffaf6; }
.oselect-trigger.open { border-color: rgba(255, 106, 0, 0.55); box-shadow: 0 0 0 4px rgba(255, 106, 0, 0.12); }
.oselect-trigger i { color: #9c9ca6; font-size: 11px; transition: transform 0.2s ease; }
.oselect-trigger.open i { transform: rotate(180deg); color: var(--otix-orange-deep); }

.oselect-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.oselect-menu {
  position: absolute;
  top: calc(100% + 7px);
  left: 0;
  min-width: 100%;
  background: #fff;
  border: 1px solid var(--otix-line);
  border-radius: 16px;
  box-shadow: 0 22px 50px rgba(15, 23, 42, 0.16);
  padding: 7px;
  z-index: 130;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px) scale(0.98);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}

.oselect-menu.open { opacity: 1; visibility: visible; transform: none; }

.oselect-search {
  width: 100%;
  padding: 9px 12px;
  margin-bottom: 6px;
  border: 1px solid #ececef;
  border-radius: 11px;
  background: #fafafb;
  font-family: inherit;
  font-size: 13px;
  color: var(--otix-ink);
}

.oselect-search::placeholder { color: #a8a8b2; }
.oselect-search:focus { outline: none; border-color: rgba(255, 106, 0, 0.5); background: #fff; }

.oselect-options { max-height: 250px; overflow-y: auto; }
.oselect-options::-webkit-scrollbar { width: 5px; }
.oselect-options::-webkit-scrollbar-thumb { background: #e3e3e8; border-radius: 4px; }

.oselect-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 9px 11px;
  border: 0;
  background: none;
  border-radius: 11px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: #3c3c44;
  cursor: pointer;
  text-align: left;
}

.oselect-option:hover { background: #f6f6f8; color: var(--otix-ink); }
.oselect-option.selected { color: var(--otix-orange-deep); background: linear-gradient(180deg, rgba(255, 157, 46, 0.12), rgba(255, 106, 0, 0.06)); }
.oselect-option i { color: var(--otix-orange); font-size: 12px; opacity: 0; }
.oselect-option.selected i { opacity: 1; }

/* ============ API sync status bar ============ */

.api-lock {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 16px;
  border-radius: 14px;
  margin-bottom: 12px;
}

.api-lock.is-synced { background: #f0fdf4; border: 1px solid #bbf7d0; }
.api-lock.is-open { background: #f4f4f6; border: 1px solid #e4e4e9; }

.api-lock-main { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }

.api-lock-ip {
  font-family: 'SF Mono', 'Cascadia Code', Consolas, monospace;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--otix-ink);
  word-break: break-all;
}

.api-lock-hint {
  font-size: 12px;
  color: var(--otix-muted);
  max-width: 300px;
  text-align: right;
}

/* ============ Crypto payment box (Buy Credits) ============ */

.pay-box { display: flex; gap: 22px; align-items: flex-start; flex-wrap: wrap; }

.pay-qr {
  background: #fff;
  border: 1px solid var(--otix-line);
  border-radius: 16px;
  padding: 10px;
  flex-shrink: 0;
  box-shadow: var(--otix-shadow);
}

.pay-qr img { display: block; width: 168px; height: 168px; border-radius: 8px; }

.pay-details { flex: 1; min-width: 250px; }

.pay-label {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--otix-muted);
  margin-bottom: 5px;
}

.pay-value { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.pay-value .form-control { font-family: 'SF Mono', 'Cascadia Code', Consolas, monospace; font-weight: 700; }

.pay-warn {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  border-radius: 12px;
  padding: 10px 13px;
  font-size: 12.5px;
  margin-bottom: 14px;
  display: flex;
  gap: 9px;
  align-items: flex-start;
}

.pay-warn i { margin-top: 2px; }

.pay-amount-big {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.6px;
  color: #e95100;
}

/* ============ Responsive ============ */

@media (max-width: 1080px) {
  .form-row { flex-direction: column; gap: 0; }
}

@media (max-width: 900px) {
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    transform: translateX(-105%);
    transition: transform 0.26s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 0 0 60px rgba(15, 23, 42, 0.18);
  }

  .sidebar.open { transform: translateX(0); }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 15, 17, 0.42);
    z-index: 55;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.22s ease, visibility 0.22s ease;
  }

  .sidebar-backdrop.show { opacity: 1; visibility: visible; }

  .menu-toggle { display: inline-flex; }
  .content { padding: 20px 16px 40px; }
  .topbar { padding: 0 16px; }
  .balance-chip span.bc-amount { display: inline; }
}

@media (max-width: 560px) {
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat-card { padding: 15px; flex-direction: column; align-items: flex-start; gap: 10px; }
  .stat-value { font-size: 21px; }
  .services-grid { grid-template-columns: 1fr; }
  .filter-bar { padding: 14px 16px; }
  .card > .card-head { padding: 15px 16px; }
  .card-body { padding: 16px; }
  .otix-table th, .otix-table td { padding: 11px 12px; }
  .page-title { font-size: 15px; }
  .auth-card { padding: 26px 22px 24px; }
}
