/* MobilSMS site styles on top of the Amava theme (dev/design/css); grown out of dev/mockups/assets/mockup.css.
   Colours are the theme's own: primary #292dc2, secondary #0084e9, dark #1d184a,
   green #06df9e, yellow #ffcc6f, red #ff6262, heading #1f194c, body #575a7b. */
:root {
  --ms-primary: #292dc2;
  --ms-secondary: #0084e9;
  --ms-dark: #1d184a;
  --ms-green: #06df9e;
  --ms-yellow: #ffcc6f;
  --ms-red: #ff6262;
  --ms-heading: #1f194c;
  --ms-body: #575a7b;
  --ms-line: #e9ecf5;
  --ms-soft: #f4f6fd;
}

/* ---------- logo ---------- */
.ms-logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 22px;
  color: #fff; text-decoration: none; letter-spacing: .2px; }
.ms-logo:hover { color: #fff; }
.ms-logo .mark { width: 34px; height: 34px; border-radius: 9px; background: #fff; display: inline-flex;
  align-items: center; justify-content: center; }
.ms-logo.dark { color: var(--ms-heading); }
.ms-logo.dark .mark { background: var(--ms-primary); }
.ms-logo.dark .mark svg path { fill: #fff; }

/* ---------- public site header ---------- */
.ms-header { position: absolute; top: 0; left: 0; right: 0; z-index: 10; padding: 22px 0; }
.ms-nav { display: flex; align-items: center; gap: 28px; }
.ms-nav a { color: rgba(255,255,255,.9); font-size: 14px; font-weight: 500; text-decoration: none; }
.ms-nav a:hover, .ms-nav a.active { color: #fff; }
.ms-nav .btn-login { border: 1px solid rgba(255,255,255,.6); padding: 7px 18px; border-radius: 4px; }
.ms-nav .btn-try { background: #fff; color: var(--ms-primary); padding: 8px 20px; border-radius: 4px; font-weight: 600; }

/* ---------- hero ---------- */
.ms-hero { position: relative; overflow: hidden; color: #fff; padding: 170px 0 140px;
  background: linear-gradient(120deg, #292dc2 0%, #1f3fd6 55%, #0084e9 100%); }
.ms-hero:after { content: ""; position: absolute; right: -160px; top: -120px; width: 620px; height: 620px;
  border-radius: 46% 54% 38% 62%; background: rgba(255,255,255,.06); }
.ms-hero.small { padding: 150px 0 80px; }
.ms-hero h1 { color: #fff; font-size: 46px; line-height: 1.2; font-weight: 700; }
.ms-hero h1 b { color: var(--ms-yellow); font-weight: 700; }
.ms-hero p.lead { color: rgba(255,255,255,.85); font-size: 18px; }
.ms-wave { display: block; width: 100%; height: 70px; margin-top: -69px; position: relative; z-index: 2; }

/* phone illustration */
.phone { width: 270px; height: 540px; border-radius: 38px; background: #12103a; padding: 14px;
  box-shadow: 0 30px 60px rgba(13,12,60,.35); position: relative; margin: 0 auto; z-index: 3; }
.phone .scr { background: #f4f6fd; border-radius: 28px; height: 100%; overflow: hidden; color: var(--ms-body); }
.phone .bar { background: var(--ms-primary); color: #fff; padding: 22px 16px 12px; font-size: 13px; font-weight: 600; }
.phone .bar small { display: block; opacity: .8; font-weight: 400; font-size: 11px; }
.phone .q { padding: 10px 12px; font-size: 11.5px; }
.phone .q .it { background: #fff; border-radius: 10px; padding: 8px 10px; margin-bottom: 8px; box-shadow: 0 2px 6px rgba(0,0,0,.05); }
.phone .q .it b { color: var(--ms-heading); display: block; font-size: 12px; }
.floating-card { position: absolute; background: #fff; color: var(--ms-heading); border-radius: 10px; padding: 12px 14px;
  box-shadow: 0 18px 40px rgba(13,12,60,.25); font-size: 13px; z-index: 4; }
.floating-card code { font-size: 11.5px; color: var(--ms-primary); }

/* ---------- sections ---------- */
.ms-section { padding: 90px 0; }
.ms-section.soft { background: var(--ms-soft); }
.ms-eyebrow { color: var(--ms-primary); font-size: 13px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; }
.feature-box { background: #fff; border-radius: 10px; padding: 32px 28px; height: 100%;
  box-shadow: 0 10px 30px rgba(31,25,76,.07); }
.feature-box .ic { width: 56px; height: 56px; border-radius: 12px; display: inline-flex; align-items: center;
  justify-content: center; background: rgba(41,45,194,.1); color: var(--ms-primary); font-size: 22px; margin-bottom: 18px; }
.step-num { width: 44px; height: 44px; border-radius: 50%; background: var(--ms-primary); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
.note-small { font-size: 13px; color: #8a8ca6; }

.code-block { background: #14123a; color: #d8dbff; border-radius: 10px; padding: 20px 22px; font-size: 13px;
  line-height: 1.65; overflow-x: auto; font-family: SFMono-Regular, Menlo, Consolas, monospace; }
.code-block .k { color: #7fd6ff; } .code-block .s { color: #9df5c4; } .code-block .c { color: #8b8fb8; }
.code-tabs .nav-link { color: var(--ms-body); font-size: 13px; padding: 6px 14px; }
.code-tabs .nav-link.active { background: var(--ms-primary); color: #fff; }

/* ---------- pricing ---------- */
.price-card { background: #fff; border-radius: 12px; padding: 40px 34px; box-shadow: 0 15px 40px rgba(31,25,76,.09); height: 100%; }
.price-card.featured { background: var(--ms-primary); color: rgba(255,255,255,.85); }
.price-card.featured h3, .price-card.featured .amount { color: #fff; }
.price-card .amount { font-size: 44px; font-weight: 700; color: var(--ms-heading); line-height: 1; }
.price-card .amount small { font-size: 15px; font-weight: 500; }
.price-card ul { list-style: none; padding: 0; margin: 24px 0; }
.price-card li { padding: 7px 0; font-size: 15px; }
.price-card li i { color: var(--ms-green); margin-right: 8px; }
.toggle-period { display: inline-flex; background: #fff; border-radius: 30px; padding: 5px; box-shadow: 0 6px 18px rgba(31,25,76,.08); }
.toggle-period span { padding: 8px 22px; border-radius: 30px; font-size: 14px; font-weight: 500; }
.toggle-period span.on { background: var(--ms-primary); color: #fff; }
.credit-table td, .credit-table th { padding: 14px 18px; }
.credit-table th { color: var(--ms-heading); font-weight: 600; }

/* ---------- footer ---------- */
.ms-footer { background: var(--ms-dark); color: rgba(255,255,255,.7); padding: 60px 0 24px; font-size: 14px; }
.ms-footer h6 { color: #fff; margin-bottom: 16px; }
.ms-footer a { color: rgba(255,255,255,.7); text-decoration: none; display: block; padding: 3px 0; }
.ms-footer .bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 40px; padding-top: 20px; font-size: 13px; }

/* ================= customer portal ================= */
body.portal { background: #f3f5fb; }
.p-shell { display: flex; min-height: 100vh; }
.p-side { width: 248px; background: var(--ms-dark); color: rgba(255,255,255,.75); flex-shrink: 0; padding: 22px 0; }
.p-side .ms-logo { padding: 0 22px 22px; font-size: 20px; }
.p-side .grp { font-size: 11px; text-transform: uppercase; letter-spacing: 1.2px; color: rgba(255,255,255,.4); padding: 18px 24px 6px; }
.p-side a { display: flex; align-items: center; gap: 12px; padding: 10px 24px; color: rgba(255,255,255,.75);
  font-size: 14px; text-decoration: none; border-left: 3px solid transparent; }
.p-side a i { width: 18px; text-align: center; }
.p-side a.active { background: rgba(255,255,255,.07); color: #fff; border-left-color: var(--ms-green); }
.p-side .dev-mini { margin: 26px 18px 0; background: rgba(255,255,255,.06); border-radius: 10px; padding: 12px 14px; font-size: 12.5px; }
.p-main { flex: 1; min-width: 0; }
.p-top { background: #fff; border-bottom: 1px solid var(--ms-line); padding: 14px 30px; display: flex; align-items: center; gap: 18px; }
.p-top .credits { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 13.5px; }
.p-top .credits b { color: var(--ms-heading); }
.p-top .avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--ms-primary); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: 14px; }
.p-content { padding: 26px 30px 40px; }
.p-content h1 { font-size: 24px; margin-bottom: 4px; }
.p-sub { color: #8a8ca6; font-size: 14px; }
.p-card { background: #fff; border-radius: 10px; box-shadow: 0 4px 18px rgba(31,25,76,.05); padding: 20px 22px; margin-bottom: 22px; }
.p-card h5 { font-size: 16px; margin-bottom: 14px; }
.p-btn { display: inline-flex; align-items: center; gap: 8px; background: var(--ms-primary); color: #fff; border: 0;
  border-radius: 6px; padding: 8px 16px; font-size: 13.5px; font-weight: 500; text-decoration: none; }
.p-btn.ghost { background: #fff; color: var(--ms-primary); border: 1px solid #cfd2f3; }
.p-btn.green { background: #05c48c; }
.p-btn.danger { background: #fff; color: #d64545; border: 1px solid #f3c4c4; }
.p-btn.sm { padding: 5px 11px; font-size: 12.5px; }
.badge-st { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 20px; }
.st-queued { background: #eef0ff; color: #3c3fb8; } .st-sending { background: #e5f3ff; color: #0a6fc4; }
.st-sent { background: #e6faf3; color: #058a63; } .st-delivered { background: #d3f6e9; color: #036b4c; }
.st-failed { background: #ffecec; color: #c43b3b; } .st-unknown { background: #fff4dc; color: #8a5a00; }
.st-expired, .st-cancelled { background: #f0f0f4; color: #6b6d86; }
.kpi { background: #fff; border-radius: 10px; padding: 18px 20px; box-shadow: 0 4px 18px rgba(31,25,76,.05); height: 100%; }
.kpi .lbl { font-size: 12.5px; color: #8a8ca6; }
.kpi .val { font-size: 26px; font-weight: 700; color: var(--ms-heading); line-height: 1.3; }
.kpi .val small { font-size: 14px; font-weight: 500; color: #8a8ca6; }
.meter { height: 8px; background: #eceefa; border-radius: 6px; overflow: hidden; display: flex; }
.meter span { display: block; height: 100%; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; }
.dot.on { background: #05c48c; box-shadow: 0 0 0 3px rgba(5,196,140,.18); } .dot.off { background: #c9cbe0; }
.p-table { width: 100%; font-size: 13.5px; border-collapse: collapse; }
.p-table th { font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: #8a8ca6; font-weight: 600;
  padding: 10px 12px; border-bottom: 1px solid var(--ms-line); white-space: nowrap; background: #fafbff; }
.p-table td { padding: 10px 12px; border-bottom: 1px solid #f1f2f8; color: #3d3f5c; white-space: nowrap; }
.p-table tr:hover td { background: #fafbff; }
.grid-wrap { overflow-x: auto; border: 1px solid var(--ms-line); border-radius: 8px; }
.grid-wrap .p-table td.sticky, .grid-wrap .p-table th.sticky { position: sticky; left: 0; background: #fff; z-index: 1; box-shadow: 1px 0 0 var(--ms-line); }
.grid-wrap .p-table th.sticky { background: #fafbff; }
.ftype { font-size: 10px; font-weight: 600; color: #8a8ca6; background: #f1f2f8; border-radius: 3px; padding: 1px 4px; margin-left: 4px; text-transform: none; letter-spacing: 0; }
.list-item { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-radius: 8px; font-size: 14px; color: #3d3f5c; text-decoration: none; }
.list-item.active { background: #eef0ff; color: var(--ms-primary); font-weight: 600; }
.list-item.sub { padding-left: 30px; font-size: 13px; }
.list-item .n { font-size: 12px; color: #8a8ca6; }
.filter-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.filter-row .form-select, .filter-row .form-control { font-size: 13px; padding: 6px 10px; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: #eef0ff; color: var(--ms-primary); border-radius: 16px;
  font-size: 12.5px; padding: 3px 10px; margin: 0 6px 6px 0; }
.var-chip { display: inline-block; background: #f1f2f8; color: #3d3f5c; border-radius: 4px; font-size: 12px; padding: 2px 7px; margin: 0 4px 4px 0; font-family: Menlo, monospace; }
.tpl-box { border: 1px solid #d9dcef; border-radius: 8px; padding: 14px; font-size: 14.5px; min-height: 110px; background: #fff; line-height: 1.7; }
.tpl-box .v { background: #eef0ff; color: var(--ms-primary); border-radius: 3px; padding: 0 3px; font-family: Menlo, monospace; font-size: 13px; }
.sms-bubble { background: #eef0ff; color: var(--ms-heading); border-radius: 14px 14px 14px 4px; padding: 10px 13px; font-size: 13.5px; max-width: 300px; }
.secret-box { font-family: Menlo, monospace; font-size: 13px; background: #f7f8fd; border: 1px dashed #cfd2f3; border-radius: 6px; padding: 9px 12px; }
.alert-soft { border-radius: 8px; padding: 12px 14px; font-size: 13.5px; }
.alert-soft.info { background: #eef6ff; color: #0a5b9e; } .alert-soft.warn { background: #fff6e2; color: #7a5200; }
.alert-soft.ok { background: #e7faf3; color: #04704f; }
.switch { display: inline-block; width: 38px; height: 21px; border-radius: 12px; background: #c9cbe0; position: relative; vertical-align: middle; }
.switch:after { content: ""; position: absolute; top: 3px; left: 3px; width: 15px; height: 15px; border-radius: 50%; background: #fff; }
.switch.on { background: #05c48c; } .switch.on:after { left: 20px; }
.qr { width: 150px; height: 150px; background:
  repeating-linear-gradient(90deg, #1d184a 0 6px, transparent 6px 12px),
  repeating-linear-gradient(0deg, #1d184a 0 6px, transparent 6px 14px); opacity: .85; border-radius: 6px; position: relative; }
.qr:before, .qr:after { content: ""; position: absolute; width: 38px; height: 38px; border: 7px solid #1d184a; background: #fff; }
.qr:before { top: 0; left: 0; } .qr:after { bottom: 0; right: 0; }
.form-label { font-size: 13px; font-weight: 500; color: var(--ms-heading); }
.form-control, .form-select { font-size: 14px; }

@media (max-width: 991px) {
  .p-side { display: none; }
  .ms-nav .hide-md { display: none; }
  .ms-hero h1 { font-size: 34px; }
}

/* portal density tweaks (the theme's body letter-spacing and tall inputs are for marketing pages) */
body.portal { letter-spacing: .15px; }
body.portal .form-control, body.portal .form-select { padding: 7px 11px; height: auto; min-height: 0; line-height: 1.4; }
.list-item .n { white-space: nowrap; margin-left: 8px; }
.p-card > .p-table td, .p-card > .p-table th { white-space: normal; padding: 9px 8px; }

/* ---------- auth pages (S1) ---------- */
.auth-hero { padding-bottom: 110px; }
section.auth-wrap { background: var(--ms-soft); padding: 0 0 80px; overflow: visible; z-index: 3; } /* the theme clips every section */
.auth-card { max-width: 480px; margin: -90px auto 0; background: #fff; border-radius: 12px; padding: 32px 30px;
  box-shadow: 0 18px 50px rgba(31,25,76,.12); position: relative; z-index: 4; }
.auth-msg { border-radius: 8px; padding: 11px 14px; font-size: 14px; margin-bottom: 16px; }
.auth-msg.err { background: #ffecec; color: #a32b2b; }
.auth-msg.ok { background: #e7faf3; color: #04704f; }
.field-err { color: #c43b3b; font-size: 12.5px; min-height: 0; }
.form-control.is-invalid { border-color: #e06464; }

/* ---------- portal shell additions (S1) ---------- */
.p-side .soon { display: flex; align-items: center; gap: 12px; padding: 10px 24px; color: rgba(255,255,255,.35);
  font-size: 14px; border-left: 3px solid transparent; cursor: default; }
.p-side .soon i { width: 18px; text-align: center; }
.p-side .soon { white-space: nowrap; }

/* S5 import wizard */
.imp-map td { vertical-align: top; white-space: normal; }
.imp-map .form-select, .imp-map .form-control { font-size: 13px; padding: 5px 9px; }
.imp-map .samples { color: #8a8ca6; font-size: 12.5px; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.imp-map tr.is-phone td { background: #f3fbf7; }
.imp-row-err td { color: #d64545; }
.imp-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.imp-stats .kpi { box-shadow: none; border: 1px solid var(--ms-line); padding: 12px 14px; }
.imp-stats .kpi .val { font-size: 22px; }
.imp-stats .kpi.warn .val { color: #d64545; }
.imp-consent { background: #fff8e8; border: 1px solid #f5dfa8; border-radius: 8px; padding: 12px 14px; font-size: 13.5px; }
.imp-spin { display: inline-block; width: 14px; height: 14px; border: 2px solid #cfd2f3; border-top-color: var(--ms-primary); border-radius: 50%; animation: impspin .8s linear infinite; vertical-align: -2px; margin-right: 6px; }
@keyframes impspin { to { transform: rotate(360deg); } }

/* S2: links inside running text (articles, API docs, feature boxes) */
.ms-article a:not(.butn), .feature-box p a, .p-card p a { color: var(--ms-primary); text-decoration: underline; text-underline-offset: 2px; }
.ms-article h2[id], .ms-article h3[id] { scroll-margin-top: 100px; }
