/* =========================================================
   WebsDocs Promotion Officer — Premium Dashboard CSS v4
   Path: /promo/css/promotion-dashboard.css

   Design goals:
   - Private control-room look
   - Sticky premium header
   - Compact one-row systems where possible
   - Scroll containers instead of endless vertical pages
   - Clear green admin-online indicator
   - Red blinking session warning near expiry
   - High-density but still readable
========================================================= */

:root {
  --bg-0: #07111f;
  --bg-1: #0b1728;
  --bg-2: #101f33;
  --bg-soft: #eef3f8;

  --panel: rgba(255, 255, 255, 0.94);
  --panel-solid: #ffffff;
  --panel-soft: #f8fafc;
  --panel-blue: #eef6ff;

  --line: #d7e2ee;
  --line-dark: rgba(255, 255, 255, 0.14);

  --text: #0f172a;
  --text-soft: #334155;
  --muted: #64748b;

  --brand: #2a4768;
  --brand-2: #1f3652;
  --brand-3: #12395d;
  --brand-glow: rgba(42, 71, 104, 0.34);

  --ok: #087f5b;
  --ok-bg: #d8f8df;
  --ok-glow: rgba(8, 127, 91, 0.28);

  --warn: #b7791f;
  --warn-bg: #fff3bf;

  --bad: #c92a2a;
  --bad-bg: #ffe3e3;
  --bad-glow: rgba(201, 42, 42, 0.36);

  --gold: #c99a2e;
  --gold-soft: rgba(201, 154, 46, 0.18);

  --shadow-sm: 0 10px 30px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 18px 50px rgba(15, 23, 42, 0.10);
  --shadow-lg: 0 28px 80px rgba(15, 23, 42, 0.18);

  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 28px;

  --header-h: 76px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg-soft);
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(42, 71, 104, 0.20), transparent 34rem),
    radial-gradient(circle at top right, rgba(8, 127, 91, 0.10), transparent 28rem),
    linear-gradient(180deg, #edf4fb 0%, #f7fbff 40%, #eef3f8 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, Helvetica, sans-serif;
  font-size: 13px;
  line-height: 1.45;
  overflow-x: hidden;
}

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

button {
  user-select: none;
}

a {
  color: inherit;
}

.promo-shell {
  min-height: 100vh;
}


/* =========================================================
   LOGIN — locked private panel only
========================================================= */

.login-view {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 18% 12%, rgba(55, 91, 132, 0.38), transparent 28rem),
    radial-gradient(circle at 82% 18%, rgba(8, 127, 91, 0.18), transparent 24rem),
    linear-gradient(135deg, #07111f 0%, #0d1b2f 52%, #12253e 100%);
  position: relative;
  overflow: hidden;
}

.login-view::before,
.login-view::after {
  content: "";
  position: absolute;
  width: 34rem;
  height: 34rem;
  border-radius: 999px;
  filter: blur(46px);
  opacity: 0.22;
  pointer-events: none;
}

.login-view::before {
  background: #5482b3;
  left: -12rem;
  bottom: -12rem;
}

.login-view::after {
  background: #18a86d;
  right: -12rem;
  top: -12rem;
}

.login-card {
  width: min(620px, 100%);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.94));
  border: 1px solid rgba(255,255,255,0.64);
  border-radius: 30px;
  box-shadow:
    0 34px 100px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255,255,255,0.86);
  padding: 26px;
  position: relative;
  z-index: 2;
  overflow: hidden;
}

.premium-login-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(42,71,104,0.26), rgba(8,127,91,0.24));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.login-glow {
  position: absolute;
  inset: -120px -120px auto auto;
  width: 270px;
  height: 270px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(42, 71, 104, 0.20), transparent 70%);
  pointer-events: none;
}

.brand-row,
.top-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.login-brand-row {
  align-items: flex-start;
}

.brand-mark {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background:
    linear-gradient(145deg, #355a83, #18314f);
  box-shadow:
    0 14px 30px rgba(42, 71, 104, 0.32),
    inset 0 1px 0 rgba(255,255,255,0.22);
  font-weight: 950;
  letter-spacing: -0.06em;
  flex: 0 0 auto;
}

.brand-mark.mini {
  width: 38px;
  height: 38px;
  border-radius: 13px;
  font-size: 12px;
}

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

h1 {
  margin: 0 0 7px;
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1;
  letter-spacing: -0.045em;
}

h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

h3 {
  margin: 0 0 10px;
  font-size: 15px;
  line-height: 1.15;
  letter-spacing: -0.015em;
}

p {
  color: var(--muted);
}

.eyebrow {
  margin: 0 0 5px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6b7d94;
}

.security-warning {
  display: grid;
  gap: 4px;
  margin: 22px 0 18px;
  padding: 14px 15px;
  border: 1px solid rgba(201, 154, 46, 0.32);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 248, 223, 0.88), rgba(255, 255, 255, 0.72));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
}

.security-warning strong {
  color: #704b00;
  font-size: 13px;
}

.security-warning span {
  color: #745f2d;
  font-size: 12px;
  line-height: 1.5;
}

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

label {
  display: grid;
  gap: 7px;
  font-weight: 800;
  color: var(--text-soft);
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid #d4dfeb;
  border-radius: 13px;
  background:
    linear-gradient(180deg, #ffffff, #fbfdff);
  min-height: 38px;
  padding: 9px 11px;
  color: var(--text);
  outline: none;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(42, 71, 104, 0.72);
  box-shadow: 0 0 0 4px rgba(42, 71, 104, 0.12);
}

textarea {
  min-height: 72px;
  resize: vertical;
}

.checkline {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--muted);
  line-height: 1.2;
}

.checkline input {
  width: auto;
  min-height: auto;
  accent-color: var(--brand);
}

.login-options-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.login-submit-btn {
  min-height: 46px;
  justify-content: center;
  font-size: 14px;
}

.login-foot-grid {
  display: grid;
  gap: 8px;
}

.login-note {
  margin: 0;
  font-size: 12px;
  color: #728299;
}


/* =========================================================
   BUTTONS
========================================================= */

.primary-btn,
.secondary-btn,
.ghost-btn,
.danger-btn,
.tiny-btn {
  border: 0;
  border-radius: 999px;
  padding: 9px 13px;
  font-weight: 900;
  cursor: pointer;
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease,
    opacity 0.12s ease,
    filter 0.12s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  white-space: nowrap;
}

.primary-btn:hover,
.secondary-btn:hover,
.ghost-btn:hover,
.danger-btn:hover,
.tiny-btn:hover {
  transform: translateY(-1px);
  filter: saturate(1.08);
}

.primary-btn:active,
.secondary-btn:active,
.ghost-btn:active,
.danger-btn:active,
.tiny-btn:active {
  transform: translateY(0);
}

.primary-btn {
  background:
    linear-gradient(135deg, #345a84, #18314f);
  color: #fff;
  box-shadow: 0 10px 24px rgba(42, 71, 104, 0.23);
}

.secondary-btn {
  background:
    linear-gradient(135deg, #e5efff, #d5e6ff);
  color: #173b72;
  border: 1px solid rgba(67, 105, 152, 0.14);
}

.ghost-btn {
  background:
    linear-gradient(180deg, #ffffff, #eef4fb);
  color: var(--text);
  border: 1px solid #d8e2ef;
}

.danger-btn {
  background:
    linear-gradient(135deg, #ffe5e5, #ffd3d3);
  color: var(--bad);
  border: 1px solid rgba(201, 42, 42, 0.16);
}

.tiny-btn {
  padding: 6px 10px;
  background:
    linear-gradient(180deg, #ffffff, #eef4fb);
  color: #24425f;
  font-size: 11px;
  border: 1px solid #d8e2ef;
}

.compact-btn {
  padding: 8px 11px;
  min-height: 34px;
}


/* =========================================================
   STATUS
========================================================= */

.status-line,
.global-status {
  margin: 0;
  font-size: 12px;
}

.status-line.ok,
.global-status.ok {
  color: var(--ok);
}

.status-line.error,
.global-status.error {
  color: var(--bad);
}

.status-line.warn,
.global-status.warn {
  color: var(--warn);
}

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


/* =========================================================
   DASHBOARD SHELL
========================================================= */

.dashboard-view {
  min-height: 100vh;
  padding: 0 8px 12px;
}

.top-strip {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: auto minmax(420px, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: var(--header-h);
  padding: 10px 10px;
  margin: 0 -8px;
  border-bottom: 1px solid rgba(215, 226, 238, 0.8);
}

.premium-top-strip {
  background:
    linear-gradient(180deg, rgba(248, 252, 255, 0.94), rgba(234, 242, 250, 0.88));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow:
    0 12px 28px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255,255,255,0.8);
}

.top-left {
  min-width: 190px;
}

.top-title-block strong {
  display: block;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.top-subrow {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 4px;
}

.micro-text {
  font-size: 10px;
  color: #7d8ca0;
  font-weight: 800;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  font-size: 10px;
  padding: 4px 8px;
  font-weight: 950;
  line-height: 1;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 0 4px rgba(255,255,255,0.5);
}

.pill.ok,
.pill.admin-online {
  background: var(--ok-bg);
  color: var(--ok);
  box-shadow: 0 0 0 1px rgba(8,127,91,0.10), 0 0 20px var(--ok-glow);
}

.pill.admin-online .status-dot {
  animation: onlinePulse 1.8s infinite;
}

.pill.warn {
  background: var(--warn-bg);
  color: var(--warn);
}

.pill.bad,
.pill.admin-offline {
  background: var(--bad-bg);
  color: var(--bad);
}

@keyframes onlinePulse {
  0% { box-shadow: 0 0 0 0 rgba(8,127,91,0.36); }
  70% { box-shadow: 0 0 0 7px rgba(8,127,91,0); }
  100% { box-shadow: 0 0 0 0 rgba(8,127,91,0); }
}


/* =========================================================
   TAB BAR
========================================================= */

.tabbar {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 5px 3px;
  scrollbar-width: thin;
  scrollbar-color: rgba(42,71,104,0.24) transparent;
}

.tabbar::-webkit-scrollbar {
  height: 6px;
}

.tabbar::-webkit-scrollbar-thumb {
  background: rgba(42,71,104,0.24);
  border-radius: 999px;
}

.tabbar button {
  border: 1px solid rgba(215, 226, 238, 0.95);
  border-radius: 999px;
  background:
    linear-gradient(180deg, #ffffff, #f1f6fb);
  color: #5d6d83;
  font-weight: 950;
  white-space: nowrap;
  padding: 8px 12px;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.035);
  transition:
    background 0.12s ease,
    color 0.12s ease,
    transform 0.12s ease,
    border-color 0.12s ease;
}

.tabbar button:hover {
  transform: translateY(-1px);
  color: var(--brand);
}

.tabbar button.is-active {
  background:
    linear-gradient(135deg, #2f5279, #18314f);
  color: #fff;
  border-color: rgba(24, 49, 79, 0.78);
  box-shadow: 0 10px 24px rgba(42, 71, 104, 0.25);
}


/* =========================================================
   TOP ACTIONS / INTERNAL TOOLS
========================================================= */

.top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
}

.internal-tools {
  position: relative;
}

.internal-tools-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: 260px;
  padding: 8px;
  border-radius: 18px;
  border: 1px solid rgba(215,226,238,0.98);
  background: rgba(255,255,255,0.98);
  box-shadow: var(--shadow-lg);
  z-index: 100;
}

.internal-tools-menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 34px;
  padding: 8px 10px;
  border-radius: 12px;
  color: #203b59;
  text-decoration: none;
  font-size: 12px;
  font-weight: 850;
}

.internal-tools-menu a:hover {
  background: #eef6ff;
}

.internal-tools-menu hr {
  border: 0;
  border-top: 1px solid #e1e9f2;
  margin: 6px;
}

.session-box {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  white-space: nowrap;
}

.premium-session-box {
  border: 1px solid rgba(215,226,238,0.94);
  background: rgba(255,255,255,0.72);
  border-radius: 999px;
  padding: 5px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
}

.session-main {
  display: flex;
  align-items: baseline;
  gap: 7px;
  padding-left: 8px;
}

.session-box span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

#sessionCounter {
  color: #15263c;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

#sessionCounter.near-expiry {
  color: var(--bad);
  text-shadow: 0 0 18px var(--bad-glow);
  animation: sessionBlink 0.72s infinite;
}

#sessionCounter.expired {
  color: #fff;
  background: var(--bad);
  border-radius: 999px;
  padding: 2px 7px;
}

@keyframes sessionBlink {
  0%, 100% {
    opacity: 1;
    filter: saturate(1.1);
  }
  50% {
    opacity: 0.32;
    filter: saturate(2);
  }
}


/* =========================================================
   SESSION META BAR
========================================================= */

.session-meta-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 8px;
  margin: 10px 0;
}

.session-meta-item {
  min-width: 0;
  display: grid;
  gap: 3px;
  padding: 9px 11px;
  border: 1px solid rgba(215,226,238,0.96);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.94), rgba(247,250,253,0.88));
  box-shadow: var(--shadow-sm);
}

.session-meta-item span {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #728299;
}

.session-meta-item strong {
  min-width: 0;
  font-size: 12px;
  color: #132840;
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.global-status {
  margin: 10px 0;
  padding: 9px 12px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.96), rgba(248,250,252,0.86));
  border: 1px solid rgba(215,226,238,0.96);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
}


/* =========================================================
   SECTIONS
========================================================= */

.view-section {
  display: none;
  animation: sectionIn 0.16s ease-out;
}

.view-section.is-active {
  display: block;
}

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

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  margin: 14px 0 10px;
}

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

.compact-select {
  width: auto;
  min-width: 210px;
}


/* =========================================================
   CARDS / PANELS
========================================================= */

.card-grid {
  display: grid;
  gap: 9px;
}

.card-grid.compact {
  grid-template-columns: repeat(6, minmax(130px, 1fr));
}

.stat-card {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.96), rgba(247,250,253,0.88));
  border: 1px solid rgba(215,226,238,0.96);
  border-radius: 18px;
  padding: 13px;
  min-height: 82px;
  box-shadow: var(--shadow-sm);
}

.stat-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, #355a83, #8fb3d8);
  opacity: 0.75;
}

.stat-card span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.stat-card strong {
  display: block;
  margin-top: 8px;
  font-size: 23px;
  line-height: 1;
  letter-spacing: -0.04em;
}

.stat-card small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.panel {
  min-width: 0;
  background: var(--panel);
  border: 1px solid rgba(215,226,238,0.96);
  border-radius: 20px;
  padding: 14px;
  box-shadow: var(--shadow-sm);
}

.premium-panel {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.96), rgba(248,251,254,0.92));
  box-shadow:
    0 12px 34px rgba(15,23,42,0.06),
    inset 0 1px 0 rgba(255,255,255,0.78);
}

.compact-panel {
  padding: 12px;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.panel-head h3 {
  margin-bottom: 0;
}

.dashboard-grid {
  display: grid;
  gap: 10px;
}

.overview-grid {
  grid-template-columns: 1fr 1fr minmax(260px, 0.72fr);
  margin-top: 10px;
}

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

.settings-grid {
  grid-template-columns: 1.2fr 0.8fr;
}

.vein-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.vein-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 7px 10px;
  border-radius: 999px;
  background: #eef4fb;
  border: 1px solid #d8e3ef;
  color: #5f7188;
  font-size: 11px;
  font-weight: 900;
}

.vein-pill.is-live {
  background: var(--ok-bg);
  border-color: rgba(8,127,91,0.18);
  color: var(--ok);
}

.vein-pill.is-down {
  background: var(--bad-bg);
  border-color: rgba(201,42,42,0.18);
  color: var(--bad);
}


/* =========================================================
   FORMS
========================================================= */

.form-grid {
  display: grid;
  grid-template-columns: minmax(350px, 440px) minmax(0, 1fr);
  gap: 10px;
}

.compact-form-grid {
  grid-template-columns: minmax(350px, 430px) minmax(0, 1fr);
}

.form-grid.one-two {
  grid-template-columns: 1.35fr 0.65fr;
}

.form-panel.wide {
  max-width: none;
}

.fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.compact-fields input,
.compact-fields select {
  min-height: 36px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.fields textarea,
.fields .checkline {
  grid-column: span 2;
}

.single-row-fields {
  grid-template-columns: 1fr 1fr;
}

.single-row-fields textarea,
.single-row-fields .checkline {
  grid-column: auto;
}

.mini-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 10px;
}

.form-status {
  margin: 9px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.form-status.ok {
  color: var(--ok);
}

.form-status.error {
  color: var(--bad);
}

.inline-form {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.premium-inline-form input {
  min-width: 0;
  flex: 1;
}

.send-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.6fr);
  gap: 10px;
}

.contact-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 10px;
}

.security-layout {
  display: grid;
  grid-template-columns: 1fr 1fr 0.85fr;
  gap: 10px;
}


/* =========================================================
   CLIENT 360
========================================================= */

.client360-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.85fr) minmax(460px, 1.35fr) minmax(280px, 0.8fr);
  gap: 10px;
  align-items: start;
}

.compact-list-wrap {
  max-height: 420px;
}

.mini-card-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 8px 0 10px;
}

.mini-card {
  border: 1px solid #dce6f1;
  border-radius: 14px;
  background: #ffffff;
  padding: 9px;
  min-width: 0;
}

.mini-card span {
  display: block;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  color: #7b8999;
}

.mini-card strong {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: #142942;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-json {
  max-height: 520px;
}

.suggestion-box {
  min-height: 140px;
  max-height: 520px;
  overflow: auto;
  border-radius: 16px;
  border: 1px solid #dbe5ef;
  background:
    linear-gradient(180deg, #f8fafc, #ffffff);
  padding: 12px;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.55;
}

.suggestion-item {
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 1px solid #dce6f1;
  border-radius: 14px;
  background: #fff;
  margin-bottom: 8px;
}

.suggestion-item strong {
  color: #142942;
}

.suggestion-item.high {
  border-color: rgba(201,42,42,0.20);
  background: linear-gradient(180deg, #fff7f7, #fff);
}

.suggestion-item.medium {
  border-color: rgba(183,121,31,0.22);
  background: linear-gradient(180deg, #fffaf0, #fff);
}


/* =========================================================
   TABLES
========================================================= */

.table-wrap {
  width: 100%;
  max-height: 420px;
  overflow: auto;
  border: 1px solid rgba(215,226,238,0.98);
  border-radius: 15px;
  background: #fff;
}

.premium-table-wrap {
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
  scrollbar-width: thin;
  scrollbar-color: rgba(42,71,104,0.24) transparent;
}

.premium-table-wrap::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.premium-table-wrap::-webkit-scrollbar-thumb {
  background: rgba(42,71,104,0.22);
  border-radius: 999px;
}

.table-wrap.tall {
  max-height: calc(100vh - 250px);
  min-height: 360px;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 820px;
  background: #fff;
}

th,
td {
  text-align: left;
  border-bottom: 1px solid #e5edf5;
  padding: 8px 9px;
  vertical-align: top;
  font-size: 12px;
}

th {
  position: sticky;
  top: 0;
  z-index: 2;
  background:
    linear-gradient(180deg, #f8fbff, #eef5fc);
  color: #2f4056;
  font-size: 11px;
  font-weight: 950;
  white-space: nowrap;
  box-shadow: inset 0 -1px 0 #dce6f1;
}

td {
  color: #334155;
  max-width: 340px;
}

tr:hover td {
  background: #f8fbff;
}

td code,
.table-code {
  display: inline-flex;
  max-width: 100%;
  padding: 2px 6px;
  border-radius: 8px;
  background: #eef4fb;
  color: #173b72;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}


/* =========================================================
   JSON / CODE BOXES
========================================================= */

.json-box {
  width: 100%;
  margin: 0;
  background:
    linear-gradient(180deg, #0d1727, #0f172a);
  color: #dbeafe;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 15px;
  padding: 12px;
  overflow: auto;
  max-height: 520px;
  min-height: 150px;
  font-size: 11px;
  line-height: 1.5;
  white-space: pre-wrap;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.05),
    0 12px 30px rgba(15,23,42,0.08);
}

.json-box.small {
  max-height: 300px;
  min-height: 120px;
}

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

.compact-copy {
  margin-bottom: 10px;
  font-size: 12px;
}


/* =========================================================
   UTILITIES / STATES
========================================================= */

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

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 7px;
  font-size: 10px;
  font-weight: 900;
  background: #eef4fb;
  color: #34506d;
}

.badge.ok {
  background: var(--ok-bg);
  color: var(--ok);
}

.badge.warn {
  background: var(--warn-bg);
  color: var(--warn);
}

.badge.bad {
  background: var(--bad-bg);
  color: var(--bad);
}

.nowrap {
  white-space: nowrap;
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.soft-divider {
  height: 1px;
  background: #e3ebf4;
  margin: 10px 0;
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 1500px) {
  .card-grid.compact {
    grid-template-columns: repeat(4, minmax(130px, 1fr));
  }

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

  .overview-grid > :last-child {
    grid-column: span 2;
  }

  .client360-layout,
  .security-layout {
    grid-template-columns: 1fr 1fr;
  }

  .client360-layout > :last-child,
  .security-layout > :last-child {
    grid-column: span 2;
  }
}

@media (max-width: 1180px) {
  .top-strip {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .top-actions {
    justify-content: space-between;
  }

  .session-meta-strip {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }

  .form-grid,
  .compact-form-grid,
  .send-layout,
  .contact-layout,
  .two-panel-grid,
  .settings-grid {
    grid-template-columns: 1fr;
  }

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

  .overview-grid > :last-child {
    grid-column: auto;
  }
}

@media (max-width: 820px) {
  body {
    font-size: 12px;
  }

  .dashboard-view {
    padding: 0 6px 10px;
  }

  .top-strip {
    margin: 0 -6px;
    padding: 8px;
  }

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

  .premium-session-box {
    justify-content: space-between;
  }

  .session-meta-strip {
    grid-template-columns: 1fr;
  }

  .section-title {
    align-items: stretch;
    flex-direction: column;
  }

  .actions {
    flex-wrap: wrap;
  }

  .compact-select {
    width: 100%;
  }

  .card-grid.compact {
    grid-template-columns: repeat(2, minmax(130px, 1fr));
  }

  .fields,
  .mini-fields,
  .single-row-fields,
  .mini-card-row,
  .client360-layout,
  .security-layout {
    grid-template-columns: 1fr;
  }

  .fields textarea,
  .fields .checkline {
    grid-column: auto;
  }

  .client360-layout > :last-child,
  .security-layout > :last-child {
    grid-column: auto;
  }

  .inline-form,
  .premium-inline-form {
    flex-direction: column;
  }

  .table-wrap.tall {
    max-height: 540px;
  }
}

@media (max-width: 520px) {
  .login-card {
    padding: 18px;
    border-radius: 24px;
  }

  .login-brand-row {
    flex-direction: column;
  }

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

  .internal-tools-menu {
    right: auto;
    left: 0;
    width: min(280px, calc(100vw - 20px));
  }
}


/* =========================================================
   PRINT / SAFETY
========================================================= */

@media print {
  body {
    background: #fff;
  }

  .top-strip,
  .session-meta-strip,
  .global-status,
  .login-view,
  .actions,
  button {
    display: none !important;
  }

  .dashboard-view {
    padding: 0;
  }

  .panel,
  .stat-card {
    box-shadow: none;
    border-color: #ccc;
  }
}

.client360-layout {
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.6fr) !important;
}

.client360-layout > .panel:nth-child(3) {
  grid-column: 1 / -1;
}

.client360-premium-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

.client360-table-grid {
  grid-template-columns: 1fr !important;
}

.client360-layout,
.client360-layout > *,
.client360-visual-wrap,
.client360-premium-grid,
.client360-table-grid,
.client360-info-panel,
.client360-data-panel {
  min-width: 0 !important;
  max-width: 100%;
}

.client360-info-row strong {
  max-width: 58%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client360-nested-table {
  max-width: 100%;
  overflow: auto;
}

.client360-nested-table table {
  min-width: 760px;
}

.rewardSuggestionBox,
#rewardSuggestionBox {
  max-height: 260px;
  overflow: auto;
}