/* ==========================================================================
   DSNi Service CRM — design system
   DoubleSquare Networks Inc. · brand navy + electric blue
   ========================================================================== */

/* ------------------------------------------------------------- tokens --- */
:root {
    /* Brand */
    --navy-900: #050d33;
    --navy-800: #0a1650;
    --navy-700: #101f6b;
    --navy-600: #16288a;
    --blue-600: #1b4dff;
    --blue-500: #2f66ff;
    --blue-400: #5b8bff;
    --blue-100: #e4ecff;
    --blue-050: #f2f6ff;
    --cyan-500: #12a5e8;

    /* Neutrals */
    --ink-900: #0d1424;
    --ink-800: #1b2438;
    --ink-700: #313c55;
    --ink-600: #4a566f;
    --ink-500: #6a7690;
    --ink-400: #929db4;
    --ink-300: #c2cad9;
    --ink-200: #dfe4ee;
    --ink-100: #eef1f7;
    --ink-050: #f6f8fc;
    --white:   #ffffff;

    /* Semantic */
    --green-600: #0f8a4d;
    --green-100: #e0f5ea;
    --amber-600: #b3730a;
    --amber-100: #fdf1dc;
    --red-600:   #c62b3c;
    --red-100:   #fde8ea;
    --indigo-600:#4c37c9;
    --indigo-100:#ece8fd;
    --cyan-600:  #0a7fae;
    --cyan-100:  #dcf1fa;

    /* Surfaces */
    --bg:        #eef1f7;
    --surface:   #ffffff;
    --surface-2: #f6f8fc;
    --border:    #dfe4ee;
    --border-strong: #c9d1e0;

    /* Type */
    --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

    /* Shape */
    --r-sm: 6px;
    --r:    10px;
    --r-lg: 14px;
    --r-xl: 20px;

    /* Elevation */
    --sh-sm: 0 1px 2px rgba(13, 20, 36, .06), 0 1px 3px rgba(13, 20, 36, .04);
    --sh:    0 2px 4px rgba(13, 20, 36, .04), 0 8px 24px rgba(13, 20, 36, .06);
    --sh-lg: 0 12px 40px rgba(10, 22, 80, .14);

    --header-h: 62px;
    --max: 1360px;
}

/* --------------------------------------------------------------- base --- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.55;
    color: var(--ink-800);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.25; color: var(--ink-900); font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.02rem; }
h4 { font-size: .92rem; }
p  { margin: 0 0 1em; }
a  { color: var(--blue-600); text-decoration: none; }
a:hover { text-decoration: underline; }
small { font-size: .82rem; }
hr { border: 0; border-top: 1px solid var(--border); margin: 1.5rem 0; }

code, .mono { font-family: var(--mono); font-size: .88em; }

.muted     { color: var(--ink-500); }
.tiny      { font-size: .78rem; }
.strong    { font-weight: 600; }
.nowrap    { white-space: nowrap; }
.right     { text-align: right; }
.center    { text-align: center; }
.mt0 { margin-top: 0; } .mb0 { margin-bottom: 0; }
.mt1 { margin-top: .5rem; } .mt2 { margin-top: 1rem; } .mt3 { margin-top: 1.5rem; }
.mb1 { margin-bottom: .5rem; } .mb2 { margin-bottom: 1rem; } .mb3 { margin-bottom: 1.5rem; }
.hide { display: none !important; }

.eyebrow {
    text-transform: uppercase;
    letter-spacing: .12em;
    font-size: .7rem;
    font-weight: 700;
    color: var(--blue-600);
}

:focus-visible {
    outline: 2px solid var(--blue-500);
    outline-offset: 2px;
    border-radius: 4px;
}

.skip-link {
    position: absolute; left: -9999px; top: 0;
    background: var(--navy-800); color: #fff; padding: .6rem 1rem; z-index: 100;
}
.skip-link:focus { left: 8px; top: 8px; }

/* ------------------------------------------------------------ layout --- */
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.wrap--narrow { max-width: 940px; }
.wrap--form   { max-width: 1080px; }

.stack > * + * { margin-top: 1rem; }
.row { display: flex; gap: 1rem; align-items: center; }
.row--between { justify-content: space-between; }
.row--wrap { flex-wrap: wrap; }
.spacer { flex: 1 1 auto; }

.grid { display: grid; gap: 1rem; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--sidebar { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; gap: 1.25rem; }

@media (max-width: 1080px) {
    .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid--sidebar { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
    .wrap { padding: 0 16px; }
    .grid--2, .grid--3, .grid--4 { grid-template-columns: minmax(0, 1fr); }
}

/* ============================== PUBLIC SITE ============================== */

.site-header {
    position: sticky; top: 0; z-index: 40;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: saturate(150%) blur(8px);
    border-bottom: 1px solid var(--border);
}
.site-header__inner { display: flex; align-items: center; gap: 1.5rem; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: .7rem; font-weight: 700; color: var(--navy-800); }
.brand:hover { text-decoration: none; }
.brand__mark {
    width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
    background: linear-gradient(140deg, var(--blue-600), var(--navy-800));
    color: #fff; font-size: .78rem; font-weight: 800; letter-spacing: .02em;
    box-shadow: 0 4px 12px rgba(27, 77, 255, .3);
}
.brand__name { font-size: 1rem; line-height: 1.1; }
.brand__sub  { display: block; font-size: .68rem; font-weight: 600; letter-spacing: .1em;
               text-transform: uppercase; color: var(--ink-500); }

/* Logo artwork. Scaled by height so the wordmark keeps its aspect ratio
   whatever box it lands in; `object-fit: contain` guards against a future
   asset with different proportions. */
.brand__logo {
    display: block;
    /* Fluid: shrinks with the viewport, never below 22px or above 30px. */
    height: clamp(20px, 1.9vw, 26px);
    width: auto;
    max-width: 100%;
    object-fit: contain;
}
.brand__rule {
    width: 1px; height: 26px; background: var(--border-strong); flex: none;
}
.brand__tag {
    font-size: .68rem; font-weight: 700; letter-spacing: .1em;
    text-transform: uppercase; color: var(--ink-500); line-height: 1.25; max-width: 9rem;
}
@media (max-width: 860px) {
    .brand__rule, .brand__tag { display: none; }
}

.site-nav { display: flex; gap: 1.4rem; align-items: center; margin-left: auto; }
.site-nav a { color: var(--ink-700); font-weight: 550; font-size: .92rem; }
.site-nav a:hover { color: var(--blue-600); text-decoration: none; }

/* On narrow screens keep only the primary action in the header. */
@media (max-width: 700px) {
    .site-nav { gap: .8rem; }
    .site-nav a:not(.btn) { display: none; }
    .brand__sub { display: none; }
    .brand__name { font-size: .92rem; }
}

.hero {
    position: relative; overflow: hidden;
    background: radial-gradient(1100px 460px at 12% -10%, var(--navy-600) 0%, transparent 60%),
                linear-gradient(135deg, var(--navy-900) 0%, var(--navy-800) 48%, #142a9c 100%);
    color: #dbe4ff;
    padding: 84px 0 96px;
}
.hero::after {
    content: ""; position: absolute; inset: 0;
    background-image: radial-gradient(rgba(255,255,255,.12) 1px, transparent 1px);
    background-size: 26px 26px;
    mask-image: linear-gradient(105deg, transparent 42%, #000 100%);
    -webkit-mask-image: linear-gradient(105deg, transparent 42%, #000 100%);
    opacity: .5; pointer-events: none;
}
.hero__inner { position: relative; z-index: 1; max-width: 720px; }
.hero h1 { color: #fff; font-size: clamp(2rem, 4.4vw, 3.1rem); letter-spacing: -.025em; margin-bottom: .5rem; }
.hero p  { font-size: 1.08rem; color: #b9c6f5; max-width: 58ch; }
.hero .eyebrow { color: var(--blue-400); }
.hero__actions { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1.6rem; }
.hero__facts {
    position: relative; z-index: 1;
    display: flex; gap: 2.5rem; flex-wrap: wrap;
    margin-top: 3rem; padding-top: 1.6rem; border-top: 1px solid rgba(255,255,255,.16);
}
.hero__fact strong { display: block; color: #fff; font-size: 1.5rem; letter-spacing: -.02em; }
.hero__fact span { font-size: .84rem; color: #9db0ef; }

.section { padding: 68px 0; }
.section--tint { background: var(--surface); border-block: 1px solid var(--border); }
.section__head { max-width: 660px; margin-bottom: 2rem; }
.section__head p { color: var(--ink-600); }

.svc-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
    padding: 1.4rem; box-shadow: var(--sh-sm);
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.svc-card:hover { transform: translateY(-3px); box-shadow: var(--sh); border-color: var(--blue-400); }
.svc-card__icon {
    width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
    background: var(--blue-050); color: var(--blue-600); margin-bottom: .9rem;
}
.svc-card h3 { font-size: .98rem; }
.svc-card p { color: var(--ink-600); font-size: .9rem; margin: 0; }

.steps { counter-reset: step; display: grid; gap: 1rem; }
.step {
    position: relative; padding-left: 3.2rem;
}
.step::before {
    counter-increment: step; content: counter(step);
    position: absolute; left: 0; top: 0;
    width: 2.2rem; height: 2.2rem; border-radius: 50%;
    display: grid; place-items: center;
    background: var(--navy-800); color: #fff; font-weight: 700; font-size: .88rem;
}
.step h3 { margin-bottom: .15rem; font-size: .98rem; }
.step p { color: var(--ink-600); font-size: .9rem; margin: 0; }

.site-footer {
    background: var(--navy-900); color: #93a2d4; padding: 46px 0 30px; font-size: .88rem;
}
.site-footer a { color: #c4d0f5; }
.site-footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 2rem; }
@media (max-width: 760px) { .site-footer__grid { grid-template-columns: 1fr; } }
.site-footer h4 { color: #fff; font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; }
.site-footer__bottom {
    margin-top: 2rem; padding-top: 1.2rem; border-top: 1px solid rgba(255,255,255,.1);
    display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .8rem;
}

/* ---------------------------------------------------------- buttons --- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    padding: .62rem 1.15rem;
    font: inherit; font-weight: 600; font-size: .92rem;
    border-radius: var(--r-sm); border: 1px solid transparent;
    background: var(--blue-600); color: #fff; cursor: pointer;
    transition: background .15s ease, box-shadow .15s ease, transform .06s ease, color .15s ease;
    white-space: nowrap;
}
.btn:hover { background: var(--navy-700); text-decoration: none; color: #fff; }
.btn:active { transform: translateY(1px); }
.btn--ghost { background: var(--surface); color: var(--ink-700); border-color: var(--border-strong); }
.btn--ghost:hover { background: var(--ink-050); color: var(--navy-800); border-color: var(--ink-400); }
.btn--light { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.34); }
.btn--light:hover { background: rgba(255,255,255,.22); }
.btn--danger { background: var(--red-600); }
.btn--danger:hover { background: #9d1f2e; }
.btn--sm { padding: .38rem .72rem; font-size: .82rem; }
.btn--lg { padding: .82rem 1.6rem; font-size: 1rem; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

.btn-link {
    background: none; border: 0; padding: 0; font: inherit; color: var(--blue-600);
    cursor: pointer; text-decoration: underline;
}

/* ----------------------------------------------------------- badges --- */
.badge {
    display: inline-flex; align-items: center; gap: .35rem;
    padding: .16rem .55rem; border-radius: 999px;
    font-size: .74rem; font-weight: 650; letter-spacing: .01em; white-space: nowrap;
    background: var(--ink-100); color: var(--ink-700);
}
.badge--slate  { background: var(--ink-100);    color: var(--ink-700); }
.badge--blue   { background: var(--blue-100);   color: var(--navy-700); }
.badge--indigo { background: var(--indigo-100); color: var(--indigo-600); }
.badge--green  { background: var(--green-100);  color: var(--green-600); }
.badge--amber  { background: var(--amber-100);  color: var(--amber-600); }
.badge--red    { background: var(--red-100);    color: var(--red-600); }
.badge--cyan   { background: var(--cyan-100);   color: var(--cyan-600); }

.tag {
    display: inline-block; padding: .1rem .45rem; margin: 0 .2rem .2rem 0;
    font-size: .72rem; font-weight: 600;
    border-radius: var(--r-sm); background: var(--surface-2);
    border: 1px solid var(--border); color: var(--ink-600);
}

/* ----------------------------------------------------------- alerts --- */
.alert {
    padding: .8rem 1rem; border-radius: var(--r); margin-bottom: 1rem;
    border: 1px solid var(--border); background: var(--surface-2);
    font-size: .92rem; border-left-width: 4px;
}
.alert--success { background: var(--green-100); border-color: var(--green-600); color: #0a5c35; }
.alert--error   { background: var(--red-100);   border-color: var(--red-600);   color: #8c1c2b; }
.alert--warn    { background: var(--amber-100); border-color: var(--amber-600); color: #7a4e05; }
.alert--info    { background: var(--blue-050);  border-color: var(--blue-500);  color: var(--navy-700); }
.alert ul { margin: .4rem 0 0; padding-left: 1.1rem; }

/* ------------------------------------------------------------ cards --- */
.card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--r-lg); box-shadow: var(--sh-sm);
}
.card__head {
    display: flex; align-items: center; gap: .75rem;
    padding: .9rem 1.15rem; border-bottom: 1px solid var(--border);
}
.card__head h2, .card__head h3 { margin: 0; font-size: .98rem; }
.card__body { padding: 1.15rem; }
.card__body--flush { padding: 0; }
.card__foot { padding: .8rem 1.15rem; border-top: 1px solid var(--border); background: var(--surface-2);
              border-radius: 0 0 var(--r-lg) var(--r-lg); }

.stat {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
    padding: 1.05rem 1.15rem; box-shadow: var(--sh-sm); position: relative; overflow: hidden;
}
.stat__label { font-size: .76rem; font-weight: 650; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-500); }
.stat__value { font-size: 1.85rem; font-weight: 700; letter-spacing: -.03em; color: var(--navy-800); line-height: 1.15; }
.stat__meta  { font-size: .8rem; color: var(--ink-500); }
.stat--accent::before {
    content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--blue-600);
}

/* ----------------------------------------------------------- tables --- */
.table-wrap { overflow-x: auto; }
table.data {
    width: 100%; border-collapse: collapse; font-size: .9rem;
}
table.data th {
    text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .07em;
    color: var(--ink-500); font-weight: 700;
    padding: .7rem 1rem; border-bottom: 1px solid var(--border); background: var(--surface-2);
    white-space: nowrap;
}
table.data td { padding: .78rem 1rem; border-bottom: 1px solid var(--ink-100); vertical-align: top; }
table.data tbody tr:hover { background: var(--blue-050); }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data .col-ref { font-family: var(--mono); font-size: .82rem; color: var(--ink-600); }
table.data a.rowlink { font-weight: 600; color: var(--navy-800); }
table.data a.rowlink:hover { color: var(--blue-600); }

.empty {
    padding: 3rem 1rem; text-align: center; color: var(--ink-500);
}
.empty svg { color: var(--ink-300); margin-bottom: .6rem; }

/* --------------------------------------------------- definition list --- */
.dl { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: .1rem 1rem; font-size: .92rem; }
.dl dt { color: var(--ink-500); padding: .45rem 0; font-size: .85rem; }
.dl dd { margin: 0; padding: .45rem 0; border-bottom: 1px solid var(--ink-100); color: var(--ink-800); }
.dl dt { border-bottom: 1px solid var(--ink-100); }
.dl > dt:last-of-type, .dl > dd:last-of-type { border-bottom: 0; }
@media (max-width: 620px) {
    .dl { grid-template-columns: minmax(0, 1fr); }
    .dl dt { border-bottom: 0; padding-bottom: 0; }
}

/* ------------------------------------------------------------ forms --- */
.field { margin-bottom: 1rem; }
.field > label, .label {
    display: block; font-size: .84rem; font-weight: 600; color: var(--ink-700); margin-bottom: .3rem;
}
.field .hint { display: block; font-size: .78rem; color: var(--ink-500); margin-top: .25rem; }
.req { color: var(--red-600); font-weight: 700; }

input[type=text], input[type=email], input[type=tel], input[type=url], input[type=number],
input[type=date], input[type=password], input[type=search], select, textarea {
    width: 100%; padding: .58rem .7rem;
    font: inherit; font-size: .92rem; color: var(--ink-900);
    background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-sm);
    transition: border-color .14s ease, box-shadow .14s ease, background .14s ease;
}
input::placeholder, textarea::placeholder { color: var(--ink-400); }
input:hover, select:hover, textarea:hover { border-color: var(--ink-400); }
input:focus, select:focus, textarea:focus {
    outline: none; border-color: var(--blue-500); box-shadow: 0 0 0 3px rgba(47, 102, 255, .16);
}
input[disabled], textarea[disabled], select[disabled] { background: var(--ink-050); color: var(--ink-500); }
textarea { min-height: 86px; resize: vertical; line-height: 1.5; }
select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%234a566f' d='M1.4 0 6 4.6 10.6 0 12 1.4 6 7.4 0 1.4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right .65rem center; padding-right: 2rem;
}
.input-invalid, input:invalid.touched { border-color: var(--red-600); }

.check {
    display: flex; align-items: flex-start; gap: .55rem;
    font-size: .9rem; color: var(--ink-700); cursor: pointer; padding: .18rem 0;
}
.check input[type=checkbox], .check input[type=radio] {
    width: 1.05em; height: 1.05em; margin: .18em 0 0; accent-color: var(--blue-600); flex: none; cursor: pointer;
}
.check--boxed {
    border: 1px solid var(--border); border-radius: var(--r-sm); padding: .55rem .7rem; background: var(--surface);
    transition: border-color .14s ease, background .14s ease;
}
.check--boxed:hover { border-color: var(--blue-400); background: var(--blue-050); }
.check-row { display: flex; flex-wrap: wrap; gap: .35rem 1.25rem; }

fieldset { border: 0; margin: 0; padding: 0; }
legend { padding: 0; font-weight: 600; }

/* Public application form ------------------------------------------------ */
.form-shell { padding: 34px 0 70px; }

.form-progress {
    position: sticky; top: var(--header-h); z-index: 30;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
    padding: .55rem; margin-bottom: 1.4rem; box-shadow: var(--sh-sm);
    display: flex; gap: .3rem; overflow-x: auto; scrollbar-width: thin;
}
.form-progress button {
    flex: 1 0 auto; display: flex; align-items: center; gap: .45rem;
    padding: .5rem .7rem; border: 0; border-radius: var(--r-sm);
    background: none; font: inherit; font-size: .82rem; font-weight: 600; color: var(--ink-500);
    cursor: pointer; white-space: nowrap;
}
.form-progress button:hover { background: var(--ink-050); color: var(--ink-800); }
.form-progress button[aria-current="step"] { background: var(--navy-800); color: #fff; }
.form-progress .num {
    width: 1.35rem; height: 1.35rem; border-radius: 50%; display: grid; place-items: center;
    background: var(--ink-100); color: var(--ink-600); font-size: .72rem; font-weight: 700; flex: none;
}
.form-progress button[aria-current="step"] .num { background: rgba(255,255,255,.2); color: #fff; }
.form-progress button.done .num { background: var(--green-100); color: var(--green-600); }

.form-section {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--r-lg); box-shadow: var(--sh-sm); margin-bottom: 1.2rem;
}
.form-section > header {
    padding: 1.1rem 1.4rem; border-bottom: 1px solid var(--border);
    display: flex; align-items: baseline; gap: .7rem;
}
.form-section > header .n {
    font-size: .78rem; font-weight: 800; color: var(--blue-600);
    letter-spacing: .1em; text-transform: uppercase;
}
.form-section > header h2 { font-size: 1.05rem; margin: 0; }
.form-section > header .sub { font-size: .84rem; color: var(--ink-500); margin-left: auto; text-align: right; }
.form-section__body { padding: 1.4rem; }
.form-section__note {
    margin: 0; padding: .85rem 1.4rem; border-top: 1px solid var(--border);
    background: var(--surface-2); font-size: .82rem; color: var(--ink-600);
    border-radius: 0 0 var(--r-lg) var(--r-lg);
}

.form-actions {
    display: flex; gap: .7rem; align-items: center; flex-wrap: wrap;
    padding: 1.1rem 0 0; border-top: 1px solid var(--border); margin-top: 1.2rem;
}

.service-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.service-table th {
    text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .06em;
    color: var(--ink-500); padding: .5rem .6rem; border-bottom: 1px solid var(--border);
}
.service-table td { padding: .45rem .6rem; border-bottom: 1px solid var(--ink-100); vertical-align: middle; }
.service-table tr.is-on { background: var(--blue-050); }
.service-table td:first-child { width: 62%; }
.service-table input[type=text] { padding: .4rem .55rem; font-size: .87rem; }
.service-table select { padding: .4rem .55rem; font-size: .87rem; }
@media (max-width: 860px) {
    .service-table, .service-table tbody, .service-table tr, .service-table td { display: block; width: 100%; }
    .service-table thead { display: none; }
    .service-table tr { border-bottom: 1px solid var(--border); padding: .6rem 0; }
    .service-table td { border: 0; padding: .25rem 0; }
    .service-table td:first-child { width: auto; font-weight: 600; }
    .service-table td[data-label]::before {
        content: attr(data-label); display: block; font-size: .7rem; text-transform: uppercase;
        letter-spacing: .06em; color: var(--ink-500); margin-bottom: .15rem;
    }
}

.contact-block {
    border: 1px solid var(--border); border-radius: var(--r); padding: 1rem; margin-bottom: .9rem;
    background: var(--surface);
}
.contact-block > header {
    display: flex; align-items: center; gap: .6rem; margin-bottom: .8rem;
}
.contact-block > header h3 { margin: 0; font-size: .92rem; }
.contact-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .contact-grid { grid-template-columns: minmax(0, 1fr); } }

.legal {
    font-size: .86rem; color: var(--ink-600); background: var(--surface-2);
    border: 1px solid var(--border); border-radius: var(--r); padding: 1rem 1.1rem;
    max-height: 260px; overflow-y: auto;
}
.legal p:last-child { margin-bottom: 0; }

/* ============================== ADMIN SHELL ============================== */

.admin { min-height: 100vh; display: flex; background: var(--bg); }

.sidebar {
    width: 244px; flex: none; background: var(--navy-900); color: #b9c5ea;
    display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.sidebar__brand {
    display: block; padding: .95rem 1rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,.09); color: #fff; font-weight: 700;
}
.sidebar__brand:hover { text-decoration: none; }
.sidebar__brand small { display: block; font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: #7f92cd; font-weight: 600; }

/* The logo is dark-on-light artwork, so on the navy rail it sits on its own
   white plate rather than being knocked out. */
.sidebar__logo {
    display: flex; align-items: center; justify-content: center;
    width: 100%; min-height: 72px; background: #fff; border-radius: 10px;
    padding: 8px; margin-bottom: .65rem; overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .18);
}
.sidebar__logo img {
    display: block; width: 100%; height: auto; max-height: 70px; object-fit: contain;
}
.sidebar__title {
    display: block; font-size: .92rem; color: #fff; line-height: 1.2;
}
.sidebar nav { padding: .9rem .7rem; overflow-y: auto; flex: 1; }
.sidebar .navlabel {
    font-size: .66rem; text-transform: uppercase; letter-spacing: .11em; color: #6478b8;
    padding: .9rem .55rem .35rem; font-weight: 700;
}
.sidebar a.navlink {
    display: flex; align-items: center; gap: .65rem;
    padding: .52rem .6rem; border-radius: var(--r-sm); margin-bottom: .12rem;
    color: #c3cfef; font-size: .89rem; font-weight: 550;
}
.sidebar a.navlink:hover { background: rgba(255,255,255,.07); color: #fff; text-decoration: none; }
.sidebar a.navlink.is-active { background: var(--blue-600); color: #fff; box-shadow: 0 4px 14px rgba(27,77,255,.35); }
.sidebar a.navlink svg { flex: none; opacity: .9; }
.sidebar a.navlink .count {
    margin-left: auto; font-size: .72rem; font-weight: 700; background: rgba(255,255,255,.14);
    padding: .05rem .4rem; border-radius: 999px;
}
.sidebar__foot { padding: .9rem 1rem; border-top: 1px solid rgba(255,255,255,.09); font-size: .78rem; color: #7f92cd; }

.admin__main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
    display: flex; align-items: center; gap: 1rem;
    padding: 0 1.5rem; height: var(--header-h); flex: none;
    background: var(--surface); border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 20;
}
.topbar h1 { font-size: 1.05rem; margin: 0; }
.topbar__search { position: relative; max-width: 340px; flex: 1; }
.topbar__search input { padding-left: 2.1rem; background: var(--surface-2); }
.topbar__search svg { position: absolute; left: .65rem; top: 50%; transform: translateY(-50%); color: var(--ink-400); }

.avatar {
    width: 32px; height: 32px; border-radius: 50%; flex: none;
    display: grid; place-items: center; font-size: .76rem; font-weight: 700;
    background: var(--blue-100); color: var(--navy-700);
}
.usermenu { display: flex; align-items: center; gap: .6rem; }
.usermenu__name { font-size: .84rem; font-weight: 600; line-height: 1.15; }
.usermenu__role { font-size: .72rem; color: var(--ink-500); text-transform: capitalize; }

.admin__body { padding: 1.5rem; flex: 1; }
.page-head { display: flex; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.page-head h1 { margin: 0 0 .15rem; }
.page-head p { margin: 0; color: var(--ink-500); font-size: .9rem; }
.page-head__actions { margin-left: auto; display: flex; gap: .5rem; flex-wrap: wrap; }

.mobile-only { display: none; }
@media (max-width: 940px) {
    .sidebar { position: fixed; left: 0; top: 0; z-index: 60; transform: translateX(-100%); transition: transform .2s ease; box-shadow: var(--sh-lg); }
    .sidebar.is-open { transform: none; }
    .admin__main { width: 100%; }
    .mobile-only { display: inline-flex; }
    .sidebar-backdrop { position: fixed; inset: 0; background: rgba(5,13,51,.5); z-index: 50; }
}

/* filters bar */
.filters {
    display: flex; gap: .6rem; flex-wrap: wrap; align-items: flex-end;
    padding: .9rem 1.15rem; background: var(--surface);
    border: 1px solid var(--border); border-radius: var(--r-lg); margin-bottom: 1rem;
}
.filters .field { margin: 0; min-width: 150px; }
.filters .field--grow { flex: 1 1 220px; }
.filters label { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-500); }

.chips { display: flex; gap: .4rem; flex-wrap: wrap; }
.chip {
    padding: .3rem .7rem; border-radius: 999px; font-size: .8rem; font-weight: 600;
    background: var(--surface); border: 1px solid var(--border); color: var(--ink-600);
}
.chip:hover { border-color: var(--blue-400); color: var(--blue-600); text-decoration: none; }
.chip.is-active { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
.chip .n { opacity: .7; margin-left: .25rem; }

/* pipeline funnel */
.funnel { display: flex; flex-wrap: wrap; gap: .4rem; }
.funnel__step {
    flex: 1 1 120px; padding: .7rem .8rem; border-radius: var(--r);
    background: var(--surface-2); border: 1px solid var(--border);
}
.funnel__step:hover { text-decoration: none; border-color: var(--blue-400); }
.funnel__step .n { font-size: 1.35rem; font-weight: 700; color: var(--navy-800); line-height: 1.1; }
.funnel__step .l { font-size: .76rem; color: var(--ink-500); font-weight: 600; }

/* bar chart (pure CSS) */
.bars { display: grid; gap: .55rem; }
.bar { display: grid; grid-template-columns: 150px 1fr 42px; align-items: center; gap: .7rem; font-size: .84rem; }
.bar__track { background: var(--ink-100); border-radius: 999px; height: .55rem; overflow: hidden; }
.bar__fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--blue-500), var(--navy-700)); }
.bar__val { text-align: right; font-weight: 650; color: var(--ink-700); }

.spark { display: flex; align-items: flex-end; gap: 4px; height: 90px; }
.spark__col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: .3rem; }
.spark__bar { width: 100%; background: var(--blue-100); border-radius: 4px 4px 0 0; min-height: 3px; transition: background .15s; }
.spark__col:hover .spark__bar { background: var(--blue-500); }
.spark__lbl { font-size: .64rem; color: var(--ink-400); }

/* meter */
.meter { height: .45rem; border-radius: 999px; background: var(--ink-100); overflow: hidden; }
.meter__fill { height: 100%; background: var(--green-600); border-radius: 999px; }
.meter__fill--warn { background: var(--amber-600); }
.meter__fill--low  { background: var(--red-600); }

/* tabs */
.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--border); margin-bottom: 1.15rem; overflow-x: auto; }
.tabs a, .tabs button {
    padding: .6rem .9rem; font-size: .88rem; font-weight: 600; color: var(--ink-500);
    border: 0; border-bottom: 2px solid transparent; background: none; cursor: pointer; white-space: nowrap;
}
.tabs a:hover, .tabs button:hover { color: var(--navy-800); text-decoration: none; }
.tabs .is-active { color: var(--navy-800); border-bottom-color: var(--blue-600); }

/* timeline */
.timeline { position: relative; padding-left: 1.4rem; }
.timeline::before { content: ""; position: absolute; left: .32rem; top: .35rem; bottom: .35rem; width: 2px; background: var(--ink-100); }
.timeline__item { position: relative; padding-bottom: 1rem; font-size: .87rem; }
.timeline__item::before {
    content: ""; position: absolute; left: -1.18rem; top: .42rem;
    width: .55rem; height: .55rem; border-radius: 50%; background: var(--blue-500);
    box-shadow: 0 0 0 3px var(--blue-100);
}
.timeline__item:last-child { padding-bottom: 0; }
.timeline__meta { color: var(--ink-500); font-size: .78rem; }

.note {
    border: 1px solid var(--border); border-radius: var(--r); padding: .75rem .9rem;
    background: var(--surface-2); font-size: .89rem; margin-bottom: .6rem;
}
.note__meta { font-size: .76rem; color: var(--ink-500); margin-bottom: .25rem; display: flex; gap: .5rem; }

/* checklist */
.checklist { display: grid; gap: .1rem; }
.checklist__row {
    display: flex; align-items: center; gap: .7rem; padding: .55rem .2rem;
    border-bottom: 1px solid var(--ink-100); font-size: .88rem;
}
.checklist__row:last-child { border-bottom: 0; }
.checklist__row .name { flex: 1; min-width: 0; }
.checklist__row.is-done .name { color: var(--ink-500); }

/* file list */
.filelist { display: grid; gap: .4rem; }
.fileitem {
    display: flex; align-items: center; gap: .7rem; padding: .55rem .7rem;
    border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface-2); font-size: .86rem;
}
.fileitem .fname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* login */
.login-page {
    min-height: 100vh; display: grid; place-items: center; padding: 2rem 1rem;
    background: radial-gradient(900px 500px at 20% 0%, var(--navy-700) 0%, transparent 60%),
                linear-gradient(150deg, var(--navy-900), #101f6b 70%, #16288a);
}
.login-card {
    width: 100%; max-width: 400px; background: var(--surface);
    border-radius: var(--r-xl); box-shadow: var(--sh-lg); padding: 2rem;
}
.login-card__brand { text-align: center; margin-bottom: 1.4rem; }
.login-card__brand .brand__mark { margin: 0 auto .7rem; width: 46px; height: 46px; font-size: .95rem; }
.login-card__brand img {
    display: block; width: clamp(120px, 38%, 150px); height: auto;
    margin: 0 auto .9rem; object-fit: contain;
}

/* pagination */
.pager { display: flex; gap: .3rem; align-items: center; justify-content: flex-end; padding: .8rem 1.15rem; flex-wrap: wrap; }
.pager a, .pager span {
    padding: .32rem .62rem; border-radius: var(--r-sm); font-size: .84rem; font-weight: 600;
    border: 1px solid var(--border); color: var(--ink-600); background: var(--surface);
}
.pager a:hover { border-color: var(--blue-400); color: var(--blue-600); text-decoration: none; }
.pager .is-current { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
.pager .disabled { opacity: .45; }

/* toolbar inside cards */
.toolbar { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }

/* two-column detail header */
.detail-head {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
    padding: 1.15rem 1.25rem; margin-bottom: 1.15rem; box-shadow: var(--sh-sm);
}
.detail-head__top { display: flex; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.detail-head h1 { font-size: 1.4rem; margin: 0 0 .2rem; }
.detail-head .sub { color: var(--ink-500); font-size: .88rem; }
.detail-head__meta { display: flex; gap: 1.6rem; flex-wrap: wrap; margin-top: 1rem; padding-top: .9rem; border-top: 1px solid var(--ink-100); }
.detail-head__meta div span { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-500); }
.detail-head__meta div strong { font-size: .9rem; font-weight: 600; }

@media print {
    .no-print { display: none !important; }
}

/* --------------------------------------------------- map pin picker --- */
.mappick {
    border: 1px solid var(--border-strong); border-radius: var(--r);
    background: var(--surface); overflow: hidden;
}
.mappick__bar {
    display: flex; align-items: center; gap: .4rem; flex-wrap: wrap;
    padding: .5rem .6rem; border-bottom: 1px solid var(--border); background: var(--surface-2);
}
.mappick__readout { text-align: right; }
.mappick__canvas { height: 300px; width: 100%; background: var(--ink-100); }
.mappick__hint { margin: 0; padding: .5rem .7rem; border-top: 1px solid var(--border); background: var(--surface-2); }
@media (max-width: 620px) {
    .mappick__canvas { height: 240px; }
    .mappick__readout { text-align: left; width: 100%; }
}

/* Read-only map on the application record */
.mapview {
    height: 240px; width: 100%; border-radius: var(--r);
    border: 1px solid var(--border); background: var(--ink-100);
}
.leaflet-container { font: inherit; }

/* ------------------------------------------ Section 6 document rows --- */
.docrow {
    display: flex; align-items: center; gap: .75rem; flex-wrap: wrap;
    border: 1px solid var(--border); border-radius: var(--r-sm);
    padding: .55rem .7rem; background: var(--surface);
    transition: border-color .14s ease, background .14s ease;
}
.docrow:hover { border-color: var(--blue-400); background: var(--blue-050); }
.docrow > .check { flex: 1 1 320px; margin: 0; }
.docrow__file { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-left: auto; }
.docrow--has { border-color: var(--green-600); background: var(--green-100); }
.docrow--has:hover { background: var(--green-100); }
.docrow__have {
    font-size: .8rem; font-weight: 600; color: var(--green-600);
    max-width: 18rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* The native file input is hidden behind a button-shaped label. */
.docrow__pick, .docrow__replace { position: relative; overflow: hidden; cursor: pointer; }
.docrow__pick input[type=file], .docrow__replace input[type=file] {
    position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer;
}
.docrow__pick span, .docrow__replace span {
    display: inline-flex; align-items: center; gap: .35rem;
    padding: .32rem .7rem; border-radius: var(--r-sm);
    border: 1px solid var(--border-strong); background: var(--surface);
    font-size: .8rem; font-weight: 600; color: var(--ink-700); white-space: nowrap;
}
.docrow__pick:hover span, .docrow__replace:hover span {
    border-color: var(--blue-500); color: var(--blue-600);
}
.docrow__pick.is-picked span { border-color: var(--green-600); color: var(--green-600); background: var(--green-100); }
@media (max-width: 620px) {
    .docrow__file { margin-left: 0; width: 100%; }
    .docrow > .check { flex: 1 1 100%; }
}

/* ------------------------------------------------- service marks --- */
.svc-card__icon svg { display: block; }
.svc-pick { align-items: center; gap: .55rem; }
.svc-pick__icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; flex: none; border-radius: 8px;
    background: var(--blue-050); color: var(--blue-600);
}
.service-table tr.is-on .svc-pick__icon { background: #fff; }
.svc-inline { display: inline-flex; align-items: center; gap: .45rem; }
.svc-inline svg { color: var(--blue-600); flex: none; }

/* ========================= 2026 visual refresh ========================= */
:root {
    --bg: #f3f6fb;
    --border: #dce4f0;
    --border-strong: #c7d2e2;
    --r-sm: 8px;
    --r: 12px;
    --r-lg: 16px;
    --r-xl: 24px;
    --sh-sm: 0 1px 2px rgba(7, 18, 48, .04), 0 5px 18px rgba(7, 18, 48, .045);
    --sh: 0 12px 34px rgba(7, 18, 48, .09);
    --sh-lg: 0 28px 70px rgba(2, 10, 36, .28);
}

body { background-color: var(--bg); }

.site-header {
    background: rgba(255, 255, 255, .88);
    border-bottom-color: rgba(199, 210, 226, .75);
    box-shadow: 0 1px 18px rgba(7, 18, 48, .05);
    backdrop-filter: saturate(160%) blur(16px);
    -webkit-backdrop-filter: saturate(160%) blur(16px);
}

.hero {
    isolation: isolate;
    min-height: 540px;
    display: flex;
    align-items: center;
    padding: clamp(72px, 9vw, 120px) 0;
    background-color: var(--navy-900);
    background-image:
        linear-gradient(90deg, rgba(3, 11, 39, .98) 0%, rgba(3, 14, 48, .91) 40%, rgba(3, 14, 48, .42) 76%, rgba(3, 14, 48, .18) 100%),
        url("../img/network-background-v2.jpg");
    background-size: cover;
    background-position: center;
}
.hero::before {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 120px;
    background: linear-gradient(180deg, transparent, rgba(2, 10, 34, .35));
    pointer-events: none;
}
.hero::after { opacity: .15; }
.hero__inner { max-width: 760px; }
.hero h1 { font-size: clamp(2.35rem, 5vw, 4.15rem); max-width: 16ch; line-height: 1.06; }
.hero p { font-size: clamp(1rem, 1.5vw, 1.18rem); color: #c6d4f4; }
.hero .btn { box-shadow: 0 12px 30px rgba(27, 77, 255, .28); }
.hero .btn--light { box-shadow: none; backdrop-filter: blur(10px); }

.section { padding: clamp(54px, 7vw, 88px) 0; }
.svc-card, .card, .stat, .form-section, .detail-head, .filters {
    border-color: rgba(199, 210, 226, .82);
    box-shadow: var(--sh-sm);
}
.svc-card { padding: 1.55rem; }
.svc-card__icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: linear-gradient(145deg, #edf3ff, #dce9ff);
    box-shadow: inset 0 0 0 1px rgba(47, 102, 255, .08);
}
.svc-card:hover, .stat:hover { box-shadow: var(--sh); }

.btn {
    border-radius: 9px;
    box-shadow: 0 5px 14px rgba(27, 77, 255, .16);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(27, 77, 255, .22); }
.btn--ghost, .btn--light { box-shadow: none; }

input[type=text], input[type=email], input[type=tel], input[type=url], input[type=number],
input[type=date], input[type=password], input[type=search], select, textarea {
    min-height: 42px;
    border-radius: 9px;
    box-shadow: inset 0 1px 2px rgba(7, 18, 48, .025);
}

.admin {
    background:
        radial-gradient(circle at 100% 0, rgba(47, 102, 255, .08), transparent 34rem),
        var(--bg);
}
.sidebar {
    width: 260px;
    background-color: #040d2c;
    background-image:
        linear-gradient(180deg, rgba(4, 13, 44, .9), rgba(4, 13, 44, .98)),
        url("../img/network-background-v2.jpg");
    background-size: auto, 700px auto;
    background-position: center, 58% bottom;
}
.sidebar__brand { padding: 1.15rem; }
.sidebar a.navlink { padding: .64rem .72rem; border-radius: 9px; }
.sidebar a.navlink.is-active {
    background: linear-gradient(135deg, var(--blue-600), #315fe2);
    box-shadow: 0 8px 22px rgba(27, 77, 255, .3);
}
.topbar {
    height: 68px;
    background: rgba(255, 255, 255, .9);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 14px rgba(7, 18, 48, .045);
}
.admin__body { padding: clamp(1rem, 2.2vw, 2rem); }
.stat__value { font-size: clamp(1.65rem, 3vw, 2.15rem); }
.card__head, .card__body, .detail-head { padding-inline: clamp(1rem, 2vw, 1.35rem); }

.login-page {
    position: relative;
    isolation: isolate;
    background-color: #03102f;
    background-image:
        linear-gradient(105deg, rgba(2, 9, 31, .82), rgba(3, 16, 54, .48)),
        url("../img/network-background-v2.jpg");
    background-size: cover;
    background-position: center;
}
.login-page::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background: radial-gradient(circle at 50% 40%, rgba(56, 121, 255, .16), transparent 32rem);
}
.login-card {
    max-width: 430px;
    padding: clamp(1.5rem, 5vw, 2.35rem);
    background: rgba(255, 255, 255, .96);
    border: 1px solid rgba(255, 255, 255, .65);
    box-shadow: 0 34px 90px rgba(0, 7, 28, .5);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

@media (max-width: 940px) {
    .topbar__search { max-width: 280px; }
    .sidebar { width: min(290px, 86vw); }
}

@media (max-width: 700px) {
    :root { --header-h: 58px; }
    body { font-size: 14px; }
    .site-header__inner { gap: .75rem; }
    .brand__logo { height: 22px; max-width: 145px; }
    .site-nav .btn { padding: .42rem .68rem; }
    .hero {
        min-height: 500px;
        background-image:
            linear-gradient(180deg, rgba(3, 11, 39, .78), rgba(3, 11, 39, .95)),
            url("../img/network-background-v2.jpg");
        background-position: 64% center;
    }
    .hero h1 { max-width: 13ch; }
    .hero__facts { gap: 1.25rem 2rem; }
    .hero__fact { flex: 1 1 110px; }
    .topbar { height: 62px; padding: 0 .8rem; gap: .55rem; }
    .topbar h1 { max-width: 34vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .topbar__search { display: none; }
    .usermenu > span:not(.avatar) { display: none; }
    .admin__body { padding: .85rem; }
    .card__body, .form-section__body { padding: 1rem; }
    .form-section > header { align-items: flex-start; flex-wrap: wrap; padding: 1rem; }
    .form-section > header .sub { width: 100%; margin-left: 0; text-align: left; }
    .filters { padding: .85rem; }
    .filters .field, .filters .field--grow { width: 100%; flex-basis: 100%; }
    .page-head__actions { width: 100%; margin-left: 0; }
    .page-head__actions .btn { flex: 1 1 auto; }
    .login-page { align-items: end; padding: 1rem; }
    .login-card { max-width: none; border-radius: 22px; }
}

@media (max-width: 480px) {
    .wrap { padding-inline: 14px; }
    .hero { min-height: calc(100svh - var(--header-h)); padding-block: 56px; }
    .hero__actions { display: grid; }
    .hero__actions .btn { width: 100%; }
    .row:not(.row--wrap) { align-items: flex-start; }
    .form-progress { top: 58px; margin-inline: -4px; }
    .funnel__step { flex-basis: calc(50% - .4rem); }
    .pager { justify-content: center; }
    .detail-head__meta { gap: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
