:root {
  --bg: #eef3f9;
  --surface: #ffffff;
  --surface2: #f6f9fd;
  --border: #dce7f5;
  --border-strong: #c3d6ef;
  --text: #17263d;
  --muted: #5d7290;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eef4ff;
  --primary-grad: linear-gradient(135deg, #3b82f6 0%, #2563eb 55%, #1d4ed8 100%);
  --success: #16a34a;
  --danger: #dc2626;
  --warning: #d97706;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(23, 38, 61, .04), 0 6px 24px -6px rgba(37, 99, 235, .12);
  --shadow-lg: 0 4px 12px rgba(23, 38, 61, .06), 0 24px 48px -12px rgba(37, 99, 235, .22);
  --header-bg: linear-gradient(120deg, #1e3a8a 0%, #1d4ed8 55%, #2563eb 100%);
  --ring: 0 0 0 3px rgba(37, 99, 235, .18);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: Vazirmatn, Tahoma, "Segoe UI", sans-serif;
  background:
    radial-gradient(1000px 480px at 85% -10%, rgba(59, 130, 246, .10), transparent 60%),
    radial-gradient(800px 420px at 0% 100%, rgba(37, 99, 235, .07), transparent 55%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh;
  direction: rtl;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

::selection { background: rgba(37, 99, 235, .18); }

/* Scrollbars */
* { scrollbar-width: thin; scrollbar-color: #b9cbe6 transparent; }
*::-webkit-scrollbar { width: 9px; height: 9px; }
*::-webkit-scrollbar-thumb { background: #b9cbe6; border-radius: 99px; border: 2px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-thumb:hover { background: #93aed3; background-clip: content-box; border: 2px solid transparent; }
*::-webkit-scrollbar-track { background: transparent; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 16px;
}

.auth-card {
  max-width: 420px;
  margin: 60px auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-lg);
}

.logo { text-align: center; margin-bottom: 24px; }

.logo h1 {
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: -.5px;
  background: var(--primary-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.logo p { color: var(--muted); font-size: .9rem; margin-top: 4px; }

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

.form-check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  cursor: pointer;
}

.form-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

label {
  display: block;
  margin-bottom: 6px;
  font-size: .875rem;
  color: var(--muted);
  font-weight: 600;
}

input, select, textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text);
  font-family: inherit;
  font-size: .95rem;
  transition: border-color .15s, box-shadow .15s;
}

input::placeholder, textarea::placeholder { color: #9db1cc; }

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: var(--ring);
}

input:hover:not(:focus), select:hover:not(:focus), textarea:hover:not(:focus) {
  border-color: #a8c0e2;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, box-shadow .15s, transform .1s, border-color .15s, color .15s;
}

.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--primary-grad);
  color: #fff;
  box-shadow: 0 2px 6px rgba(37, 99, 235, .35);
}
.btn-primary:hover { background: linear-gradient(135deg, #2f74f0 0%, #1d4ed8 55%, #1a44c2 100%); box-shadow: 0 4px 12px rgba(37, 99, 235, .4); }
.btn-primary.full { width: 100%; }
.btn-secondary { background: #fff; color: var(--primary); border: 1px solid var(--border-strong); }
.btn-secondary:hover { background: var(--primary-light); border-color: var(--primary); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-sm { padding: 6px 12px; font-size: .85rem; }

.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: .9rem;
  border: 1px solid transparent;
}

.alert-error { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }
.alert-success { background: #f0fdf4; border-color: #bbf7d0; color: #15803d; }
.alert-info { background: var(--primary-light); border-color: var(--border); color: #1d4ed8; }
.alert-warning { background: #fffbeb; border-color: #fde68a; color: #b45309; }

.text-center { text-align: center; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }
.mb-3 { margin-bottom: 16px; }
.text-muted { color: var(--muted); font-size: .875rem; }
.flex-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

.app-header {
  background: var(--header-bg);
  color: #fff;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  box-shadow: 0 4px 20px rgba(30, 58, 138, .35);
  position: sticky;
  top: 0;
  z-index: 60;
}

.app-header .brand { font-weight: 800; font-size: 1.3rem; letter-spacing: -.3px; text-shadow: 0 1px 3px rgba(0,0,0,.15); }
.app-header .user-info { font-size: .875rem; opacity: .92; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.app-header .btn-secondary { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.35); backdrop-filter: blur(4px); }
.app-header .btn-secondary:hover { background: rgba(255,255,255,.25); border-color: rgba(255,255,255,.6); }

.nav-tabs {
  display: flex;
  gap: 6px;
  padding: 10px 24px;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  position: sticky;
  top: 62px;
  z-index: 50;
}

.nav-tab {
  padding: 8px 18px;
  border-radius: 99px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  font-size: .92rem;
  transition: background .15s, color .15s, border-color .15s, box-shadow .15s;
}

.nav-tab.active {
  background: var(--primary-grad);
  color: #fff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, .35);
}

.nav-tab:hover:not(.active) { background: var(--primary-light); color: var(--primary); }

.panel { display: none; }
.panel.active { display: block; animation: panelIn .22s ease; }

@keyframes panelIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.card h2 {
  font-size: 1.05rem;
  margin-bottom: 16px;
  color: #1e40af;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card h2::before {
  content: "";
  width: 4px;
  height: 18px;
  border-radius: 4px;
  background: var(--primary-grad);
  flex: none;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}

@media (max-width: 768px) { .grid-2 { grid-template-columns: 1fr; } }

table { width: 100%; border-collapse: collapse; font-size: .9rem; }

th, td {
  padding: 11px 12px;
  text-align: right;
  border-bottom: 1px solid #e8eef7;
}

th {
  color: var(--muted);
  font-weight: 700;
  font-size: .82rem;
  background: var(--surface2);
  white-space: nowrap;
}

thead th:first-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
thead th:last-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }

tr:hover td { background: var(--primary-light); }
tbody tr:last-child td { border-bottom: none; }

.badge {
  display: inline-block;
  padding: 3px 11px;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 700;
}

.badge-open { background: #dcfce7; color: #15803d; }
.badge-closed { background: #eef2f7; color: var(--muted); }
.badge-priority { background: #fef3c7; color: #b45309; }

.ticket-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 16px;
  min-height: 520px;
  align-items: start;
}

@media (max-width: 900px) { .ticket-layout { grid-template-columns: 1fr; } }

.ticket-list { overflow-y: auto; max-height: 620px; padding-left: 4px; }

.ticket-item {
  padding: 12px 14px;
  border: 1px solid #e4ebf5;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  cursor: pointer;
  transition: border-color .15s, background .15s, box-shadow .15s, transform .1s;
  background: #fff;
}

.ticket-item:hover {
  border-color: var(--primary);
  box-shadow: 0 3px 10px rgba(37, 99, 235, .12);
  transform: translateY(-1px);
}

.ticket-item.active {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: inset 3px 0 0 var(--primary);
}

.ticket-item h4 { font-size: .95rem; margin-bottom: 4px; }
.ticket-item small { color: var(--muted); }

.chat-messages {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 380px;
  overflow-y: auto;
  margin-bottom: 16px;
  padding: 14px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.message {
  padding: 10px 14px;
  border-radius: 14px;
  max-width: 85%;
  box-shadow: 0 1px 2px rgba(23, 38, 61, .06);
}

.message.in {
  background: #fff;
  align-self: flex-start;
  border: 1px solid #e4ebf5;
  border-radius: 14px 14px 14px 4px;
}

.message.out {
  background: linear-gradient(135deg, #eef4ff 0%, #e3edff 100%);
  align-self: flex-end;
  border: 1px solid #d3e2fa;
  border-radius: 14px 14px 4px 14px;
}

.message .meta { font-size: .75rem; color: var(--muted); margin-bottom: 4px; }

.permission-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
}

.permission-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  background: var(--surface2);
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  color: var(--text);
  font-weight: normal;
  transition: border-color .15s, background .15s;
}

.permission-grid label:hover { border-color: var(--border-strong); background: var(--primary-light); }

.permission-grid input { width: auto; accent-color: var(--primary); }

input[type="checkbox"], input[type="radio"] { accent-color: var(--primary); }

.secret-box {
  background: #0f1c33;
  color: #8fc0ff;
  padding: 14px;
  border-radius: var(--radius-sm);
  font-family: Consolas, monospace;
  font-size: .85rem;
  word-break: break-all;
  margin: 12px 0;
  border: 1px solid #24365a;
  direction: ltr;
  text-align: left;
}

.filter-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.filter-bar select { max-width: 220px; }

.customer-search-wrap { min-width: 260px; max-width: 360px; flex: 1; }

.customer-search { position: relative; }

.customer-search-input { width: 100%; }

.customer-search-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  z-index: 50;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  max-height: 260px;
  overflow-y: auto;
}

.customer-search-item {
  display: block;
  width: 100%;
  text-align: right;
  padding: 10px 14px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  color: var(--text);
  border-bottom: 1px solid #f1f5fb;
  transition: background .12s;
}

.customer-search-item:hover { background: var(--primary-light); }

.customer-search-item small {
  display: block;
  color: var(--muted);
  font-size: .78rem;
  margin-top: 2px;
}

.customer-search-empty {
  padding: 12px;
  color: var(--muted);
  text-align: center;
  font-size: .9rem;
}

.link-btn {
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  padding: 0;
  text-decoration: underline;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 22, 44, 0.5);
  backdrop-filter: blur(3px);
  z-index: 100;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px;
  overflow-y: auto;
  animation: overlayIn .18s ease;
}

@keyframes overlayIn { from { opacity: 0; } to { opacity: 1; } }

.modal-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 520px;
  padding: 22px;
  animation: modalIn .22s cubic-bezier(.16, 1, .3, 1);
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(14px) scale(.985); }
  to { opacity: 1; transform: none; }
}

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

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  gap: 12px;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.profile-field {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  transition: border-color .15s;
}

.profile-field:hover { border-color: var(--border-strong); }

.profile-field .lbl {
  font-size: .75rem;
  color: var(--muted);
  margin-bottom: 4px;
}

.profile-field .val { font-weight: 600; word-break: break-word; }

.profile-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.profile-section { margin-top: 16px; }

.profile-section h3 {
  font-size: .95rem;
  margin-bottom: 8px;
  color: var(--primary);
  font-weight: 700;
}

.profile-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .88rem;
}

.profile-table th, .profile-table td {
  border: 1px solid var(--border);
  padding: 8px 10px;
  text-align: right;
}

.profile-table th { background: var(--primary-light); border-radius: 0; }

.badge-garanti-ok { background: #dcfce7; color: #166534; }
.badge-garanti-no { background: #fee2e2; color: #991b1b; }
.badge-garanti-none { background: #eef2f7; color: #64748b; }
.badge-garanti-warn { background: #fef3c7; color: #92400e; }
.badge-daemi { background: #dcfce7; color: #166534; }
.badge-movaghat { background: #ffedd5; color: #9a3412; }

.ticket-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding: 12px 14px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.ticket-actions select { max-width: 160px; }

.stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.stat-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 16px 14px;
  text-align: center;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.stat-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--primary-grad);
}

.stat-card .num { font-size: 1.7rem; font-weight: 800; color: var(--primary); line-height: 1.2; }
.stat-card .lbl { font-size: .8rem; color: var(--muted); margin-top: 6px; }
.stat-card .stat-sub { font-size: .72rem; color: var(--muted); margin-top: 4px; opacity: .85; }

.stat-card-clickable {
  cursor: pointer;
  transition: box-shadow .15s, transform .15s, border-color .15s;
}
.stat-card-clickable:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
  transform: translateY(-2px);
}
.stat-card-warn .num { color: #b45309; }
.stat-card-warn::before { background: linear-gradient(135deg, #fbbf24, #d97706); }
.stat-card-warn { background: #fffdf5; border-color: #fde68a; }

.overview-company-name {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary);
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.header-link { color: #fff; text-decoration: none; border-bottom: 1px dashed rgba(255,255,255,.5); padding-bottom: 1px; }
.header-link:hover { text-decoration: none; border-bottom-style: solid; }

.customer-view-page { max-width: 1100px; }

.customer-search-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.customer-search-bar input { max-width: 220px; }

.tab-panel { margin-top: 0; }
.tab-panel.hidden { display: none !important; }

.table-scroll { overflow-x: auto; border-radius: var(--radius-sm); }

.mb-3 { margin-bottom: 16px; }
.mb-2 { margin-bottom: 8px; }
.mt-3 { margin-top: 16px; }
.gap-2 { gap: 8px; }
.flex-wrap { flex-wrap: wrap; }
.btn-group { display: flex; gap: 8px; flex-wrap: wrap; }

.readonly-summary {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: .88rem;
  color: var(--muted);
}

.align-center { align-items: center; }

.hidden { display: none !important; }
.no-access { text-align: center; padding: 48px; color: var(--muted); }

/* Auth pages */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.auth-layout {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 24px;
  width: 100%;
  max-width: 960px;
  align-items: start;
}

.auth-layout-wide {
  grid-template-columns: minmax(0, 420px);
  max-width: 420px;
  width: 100%;
  margin: 0 auto;
  justify-items: stretch;
}

.auth-layout-wide .auth-card-form {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
}

.auth-aside {
  background: rgba(255, 255, 255, .8);
  backdrop-filter: blur(6px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

.auth-aside h2 {
  color: var(--primary);
  margin-bottom: 12px;
  font-size: 1.25rem;
  font-weight: 800;
}

.auth-aside-list {
  margin: 16px 0 24px;
  padding-right: 20px;
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.9;
}

.auth-aside-list li::marker { color: var(--primary); }

.auth-aside-action {
  border-top: 1px solid var(--border);
  padding-top: 20px;
}

.auth-card-wide {
  max-width: 640px;
  margin: 0 auto;
  width: 100%;
}

.auth-card-form {
  margin: 0;
}

.info-box {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
}

.info-box h3 {
  font-size: .95rem;
  margin-bottom: 10px;
  color: var(--text);
}

.info-steps {
  padding-right: 20px;
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.9;
}

.info-steps li::marker { color: var(--primary); font-weight: 700; }

.plan-fieldset {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
}

.plan-fieldset legend {
  padding: 0 8px;
  font-size: .875rem;
  color: var(--muted);
  font-weight: 600;
}

.plan-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.plan-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color .15s, background .15s, box-shadow .15s, transform .1s;
  background: #fff;
}

.plan-card:hover { border-color: var(--border-strong); transform: translateY(-1px); }

.plan-card input { display: none; }

.plan-card.selected {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: 0 3px 10px rgba(37, 99, 235, .15);
}

.plan-name { font-weight: 800; font-size: .95rem; }
.plan-desc { font-size: .78rem; color: var(--muted); line-height: 1.5; }
.plan-note { font-size: .82rem; margin-top: 10px; }

.badge-success { background: #dcfce7; color: #15803d; }
.badge-danger { background: #fee2e2; color: #991b1b; }

.plan-select { min-width: 110px; padding: 6px 8px; font-size: .85rem; }

@media (max-width: 768px) {
  .auth-layout { grid-template-columns: 1fr; }
  .plan-cards { grid-template-columns: 1fr; }
  .nav-tabs { top: 0; position: static; }
  .app-header { position: static; }
}

.btn-phone-code {
  background: linear-gradient(135deg, #e879d9 0%, #c55ec1 100%);
  border-color: #c55ec1;
  color: #fff;
  box-shadow: 0 2px 6px rgba(197, 94, 193, .35);
}
.btn-phone-code:hover { background: linear-gradient(135deg, #d968ca 0%, #b350af 100%); color: #fff; }

.phone-code-section {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  background: var(--surface2);
}
.phone-code-section h3 { font-size: .95rem; margin-bottom: 6px; }
.section-hint { font-size: .82rem; margin-bottom: 10px; }

.phone-code-results label {
  display: block;
  font-size: .85rem;
  color: var(--muted);
  margin-bottom: 6px;
}
.phone-code-result-box {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 1.25rem;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  border: 2px solid var(--border);
  background: var(--primary-light);
  direction: ltr;
  user-select: all;
  transition: border-color .15s, box-shadow .15s;
}
.phone-code-result-box:hover { border-color: var(--primary); box-shadow: var(--ring); }
.phone-code-pink { background: #ffd3da; }
.phone-code-gray { background: #d9dee5; }
.phone-code-scale-row { display: flex; gap: 12px; flex-wrap: wrap; }
.phone-code-scale-row .phone-code-result-box { flex: 1; min-width: 120px; }

.badge-code-permanent { background: #dcfce7; color: #166534; padding: 4px 10px; border-radius: 6px; font-size: .85rem; }
.badge-code-temp { background: #ffedd5; color: #9a3412; padding: 4px 10px; border-radius: 6px; font-size: .85rem; }

.upgrade-plan-cards { grid-template-columns: 1fr; }
.upgrade-plan-card {
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 12px;
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.upgrade-plan-card:hover { border-color: var(--primary); box-shadow: var(--shadow); }
.upgrade-plan-card h4 { margin-bottom: 6px; color: var(--primary); }
.upgrade-plan-price { font-size: 1.15rem; font-weight: 800; margin: 8px 0; }
.subscription-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.plan-features { font-size: .85rem; color: var(--muted); line-height: 1.8; margin: 8px 0; }
