/* HostKB Managed Databases — visual system */
:root {
  --ink: #0c1222;
  --ink-soft: #1e293b;
  --muted: #64748b;
  --line: rgba(15, 23, 42, 0.08);
  --surface: rgba(255, 255, 255, 0.78);
  --surface-solid: #ffffff;
  --teal: #0f766e;
  --teal-deep: #0a5c56;
  --teal-soft: #ccfbf1;
  --amber: #d97706;
  --danger: #b91c1c;
  --ok: #15803d;
  --warn: #a16207;
  --info: #0369a1;
  --radius: 14px;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
  --font-display: "Sora", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  height: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(15, 118, 110, 0.14), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(217, 119, 6, 0.08), transparent 50%),
    linear-gradient(180deg, #f4f7f6 0%, #eef2f1 45%, #f8faf9 100%);
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
  z-index: 0;
}

.site-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-main {
  flex: 1;
  width: min(1120px, calc(100% - 1.5rem));
  margin: 0 auto;
  padding: 1rem 0 2.5rem;
}

@media (min-width: 576px) {
  .site-main {
    width: min(1120px, calc(100% - 2rem));
    padding: 1.25rem 0 3rem;
  }
}

/* —— Nav —— */
.topnav {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(14px);
  background: rgba(255, 255, 255, 0.72);
  border-bottom: 1px solid var(--line);
}

.topnav-inner {
  position: relative;
  width: min(1120px, calc(100% - 1.5rem));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 3.75rem;
}

@media (min-width: 576px) {
  .topnav-inner {
    width: min(1120px, calc(100% - 2rem));
    gap: 1rem;
    min-height: 4rem;
  }
}

.topnav-brand-group {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.back-to-hostkb {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  text-decoration: none;
  color: var(--teal-deep);
  font-size: 0.88rem;
  font-weight: 650;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: var(--teal-soft);
  white-space: nowrap;
  transition: background 0.15s ease, transform 0.15s ease;
}

.back-to-hostkb:hover {
  background: #99f6e4;
  transform: translateX(-1px);
}

.back-to-hostkb-arrow {
  font-size: 1rem;
  line-height: 1;
}

.topnav-divider {
  width: 1px;
  height: 1.4rem;
  background: var(--line);
  flex-shrink: 0;
}

.nav-link-hostkb {
  color: var(--teal-deep) !important;
  font-weight: 650 !important;
}

.site-footer a {
  color: var(--teal-deep);
  text-decoration: none;
  font-weight: 500;
}

.site-footer a:hover {
  text-decoration: underline;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.45rem;
  text-decoration: none;
  color: var(--ink);
}

.brand-mark {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.04em;
  font-size: 1.2rem;
}

.brand-mark span {
  color: var(--teal);
}

.brand-product {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-links a:hover {
  background: rgba(15, 118, 110, 0.08);
  color: var(--teal-deep);
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 2.75rem;
  min-height: 2.75rem;
  border: 1px solid var(--line);
  background: var(--surface-solid);
  border-radius: 10px;
  padding: 0.4rem 0.65rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
}

.nav-toggle:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

@media (max-width: 767.98px) {
  .nav-toggle {
    display: inline-flex;
  }

  .brand-product {
    display: none;
  }

  .topnav-brand-group {
    gap: 0.45rem;
    min-width: 0;
  }

  .back-to-hostkb {
    padding: 0.3rem 0.5rem;
    font-size: 0.8rem;
  }

  .nav-links {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 0.35rem);
    flex-direction: column;
    align-items: stretch;
    background: var(--surface-solid);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0.45rem;
    box-shadow: var(--shadow);
    z-index: 50;
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a {
    padding: 0.75rem 0.9rem;
    border-radius: 10px;
  }
}

/* —— Typography / motion —— */
.page-enter {
  animation: rise 0.55s ease both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

h1, h2, h3, .display {
  font-family: var(--font-display);
  letter-spacing: -0.03em;
  color: var(--ink);
}

.lead {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.55;
  max-width: 36rem;
}

/* —— Hero (landing) —— */
.hero {
  display: grid;
  gap: 1.25rem;
  padding: 1.5rem 0 1rem;
  min-height: auto;
  align-content: center;
}

@media (min-width: 768px) {
  .hero {
    gap: 1.5rem;
    padding: 2.5rem 0 1rem;
    min-height: min(70vh, 560px);
  }
}

.hero-brand {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 3.8rem);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1.05;
  margin: 0;
}

.hero-brand em {
  font-style: normal;
  color: var(--teal);
}

.hero-copy {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 28rem;
  margin: 0;
  line-height: 1.5;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.hero-plane {
  margin-top: 1rem;
  height: 120px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.18), rgba(15, 23, 42, 0.04) 40%, rgba(217, 119, 6, 0.12)),
    repeating-linear-gradient(
      -12deg,
      transparent,
      transparent 12px,
      rgba(255, 255, 255, 0.35) 12px,
      rgba(255, 255, 255, 0.35) 13px
    );
  box-shadow: var(--shadow);
  animation: fade-in 1s ease 0.15s both;
  position: relative;
  overflow: hidden;
}

@media (min-width: 576px) {
  .hero-plane {
    margin-top: 1.5rem;
    height: 160px;
  }
}

.hero-plane::after {
  content: "PostgreSQL  ·  MySQL";
  position: absolute;
  left: 1.25rem;
  bottom: 1.1rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.7);
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
}

/* —— Panels / forms —— */
.panel {
  background: var(--surface);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem 1.05rem;
}

@media (min-width: 576px) {
  .panel {
    padding: 1.25rem 1.35rem;
  }
}

.panel-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 650;
  margin: 0 0 0.35rem;
}

.panel-sub {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 1rem;
}

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem 1rem;
  margin-bottom: 1.1rem;
}

@media (min-width: 576px) {
  .page-head {
    align-items: flex-end;
    margin-bottom: 1.25rem;
  }
}

.page-head h1,
.page-head h2 {
  margin: 0;
  font-size: clamp(1.4rem, 4.2vw, 2rem);
  word-break: break-word;
}

.page-head h1 .instance-connect-name {
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
  font-weight: 700;
  font-size: inherit;
  color: var(--ink);
  background: transparent;
  padding: 0;
}

.page-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.page-head-actions .btn {
  flex: 1 1 auto;
}

@media (min-width: 576px) {
  .page-head-actions .btn {
    flex: 0 0 auto;
  }
}

.eyebrow {
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 0 0 0.35rem;
}

.auth-shell {
  width: min(420px, 100%);
  margin: 2rem auto;
  animation: rise 0.5s ease both;
}

.auth-shell h1 {
  margin: 0 0 0.35rem;
  font-size: 1.75rem;
}

.form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.form-control,
.form-select {
  border-radius: 10px !important;
  border-color: rgba(15, 23, 42, 0.12) !important;
  min-height: 2.75rem;
  font-size: 1rem !important;
  color: var(--ink) !important;
}

.form-control {
  padding: 0.7rem 0.85rem !important;
  background-color: rgba(255, 255, 255, 0.9) !important;
}

.form-select {
  --bs-form-select-bg-img: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%230f766e' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
  padding: 0.7rem 2.5rem 0.7rem 0.85rem !important;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: #f8fafc !important;
  background-image: var(--bs-form-select-bg-img) !important;
  background-repeat: no-repeat !important;
  background-position: right 0.85rem center !important;
  background-size: 14px 10px !important;
}

.form-select:hover {
  border-color: rgba(15, 118, 110, 0.35) !important;
  background-color: #fff !important;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--teal) !important;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.18) !important;
}

.form-select:focus {
  background-color: #fff !important;
  background-image: var(--bs-form-select-bg-img) !important;
}

.form-text {
  font-size: 0.82rem;
  line-height: 1.4;
}

.create-options {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.create-options[hidden] {
  display: none !important;
}

.plan-toggle {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: stretch;
}

.plan-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 7.5rem;
  padding: 0.55rem 1.15rem;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-solid);
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.plan-toggle-btn:hover {
  border-color: rgba(15, 118, 110, 0.35);
  color: var(--teal-deep);
}

.btn-check:checked + .plan-toggle-btn {
  border-color: var(--teal);
  background: var(--teal-soft);
  color: var(--teal-deep);
  box-shadow: 0 0 0 1px rgba(15, 118, 110, 0.2);
}

.btn-check:focus-visible + .plan-toggle-btn {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

.form-actions .btn {
  width: 100%;
}

@media (min-width: 480px) {
  .form-actions .btn {
    width: auto;
  }
}

.form-row-sizes {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

@media (min-width: 480px) {
  .form-row-sizes {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.form-row-approve {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .form-row-approve {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* —— Buttons —— */
.btn {
  border-radius: 999px !important;
  font-weight: 600 !important;
  padding: 0.55rem 1.15rem !important;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease !important;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--teal) !important;
  border-color: var(--teal) !important;
  box-shadow: 0 8px 20px rgba(15, 118, 110, 0.25);
}

.btn-primary:hover {
  background: var(--teal-deep) !important;
  border-color: var(--teal-deep) !important;
}

.btn-outline-primary {
  color: var(--teal-deep) !important;
  border-color: rgba(15, 118, 110, 0.35) !important;
}

.btn-outline-primary:hover {
  background: var(--teal-soft) !important;
  color: var(--teal-deep) !important;
}

.btn-sm {
  padding: 0.3rem 0.75rem !important;
  font-size: 0.82rem !important;
}

.btn-success {
  background: var(--ok) !important;
  border-color: var(--ok) !important;
}

.btn-outline-danger {
  color: var(--danger) !important;
  border-color: rgba(185, 28, 28, 0.35) !important;
}

/* —— Status pills —— */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.status-pill::before {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: currentColor;
}

.status-awaiting { background: #fef3c7; color: var(--warn); }
.status-queued,
.status-provisioning { background: #e0f2fe; color: var(--info); }
.status-active { background: #dcfce7; color: var(--ok); }
.status-failed,
.status-rejected { background: #fee2e2; color: var(--danger); }
.status-deleting,
.status-deleted { background: #f1f5f9; color: var(--muted); }

/* —— Tables —— */
.table-wrap {
  overflow: auto;
  border-radius: 12px;
  border: 1px solid var(--line);
  -webkit-overflow-scrolling: touch;
}

.table {
  margin: 0 !important;
  --bs-table-bg: transparent;
}

.table thead th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 650;
  border-bottom-color: var(--line) !important;
  background: rgba(248, 250, 249, 0.9);
  white-space: nowrap;
}

.table td {
  vertical-align: middle;
  border-color: var(--line) !important;
}

.table tbody tr {
  transition: background 0.15s ease;
}

.table tbody tr:hover {
  background: rgba(15, 118, 110, 0.04);
}

/* —— Responsive data lists (table desktop / cards mobile) —— */
.data-list-cards {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.data-list-table {
  display: none;
}

@media (min-width: 768px) {
  .data-list-cards {
    display: none;
  }

  .data-list-table {
    display: block;
  }
}

.data-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  padding: 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.data-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.data-card-title {
  font-weight: 650;
  font-size: 1.02rem;
  word-break: break-word;
  line-height: 1.3;
}

.data-card-meta {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 0.15rem;
}

.data-card-body {
  display: grid;
  gap: 0.45rem;
  font-size: 0.9rem;
}

.data-card-row {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  gap: 0.5rem;
  align-items: start;
}

.data-card-row .k {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding-top: 0.15rem;
}

.data-card-row .v {
  min-width: 0;
  word-break: break-word;
}

.data-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-top: 0.15rem;
  border-top: 1px solid var(--line);
}

.data-card-actions .btn {
  flex: 1 1 auto;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.25;
  box-sizing: border-box;
}

@media (min-width: 400px) {
  .data-card-actions .btn {
    flex: 0 0 auto;
  }
}

.instance-row-actions {
  display: inline-grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 0.25rem;
  align-items: stretch;
  justify-content: end;
}

.instance-row-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
  line-height: 1.25;
}

/* —— Alerts —— */
.alert {
  border-radius: 12px !important;
  border: 1px solid var(--line) !important;
  animation: rise 0.35s ease both;
}

.alert-danger { background: #fef2f2 !important; color: var(--danger) !important; }
.alert-success { background: #f0fdf4 !important; color: var(--ok) !important; }
.alert-warning { background: #fffbeb !important; color: var(--warn) !important; }
.alert-info { background: #f0f9ff !important; color: var(--info) !important; }

/* —— Details / connection —— */
.mono-box {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.45;
  background: #0c1222;
  color: #e2e8f0;
  border-radius: 12px;
  padding: 0.9rem;
  border: none;
  width: 100%;
  resize: vertical;
  min-height: 4.5rem;
  word-break: break-all;
}

@media (min-width: 576px) {
  .mono-box {
    font-size: 0.82rem;
    padding: 1rem;
  }
}

.conn-block {
  margin-top: 1rem;
}

.conn-block:first-of-type {
  margin-top: 0.35rem;
}

.conn-block-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.conn-block-head h3 {
  margin: 0;
  font-size: 0.95rem;
  font-family: var(--font-body);
  font-weight: 650;
  letter-spacing: 0;
}

.conn-endpoint {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
  word-break: break-all;
  margin-bottom: 0.45rem;
}

.meta-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin: 1rem 0 1.25rem;
}

@media (min-width: 480px) {
  .meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 768px) {
  .meta-grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  }
}

.meta-item {
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  min-width: 0;
}

.meta-item-wide {
  grid-column: 1 / -1;
}

.meta-item .label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.meta-item .value {
  font-weight: 650;
  color: var(--ink);
  word-break: break-word;
}

.meta-item .value-mono {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  word-break: break-all;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

.back-link:hover {
  color: var(--teal-deep);
}

/* —— Footer —— */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.25rem 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.site-footer-inner {
  width: min(1120px, calc(100% - 1.5rem));
  margin: 0 auto;
  text-align: center;
}

@media (min-width: 576px) {
  .site-footer-inner {
    width: min(1120px, calc(100% - 2rem));
    text-align: left;
  }
}

.empty-state {
  text-align: center;
  padding: 1.75rem 1rem;
  color: var(--muted);
}

@media (min-width: 576px) {
  .empty-state {
    padding: 2rem 1rem;
  }
}

.empty-state strong {
  display: block;
  color: var(--ink-soft);
  font-family: var(--font-display);
  margin-bottom: 0.35rem;
}

.layout-split {
  display: grid;
  gap: 1rem;
}

@media (min-width: 992px) {
  .layout-split {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.15fr);
    align-items: start;
    gap: 1.25rem;
  }
}

.sso-pulse {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 3px solid var(--teal-soft);
  border-top-color: var(--teal);
  margin: 0 auto 1rem;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* —— Admin inventory —— */
.site-main-wide {
  width: min(1280px, calc(100% - 1.5rem));
}

@media (min-width: 576px) {
  .site-main-wide {
    width: min(1280px, calc(100% - 2rem));
  }
}

.admin-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.admin-toolbar-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

@media (min-width: 576px) {
  .admin-toolbar-row {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }
}

.admin-search {
  flex: 1 1 16rem;
  min-width: 0;
  width: 100%;
  max-width: none;
}

@media (min-width: 576px) {
  .admin-search {
    max-width: 28rem;
  }
}

.admin-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.admin-toolbar-actions .btn {
  flex: 1 1 auto;
}

@media (min-width: 576px) {
  .admin-toolbar-actions .btn {
    flex: 0 0 auto;
  }
}

.admin-filter-chips {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.4rem;
  overflow-x: auto;
  padding-bottom: 0.15rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

@media (min-width: 768px) {
  .admin-filter-chips {
    flex-wrap: wrap;
    overflow: visible;
    padding-bottom: 0;
  }
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.65);
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.chip:hover {
  border-color: rgba(15, 118, 110, 0.35);
  color: var(--teal-deep);
  text-decoration: none;
}

.chip.is-active {
  background: var(--teal-soft);
  border-color: transparent;
  color: var(--teal-deep);
}

.admin-table td,
.admin-table th {
  vertical-align: middle;
}

.admin-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  margin-top: 1rem;
}

.admin-pager-label {
  font-size: 0.9rem;
  color: var(--muted);
  order: -1;
  width: 100%;
  text-align: center;
}

@media (min-width: 480px) {
  .admin-pager-label {
    order: 0;
    width: auto;
  }
}

.admin-pager .btn.disabled {
  pointer-events: none;
  opacity: 0.45;
}

.reject-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

@media (min-width: 576px) {
  .reject-row {
    flex-direction: row;
    align-items: center;
  }

  .reject-row .form-control {
    flex: 1 1 auto;
    min-width: 0;
  }

  .reject-row .btn {
    flex: 0 0 auto;
  }
}

.approval-options {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

@media (min-width: 480px) {
  .approval-options {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
  }
}

.price-estimate {
  margin-top: 0.25rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border, #d8e2e0);
  border-radius: 0.5rem;
  background: linear-gradient(180deg, rgba(15, 118, 110, 0.06), transparent);
}

.price-estimate-label {
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted, #5b6b69);
  margin-bottom: 0.2rem;
}

.price-estimate-total {
  font-family: "Sora", sans-serif;
  font-weight: 700;
  font-size: 1.35rem;
  color: #0f3d3a;
  margin-bottom: 0.35rem;
}

@media (prefers-reduced-motion: reduce) {
  .page-enter,
  .alert,
  .hero-plane,
  .sso-pulse,
  .btn {
    animation: none !important;
    transition: none !important;
  }

  .btn:hover {
    transform: none;
  }
}
