/* ---------- JRS Core Official Design Tokens & Theme ---------- */
@font-face {
  font-family: 'JRS Title';
  src: url('assets/RDRLino-Regular.ttf') format('truetype');
  font-display: swap;
}

@font-face {
  font-family: 'JRS Body';
  src: url('assets/Hapna-Regular.ttf') format('truetype');
  font-display: swap;
}

:root {
  --bg: #050505;
  --panel: #0c0c0b;
  --panel2: #131312;
  --field: rgba(0, 0, 0, 0.44);
  --line: rgba(255, 255, 255, 0.09);
  --line2: rgba(255, 255, 255, 0.17);
  --text: #f2eee7;
  --muted: #c8c3bb;
  --dim: #85817b;
  --edge: rgba(255, 255, 255, 0.85);
  --danger: #c77f79;
  --ok: #9db5a7;
  --warn: #d9bd7e;
  --accent-gold: #e5c378;
  --code-bg: #0a0a09;
  --title: 'JRS Title', Georgia, 'Times New Roman', serif;
  --body: 'JRS Body', 'Segoe UI', Tahoma, system-ui, -apple-system, sans-serif;
  --mono: 'Cascadia Code', Consolas, 'SFMono-Regular', Menlo, monospace;
  --card: url('assets/store/card.png');
  --card-on: url('assets/store/card-active.png');
  --tab: url('assets/store/tab.png');
  --tab-on: url('assets/store/tab-active.png');
  --hdr: url('assets/store/ui-header.png');
  --paper: url('assets/store/panel-background.png');
  --gutter: clamp(14px, 4vw, 52px);
  --hdr-h: 64px;
  --surface: rgba(0, 0, 0, 0.42);
  --hover: rgba(255, 255, 255, 0.08);
  --hover2: rgba(255, 255, 255, 0.04);
  --hover3: rgba(255, 255, 255, 0.1);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

:lang(ar) *, :lang(ar) {
  --title: 'Segoe UI', Tahoma, 'Noto Naskh Arabic', serif;
  --body: 'Segoe UI', Tahoma, 'Noto Sans Arabic', system-ui, sans-serif;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg) var(--paper) center top / cover fixed;
  color: var(--text);
  font-family: var(--body);
  font-size: 15.5px;
  line-height: 1.7;
  overflow-x: hidden;
  overflow-wrap: break-word;
}

/* Background Animated Glow/VFX */
.bg-fx {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  background: radial-gradient(1200px 700px at 70% 10%, rgba(255, 255, 255, 0.035), transparent 60%);
}

.bg-fx img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.7;
}

/* ---------- Header / Top bar (JRS Official Style) ---------- */
.top-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(8px, 1.6vw, 18px);
  min-height: var(--hdr-h);
  padding: 8px var(--gutter);
  background: var(--hdr) center / 100% 100% no-repeat, rgba(5, 5, 5, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line2);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.6);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-logo-wrap {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  overflow: hidden;
  flex: none;
}

.brand .logo {
  display: block;
  height: 38px;
  width: auto;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.6));
}

.brand b {
  font-family: var(--title);
  font-weight: 400;
  font-size: 21px;
  letter-spacing: 0.12em;
  color: var(--text);
  text-shadow: 0 2px 4px #000;
}

.brand em {
  font-style: normal;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
  border: 1px solid var(--line2);
  border-radius: 5px;
  padding: 2px 8px;
  margin-inline-start: 10px;
}

.header-status {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Language Toggle Button (JRS Theme) */
.lang-switch-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 4px 14px;
  border-radius: 4px;
  border: 1px solid var(--line2);
  background: var(--field);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: none;
  transition: all 0.15s ease;
}

.lang-switch-btn:hover {
  background: var(--hover);
  border-color: var(--edge);
  transform: translateY(-1px);
}

/* Status Pill */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 4px 14px;
  border-radius: 999px;
  border: 1px solid var(--line2);
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.status-pill.good {
  border-color: rgba(157, 181, 167, 0.5);
  color: var(--ok);
  background: rgba(157, 181, 167, 0.08);
}

.status-pill.bad {
  border-color: rgba(199, 127, 121, 0.5);
  color: var(--danger);
  background: rgba(199, 127, 121, 0.08);
}

/* ---------- Layout Shell (Ultra-Responsive & Expansive) ---------- */
.shell {
  width: 100%;
  max-width: min(1560px, 96vw);
  margin: 0 auto;
  padding: clamp(16px, 3vh, 36px) clamp(12px, 2.5vw, 36px) 80px;
}

/* ---------- Cards (JRS Theme Texture Brush Cards) ---------- */
.card {
  position: relative;
  background: var(--card) center / 100% 100% no-repeat, #141413;
  border: 1px solid var(--line2);
  border-radius: 8px;
  padding: 22px 26px;
  margin-bottom: 22px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: all 0.18s ease;
}

.card:hover {
  border-color: rgba(255, 255, 255, 0.28);
  filter: brightness(1.05);
}

.card h2 {
  margin: 0 0 14px;
  font-family: var(--title);
  font-weight: 400;
  font-size: 22px;
  letter-spacing: 0.06em;
  color: var(--text);
  text-shadow: 0 2px 4px #000;
  display: flex;
  align-items: center;
  gap: 10px;
}

.card h2::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 20px;
  background: var(--edge);
  border-radius: 2px;
}

/* ---------- Form Controls ---------- */
label {
  display: block;
  margin: 14px 0 6px;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 500;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line2);
  border-radius: 6px;
  background: var(--field);
  color: var(--text);
  padding: 12px 14px;
  font: inherit;
  font-size: 14.5px;
  outline: none;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--edge);
  background: #000000;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
}

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

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ---------- Buttons (JRS Store Cut Bar Style) ---------- */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

button,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 20px;
  border: 0;
  border-radius: 0;
  font: inherit;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text);
  background: var(--tab) center / 100% 100% no-repeat, #242422;
  text-shadow: 0 1px 2px #000;
  box-shadow: inset 0 0 0 1px var(--line2);
  transition: filter 0.15s ease, transform 0.12s ease;
  white-space: nowrap;
}

button:hover,
.btn:hover {
  filter: brightness(1.18);
  transform: translateY(-1px);
}

button:active,
.btn:active {
  transform: translateY(0);
}

/* Primary Button / Active Tab */
button.primary,
.btn.primary {
  color: #fff;
  background: var(--tab-on) center / 100% 100% no-repeat, #2f2f2c;
  box-shadow: inset 3px 0 0 var(--edge), inset 0 -2px 0 rgba(255, 255, 255, 0.35);
  filter: brightness(1.12);
}

:root[dir=rtl] button.primary,
:root[dir=rtl] .btn.primary {
  box-shadow: inset -3px 0 0 var(--edge), inset 0 -2px 0 rgba(255, 255, 255, 0.35);
}

button.secondary,
.btn.secondary {
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line2);
  color: var(--muted);
}

button.secondary:hover,
.btn.secondary:hover {
  background: var(--hover);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--edge);
}

button.green,
.btn.green {
  background: #0e8a6a;
  background-image: none;
  color: #fff;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

button.green:hover,
.btn.green:hover {
  background: #12a07c;
  filter: none;
}

button.red,
.btn.red {
  color: #ffd9d6;
  box-shadow: inset 3px 0 0 var(--danger), inset 0 0 0 1px var(--line2);
}

:root[dir=rtl] button.red,
:root[dir=rtl] .btn.red {
  box-shadow: inset -3px 0 0 var(--danger), inset 0 0 0 1px var(--line2);
}

button.blue,
.btn.blue {
  color: #fff0bd;
  box-shadow: inset 3px 0 0 var(--warn), inset 0 0 0 1px var(--line2);
}

:root[dir=rtl] button.blue,
:root[dir=rtl] .btn.blue {
  box-shadow: inset -3px 0 0 var(--warn), inset 0 0 0 1px var(--line2);
}

button:disabled,
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  filter: grayscale(0.6);
}

/* ---------- Callouts & Notices ---------- */
.notice {
  margin-top: 14px;
  border: 1px solid var(--line2);
  border-inline-start: 3px solid var(--edge);
  background: var(--surface);
  color: var(--muted);
  border-radius: 4px;
  padding: 12px 16px;
  line-height: 1.7;
  font-size: 13.5px;
}

.notice strong {
  color: var(--text);
}

.message {
  margin-top: 12px;
  min-height: 22px;
  color: var(--dim);
  line-height: 1.7;
  font-size: 13.5px;
}

.message.error {
  color: var(--danger);
}

.message.ok {
  color: var(--ok);
}

.hidden {
  display: none !important;
}

/* ---------- Stats Grid (JRS Store Card Texture) ---------- */
.stats-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.stats-title h2 {
  margin: 0 0 4px;
}

.stats-title p {
  margin: 0;
  color: var(--dim);
  font-size: 13px;
  line-height: 1.6;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.stat-box {
  position: relative;
  background: var(--tab) center / 100% 100% no-repeat, #191918;
  border: 1px solid var(--line2);
  border-radius: 6px;
  padding: 16px;
  transition: all 0.16s ease;
}

.stat-button {
  cursor: pointer;
  user-select: none;
}

.stat-button:hover,
.stat-button:focus-visible {
  filter: brightness(1.18);
  border-color: var(--edge);
  transform: translateY(-2px);
  outline: none;
  background-image: var(--tab-on);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}

.stat-button.active {
  background-image: var(--tab-on);
  border-color: var(--edge);
  box-shadow: inset 3px 0 0 var(--edge), 0 6px 18px rgba(0, 0, 0, 0.4);
}

:root[dir=rtl] .stat-button.active {
  box-shadow: inset -3px 0 0 var(--edge), 0 6px 18px rgba(0, 0, 0, 0.4);
}

.stat-box span {
  display: block;
  color: var(--dim);
  font-size: 12.5px;
  font-weight: 500;
  margin-bottom: 6px;
}

.stat-box strong {
  display: block;
  color: var(--text);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.2;
}

.stat-box small {
  display: block;
  color: var(--dim);
  font-size: 11.5px;
  margin-top: 6px;
}

/* ---------- Stats Detail & List Pagers ---------- */
.stats-detail {
  margin-top: 16px;
  border: 1px solid var(--line2);
  border-radius: 6px;
  background: var(--surface);
  padding: 14px;
}

.stats-detail-page {
  margin-top: 20px;
}

.stats-detail-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.stats-detail-page-header h2 {
  margin-bottom: 4px;
  color: var(--text);
}

.stats-detail-page-header p {
  margin: 0;
  color: var(--dim);
  font-size: 13.5px;
}

.stats-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.stats-list-item {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel2);
  padding: 14px;
}

.stats-list-item strong {
  display: block;
  color: var(--text);
  direction: ltr;
  text-align: left;
  word-break: break-all;
  font-size: 14.5px;
}

.stats-list-item span {
  display: block;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.65;
  margin-top: 4px;
}

.stats-list-item button {
  width: 100%;
  margin-top: 10px;
  min-height: 36px;
  padding: 6px 12px;
  font-size: 13px;
}

.stats-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 18px;
}

.stats-pager button {
  min-width: 100px;
}

.stats-pager span {
  color: var(--muted);
  font-size: 13.5px;
  font-family: var(--mono);
}

/* ---------- Admin Navigation Bar (JRS Store Cut Bar Style) ---------- */
.admin-nav-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
  padding: 12px 16px;
  background: var(--card) center / 100% 100% no-repeat, #141413;
  border: 1px solid var(--line2);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.nav-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 22px;
  font-family: var(--title);
  font-size: 15px;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: var(--tab) center / 100% 100% no-repeat, #1c1c1a;
  border: 1px solid var(--line2);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.nav-tab-btn .tab-ico {
  font-size: 16px;
  line-height: 1;
}

.nav-tab-btn:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.3);
  filter: brightness(1.15);
  transform: translateY(-1px);
}

.nav-tab-btn.active {
  color: #fff;
  background: var(--tab-on) center / 100% 100% no-repeat, #2b2b28;
  border-color: var(--edge);
  box-shadow: inset 3px 0 0 var(--edge), 0 4px 16px rgba(0, 0, 0, 0.4);
  filter: brightness(1.15);
}

:root[dir=rtl] .nav-tab-btn.active {
  box-shadow: inset -3px 0 0 var(--edge), 0 4px 16px rgba(0, 0, 0, 0.4);
}

/* ---------- Main Container ---------- */
main {
  display: block;
  width: 100%;
}

/* ---------- Centered & Balanced Login Screen ---------- */
.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(82vh - var(--hdr-h));
  padding: clamp(20px, 4vh, 60px) clamp(16px, 3vw, 32px);
}

.login-card {
  width: 100%;
  max-width: clamp(480px, 48vw, 680px);
  margin: 0 auto;
  padding: clamp(34px, 5vh, 56px) clamp(28px, 4vw, 52px);
  border-radius: 14px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.login-header {
  text-align: center;
  margin-bottom: clamp(20px, 3vh, 32px);
}

.login-header h2 {
  justify-content: center;
  font-size: clamp(26px, 2.4vw, 36px);
  margin: 0 0 8px;
}

.login-header h2::before {
  display: none;
}

.login-sub {
  margin: 0;
  color: var(--dim);
  font-size: 13.5px;
  font-family: var(--mono);
  letter-spacing: 0.05em;
}

.login-field-group {
  margin-bottom: 18px;
}

.login-input {
  min-height: clamp(48px, 4.5vh, 58px);
  font-size: clamp(15px, 1.1vw, 18px);
  padding: 12px 18px;
  border-radius: 8px;
}

.login-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

.login-submit-btn {
  width: 100%;
  min-height: clamp(48px, 4.5vh, 58px);
  font-size: clamp(16px, 1.2vw, 19px);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.login-actions button {
  width: 100%;
  min-height: clamp(44px, 4vh, 52px);
  font-size: clamp(14.5px, 1.05vw, 17px);
}

.login-notice {
  margin-top: 18px;
  font-size: 13px;
  text-align: center;
}

/* ---------- Users Tab Grid View ---------- */
.users-view-grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 20px;
  align-items: start;
}

.tab-pane {
  animation: fadeInPane 0.2s ease;
}

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

/* ---------- Staff Management Card & Item Styles ---------- */
.staff-add-box {
  background: var(--surface);
  border: 1px solid var(--line2);
  border-radius: 8px;
  padding: 18px;
  margin-top: 14px;
}

.staff-add-box h3 {
  margin: 0 0 12px;
  font-family: var(--title);
  color: var(--text);
  font-size: 16px;
}

.staff-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--line2);
  border-radius: 8px;
  padding: 14px 18px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.staff-info strong {
  display: block;
  font-size: 15px;
  color: var(--text);
  font-family: var(--mono);
}

.staff-badge {
  display: inline-block;
  margin-top: 5px;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(255, 215, 106, 0.12);
  border: 1px solid rgba(255, 215, 106, 0.35);
  color: var(--warn);
}

.staff-badge.admin {
  background: rgba(45, 165, 104, 0.12);
  border-color: rgba(45, 165, 104, 0.4);
  color: var(--ok);
}

.result-stack {
  display: grid;
  gap: 14px;
}

.user-item {
  border: 1px solid var(--line2);
  background: var(--panel2);
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  transition: border-color 0.16s ease;
}

.user-item.active {
  border-color: var(--edge);
  box-shadow: inset 3px 0 0 var(--edge), 0 4px 18px rgba(0, 0, 0, 0.4);
}

:root[dir=rtl] .user-item.active {
  box-shadow: inset -3px 0 0 var(--edge), 0 4px 18px rgba(0, 0, 0, 0.4);
}

.user-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.user-id {
  direction: ltr;
  text-align: left;
  color: var(--accent-gold);
  font-size: 12.5px;
  font-family: var(--mono);
  word-break: break-all;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.field {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  background: var(--surface);
}

.field span {
  display: block;
  color: var(--dim);
  font-size: 11.5px;
  margin-bottom: 4px;
}

.field strong {
  display: block;
  color: var(--text);
  font-size: 13.5px;
  line-height: 1.45;
  word-break: break-word;
}

.ltr {
  direction: ltr;
  text-align: left;
}

.empty {
  border: 1px dashed var(--line2);
  border-radius: 8px;
  padding: 32px 16px;
  text-align: center;
  color: var(--dim);
  font-size: 14px;
}

/* ---------- Duplicate Devices ---------- */
.duplicate-device-groups {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.duplicate-device-group {
  border: 1px solid var(--line2);
  border-radius: 6px;
  background: var(--panel2);
  padding: 14px;
}

.duplicate-device-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.duplicate-device-id {
  color: var(--accent-gold);
  direction: ltr;
  text-align: left;
  word-break: break-all;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 13.5px;
}

.duplicate-device-count {
  color: var(--dim);
  font-size: 12.5px;
}

.duplicate-device-users {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.duplicate-device-user {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  padding: 8px;
}

.duplicate-device-user strong {
  display: block;
  direction: ltr;
  text-align: left;
  color: var(--text);
  word-break: break-all;
  font-size: 13px;
}

.duplicate-device-user span {
  display: block;
  color: var(--dim);
  font-size: 11px;
  margin-top: 3px;
}

.duplicate-device-user button {
  width: 100%;
  margin-top: 8px;
  min-height: 32px;
  padding: 4px 8px;
  font-size: 12px;
}

/* ---------- Responsive Breakpoints (TV, Desktop, Tablet, Mobile) ---------- */
/* Ultra-Wide Displays & 4K TVs */
@media (min-width: 1920px) {
  :root {
    --hdr-h: 76px;
  }

  .shell {
    max-width: 1760px;
  }

  .login-card {
    max-width: 640px;
    padding: 56px 48px;
  }

  .nav-tab-btn {
    font-size: 17px;
    min-height: 50px;
    padding: 12px 28px;
  }

  .card h2 {
    font-size: 26px;
  }
}

/* Tablets and Medium Laptops */
@media (max-width: 960px) {
  .shell {
    padding: 16px 14px 40px;
  }

  .users-view-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .top-header {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .admin-nav-bar {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding: 10px;
    -webkit-overflow-scrolling: touch;
  }

  .nav-tab-btn {
    flex: 0 0 auto;
    white-space: nowrap;
  }
}

/* Mobile Screens */
@media (max-width: 600px) {
  .login-card {
    padding: 28px 20px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7);
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .stats-list {
    grid-template-columns: 1fr;
  }

  .duplicate-device-users {
    grid-template-columns: 1fr;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .row {
    grid-template-columns: 1fr;
  }

  .actions button,
  .actions .btn {
    flex: 1 1 100%;
  }

  .header-status {
    gap: 8px;
  }

  .brand b {
    font-size: 18px;
  }

  .brand em {
    display: none;
  }
}

/* ---------- JRS AI Assistant Widget Styles ---------- */
.ai-fab{position:fixed;z-index:70;inset-inline-end:max(18px,env(safe-area-inset-right));bottom:max(18px,env(safe-area-inset-bottom));display:inline-flex;align-items:center;gap:8px;height:50px;padding:0 18px 0 15px;border-radius:999px;border:1px solid var(--line2);background:var(--panel2);color:var(--text);font:inherit;font-size:15px;cursor:pointer;box-shadow:0 10px 30px rgba(0,0,0,.5),inset 0 0 0 1px rgba(255,255,255,.04)}
.ai-fab:hover{border-color:var(--edge)}
.ai-fab:focus-visible,.ai-panel button:focus-visible,.ai-in:focus-visible{outline:2px solid var(--edge);outline-offset:2px}
body.ai-on .ai-fab{display:none}
.ai-panel{position:fixed;z-index:75;inset-inline-end:max(18px,env(safe-area-inset-right));bottom:max(18px,env(safe-area-inset-bottom));width:min(440px,calc(100vw - 36px));height:min(680px,calc(100dvh - 110px));display:flex;flex-direction:column;background:var(--panel);border:1px solid var(--line2);border-radius:var(--r,14px);box-shadow:0 24px 70px rgba(0,0,0,.65);overflow:hidden}
.ai-panel[hidden]{display:none}
.ai-head{display:flex;align-items:center;gap:6px;padding:12px 12px 12px 16px;border-bottom:1px solid var(--line);background:var(--panel2)}
:root[dir=rtl] .ai-head{padding:12px 16px 12px 12px}
.ai-ttl{flex:1;min-width:0;display:flex;flex-direction:column}
.ai-ttl b{font-family:var(--title);font-weight:400;letter-spacing:.06em;font-size:18px}
.ai-ttl span{font-size:12.5px;color:var(--dim);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ai-hbtn{width:38px;height:38px;display:grid;place-items:center;border-radius:10px;border:1px solid transparent;background:none;color:var(--muted);cursor:pointer}
.ai-hbtn:hover{background:var(--hover);color:var(--text)}
.ai-list{flex:1;overflow-y:auto;overscroll-behavior:contain;padding:14px;display:flex;flex-direction:column;gap:12px}
.ai-msg{max-width:100%;font-size:14.5px;line-height:1.65}
.ai-msg p{margin:0 0 8px}.ai-msg p:last-child{margin-bottom:0}
.ai-msg.me{align-self:flex-end;max-width:88%;background:var(--hover3);border:1px solid var(--line2);border-radius:14px;padding:9px 13px;white-space:pre-wrap;overflow-wrap:anywhere}
.ai-msg.bot{align-self:stretch}
.ai-sub{font-size:12.5px;color:var(--dim);text-transform:uppercase;letter-spacing:.06em;margin:4px 0 6px!important}
:root[dir=rtl] .ai-sub{text-transform:none;letter-spacing:0}
.ai-wait{color:var(--dim)}
.ai-wait::after{content:'';display:inline-block;width:1em;text-align:start;animation:aidots 1.2s steps(4) infinite}
@keyframes aidots{0%{content:''}25%{content:'.'}50%{content:'..'}75%{content:'...'}}
.ai-chips,.ai-rel{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.ai-chip{border:1px solid var(--line2);background:var(--hover2);color:var(--muted);border-radius:999px;padding:6px 12px;font:inherit;font-size:13px;cursor:pointer;text-align:start;max-width:100%;overflow-wrap:anywhere}
.ai-chip:hover{color:var(--text);border-color:var(--edge)}
.ai-card{border:1px solid var(--line2);border-radius:12px;background:var(--surface);padding:12px 13px;margin:6px 0 10px}
.ai-card-h{display:flex;flex-direction:column;gap:2px;margin-bottom:8px}
.ai-card-h b{font-size:15px;overflow-wrap:anywhere}
.ai-crumb{font-size:12px;color:var(--dim);overflow-wrap:anywhere}
.ai-card-f{display:flex;flex-wrap:wrap;gap:14px;margin-top:8px}
.ai-link{background:none;border:0;padding:0;color:var(--text);font:inherit;font-size:13px;text-decoration:underline;text-underline-offset:3px;cursor:pointer}
.ai-md{overflow-wrap:anywhere}
.ai-md h4{margin:10px 0 4px;font-size:14px}
.ai-md ul,.ai-md ol{margin:4px 0 8px;padding-inline-start:20px}
.ai-md li{margin:2px 0}
.ai-md code{font-family:var(--mono);font-size:.88em;background:var(--code-inline);padding:1px 5px;border-radius:5px}
.ai-md a{color:var(--text)}
.ai-code{margin:8px 0;border:1px solid var(--line);border-radius:10px;overflow:hidden;background:var(--code-bg)}
.ai-code-h{display:flex;justify-content:space-between;align-items:center;padding:4px 6px 4px 10px;font-size:11.5px;color:var(--dim);border-bottom:1px solid var(--line)}
.ai-copy{border:1px solid var(--line2);background:none;color:var(--muted);border-radius:6px;font:inherit;font-size:11.5px;padding:3px 9px;cursor:pointer;min-height:28px}
.ai-code pre{margin:0;padding:10px 12px;overflow-x:auto;font-size:12.5px;line-height:1.55;color:#f2eee7;text-align:left}
.ai-code pre code{background:none;padding:0;font-size:inherit}
.ai-tbl{overflow-x:auto;margin:6px 0 8px;border:1px solid var(--line);border-radius:8px}
.ai-tbl table{border-collapse:collapse;width:100%;font-size:12.5px;min-width:0}
.ai-tbl td,.ai-tbl th{border-bottom:1px solid var(--line);padding:6px 8px;text-align:start;vertical-align:top}
.ai-tbl th{color:var(--dim);font-weight:600}
.ai-form{display:flex;align-items:flex-end;gap:8px;padding:10px;border-top:1px solid var(--line);background:var(--panel2)}
.ai-in{flex:1;min-width:0;resize:none;max-height:140px;border:1px solid var(--line2);border-radius:12px;background:var(--field);color:var(--text);font:inherit;font-size:16px;line-height:1.4;padding:10px 12px}
.ai-send{flex:none;width:44px;height:44px;display:grid;place-items:center;border-radius:12px;border:1px solid var(--line2);background:var(--text);color:var(--bg);cursor:pointer}
:root[dir=rtl] .ai-send svg{transform:scaleX(-1)}
.ai-foot{font-size:11px;color:var(--dim);text-align:center;padding:0 10px 8px;background:var(--panel2)}
@media(max-width:640px){
  .ai-fab{height:52px;width:52px;padding:0;justify-content:center}
  .ai-fab-l{display:none}
  .ai-panel{inset:0;width:100%;height:100dvh;border-radius:0;border:0;padding-bottom:env(safe-area-inset-bottom)}
  body.ai-on{overflow:hidden}
}
@media print{.ai-fab,.ai-panel{display:none!important}}
.ai-refuse{border:1px solid var(--danger);border-radius:10px;padding:9px 12px!important;color:var(--text);background:rgba(199,127,121,.08)}
.ai-blocked .ai-in,.ai-blocked .ai-send{opacity:.5;cursor:not-allowed}
/* assistant mascot */
.ai-fab{padding:0 18px 0 8px;height:56px}
:root[dir=rtl] .ai-fab{padding:0 8px 0 18px}
.ai-bot{width:40px;height:44px;flex:none;filter:drop-shadow(0 3px 6px rgba(0,0,0,.6));animation:aibob 3.2s ease-in-out infinite}
.ai-fab:hover .ai-bot{animation-duration:1.2s}
@keyframes aibob{0%,100%{transform:translateY(0)}50%{transform:translateY(-3px)}}
.ai-avatar{width:34px;height:37px;flex:none;filter:drop-shadow(0 2px 5px rgba(0,0,0,.55))}
@media(max-width:640px){.ai-fab{width:60px;height:60px;padding:0!important}.ai-bot{width:42px;height:46px}}
@media(prefers-reduced-motion:reduce){.ai-bot{animation:none}}


/* ---------- JRS Core Style Showcase Portal & Gateway ---------- */
.portal-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--panel2);
  padding: 4px;
  border-radius: 6px;
  border: 1px solid var(--line2);
}

.portal-nav-btn {
  background: transparent;
  border: none;
  color: var(--dim);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.portal-nav-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.portal-nav-btn.active {
  color: #fff;
  background: #9b2828;
  box-shadow: 0 2px 8px rgba(155, 40, 40, 0.4);
}

.showcase-portal {
  display: flex;
  flex-direction: column;
  gap: 36px;
  padding: 8px 0 60px;
  animation: fadeIn 0.3s ease;
  width: 100%;
}

.showcase-hero {
  position: relative;
  background-color: #141413;
  background-image: var(--card);
  background-position: center;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  border: 1px solid var(--line2);
  border-radius: 8px;
  padding: 38px 34px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
}

.showcase-badge {
  display: inline-block;
  align-self: flex-start;
  background: rgba(199, 127, 121, 0.15);
  color: #e69d98;
  border: 1px solid rgba(199, 127, 121, 0.35);
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.showcase-title {
  font-family: var(--title);
  font-weight: 400;
  font-size: 32px;
  color: var(--text);
  letter-spacing: 0.06em;
  margin: 0 0 14px 0;
  text-shadow: 0 2px 6px #000;
  line-height: 1.25;
}

.showcase-desc {
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--muted);
  max-width: 860px;
  margin: 0 0 26px 0;
}

.showcase-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 32px;
}

.showcase-kpi-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.kpi-card {
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: transform 0.2s, border-color 0.2s;
}

.kpi-card:hover {
  transform: translateY(-2px);
  border-color: var(--line2);
}

.kpi-lbl {
  font-size: 12px;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.kpi-val {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

/* Section styling */
.showcase-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.section-head h2 {
  font-family: var(--title);
  font-size: 24px;
  color: var(--text);
  margin: 0;
  letter-spacing: 0.05em;
  font-weight: 400;
}

.section-head p {
  font-size: 14.5px;
  color: var(--dim);
  margin: 0;
}

/* Feature cards grid - JRS Core CardGroup style */
.showcase-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  width: 100%;
}

.feat-card {
  background-color: #141413;
  background-image: var(--card);
  background-position: center;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  border: 1px solid var(--line2);
  border-radius: 8px;
  padding: 24px 26px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.feat-card:hover {
  transform: translateY(-2px);
  border-color: var(--edge);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

.feat-card h3 {
  font-family: var(--title);
  font-size: 18px;
  font-weight: 400;
  color: var(--text);
  letter-spacing: 0.04em;
  margin: 0;
}

.feat-card p {
  font-size: 14px;
  line-height: 1.65;
  color: var(--muted);
  margin: 0;
}

/* Step-by-step interactive guide */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  width: 100%;
}

.step-card {
  background-color: #141413;
  background-image: var(--card);
  background-position: center;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  border: 1px solid var(--line2);
  border-radius: 8px;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  transition: all 0.2s;
}

.step-card:hover {
  border-color: var(--edge);
  transform: translateY(-2px);
}

.step-card h3 {
  font-family: var(--title);
  font-size: 16.5px;
  font-weight: 400;
  color: var(--text);
  margin: 0;
}

.step-card p {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
}

@media (max-width: 860px) {
  .showcase-cards-grid,
  .steps-grid {
    grid-template-columns: 1fr;
  }
}

/* Tech table */
.tech-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line2);
  border-radius: 8px;
  background: var(--panel);
}

.tech-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  text-align: right;
}

:root[dir=ltr] .tech-table {
  text-align: left;
}

.tech-table th {
  background: var(--panel2);
  color: var(--text);
  padding: 13px 18px;
  font-weight: 700;
  border-bottom: 1px solid var(--line2);
}

.tech-table td {
  padding: 13px 18px;
  color: var(--text);
  border-bottom: 1px solid var(--line);
}

.tech-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* Admin Gateway Callout & Security Shield */
.admin-callout-card {
  background-color: #141413;
  background-image: var(--card);
  background-position: center;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  border: 1px solid var(--line2);
  border-radius: 8px;
  padding: 28px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.admin-security-banner {
  background: rgba(199, 127, 121, 0.12);
  border: 1px solid rgba(199, 127, 121, 0.35);
  border-radius: 6px;
  padding: 12px 18px;
  color: #e69d98;
  font-size: 13.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.admin-preview-matrix {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 28px;
  width: 100%;
}

.admin-preview-card {
  background-color: #141413;
  background-image: var(--card);
  background-position: center;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  border: 1px solid var(--line2);
  border-radius: 8px;
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  cursor: pointer;
  transition: all 0.2s ease;
}

.admin-preview-card:hover {
  border-color: var(--edge);
  transform: translateY(-2px);
}

.admin-preview-card h4 {
  margin: 0;
  font-family: var(--title);
  font-size: 16px;
  font-weight: 400;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.preview-lock-tag {
  font-family: var(--body);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(199, 127, 121, 0.2);
  color: #e69d98;
  font-weight: 700;
}

.admin-preview-card p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

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

/* ==========================================================================
   JRS Docs Layout & Style (Tailored for End-User Drivers)
   Matching docs.jrs-core.com Design Tokens & Architecture
   ========================================================================== */
.docs-portal {
  width: 100%;
  animation: fadeIn 0.25s ease;
}

.docs-shell {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 28px;
  width: 100%;
  align-items: start;
}

.docs-sidebar {
  position: sticky;
  top: calc(var(--hdr-h) + 14px);
  max-height: calc(100vh - var(--hdr-h) - 30px);
  overflow-y: auto;
  overscroll-behavior: contain;
  background-color: #121211;
  background-image: var(--card);
  background-position: center;
  background-size: 100% 100%;
  border: 1px solid var(--line2);
  border-radius: 8px;
  padding: 20px 16px;
  scrollbar-width: thin;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.docs-search-box {
  margin-bottom: 20px;
}

.docs-search-input {
  width: 100%;
  background: var(--field);
  border: 1px solid var(--line2);
  border-radius: 6px;
  padding: 9px 14px;
  color: var(--text);
  font-family: inherit;
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.15s ease;
}

.docs-search-input:focus {
  border-color: var(--edge);
}

.docs-sidebar .nav-group {
  margin-bottom: 22px;
}

.docs-sidebar .nav-title {
  font-family: var(--title);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--dim);
  text-transform: uppercase;
  margin: 0 0 8px 6px;
  margin-inline: 6px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.doc-nav-link {
  display: block;
  padding: 9px 14px;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 13.5px;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.15s ease;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.doc-nav-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.doc-nav-link.on {
  color: #fff;
  background-image: var(--tab-on);
  background-color: #9b2828;
  font-weight: 700;
  box-shadow: inset 3px 0 0 var(--edge);
  filter: brightness(1.15);
}

:root[dir=rtl] .doc-nav-link.on {
  box-shadow: inset -3px 0 0 var(--edge);
}

.docs-content {
  display: flex;
  flex-direction: column;
  gap: 28px;
  min-width: 0;
}

.docs-crumb {
  font-family: var(--title);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--dim);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.docs-header-block {
  background-color: #141413;
  background-image: var(--card);
  background-position: center;
  background-size: 100% 100%;
  border: 1px solid var(--line2);
  border-radius: 8px;
  padding: 26px 30px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.docs-title {
  font-family: var(--title);
  font-weight: 400;
  font-size: clamp(24px, 3.5vw, 34px);
  color: var(--text);
  letter-spacing: 0.05em;
  margin: 0 0 10px 0;
  text-shadow: 0 2px 4px #000;
}

.docs-sub {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.65;
  margin: 0;
}

.doc-article {
  background-color: #141413;
  background-image: var(--card);
  background-position: center;
  background-size: 100% 100%;
  border: 1px solid var(--line2);
  border-radius: 8px;
  padding: 28px 32px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  scroll-margin-top: calc(var(--hdr-h) + 24px);
}

.doc-article h2 {
  font-family: var(--title);
  font-size: 22px;
  font-weight: 400;
  color: var(--text);
  margin: 0 0 16px 0;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  letter-spacing: 0.04em;
}

.doc-article h3 {
  font-family: var(--title);
  font-size: 17px;
  font-weight: 400;
  color: #f5f0e8;
  margin: 22px 0 10px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.doc-article p {
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.7;
  margin: 0 0 14px 0;
}

.doc-article ul,
.doc-article ol {
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.7;
  padding-inline-start: 22px;
  margin: 0 0 16px 0;
}

.doc-article li {
  margin-bottom: 8px;
}

.badge-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #9b2828;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  flex: none;
}

.callout {
  display: flex;
  gap: 12px;
  margin: 18px 0;
  padding: 14px 18px;
  border: 1px solid var(--line2);
  border-inline-start: 4px solid var(--edge);
  background: var(--surface);
  border-radius: 6px;
}

.callout b {
  font-family: var(--title);
  font-size: 13px;
  color: var(--text);
  flex: none;
}

.callout > div {
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}

.callout.tip {
  border-inline-start-color: var(--ok);
  background: rgba(157, 181, 167, 0.08);
}

.callout.tip b {
  color: var(--ok);
}

.callout.warning {
  border-inline-start-color: var(--warn);
  background: rgba(217, 189, 126, 0.08);
}

.callout.warning b {
  color: var(--warn);
}

/* ==========================================================================
   User & Driver Portal Styles
   ========================================================================== */
.user-portal {
  width: 100%;
  animation: fadeIn 0.25s ease;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.driver-banner-card {
  background-color: #141413;
  background-image: var(--card);
  background-position: center;
  background-size: 100% 100%;
  border: 1px solid var(--line2);
  border-radius: 8px;
  padding: 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.driver-login-box {
  max-width: 540px;
  margin: 0 auto;
  width: 100%;
}

.driver-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

@media (max-width: 860px) {
  .docs-shell {
    grid-template-columns: 1fr;
  }
  .docs-sidebar {
    position: static;
    max-height: none;
  }
  .driver-dashboard-grid {
    grid-template-columns: 1fr;
  }
}

.driver-countdown-card {
  background: var(--surface);
  border: 1px solid var(--line2);
  border-radius: 6px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 16px 0;
}

.countdown-digits {
  font-family: var(--title);
  font-size: 28px;
  color: #7ee787;
  letter-spacing: 0.04em;
}

.countdown-digits.expired {
  color: var(--danger);
}

.progress-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #9b2828, #7ee787);
  border-radius: 999px;
  transition: width 0.3s ease;
}

.apk-download-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line2);
  border-radius: 6px;
  padding: 16px 20px;
  margin-top: 14px;
}

.apk-badge-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.apk-version-pill {
  font-family: var(--mono);
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(46, 160, 67, 0.2);
  color: #7ee787;
  width: fit-content;
}

.renewal-form-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.global-signout-btn {
  margin-inline-start: 8px;
}
