:root {
  --bg: #F4F7FA;
  --bg-secondary: #E8EEF4;
  --sidebar: rgba(13, 23, 35, 0.92);
  --topbar: rgba(255, 255, 255, 0.84);
  --card: rgba(255, 255, 255, 0.86);
  --line: rgba(18, 28, 45, 0.1);
  --divider: rgba(18, 28, 45, 0.075);
  --text: #121C2D;
  --text-2: #536174;
  --text-3: #94A0AF;
  --ocean: #087F8C;
  --deep: #0D1723;
  --turquoise: #10A896;
  --sun: #D97706;
  --success: #16A34A;
  --danger: #DC2626;
  --cream: #FFF9ED;
  --radius-xl: 18px;
  --radius-lg: 14px;
  --radius-md: 10px;
  --shadow-soft: 0 18px 50px rgba(18, 28, 45, 0.09);
  --shadow-panel: 0 1px 1px rgba(18, 28, 45, 0.04), 0 14px 40px rgba(18, 28, 45, 0.11);
  --shadow-glow: 0 13px 30px rgba(8, 127, 140, 0.24);
}

* { box-sizing: border-box; }

html { scrollbar-width: thin; scrollbar-color: rgba(8, 145, 178, 0.5) transparent; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: Manrope, system-ui, -apple-system, sans-serif;
  font-weight: 500;
  color: var(--text);
  background:
    linear-gradient(115deg, rgba(8, 127, 140, 0.12) 0 18%, transparent 18% 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(237, 243, 248, 0.76)),
    var(--bg);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(18, 28, 45, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(18, 28, 45, 0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  opacity: 0.58;
  z-index: -2;
}

body::after {
  content: "";
  position: fixed;
  inset: auto -10% -36% 18%;
  height: 48vh;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(8, 127, 140, 0.11), rgba(217, 119, 6, 0.1), rgba(16, 168, 150, 0.1));
  filter: blur(80px);
  z-index: -3;
}

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg, rgba(8, 145, 178, 0.7), rgba(20, 184, 166, 0.65)); border-radius: 999px; }
a { color: inherit; text-decoration: none; }

.app-frame { min-height: 100vh; display: grid; grid-template-columns: 286px 1fr; gap: 20px; padding: 14px; }

.sidebar {
  position: sticky;
  top: 14px;
  height: calc(100vh - 28px);
  padding: 18px 14px;
  background: var(--sidebar);
  color: #EAF0F5;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(18px);
  border-radius: 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: 0 22px 70px rgba(13, 23, 35, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.brand-block { padding: 4px 10px 18px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.brand {
  display: inline-block;
  font-family: "Space Grotesk", Manrope, sans-serif;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0;
  color: #fff;
}

.brand-sub, .eyebrow {
  display: inline-block;
  margin-top: 8px;
  font-size: 11px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: rgba(234, 240, 245, 0.62);
  font-weight: 800;
}

.nav { display: grid; gap: 8px; }

.nav a, .nav button {
  width: 100%;
  min-height: 48px;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(234, 240, 245, 0.68);
  padding: 10px 12px;
  border-radius: 12px;
  font: inherit;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: transform 220ms ease-out, background 220ms ease-out, color 220ms ease-out, border-color 220ms ease-out;
}

.nav a span {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: rgba(234, 240, 245, 0.74);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 10px;
  font-weight: 800;
}

.nav a:hover, .nav button:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.nav a.active {
  color: #071016;
  border-color: rgba(255, 255, 255, 0.28);
  background: linear-gradient(135deg, #F4D06F, #10A896);
  box-shadow: 0 12px 26px rgba(16, 168, 150, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.48);
}

.nav a.active span {
  color: #071016;
  background: rgba(255, 255, 255, 0.32);
  border-color: rgba(255, 255, 255, 0.38);
}

.sidebar-status {
  margin-top: auto;
  border-radius: 16px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(234, 240, 245, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.09);
  font-size: 12px;
  font-weight: 600;
}

.status-dot {
  width: 8px;
  height: 8px;
  display: inline-block;
  border-radius: 50%;
  margin-right: 8px;
  background: var(--success);
  box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.15);
}

.shell { width: min(1320px, 100%); margin: 0 auto; padding: 4px 6px 24px; }

.topbar {
  position: sticky;
  top: 14px;
  z-index: 20;
  margin-bottom: 16px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  background: var(--topbar);
  backdrop-filter: blur(18px);
  border-radius: 16px;
  box-shadow: var(--shadow-soft), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  padding: 12px 16px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
}

.topbar-left { display: flex; align-items: center; gap: 10px; }
.topbar-title { margin: 0; color: var(--text); font-weight: 800; font-size: 15px; }

.topbar-search input {
  min-height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.topbar-date { display: grid; gap: 2px; text-align: right; color: var(--text-2); font-size: 12px; }
.topbar-date strong { color: var(--text); font-size: 13px; }
.sidebar-toggle { display: none; }
.sidebar-close { display: none; }

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

.page-head, .card { animation: fadeUp 360ms cubic-bezier(.2,.8,.2,1) both; }
.page-head { display: flex; align-items: center; justify-content: center; gap: 16px; margin-bottom: 18px; text-align: center; flex-wrap: wrap; }
.page-head > div { display: grid; justify-items: center; }

h1, h2, h3 { font-family: "Space Grotesk", Manrope, sans-serif; margin: 8px 0 12px; font-weight: 700; letter-spacing: 0; text-align: center; }
h1 { font-size: clamp(28px, 3vw, 42px); line-height: 1.04; }
h2 { font-size: 23px; }
h3 { font-size: 18px; }
.today-line, .muted, small { color: var(--text-2); }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.split { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr); gap: 16px; align-items: start; }

.card {
  position: relative;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 22px;
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-panel), inset 0 1px 0 rgba(255, 255, 255, 0.78);
  transition: transform 260ms ease-out, box-shadow 260ms ease-out;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.68), rgba(255, 255, 255, 0.02) 42%),
    linear-gradient(90deg, rgba(8, 127, 140, 0.06), transparent 32%);
}

.card > * { position: relative; z-index: 1; }
.card:hover { transform: translateY(-3px); box-shadow: 0 24px 60px rgba(18, 28, 45, 0.13); }

.kpi {
  min-height: 152px;
  display: grid;
  align-content: start;
  gap: 6px;
}

.kpi::after {
  content: "";
  width: 100%;
  height: 34px;
  margin-top: 4px;
  border-radius: 12px;
  opacity: 0.82;
  background:
    linear-gradient(90deg, rgba(8, 127, 140, 0.1), rgba(16, 168, 150, 0.14), rgba(217, 119, 6, 0.12)),
    repeating-linear-gradient(90deg, transparent 0 12px, rgba(18, 28, 45, 0.045) 12px 13px);
}

.stat { font-size: clamp(36px, 3.3vw, 44px); font-weight: 700; letter-spacing: -0.03em; margin-top: 4px; line-height: 1; }
.weather-card { min-width: 230px; display: grid; gap: 4px; justify-items: end; text-align: right; }
.weather-top { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-weight: 700; }
.weather-icon {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: rgba(249, 115, 22, 0.12);
  border: 1px solid rgba(249, 115, 22, 0.22);
}

.btn, button.btn {
  min-height: 46px;
  padding: 14px 22px;
  border-radius: 16px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: all 250ms ease-out;
  background: linear-gradient(135deg, #087F8C, #10A896);
  color: #fff;
  box-shadow: var(--shadow-glow);
}

.btn:hover {
  transform: translateY(-2px);
  filter: saturate(1.08) brightness(1.02);
  box-shadow: 0 14px 34px rgba(8, 145, 178, 0.3);
}

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

.btn.ghost, .ghost {
  background: rgba(255, 255, 255, 0.62);
  color: var(--ocean);
  border-color: rgba(8, 127, 140, 0.16);
  box-shadow: 0 8px 18px rgba(18, 28, 45, 0.06);
}

.btn.ghost:hover, .ghost:hover { background: rgba(8, 145, 178, 0.08); }

.btn.secondary {
  background: rgba(255, 255, 255, 0.65);
  color: var(--text);
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: none;
}

.btn.secondary:hover { background: #fff; }

form { display: grid; gap: 12px; }
label { font-size: 12px; font-weight: 600; color: var(--text-2); display: grid; gap: 7px; text-align: center; text-transform: uppercase; letter-spacing: 0.04em; }
.form-title { display: block; margin-bottom: 8px; font-size: 12px; font-weight: 600; color: var(--text-2); text-align: center; text-transform: uppercase; letter-spacing: .04em; }

input, select, textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  padding: 11px 13px;
  font: inherit;
  color: var(--text);
  background: rgba(255, 255, 255, 0.74);
  outline: none;
  transition: all 240ms ease-out;
}

input::placeholder, textarea::placeholder { color: #94A3B8; }

input:focus, select:focus, textarea:focus {
  border-color: var(--ocean);
  box-shadow: 0 0 0 4px rgba(8, 127, 140, 0.14), 0 10px 24px rgba(8, 127, 140, 0.13);
  background: rgba(255, 255, 255, 0.94);
}

textarea { min-height: 96px; resize: vertical; }
input[type="checkbox"] { width: 18px; min-height: 18px; accent-color: var(--ocean); }
.checkline { display: flex; align-items: center; gap: 8px; }

.table { width: 100%; border-collapse: separate; border-spacing: 0; }
.table th, .table td { padding: 16px 14px; border-bottom: 1px solid var(--divider); text-align: left; vertical-align: middle; }
.table th { color: var(--text-2); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; }
.table tbody tr { transition: background 220ms ease-out, transform 220ms ease-out; }
.table tbody tr:nth-child(even) { background: rgba(255, 255, 255, 0.35); }
.table tbody tr:hover { background: rgba(8, 127, 140, 0.08); }

.row-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 12px;
  font-weight: 600;
  background: rgba(18, 28, 45, 0.055);
  color: var(--text-2);
}

.pill.ok { background: rgba(34, 197, 94, 0.14); color: #166534; border-color: rgba(34, 197, 94, 0.24); }
.pill.warn { background: rgba(249, 115, 22, 0.14); color: #9a3412; border-color: rgba(249, 115, 22, 0.24); }
.pill.error { background: rgba(239, 68, 68, 0.14); color: #991b1b; border-color: rgba(239, 68, 68, 0.24); }
.pill.status-complete { background: rgba(34, 197, 94, 0.14); color: #166534; border-color: rgba(34, 197, 94, 0.24); }
.pill.status-awaiting { background: rgba(8, 145, 178, 0.14); color: #075985; border-color: rgba(8, 145, 178, 0.24); }
.pill.status-pending { background: rgba(249, 115, 22, 0.14); color: #9a3412; border-color: rgba(249, 115, 22, 0.24); }
.pill.status-cancel { background: rgba(239, 68, 68, 0.14); color: #991b1b; border-color: rgba(239, 68, 68, 0.24); }

.section-stack { margin-top: 14px; }
.scroll-panel {
  max-height: 420px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.4);
}

.login {
  background:
    linear-gradient(135deg, rgba(13, 23, 35, 0.64), rgba(8, 127, 140, 0.24)),
    url('https://images.unsplash.com/photo-1485965120184-e220f721d03e?auto=format&fit=crop&w=1800&q=80') center/cover no-repeat;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.08) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,0.08) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(90deg, transparent, #000 20%, #000 80%, transparent);
}

.login .card, .login .trial-card {
  width: min(840px, 100%);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(22px);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 30px 90px rgba(13, 23, 35, 0.32);
}

.login .card { width: min(540px, 100%); }
.trial-box { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--divider); }
.center { display: inline-flex; align-items: center; justify-content: center; text-align: center; }

.inline-fields { display: grid; grid-template-columns: 1fr 110px; gap: 10px; }
.filter-bar {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 12px;
  align-items: end;
  margin-bottom: 18px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.42);
}
.filter-bar label { text-transform: none; letter-spacing: 0; }
.section-line {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
  text-align: center;
}
.section-line > div { display: grid; justify-items: center; }
.section-line h2,
.section-line p { margin-bottom: 0; }
.compact-split { grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1.1fr); }
.testimonials-manager {
  background:
    linear-gradient(135deg, rgba(255, 249, 237, 0.72), rgba(255, 255, 255, 0.86)),
    var(--card);
}
.integrations-manager {
  background:
    linear-gradient(135deg, rgba(13, 23, 35, 0.92), rgba(8, 127, 140, 0.78)),
    var(--deep);
  color: #EAF0F5;
  border-color: rgba(255, 255, 255, 0.12);
}
.integrations-manager .muted,
.integrations-manager .eyebrow {
  color: rgba(234, 240, 245, 0.7);
}
.integrations-manager h2 {
  color: #fff;
}
.integration-form {
  display: grid;
  gap: 14px;
}
.integration-form label {
  color: rgba(234, 240, 245, 0.72);
}
.integration-form input,
.integration-form select {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.14);
}
.integration-form select option {
  color: #121C2D;
}
.integration-form input::placeholder {
  color: rgba(234, 240, 245, 0.48);
}
.integration-form input:focus,
.integration-form select:focus {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(244, 208, 111, 0.8);
  box-shadow: 0 0 0 4px rgba(244, 208, 111, 0.16);
}
.integration-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.testimonial-form {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.52);
}
.testimonial-list {
  display: grid;
  gap: 12px;
  max-height: 560px;
  overflow: auto;
  padding-right: 4px;
}
.testimonial-product {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.6);
  box-shadow: 0 10px 26px rgba(18, 28, 45, 0.06);
}
.testimonial-product > strong {
  display: block;
  margin-bottom: 10px;
  font-family: "Space Grotesk", Manrope, sans-serif;
}
.testimonial-mini {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: start;
  padding: 10px 0;
  border-top: 1px solid var(--divider);
}
.testimonial-mini span {
  display: inline-block;
  color: var(--sun);
  font-size: 12px;
  font-weight: 800;
}
.testimonial-mini p {
  margin: 4px 0 0;
  color: var(--text-2);
  line-height: 1.45;
}
.product-thumb { width: 70px; height: 54px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); background: #f1f5f9; margin-right: 10px; box-shadow: 0 8px 18px rgba(18, 28, 45, 0.08); vertical-align: middle; }
.theme-preview { min-height: 130px; display: grid; align-content: center; gap: 10px; border-radius: 16px; padding: 16px; }
.settings-preview { width: 92px; height: 92px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); background: #f8fafc; }
.settings-preview.banner { width: 100%; height: 140px; }
.template-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.template-card { display: block; cursor: pointer; text-transform: none; letter-spacing: 0; }
.template-card input { position: absolute; opacity: 0; pointer-events: none; }
.template-preview-mini {
  min-height: 190px;
  display: grid;
  align-content: end;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    linear-gradient(180deg, transparent 0 42%, color-mix(in srgb, var(--tpl-bg) 78%, #000 22%) 100%),
    linear-gradient(135deg, color-mix(in srgb, var(--tpl-primary) 28%, transparent), transparent 48%),
    var(--tpl-bg);
  color: var(--tpl-text);
  position: relative;
  overflow: hidden;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.template-preview-mini::before {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  top: 14px;
  height: 94px;
  border-radius: 14px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--tpl-primary) 44%, transparent), color-mix(in srgb, var(--tpl-accent) 36%, transparent)),
    radial-gradient(circle at 30% 42%, rgba(255,255,255,.75) 0 12px, transparent 13px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 14px 30px rgba(0,0,0,.16);
}
.template-preview-mini span { width: 78px; height: 7px; justify-self: center; border-radius: 999px; background: linear-gradient(90deg, var(--tpl-primary), var(--tpl-accent)); }
.template-preview-mini strong,
.template-preview-mini small { position: relative; z-index: 1; text-align: center; }
.template-preview-mini strong { font-size: 16px; line-height: 1.2; }
.template-preview-mini small { font-size: 13px; line-height: 1.35; opacity: .86; }
.template-card:hover .template-preview-mini, .template-card input:checked + .template-preview-mini { transform: translateY(-2px); border-color: var(--tpl-primary); box-shadow: 0 12px 24px color-mix(in srgb, var(--tpl-primary) 22%, transparent); }
.import-preview { margin: 14px 0; padding: 12px; border: 1px solid rgba(8, 145, 178, 0.2); border-radius: 16px; background: rgba(255, 255, 255, 0.65); }
.import-images { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; }
.image-check { position: relative; display: block; cursor: pointer; min-height: 88px; }
.image-check input { position: absolute; top: 7px; left: 7px; z-index: 2; width: 18px; min-height: 18px; }
.image-check img { width: 100%; aspect-ratio: 1.15; object-fit: cover; border: 1px solid var(--line); border-radius: 12px; background: #f8fafc; transition: all .18s ease; }
.image-check:hover img, .image-check input:checked + img { border-color: var(--ocean); box-shadow: 0 8px 20px rgba(8, 145, 178, 0.14); }
.image-check input:not(:checked) + img { opacity: .5; }
.progress { height: 8px; background: rgba(255, 255, 255, 0.46); border-radius: 999px; overflow: hidden; margin-top: 14px; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--ocean), var(--turquoise)); }
.progress.cyan span { background: linear-gradient(90deg, var(--turquoise), #7dd3fc); }
.progress.orange span { background: linear-gradient(90deg, var(--sun), #fdba74); }
.list-item { padding: 10px 0; border-bottom: 1px solid var(--divider); }
.compact-form { margin-top: 10px; }
.user-panel { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--divider); }
.user-edit { background: rgba(255, 255, 255, 0.45); padding: 12px; border: 1px solid var(--line); border-radius: 14px; margin-bottom: 10px; }
.skeleton { min-height: 16px; border-radius: 999px; background: linear-gradient(90deg, rgba(238, 243, 247, 0.9), rgba(222, 234, 244, 0.95), rgba(238, 243, 247, 0.9)); background-size: 220% 100%; animation: scan 1.2s linear infinite; }
@keyframes scan { to { background-position: -220% 0; } }

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(13, 23, 35, 0.46);
  z-index: 1000;
  overflow-y: auto;
  padding: 20px;
  backdrop-filter: blur(10px);
}

.modal-overlay.active { display: flex; align-items: center; justify-content: center; }

.modal-content {
  background: rgba(255, 255, 255, 0.88);
  max-width: 740px;
  width: 100%;
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 28px;
  border-radius: 18px;
  border: 1px solid var(--line);
  box-shadow: 0 28px 86px rgba(13, 23, 35, 0.26);
  backdrop-filter: blur(18px);
  animation: modalIn 240ms ease-out;
}

@keyframes modalIn { from { opacity: 0; transform: scale(.98) translateY(8px); } to { opacity: 1; transform: scale(1) translateY(0); } }

.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; border-bottom: 1px solid var(--divider); padding-bottom: 14px; }
.modal-header h2 { margin: 0; }
.modal-close { background: rgba(255, 255, 255, 0.75); border: 1px solid var(--line); font-size: 26px; cursor: pointer; color: var(--text-2); width: 36px; height: 36px; border-radius: 12px; }
.modal-form { display: grid; gap: 14px; }
.modal-footer { display: flex; gap: 12px; justify-content: space-between; margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--divider); }
.btn-delete { background: rgba(255, 255, 255, 0.85); border: 1px solid rgba(239, 68, 68, 0.28); color: #b91c1c; padding: 10px 16px; border-radius: 14px; cursor: pointer; font-weight: 600; }
.btn-delete:hover { background: rgba(239, 68, 68, 0.08); }
.modal-actions { display: flex; gap: 12px; }
.btn-cancel { background: rgba(255, 255, 255, 0.82); border: 1px solid var(--line); color: var(--text-2); padding: 10px 24px; border-radius: 14px; cursor: pointer; font-weight: 600; }
.btn-save { background: linear-gradient(135deg, #0891B2, #14B8A6); border: none; color: #fff; padding: 10px 24px; border-radius: 14px; cursor: pointer; font-weight: 600; }

.finance-filters { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; align-items: end; }
.finance-chart { min-height: 190px; border: 1px solid var(--line); border-radius: 20px; background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(231, 237, 243, 0.58)); padding: 12px; }
.bars { height: 160px; display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 8px; align-items: end; }
.bar-wrap { display: grid; gap: 6px; align-items: end; }
.bar { width: 100%; border-radius: 8px 8px 4px 4px; transform-origin: bottom; animation: barRise 320ms ease-out both; }
.bar.up { background: linear-gradient(180deg, #67e8f9, var(--ocean)); box-shadow: 0 0 16px rgba(8, 145, 178, 0.22); }
.bar.down { background: linear-gradient(180deg, #fdba74, var(--sun)); box-shadow: 0 0 16px rgba(249, 115, 22, 0.2); }
.bar-wrap span { display: block; text-align: center; font-size: 11px; color: var(--text-2); }
@keyframes barRise { from { transform: scaleY(0.15); opacity: 0.55; } to { transform: scaleY(1); opacity: 1; } }

@media (max-width: 980px) {
  .app-frame { grid-template-columns: 1fr; padding: 10px; }
  .app-frame::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 55;
    pointer-events: none;
    opacity: 0;
    background: rgba(13, 23, 35, 0.36);
    backdrop-filter: blur(5px);
    transition: opacity 220ms ease;
  }
  body.menu-open .app-frame::before { opacity: 1; pointer-events: auto; }
  .sidebar {
    position: fixed;
    left: -110%;
    top: 10px;
    width: min(372px, calc(100vw - 20px));
    z-index: 60;
    height: calc(100svh - 20px);
    max-height: calc(100svh - 20px);
    overflow: auto;
    transition: left 250ms cubic-bezier(.2,.8,.2,1);
    box-shadow: 16px 0 40px rgba(15, 23, 42, 0.1);
  }

  body.menu-open .sidebar { left: 10px; }

  .sidebar-toggle {
    display: inline-flex;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.7);
    color: var(--text-2);
    border-radius: 12px;
    padding: 8px 12px;
    font-weight: 600;
  }

  .sidebar-close {
    display: inline-flex;
    min-height: 36px;
    padding: 8px 11px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(234, 240, 245, 0.86);
    font: inherit;
    font-size: 12px;
    font-weight: 800;
  }

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

  .nav {
    position: static;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 2px;
    background: transparent;
    border: 0;
    border-radius: 0;
    backdrop-filter: none;
    box-shadow: none;
  }

  .nav form { margin: 0; }
  .nav a span { display: grid; }
  .nav a, .nav button {
    justify-content: flex-start;
    padding: 13px 12px;
    min-height: 54px;
    font-size: 15px;
    color: rgba(234, 240, 245, 0.78);
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.045);
  }
  .nav button {
    justify-content: center;
    margin-top: 8px;
    color: #FDECEC;
    background: rgba(220, 38, 38, 0.12);
    border-color: rgba(220, 38, 38, 0.18);
  }
  .sidebar-status {
    display: block;
    margin-top: auto;
  }
  .brand-block { display: flex; }
  .shell { padding-bottom: 24px; }
  .finance-filters { grid-template-columns: 1fr 1fr; }
  .compact-split { grid-template-columns: 1fr; }
  .integration-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topbar { grid-template-columns: 1fr; }
  .topbar-date { text-align: left; }
}

@media (max-width: 1366px) and (min-width: 981px) {
  .app-frame { grid-template-columns: 230px 1fr; }
  .sidebar { padding: 18px 12px; }
  .brand { font-size: 24px; }
  .shell { padding: 6px 2px 24px; }
  .card { padding: 20px; border-radius: 24px; }
  .grid, .split { gap: 12px; }
  .stat { font-size: clamp(30px, 2.3vw, 36px); }
  .nav a, .nav button { min-height: 42px; padding: 8px 10px; }
}

@media (max-width: 760px) {
  .shell { padding: 6px 4px 100px; }
  .page-head { align-items: stretch; flex-direction: column; }
  .inline-fields { grid-template-columns: 1fr; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table thead { display: none; }
  .table tr { border: 1px solid var(--line); border-radius: 14px; margin-bottom: 10px; padding: 10px; background: rgba(255, 255, 255, 0.78); box-shadow: 0 10px 24px rgba(18, 28, 45, 0.07); }
  .table td { border: 0; padding: 8px; }
  .table td + td { border-top: 1px solid var(--divider); }
  .btn, .nav button { width: 100%; }
  .modal-content { padding: 20px; }
  .modal-footer { flex-direction: column-reverse; }
  .modal-actions { width: 100%; }
  .btn-cancel, .btn-save { width: 100%; }
  .finance-filters { grid-template-columns: 1fr; }
  .filter-bar { grid-template-columns: 1fr; }
  .testimonial-mini { grid-template-columns: 1fr; }
  .testimonial-mini .btn-delete { width: 100%; }
  .testimonials-manager { padding: 18px; }
  .integration-grid { grid-template-columns: 1fr; }
  .integrations-manager { padding: 18px; }
  .template-grid { grid-template-columns: 1fr; }
  .template-preview-mini {
    min-height: 168px;
    padding: 14px;
  }
  .template-preview-mini::before { height: 78px; }
  .template-preview-mini strong { font-size: 18px; }
  .template-preview-mini small { font-size: 14px; }
  .bars { grid-template-columns: repeat(7, minmax(0, 1fr)); height: 180px; }
}

.ops-grid .status-card strong {
  display: block;
  margin-top: 8px;
  font-family: "Space Grotesk", Manrope, sans-serif;
  font-size: 36px;
}

.form-group,
.checkbox-group {
  display: grid;
  gap: 7px;
}

.checkbox-group {
  grid-template-columns: auto 1fr;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.54);
}

.testimonial-row {
  border-radius: 12px !important;
  background: rgba(255, 255, 255, 0.55);
}

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