.rlh-app {
  --rlh-navy: #071226;
  --rlh-navy-2: #0c1b34;
  --rlh-blue: #176bff;
  --rlh-blue-2: #4c8dff;
  --rlh-cyan: #16bce5;
  --rlh-violet: #7c67f2;
  --rlh-green: #1ab57c;
  --rlh-amber: #f3a61e;
  --rlh-red: #e55461;
  --rlh-ink: #13213a;
  --rlh-muted: #70809d;
  --rlh-line: #e5eaf2;
  --rlh-bg: #f4f7fb;
  --rlh-card: #ffffff;
  --rlh-shadow: 0 12px 32px rgba(17, 36, 71, .07);
  width: 100%;
  min-height: 900px;
  display: flex;
  position: relative;
  overflow: hidden;
  background: var(--rlh-bg);
  color: var(--rlh-ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.45;
  border-radius: 20px;
  box-shadow: 0 20px 70px rgba(7, 18, 38, .14);
}

.rlh-app *, .rlh-app *::before, .rlh-app *::after { box-sizing: border-box; }
.rlh-app button, .rlh-app input { font: inherit; }
.rlh-app button { color: inherit; }
.rlh-app h1, .rlh-app h2, .rlh-app h3, .rlh-app p, .rlh-app dl, .rlh-app dd { margin: 0; }
.rlh-app svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 2; }

.rlh-sidebar {
  width: 258px;
  flex: 0 0 258px;
  min-height: 900px;
  padding: 25px 18px 18px;
  color: #d8e2f5;
  background: linear-gradient(180deg, #08162c 0%, #071226 100%);
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 20;
}

.rlh-brand { display: flex; align-items: center; gap: 11px; padding: 0 8px 22px; }
.rlh-brand-mark { width: 38px; height: 38px; position: relative; transform: rotate(-18deg); }
.rlh-brand-mark span { position: absolute; width: 12px; height: 31px; border-radius: 8px; background: linear-gradient(#3b8cff, #1164ff); }
.rlh-brand-mark span:first-child { left: 6px; top: 4px; }
.rlh-brand-mark span:last-child { right: 6px; top: 4px; transform: rotate(36deg); background: linear-gradient(#80b2ff, #3f82f6); }
.rlh-brand strong { display: block; color: #fff; letter-spacing: 1.8px; font-size: 15px; line-height: 1.1; }
.rlh-brand small { color: #6f8caf; letter-spacing: 4px; font-size: 9px; }

.rlh-workspace { width: 100%; border: 1px solid rgba(122, 153, 199, .18); background: rgba(255,255,255,.055); border-radius: 12px; padding: 10px; display: grid; grid-template-columns: 38px 1fr 18px; align-items: center; gap: 9px; text-align: left; cursor: pointer; }
.rlh-workspace:hover { background: rgba(255,255,255,.09); }
.rlh-workspace-logo { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; font-size: 12px; color: white; background: linear-gradient(145deg, #1870ff, #0d4ebc); }
.rlh-workspace small, .rlh-workspace strong { display: block; }
.rlh-workspace small { color: #7187a8; font-size: 9px; text-transform: uppercase; letter-spacing: .7px; }
.rlh-workspace strong { color: #fff; font-size: 13px; margin-top: 1px; }

.rlh-nav { margin-top: 20px; flex: 1; }
.rlh-nav p { color: #566e91; font-size: 9px; letter-spacing: 1.2px; font-weight: 700; padding: 15px 11px 7px; }
.rlh-nav button, .rlh-sidebar-footer > button { width: 100%; height: 42px; border: 0; border-radius: 9px; background: transparent; color: #99acc8; display: flex; align-items: center; gap: 12px; padding: 0 12px; cursor: pointer; text-align: left; transition: .18s ease; }
.rlh-nav button > span, .rlh-sidebar-footer > button > span { width: 22px; text-align: center; color: #7f96b7; font-size: 18px; }
.rlh-nav button i { margin-left: auto; min-width: 24px; height: 20px; padding: 0 5px; display: grid; place-items: center; font-size: 9px; border-radius: 10px; font-style: normal; background: rgba(255,255,255,.07); }
.rlh-nav button:hover, .rlh-sidebar-footer > button:hover { color: #fff; background: rgba(255,255,255,.06); }
.rlh-nav button.is-active { color: #fff; font-weight: 650; background: linear-gradient(90deg, rgba(23,107,255,.26), rgba(23,107,255,.08)); box-shadow: inset 3px 0 0 #2f7eff; }
.rlh-nav button.is-active > span { color: #5a9bff; }

.rlh-sidebar-footer { border-top: 1px solid rgba(255,255,255,.08); padding-top: 11px; }
.rlh-help-card { margin-top: 12px; padding: 13px; border-radius: 12px; background: linear-gradient(145deg, rgba(30,107,239,.22), rgba(40,74,128,.15)); display: grid; grid-template-columns: 32px 1fr; gap: 8px; }
.rlh-help-card > span { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: #176bff; color: white; font-weight: 800; }
.rlh-help-card strong, .rlh-help-card small { display: block; }
.rlh-help-card strong { color: #fff; font-size: 11px; }
.rlh-help-card small { color: #7f96b7; font-size: 9px; }
.rlh-help-card button { grid-column: 1 / -1; height: 31px; border: 1px solid rgba(91,153,255,.4); border-radius: 8px; color: #b7d1ff; background: rgba(22,102,241,.16); cursor: pointer; }

.rlh-shell { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.rlh-topbar { height: 76px; padding: 0 31px; display: flex; align-items: center; justify-content: space-between; background: rgba(255,255,255,.92); border-bottom: 1px solid var(--rlh-line); backdrop-filter: blur(10px); }
.rlh-topbar-left { display: flex; gap: 12px; align-items: center; }
.rlh-topbar-left small, .rlh-topbar-left strong { display: block; }
.rlh-topbar-left small { color: #9aa6ba; font-size: 9px; text-transform: uppercase; letter-spacing: .8px; }
.rlh-topbar-left strong { font-size: 15px; }
.rlh-menu-button { display: none !important; }
.rlh-topbar-actions { display: flex; align-items: center; gap: 14px; }
.rlh-connection { padding: 7px 10px; border-radius: 9px; background: #fff8e7; color: #956513; border: 1px solid #f4dfac; font-size: 10px; font-weight: 700; }
.rlh-connection i { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: var(--rlh-amber); box-shadow: 0 0 0 3px rgba(243,166,30,.14); }
.rlh-icon-button { width: 36px; height: 36px; position: relative; border-radius: 10px; border: 1px solid var(--rlh-line); background: white; cursor: pointer; display: grid; place-items: center; }
.rlh-icon-button:hover { border-color: #b8c8e1; background: #f7f9fc; }
.rlh-icon-button b { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: var(--rlh-red); right: 7px; top: 7px; }
.rlh-user { display: flex; align-items: center; gap: 9px; padding-left: 12px; border-left: 1px solid var(--rlh-line); }
.rlh-user > span { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 10px; color: #fff; font-size: 11px; font-weight: 800; background: linear-gradient(145deg, #176bff, #0f51bb); }
.rlh-user strong, .rlh-user small { display: block; }
.rlh-user strong { font-size: 11px; }
.rlh-user small { color: var(--rlh-muted); font-size: 9px; }

.rlh-content { flex: 1; padding: 28px 31px 42px; overflow: auto; }
.rlh-view { display: none; animation: rlh-fade .25s ease; }
.rlh-view.is-active { display: block; }
@keyframes rlh-fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.rlh-page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 23px; }
.rlh-eyebrow { color: var(--rlh-blue); font-size: 9px; font-weight: 800; letter-spacing: 1.25px; }
.rlh-page-heading h1 { font-size: clamp(25px, 3vw, 34px); line-height: 1.12; letter-spacing: -.8px; color: #101d34; margin-top: 5px; }
.rlh-page-heading p { color: var(--rlh-muted); font-size: 12px; margin-top: 5px; }
.rlh-primary-button, .rlh-secondary-button { border: 0; border-radius: 10px; font-weight: 700; cursor: pointer; transition: .18s ease; }
.rlh-primary-button { height: 42px; padding: 0 18px; color: white !important; background: linear-gradient(135deg, #2174ff, #1057d5); box-shadow: 0 8px 18px rgba(23,107,255,.22); }
.rlh-primary-button:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(23,107,255,.3); }
.rlh-primary-button span { margin-right: 5px; font-size: 17px; }
.rlh-secondary-button { width: 100%; height: 38px; color: var(--rlh-blue); background: #eff5ff; }

.rlh-demo-banner { min-height: 60px; padding: 12px 15px; margin-bottom: 18px; display: flex; align-items: center; gap: 12px; background: #eef5ff; border: 1px solid #d8e7ff; border-radius: 12px; }
.rlh-demo-banner > span { width: 34px; height: 34px; flex: 0 0 auto; border-radius: 9px; display: grid; place-items: center; color: var(--rlh-blue); background: white; box-shadow: 0 4px 12px rgba(23,107,255,.1); }
.rlh-demo-banner div { flex: 1; }
.rlh-demo-banner strong { font-size: 11px; }
.rlh-demo-banner p { color: var(--rlh-muted); font-size: 10px; margin-top: 2px; }
.rlh-demo-banner button { border: 0; color: #39618f; background: transparent; cursor: pointer; font-size: 10px; font-weight: 700; }

.rlh-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin-bottom: 16px; }
.rlh-metrics article { min-width: 0; padding: 16px; background: var(--rlh-card); border: 1px solid var(--rlh-line); border-radius: 13px; box-shadow: var(--rlh-shadow); display: grid; grid-template-columns: 38px 1fr auto; gap: 11px; align-items: start; }
.rlh-metric-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; font-size: 18px; font-style: normal; }
.rlh-metric-icon.is-blue { color: #176bff; background: #eaf2ff; }
.rlh-metric-icon.is-violet { color: #765ce9; background: #f0edff; }
.rlh-metric-icon.is-cyan { color: #0fa7cb; background: #e8f9fd; }
.rlh-metric-icon.is-amber { color: #cf8500; background: #fff5dd; }
.rlh-metrics article div:nth-child(2) > span { display: block; color: #8794a9; font-size: 8px; font-weight: 800; letter-spacing: .55px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rlh-metrics article strong { display: block; font-size: 25px; letter-spacing: -.7px; margin-top: 2px; }
.rlh-metrics article small { display: block; color: #8995a8; font-size: 8.5px; margin-top: 1px; }
.rlh-metrics article small b { color: var(--rlh-green); }
.rlh-metrics article em { color: #99a6b9; font-style: normal; font-size: 13px; }

.rlh-dashboard-grid { display: grid; grid-template-columns: .92fr 1.45fr; gap: 16px; margin-bottom: 16px; }
.rlh-card { background: var(--rlh-card); border: 1px solid var(--rlh-line); border-radius: 14px; box-shadow: var(--rlh-shadow); }
.rlh-operation-card, .rlh-chart-card, .rlh-table-card { padding: 19px; }
.rlh-card-title { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 16px; }
.rlh-card-title h2 { color: #14223b; font-size: 14px; }
.rlh-card-title p { color: var(--rlh-muted); font-size: 9px; margin-top: 2px; }
.rlh-card-title > button { border: 0; background: transparent; color: var(--rlh-blue); font-size: 9px; font-weight: 700; cursor: pointer; }
.rlh-service-status { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 11px; margin-bottom: 10px; }
.rlh-service-status.is-warning { background: #fff8e8; border: 1px solid #f4e3ba; }
.rlh-service-logo { width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 9px; color: white; font-weight: 850; background: #20b885; }
.rlh-service-logo.is-dark { background: #192942; }
.rlh-service-logo.is-cyan { background: #16a8c9; font-size: 9px; }
.rlh-service-status div { flex: 1; }
.rlh-service-status strong, .rlh-service-status small { display: block; }
.rlh-service-status strong { font-size: 10px; }
.rlh-service-status small { color: #98825f; font-size: 8.5px; }
.rlh-service-status > b { color: #a16b09; font-size: 8px; letter-spacing: .5px; }
.rlh-service-list { margin-bottom: 13px; }
.rlh-service-list > div, .rlh-setting-row { display: flex; align-items: center; gap: 10px; padding: 9px 1px; border-bottom: 1px solid #eff2f6; }
.rlh-service-list > div > span { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 8px; background: #f1f5fa; color: #547092; }
.rlh-service-list p, .rlh-setting-row div { flex: 1; }
.rlh-service-list strong, .rlh-service-list small, .rlh-setting-row strong, .rlh-setting-row small { display: block; }
.rlh-service-list strong, .rlh-setting-row strong { font-size: 9.5px; }
.rlh-service-list small, .rlh-setting-row small { color: var(--rlh-muted); font-size: 8px; }
.rlh-service-list b { font-size: 8px; }
.rlh-app .is-ok { color: var(--rlh-green) !important; }
.rlh-app .is-neutral { color: #687896 !important; }
.rlh-app .is-warning { color: var(--rlh-amber) !important; }

.rlh-chart { min-height: 180px; display: grid; grid-template-columns: 28px 1fr; gap: 8px; padding-top: 4px; }
.rlh-chart-y { display: flex; flex-direction: column; justify-content: space-between; color: #a0aabc; font-size: 8px; padding-bottom: 21px; text-align: right; }
.rlh-bars { min-width: 0; display: grid; grid-template-columns: repeat(7, 1fr); gap: clamp(7px, 2vw, 18px); align-items: end; border-bottom: 1px solid #e3e8f0; background: repeating-linear-gradient(to bottom, #edf1f6 0, #edf1f6 1px, transparent 1px, transparent 52px); }
.rlh-bars div { height: 174px; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; }
.rlh-bars i { width: min(27px, 75%); height: var(--bar); min-height: 4px; display: block; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, #4c8dff, #176bff); box-shadow: 0 5px 10px rgba(23,107,255,.12); }
.rlh-bars div:last-child i { background: #cbd8ec; box-shadow: none; }
.rlh-bars span { color: #8d99ac; font-size: 7px; }

.rlh-table-wrap { overflow-x: auto; }
.rlh-table-card table { width: 100%; min-width: 720px; border-collapse: collapse; }
.rlh-table-card th { color: #8d99ac; font-size: 8px; letter-spacing: .5px; text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--rlh-line); }
.rlh-table-card td { padding: 11px 10px; border-bottom: 1px solid #eef2f6; color: #61708a; font-size: 9px; }
.rlh-table-card td:first-child { display: flex; align-items: center; gap: 9px; min-width: 180px; }
.rlh-table-card td strong, .rlh-table-card td small { display: block; }
.rlh-table-card td strong { color: #1b2940; font-size: 9.5px; }
.rlh-table-card td small { color: #909caf; font-size: 7.5px; }
.rlh-table-icon, .rlh-avatar { width: 32px; height: 32px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 9px; font-weight: 800; font-size: 9px; }
.rlh-table-icon.is-blue, .rlh-avatar.is-blue { color: #176bff; background: #e9f2ff; }
.rlh-table-icon.is-violet, .rlh-avatar.is-violet { color: #765ce9; background: #f0edff; }
.rlh-table-icon.is-cyan, .rlh-avatar.is-cyan { color: #0d9cbd; background: #e7f9fd; }
.rlh-status { display: inline-flex; align-items: center; padding: 4px 8px; border-radius: 12px; font-size: 7.5px; white-space: nowrap; }
.rlh-status.is-active { color: #0d8b5e; background: #e8f8f2; }
.rlh-status.is-paused { color: #a36b05; background: #fff4dc; }
.rlh-status.is-neutral { color: #66758c; background: #edf1f6; }
.rlh-table-card td:last-child button { border: 0; background: transparent; cursor: pointer; color: #8490a5; }

.rlh-toolbar { display: flex; gap: 10px; margin-bottom: 15px; }
.rlh-toolbar label { min-width: 240px; flex: 1; height: 42px; padding: 0 13px; display: flex; align-items: center; gap: 8px; border-radius: 10px; border: 1px solid var(--rlh-line); background: white; color: #8390a5; }
.rlh-toolbar input { width: 100%; border: 0; outline: 0; color: var(--rlh-ink); background: transparent; }
.rlh-toolbar button, .rlh-tabs button { height: 42px; padding: 0 14px; border: 1px solid var(--rlh-line); border-radius: 10px; background: white; color: #61708a; cursor: pointer; }
.rlh-collection { display: grid; gap: 10px; }
.rlh-collection article { min-height: 72px; padding: 14px 16px; display: flex; align-items: center; gap: 12px; border: 1px solid var(--rlh-line); border-radius: 13px; background: white; box-shadow: var(--rlh-shadow); }
.rlh-collection article.is-hidden { display: none; }
.rlh-collection article div { flex: 1; }
.rlh-collection article strong, .rlh-collection article small { display: block; }
.rlh-collection article strong { font-size: 11px; }
.rlh-collection article small { color: var(--rlh-muted); font-size: 9px; margin-top: 2px; }
.rlh-collection article > button { border: 0; background: #eff5ff; color: var(--rlh-blue); border-radius: 8px; padding: 7px 11px; font-size: 9px; font-weight: 700; cursor: pointer; }

.rlh-campaign-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.rlh-campaign-card, .rlh-create-card { min-height: 230px; padding: 18px; border-radius: 14px; background: white; border: 1px solid var(--rlh-line); box-shadow: var(--rlh-shadow); }
.rlh-campaign-card > div:first-child { display: flex; justify-content: space-between; align-items: center; }
.rlh-campaign-card h2 { margin-top: 17px; font-size: 15px; }
.rlh-campaign-card > p { color: var(--rlh-muted); font-size: 10px; margin-top: 4px; }
.rlh-campaign-card dl { display: grid; grid-template-columns: 1fr 1fr; margin-top: 21px; padding: 12px 0; border-top: 1px solid var(--rlh-line); border-bottom: 1px solid var(--rlh-line); }
.rlh-campaign-card dt { color: #94a0b3; font-size: 8px; }
.rlh-campaign-card dd { font-size: 10px; font-weight: 700; margin-top: 3px; }
.rlh-campaign-card > button { margin-top: 13px; border: 0; background: transparent; color: var(--rlh-blue); font-size: 9px; font-weight: 750; cursor: pointer; }
.rlh-create-card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border-style: dashed; box-shadow: none; cursor: pointer; color: var(--rlh-muted); }
.rlh-create-card:hover { border-color: var(--rlh-blue); background: #f7faff; }
.rlh-create-card > span { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; color: var(--rlh-blue); background: #eaf2ff; font-size: 22px; }
.rlh-create-card strong { color: var(--rlh-ink); }
.rlh-create-card small { font-size: 9px; }

.rlh-tabs { display: flex; gap: 8px; margin-bottom: 15px; overflow-x: auto; }
.rlh-tabs button { white-space: nowrap; }
.rlh-tabs button.is-active { color: var(--rlh-blue); border-color: #bdd4ff; background: #eef5ff; }
.rlh-tabs b { margin-left: 5px; font-size: 8px; }
.rlh-message-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.rlh-message-grid article { padding: 18px; border-radius: 14px; background: white; border: 1px solid var(--rlh-line); box-shadow: var(--rlh-shadow); }
.rlh-message-grid article > span { color: var(--rlh-blue); background: #eef5ff; border-radius: 9px; padding: 4px 8px; font-size: 8px; }
.rlh-message-grid h3 { font-size: 13px; margin-top: 16px; }
.rlh-message-grid p { color: var(--rlh-muted); font-size: 9px; margin-top: 5px; }
.rlh-message-grid footer { display: flex; align-items: center; justify-content: space-between; margin-top: 20px; padding-top: 12px; border-top: 1px solid var(--rlh-line); }
.rlh-message-grid footer small { color: #8d99ac; font-size: 8px; }
.rlh-message-grid footer button { border: 0; background: transparent; color: var(--rlh-blue); font-size: 9px; font-weight: 700; cursor: pointer; }
.rlh-media-placeholder { height: 90px; border-radius: 10px; margin-top: 12px; display: grid; place-items: center; color: #7d94b5; background: linear-gradient(145deg, #e9f2ff, #f3f6fa); font-size: 28px; }

.rlh-split-cards, .rlh-settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.rlh-split-cards article { padding: 24px; }
.rlh-split-cards h2 { margin-top: 16px; font-size: 16px; }
.rlh-split-cards p { min-height: 46px; color: var(--rlh-muted); font-size: 10px; margin-top: 5px; }
.rlh-split-cards button { margin-top: 17px; border: 0; border-radius: 9px; padding: 9px 13px; color: var(--rlh-blue); background: #eef5ff; font-size: 9px; font-weight: 700; cursor: pointer; }

.rlh-automation-list, .rlh-timeline { display: grid; gap: 10px; }
.rlh-automation-list article { min-height: 74px; padding: 14px 17px; display: grid; grid-template-columns: 20px 1fr auto auto; align-items: center; gap: 13px; border: 1px solid var(--rlh-line); border-radius: 13px; background: white; box-shadow: var(--rlh-shadow); }
.rlh-automation-list article > span { font-size: 10px; }
.rlh-automation-list article > span.is-active { color: var(--rlh-green); }
.rlh-automation-list article > span.is-paused { color: var(--rlh-amber); }
.rlh-automation-list strong, .rlh-automation-list small { display: block; }
.rlh-automation-list strong { font-size: 11px; }
.rlh-automation-list small { color: var(--rlh-muted); font-size: 8.5px; }
.rlh-automation-list article > b { color: #71809a; font-size: 8px; }
.rlh-automation-list button { border: 0; border-radius: 8px; padding: 7px 10px; color: var(--rlh-blue); background: #eef5ff; font-size: 8px; cursor: pointer; }
.rlh-timeline { position: relative; }
.rlh-timeline::before { content: ""; position: absolute; left: 22px; top: 28px; bottom: 28px; width: 1px; background: #dfe5ee; }
.rlh-timeline article { position: relative; display: flex; align-items: flex-start; gap: 14px; padding: 15px 18px; border-radius: 13px; background: white; border: 1px solid var(--rlh-line); }
.rlh-timeline article > span { z-index: 1; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; color: #68809f; background: #eff3f8; }
.rlh-timeline strong { font-size: 11px; }
.rlh-timeline p { color: var(--rlh-muted); font-size: 9px; margin-top: 2px; }
.rlh-timeline small { color: #9ca7b8; font-size: 8px; }

.rlh-settings-grid article { padding: 21px; }
.rlh-settings-grid h2 { font-size: 14px; margin-bottom: 16px; }
.rlh-settings-grid label { display: block; color: #75839a; font-size: 9px; margin-bottom: 13px; }
.rlh-settings-grid input, .rlh-color-field { width: 100%; height: 39px; margin-top: 5px; padding: 0 11px; display: flex; align-items: center; border: 1px solid var(--rlh-line); border-radius: 9px; color: #26354f; background: #f8fafc; }
.rlh-color-field i { width: 15px; height: 15px; margin-right: 8px; border-radius: 5px; background: var(--rlh-blue); }
.rlh-setting-row:last-child { border: 0; }

.rlh-modal { position: fixed; z-index: 99999; inset: 0; display: none; align-items: center; justify-content: center; padding: 20px; }
.rlh-modal.is-open { display: flex; }
.rlh-modal-backdrop { position: absolute; inset: 0; background: rgba(3,12,28,.7); backdrop-filter: blur(5px); }
.rlh-modal-card { position: relative; z-index: 1; width: min(520px, 100%); padding: 28px; border-radius: 18px; background: white; box-shadow: 0 30px 90px rgba(0,0,0,.25); }
.rlh-modal-close { position: absolute; right: 16px; top: 13px; border: 0; background: transparent; color: #78869d; font-size: 26px; cursor: pointer; }
.rlh-modal-card h2 { font-size: 22px; margin-top: 6px; }
.rlh-modal-card > p { color: var(--rlh-muted); font-size: 11px; margin-top: 6px; }
.rlh-modal-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 21px; }
.rlh-modal-options button { min-height: 130px; padding: 15px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; border-radius: 13px; border: 1px solid var(--rlh-line); background: #fbfcfe; cursor: pointer; }
.rlh-modal-options button:hover { border-color: #a9c6fb; background: #f5f9ff; }
.rlh-modal-options span { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; }
.rlh-modal-options span.is-blue { color: var(--rlh-blue); background: #eaf2ff; }
.rlh-modal-options span.is-violet { color: var(--rlh-violet); background: #f0edff; }
.rlh-modal-options strong { margin-top: 11px; }
.rlh-modal-options small { color: var(--rlh-muted); font-size: 9px; margin-top: 2px; }
.rlh-toast { position: fixed; z-index: 100000; right: 24px; bottom: 24px; max-width: min(380px, calc(100vw - 48px)); padding: 12px 16px; border-radius: 11px; color: white; background: #102341; box-shadow: 0 15px 45px rgba(7,18,38,.25); font-size: 10px; opacity: 0; pointer-events: none; transform: translateY(8px); transition: .2s ease; }
.rlh-toast.is-visible { opacity: 1; transform: none; }
.rlh-mobile-backdrop { display: none; }
.rlh-access-message { padding: 18px; border-radius: 10px; color: #3f4d63; background: #f3f6fa; border: 1px solid #e1e7f0; }
.rlh-empty-state { grid-column: 1 / -1; padding: 28px; border: 1px dashed #d6deea; border-radius: 12px; color: var(--rlh-muted); background: #fbfcfe; text-align: center; font-size: 10px; }

@media (max-width: 1120px) {
  .rlh-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rlh-dashboard-grid { grid-template-columns: 1fr; }
  .rlh-campaign-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .rlh-app { min-height: 760px; border-radius: 12px; }
  .rlh-sidebar { position: absolute; inset: 0 auto 0 0; min-height: 100%; transform: translateX(-102%); transition: transform .22s ease; box-shadow: 20px 0 60px rgba(0,0,0,.25); }
  .rlh-sidebar.is-open { transform: none; }
  .rlh-mobile-backdrop { position: absolute; z-index: 15; inset: 0; background: rgba(0,8,22,.54); }
  .rlh-app.is-sidebar-open .rlh-mobile-backdrop { display: block; }
  .rlh-menu-button { display: grid !important; }
  .rlh-topbar { padding: 0 18px; }
  .rlh-content { padding: 22px 18px 34px; }
  .rlh-user div, .rlh-connection { display: none; }
  .rlh-campaign-grid, .rlh-message-grid, .rlh-split-cards, .rlh-settings-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .rlh-topbar-actions { gap: 8px; }
  .rlh-topbar-left small { display: none; }
  .rlh-page-heading { align-items: flex-start; flex-direction: column; }
  .rlh-primary-button { width: 100%; }
  .rlh-demo-banner { align-items: flex-start; }
  .rlh-demo-banner button { display: none; }
  .rlh-metrics { grid-template-columns: 1fr; }
  .rlh-toolbar { flex-wrap: wrap; }
  .rlh-toolbar label { min-width: 100%; }
  .rlh-toolbar button { flex: 1; }
  .rlh-collection article { flex-wrap: wrap; }
  .rlh-collection article div { min-width: calc(100% - 60px); }
  .rlh-collection article > button { margin-left: 44px; }
  .rlh-automation-list article { grid-template-columns: 20px 1fr; }
  .rlh-automation-list article > b, .rlh-automation-list article > button { grid-column: 2; justify-self: start; }
  .rlh-modal-options { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .rlh-app *, .rlh-app *::before, .rlh-app *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

.rlh-draft-modal-card { width: min(640px, 100%); max-height: min(88vh, 760px); overflow-y: auto; }
.rlh-draft-form { display: grid; gap: 14px; margin-top: 20px; }
.rlh-draft-form label { display: grid; gap: 6px; color: #5f6f87; font-size: 9px; font-weight: 750; letter-spacing: .2px; }
.rlh-draft-form input, .rlh-draft-form select, .rlh-draft-form textarea { width: 100%; min-height: 42px; padding: 10px 12px; border: 1px solid var(--rlh-line); border-radius: 10px; color: var(--rlh-ink); background: #fbfcfe; font: inherit; outline: none; }
.rlh-draft-form textarea { min-height: 130px; resize: vertical; }
.rlh-draft-form input:focus, .rlh-draft-form select:focus, .rlh-draft-form textarea:focus { border-color: #8eb6ff; box-shadow: 0 0 0 3px rgba(23,107,255,.1); background: #fff; }
.rlh-draft-form-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 12px; }
.rlh-draft-form-note { padding: 10px 12px; border-radius: 9px; color: #51627a; background: #eef5ff; font-size: 9px; }
.rlh-draft-form-actions { display: grid; grid-template-columns: 1fr 1.3fr; gap: 10px; margin-top: 2px; }
.rlh-draft-form-actions .rlh-secondary-button, .rlh-draft-form-actions .rlh-primary-button { width: 100%; }
.rlh-draft-form button:disabled { cursor: wait; opacity: .65; }
.rlh-draft-groups-fieldset { min-width: 0; margin: 0; padding: 12px; border: 1px solid var(--rlh-line); border-radius: 10px; background: #fbfcfe; }
.rlh-draft-groups-fieldset legend { padding: 0 5px; color: #5f6f87; font-size: 9px; font-weight: 750; }
.rlh-draft-group-search { height: 38px; padding: 0 10px; display: flex !important; grid-template-columns: auto 1fr; align-items: center; gap: 7px; border: 1px solid var(--rlh-line); border-radius: 9px; background: #fff; }
.rlh-draft-group-search input { min-height: 34px; padding: 5px 0; border: 0; box-shadow: none !important; }
.rlh-draft-groups { max-height: 170px; margin-top: 9px; overflow-y: auto; display: grid; gap: 5px; }
.rlh-draft-groups > label { min-height: 34px; padding: 7px 9px; display: flex; grid-template-columns: auto 1fr; align-items: center; gap: 8px; border-radius: 8px; color: var(--rlh-ink); background: #fff; cursor: pointer; }
.rlh-draft-groups > label:hover { background: #eef5ff; }
.rlh-draft-groups > label.is-hidden { display: none; }
.rlh-draft-groups input { width: 16px; min-height: 16px; margin: 0; accent-color: var(--rlh-blue); }
.rlh-draft-groups-fieldset > small { display: block; margin-top: 8px; color: var(--rlh-blue); font-size: 9px; font-weight: 700; }
.rlh-draft-card-actions { display: inline-flex; align-items: center; gap: 8px; }
.rlh-message-grid footer .rlh-draft-card-actions button { padding: 4px 0; }
.rlh-message-grid footer .rlh-draft-card-actions button.is-danger { color: var(--rlh-red); }
.rlh-heading-actions { display: flex; align-items: center; gap: 10px; }
.rlh-draft-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 22px; }
.rlh-draft-summary > div { padding: 18px 12px; border: 1px solid var(--rlh-line); border-radius: 12px; background: #f8fafc; text-align: center; }
.rlh-draft-summary strong, .rlh-draft-summary span { display: block; }
.rlh-draft-summary strong { color: var(--rlh-ink); font-size: 25px; }
.rlh-draft-summary span { margin-top: 4px; color: var(--rlh-muted); font-size: 9px; }
.rlh-safe-note { margin-top: 14px; padding: 10px 12px; border-radius: 9px; color: #51627a; background: #eef5ff; font-size: 9px; }
.rlh-template-library { margin-top: 18px; padding: 20px; }
.rlh-template-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.rlh-template-grid article { padding: 15px; border: 1px solid var(--rlh-line); border-radius: 12px; background: #fbfcfe; }
.rlh-template-grid article > span { color: var(--rlh-blue); font-size: 8px; font-weight: 800; text-transform: uppercase; }
.rlh-template-grid h3 { margin: 7px 0 4px; font-size: 12px; }
.rlh-template-grid p { min-height: 40px; color: var(--rlh-muted); font-size: 9px; }
.rlh-template-grid footer { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
.rlh-template-grid footer small { color: #8d99ac; font-size: 8px; }
.rlh-template-grid footer button { border: 0; color: var(--rlh-blue); background: transparent; font-size: 9px; font-weight: 700; cursor: pointer; }
.rlh-media-field { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.rlh-media-field .rlh-secondary-button { width: auto; white-space: nowrap; }
.rlh-message-preview { padding: 13px; border-radius: 12px; background: #e8f4ec; }
.rlh-message-preview > small { display: block; margin-bottom: 8px; color: #3f6b4b; font-size: 8px; font-weight: 800; }
.rlh-message-preview > div { max-width: 88%; margin-left: auto; padding: 11px 13px; border-radius: 11px 11px 2px 11px; color: #203b28; background: white; box-shadow: 0 2px 8px rgba(20,50,28,.08); }
.rlh-message-preview p { white-space: pre-wrap; font-size: 10px; }
.rlh-message-preview span { display: block; margin-top: 7px; color: var(--rlh-blue); font-size: 8px; overflow-wrap: anywhere; }
.rlh-confirm-row { display: flex !important; grid-template-columns: auto 1fr; align-items: flex-start; gap: 9px !important; padding: 11px; border: 1px solid #cddbeb; border-radius: 10px; background: #f8fbff; }
.rlh-confirm-row input { width: 17px; min-height: 17px; margin-top: 1px; accent-color: var(--rlh-blue); }
.rlh-confirm-row span { line-height: 1.45; }
.rlh-switch-row { display: flex !important; align-items: center; justify-content: space-between; gap: 14px; padding: 12px; border: 1px solid var(--rlh-line); border-radius: 10px; }
.rlh-switch-row strong, .rlh-switch-row small { display: block; }
.rlh-switch-row small { margin-top: 2px; color: var(--rlh-muted); }
.rlh-switch-row input { width: 20px; height: 20px; min-height: 20px; margin: 0; accent-color: var(--rlh-blue); }
.rlh-toolbar select { min-height: 38px; padding: 0 11px; border: 1px solid var(--rlh-line); border-radius: 9px; color: var(--rlh-ink); background: white; font-size: 9px; }
.rlh-draft-form-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rlh-app, .rlh-shell, .rlh-content, .rlh-view { min-width: 0; max-width: 100%; }
.rlh-table-wrap, .rlh-message-grid, .rlh-campaign-grid { max-width: 100%; }

@media (max-width: 560px) {
  .rlh-draft-modal-card { padding: 22px 18px; }
  .rlh-draft-form-grid, .rlh-draft-form-actions { grid-template-columns: 1fr; }
  .rlh-heading-actions { width: 100%; flex-direction: column; }
  .rlh-heading-actions > * { width: 100%; }
  .rlh-draft-summary, .rlh-template-grid { grid-template-columns: 1fr; }
  .rlh-media-field { grid-template-columns: 1fr; }
  .rlh-media-field .rlh-secondary-button { width: 100%; }
  .rlh-modal { padding: 10px; }
  .rlh-modal-card { max-height: 92vh; padding: 22px 16px; overflow-y: auto; }
  .rlh-message-grid footer { align-items: flex-start; gap: 10px; flex-direction: column; }
  .rlh-draft-card-actions { width: 100%; flex-wrap: wrap; }
}
