/* =====================================================================
   Cloud Robos site styles - public pages, logins, the client Dashboard,
   every module page (PF ECR, ESIC, JDF, ...) and the pages those modules
   show inside iframes.
   ===================================================================== */

:root {
    --brand: #1d4ed8;
    --brand-hover: #1e40af;
    --brand-soft: #eff4ff;
    --ink: #0f172a;
    --ink-2: #334155;
    --muted: #64748b;
    --line: #e2e8f0;
    --line-strong: #cbd5e1;
    --bg: #f4f6fb;
    --card: #ffffff;
    --topbar: #0f172a;
    --warn-bg: #fff7ed;
    --warn-line: #fed7aa;
    --warn-ink: #9a3412;
    --danger: #dc2626;
    --radius: 10px;
    --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .08);
    --font: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.5;
    color: var(--ink);
    background: var(--bg);
}

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-hover); text-decoration: underline; }

h1, h2, h3 { margin: 0; line-height: 1.25; color: var(--ink); }

/* ---------- Form controls (rendered by asp:TextBox / DropDownList / Button / FileUpload) ---------- */

input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
select,
textarea {
    font: inherit;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line-strong);
    border-radius: 6px;
    padding: 7px 10px;
    min-height: 36px;
    width: 100% !important;     /* overrides Width="200px" set on the server controls */
    max-width: 340px;
    transition: border-color .15s, box-shadow .15s;
}

input[type="text"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(29, 78, 216, .15);
}

input[readonly],
input[disabled],
select[disabled] {
    background: #f1f5f9;
    color: var(--muted);
    cursor: not-allowed;
}

input.input-wide { max-width: 520px; }

input[type="file"] {
    font: inherit;
    font-size: 13px;
    max-width: 340px;
}

input[type="radio"],
input[type="checkbox"] {
    accent-color: var(--brand);
    width: 16px;
    height: 16px;
    margin: 0 6px 0 0;
    vertical-align: -3px;
}

input[type="submit"],
input[type="button"],
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font: inherit;
    font-weight: 600;
    font-size: 14px;
    line-height: 1;
    padding: 10px 16px;
    min-height: 36px;
    border-radius: 6px;
    border: 1px solid var(--brand);
    background: var(--brand);
    color: #fff;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s, border-color .15s;
}

input[type="submit"]:hover,
input[type="button"]:hover,
.btn:hover {
    background: var(--brand-hover);
    border-color: var(--brand-hover);
    color: #fff;
    text-decoration: none;
}

input[type="submit"][disabled] {
    background: #94a3b8;
    border-color: #94a3b8;
    cursor: not-allowed;
}

input.btn-secondary,
.btn-secondary {
    background: #fff;
    color: var(--ink-2);
    border-color: var(--line-strong);
}

input.btn-secondary:hover,
.btn-secondary:hover {
    background: #f8fafc;
    border-color: var(--muted);
    color: var(--ink);
}

input.btn-sm { padding: 6px 12px; min-height: 30px; font-size: 13px; }

/* ===================================================================
   PF.aspx shell: top bar, page heading, accordion, footer
   =================================================================== */

.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--topbar);
    color: #fff;
}

.topbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    flex-shrink: 0;
}

.brand:hover { color: #fff; text-decoration: none; }
.brand img { height: 36px; width: auto; }   /* CloudRobosLogo.png is ~5:3 */
.brand-name { display: block; font-size: 16px; font-weight: 700; }
.brand-tag { display: block; font-size: 12px; color: #94a3b8; }

.nav {
    display: flex;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
    flex: 1;
}

.nav a {
    display: block;
    white-space: nowrap;
    padding: 8px 12px;
    border-radius: 6px;
    color: #cbd5e1;
    font-weight: 600;
    font-size: 14px;
}

.nav a:hover { background: rgba(255, 255, 255, .08); color: #fff; text-decoration: none; }
.nav .active a { background: rgba(255, 255, 255, .14); color: #fff; }

.user {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    font-size: 13px;
    color: #e2e8f0;
}

/* Signed-in user avatar (images/UserAvatar.png, already a transparent circle) */
.user input[type="image"] {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, .35);
    transition: box-shadow .15s;
}

.user input[type="image"]:hover { box-shadow: 0 0 0 2px #93c5fd; }

/* Full pages (not iframe content): keep the footer at the bottom of short pages */
body:not(.frame-body):not(.report-body) > form {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body:not(.frame-body):not(.report-body) > form > .shell { flex: 1; width: 100%; }

.shell {
    max-width: 1200px;
    margin: 0 auto;
    padding: 28px 16px 40px;
}

.page-head { margin-bottom: 20px; }
.page-head .eyebrow {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--brand);
}
.page-head h1 { font-size: 24px; font-weight: 700; margin-top: 4px; }
.page-head p { margin: 6px 0 0; color: var(--muted); }

/* AjaxControlToolkit Accordion (HeaderCssClass / HeaderSelectedCssClass / ContentCssClass) */

.steps { display: block; }

.accordionHeader,
.accordionHeaderSelected {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 10px;
    padding: 14px 18px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    cursor: pointer;
    user-select: none;
    transition: border-color .15s, background .15s;
}

.accordionHeader:hover { border-color: var(--line-strong); background: #fbfcfe; }

.accordionHeaderSelected {
    border-color: var(--brand);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    background: var(--brand-soft);
}

.accordionHeader::after,
.accordionHeaderSelected::after {
    content: "";
    margin-left: auto;
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--muted);
    border-bottom: 2px solid var(--muted);
    transform: rotate(45deg);
    transition: transform .2s;
    flex-shrink: 0;
}

.accordionHeaderSelected::after {
    transform: rotate(-135deg);
    border-color: var(--brand);
}

.step-no {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #e0e7ff;
    color: var(--brand);
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
}

.accordionHeaderSelected .step-no { background: var(--brand); color: #fff; }

.step-title { font-weight: 600; font-size: 15px; color: var(--ink); }

.soon {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--muted);
    background: #f1f5f9;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 2px 8px;
}

.accordionContent {
    background: var(--card);
    border: 1px solid var(--brand);
    border-top: none;
    border-radius: 0 0 var(--radius) var(--radius);
    padding: 16px;
}

.pane-frame {
    display: block;
    width: 100%;
    border: 0;
}

.empty-note { color: var(--muted); margin: 0; }

.link-list { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); }

.link-card {
    position: relative;
    display: block;
    padding: 14px 36px 14px 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    font-weight: 600;
    color: var(--ink);
}

.link-card::after { content: "\2197"; position: absolute; top: 14px; right: 16px; color: var(--brand); }
.link-card:hover { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); text-decoration: none; }
.link-card small { display: block; font-weight: 400; color: var(--muted); margin-top: 2px; }

.site-footer {
    border-top: 1px solid var(--line);
    background: #fff;
    color: var(--muted);
    font-size: 13px;
}

.site-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 18px 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.site-footer img { height: 26px; width: auto; }
.site-footer nav { display: flex; gap: 16px; }
.site-footer a { color: var(--ink-2); font-weight: 600; }
.site-footer .copy { margin-left: auto; }

/* ===================================================================
   Pages shown inside the iframes
   =================================================================== */

body.frame-body { background: transparent; }

.frame-page { padding: 2px; }

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px;
}

.card + .card { margin-top: 14px; }

.card-title { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.card-sub { color: var(--muted); margin: 0 0 16px; }

.callout {
    background: var(--brand-soft);
    border: 1px solid #c7d7fe;
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 18px;
    color: var(--ink-2);
}

.callout-title { font-weight: 700; color: var(--ink); margin-bottom: 4px; }
.callout ol { margin: 0; padding-left: 20px; }
.callout li + li { margin-top: 2px; }

.callout-warn { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn-ink); }

/* Two-column label / field layout */
.form-grid {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 14px 20px;
    align-items: center;
}

.form-grid > .label {
    font-weight: 600;
    color: var(--ink-2);
}

.form-grid > .label .req { color: var(--danger); }

.field {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 10px;
    min-width: 0;
}

.field .hint { flex-basis: 100%; font-size: 12px; color: var(--muted); }
.field .hint-warn { color: var(--warn-ink); }

.form-grid .full { grid-column: 1 / -1; }

.section-divider {
    grid-column: 1 / -1;
    border: 0;
    border-top: 1px solid var(--line);
    margin: 4px 0;
}

/* asp validators render as <span>; keep them compact next to the field */
.field > span[style*="color"],
.field > span[id*="Validator"] { font-size: 12px; font-weight: 600; }

.radio-group { display: inline-flex; flex-wrap: wrap; gap: 6px 18px; }
.radio-group label { cursor: pointer; }

/* Segmented control for "Add New Company / Update Existing Company" */
.segmented {
    display: inline-flex;
    padding: 4px;
    background: #f1f5f9;
    border: 1px solid var(--line);
    border-radius: 8px;
    gap: 4px;
    flex-wrap: wrap;
}

.segmented > span {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 600;
    color: var(--ink-2);
}

.segmented > span:has(input:checked) { background: #fff; color: var(--brand); box-shadow: var(--shadow); }

.vpf-help {
    font-size: 12px;
    color: var(--muted);
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 12px;
}

.vpf-help p { margin: 0; }
.vpf-help p + p { margin-top: 6px; }
.vpf-help code { font-family: Consolas, "Courier New", monospace; color: var(--ink-2); word-break: break-all; }

/* lblNote: its colour (red/green) is set from code-behind; sits on its own line above the buttons */
.form-message { display: block; flex-basis: 100%; font-weight: 600; }
.form-message:empty { display: none; }

.actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

/* Download template pane */
.download-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.file-icon {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: #dcfce7;
    color: #15803d;
    font-weight: 800;
    font-size: 12px;
    flex-shrink: 0;
}
.download-text { flex: 1; min-width: 200px; }
.download-text strong { display: block; }
.download-text span { color: var(--muted); font-size: 13px; }

/* ===================================================================
   ViewFileReports grid
   =================================================================== */

.toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 16px;
    margin-bottom: 12px;
}

.toolbar label { font-weight: 600; color: var(--ink-2); }
.toolbar select { width: auto !important; min-width: 140px; }
.toolbar .count { color: var(--muted); }
.toolbar .count span { font-weight: 700; color: var(--ink); }
.toolbar .open-new { margin-left: auto; font-weight: 600; }

body.report-body { padding: 16px; background: var(--bg); }
html:not(.top) body.report-body { padding: 2px; background: transparent; }

/* Scroll box: File ID + Company stay frozen on the left, Re-run on the right, header row on top */
.grid-scroll {
    overflow: auto;
    max-height: 75vh;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

table.grid {
    border-collapse: separate !important;   /* GridView renders border-collapse:collapse inline */
    border-spacing: 0;
    width: 100%;
    font-size: 13px;
}

.grid th,
.grid td {
    padding: 9px 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
}

.grid tr.grid-head { background: #f8fafc; }

.grid th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: inherit;
    font-weight: 700;
    font-size: 12px;
    color: var(--ink-2);
    white-space: nowrap;
    border-bottom-color: var(--line-strong);
}

.grid tr.grid-row { background: #fff; }
.grid tr.grid-row-alt { background: #fafbfd; }
.grid tr.grid-row:hover,
.grid tr.grid-row-alt:hover { background: #eef4ff; }

.grid td a { font-weight: 600; }
.grid tr.grid-selected { background: #e0e7ff; font-weight: 600; }
.grid tr.grid-foot { background: #f8fafc; font-weight: 700; }

.grid .grid-empty td { padding: 24px; color: var(--muted); text-align: center; }

.grid .freeze-col1,
.grid .freeze-col2,
.grid .freeze-right {
    position: sticky;
    z-index: 1;
    background: inherit;
}

.grid .freeze-col1 {
    left: 0;
    width: 84px;
    min-width: 84px;
    max-width: 84px;
    font-variant-numeric: tabular-nums;
}

.grid .freeze-col2 {
    left: 84px;                 /* = width of the File ID column (box-sizing: border-box) */
    min-width: 220px;
    max-width: 280px;
    white-space: normal;
    word-break: normal;         /* grid gets word-break:break-all from code-behind; wrap names only between words */
    font-weight: 600;
    box-shadow: 1px 0 0 var(--line-strong);
}

.grid .freeze-right {
    right: 0;
    white-space: nowrap;
    box-shadow: -1px 0 0 var(--line-strong);
}

/* Corner header cells sit above both the frozen columns and the frozen header */
.grid th.freeze-col1,
.grid th.freeze-col2,
.grid th.freeze-right { z-index: 3; }

/* Code-behind adds word-break:break-all to every report grid; wrap text only between words */
table.grid { word-break: normal !important; }

/* ===================================================================
   Dashboard
   =================================================================== */

.tiles {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
}

a.tile {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 132px;
    padding: 18px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    color: var(--ink);
    transition: border-color .15s, transform .15s, box-shadow .15s;
}

a.tile:hover {
    border-color: var(--brand);
    box-shadow: 0 4px 14px rgba(29, 78, 216, .12);
    transform: translateY(-1px);
    text-decoration: none;
    color: var(--ink);
}

.tile-code {
    align-self: flex-start;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .05em;
    color: var(--brand);
    background: var(--brand-soft);
    border-radius: 6px;
    padding: 4px 8px;
}

.tile-title { font-size: 15px; font-weight: 700; line-height: 1.35; }

.tile-go { margin-top: auto; font-size: 13px; font-weight: 600; color: var(--brand); }

/* Page that is still under development (UAN Creation) */
.notice-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 28px;
    max-width: 640px;
}

.notice-card h2 { font-size: 18px; margin-bottom: 6px; }
.notice-card p { margin: 0; color: var(--muted); }

/* ===================================================================
   Module child pages: multi-step forms, options, previews
   =================================================================== */

.page-title { font-size: 18px; font-weight: 700; margin: 0 0 4px; }
.page-title .alt { display: block; font-size: 14px; font-weight: 600; color: var(--muted); }

.step-badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #fff;
    background: var(--brand);
    border-radius: 999px;
    padding: 3px 10px;
    margin-bottom: 10px;
}

.frame-head {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.frame-head .open-new { margin-left: auto; font-weight: 600; }

.option-group {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px 14px;
    background: #fff;
}

.option-group + .option-group { margin-top: 10px; }
.option-group .q { font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.option-group .opt { display: flex; align-items: baseline; gap: 6px; padding: 3px 0; }
.option-group .opt label { font-weight: 600; cursor: pointer; }
.option-group .opt .desc { color: var(--muted); }

textarea { max-width: 520px; min-height: 80px; resize: vertical; }

/* Hidden carrier field used by the ESIC Excel preview script (txtBoxExcelData) */
input.carrier-field {
    width: 1px !important;
    height: 1px !important;
    min-height: 0;
    padding: 0;
    border: 0;
    opacity: 0;
}

/* ESIC Excel preview (replaces the Bootstrap classes the script writes) */
/* Fixed px, not vh: this page auto-sizes its iframe, so a vh limit would chase its own height */
.excel-preview { overflow: auto; max-height: 480px; margin-top: 14px; }
.excel-preview:empty { display: none; }
.excel-preview .table { border-collapse: collapse; font-size: 12px; background: #fff; }
.excel-preview .table td,
.excel-preview .table th { border: 1px solid var(--line); padding: 6px 8px; white-space: nowrap; }
.excel-preview .table tr:first-child td { background: #f8fafc; font-weight: 700; }
.excel-preview .table-striped tr:nth-child(even) td { background: #fafbfd; }
.excel-preview .alert-danger {
    color: var(--danger);
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 10px 12px;
    font-weight: 600;
}

.instructions { color: var(--warn-ink); font-weight: 600; margin-top: 10px; }
.instructions:empty { display: none; }

/* JDF "incorrect / correct details" table */
table.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
}

.data-table th,
.data-table td { padding: 6px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table th { background: #f8fafc; font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.data-table td:first-child { width: 48px; color: var(--muted); }
.data-table td:nth-child(2) { font-weight: 600; white-space: nowrap; }
.data-table input[type="text"] { max-width: none; }

.section-title { font-weight: 700; color: var(--ink); margin: 0 0 12px; }

/* ===================================================================
   Public site (Home, About, Benefits, Process, Clients, Contact, ...)
   =================================================================== */

.nav-cta a { background: var(--brand); color: #fff; }
.nav-cta a:hover { background: var(--brand-hover); }

.hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 60%, #1d4ed8 100%);
    color: #fff;
}

.hero-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 56px 16px;
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    gap: 32px;
    align-items: center;
}

.hero .eyebrow { color: #93c5fd; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.hero h1 { color: #fff; font-size: 38px; line-height: 1.15; margin: 8px 0 14px; }
.hero p { color: #cbd5e1; font-size: 16px; margin: 0 0 22px; max-width: 560px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .btn-ghost { background: transparent; border-color: rgba(255, 255, 255, .5); color: #fff; }
.hero .btn-ghost:hover { background: rgba(255, 255, 255, .1); border-color: #fff; }
.hero-art { display: flex; justify-content: center; }
.hero-art img { width: 100%; max-width: 360px; height: auto; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .35)); }

.section { max-width: 1200px; margin: 0 auto; padding: 40px 16px; }
.section + .section { padding-top: 0; }
.section h2 { font-size: 22px; margin-bottom: 12px; }
.section p { color: var(--ink-2); margin: 0 0 12px; line-height: 1.65; }
.prose { max-width: 820px; }
.prose strong { color: var(--ink); }

.feature-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
    padding: 0;
    margin: 0;
    list-style: none;
}

.feature-grid li {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px 16px 14px 40px;
    position: relative;
    color: var(--ink-2);
}

.feature-grid li::before {
    content: "\2713";
    position: absolute;
    left: 14px;
    top: 13px;
    color: var(--brand);
    font-weight: 800;
}

.chip-list { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; list-style: none; }
.chip-list li { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 13px; color: var(--ink-2); }

.cta-band {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 22px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.cta-band h3 { font-size: 17px; margin: 0; }
.cta-band p { margin: 4px 0 0; color: var(--muted); }
.cta-band .btn { margin-left: auto; }

.logo-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); }
.logo-grid div {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px;
    display: grid;
    place-items: center;
    height: 140px;
}
.logo-grid img { max-width: 100%; max-height: 100px; object-fit: contain; }

.team-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); margin-top: 16px; }
.team-grid div { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; text-align: center; }
.team-grid img { max-width: 100%; height: auto; border-radius: 8px; }
.team-grid div { text-align: left; border-left: 3px solid var(--brand); }
.team-grid .name { margin-top: 0; }

/* Clients: industry tiles, testimonials, tools strip */
.industry-grid { grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); }
.industry-grid .service-card { padding: 18px; }
.industry-grid .service-card h3 { font-size: 16px; }
.industry-grid .service-card p { margin: 0; font-size: 14px; }

.testimonial {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
}
.testimonial p { font-size: 15px; color: var(--ink); line-height: 1.6; margin: 0 0 12px; }
.testimonial .who { color: var(--muted); font-size: 13px; font-weight: 600; }

.tool-strip { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(170px, 100%), 1fr)); }
.tool-strip div {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px 12px;
    text-align: center;
    font-weight: 700;
    color: var(--ink-2);
}
.team-grid .name { display: block; font-weight: 700; margin-top: 8px; }
.team-grid .role { display: block; color: var(--muted); font-size: 13px; }

.two-col { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); align-items: start; }

/* Home: the two services, headline stats */
.service-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }
.service-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 22px;
}
.service-card .icon {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: var(--brand-soft);
    color: var(--brand);
    font-size: 20px;
    margin-bottom: 10px;
}
.service-card h3 { font-size: 18px; margin-bottom: 6px; }
.service-card p { color: var(--ink-2); margin: 0 0 12px; line-height: 1.6; }
.service-card a { font-weight: 600; }

.stats { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.stat strong { display: block; font-size: 28px; color: var(--brand); line-height: 1.1; }
.stat span { color: var(--ink-2); }

/* Process: numbered steps */
.steps-list { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); counter-reset: step; padding: 0; margin: 0; list-style: none; }
.steps-list li {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px;
    counter-increment: step;
}
.steps-list li::before {
    content: counter(step);
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--brand);
    color: #fff;
    font-weight: 700;
    margin-bottom: 10px;
}
.steps-list h3 { font-size: 16px; margin-bottom: 6px; }
.steps-list p { margin: 0; color: var(--ink-2); line-height: 1.6; }

/* Pricing */
.price-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); align-items: stretch; }
.price-grid.four { grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr)); }   /* AI Services: 4 cards on one row on laptops */
.price-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow);
    padding: 22px;
}
.price-card.featured { border: 2px solid var(--brand); }
.price-card .badge {
    position: absolute;
    top: -11px;
    left: 22px;
    background: var(--brand);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    border-radius: 999px;
    padding: 3px 10px;
}
.price-card h3 { font-size: 17px; margin-bottom: 4px; }
.price-card .for { color: var(--muted); font-size: 13px; margin: 0 0 14px; }
.price-card .amount { font-size: 34px; font-weight: 800; color: var(--ink); line-height: 1; }
.price-card .amount small { font-size: 14px; font-weight: 600; color: var(--muted); }
.price-card .amount-note { color: var(--muted); font-size: 13px; margin: 6px 0 16px; }
.price-card ul { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 8px; color: var(--ink-2); }
.price-card li { padding-left: 22px; position: relative; }
.price-card li::before { content: "\2713"; position: absolute; left: 0; color: var(--brand); font-weight: 800; }
.price-card .btn { margin-top: auto; justify-content: center; }

.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
table.compare { width: 100%; border-collapse: collapse; font-size: 14px; }
.compare th, .compare td { padding: 11px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.compare th { background: #f8fafc; font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.compare tr:last-child td { border-bottom: 0; }
.compare tr.ours td { background: var(--brand-soft); }
.compare tr.ours td:first-child { font-weight: 700; color: var(--brand); }
.compare td.num { white-space: nowrap; font-weight: 600; }
.fine-print { color: var(--muted); font-size: 12px; margin-top: 10px; line-height: 1.5; }

.office-list { display: grid; gap: 12px; margin-top: 12px; }
.office { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; color: var(--ink-2); }
.office strong { display: block; color: var(--ink); }

/* Stacked form (label above field) used on Contact / Login / Sign up */
.stack-form { display: grid; gap: 14px; }
.stack-form .label { font-weight: 600; color: var(--ink-2); margin-bottom: 6px; display: block; }
.stack-form .req { color: var(--danger); }
.stack-form input[type="text"],
.stack-form input[type="password"],
.stack-form select,
.stack-form textarea { max-width: none; }

/* Login / sign-up card */
.auth-wrap { display: grid; place-items: center; padding: 48px 16px; }
.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .08);
    padding: 28px;
}
.auth-card .auth-logo { display: block; height: 56px; width: auto; margin: 0 auto 10px; }
.auth-card h1 { font-size: 22px; text-align: center; margin-bottom: 4px; }
.auth-card .sub { text-align: center; color: var(--muted); margin: 0 0 20px; }
.auth-card input[type="submit"] { width: 100%; justify-content: center; }
.auth-links { display: flex; justify-content: space-between; gap: 10px; margin-top: 14px; font-size: 13px; flex-wrap: wrap; }
.validation-summary { color: var(--danger); font-weight: 600; font-size: 13px; }
.validation-summary:empty { display: none; }
.validation-summary ul { margin: 0; padding-left: 18px; }

/* ===================================================================
   Internal tool pages (OtherWork, Services): existing table layouts,
   restyled in place without restructuring their controls
   =================================================================== */

body.tool-page { padding: 0; }
body.tool-page > form { max-width: 1100px; margin: 0 auto; padding: 24px 16px 40px; }
body.tool-page table { border-collapse: separate; border-spacing: 0 8px; }
body.tool-page td { vertical-align: top; padding: 2px 10px 2px 0; }
body.tool-page input[type="text"],
body.tool-page textarea,
body.tool-page select { width: auto !important; max-width: 100%; }
body.tool-page .tool-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 0 14px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--line);
}
body.tool-page .tool-head img { height: 30px; width: auto; }
body.tool-page .tool-head strong { font-size: 15px; }
body.tool-page .tool-head span { color: var(--muted); font-size: 12px; }

@media (max-width: 860px) {
    .hero-inner, .two-col { grid-template-columns: minmax(0, 1fr); }
    .hero-art img { max-width: 240px; }
    .hero h1 { font-size: 30px; }
}

/* ---------- Public menu: hamburger button on tablets and phones ---------- */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    padding: 0 10px;
    margin-left: auto;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 8px;
    cursor: pointer;
}
.nav-toggle span { display: block; height: 2px; background: #fff; border-radius: 2px; transition: transform .2s, opacity .2s; }
.topbar.menu-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.topbar.menu-open .nav-toggle span:nth-child(2) { opacity: 0; }
.topbar.menu-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 1000px) {
    .topbar-inner:has(.nav-toggle) { flex-wrap: wrap; gap: 10px 16px; }
    .nav-toggle { display: inline-flex; }
    .topbar-inner:has(.nav-toggle) .nav {
        display: none;
        order: 3;
        flex-basis: 100%;
        flex-direction: column;
        gap: 2px;
        padding: 6px 0 4px;
        border-top: 1px solid rgba(255, 255, 255, .12);
    }
    .topbar.menu-open .nav { display: flex !important; }
    .topbar-inner:has(.nav-toggle) .nav a { padding: 12px 10px; font-size: 15px; }
    .topbar-inner:has(.nav-toggle) .nav-cta a { text-align: center; margin-top: 6px; }
}

/* Small phones: let the logo + tagline shrink so the menu button stays on the same row */
@media (max-width: 480px) {
    .topbar-inner { padding-left: 12px; padding-right: 12px; }
    .brand { flex: 1 1 0; min-width: 0; flex-shrink: 1; gap: 8px; }
    .brand img { height: 30px; }
    .brand-name { font-size: 15px; }
    .brand-tag { font-size: 11px; line-height: 1.3; }
}

/* ---------- Internal tool pages on phones: stack their table layouts ---------- */
@media (max-width: 720px) {
    body.tool-page > form { padding: 16px 12px 32px; }
    body.tool-page table, body.tool-page tbody, body.tool-page tr, body.tool-page td { display: block; width: 100% !important; }
    body.tool-page td { padding: 2px 0; }
    body.tool-page input[type="text"],
    body.tool-page textarea,
    body.tool-page select { width: 100% !important; }
}

@media (max-width: 720px) {
    .topbar-inner { flex-wrap: wrap; gap: 10px 16px; }
    .nav { order: 3; flex-basis: 100%; overflow-x: auto; }
    .user { margin-left: auto; }
    .form-grid { grid-template-columns: minmax(0, 1fr); gap: 6px; }
    .form-grid > .label { margin-top: 8px; }
    .site-footer .copy { margin-left: 0; }
    .toolbar .open-new { margin-left: 0; }
}
