/* YouMonit – brand overrides on top of Tabler 1.4 (loaded after tabler.min.css) */

:root {
    --ym-primary:       #4CAF87;
    --ym-primary-dark:  #15803D;
    --ym-primary-light: #86EFAC;
    --ym-primary-faded: #E8F5E9;
    --ym-accent:        #0EA5E9;
    --ym-secondary:     #8B5CF6;
    --ym-danger:        #EF4444;
    --ym-warning:       #FACC15;
    --ym-success:       #10B981;
    --ym-text:          #26282d;
    --ym-bg-app:        #F8FAFC;
    --ym-bg-page:       #eff5f3;

    /* Tabler CSS-variable overrides */
    --tblr-primary:        #4CAF87;
    --tblr-primary-rgb:    76, 175, 135;
    --tblr-primary-darken: #15803D;
    --tblr-primary-fg:     #ffffff;
    --tblr-success:        #10B981;
    --tblr-danger:         #EF4444;
    --tblr-warning:        #f59f00;
    --tblr-info:           #0EA5E9;
}

/* Primary typeface — Host Grotesk for every UI surface, monospace stays
   system. Applied with high specificity so it beats Tabler's own font stack. */
:root,
:host,
body,
.btn,
.form-control,
.form-select,
.nav-link,
.navbar,
.card-title,
h1, h2, h3, h4, h5, h6 {
    font-family: "Host Grotesk", -apple-system, BlinkMacSystemFont,
                 "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}
:root { --ym-font-display: "Host Grotesk", system-ui, sans-serif; }
body {
    font-feature-settings: "ss01", "cv11";
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3 { letter-spacing: -0.012em; font-weight: 700; }
h1 { font-weight: 800; }
.lead { font-weight: 400; }

/* Tabler reserves scrollbar space on :root via `margin-left: calc(100vw - 100%)`
   to stop layout jumping when modals open. The side effect is a permanent
   ~17px right shift on every page. Cancel it. */
@media (min-width: 992px) {
    :host, :root {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

/* Cap marketing (frontend) content at 1280px and centre it. Tabler's
   `.layout-fluid [class^=container-]` rule overrides container max-width to
   100%, so we need the same selector chain to win — last write of equal
   specificity takes effect. Doesn't touch the /app side because the app
   layout doesn't add `layout-fluid` to body. */
body.layout-fluid .container,
body.layout-fluid [class*=" container-"],
body.layout-fluid [class^=container-] {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
}

/* `.container-tight` is Tabler's narrow box (sign-in card, invitation card,
   etc). Keep it tight even when the 1280px cap above would otherwise apply. */
.container-tight { max-width: 30rem !important; }

/* Tabler centres .container-xl inside .page-wrapper, which leaves a thin gap
   between the sidebar and the content. Snap content flush against the
   sidebar; keep the topbar's container-xl behaving the same way. */
.page-wrapper > .navbar > .container-xl,
.page-wrapper .page-body > .container-xl {
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

/* ---------- /app sidebar (Mailgun-inspired) ---------- */
/* Tabler ships `.navbar-vertical.navbar-expand-lg .navbar-collapse .navbar-nav .nav-link`
   with hard-coded padding and zero top corner radius — match its selector
   chain so our rules win on specificity (no !important shotgun). */
.navbar-vertical.navbar-expand-lg .navbar-collapse .navbar-nav .nav-item {
    padding: 0;
    margin: 1px 0;
}
.navbar-vertical.navbar-expand-lg .navbar-collapse .navbar-nav .nav-link {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: .75rem;
    padding: .65rem .75rem;
    /* Explicit per-corner — Tabler zeroes top-left / bottom-left elsewhere
       with the 3-class selector; setting each corner blocks that bleed. */
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
    border-bottom-left-radius: 8px;
    font-size: .95rem;
    font-weight: 500;
    color: #475569;
    line-height: 1.2;
    position: relative;
}
.navbar-vertical.navbar-expand-lg .navbar-collapse .navbar-nav .nav-link-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    color: #94a3b8;
    flex-shrink: 0;
    margin-right: 0;
    margin-left: 0.5rem;
}
.navbar-vertical.navbar-expand-lg .navbar-collapse .navbar-nav .nav-link-icon svg { display: block; }
.navbar-vertical.navbar-expand-lg .navbar-collapse .navbar-nav .nav-link-title    { font-size: .95rem; }

.navbar-vertical.navbar-expand-lg .navbar-collapse .navbar-nav .nav-link:hover {
    background: #f1f5f9;
    color: #0f172a;
}
.navbar-vertical.navbar-expand-lg .navbar-collapse .navbar-nav .nav-link:hover .nav-link-icon { color: #475569; }

.navbar-vertical.navbar-expand-lg .navbar-collapse .navbar-nav .nav-item.active > .nav-link,
.navbar-vertical.navbar-expand-lg .navbar-collapse .navbar-nav .nav-item.active > .nav-link:hover {
    background: rgba(76, 175, 135, 0.14);
    color: var(--ym-primary-dark);
    font-weight: 600;
}
/* Tool icons (catalog + tool pages). Outline stroke style, brand colour. */
.ym-tool-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: var(--ym-primary, #4CAF87);
    flex-shrink: 0;
}
/* "bare" variant — no tinted background, used inline next to titles. */
.ym-tool-icon-bare { background: transparent; padding: 0; }
/* Hero icon — sits inline inside the h1, transparent (no tinted box). */
.ym-tool-hero-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: var(--ym-primary, #4CAF87);
    flex-shrink: 0;
}

.navbar-vertical.navbar-expand-lg .navbar-collapse .navbar-nav .nav-item.active > .nav-link::before {
    content: "";
    position: absolute;
    left: -.5rem;
    top: 4px;
    bottom: 4px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--ym-primary);
}
.navbar-vertical.navbar-expand-lg .navbar-collapse .navbar-nav .nav-item.active > .nav-link .nav-link-icon { color: var(--ym-primary-dark); }

/* Section label ("Admin" header) above the admin links. */
.ym-sidebar-group-label {
    padding: .85rem .75rem .35rem;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #94a3b8;
    font-weight: 600;
}
.ym-sidebar-group + .nav-item .nav-link { padding-top: .65rem; }

/* Buttons */
.btn-primary {
    background-color: var(--ym-primary);
    border-color: var(--ym-primary);
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: var(--ym-primary-dark);
    border-color: var(--ym-primary-dark);
}
.btn-outline-primary {
    color: var(--ym-primary);
    border-color: var(--ym-primary);
}
.btn-outline-primary:hover {
    background-color: var(--ym-primary);
    border-color: var(--ym-primary);
}

/* Links */
a {
    color: var(--ym-primary-dark);
}
a:hover {
    color: var(--ym-primary);
}

/* Marketing hero (legacy tool pages) */
.ym-hero {
    background: linear-gradient(135deg, var(--ym-primary-faded) 0%, #ffffff 100%);
    padding: 1.5rem 0 1.5rem;
}
.ym-hero h1 {
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    font-weight: 700;
    color: var(--ym-text);
    letter-spacing: -0.015em;
}
.ym-hero .lead {
    color: #4a5568;
    font-size: 1.05rem;
    max-width: 640px;
}

/* ---------- Homepage ---------- */
.ym-eyebrow {
    display: inline-block;
    font-size: .82rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--ym-primary-dark, #15803D);
    background: rgba(76, 175, 135, 0.10);
    padding: .3rem .7rem;
    border-radius: 999px;
}

.ym-h-hero {
    background: radial-gradient(900px 600px at 85% -10%, rgba(76, 175, 135, 0.13), transparent 60%),
                linear-gradient(180deg, #ffffff 0%, var(--ym-primary-faded) 100%);
    padding: 5.5rem 0 4rem;
}
.ym-h-hero .display-3 {
    letter-spacing: -0.025em;
    font-weight: 800;
    color: var(--ym-text, #0f172a);
    line-height: 1.05;
}
.ym-h-hero .ym-hero-lead {
    font-size: 1.18rem;
    max-width: 540px;
}

.ym-h-mockup {
    background: #0f172a;
    border-radius: 14px;
    box-shadow: 0 25px 60px -20px rgba(15, 23, 42, .35);
    overflow: hidden;
    transform: translateY(-4px);
}
.ym-h-mockup-bar {
    display: flex; align-items: center; gap: .35rem;
    padding: .55rem .8rem;
    background: #1e293b;
}
.ym-h-mockup-bar span {
    width: 9px; height: 9px; border-radius: 50%; background: #475569;
}
.ym-h-mockup-bar span:nth-child(1) { background: #f87171; }
.ym-h-mockup-bar span:nth-child(2) { background: #fbbf24; }
.ym-h-mockup-bar span:nth-child(3) { background: #4ade80; }
.ym-h-mockup-url {
    margin-left: .8rem;
    color: #94a3b8;
    font-size: .8rem;
    font-family: ui-monospace, Menlo, monospace;
}
.ym-h-mockup-body {
    background: #f8fafc;
    padding: 1.1rem 1.25rem 1.25rem;
}
.ym-h-mock-row {
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    gap: .75rem;
    align-items: center;
    padding: .55rem 0;
    border-top: 1px solid #e2e8f0;
    font-size: .88rem;
}
.ym-h-mock-row:first-of-type { border-top: 0; }
.ym-h-mock-name { font-weight: 500; color: #0f172a; }
.ym-h-mock-type {
    font-size: .65rem; letter-spacing: .05em; font-weight: 700;
    color: #64748b; background: #e2e8f0;
    padding: .12rem .45rem; border-radius: 4px;
}
.ym-h-mock-extra { font-size: .8rem; }

.ym-pill {
    display: inline-flex; align-items: center;
    padding: .15rem .55rem;
    font-size: .7rem; font-weight: 700; letter-spacing: .05em;
    border-radius: 999px;
}
.ym-pill-up   { background: #dcfce7; color: #166534; }
.ym-pill-warn { background: #fef3c7; color: #92400e; }
.ym-pill-down { background: #fee2e2; color: #991b1b; }

.ym-h-stats {
    padding: 3rem 0;
    background: #fff;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}
.ym-h-stat {
    font-size: clamp(1.8rem, 3.4vw, 2.4rem);
    font-weight: 800;
    color: var(--ym-primary-dark, #15803D);
    letter-spacing: -0.02em;
}
.ym-h-stat-label { color: #64748b; font-size: .9rem; }

.ym-h-features { padding: 5rem 0; }
.ym-h-feature {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 1.6rem;
    height: 100%;
    display: flow-root;     /* contains the floated icon */
    transition: transform .15s ease, box-shadow .15s ease;
}
.ym-h-feature:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px -16px rgba(15, 23, 42, 0.18);
}
.ym-h-feature h3 { margin-top: 0 !important; }
.ym-h-feature-icon {
    float: left;
    margin: 0 0.85rem 0.4rem 0;
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px;
    border-radius: 10px;
    background: rgba(76, 175, 135, 0.10);
    color: var(--ym-primary-dark, #15803D);
}

.ym-h-band {
    padding: 4rem 0;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #fff;
}

.ym-h-faq { padding: 5rem 0; background: #fff; }
.ym-h-faq .accordion-item {
    border: 0; border-bottom: 1px solid #e2e8f0; background: transparent;
}
.ym-h-faq .accordion-button {
    font-weight: 600; font-size: 1.05rem;
    padding: 1.1rem 0;
    background: transparent;
    box-shadow: none;
}
.ym-h-faq .accordion-button:not(.collapsed) { color: var(--ym-primary-dark); }
.ym-h-faq .accordion-body { padding: 0 0 1.1rem; font-size: .98rem; }

.ym-h-why-list li {
    position: relative;
    padding: .5rem 0 .65rem 1.6rem;
    border-bottom: 1px solid #f1f5f9;
    color: #475569;
    line-height: 1.55;
}
.ym-h-why-list li:last-child { border-bottom: 0; }
.ym-h-why-list li::before {
    content: "";
    position: absolute;
    left: 0; top: 1rem;
    width: 10px; height: 10px;
    background: var(--ym-primary, #4CAF87);
    border-radius: 50%;
}
.ym-h-why-list strong { display: block; color: #0f172a; margin-bottom: .2rem; }

.ym-h-cta { padding: 5rem 0; background: var(--ym-primary-faded); }

/* ---------- Pricing ---------- */
.ym-pr-hero {
    padding: 4.5rem 0 1.5rem;
    background: linear-gradient(180deg, #ffffff 0%, var(--ym-primary-faded) 100%);
    text-align: center;
}
.ym-pr-toggle {
    display: inline-flex; gap: .25rem;
    background: #fff; border: 1px solid #e2e8f0;
    border-radius: 999px; padding: .25rem;
    box-shadow: 0 2px 6px -2px rgba(15, 23, 42, .1);
}
.ym-pr-toggle-btn {
    border: 0; background: transparent; color: #475569;
    padding: .5rem 1.25rem; border-radius: 999px;
    font-weight: 600; font-size: .9rem;
    transition: background .15s ease, color .15s ease;
}
.ym-pr-toggle-btn:hover     { color: #0f172a; }
.ym-pr-toggle-btn.is-active { background: var(--ym-primary, #4CAF87); color: #fff; }
/* When the toggle is active the button itself is green — flip the inner
   badge to white/dark-green so it doesn't blend into the background. */
.ym-pr-toggle-btn.is-active .badge.bg-success {
    background: rgba(255, 255, 255, .92) !important;
    color: var(--ym-primary-dark, #15803D) !important;
}

.ym-pr-grid { background: var(--ym-primary-faded); }
.ym-pr-card {
    position: relative;
    height: 100%;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 2rem 1.5rem 1.75rem;
    display: flex; flex-direction: column;
    box-shadow: 0 4px 16px -10px rgba(15, 23, 42, .15);
    transition: transform .15s ease, box-shadow .15s ease;
}
.ym-pr-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 36px -16px rgba(15, 23, 42, .25);
}
.ym-pr-card.is-featured {
    border: 2px solid var(--ym-primary, #4CAF87);
    box-shadow: 0 18px 40px -18px rgba(76, 175, 135, .35);
}
.ym-pr-badge {
    position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
    background: var(--ym-primary, #4CAF87); color: #fff;
    padding: .25rem .8rem; border-radius: 999px;
    font-size: .7rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
}
.ym-pr-name  { font-size: 1.1rem; font-weight: 700; margin: 0 0 .25rem; color: #0f172a; }
.ym-pr-desc  { color: #64748b; font-size: .85rem; min-height: 2.4em; }
.ym-pr-price { margin: 1.25rem 0 1.5rem; min-height: 110px; }
.ym-pr-amount {
    font-size: 2.4rem; font-weight: 800;
    color: var(--ym-primary-dark, #15803D);
    letter-spacing: -0.02em; line-height: 1;
}
.ym-pr-period { color: #64748b; font-size: .82rem; margin-top: .35rem; }
.ym-pr-feats {
    list-style: none; padding: 1.25rem 0 0; margin: 1.25rem 0 0;
    border-top: 1px solid #e2e8f0;
    font-size: .9rem;
}
.ym-pr-feats li {
    padding: .35rem 0 .35rem 1.4rem;
    position: relative;
    color: #334155;
}
.ym-pr-feats li::before {
    content: ""; position: absolute; left: 0; top: .65em;
    width: 14px; height: 8px;
    border-left: 2px solid var(--ym-primary, #4CAF87);
    border-bottom: 2px solid var(--ym-primary, #4CAF87);
    transform: rotate(-45deg);
}
/* Business tier — soft tinted background, distinguishes from Starter without
   going all the way to a dark card. */
.ym-pr-tone-business {
    background: linear-gradient(160deg, #f8fafc 0%, var(--ym-primary-faded) 100%);
    border-color: #cbd5e1;
}
.ym-pr-tone-business .ym-pr-name { color: var(--ym-primary-dark); }

/* Enterprise tier — full dark gradient (formerly only the Custom card). */
.ym-pr-tone-enterprise {
    background: linear-gradient(160deg, #0f172a 0%, #1e293b 100%);
    color: #cbd5e1;
    border-color: #0f172a;
}
.ym-pr-tone-enterprise .ym-pr-name   { color: #fff; }
.ym-pr-tone-enterprise .ym-pr-desc   { color: #94a3b8; }
.ym-pr-tone-enterprise .ym-pr-amount { color: #fff; }
.ym-pr-tone-enterprise .ym-pr-period { color: #94a3b8; }
.ym-pr-tone-enterprise .ym-pr-feats  { border-top-color: #334155; color: #e2e8f0; }
.ym-pr-tone-enterprise .ym-pr-feats li { color: #cbd5e1; }
.ym-pr-tone-enterprise .ym-pr-feats li::before {
    border-left-color: var(--ym-primary-light, #86EFAC);
    border-bottom-color: var(--ym-primary-light, #86EFAC);
}
.ym-pr-tone-enterprise .btn-outline-primary {
    color: #fff;
    border-color: var(--ym-primary-light, #86EFAC);
}
.ym-pr-tone-enterprise .btn-outline-primary:hover {
    background: var(--ym-primary, #4CAF87);
    border-color: var(--ym-primary, #4CAF87);
    color: #fff;
}

/* Full-width Custom-plan strip (replaces the old narrow card). */
.ym-pr-custom {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #e2e8f0;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 22px 40px -22px rgba(15, 23, 42, .45);
}
.ym-pr-custom-bar {
    width: 100%;
    display: flex; align-items: center; justify-content: space-between;
    gap: 1.5rem; flex-wrap: wrap;
    padding: 1.75rem 2rem;
    background: transparent; border: 0; color: inherit;
    text-align: left; cursor: pointer;
}
.ym-pr-custom-head { flex: 1 1 320px; }
.ym-pr-custom-title {
    color: #fff;
    font-size: 1.55rem;
    font-weight: 700;
    margin: .35rem 0 .35rem;
}
.ym-pr-custom-desc { color: #94a3b8; max-width: 640px; }
.ym-pr-custom-cta {
    padding: .65rem 1.4rem;
    font-weight: 600;
    border-radius: 999px;
    display: inline-flex; align-items: center; gap: .4rem;
}
.ym-pr-custom-chev {
    display: inline-block;
    transition: transform .25s ease;
    font-weight: 800;
    transform: rotate(0deg);
}
.ym-pr-custom[data-open="1"] .ym-pr-custom-chev { transform: rotate(90deg); }

.ym-pr-custom-body {
    background: #fff;
    color: #0f172a;
    border-top: 1px solid #1e293b;
    padding: 1.5rem 0 .5rem;
}
.ym-pr-custom-body[hidden] { display: none; }
.ym-pr-custom .form-label { color: #334155; }
.ym-pr-custom .form-range::-webkit-slider-thumb { background: var(--ym-primary, #4CAF87); }
.ym-pr-custom .form-range::-moz-range-thumb     { background: var(--ym-primary, #4CAF87); }

/* ---------- Compact tool form (MXToolbox-inspired) ---------- */
.ym-toolbar {
    display: flex; flex-wrap: wrap; gap: .5rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: .5rem;
    box-shadow: 0 2px 12px -8px rgba(15, 23, 42, .15);
}
.ym-toolbar .form-select,
.ym-toolbar .form-control {
    border: 0; box-shadow: none; padding: .65rem .85rem; min-height: 44px;
}
.ym-toolbar .form-control:focus,
.ym-toolbar .form-select:focus {
    box-shadow: none; outline: 2px solid var(--ym-primary, #4CAF87); outline-offset: -2px;
}
.ym-toolbar .ym-toolbar-target { flex: 1 1 280px; }
.ym-toolbar button { flex: 0 0 auto; padding: .65rem 1.25rem; }

/* Compact controls row used in the bulk-lookup form and the rerun card on the
   result page — Preserve duplicates · DNS dropdown · Lookup button. */
.ym-bulk-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .9rem 1.25rem;
}
.ym-bulk-preserve { display: inline-flex; align-items: center; gap: .45rem; }
.ym-bulk-preserve .form-check-input { margin-top: 0; }

/* SVG country flag thumbnails (flagcdn.com) in result tables. */
.ym-flag {
    display: inline-block;
    vertical-align: -3px;
    margin-right: .35rem;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, .08);
    object-fit: cover;
}

/* Horizontally-scrollable table wrapper used in /app/tools. Cells stay on
   one line (.ym-nowrap-table) so user gets a real scroll, not a layout
   crammed into the visible width. A right-edge fade + "Scroll →" hint flag
   the off-screen content; both fade away once scrolled to the end. */
.ym-scroll-x {
    position: relative;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-color: #cbd5e1 transparent;
}
.ym-scroll-x::after {
    content: "";
    position: sticky;
    top: 0;
    right: 0;
    float: right;
    width: 32px;
    height: 100%;
    margin-left: -32px;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(255,255,255,0) 0%, #ffffff 80%);
    transition: opacity .2s ease;
    opacity: 1;
}
.ym-scroll-x.is-end::after { opacity: 0; }
.ym-scroll-x:not(.is-overflow)::after { opacity: 0; }

/* "Scroll →" chip in the card-header (next to title) and in the card-footer.
   Shown while the table actually overflows; the arrow direction flips once
   the user has scrolled to the rightmost column — points back to the start
   instead of away from it. */
.ym-scroll-hint {
    display: none;
    align-items: center;
    gap: .35rem;
    padding: .15rem .6rem;
    background: var(--ym-primary-faded);
    color: var(--ym-primary-dark);
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 600;
    width: fit-content;
}
.ym-scroll-wrap.is-overflow .ym-scroll-hint { display: inline-flex; }

/* Arrow visibility per scroll position. */
.ym-scroll-hint .ym-arrow-left  { display: none; }
.ym-scroll-hint .ym-arrow-right { display: inline; }
.ym-scroll-wrap.is-end .ym-scroll-hint .ym-arrow-left  { display: inline; }
.ym-scroll-wrap.is-end .ym-scroll-hint .ym-arrow-right { display: none; }

.ym-nowrap-table th,
.ym-nowrap-table td {
    white-space: nowrap;
    vertical-align: top;
}
/* IP cell holds two lines (primary + sibling) — preserve that. */
.ym-nowrap-table td:has(.text-muted.small) { white-space: normal; }

/* Floating "BETA" sticker pinned above-right of the YouMonit wordmark in
   nav + sidebar. Signals to visitors that the site is in a testing phase.
   The parent `.navbar-brand` becomes the positioning context (Bootstrap
   leaves it static by default — we add `position: relative` via that
   parent rule below). Removing this tag is a one-line edit in each of
   marketing-nav.php and sidebar.php when we're ready to drop the label. */
.navbar-brand:has(> .ym-beta-badge) { position: relative; }
.ym-beta-badge {
    position: absolute;
    top: 2px;
    right: -22px;
    background: var(--ym-primary, #4CAF87);
    color: #fff;
    font-size: .58rem;
    font-weight: 700;
    letter-spacing: .08em;
    padding: 2px 5px;
    border-radius: 3px;
    line-height: 1;
    text-transform: uppercase;
    /* transform: rotate(8deg); */
    box-shadow: 0 1px 3px rgba(15, 23, 42, .15);
    pointer-events: none;
}
/* In-app sidebar: vertical navbar gives the wordmark room, so the badge
   sits inside the link box (top:5px, right:0) instead of floating off
   the right edge like it does on the public marketing nav. */
.navbar-vertical .ym-beta-badge {
    top: 5px;
    right: 0;
}

/* Striped progress bar reused across tool confirm, async poll, and the image
   converter queue progress page. Indeterminate by default — set width via
   inline style or JS. Add .is-done to freeze the stripes. */
.ym-bar {
    width: 100%;
    height: .85rem;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}
.ym-bar-fill {
    height: 100%;
    width: 4%;
    border-radius: 4px;
    background-color: var(--ym-primary, #4CAF87);
    background-image: linear-gradient(
        45deg,
        rgba(255,255,255,.25) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255,255,255,.25) 50%,
        rgba(255,255,255,.25) 75%,
        transparent 75%,
        transparent
    );
    background-size: 1.2rem 1.2rem;
    animation: ym-bar-stripes 1s linear infinite;
    transition: width .5s ease-out;
}
.ym-bar-fill.is-done { animation: none; background-image: none; }
@keyframes ym-bar-stripes {
    from { background-position: 0      0; }
    to   { background-position: 1.2rem 0; }
}

/* Circular indeterminate spinner — used on the confirm + upload flows when
   there is no real progress to report (the server is busy answering the
   synchronous request, the browser is waiting). */
.ym-spinner {
    width: 56px;
    height: 56px;
    border: 5px solid #e2e8f0;
    border-top-color: var(--ym-primary, #4CAF87);
    border-radius: 50%;
    animation: ym-spin .9s linear infinite;
    flex: 0 0 auto;
}
.ym-spinner-sm { width: 28px; height: 28px; border-width: 3px; }
@keyframes ym-spin {
    to { transform: rotate(360deg); }
}

/* Status pills */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
}
.status-pill::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
.status-pill-up    { background:#d4edda; color:#155724; }
.status-pill-up::before    { background:#10b981; }
.status-pill-down  { background:#f8d7da; color:#721c24; }
.status-pill-down::before  { background:#ef4444; }
.status-pill-degraded { background:#fff3cd; color:#856404; }
.status-pill-degraded::before { background:#facc15; }

/* Body / layout polish */
body {
    background-color: var(--ym-bg-app);
    color: var(--ym-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}
.navbar-brand-image {
    height: 32px;
    width: auto;
}

/* Defensive: SVG logos without intrinsic dimensions render at viewBox size
   (600x600) when only one of width/height is set. Force aspect ratio inside
   the brand link. */
.navbar-brand img,
.navbar-brand svg {
    max-height: 40px;
    width: auto;
    display: block;
}

/* Tabler's default .badge inherits surface text colour (dark on white cards),
   which makes our bg-success / bg-danger / bg-primary pills illegible. Force
   white text and let .text-dark explicitly override (e.g. bg-warning.text-dark). */
.badge {
    color: #fff;
}
.badge.text-dark {
    color: #1f2937 !important;
}

/* Shared dark code blocks (.ym-codeblock used in long-form articles,
   .ym-howto-block used in the checker setup partial). Both render the
   same way; an auto-injected copy-to-clipboard button (see _scripts.php)
   appears in the top-right. */
.ym-codeblock, .ym-howto-block {
    position: relative;
    background: #0f172a;
    color: #e2e8f0;
    padding: 1rem 1.1rem;
    padding-right: 3.6rem;
    border-radius: 8px;
    font-size: .85rem;
    line-height: 1.55;
    overflow: auto;
    margin: 0 0 1rem;
}
.ym-codeblock code, .ym-howto-block code {
    color: inherit;
    background: transparent;
    padding: 0;
}
/* Visible text selection — default highlight is hard to see on the dark
   background, so paint it with a primary-tinted overlay. */
.ym-codeblock ::selection,
.ym-howto-block ::selection {
    background: rgba(76, 175, 135, .45);
    color: #ffffff;
}
.ym-codeblock ::-moz-selection,
.ym-howto-block ::-moz-selection {
    background: rgba(76, 175, 135, .45);
    color: #ffffff;
}

/* Copy-to-clipboard pill button injected by JS into every code block. */
.ym-code-copy {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .18);
    color: #cbd5e1;
    border-radius: 4px;
    padding: 4px 10px;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .04em;
    cursor: pointer;
    line-height: 1;
    transition: background .15s, color .15s, border-color .15s;
    z-index: 2;
}
.ym-code-copy:hover { background: rgba(255, 255, 255, .16); color: #ffffff; }
.ym-code-copy:focus { outline: 2px solid rgba(76, 175, 135, .5); outline-offset: 2px; }
.ym-code-copy.is-copied {
    background: var(--ym-primary, #4CAF87);
    color: #ffffff;
    border-color: transparent;
}

/* Monitor maintenance window — high-contrast banner on the detail page +
   inline badge / row stripe everywhere a monitor is listed. */
.ym-maint-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: repeating-linear-gradient(
        45deg,
        #fef3c7 0 16px,
        #fde68a 16px 32px
    );
    border: 2px solid #f59e0b;
    border-radius: 8px;
    color: #78350f;
}
.ym-maint-icon { flex: 0 0 auto; font-size: 1.8rem; line-height: 1; }
.ym-maint-body { flex: 1 1 auto; line-height: 1.45; }
.ym-maint-body strong { display: block; font-size: 1rem; color: #78350f; }

.ym-maint-badge {
    background: #f59e0b;
    color: #1f2937;
    font-weight: 700;
    font-size: .72rem;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: .04em;
}
/* Maintenance stripe on list rows. */
.ym-row-maint { background: rgba(245, 158, 11, .08) !important; }
.ym-row-maint td:first-child { box-shadow: inset 3px 0 0 #f59e0b; }
