:root {
  color-scheme: light;
  --ink: #182026;
  --muted: #66727d;
  --line: #d9e0e6;
  --panel: #ffffff;
  --panel-strong: #f7f9fb;
  --brand: #0c7c86;
  --brand-dark: #085a61;
  --accent: #c7532e;
  --danger: #b43333;
  --shadow: 0 20px 60px rgba(24, 32, 38, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  touch-action: manipulation;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  touch-action: manipulation;
  overscroll-behavior-x: none;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(12, 124, 134, 0.12), transparent 34%),
    linear-gradient(315deg, rgba(199, 83, 46, 0.13), transparent 38%),
    #eef3f5;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform 120ms ease, opacity 120ms ease, background-color 120ms ease, box-shadow 120ms ease;
}

button:active {
  transform: scale(0.97);
}

button:focus {
  outline: none;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(12, 124, 134, 0.22);
  outline-offset: 2px;
}

.shell {
  min-height: 100vh;
}

.is-hidden {
  display: none !important;
}

.login-view {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  padding: 24px;
}

.login-panel {
  width: 100%;
  max-width: 460px;
  min-width: 0;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.brand-mark {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: var(--brand);
  color: #fff;
  font-weight: 800;
  font-size: 28px;
}

.brand-mark.image-brand {
  background: rgba(255, 255, 255, 0.92);
  overflow: hidden;
}

.brand-mark.image-brand img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.eyebrow {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  color: var(--brand-dark);
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  font-size: clamp(34px, 8vw, 52px);
  line-height: 1;
}

h2 {
  margin-bottom: 0;
  font-size: 28px;
}

h2 {
  display: flex;
  align-items: center;
  gap: 10px;
}

.title-logo {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 12px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 24px rgba(24, 32, 38, 0.12);
}

h3 {
  margin-bottom: 10px;
  font-size: 22px;
}

.lead,
.hint,
.status-panel p {
  color: var(--muted);
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.login-form,
.form-grid {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 8px;
  font-size: 13px;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 14px;
  background: #fff;
  color: var(--ink);
  font-size: 16px;
  outline: none;
}

input:focus,
textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(12, 124, 134, 0.14);
}

select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 19px, calc(100% - 12px) 19px;
  background-repeat: no-repeat;
  background-size: 6px 6px;
}

.login-error {
  min-height: 20px;
  margin: 0;
  color: var(--danger);
  font-size: 13px;
  font-weight: 700;
}

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

.quick-login button {
  min-width: 0;
  padding-inline: 8px;
}

.login-form .primary-btn {
  width: 100%;
}

.primary-btn,
.secondary-btn,
.ghost-btn,
.danger-btn,
.icon-btn {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  font-weight: 800;
}

.primary-btn {
  padding: 0 18px;
  background: var(--brand);
  color: #fff;
}

.primary-btn:disabled,
.secondary-btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.secondary-btn {
  padding: 0 16px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.password-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
}

.password-toggle {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
  color: var(--brand-dark);
  font: inherit;
  font-size: 12px;
  font-weight: 900;
}

.password-field input {
  margin: 0;
}

.compact-btn {
  min-height: 34px;
  margin-top: 10px;
  padding: 0 12px;
  font-size: 12px;
}

.ghost-btn {
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
}

.danger-btn {
  padding: 0 14px;
  background: #fff0f0;
  color: var(--danger);
}

.icon-btn {
  width: 42px;
  display: inline-grid;
  place-items: center;
  background: var(--brand);
  color: #fff;
  font-size: 26px;
  line-height: 1;
}

.icon-btn.light {
  background: var(--panel-strong);
  color: var(--ink);
}

.portal-view {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 22px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0 22px;
}

.topbar-actions,
.launch-actions,
.app-dialog footer,
.app-dialog header,
.launch-dialog footer,
.launch-dialog header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-badge {
  min-height: 34px;
  display: inline-grid;
  place-items: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 900;
}

.phone-stage {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(320px, 1fr);
  gap: 24px;
  align-items: start;
}

.status-panel {
  position: sticky;
  top: 22px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 16px 44px rgba(24, 32, 38, 0.1);
}

.app-meta {
  margin: 22px 0;
  display: grid;
  gap: 12px;
}

.app-meta div {
  display: grid;
  gap: 4px;
}

dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-weight: 700;
}

.launch-actions {
  flex-wrap: wrap;
}

.phone {
  min-height: calc(100vh - 110px);
  padding: 16px;
  border: 10px solid #1d252b;
  border-radius: 38px;
  background:
    linear-gradient(160deg, rgba(12, 124, 134, 0.18), transparent 34%),
    linear-gradient(20deg, rgba(199, 83, 46, 0.13), transparent 40%),
    #f8fbfc;
  box-shadow: var(--shadow);
}

.phone-top {
  display: flex;
  justify-content: space-between;
  padding: 6px 8px 16px;
  color: #38434b;
  font-size: 13px;
  font-weight: 800;
}

.search-row {
  margin-bottom: 12px;
}

.search-row input {
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
  overflow: visible;
  padding-bottom: 4px;
}

.filter-chip {
  flex: 0 0 auto;
  min-height: 34px;
  border: 1px solid rgba(12, 124, 134, 0.2);
  border-radius: 999px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 900;
}

.filter-chip.is-active {
  background: var(--brand);
  color: #fff;
}

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

.app-tile {
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: center;
  transition: transform 160ms ease;
}

.app-icon {
  position: relative;
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  margin: 0 auto 8px;
  border-radius: 18px;
  background: var(--brand);
  color: #fff;
  overflow: hidden;
  box-shadow: 0 10px 22px rgba(24, 32, 38, 0.18);
  font-size: 24px;
  font-weight: 900;
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.launch-icon,
.launch-overlay-icon {
  position: relative;
}

.icon-fallback {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: grid;
  place-items: center;
  color: #fff;
}

.app-icon img,
.preview-icon img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.launch-icon img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.app-title {
  display: block;
  min-height: 34px;
  font-size: 12px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.app-chip {
  display: inline-grid;
  place-items: center;
  min-height: 20px;
  max-width: 74px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-tile.is-selected .app-icon {
  outline: 4px solid rgba(199, 83, 46, 0.28);
}

.app-tile:active {
  transform: scale(0.96);
}

.app-tile:active .app-icon {
  filter: brightness(1.08);
  transform: scale(1.08);
}

.mobile-dock {
  display: none;
}

.empty-state {
  grid-column: 1 / -1;
  margin: 20px 0;
  color: var(--muted);
  text-align: center;
  font-weight: 800;
}

.app-dialog,
.launch-dialog,
.manage-dialog {
  width: min(680px, calc(100% - 28px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  box-shadow: var(--shadow);
}

.app-dialog::backdrop,
.launch-dialog::backdrop,
.manage-dialog::backdrop {
  background: rgba(15, 24, 32, 0.42);
}

.app-form,
.launch-form,
.manage-form {
  padding: 22px;
}

.app-dialog header,
.app-dialog footer,
.launch-dialog header,
.launch-dialog footer,
.manage-dialog header,
.manage-dialog footer {
  justify-content: space-between;
}

.app-dialog header,
.launch-dialog header,
.manage-dialog header {
  margin-bottom: 18px;
}

.app-dialog footer,
.launch-dialog footer,
.manage-dialog footer {
  margin-top: 18px;
}

.manage-dialog {
  width: min(980px, calc(100% - 28px));
  max-height: calc(100dvh - 28px);
  overflow: hidden;
}

.manage-form {
  max-height: calc(100dvh - 28px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.manage-dialog footer,
.manage-dialog header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.admin-summary div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
}

.admin-summary strong {
  display: block;
  font-size: 24px;
  line-height: 1;
}

.admin-summary span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.admin-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.admin-tools span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.admin-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
}

.admin-tab {
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 900;
}

.admin-tab.is-active {
  background: #fff;
  color: var(--brand-dark);
  box-shadow: 0 6px 18px rgba(24, 32, 38, 0.08);
}

.admin-tab-panel {
  display: none;
}

.admin-tab-panel.is-active {
  display: block;
}

.ops-panel,
.staff-panel {
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
}

.ops-panel {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 14px;
}

.ops-panel strong {
  display: block;
  font-size: 24px;
}

.ops-panel span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.ops-checklist {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ops-checklist li {
  min-height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff1e8;
  color: #a84b12;
  font-size: 11px;
  font-weight: 900;
  text-align: center;
}

.ops-checklist li.is-ok {
  background: #e8f7f4;
  color: var(--brand-dark);
}

.release-panel,
.security-panel,
.backup-panel,
.environment-panel,
.production-metadata-panel,
.production-password-panel,
.production-url-panel,
.ops-action-panel {
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
}

.release-panel h4,
.security-panel h4,
.backup-panel h4,
.environment-panel h4,
.production-metadata-panel h4,
.production-password-panel h4,
.production-url-panel h4,
.ops-action-panel h4 {
  margin: 0;
}

.environment-summary-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.environment-summary-row {
  min-width: 0;
  padding: 10px;
  border: 1px solid #f0d7c8;
  border-radius: 8px;
  background: #fff8f3;
}

.environment-summary-row.is-ok {
  border-color: #cfe9e4;
  background: #f0fbf8;
}

.environment-summary-row span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.environment-summary-row strong {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.45;
}

.access-note.is-ok {
  background: #e8f7f4;
  color: var(--brand-dark);
}

.release-steps {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.release-steps li,
.review-row,
.backup-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

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

.release-steps li > span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff1e8;
  color: #a84b12;
  font-size: 12px;
  font-weight: 900;
}

.release-steps li.is-ok > span {
  background: #e8f7f4;
  color: var(--brand-dark);
}

.release-steps strong,
.review-row strong,
.backup-row strong {
  display: block;
  font-size: 13px;
}

.release-steps small,
.review-row span,
.backup-row span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.5;
}

.backup-restore-btn,
.backup-download-btn {
  min-height: 30px;
}

.release-check-btn {
  min-height: 30px;
  margin-top: 8px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 900;
}

.release-steps li.is-ok .release-check-btn {
  border-color: rgba(12, 124, 134, 0.24);
  background: #e8f7f4;
}

.review-list,
.backup-list,
.production-metadata-list,
.production-password-list,
.production-url-list,
.ops-action-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.production-url-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.42fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  align-items: end;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.production-metadata-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.36fr) minmax(0, 0.5fr) minmax(0, 0.5fr);
  gap: 10px;
  align-items: end;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.production-metadata-row .wide {
  grid-column: 2 / -1;
}

.production-metadata-row strong,
.production-metadata-row span {
  display: block;
  overflow-wrap: anywhere;
}

.production-metadata-row strong {
  font-size: 13px;
}

.production-metadata-row span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.production-metadata-row label {
  gap: 6px;
}

.production-metadata-row input,
.production-metadata-row textarea {
  padding: 10px 11px;
  font-size: 14px;
}

.production-password-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 11px;
  border: 1px solid rgba(199, 83, 46, 0.2);
  border-radius: 8px;
  background: #fff9f5;
}

.production-password-row strong,
.production-password-row span {
  display: block;
  overflow-wrap: anywhere;
}

.production-password-row strong {
  font-size: 13px;
}

.production-password-row span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.production-url-row strong,
.production-url-row span {
  display: block;
  overflow-wrap: anywhere;
}

.production-url-row strong {
  font-size: 13px;
}

.production-url-row span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.production-url-row label {
  gap: 6px;
}

.production-url-row input {
  padding: 10px 11px;
  font-size: 14px;
}

.ops-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.ops-filter-row button {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.ops-filter-row button.is-active {
  border-color: rgba(12, 124, 134, 0.26);
  background: #e8f7f4;
  color: var(--brand-dark);
}

.ops-filter-row span {
  display: inline-grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  margin-left: 4px;
  border-radius: 999px;
  background: rgba(12, 124, 134, 0.1);
  font-size: 11px;
}

.ops-action-row {
  width: 100%;
  display: grid;
  grid-template-columns: 34px minmax(0, 0.42fr) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 11px;
  border: 1px solid rgba(199, 83, 46, 0.24);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.ops-action-row > span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff1e8;
  color: #a84b12;
  font-size: 11px;
  font-weight: 900;
}

.ops-action-row strong {
  min-width: 0;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.ops-action-row small,
.ops-action-empty {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.5;
}

.ops-action-empty {
  padding: 12px;
  border: 1px solid rgba(12, 124, 134, 0.18);
  border-radius: 8px;
  background: #f4fbfa;
  color: var(--brand-dark);
}

.review-row {
  grid-template-columns: minmax(110px, 0.3fr) minmax(0, 1fr);
  border-color: rgba(199, 83, 46, 0.2);
  background: #fff9f5;
}

.review-row.is-ok {
  border-color: rgba(12, 124, 134, 0.18);
  background: #f4fbfa;
}

.share-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
}

.share-panel p {
  margin: 0 0 4px;
}

.share-panel strong {
  display: block;
  overflow-wrap: anywhere;
}

.admin-filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 12px;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.admin-filter-panel label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.admin-filter-panel input,
.admin-filter-panel select,
.staff-form input,
.staff-form select {
  width: 100%;
  min-height: 44px;
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: var(--panel-strong);
  color: var(--text);
  font: inherit;
  font-weight: 800;
}

.staff-panel h4 {
  margin: 0 0 12px;
}

.access-panel {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
}

.access-panel h4 {
  margin: 0;
}

.access-note {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.staff-form {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr)) auto;
  gap: 8px;
  margin-bottom: 12px;
}

.staff-form input,
.staff-form select {
  margin-top: 0;
}

.staff-form .password-field {
  margin-top: 0;
}

.account-issue-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid rgba(12, 124, 134, 0.18);
  border-radius: 8px;
  background: #e8f7f4;
}

.account-issue-card[hidden] {
  display: none;
}

.account-issue-card pre {
  margin: 4px 0 0;
  white-space: pre-wrap;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.7;
}

.user-list {
  display: grid;
  gap: 8px;
}

.user-row {
  display: grid;
  grid-template-columns: minmax(90px, 0.7fr) minmax(0, 1fr) auto auto auto;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #fff;
}

.user-row.has-initial-password {
  border-color: rgba(199, 83, 46, 0.22);
  background: #fff9f5;
}

.user-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.access-matrix {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.access-row {
  display: grid;
  grid-template-columns: minmax(140px, 0.42fr) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.access-user {
  display: grid;
  gap: 4px;
}

.access-user span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.access-apps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.access-pill {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 12px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.access-pill input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--brand);
}

.access-pill.is-allowed {
  border-color: rgba(12, 124, 134, 0.24);
  background: rgba(12, 124, 134, 0.08);
  color: var(--brand-dark);
}

.access-pill.is-locked {
  opacity: 0.7;
}

.admin-issue-panel {
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
}

.admin-issue-list {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
}

.admin-issue-row {
  display: grid;
  grid-template-columns: minmax(110px, 0.8fr) minmax(0, 1fr);
  gap: 10px;
  width: 100%;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #fff;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.admin-issue-row:hover {
  border-color: var(--accent);
}

.admin-issue-row strong {
  color: var(--text);
}

.table-wrap {
  max-height: 360px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.admin-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  background: #fff;
}

.admin-table th,
.admin-table td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 13px;
}

.admin-table th {
  position: sticky;
  top: 0;
  background: var(--panel-strong);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.admin-table td strong,
.admin-table td span {
  display: block;
}

.admin-table td span {
  max-width: 260px;
  margin-top: 4px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.admin-url-list {
  display: grid;
  gap: 4px;
  margin-top: 4px;
}

.admin-url-list span {
  display: flex;
  gap: 6px;
  align-items: flex-start;
  margin-top: 0 !important;
}

.admin-url-list b {
  min-width: 42px;
  color: var(--brand-dark);
  font-size: 11px;
  font-weight: 900;
}

.admin-table .empty-table {
  padding: 22px;
  color: var(--muted);
  text-align: center;
  font-weight: 900;
}

.issue-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}

.issue-badges em {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  border-radius: 999px;
  padding: 0 8px;
  background: #fff1e8;
  color: #a84b12;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.table-edit-btn {
  min-height: 34px;
}

.order-controls {
  display: flex;
  gap: 6px;
}

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

.import-btn {
  display: inline-grid;
  place-items: center;
  padding: 0 16px;
}

.import-input {
  display: none;
}

.url-check-btn {
  min-height: 34px;
}

.url-status {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.url-status.is-checking {
  color: var(--accent);
}

.url-status.is-ok {
  color: var(--brand-dark);
}

.url-status.is-ng {
  color: var(--danger);
}

.launch-log-panel {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
}

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

.panel-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.history-filter {
  margin-bottom: 10px;
}

.history-filter input {
  min-height: 40px;
  background: #fff;
}

.launch-log-list,
.usage-list {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 700;
}

.launch-log-row,
.usage-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px;
  border-radius: 8px;
  background: #fff;
}

.usage-row span {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 900;
}

.usage-row strong {
  flex: 1;
  color: var(--text);
}

.usage-row em {
  color: var(--brand-dark);
  font-style: normal;
  font-weight: 900;
}

.launch-log-row span {
  color: var(--muted);
  font-size: 12px;
}

.launch-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.96), rgba(244, 250, 250, 0.86) 24%, rgba(13, 31, 37, 0.64) 100%);
  color: var(--text);
  opacity: 0;
  pointer-events: none;
  transform: scale(1.04);
  transition: opacity 160ms ease, transform 220ms ease;
}

.launch-overlay.is-active {
  opacity: 1;
  transform: scale(1);
}

.launch-overlay.is-closing {
  opacity: 0;
  transform: scale(1.12);
}

.launch-orbit {
  position: relative;
  width: 138px;
  height: 138px;
  display: grid;
  place-items: center;
}

.launch-orbit span {
  position: absolute;
  inset: 10px;
  border: 2px solid rgba(12, 124, 134, 0.18);
  border-top-color: rgba(12, 124, 134, 0.78);
  border-radius: 50%;
  animation: launchSpin 820ms linear infinite;
}

.launch-orbit span:last-child {
  inset: 0;
  border-color: rgba(199, 83, 46, 0.14);
  border-right-color: rgba(199, 83, 46, 0.62);
  animation-duration: 1100ms;
  animation-direction: reverse;
}

.launch-overlay-icon {
  position: relative;
  z-index: 1;
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 24px;
  background: var(--brand);
  color: #fff;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(12, 124, 134, 0.28);
  font-size: 32px;
  font-weight: 900;
  animation: launchIconPop 680ms cubic-bezier(0.2, 0.9, 0.2, 1) both;
}

.launch-overlay-icon img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.launch-overlay strong {
  font-size: 20px;
  font-weight: 900;
}

.launch-overlay p {
  margin: -6px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

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

@keyframes launchIconPop {
  0% {
    opacity: 0;
    transform: scale(0.62) translateY(16px);
  }

  52% {
    opacity: 1;
    transform: scale(1.08) translateY(0);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.launch-card {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 16px;
  align-items: start;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
}

.launch-icon {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  overflow: hidden;
  background: var(--brand);
  color: #fff;
  font-size: 24px;
  font-weight: 900;
}

.launch-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.launch-card p {
  margin-bottom: 12px;
  color: var(--muted);
  line-height: 1.7;
}

.app-meta.compact {
  margin: 0;
}

.launch-url-options {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.launch-url-option {
  position: relative;
  min-height: 66px;
  display: grid;
  gap: 3px;
  align-content: center;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.launch-url-option strong {
  font-size: 14px;
  font-weight: 900;
}

.launch-url-option span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.launch-url-option em {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(199, 83, 46, 0.1);
  color: var(--accent);
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}

.launch-url-option.is-active {
  border-color: rgba(12, 124, 134, 0.5);
  background: rgba(12, 124, 134, 0.08);
  box-shadow: inset 0 0 0 2px rgba(12, 124, 134, 0.13);
}

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

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

.icon-preview {
  display: grid;
  grid-template-columns: 68px 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
}

.icon-sample-panel {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
}

.app-template-panel {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.app-template-panel h4 {
  margin: 0;
}

.app-template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(86px, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.app-template {
  min-height: 76px;
  display: grid;
  place-items: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 5px;
  background: var(--panel-strong);
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.app-template img {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 8px 18px rgba(24, 32, 38, 0.12);
}

.app-template.is-selected {
  border-color: rgba(12, 124, 134, 0.44);
  background: rgba(12, 124, 134, 0.08);
  color: var(--brand-dark);
  box-shadow: 0 0 0 3px rgba(12, 124, 134, 0.1);
}

.preflight-panel {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
}

.preflight-panel h4 {
  margin: 0;
}

.preflight-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.preflight-row {
  min-height: 58px;
  display: grid;
  align-content: center;
  gap: 3px;
  padding: 9px 10px;
  border: 1px solid rgba(199, 83, 46, 0.2);
  border-radius: 8px;
  background: #fff9f5;
}

.preflight-row.is-ok {
  border-color: rgba(12, 124, 134, 0.18);
  background: #f4fbfa;
}

.preflight-row strong {
  color: var(--ink);
  font-size: 12px;
}

.preflight-row span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.45;
}

.department-panel {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
}

.compact-department-panel {
  margin: 0 0 12px;
}

.department-panel h4 {
  margin: 0;
}

.department-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.department-chip {
  min-height: 32px;
  border: 1px solid rgba(12, 124, 134, 0.2);
  border-radius: 999px;
  padding: 0 12px;
  background: #fff;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 900;
}

.department-chip:active {
  transform: scale(0.96);
}

.icon-sample-panel h4 {
  margin: 0;
}

.icon-sample-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.icon-sample {
  min-width: 0;
  min-height: 78px;
  display: grid;
  place-items: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 5px;
  background: #fff;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.icon-sample img {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 8px 18px rgba(24, 32, 38, 0.12);
}

.icon-sample.is-selected {
  border-color: rgba(12, 124, 134, 0.44);
  background: rgba(12, 124, 134, 0.08);
  color: var(--brand-dark);
  box-shadow: 0 0 0 3px rgba(12, 124, 134, 0.1);
}

.preview-icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  overflow: hidden;
  background: var(--brand);
  color: #fff;
  font-size: 22px;
  font-weight: 900;
}

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

@media (max-width: 820px) {
  html {
    background: #16232b;
  }

  body {
    min-height: 100vh;
    background:
      radial-gradient(circle at 22% 10%, rgba(117, 199, 210, 0.55), transparent 28%),
      radial-gradient(circle at 82% 18%, rgba(255, 196, 132, 0.36), transparent 24%),
      linear-gradient(160deg, #152732 0%, #0f4f57 48%, #18313b 100%);
    color: #fff;
  }

  body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
      linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
      linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
    background-size: 74px 74px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.75), transparent 76%);
  }

  .portal-view {
    width: 100%;
    min-height: 100vh;
    padding: 0 16px 116px;
    overflow-x: hidden;
  }

  .topbar {
    position: relative;
    top: 0;
    z-index: 5;
    align-items: center;
    padding: max(12px, env(safe-area-inset-top)) 0 12px;
    background: transparent;
    backdrop-filter: none;
  }

  .topbar > div:first-child {
    min-width: 0;
  }

  .topbar .eyebrow {
    display: none;
  }

  .topbar h2 {
    color: #fff;
    font-size: 25px;
    line-height: 1.1;
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.22);
  }

  .title-logo {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.18);
  }

  .topbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: auto;
  }

  .topbar-actions .user-badge {
    display: none;
  }

  .topbar-actions .ghost-btn {
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    font-size: 12px;
    backdrop-filter: blur(16px);
  }

  .topbar-actions .icon-btn {
    width: 38px;
    min-height: 38px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    backdrop-filter: blur(16px);
  }

  #logoutBtn {
    display: none;
  }

  #manageAppsBtn,
  #addAppBtn {
    display: none;
  }

  .phone-stage {
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  .status-panel {
    display: none;
  }

  .status-panel::before {
    display: none;
  }

  .status-panel .eyebrow {
    display: none;
  }

  .status-panel h3 {
    margin: 0;
    color: #fff;
    font-size: 16px;
    line-height: 1.2;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.24);
  }

  .status-panel > p {
    display: none;
  }

  .app-meta {
    display: none;
  }

  .launch-actions {
    display: flex;
    gap: 8px;
    grid-column: 2;
    grid-row: 1;
  }

  .launch-actions button {
    width: auto;
    min-height: 42px;
    padding: 0 14px;
    border-radius: 18px;
    font-size: 12px;
  }

  .launch-actions button:nth-child(n + 3) {
    display: none;
  }

  .launch-actions .primary-btn {
    background: rgba(255, 255, 255, 0.92);
    color: var(--brand-dark);
  }

  .launch-actions .secondary-btn {
    border-color: rgba(255, 255, 255, 0.26);
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
  }

  .phone {
    width: 100%;
    max-width: 100%;
    min-height: calc(100dvh - 80px);
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
  }

  .mobile-dock {
    position: fixed;
    left: 50%;
    bottom: calc(12px + env(safe-area-inset-bottom));
    z-index: 15;
    display: flex;
    gap: 10px;
    justify-content: center;
    width: min(286px, calc(100vw - 40px));
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(20px);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
    transform: translateX(-50%);
  }

  .mobile-dock button {
    flex: 1;
    min-height: 38px;
    border: 0;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
    font-size: 12px;
    font-weight: 900;
  }

  body[data-role="staff"] .mobile-dock {
    width: min(118px, calc(100vw - 40px));
  }

  body[data-role="staff"] .mobile-dock button {
    flex: 0 0 100%;
  }

  .mobile-dock button:active,
  .filter-chip:active {
    transform: scale(0.96);
  }

  .phone-top {
    padding: 0 4px 18px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 13px;
  }

  .phone-top span:first-child {
    font-size: 18px;
    font-weight: 900;
  }

  .phone-top span:last-child {
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    font-weight: 800;
  }

  .search-row input {
    min-height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    font-size: 16px;
    backdrop-filter: blur(18px);
    box-shadow: none;
  }

  .search-row input::placeholder {
    color: rgba(255, 255, 255, 0.72);
  }

  .filter-row {
    flex-wrap: nowrap;
    gap: 8px;
    width: calc(100vw - 32px);
    max-width: 100%;
    margin: 0 0 20px;
    padding: 0 0 5px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .filter-row::-webkit-scrollbar {
    display: none;
  }

  .filter-chip {
    min-height: 34px;
    padding: 0 14px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(16px);
  }

  .filter-chip.is-active {
    background: rgba(255, 255, 255, 0.9);
    color: var(--brand-dark);
  }

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

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

  .app-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px 6px;
    align-items: start;
    padding-bottom: 84px;
  }

  .app-tile {
    min-height: 96px;
    padding: 0 2px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #fff;
  }

  .app-tile:active .app-icon {
    transform: scale(0.93);
  }

  .app-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    margin-bottom: 7px;
    background: linear-gradient(145deg, #2d8a92, #1b6b78);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.26);
    transition: transform 120ms ease, box-shadow 120ms ease;
  }

  .app-icon img {
    display: block;
  }

  .category-hr .app-icon {
    background: linear-gradient(145deg, #f06f7d, #c43e61);
  }

  .category-sales .app-icon {
    background: linear-gradient(145deg, #f7a94b, #ce6d24);
  }

  .category-admin .app-icon {
    background: linear-gradient(145deg, #7f8df2, #4654b9);
  }

  .category-share .app-icon {
    background: linear-gradient(145deg, #22a884, #11705e);
  }

  .category-work .app-icon {
    background: linear-gradient(145deg, #38a4b8, #1a6f88);
  }

  .app-title {
    min-height: 30px;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.35;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.34);
  }

  .app-chip {
    display: none;
  }

  .app-tile.is-selected .app-icon {
    outline: none;
  }

  .app-dialog footer {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .app-dialog footer div,
  .launch-dialog footer {
    display: grid;
    gap: 10px;
  }

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

  .launch-dialog {
    align-self: end;
    width: min(100% - 28px, 420px);
    margin-bottom: 64px;
    border-radius: 22px;
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.28);
  }

  .launch-form {
    padding: 18px;
  }

  .launch-form header {
    margin-bottom: 12px;
  }

  .launch-form h3 {
    font-size: 20px;
    margin-bottom: 0;
  }

  .launch-card {
    padding: 12px;
    border-radius: 16px;
  }

  .launch-url-options {
    grid-template-columns: 1fr 1fr;
    gap: 7px;
  }

  .launch-url-option {
    min-height: 58px;
    padding: 9px 10px;
    border-radius: 14px;
  }

  .launch-url-option strong {
    font-size: 13px;
  }

  .launch-url-option span {
    font-size: 11px;
  }

  .launch-url-option em {
    top: 6px;
    right: 6px;
    padding: 2px 6px;
  }

  .launch-icon {
    width: 58px;
    height: 58px;
    border-radius: 16px;
    overflow: hidden;
  }

  .launch-card p {
    margin-bottom: 0;
    font-size: 13px;
  }

  .launch-dialog footer {
    margin-top: 12px;
    grid-template-columns: 1fr 1fr;
  }

  .launch-dialog footer button {
    min-height: 48px;
    border-radius: 16px;
  }

  .launch-dialog::backdrop {
    background: rgba(0, 0, 0, 0.28);
  }

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

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

  .ops-panel,
  .staff-form,
  .user-row,
  .account-issue-card,
  .access-row,
  .review-row,
  .production-metadata-row,
  .production-password-row,
  .production-url-row,
  .backup-row,
  .ops-action-row {
    grid-template-columns: 1fr;
  }

  .production-metadata-row .wide {
    grid-column: auto;
  }

  .release-steps li {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .access-apps {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .access-pill {
    justify-content: flex-start;
    border-radius: 8px;
  }

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

  .admin-filter-panel {
    grid-template-columns: 1fr;
  }

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

  .manage-dialog footer,
  .launch-log-row,
  .usage-row {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 460px) {
  .login-view {
    justify-items: stretch;
    padding: 18px;
  }

  .login-panel {
    width: calc(100vw - 36px);
    max-width: none;
    padding: 24px 20px;
  }

  .login-panel h1 {
    font-size: clamp(30px, 10vw, 38px);
  }

  .login-panel .lead,
  .login-panel .hint {
    font-size: 14px;
  }

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

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

  .portal-view {
    padding: 0 14px 116px;
  }

  .topbar {
    gap: 10px;
  }

  .topbar h2 {
    font-size: clamp(22px, 6.4vw, 25px);
  }

  .title-logo {
    width: clamp(34px, 9.8vw, 38px);
    height: clamp(34px, 9.8vw, 38px);
  }

  .topbar .eyebrow {
    font-size: 11px;
  }

  .topbar-actions {
    min-width: 0;
  }

  .phone {
    border-radius: 0;
    padding: 0;
  }

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

  .app-icon {
    width: clamp(50px, 14.5vw, 58px);
    height: clamp(50px, 14.5vw, 58px);
  }

  .app-tile {
    min-height: 94px;
    padding: 0;
  }

  .launch-actions button {
    padding: 0 12px;
  }
}
