/* =========================================================
   DemoDeck — design tokens
   Palette: white + #249FAC (brief-specified), extended with
   a deep teal for gradient depth and muted status accents.
   Display face: Space Grotesk (technical, geometric)
   Body face: Inter
   Mono face: JetBrains Mono — used for URLs / timestamps / ids,
   echoing the "browser address bar" signature motif.
   ========================================================= */

@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap");

:root {
  --teal: #249fac;
  --teal-deep: #0e5a63;
  --teal-mid: #1b7f8b;
  --teal-pale: #e6f6f7;
  --teal-pale-2: #f2fbfb;
  --white: #ffffff;
  --ink: #0b2730;
  --ink-soft: #4c6a70;
  --ink-faint: #8aa4a9;
  --line: #d7ebec;

  --mint: #2fa876;
  --mint-bg: #e5f6ee;
  --amber: #d8952f;
  --amber-bg: #fbf0dd;
  --coral: #d9564b;
  --coral-bg: #fbe7e5;

  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;

  --shadow-soft: 0 10px 30px -12px rgba(11, 39, 48, 0.18);
  --shadow-card: 0 6px 20px -10px rgba(11, 39, 48, 0.16);
  --shadow-pop: 0 20px 45px -14px rgba(11, 39, 48, 0.32);

  --font-display: "Space Grotesk", "Inter", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--teal-pale-2);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

button {
  font-family: inherit;
}

:focus-visible {
  outline: 2px solid var(--teal-deep);
  outline-offset: 2px;
}

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

/* ---------------------------------------------------------
   Login page
   --------------------------------------------------------- */

.auth-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, var(--teal-deep) 0%, var(--teal) 42%, #ffffff 100%);
}

.auth-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  opacity: 0.35;
  background: radial-gradient(circle at 30% 30%, #ffffff, transparent 70%);
  animation: float 14s ease-in-out infinite;
}
.auth-orb.one {
  width: 360px;
  height: 360px;
  top: -120px;
  left: -100px;
  animation-delay: 0s;
}
.auth-orb.two {
  width: 260px;
  height: 260px;
  bottom: -80px;
  right: -60px;
  animation-delay: -6s;
  opacity: 0.22;
}
.auth-orb.three {
  width: 160px;
  height: 160px;
  bottom: 12%;
  left: 8%;
  animation-delay: -3s;
  opacity: 0.18;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0) translateX(0);
  }
  50% {
    transform: translateY(-22px) translateX(14px);
  }
}

.auth-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 408px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-pop);
  padding: 40px 36px 34px;
  animation: rise 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.auth-mark {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 26px;
}

.auth-mark .brand-logo {
  width: 156px;
  height: 156px;
  object-fit: contain;
  flex-shrink: 0;
}

.auth-mark .dot-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-deep) 100%);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.auth-mark .dot-mark svg {
  width: 18px;
  height: 18px;
}

.auth-mark .word {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.01em;
}
.auth-mark .word span {
  color: var(--teal);
}

.auth-card h1 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}

.auth-card p.sub {
  margin: 0 0 28px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.5;
}

.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 7px;
}

.field input {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--line);
  font-size: 14.5px;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--teal-pale-2);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(36, 159, 172, 0.15);
  background: var(--white);
}

.btn-primary {
  width: 100%;
  padding: 13px 16px;
  border: none;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-deep) 100%);
  color: var(--white);
  font-weight: 600;
  font-size: 14.5px;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.12s ease;
  box-shadow: 0 10px 24px -10px rgba(14, 90, 99, 0.55);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px -10px rgba(14, 90, 99, 0.6);
}
.btn-primary:active {
  transform: translateY(0);
}
.btn-primary:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.auth-error {
  display: none;
  align-items: center;
  gap: 8px;
  background: var(--coral-bg);
  color: var(--coral);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 13px;
  margin-bottom: 16px;
  font-weight: 500;
}
.auth-error.show {
  display: flex;
}

.auth-hint {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px dashed var(--line);
  font-size: 12.5px;
  color: var(--ink-faint);
  font-family: var(--font-mono);
  line-height: 1.6;
}
.auth-hint b {
  color: var(--ink-soft);
}

/* ---------------------------------------------------------
   App shell
   --------------------------------------------------------- */

.app-shell {
  display: grid;
  grid-template-columns: 250px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: linear-gradient(190deg, var(--teal-deep) 0%, var(--teal) 100%);
  color: var(--white);
  padding: 26px 20px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 30px;
  padding: 0 4px;
}
.sidebar .brand .dot-mark {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.16);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  overflow: hidden;
}
.sidebar .brand .dot-mark svg {
  width: 17px;
  height: 17px;
}
.sidebar .brand .dot-mark img {
  width: 80%;
  height: 80%;
  object-fit: contain;
  padding: 5px;
  box-sizing: border-box;
  display: block;
}
.sidebar .brand .word {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  line-height: 1.3;
}

.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.82);
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  transition: background 0.12s ease, color 0.12s ease;
}
.nav-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
}
.nav-item.active {
  background: rgba(255, 255, 255, 0.18);
  color: var(--white);
}
.nav-item .count {
  font-family: var(--font-mono);
  font-size: 11.5px;
  background: rgba(255, 255, 255, 0.16);
  padding: 1px 7px;
  border-radius: 20px;
}

.nav-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.55);
  margin: 18px 4px 6px;
  font-weight: 600;
}

.sidebar-user {
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  padding-top: 16px;
  margin-top: 12px;
}
.sidebar-user .name {
  font-size: 13.5px;
  font-weight: 600;
}
.sidebar-user .role {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 12px;
}
.logout-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.12);
  border: none;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  width: 100%;
  transition: background 0.12s ease;
}
.logout-btn:hover {
  background: rgba(255, 255, 255, 0.22);
}

.main {
  padding: 28px 36px 60px;
  max-width: 1280px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.topbar h1 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}
.topbar p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
  max-width: 460px;
}

.btn-add {
  display: flex;
  align-items: center;
  gap: 8px;
  border: none;
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-deep) 100%);
  color: var(--white);
  padding: 11px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
  box-shadow: 0 10px 22px -10px rgba(14, 90, 99, 0.5);
  transition: transform 0.12s ease;
  white-space: nowrap;
}
.btn-add:hover {
  transform: translateY(-1px);
}

/* Stat strip */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 26px;
}
.stat-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--line);
}
.stat-card .num {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  color: var(--teal-deep);
  line-height: 1;
}
.stat-card .lbl {
  font-size: 12.5px;
  color: var(--ink-soft);
  margin-top: 6px;
  font-weight: 500;
}
.stat-card.total .num {
  color: var(--teal-deep);
}
.stat-card.active .num {
  color: var(--mint);
}
.stat-card.maintenance .num {
  color: var(--amber);
}
.stat-card.inactive .num {
  color: var(--coral);
}

/* Toolbar */
.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 220px;
}
.search-box input {
  width: 100%;
  padding: 10px 14px 10px 38px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--line);
  font-size: 13.5px;
  background: var(--white);
}
.search-box input:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(36, 159, 172, 0.13);
}
.search-box svg {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: var(--ink-faint);
}

.filter-select {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--line);
  background: var(--white);
  font-size: 13.5px;
  color: var(--ink);
  cursor: pointer;
}
.filter-select:focus {
  outline: none;
  border-color: var(--teal);
}

.view-toggle {
  display: flex;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.view-toggle button {
  border: none;
  background: var(--white);
  padding: 9px 11px;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: var(--ink-faint);
}
.view-toggle button.active {
  background: var(--teal-pale);
  color: var(--teal-deep);
}

/* Grid of demo cards (browser-chrome signature) */
.demo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}

.demo-card {
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.demo-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-soft);
}

.chrome-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--teal-pale-2);
  border-bottom: 1px solid var(--line);
}
.chrome-dots {
  display: flex;
  gap: 5px;
  flex-shrink: 0;
}
.chrome-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line);
}
.chrome-dots span:nth-child(1) {
  background: #f0a6a1;
}
.chrome-dots span:nth-child(2) {
  background: #f3cf8f;
}
.chrome-dots span:nth-child(3) {
  background: #a8dcb8;
}

.url-bar {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--teal-deep);
  cursor: pointer;
  text-decoration: none;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.url-bar:hover {
  background: var(--teal-pale);
  border-color: var(--teal);
}
.url-bar svg {
  width: 11px;
  height: 11px;
  flex-shrink: 0;
  color: var(--ink-faint);
}
.url-bar .launch-icon {
  margin-left: auto;
  color: var(--teal);
  flex-shrink: 0;
}

.demo-body {
  padding: 16px 16px 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.demo-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.demo-title-row h3 {
  font-family: var(--font-display);
  font-size: 15.5px;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.005em;
}

.status-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px 3px 7px;
  border-radius: 999px;
  flex-shrink: 0;
  white-space: nowrap;
}
.status-pill .pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  position: relative;
}
.status-pill .pulse::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  animation: pulse-ring 2s ease-out infinite;
}
.status-pill.active {
  background: var(--mint-bg);
  color: var(--mint);
}
.status-pill.active .pulse {
  background: var(--mint);
}
.status-pill.active .pulse::after {
  background: rgba(47, 168, 118, 0.35);
}
.status-pill.maintenance {
  background: var(--amber-bg);
  color: var(--amber);
}
.status-pill.maintenance .pulse {
  background: var(--amber);
}
.status-pill.maintenance .pulse::after {
  background: rgba(216, 149, 47, 0.3);
  animation: none;
}
.status-pill.inactive {
  background: var(--coral-bg);
  color: var(--coral);
}
.status-pill.inactive .pulse {
  background: var(--coral);
}
.status-pill.inactive .pulse::after {
  animation: none;
}

@keyframes pulse-ring {
  0% {
    transform: scale(0.6);
    opacity: 0.7;
  }
  100% {
    transform: scale(1.8);
    opacity: 0;
  }
}

.demo-desc {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.demo-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}
.tag {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 6px;
  background: var(--teal-pale);
  color: var(--teal-deep);
}
.tag.client {
  background: #eef0fb;
  color: #4c53a8;
}
.tag.local {
  background: var(--amber-bg);
  color: var(--amber);
}
.tag.online {
  background: var(--mint-bg);
  color: var(--mint);
}

.demo-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  background: var(--teal-pale-2);
}
.demo-footer .ts {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-faint);
}
.demo-actions {
  display: flex;
  gap: 6px;
}
.icon-btn {
  border: none;
  background: transparent;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--ink-soft);
  transition: background 0.12s ease, color 0.12s ease;
}
.icon-btn:hover {
  background: var(--white);
  color: var(--teal-deep);
}
.icon-btn.danger:hover {
  color: var(--coral);
}
.icon-btn svg {
  width: 15px;
  height: 15px;
}

/* Table view */
.demo-table-wrap {
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: none;
}
.demo-table-wrap.show {
  display: block;
}
.demo-grid.hide {
  display: none;
}
table.demo-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
table.demo-table th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
  padding: 12px 16px;
  background: var(--teal-pale-2);
  border-bottom: 1px solid var(--line);
  font-weight: 600;
}
table.demo-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
table.demo-table tr:last-child td {
  border-bottom: none;
}
table.demo-table .site-name {
  font-weight: 600;
  font-family: var(--font-display);
}
table.demo-table .demo-url-link {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--teal-deep);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
table.demo-table .demo-url-link:hover {
  text-decoration: underline;
}
table.demo-table .row-actions {
  display: flex;
  gap: 4px;
  justify-content: flex-end;
}

.empty-state {
  text-align: center;
  padding: 70px 20px;
  color: var(--ink-soft);
}
.empty-state svg {
  width: 46px;
  height: 46px;
  color: var(--teal);
  margin-bottom: 14px;
  opacity: 0.6;
}
.empty-state h3 {
  font-family: var(--font-display);
  font-size: 16px;
  margin: 0 0 6px;
  color: var(--ink);
}
.empty-state p {
  font-size: 13px;
  margin: 0 0 18px;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 39, 48, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 50;
  backdrop-filter: blur(2px);
}
.modal-overlay.show {
  display: flex;
}
.modal-box {
  background: var(--white);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-pop);
  animation: rise 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-box-lg {
  max-width: 760px;
}
.role-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: var(--teal-pale);
  color: var(--teal-deep);
}
.role-badge.member {
  background: var(--teal-pale-2);
  color: var(--ink-soft);
}
.you-badge {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--ink-faint);
  margin-left: 6px;
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--white);
}
.modal-head h2 {
  font-family: var(--font-display);
  font-size: 18px;
  margin: 0;
  font-weight: 600;
}
.modal-close {
  border: none;
  background: var(--teal-pale-2);
  width: 30px;
  height: 30px;
  border-radius: 8px;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: var(--ink-soft);
}
.modal-close:hover {
  background: var(--teal-pale);
  color: var(--teal-deep);
}
.modal-body {
  padding: 22px 24px 24px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.form-row .field {
  margin-bottom: 0;
}
.modal-body .field {
  margin-bottom: 16px;
}
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--line);
  font-size: 13.5px;
  font-family: var(--font-body);
  resize: vertical;
  min-height: 70px;
  background: var(--teal-pale-2);
}
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(36, 159, 172, 0.15);
  background: var(--white);
}
.field select {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--line);
  font-size: 13.5px;
  background: var(--teal-pale-2);
  cursor: pointer;
}
.modal-form-error {
  display: none;
  background: var(--coral-bg);
  color: var(--coral);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 13px;
  margin-bottom: 16px;
  font-weight: 500;
}
.modal-form-error.show {
  display: block;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 6px;
}
.btn-ghost {
  border: 1.5px solid var(--line);
  background: var(--white);
  color: var(--ink-soft);
  padding: 11px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
}
.btn-ghost:hover {
  background: var(--teal-pale-2);
}
.modal-actions .btn-primary {
  width: auto;
  padding: 11px 22px;
}

/* Confirm delete dialog */
.confirm-box .modal-body {
  text-align: left;
}
.confirm-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--coral-bg);
  color: var(--coral);
  display: grid;
  place-items: center;
  margin-bottom: 14px;
}
.confirm-icon svg {
  width: 20px;
  height: 20px;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--ink);
  color: var(--white);
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: var(--shadow-pop);
  display: flex;
  align-items: center;
  gap: 8px;
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s ease, opacity 0.25s ease;
  z-index: 100;
}
.toast.show {
  transform: translateY(0);
  opacity: 1;
}
.toast.success {
  background: var(--teal-deep);
}
.toast.error {
  background: var(--coral);
}
.toast svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

/* Loading skeleton */
.skeleton-card {
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  height: 210px;
  overflow: hidden;
  position: relative;
}
.skeleton-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(36, 159, 172, 0.08), transparent);
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

/* Responsive */
@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: static;
    height: auto;
    flex-direction: row;
    align-items: center;
    overflow-x: auto;
    padding: 14px 16px;
  }
  .sidebar .brand {
    margin-bottom: 0;
  }
  .sidebar nav {
    flex-direction: row;
    flex: none;
  }
  .nav-label {
    display: none;
  }
  .sidebar-user {
    display: none;
  }
  .main {
    padding: 22px 18px 50px;
  }
  .stat-strip {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 620px) {
  .form-row {
    grid-template-columns: 1fr;
  }
  .topbar {
    flex-direction: column;
  }
  .btn-add {
    width: 100%;
    justify-content: center;
  }
  .demo-grid {
    grid-template-columns: 1fr;
  }
  .auth-card {
    padding: 30px 22px 26px;
  }
}