:root {
  color-scheme: light;
  --plum-950: #33002a;
  --plum-800: #600048;
  --plum-600: #83176a;
  --plum-100: #f5e6f0;
  --plum-50: #fbf6fa;
  --sun: #ffb84d;
  --bg: #f8f4f7;
  --surface: #ffffff;
  --border: #eee3eb;
  --text: #2a1626;
  --muted: #766272;
  --ok-bg: #e3f6ea;
  --ok-text: #12703d;
  --wait-bg: #fff2d9;
  --wait-text: #8a5800;
  --bad-bg: #fde9e7;
  --bad-text: #b3261e;
  --shadow-sm: 0 2px 8px rgb(94 0 70 / 6%);
  --shadow-lg: 0 18px 50px rgb(94 0 70 / 14%);
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.7 "IBM Plex Sans Arabic", "Segoe UI", Tahoma, Arial, sans-serif;
}

h1, h2 { margin: 0; line-height: 1.3; }

.muted { color: var(--muted); margin: 0; }

button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 18px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: transform .2s var(--ease), background .2s, border-color .2s, box-shadow .2s, opacity .2s;
}

button:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: var(--plum-600);
  color: var(--plum-800);
}

button:active:not(:disabled) { transform: translateY(0) scale(.98); }
button:disabled { opacity: .5; cursor: default; }

:is(button, input):focus-visible {
  outline: 3px solid color-mix(in srgb, var(--plum-600) 45%, transparent);
  outline-offset: 2px;
}

button.primary {
  position: relative;
  width: 100%;
  padding: 13px 18px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--plum-800), var(--plum-600));
  color: #fff;
  font-weight: 600;
  box-shadow: 0 10px 24px rgb(94 0 70 / 28%);
}

button.primary:hover:not(:disabled) {
  color: #fff;
  box-shadow: 0 14px 30px rgb(94 0 70 / 36%);
}

button.primary:disabled { opacity: .85; }

.spinner {
  display: none;
  width: 17px;
  height: 17px;
  border: 2px solid rgb(255 255 255 / 40%);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

.loading .spinner { display: block; }

button.ghost {
  border-color: rgb(255 255 255 / 35%);
  background: rgb(255 255 255 / 12%);
  color: #fff;
  backdrop-filter: blur(6px);
}

button.ghost:hover:not(:disabled) {
  border-color: #fff;
  background: rgb(255 255 255 / 22%);
  color: #fff;
}

button.spinning svg { animation: spin .9s linear infinite; }

/* Sky decoration shared by the login panel and the dashboard hero */
.sky {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.route {
  fill: none;
  stroke: rgb(255 255 255 / 28%);
  stroke-width: 2;
  stroke-dasharray: 3 11;
  stroke-linecap: round;
}

.plane { fill: var(--sun); }

/* Login */
.login-page {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  min-height: 100vh;
}

.brand-panel {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 48px;
  background: radial-gradient(120% 90% at 85% 10%, var(--plum-600), var(--plum-800) 55%, var(--plum-950));
  color: #fff;
}

.orb {
  position: absolute;
  border-radius: 50%;
  background: rgb(255 255 255 / 7%);
  animation: drift 12s ease-in-out infinite alternate;
}

.orb-one { width: 340px; height: 340px; top: -90px; left: -70px; }
.orb-two { width: 220px; height: 220px; bottom: -50px; right: 8%; animation-delay: -5s; }

.brand-content {
  position: relative;
  max-width: 400px;
  text-align: center;
  animation: rise .9s var(--ease) both;
}

.brand-logo {
  display: block;
  width: 148px;
  height: 148px;
  margin: 0 auto 28px;
  border-radius: 36px;
  object-fit: cover;
  box-shadow: 0 24px 60px rgb(20 0 16 / 45%), 0 0 0 1px rgb(255 255 255 / 18%);
  animation: float 5s ease-in-out infinite;
}

.brand-content h1 { font-size: 46px; font-weight: 700; }

.brand-content p {
  margin: 12px 0 0;
  color: rgb(255 255 255 / 82%);
  font-size: 18px;
}

.login-side {
  display: grid;
  place-items: center;
  padding: 32px 16px;
}

.login-card {
  width: 100%;
  max-width: 400px;
  animation: rise .8s .12s var(--ease) both;
}

.login-card.shake { animation: shake .45s; }

.login-mobile-logo { display: none; }

.login-card h2 { font-size: 30px; font-weight: 700; }

.login-card form { margin-top: 30px; }

label { display: block; margin-bottom: 7px; font-weight: 600; font-size: 14px; }

input {
  display: block;
  width: 100%;
  margin-bottom: 20px;
  padding: 13px 15px;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  transition: border-color .2s, box-shadow .2s;
}

input:hover { border-color: #d9c6d4; }

input:focus {
  border-color: var(--plum-600);
  box-shadow: 0 0 0 4px var(--plum-100);
  outline: none;
}

.form-error {
  margin: 0 0 18px;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--bad-bg);
  color: var(--bad-text);
  font-size: 14px;
  animation: rise .35s var(--ease) both;
}

/* Offline */
.offline-page {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 16px;
}

.offline-card {
  width: 100%;
  max-width: 340px;
  text-align: center;
}

.offline-card img {
  width: 96px;
  height: 96px;
  margin-bottom: 20px;
  border-radius: 24px;
  object-fit: cover;
}

.offline-card h1 { font-size: 24px; }
.offline-card button { margin-top: 24px; }

/* Dashboard */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: calc(10px + env(safe-area-inset-top)) 32px 10px;
  background: rgb(255 255 255 / 86%);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--border);
}

.topbar-brand { display: flex; align-items: center; gap: 12px; font-size: 18px; color: var(--plum-800); }

.topbar-brand img { width: 42px; height: 42px; border-radius: 12px; object-fit: cover; }

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

.topbar-nav { display: flex; gap: 4px; margin-inline-end: auto; margin-inline-start: 20px; }

.topbar-nav a {
  padding: 7px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 500;
  text-decoration: none;
  transition: background .2s, color .2s;
}

.topbar-nav a:hover { background: var(--plum-50); color: var(--plum-800); }
.topbar-nav a.active { background: var(--plum-100); color: var(--plum-800); font-weight: 600; }

.topbar-nav a:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--plum-600) 45%, transparent);
  outline-offset: 2px;
}

button.install {
  border-color: transparent;
  background: var(--plum-100);
  color: var(--plum-800);
}

.install-hint {
  margin: 0;
  padding: 10px 16px;
  background: var(--plum-100);
  color: var(--plum-800);
  font-size: 14px;
  text-align: center;
}

.install-banner {
  position: fixed;
  inset-inline: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 50;
  max-width: 460px;
  margin-inline: auto;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}

.install-banner.open {
  opacity: 1;
  transform: none;
}

.install-head {
  display: flex;
  gap: 12px;
  align-items: center;
}

.install-head strong { color: var(--plum-800); font-size: 16px; }

.install-head p,
.install-manual {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.install-logo {
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
}

.install-steps {
  margin: 12px 0 0;
  padding-inline-start: 22px;
  font-size: 14px;
}

.install-steps li { margin: 2px 0; }

.share-icon {
  display: inline-block;
  width: 18px;
  height: 18px;
  vertical-align: -3px;
  background: var(--plum-800);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v12M7 8l5-5 5 5'/%3E%3Cpath d='M5 12v7a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-7'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v12M7 8l5-5 5 5'/%3E%3Cpath d='M5 12v7a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-7'/%3E%3C/svg%3E") center / contain no-repeat;
}

.install-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.install-actions button { flex: 1; }

.install-now {
  border-color: transparent;
  background: var(--plum-800);
  color: #fff;
}

button.install-now:hover:not(:disabled) { color: #fff; }

.install-later {
  background: var(--plum-50);
  color: var(--plum-800);
}

@media (prefers-reduced-motion: reduce) {
  .install-banner { transition: none; }
}

.avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--plum-100);
  color: var(--plum-800);
  font-weight: 700;
}

.user-meta { display: flex; flex-direction: column; line-height: 1.3; margin-inline-end: 8px; font-weight: 600; }
.user-meta small { font-size: 12px; font-weight: 400; }

.hero {
  position: relative;
  overflow: hidden;
  padding: 36px 32px 92px;
  background: radial-gradient(110% 160% at 90% 0%, var(--plum-600), var(--plum-800) 60%, var(--plum-950));
  color: #fff;
}

.hero-inner {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  max-width: 1400px;
  margin-inline: auto;
  animation: rise .6s var(--ease) both;
}

.hero h1 { font-size: 30px; font-weight: 700; }

.hero p { margin: 6px 0 0; min-height: 1.7em; color: rgb(255 255 255 / 82%); }

.content {
  position: relative;
  max-width: 1464px;
  margin: -60px auto 0;
  padding: 0 32px 40px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 104px;
  padding: 18px 20px;
  border-top: 3px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  transition: transform .25s var(--ease);
}

.stat:hover { transform: translateY(-3px); }

.stat strong {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.stat span { color: var(--muted); }

.stat.total { border-top-color: var(--plum-800); }
.stat.total strong { color: var(--plum-800); }
.stat.money { border-top-color: var(--plum-600); }
.stat.money strong { color: var(--plum-600); }
.stat.ok { border-top-color: var(--ok-text); }
.stat.wait { border-top-color: var(--sun); }
.stat.bad { border-top-color: var(--bad-text); }

.stat-in {
  animation: rise .55s var(--ease) both;
  animation-delay: calc(var(--i) * 70ms);
}

.banner-error {
  margin: 0 0 18px;
  padding: 14px 18px;
  border-radius: 14px;
  background: var(--bad-bg);
  color: var(--bad-text);
  box-shadow: var(--shadow-sm);
  animation: rise .35s var(--ease) both;
}

.table-wrap {
  overflow-x: auto;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

table { width: 100%; border-collapse: collapse; }

th, td {
  padding: 14px 16px;
  text-align: start;
  white-space: nowrap;
}

th {
  background: var(--plum-50);
  color: var(--plum-800);
  font-size: 13px;
  font-weight: 600;
}

tbody tr { transition: background .18s; }
tbody td { border-top: 1px solid var(--border); }
tbody tr:hover { background: var(--plum-50); }

.row-in {
  animation: row-in .42s var(--ease) both;
  animation-delay: calc(var(--i) * 24ms);
}

.num { font-variant-numeric: tabular-nums; }
.strong { font-weight: 600; }
.discount { color: var(--ok-text); font-weight: 600; }

.code-chip {
  display: inline-block;
  padding: 3px 12px;
  border: 1.5px dashed color-mix(in srgb, var(--plum-600) 45%, transparent);
  border-radius: 9px;
  background: var(--plum-50);
  color: var(--plum-800);
  direction: ltr;
  font-family: Consolas, "Cascadia Mono", monospace;
  font-size: 14px;
  font-weight: 700;
}

.table-message { padding: 52px 16px; color: var(--muted); text-align: center; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--plum-100);
  color: var(--plum-800);
  font-size: 13px;
  font-weight: 600;
}

.badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.badge.ok { background: var(--ok-bg); color: var(--ok-text); }
.badge.wait { background: var(--wait-bg); color: var(--wait-text); }
.badge.bad { background: var(--bad-bg); color: var(--bad-text); }

.hero-compact { padding-bottom: 88px; }

.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }

.chip {
  padding: 2px 11px;
  border-radius: 999px;
  background: var(--plum-50);
  color: var(--plum-800);
  font-size: 13px;
  font-weight: 500;
}

.user-dialog {
  width: min(780px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 0;
  border-radius: 20px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-lg);
  font-size: 14px;
}

.user-dialog[open] { animation: rise .35s var(--ease) both; }
.user-dialog::backdrop { background: rgb(51 0 42 / 45%); backdrop-filter: blur(3px); }

.dialog-head {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 18px 24px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.dialog-head h2 { margin: 0 0 12px; font-size: 18px; }

.steps { display: flex; gap: 8px; }

.step-tab {
  flex: 1;
  justify-content: flex-start;
  padding: 7px 12px;
  border-color: transparent;
  border-radius: 12px;
  background: var(--plum-50);
  color: var(--muted);
  font-size: 13px;
}

.step-tab:hover:not(:disabled) { transform: none; border-color: transparent; }

.step-number {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--surface);
  font-size: 12px;
  font-weight: 700;
}

.step-tab.active { background: var(--plum-100); color: var(--plum-800); font-weight: 600; }
.step-tab.active .step-number { background: var(--plum-800); color: #fff; }

.dialog-step { padding: 16px 24px 20px; }

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

.field.wide { grid-column: 1 / -1; }

.user-dialog label { margin-bottom: 5px; font-size: 12.5px; }
.required { color: var(--bad-text); }

.user-dialog :is(input:not([type="checkbox"]), select, textarea) {
  margin: 0;
  padding: 9px 12px;
  border-radius: 11px;
  font-size: 14px;
}

select, textarea {
  display: block;
  width: 100%;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font: inherit;
}

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

:is(select, textarea):focus {
  border-color: var(--plum-600);
  box-shadow: 0 0 0 4px var(--plum-100);
  outline: none;
}

.field-help { margin: 4px 0 0; color: var(--muted); font-size: 12px; }

.permissions { margin: 16px 0 0; padding: 0; border: 0; }
.permissions legend { margin-bottom: 8px; padding: 0; font-size: 12.5px; font-weight: 600; }

label.check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
}

label.check input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--plum-800);
}

.linked-codes { margin: 12px 0 14px; }
.linked-title { display: block; margin-bottom: 6px; font-size: 12.5px; font-weight: 600; }
.linked-codes .muted { font-size: 13px; }

.code-list { display: flex; flex-wrap: wrap; gap: 6px; }
.code-list:empty { display: none; }

.code-chip.removable { display: inline-flex; align-items: center; gap: 8px; }

.chip-action {
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--plum-800);
  font-size: 16px;
  line-height: 1;
}

.promo-form {
  padding: 14px;
  border: 1.5px dashed var(--border);
  border-radius: 14px;
  background: var(--plum-50);
}

.promo-form .form-error { margin: 12px 0 0; }

.promo-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.promo-actions button:not(.secondary) { padding: 8px 16px; border-radius: 11px; font-size: 13.5px; }

.promo-form .linked-title { margin-bottom: 10px; }
.code-chip.editing { border-style: solid; background: var(--plum-100); }
.user-dialog input[readonly] { background: var(--bg); color: var(--muted); }

.form-success {
  margin: 12px 0 0;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--ok-bg);
  color: var(--ok-text);
  font-size: 13px;
}

.row-actions { display: flex; gap: 6px; }
.row-actions button { padding: 6px 14px; font-size: 13px; }

button.secondary {
  padding: 8px 18px;
  border-color: transparent;
  border-radius: 11px;
  background: var(--plum-800);
  color: #fff;
  font-size: 13.5px;
}

button.secondary:hover:not(:disabled) { border-color: transparent; background: var(--plum-600); color: #fff; }

.user-dialog .form-error { font-size: 13px; }

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.dialog-actions button { padding: 9px 20px; border-radius: 12px; font-size: 14px; }
.dialog-actions .primary { width: auto; min-width: 130px; box-shadow: none; }

@media (max-width: 600px) {
  .form-grid { grid-template-columns: 1fr; }
  .dialog-head, .dialog-step { padding-inline: 16px; }
  .step-tab { font-size: 12px; padding: 6px 8px; }
}

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 20px;
}

.skeleton {
  display: block;
  width: 72%;
  min-width: 48px;
  height: 14px;
  border-radius: 7px;
  background: linear-gradient(100deg, var(--plum-100) 30%, var(--plum-50) 50%, var(--plum-100) 70%);
  background-size: 220% 100%;
  animation: shimmer 1.3s linear infinite;
}

.stat .skeleton:first-child { width: 42%; height: 30px; margin-bottom: 10px; }

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

@keyframes row-in {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes float {
  50% { transform: translateY(-10px); }
}

@keyframes drift {
  to { transform: translate(34px, 26px) scale(1.08); }
}

@keyframes shimmer {
  to { background-position: -220% 0; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes shake {
  20%, 60% { transform: translateX(-7px); }
  40%, 80% { transform: translateX(7px); }
}

@media (max-width: 860px) {
  .login-page { grid-template-columns: 1fr; }
  .brand-panel { display: none; }

  .login-mobile-logo {
    display: block;
    width: 84px;
    height: 84px;
    margin-bottom: 20px;
    border-radius: 22px;
    object-fit: cover;
    box-shadow: 0 14px 34px rgb(94 0 70 / 30%);
  }
}

@media (max-width: 760px) {
  .topbar { padding-inline: 16px; }
  .user-meta, .avatar { display: none; }
  .topbar { flex-wrap: wrap; row-gap: 8px; }
  .topbar-nav { order: 3; width: 100%; margin-inline: 0; }
  .topbar-nav a { flex: 1; text-align: center; font-size: 14px; }
  tbody td .chips { justify-content: flex-end; }
  .topbar-brand strong { white-space: nowrap; }
  .topbar-user button { padding: 6px 12px; font-size: 13px; white-space: nowrap; }
  .hero { padding: 26px 16px 84px; }
  .hero h1 { font-size: 24px; }
  .content { padding: 0 16px 32px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .stat { min-height: 92px; padding: 14px 16px; }
  .stat strong { font-size: 26px; }

  .table-wrap { overflow: visible; background: none; box-shadow: none; }
  table, tbody, tr, td { display: block; }
  thead { display: none; }

  tbody tr {
    margin-bottom: 12px;
    padding: 6px 16px;
    border-radius: 16px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
  }

  tbody tr:hover { background: var(--surface); }
  tbody td { border-top: 0; }

  tbody td[data-label] {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 8px 0;
    white-space: normal;
    text-align: end;
  }

  tbody td[data-label]:not(:first-child) { border-top: 1px solid var(--border); }

  tbody td[data-label]::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
    text-align: start;
  }

  tbody td.table-message { display: block; padding: 40px 0; text-align: center; }
  tbody td.table-message::before { content: none; }
  tbody td:has(.skeleton) { padding: 9px 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }

  .plane { display: none; }
}

/* Password change */
.topbar-link {
  color: var(--plum-800);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.topbar-link:hover { text-decoration: underline; }

.password-page {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px 16px;
}

.password-card {
  padding: 32px;
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.password-logo {
  width: 64px;
  height: 64px;
  margin-bottom: 16px;
  border-radius: 18px;
  object-fit: cover;
}

.password-card h2 { font-size: 24px; }
.password-card form { margin-top: 22px; }
.password-card input { margin-bottom: 14px; }
.password-help { margin: -6px 0 16px; }

.first-login {
  margin: 10px 0 0;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--wait-bg);
  color: var(--wait-text);
  font-size: 14px;
}

.password-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 18px;
  font-size: 14px;
}

.password-links a { color: var(--plum-800); }

.link-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 14px;
  text-decoration: underline;
}

.link-button:hover:not(:disabled) { transform: none; color: var(--plum-800); }

@media (max-width: 760px) {
  .topbar-link { font-size: 13px; }
  .password-card { padding: 24px 18px; }
}

.username-cell { direction: ltr; text-align: end; color: var(--muted); font-family: Consolas, "Cascadia Mono", monospace; font-size: 13.5px; }
