/* Nethra Cloud — Cabinet Styles */

:root {
  --bg:   #0b1020;
  --bg2:  #101830;
  --card: #121a33;
  --line: #28345f;
  --text: #e8ecff;
  --muted: #9fb0e8;
  --acc:  #4f7cff;
  --acc-hover: #6b92ff;
  --radius: 14px;
  --err-bg: #3b1722;
  --err-border: #8b3346;
  --err-text: #ffd7df;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Geologica', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--acc); text-decoration: none; transition: color .2s; }
a:hover { color: var(--acc-hover); }

/* ── Auth layout ─────────────────────────────── */

.auth-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
  overflow: hidden;
  position: relative;
}

/* Blob glow in background */
.auth-blob {
  position: fixed;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 400px;
  background: radial-gradient(ellipse at center, rgba(79,124,255,0.18) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
  animation: auth-blob-drift 8s ease-in-out infinite alternate;
}

@keyframes auth-blob-drift {
  0%   { transform: translateX(-50%) translateY(0px); opacity: 0.8; }
  50%  { transform: translateX(-46%) translateY(-20px); opacity: 1; }
  100% { transform: translateX(-54%) translateY(10px); opacity: 0.85; }
}

.auth-wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

/* Logo */
.auth-logo {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.5px;
  text-decoration: none;
}
.auth-logo span { color: var(--acc); }

/* Card */
.auth-card {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  backdrop-filter: blur(8px);
}

.auth-heading {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  text-align: center;
}

/* Error */
.auth-error {
  padding: 12px 14px;
  border: 1px solid var(--err-border);
  background: var(--err-bg);
  color: var(--err-text);
  border-radius: 10px;
  font-size: 14px;
}

/* Form */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}

.auth-input {
  width: 100%;
  padding: 12px 14px;
  background: rgba(15, 23, 48, 0.8);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
  transition: border-color .2s, box-shadow .2s;
  outline: none;
}

.auth-input:focus {
  border-color: var(--acc);
  box-shadow: 0 0 0 3px rgba(79,124,255,0.15);
}

.auth-input::placeholder { color: #4a5c8a; }

/* Submit button */
.auth-btn {
  margin-top: 4px;
  padding: 13px;
  background: var(--acc);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, transform .1s, box-shadow .2s;
  box-shadow: 0 0 20px rgba(79,124,255,0.35);
}

.auth-btn:hover {
  background: var(--acc-hover);
  transform: translateY(-1px);
  box-shadow: 0 0 28px rgba(79,124,255,0.5);
}

.auth-btn:active { transform: translateY(0); }

/* Footer link */
.auth-footer {
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}

/* ── Cabinet Shell ───────────────────────────── */

.cab-body {
  background: var(--bg);
  min-height: 100vh;
}

/* Header */
.cab-header {
  background: rgba(16, 24, 48, 0.85);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.cab-header-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.cab-logo {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.5px;
  flex-shrink: 0;
}
.cab-logo span { color: var(--acc); }

.cab-nav {
  display: flex;
  gap: 4px;
  flex: 1;
}

.cab-nav-item {
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: color .2s, background .2s;
}
.cab-nav-item:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.cab-nav-item.active { color: var(--text); background: rgba(79,124,255,0.15); }

.cab-header-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.cab-email {
  font-size: 13px;
  color: var(--muted);
}

.cab-logout-btn {
  padding: 7px 14px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: border-color .2s, color .2s;
}
.cab-logout-btn:hover { border-color: var(--acc); color: var(--text); }

/* Main */
.cab-main { padding: 40px 0; }
.cab-container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }

/* Page title */
.cab-page-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}
.cab-page-sub {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 32px;
}

/* Card */
.cab-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}

/* Button */
.cab-btn {
  display: inline-block;
  padding: 10px 20px;
  background: var(--acc);
  color: #fff;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background .2s, transform .1s;
}
.cab-btn:hover { background: var(--acc-hover); color: #fff; transform: translateY(-1px); }

/* Empty state */
.cab-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
  text-align: center;
  gap: 16px;
}
.cab-empty-icon {
  width: 64px;
  height: 64px;
  background: rgba(79,124,255,0.1);
  border: 1px solid rgba(79,124,255,0.2);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--acc);
}
.cab-empty-title { font-size: 18px; font-weight: 700; }
.cab-empty-text { color: var(--muted); font-size: 14px; max-width: 320px; }

/* Responsive: cab-nav и мобильная навигация — в блоке @media (max-width: 768px) ниже */

/* ─── Orders table ─────────────────────────── */
.orders-table-wrap { overflow-x: auto; border-radius: 12px; border: 1px solid var(--line); }
.orders-table { width: 100%; border-collapse: collapse; }
.orders-th { padding: 12px 16px; text-align: left; font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .6px; color: var(--muted);
  border-bottom: 1px solid var(--line); background: var(--bg2); }
.orders-th-right { text-align: right; }
.orders-row { transition: background .15s; }
.orders-row:hover { background: rgba(79,124,255,.06); }
.orders-cell { padding: 14px 16px; font-size: 14px; color: var(--text);
  border-bottom: 1px solid var(--line); }
.orders-row:last-child .orders-cell { border-bottom: none; }
.orders-cell-right { text-align: right; color: var(--muted); }
.order-id-short { font-family: monospace; color: var(--muted); font-size: 13px; }

/* ─── Status badges ─────────────────────────── */
.status-badge { display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; }
.status-pending      { background: #1e2233; color: #8892a4; }
.status-paid         { background: #1a264a; color: #7db8ff; }
.status-provisioning { background: #2a2010; color: #f5c842; }
.status-active       { background: #0f2a1a; color: #4cca7a; }
.status-failed       { background: #2a1010; color: #ff6b6b; }
.status-cancelled    { background: #1a1a1a; color: #555; }

/* ─── Order form ────────────────────────────── */
.order-form-wrap { max-width: 520px; }
.order-product-card { display: flex; justify-content: space-between; align-items: center;
  background: var(--bg2); border: 1px solid var(--line); border-radius: 12px;
  padding: 20px 24px; margin-bottom: 24px; }
.order-product-name { display: block; font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.order-product-specs { font-size: 13px; color: var(--muted); }
.order-product-price { font-size: 22px; font-weight: 700; white-space: nowrap; }
.order-product-price span { font-size: 13px; color: var(--muted); font-weight: 400; }
.order-form { display: flex; flex-direction: column; gap: 16px; }
.order-form-row { display: flex; flex-direction: column; gap: 6px; }
.order-label { font-size: 13px; color: var(--muted); font-weight: 500; }
.order-select { background: var(--bg2); border: 1px solid var(--line); border-radius: 8px;
  color: var(--text); font-size: 14px; padding: 10px 14px; font-family: inherit;
  transition: border-color .15s; }
.order-select:focus { outline: none; border-color: var(--acc); }
.order-total-row { display: flex; justify-content: space-between; align-items: center;
  padding: 16px 0; border-top: 1px solid var(--line); font-size: 15px; }
.order-total-row strong { font-size: 20px; font-weight: 700; }
.cab-btn-full { width: 100%; justify-content: center; }
.order-cancel-link { text-align: center; color: var(--muted); font-size: 13px;
  text-decoration: none; margin-top: 4px; }
.order-cancel-link:hover { color: var(--text); }

/* ─── Order detail ──────────────────────────── */
.order-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 768px) { .order-detail-grid { grid-template-columns: 1fr; } }
.order-detail-card { background: var(--bg2); border: 1px solid var(--line);
  border-radius: 12px; padding: 24px; }
.order-detail-row { display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.order-detail-row:last-child { border-bottom: none; }
.order-detail-row span:first-child { color: var(--muted); }
.order-creds { background: var(--bg2); border: 1px solid var(--line);
  border-radius: 12px; padding: 24px; }
.order-creds-title { font-size: 15px; font-weight: 600; margin-bottom: 16px; }
.order-creds-grid { display: flex; flex-direction: column; gap: 0; }
.order-cred-row { display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--line); }
.order-cred-row:last-child { border-bottom: none; }
.order-cred-label { color: var(--muted); font-size: 13px; }
.order-cred-value { font-family: monospace; font-size: 13px; background: #0a0e1a;
  padding: 4px 8px; border-radius: 6px; }
.order-creds-hint { margin-top: 16px; color: var(--muted); font-size: 13px; }
.order-creds-hint code { background: #0a0e1a; padding: 3px 8px; border-radius: 4px; font-size: 12px; }
.cab-back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--muted);
  font-size: 13px; text-decoration: none; margin-bottom: 8px; }
.cab-back-link:hover { color: var(--text); }

/* ─── Profile ───────────────────────────────── */
.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 768px) { .profile-grid { grid-template-columns: 1fr; } }
.profile-card { background: var(--bg2); border: 1px solid var(--line);
  border-radius: 12px; padding: 24px; }
.profile-card-title { font-size: 15px; font-weight: 600; margin-bottom: 16px; }
.profile-row { display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.profile-row:last-child { border-bottom: none; }
.profile-label { color: var(--muted); }
.profile-form { display: flex; flex-direction: column; gap: 14px; }
.profile-field { display: flex; flex-direction: column; gap: 6px; }
.profile-success { background: #0f2a1a; border: 1px solid #1a4a2a; border-radius: 8px;
  padding: 12px 16px; color: #4cca7a; font-size: 14px; margin-bottom: 16px; }

/* ─── Cab button outline ────────────────────── */
.cab-btn-outline { background: transparent; border: 1px solid var(--line); color: var(--text); }
.cab-btn-outline:hover { border-color: var(--acc); color: var(--acc); }

/* ─── Profile Hero ──────────────────────────── */
.profile-hero {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 32px;
  padding: 28px 32px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}

/* Subtle accent glow */
.profile-hero::before {
  content: '';
  position: absolute;
  top: -60px;
  left: -60px;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(79,124,255,0.10) 0%, transparent 65%);
  pointer-events: none;
}

.profile-avatar {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, #3a5ecc 0%, #6b92ff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.5px;
  box-shadow: 0 4px 20px rgba(79,124,255,0.35);
}

.profile-hero-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.profile-hero-email {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
}

.profile-hero-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.profile-hero-since {
  font-size: 13px;
  color: var(--muted);
}

@media (max-width: 640px) {
  .profile-hero {
    padding: 20px;
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ─── Header user chip ──────────────────────── */
.cab-user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cab-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, #3a5ecc 0%, #6b92ff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

/* ─── Admin stats grid ──────────────────────── */
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 8px;
}

@media (max-width: 640px) {
  .admin-stats-grid { grid-template-columns: 1fr 1fr; }
}

.admin-stat-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-stat-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--acc);
  line-height: 1;
}

.admin-stat-label {
  font-size: 13px;
  color: var(--muted);
}

/* ─── Software section (order form) ────────── */
.software-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 20px 0 4px;
  border-top: 1px solid var(--line);
}

.software-section-title {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
  margin: 0;
}

.software-group {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.software-group-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 10px 14px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  background: var(--bg2);
  transition: background .15s;
}
.software-group-label::-webkit-details-marker { display: none; }
.software-group-label::before { content: '▶'; font-size: 9px; opacity: .5; transition: transform .2s; }
details.software-group[open] > .software-group-label::before { transform: rotate(90deg); }
.software-group-label:hover { background: var(--bg3, rgba(255,255,255,.05)); }

details.software-group[open] .software-grid {
  padding: 12px;
  border-top: 1px solid var(--border);
}

.software-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

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

.sw-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  user-select: none;
}

.sw-item:hover { border-color: var(--acc); }

.sw-item input[type="checkbox"] { display: none; }

.sw-item.selected {
  border-color: var(--acc);
  background: rgba(79, 124, 255, .08);
}

.sw-checkbox {
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--line);
  border-radius: 4px;
  flex-shrink: 0;
  margin-top: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color .15s, background .15s;
}

.sw-item.selected .sw-checkbox {
  background: var(--acc);
  border-color: var(--acc);
}

.sw-check-icon {
  display: none;
  width: 10px;
  height: 10px;
}

.sw-item.selected .sw-check-icon { display: block; }

.sw-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

.sw-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sw-desc {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.4;
}

.sw-badge-paid {
  font-size: 10px;
  font-weight: 600;
  color: #f59e0b;
  background: rgba(245,158,11,.12);
  border-radius: 4px;
  padding: 1px 5px;
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 1px;
}

/* ─── Mobile bottom navigation ─────────────── */
.mob-nav { display: none; }

@media (max-width: 768px) {
  .cab-nav { display: none; }
  .cab-main { padding-bottom: 80px; }

  .mob-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg2);
    border-top: 1px solid var(--line);
    z-index: 100;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    gap: 4px;
  }

  .mob-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--muted);
    text-decoration: none;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: .02em;
    padding: 8px 4px;
    border-radius: 10px;
    transition: color .15s, background .15s;
    -webkit-tap-highlight-color: transparent;
    min-height: 52px;
  }

  .mob-nav-item svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    transition: transform .15s;
  }

  .mob-nav-item.active {
    color: var(--acc);
    background: rgba(79,124,255,.1);
  }

  .mob-nav-item.active svg {
    transform: translateY(-1px);
  }

  /* Хедер на мобильном */
  .cab-email { display: none; }
  .cab-header-inner { padding: 0 16px; }
  .cab-logout-btn { padding: 6px 12px; font-size: 13px; }
}

/* ─── Danger button + cancel form ──────────── */
.cab-btn-danger {
  background: transparent;
  border: 1px solid rgba(239,68,68,.4);
  color: #ef4444;
}
.cab-btn-danger:hover {
  background: rgba(239,68,68,.1);
  border-color: #ef4444;
  color: #ef4444;
  transform: none;
}
.order-cancel-form {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

/* ─── Balance page ──────────────────────────── */
.balance-hero {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 28px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.balance-amount {
  font-size: 48px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}

.balance-amount span {
  font-size: 28px;
  color: var(--muted);
  font-weight: 400;
}

.balance-label {
  font-size: 14px;
  color: var(--muted);
}

.cab-section-title {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

/* Balance transaction badges */
.btx-type-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 600;
}
.btx-refund  { background: rgba(79,124,255,.15); color: var(--acc); }
.btx-payment { background: rgba(239,68,68,.12);  color: #ef4444; }
.btx-topup   { background: rgba(34,197,94,.12);  color: #22c55e; }
.btx-bonus   { background: rgba(245,158,11,.12); color: #f59e0b; }

.btx-plus { color: #22c55e; font-weight: 600; }
.btx-minus { color: #ef4444; font-weight: 600; }

.cab-link { color: var(--accent); text-decoration: none; }
.cab-link:hover { text-decoration: underline; }

/* === Payments === */
.payment-form { max-width: 480px; }
.payment-methods { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }

.pay-card {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 20px;
  background: var(--bg2);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  user-select: none;
}
.pay-card:hover { border-color: #3a4a7a; background: #141c2e; }
.pay-card.pay-card-disabled { opacity: 0.5; cursor: not-allowed; }
.pay-card.pay-card-disabled:hover { border-color: #2a2f45; background: transparent; }
.pay-card.pay-selected { border-color: var(--accent); background: rgba(79,124,255,.07); }

.pay-logo {
  width: 48px; height: 48px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.pay-logo-sbp    { background: #0b1f10; }
.pay-logo-card   { background: #0e1828; }
.pay-logo-crypto { background: #1c1500; }

.pay-card-info { flex: 1; min-width: 0; }
.pay-card-title { display: block; font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.pay-card-desc  { font-size: 13px; color: var(--muted); }

.pay-check {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: border-color .15s, background .15s;
}
.pay-card.pay-selected .pay-check { border-color: var(--accent); background: var(--accent); }
.pay-check-icon { display: none; }
.pay-card.pay-selected .pay-check-icon { display: block; }

.order-pay-block { margin: 20px 0; }
.order-pay-hint { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.cab-btn-primary { background: var(--accent); color: #fff; }
.cab-btn-primary:hover { background: #3d6ce8; }

/* === Copy buttons === */
.order-cred-copy-row { display: flex; align-items: center; gap: 8px; }
.cred-copy-btn { background: none; border: 1px solid var(--border); border-radius: 6px; padding: 4px 6px; color: var(--muted); cursor: pointer; display: flex; align-items: center; transition: color .15s, border-color .15s; }
.cred-copy-btn:hover { color: var(--accent); border-color: var(--accent); }

/* === Dashboard server cards === */
.dash-servers-section { max-width: 100%; }
.dash-section-title { font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin: 0 0 10px; }
.dash-servers-list { display: flex; flex-direction: column; gap: 8px; }
.dash-server-card { display: flex; align-items: center; gap: 16px; padding: 16px 20px; background: var(--bg2); border: 1px solid var(--border); border-radius: 12px; text-decoration: none; transition: border-color .2s, background .2s, transform .15s, box-shadow .2s; }
.dash-server-card:hover { border-color: var(--accent); background: #141c2e; transform: translateY(-2px); box-shadow: 0 0 0 1px rgba(79,124,255,.4), 0 4px 32px rgba(79,124,255,.25), 0 0 60px rgba(79,124,255,.08); }
.dash-server-card:active { transform: translateY(0); box-shadow: none; background: #101726; }
.dash-server-icon { width: 44px; height: 44px; border-radius: 10px; background: #111827; display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--accent); }
.dash-server-info { flex: 1; min-width: 0; }
.dash-server-name { display: block; font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 3px; }
.dash-server-meta { font-size: 13px; color: var(--muted); font-family: monospace; }
.dash-server-status { flex-shrink: 0; }

/* Dashboard glow extras */
.dash-server-card:hover .dash-server-icon { background: rgba(79,124,255,.15); box-shadow: 0 0 16px rgba(79,124,255,.3); color: #7ca4ff; transition: background .2s, box-shadow .2s, color .2s; }
@keyframes pulse-glow { 0%,100% { box-shadow: 0 0 0 0 rgba(74,222,128,.3); } 50% { box-shadow: 0 0 0 5px rgba(74,222,128,.0); } }
.status-badge.status-active { animation: pulse-glow 2.5s ease-in-out infinite; }

/* === Server controls === */
.server-controls-card { background: var(--bg2); border: 1px solid var(--border); border-radius: 12px; padding: 20px 24px; }
.server-controls-title { font-size: 14px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin: 0 0 14px; }
.server-controls-grid { display: flex; gap: 10px; flex-wrap: wrap; }
.server-controls-grid form, .server-controls-grid > button { flex: 1; min-width: 130px; }
.server-controls-grid .server-ctrl-btn { width: 100%; justify-content: center; }
.server-controls-grid form { margin: 0; }
.server-ctrl-btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 8px; font-size: 14px; font-weight: 500; cursor: pointer; border: 1.5px solid transparent; transition: background .15s, border-color .15s, box-shadow .15s, transform .1s; text-decoration: none; white-space: nowrap; }
.server-ctrl-btn:active { transform: scale(.97); }
.server-ctrl-reboot { background: rgba(245,158,11,.1); border-color: rgba(245,158,11,.3); color: #f5c842; }
.server-ctrl-reboot:hover { background: rgba(245,158,11,.18); border-color: #f5c842; box-shadow: 0 0 16px rgba(245,158,11,.2); }
.server-ctrl-off { background: rgba(239,68,68,.08); border-color: rgba(239,68,68,.25); color: #f87171; }
.server-ctrl-off:hover { background: rgba(239,68,68,.15); border-color: #f87171; box-shadow: 0 0 16px rgba(239,68,68,.2); }
.server-ctrl-on { background: rgba(74,222,128,.08); border-color: rgba(74,222,128,.25); color: #4ade80; }
.server-ctrl-on:hover { background: rgba(74,222,128,.15); border-color: #4ade80; box-shadow: 0 0 16px rgba(74,222,128,.2); }
.server-ctrl-console { background: rgba(79,124,255,.08); border-color: rgba(79,124,255,.25); color: #7ca4ff; }
.server-ctrl-console:hover { background: rgba(79,124,255,.15); border-color: var(--accent); box-shadow: 0 0 16px rgba(79,124,255,.2); }

/* === Reinstall section === */
.reinstall-card { grid-column: 1 / -1; }
.reinstall-summary { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--text-muted); list-style: none; padding: 4px 0; user-select: none; }
.reinstall-summary::-webkit-details-marker { display: none; }
.reinstall-summary::before { content: '▶'; font-size: 10px; transition: transform .2s; }
details[open] .reinstall-summary::before { transform: rotate(90deg); }
.reinstall-body { margin-top: 1.25rem; }
.reinstall-warning { background: rgba(239,68,68,.08); border: 1px solid rgba(239,68,68,.2); border-radius: 8px; padding: 12px 16px; font-size: 13px; color: #f87171; margin-bottom: 1.25rem; }

/* === Reinstall modal === */
.reinstall-modal-inner {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.reinstall-modal-header { display: flex; align-items: center; justify-content: space-between; }
.reinstall-modal-title { font-size: 18px; font-weight: 700; margin: 0; }
.reinstall-modal-close { background: none; border: none; cursor: pointer; color: var(--text-muted); padding: 4px; border-radius: 6px; display: flex; align-items: center; transition: color .15s; }
.reinstall-modal-close:hover { color: var(--text); }
.reinstall-modal-footer { display: flex; gap: 12px; justify-content: flex-end; margin-top: 8px; }
.server-ctrl-reinstall { background: rgba(239,68,68,.08); border-color: rgba(239,68,68,.25); color: #f87171; }
.server-ctrl-reinstall:hover { background: rgba(239,68,68,.15); border-color: #f87171; box-shadow: 0 0 16px rgba(239,68,68,.2); }

/* === Power indicator === */
.server-ctrl-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.power-indicator { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 500; color: var(--text-muted); }
.power-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; box-shadow: 0 0 6px currentColor; }

/* === Flash banner === */
.flash-banner { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-radius: 10px; font-size: 14px; margin-bottom: 20px; }
.flash-banner-success { background: rgba(74,222,128,.1); border: 1px solid rgba(74,222,128,.25); color: #4ade80; }
