:root {
  color-scheme: light;
  font-family: Inter, Roboto, Arial, sans-serif;
  color: #172436;
  background: #f3f6fa;
  font-size: 15px;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 88% 0, #ffe9f3 0, transparent 28rem), #f3f6fa; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.cloud-root { min-height: 100vh; }
.login-shell { display: grid; min-height: 100vh; place-items: center; padding: 1.5rem; }
.login-card { width: min(100%, 28rem); padding: 2rem; border: 1px solid #dce3ec; border-radius: 1.25rem; background: #fff; box-shadow: 0 1.25rem 4rem #1b263c1a; }
.brand { display: flex; align-items: center; gap: .65rem; color: #b53778; font-weight: 800; font-size: 1.3rem; }
.brand-mark { display: grid; width: 2rem; height: 2rem; place-items: center; border-radius: 50%; color: #fff; background: #b53778; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: .35rem; font-size: clamp(1.45rem, 3vw, 2rem); }
h2 { font-size: 1.12rem; margin-bottom: .35rem; }
h3 { font-size: .92rem; margin-bottom: .25rem; }
.muted { color: #65758a; line-height: 1.45; }
.form-grid { display: grid; gap: .85rem; }
.field { display: grid; gap: .38rem; color: #445268; font-weight: 650; font-size: .84rem; }
input, select, textarea { width: 100%; min-height: 2.7rem; padding: .6rem .75rem; border: 1px solid #cbd7e5; border-radius: .55rem; color: #172436; background: #fff; outline: none; }
textarea { min-height: 6rem; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: #b53778; box-shadow: 0 0 0 3px #b5377820; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 2.65rem; padding: .55rem .9rem; border: 1px solid #d2dbe7; border-radius: .55rem; color: #273548; background: #fff; font-weight: 750; }
.button:hover { background: #f8fafc; }
.button.primary { border-color: #b53778; color: #fff; background: #b53778; }
.button.primary:hover { background: #952e64; }
.button.danger { color: #be3737; }
.button:disabled { cursor: wait; opacity: .6; }
.app-shell { min-height: 100vh; }
.topbar { position: sticky; z-index: 4; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem clamp(1rem, 3vw, 2.5rem); border-bottom: 1px solid #dce4ec; background: #fffefaed; backdrop-filter: blur(1rem); }
.topbar-actions, .scope-selects { display: flex; align-items: center; gap: .6rem; }
.scope-selects select { min-width: 11rem; min-height: 2.35rem; }
.workspace { width: min(100% - 2rem, 92rem); margin: 1.75rem auto 4rem; }
.headline { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; margin-bottom: 1rem; }
.headline > div { min-width: 0; }
.headline p { margin: 0; }
.status { display: inline-flex; gap: .4rem; align-items: center; padding: .4rem .65rem; border: 1px solid #a7e5ce; border-radius: 99rem; color: #13715a; background: #e8fbf3; font-size: .8rem; font-weight: 700; white-space: nowrap; }
.status::before { content: ''; width: .45rem; height: .45rem; border-radius: 50%; background: currentColor; }
.status.warn { color: #a16512; border-color: #f3d193; background: #fff8e9; }
.tabs { display: flex; gap: .35rem; overflow-x: auto; padding: .35rem; margin-bottom: 1rem; border-radius: .7rem; background: #e7edf4; }
.tabs button { flex: 0 0 auto; border: 0; border-radius: .48rem; background: transparent; color: #56657a; padding: .55rem .78rem; font-weight: 750; }
.tabs button[aria-selected="true"] { color: #172436; background: #fff; box-shadow: 0 .1rem .35rem #1724361a; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .85rem; margin-bottom: 1rem; }
.metric, .panel { border: 1px solid #dde5ee; border-radius: .9rem; background: #fff; box-shadow: 0 .15rem .45rem #182c4210; }
.metric { padding: 1rem; }
.metric-button { display: block; width: 100%; text-align: left; color: inherit; font: inherit; cursor: pointer; }
.metric-button:hover, .metric-button:focus-visible { border-color: #b53778; box-shadow: 0 .25rem .8rem #b5377826; outline: 0; }
.metric-button small { display: block; margin-top: .45rem; color: #b53778; font-weight: 750; }
.metric .number { display: block; margin-top: .3rem; color: #b53778; font-size: 1.6rem; font-weight: 850; }
.metric .caption { color: #65758a; font-weight: 650; font-size: .78rem; }
.panel { padding: 1.15rem; }
.panel + .panel { margin-top: 1rem; }
.panel-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .9rem; }
.panel-header > * { margin: 0; }
.two-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.three-columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; }
.list { display: grid; gap: .6rem; }
.list-item { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .75rem; border: 1px solid #e0e7ef; border-radius: .65rem; }
.list-item strong, .list-item small { display: block; }
.list-item small { margin-top: .2rem; color: #6b7a8e; }
.tag { display: inline-flex; align-items: center; padding: .2rem .45rem; border-radius: 99rem; background: #edf1f6; color: #45566d; font-size: .73rem; font-weight: 800; white-space: nowrap; }
.tag.online, .tag.scheduled, .tag.approved { color: #13715a; background: #e8fbf3; }
.tag.pending, .tag.requested { color: #9b6510; background: #fff5dd; }
.tag.failed, .tag.cancelled { color: #ae3939; background: #ffebec; }
.notice { padding: .8rem .9rem; border: 1px solid #c9daf4; border-radius: .65rem; color: #3a587c; background: #f4f9ff; line-height: 1.45; }
.notice.warning { border-color: #f5d393; color: #8c5b15; background: #fff9ed; }
.check-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: .5rem; max-height: 15rem; overflow: auto; padding: .25rem; }
.check { display: flex; gap: .55rem; align-items: center; padding: .55rem; border: 1px solid #dfe6ef; border-radius: .55rem; cursor: pointer; }
.check input { width: 1rem; min-height: auto; }
.pairing-code { padding: .85rem; border: 1px dashed #b53778; border-radius: .65rem; color: #8f235c; background: #fff4f9; font: 800 1rem ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .06em; word-break: break-all; }
.mapping-node { width: min(100%, 35rem); margin-top: 1rem; }
.compact-form { margin-bottom: 1rem; padding-bottom: 1rem; border-bottom: 1px solid #e4eaf1; }
.mapping-list { display: grid; gap: .55rem; max-height: 34rem; overflow: auto; padding-right: .2rem; }
.mapping-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(13rem, .85fr) auto; gap: .65rem; align-items: center; padding: .7rem; border: 1px solid #e0e7ef; border-radius: .65rem; background: #fff; }
.mapping-row strong, .mapping-row small { display: block; }
.mapping-row small { margin-top: .2rem; color: #6b7a8e; }
.mapping-row select { min-height: 2.45rem; }
.pricing-target-list, .pricing-subject-list { display: grid; gap: .5rem; max-height: 22rem; overflow: auto; padding-right: .2rem; }
.pricing-target-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .72rem; border: 1px solid #e0e7ef; border-radius: .65rem; background: #fff; }
.pricing-target-row.selected { border-color: #b53778; background: #fff7fb; }
.pricing-target-row strong, .pricing-target-row small, .pricing-campaign small { display: block; }
.pricing-target-row small, .pricing-campaign small { margin-top: .2rem; color: #6b7a8e; }
.pricing-target-actions, .pricing-list-actions, .pricing-campaign-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.pricing-list-actions { margin: .65rem 0; }
.pricing-subject-list .check { min-height: 2.65rem; }
.pricing-subject-list .check span { min-width: 0; }
.pricing-subject-list .check small { color: #6b7a8e; white-space: nowrap; }
.pricing-selection-columns > section { min-width: 0; }
.pricing-approval { align-self: end; min-height: 2.7rem; }
.pricing-campaign { padding: .85rem; border: 1px solid #e0e7ef; border-radius: .65rem; background: #fff; }
.pricing-campaign + .pricing-campaign { margin-top: .6rem; }
.pricing-campaign-targets { margin: .7rem 0; color: #445268; }
.pricing-campaign-targets summary { cursor: pointer; font-weight: 750; }
.pricing-campaign-targets .list-item { margin-top: .5rem; }
.pricing-failure { margin-top: .35rem !important; color: #ae3939 !important; font-weight: 700; }
.dialog-backdrop { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 1rem; background: #17243680; }
.dialog { display: flex; width: min(100%, 31rem); max-height: calc(100dvh - 2rem); flex-direction: column; padding: 1.2rem; border-radius: .9rem; background: #fff; box-shadow: 0 1.3rem 4rem #10182445; }
.dialog h2 { margin-bottom: .6rem; }
.dialog > h2, .dialog > .dialog-actions { flex-shrink: 0; }
.dialog .list-item { overflow-wrap: anywhere; }
.dialog .list-item > div { min-width: 0; }
.dialog-body { min-height: 0; overflow: auto; overscroll-behavior: contain; padding-right: .2rem; }
.dialog-actions { display: flex; justify-content: flex-end; gap: .6rem; margin-top: 1rem; }
.toast { position: fixed; z-index: 30; right: 1rem; bottom: 1rem; max-width: min(28rem, calc(100vw - 2rem)); padding: .8rem 1rem; border-radius: .65rem; color: #fff; background: #26384f; box-shadow: 0 .8rem 2rem #14213235; }
.toast.error { background: #aa3b4c; }
.empty { padding: 1.3rem; text-align: center; color: #69798d; border: 1px dashed #ced9e4; border-radius: .65rem; }
.hidden { display: none !important; }
@media (max-width: 850px) { .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } .two-columns, .three-columns, .mapping-row { grid-template-columns: 1fr; } .pricing-target-row { align-items: flex-start; flex-direction: column; } .topbar { align-items: flex-start; } .topbar-actions { flex-wrap: wrap; justify-content: flex-end; } }
@media (max-width: 580px) { .workspace { width: min(100% - 1rem, 92rem); margin-top: 1rem; } .topbar { padding: .7rem; } .topbar-actions, .scope-selects { width: 100%; justify-content: space-between; } .scope-selects select { min-width: 0; width: 100%; } .headline { display: block; } .headline .status { margin-top: .75rem; } .metrics { gap: .55rem; } .metric { padding: .75rem; } .metric .number { font-size: 1.3rem; } }
