/* ==========================================================================
   Autho — shared design system
   Used by pages that opt into the new "app.html" shell (see templates/widgets/app.html).
   Do not add page-specific rules here — see .claude/commands/update-dev-guidelines.md.
   ========================================================================== */

:root {
  /* Color */
  --color-bg: #f7f8fa;
  --color-surface: #ffffff;
  --color-surface-sunken: #f1f3f6;
  --color-border: #e4e8ee;
  --color-border-strong: #d3d9e2;

  --color-ink: #1e2a5a;
  --color-ink-700: #2b3868;
  --color-ink-100: #eceff8;

  --color-accent: #2dd4bf;
  --color-accent-600: #17b3a0;
  --color-accent-100: #e3faf7;

  --color-text: #1b2333;
  --color-text-muted: #6b7688;
  --color-text-faint: #99a2b3;

  --color-success: #1a9c6b;
  --color-success-100: #e5f7ef;
  --color-danger: #d1453b;
  --color-danger-100: #fbe9e8;
  --color-warning: #b5720a;
  --color-warning-100: #fdf1de;

  /* Type */
  --font-sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Shape */
  --radius-sm: 7px;
  --radius-md: 11px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  /* Elevation */
  --shadow-sm: 0 1px 2px rgba(30, 42, 90, 0.05);
  --shadow-md: 0 6px 20px rgba(30, 42, 90, 0.07);
  --shadow-focus: 0 0 0 3px var(--color-accent-100);

  /* Motion */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ---------- Reset ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 14.5px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
}

::selection {
  background: var(--color-accent-100);
  color: var(--color-ink);
}

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

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

/* ---------- Layout shell ---------- */

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

.sidebar {
  width: 248px;
  flex: 0 0 248px;
  background: var(--color-surface);
  border-right: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 20;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 22px 22px 18px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
  color: var(--color-ink);
}

.sidebar-brand-mark {
  width: 30px;
  height: 30px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  background: var(--color-ink);
  color: var(--color-accent);
}

.sidebar-nav {
  list-style: none;
  margin: 0;
  padding: 8px 12px;
  flex: 1;
  overflow-y: auto;
}

.sidebar-section-label {
  padding: 16px 10px 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-faint);
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  margin-bottom: 2px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--color-text-muted);
  transition: background-color 0.15s var(--ease), color 0.15s var(--ease);
}

.sidebar-link svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.sidebar-link:hover {
  background: var(--color-surface-sunken);
  color: var(--color-text);
}

.sidebar-link.is-active {
  background: var(--color-ink-100);
  color: var(--color-ink);
}

.sidebar-foot {
  padding: 12px;
  border-top: 1px solid var(--color-border);
}

.main {
  flex: 1;
  margin-left: 248px;
  min-width: 0;
}

/* Sidebar-less shell, for single-surface portals (e.g. the account/customer app). */
.main-solo {
  flex: 1;
  min-width: 0;
}

.main-solo .content {
  max-width: 1040px;
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 32px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg);
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar-title h1 {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--color-ink);
}

.topbar-title p {
  margin-top: 2px;
  font-size: 13px;
  color: var(--color-text-muted);
}

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

.god-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 6px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text);
}

.god-chip-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--color-ink);
  color: var(--color-accent);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 600;
}

.content {
  padding: 28px 32px 56px;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background-color 0.15s var(--ease), border-color 0.15s var(--ease), transform 0.05s var(--ease);
  white-space: nowrap;
}

.btn svg {
  width: 16px;
  height: 16px;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--color-ink);
  color: #fff;
}

.btn-primary:hover {
  background: var(--color-ink-700);
}

.btn-secondary {
  background: var(--color-surface);
  border-color: var(--color-border-strong);
  color: var(--color-text);
}

.btn-secondary:hover {
  border-color: var(--color-ink);
  color: var(--color-ink);
}

.btn-ghost {
  background: transparent;
  color: var(--color-text-muted);
}

.btn-ghost:hover {
  background: var(--color-surface-sunken);
  color: var(--color-text);
}

.btn-danger {
  background: transparent;
  border-color: var(--color-border-strong);
  color: var(--color-danger);
}

.btn-danger:hover {
  background: var(--color-danger-100);
  border-color: var(--color-danger);
}

.btn-sm {
  height: 32px;
  padding: 0 12px;
  font-size: 12.5px;
}

.btn-icon {
  width: 34px;
  height: 34px;
  padding: 0;
}

.btn:disabled {
  opacity: 0.55;
  cursor: default;
  pointer-events: none;
}

/* ---------- Segmented control (e.g. Encode / Decode mode switches) ---------- */

.segmented {
  display: inline-flex;
  flex: none;
  padding: 3px;
  gap: 2px;
  background: var(--color-surface-sunken);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
}

.segmented-btn {
  height: 32px;
  padding: 0 16px;
  border: none;
  border-radius: var(--radius-pill);
  background: transparent;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: background-color 0.15s var(--ease), color 0.15s var(--ease);
}

.segmented-btn:hover {
  color: var(--color-text);
}

.segmented-btn.is-active {
  background: var(--color-ink);
  color: #fff;
}

/* ---------- Forms ---------- */

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

.field-label {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--color-text-muted);
}

.field-label .required {
  color: var(--color-danger);
  margin-left: 2px;
}

.field-hint {
  font-size: 12px;
  color: var(--color-text-faint);
}

.input,
.select,
.textarea {
  width: 100%;
  height: 40px;
  padding: 0 13px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 13.5px;
  color: var(--color-text);
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}

.textarea {
  height: auto;
  min-height: 96px;
  padding: 10px 13px;
  resize: vertical;
}

.input::placeholder {
  color: var(--color-text-faint);
}

.input:hover,
.select:hover,
.textarea:hover {
  border-color: var(--color-text-faint);
}

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

.input:disabled {
  background: var(--color-surface-sunken);
  color: var(--color-text-muted);
}

.input-mono {
  font-family: var(--font-mono);
  font-size: 13px;
}

.input-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.input-group .input {
  flex: 1;
  min-width: 0;
}

.input-group .btn {
  height: 40px;
  flex: none;
}

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

.form-grid .field-full {
  grid-column: 1 / -1;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--color-border);
}

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
}

.checkbox-field input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: var(--color-ink);
  cursor: pointer;
}

.checkbox-field label {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--color-text);
  cursor: pointer;
}

/* ---------- Card ---------- */

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--color-border);
}

.card-header h2 {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-ink);
}

.card-header p {
  margin-top: 2px;
  font-size: 12.5px;
  color: var(--color-text-muted);
}

.card-body {
  padding: 24px;
}

.card-body-flush {
  padding: 0;
}

/* ---------- Table ---------- */

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

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

.table th {
  text-align: left;
  padding: 12px 24px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-text-faint);
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
}

.table td {
  padding: 14px 24px;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text);
  vertical-align: middle;
}

.table tbody tr:last-child td {
  border-bottom: none;
}

.table tbody tr.is-linked {
  cursor: pointer;
  transition: background-color 0.12s var(--ease);
}

.table tbody tr.is-linked:hover {
  background: var(--color-surface-sunken);
}

.table td.is-numeric {
  font-variant-numeric: tabular-nums;
}

/* ---------- Badge ---------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  background: var(--color-ink-100);
  color: var(--color-ink);
}

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

.badge-success {
  background: var(--color-success-100);
  color: var(--color-success);
}

.badge-danger {
  background: var(--color-danger-100);
  color: var(--color-danger);
}

.badge-warning {
  background: var(--color-warning-100);
  color: var(--color-warning);
}

.badge-neutral {
  background: var(--color-surface-sunken);
  color: var(--color-text-muted);
}

/* ---------- Key chip (signature component) ---------- */
/* license keys, tokens and ids render as a "physical key" pill: mono type,
   a die-cut notch on the left like a key head, and a copy action. */

.key-chip {
  display: inline-flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-pill);
  background: var(--color-surface-sunken);
  overflow: hidden;
  max-width: 100%;
}

.key-chip-head {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  background: var(--color-ink);
  color: var(--color-accent);
}

.key-chip-head svg {
  width: 14px;
  height: 14px;
}

.key-chip-value {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--color-text);
  padding: 0 6px 0 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.key-chip-copy {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  border: none;
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: color 0.15s var(--ease), background-color 0.15s var(--ease);
}

.key-chip-copy:hover {
  background: var(--color-border);
  color: var(--color-ink);
}

.key-chip-copy svg {
  width: 14px;
  height: 14px;
  transition: transform 0.2s var(--ease);
}

.key-chip-copy.is-copied {
  color: var(--color-accent-600);
}

.key-chip-copy.is-copied svg {
  transform: scale(1.15);
}

/* ---------- Stat card ---------- */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.stat-card {
  display: block;
  padding: 22px 24px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s var(--ease), transform 0.15s var(--ease), box-shadow 0.15s var(--ease);
}

a.stat-card:hover {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.stat-card-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  background: var(--color-ink-100);
  color: var(--color-ink);
  margin-bottom: 16px;
}

.stat-card-icon svg {
  width: 18px;
  height: 18px;
}

.stat-card-value {
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--color-ink);
  font-variant-numeric: tabular-nums;
}

.stat-card-label {
  margin-top: 4px;
  font-size: 13px;
  color: var(--color-text-muted);
}

.stat-card-link {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--color-accent-600);
}

.stat-card-link svg {
  width: 14px;
  height: 14px;
  transition: transform 0.15s var(--ease);
}

a.stat-card:hover .stat-card-link svg {
  transform: translateX(2px);
}

/* ---------- Usage bar ---------- */

.usage-bar {
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--color-surface-sunken);
  overflow: hidden;
}

.usage-bar-fill {
  height: 100%;
  background: var(--color-accent);
  border-radius: var(--radius-pill);
  transition: width 0.3s var(--ease);
}

.usage-bar-fill.is-full {
  background: var(--color-warning);
}

/* ---------- License card ---------- */

.license-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}

.license-card {
  padding: 22px 24px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.15s var(--ease), border-color 0.15s var(--ease);
}

.license-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--color-border-strong);
}

.license-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.license-card-title {
  font-size: 15.5px;
  font-weight: 600;
  color: var(--color-ink);
}

.license-card-usage {
  margin: 18px 0 4px;
}

.license-card-usage-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-size: 12px;
  color: var(--color-text-muted);
  margin-bottom: 7px;
}

.license-card-usage-label strong {
  font-variant-numeric: tabular-nums;
  color: var(--color-text);
  font-weight: 600;
}

.license-card-key {
  margin-top: 16px;
}

.license-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 18px;
}

.license-card-actions .btn {
  flex: 1;
}

/* ---------- Device list (mobile alternative to the devices table) ---------- */

.device-list {
  display: flex;
  flex-direction: column;
}

.device-card {
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-border);
}

.device-card:last-child {
  border-bottom: none;
}

.device-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.device-card-ip {
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--color-ink);
}

.device-card-date {
  font-size: 12px;
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.device-card-field {
  margin-top: 12px;
}

.device-card-field:first-of-type {
  margin-top: 0;
}

/* ---------- Flash / alert ---------- */

.flash {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: 13.5px;
  font-weight: 500;
  margin-bottom: 20px;
  opacity: 0;
  transform: translateY(-4px);
  animation: flash-in 0.25s var(--ease) forwards;
}

@keyframes flash-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.flash svg {
  width: 17px;
  height: 17px;
  flex: none;
  margin-top: 1px;
}

.flash-info {
  background: var(--color-ink-100);
  border-color: var(--color-ink-100);
  color: var(--color-ink);
}

.flash-success {
  background: var(--color-success-100);
  color: var(--color-success);
}

.flash-danger {
  background: var(--color-danger-100);
  color: var(--color-danger);
}

/* Reusable entrance for content that appears in place (e.g. a tool result panel), sharing the
   flash message's fade-and-lift so revealed content reads as intentional, not a layout jump.
   Needs "forwards": .flash's base style is opacity:0 (it normally relies on its own "forwards"
   animation to stay visible) — without it here too, the element snaps back to invisible the
   instant this animation ends. */
.reveal-in {
  animation: flash-in 0.22s var(--ease) forwards;
}

/* ---------- Steps (ordered process lists) ---------- */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
}

.step {
  counter-increment: step;
  display: flex;
  gap: 16px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--color-border);
}

.step:last-child {
  border-bottom: none;
}

.step::before {
  content: counter(step);
  flex: none;
  width: 26px;
  height: 26px;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--color-ink-100);
  color: var(--color-ink);
  font-size: 12px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.step-body {
  padding-top: 3px;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--color-text);
}

.step-body code {
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--color-surface-sunken);
  padding: 1px 6px;
  border-radius: 4px;
}

/* ---------- Empty state ---------- */

.empty-state {
  padding: 56px 24px;
  text-align: center;
  color: var(--color-text-muted);
}

.empty-state svg {
  width: 32px;
  height: 32px;
  margin-bottom: 12px;
  color: var(--color-text-faint);
}

.empty-state h3 {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 4px;
}

.empty-state p {
  font-size: 13px;
  max-width: 360px;
  margin: 0 auto;
}

/* ---------- Auth (login) shell ---------- */

.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
  background: var(--color-bg);
}

.auth-circuit {
  position: absolute;
  inset: 0;
  opacity: 0.5;
  pointer-events: none;
}

.auth-card {
  position: relative;
  width: 100%;
  max-width: 380px;
}

.auth-mark {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  margin-bottom: 28px;
}

.auth-mark-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  background: var(--color-ink);
  color: var(--color-accent);
}

.auth-mark-icon svg {
  width: 18px;
  height: 18px;
}

.auth-mark span {
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.01em;
  color: var(--color-ink);
}

.auth-panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 32px;
}

.auth-panel h1 {
  font-size: 18px;
  font-weight: 600;
  color: var(--color-ink);
  margin-bottom: 4px;
}

.auth-panel p.auth-sub {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-bottom: 24px;
}

.auth-footnote {
  margin-top: 20px;
  text-align: center;
  font-size: 12px;
  color: var(--color-text-faint);
}

/* ---------- Utility ---------- */

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

.section-heading h2 {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-ink);
}

.text-muted {
  color: var(--color-text-muted);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.mobile-only {
  display: none;
}

@media (max-width: 900px) {
  .sidebar {
    display: none;
  }

  .main {
    margin-left: 0;
  }

  .stat-grid,
  .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Phone-width: the account/customer pages (login, home, activation) are the ones a customer
   actually opens on a phone — a QR-scanning flow is mobile-first by nature. */
@media (max-width: 600px) {
  .topbar {
    padding: 14px 16px;
    gap: 10px;
  }

  .topbar-title h1 {
    font-size: 16px;
  }

  .topbar-title p {
    font-size: 12px;
  }

  .content,
  .main-solo .content {
    padding: 18px 16px 40px;
  }

  .card-header {
    padding: 16px 18px;
    flex-wrap: wrap;
  }

  .card-header .btn {
    width: 100%;
  }

  .card-body {
    padding: 18px;
  }

  .btn {
    height: 44px;
  }

  .btn-sm {
    height: 40px;
  }

  .form-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .form-actions .btn {
    width: 100%;
  }

  .license-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .license-card {
    padding: 18px 20px;
  }

  .license-card-actions {
    flex-direction: column;
    gap: 10px;
  }

  .license-card-actions .btn {
    flex: none;
    height: 44px;
    font-size: 13.5px;
  }

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

  .mobile-only {
    display: block;
  }

  .desktop-only {
    display: none;
  }
}
