/* ════════════════════════════════════════════════════════════════
 * GS1 Ísland — Mitt svæði
 * Design tokens + portal shell + all three tab pages.
 * ════════════════════════════════════════════════════════════════ */

@font-face {
    font-family: 'Gothamoffice';
    src: url('../fonts/GothamOffice-Regular.woff') format('woff'),
         url('../fonts/GothamOffice-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Gothamoffice';
    src: url('../fonts/GothamOffice-Regular.woff') format('woff'),
         url('../fonts/GothamOffice-Regular.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Gothamoffice';
    src: url('../fonts/GothamOffice-Bold.woff') format('woff');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --blue-brand:       #002C6C;
    --orange-brand:     #F26334;
    --blue-4:           #001A4D;
    --light-blue-3:     #008DBD;
    --orange-3:         #CD3C0D;
    --light-blue:       #E5F0FC;
    --light-blue-2:     #C4D7ED;
    --light-grey:       #F0F5FA;
    --gray:             #F8F8F8;
    --surface-white:    #FFFFFF;
    --surface-bg:       #F8FAFC;
    --text-color:       #222222;
    --text-strong:      #111827;
    --text-mid:         #374151;
    --text-muted:       #6B7280;
    --border-neutral:   #D1D5DB;
    --border-card:      #E5E7EB;

    --error:            #DC2626;
    --error-text-dark:  #991B1B;

    --font-display:     'Gothamoffice', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-body:        Arial, 'Helvetica Neue', Helvetica, sans-serif;
    --font-mono:        'SF Mono', Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.5;
    color: var(--text-color);
    background: var(--surface-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* All typography is set via the .t-* utility classes below — heading
 * tags carry only semantics (h1, h2, etc.), not visual styling. */
h1, h2, h3, h4, h5, h6 {
    margin: 0;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
    color: inherit;
    font-family: inherit;
}

/* ════════════════════════════════════════════════════════════════
 * Typography roles
 * ----------------------------------------------------------------
 * Eight roles cover all text in the app. Pick one per element and
 * apply it as a class. Don't override font-size / font-weight /
 * font-family / line-height / color in component CSS — if a piece
 * of text doesn't fit a role, propose a new one rather than ad-hoc
 * styling.
 *
 *   .t-page-header     32 / 400 / 1.2 / strong / display  → top-of-route h1
 *   .t-section-title   20 / 500 / 1.3 / strong / display  → section h2/h3
 *   .t-card-title      15 / 500 / 1.4 / strong / display  → card heading
 *   .t-card-subtitle   13 / 500 / 1.4 / mid    / body     → secondary line under a title
 *   .t-body            14 / 400 / 1.6 / mid    / body     → paragraphs, explainers
 *   .t-caption         12 / 400 / 1.4 / muted  / body     → footnotes, micro-copy
 *   .t-label           11 / 500 / 1.2 / muted  / body     → UPPERCASE chips / labels
 *   .t-mono            14 / 500 / 1.4 / strong / mono     → IDs / GTINs (default)
 *   .t-mono-sm         12 / 500 / 1.4 / strong / mono     → compact monospace
 *   .t-mono-lg         17 / 500 / 1.4 / strong / mono     → featured monospace numbers
 * ════════════════════════════════════════════════════════════════ */
.t-page-header {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 400;
    line-height: 1.2;
    color: var(--text-strong);
}
.t-section-title {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 500;
    line-height: 1.3;
    color: var(--text-strong);
}
.t-card-title {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
    color: var(--text-strong);
}
.t-card-subtitle {
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    color: var(--text-mid);
}
.t-body {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.6;
    color: var(--text-mid);
}
.t-caption {
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 400;
    line-height: 1.4;
    color: var(--text-muted);
}
.t-label {
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 500;
    line-height: 1.2;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.t-mono {
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    color: var(--text-strong);
}
.t-mono-sm { font-size: 12px; }
.t-mono-lg { font-size: 17px; }

a {
    color: var(--light-blue-3);
    text-decoration: none;
}
a:hover { text-decoration: underline; }

button { font-family: inherit; }

/* ════════════════════════════════════════════════════════════════
 * V2TabTop — thin utility strip + brand bar + tab bar
 * Ported from directions/V2.jsx V2TabTop (lines 611–665)
 * ════════════════════════════════════════════════════════════════ */

body {
    background: #F8FAFC;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* thin utility strip (navy on light-blue band) */
#gs1-utility-strip {
    background: var(--light-blue-2);
    color: var(--blue-brand);
    padding: 4px 32px;
    text-align: right;
    font-size: 11px;
    letter-spacing: 0.02em;
    font-family: var(--font-body);
}

/* brand bar — logo + company + right-side user */
#gs1-header {
    background: #fff;
    border-bottom: 1px solid #EEF2F7;
    padding: 14px 32px;
    display: flex;
    align-items: center;
    gap: 20px;
    color: var(--text-mid);
}
.gs1-header-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}
.gs1-header-logo {
    height: 40px;
    width: auto;
    flex-shrink: 0;
}
.gs1-header-title {
    color: var(--text-muted);
    font-size: 14px;
    font-family: var(--font-body);
}
.gs1-header-title [data-gs1="company-name"] {
    color: var(--text-strong);
    font-weight: 500;
}
.gs1-company-ssn-inline {
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 12px;
    margin-left: 6px;
}
.gs1-header-spacer { flex: 1; }

#gs1-help-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-mid);
    font-size: 13px;
    text-decoration: none;
}
#gs1-help-link:hover { color: var(--blue-brand); text-decoration: underline; }

/* Avatar dropdown */
.gs1-avatar-menu {
    position: relative;
}
.gs1-avatar-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px 4px 4px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-mid);
    font-family: var(--font-body);
}
.gs1-avatar-btn:hover {
    background: var(--light-grey);
    border-color: var(--border-card);
}
.gs1-avatar-btn[aria-expanded="true"] {
    background: var(--light-grey);
    border-color: var(--border-card);
}
.gs1-user-avatar {
    width: 26px;
    height: 26px;
    border-radius: 4px;
    background: var(--text-muted);
    color: #fff;
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.gs1-avatar-chevron {
    color: var(--text-muted);
    transition: transform 180ms ease;
}
.gs1-avatar-btn[aria-expanded="true"] .gs1-avatar-chevron {
    transform: rotate(180deg);
}
.gs1-avatar-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 200px;
    background: #fff;
    border: 1px solid var(--border-card);
    border-radius: 6px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    padding: 4px;
    z-index: 100;
    display: flex;
    flex-direction: column;
}
.gs1-menu-item {
    display: block;
    width: 100%;
    text-align: left;
    padding: 8px 12px;
    border: 0;
    background: transparent;
    color: var(--text-mid);
    font-family: var(--font-body);
    font-size: 13px;
    cursor: pointer;
    border-radius: 4px;
    text-decoration: none;
}
.gs1-menu-item:hover {
    background: var(--light-grey);
    color: var(--blue-brand);
    text-decoration: none;
}

/* Tab bar */
#gs1-tabs.gs1-tabbar {
    background: #fff;
    border-bottom: 1px solid var(--border-card);
    padding: 0 32px;
    display: flex;
    gap: 4px;
}
.gs1-tabbar .gs1-tab {
    position: relative;
    background: transparent;
    border: 0;
    padding: 14px 14px 12px;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 400;
}
.gs1-tabbar .gs1-tab:hover { color: var(--text-strong); }
.gs1-tabbar .gs1-tab.is-active {
    color: var(--text-strong);
    font-weight: 500;
}
.gs1-tabbar .gs1-tab.is-active::after {
    content: '';
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: -1px;
    height: 2px;
    background: var(--orange-brand);
    border-radius: 1px;
}

/* ── Shell layout ───────────────────────────────────────────── */
.gs1-shell {
    flex: 1;
    max-width: 1280px;
    margin: 0 auto;
    width: 100%;
    padding: 40px 32px 72px;
}
body[data-active-tab="vorugreind"][data-vg-view="detail"] .gs1-shell {
    max-width: none;
    padding-left: 0;
    padding-right: 0;
}
body[data-vg-view="detail"] .vg-subtabs {
    margin-bottom: 0;
}

/* ── Main area ──────────────────────────────────────────────── */
.gs1-main {
    min-width: 0;
}

/* ── V2Footer ────────────────────────────────────────────────── */
#gs1-footer {
    background: #fff;
    border-top: 1px solid var(--border-card);
    padding: 18px 32px;
    display: flex;
    align-items: center;
    gap: 24px;
    font-family: var(--font-body);
    font-size: 12px;
    color: var(--text-muted);
}
.gs1-footer-mark {
    height: 40px;
    flex-shrink: 0;
}
.gs1-footer-copy {
    flex: 1;
    text-align: center;
}
.gs1-footer-link {
    color: var(--blue-brand);
    text-decoration: none;
    white-space: nowrap;
}
.gs1-footer-link:hover { text-decoration: underline; }

/* ── Fyrirtæki slide-over ────────────────────────────────────── */
.gs1-slideover-overlay {
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, 0.35);
    z-index: 200;
    opacity: 0;
    transition: opacity 250ms ease;
}
.gs1-slideover-overlay.is-open { opacity: 1; }

.gs1-slideover {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(440px, 100vw);
    background: #fff;
    box-shadow: -10px 0 25px rgba(0, 0, 0, 0.08);
    z-index: 201;
    transform: translateX(100%);
    transition: transform 250ms ease;
    display: flex;
    flex-direction: column;
}
.gs1-slideover.is-open { transform: translateX(0); }

.gs1-slideover-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-card);
}
.gs1-slideover-head h2 {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 500;
    color: var(--blue-brand);
    margin: 0;
}
.gs1-slideover-close {
    background: transparent;
    border: 0;
    padding: 6px;
    cursor: pointer;
    color: var(--text-muted);
    border-radius: 4px;
}
.gs1-slideover-close:hover {
    background: var(--light-grey);
    color: var(--text-strong);
}
.gs1-slideover-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
}
.gs1-company-dl {
    margin: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}
.gs1-company-dl dt {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    font-weight: 500;
    margin: 0;
}
.gs1-company-dl dd {
    margin: 4px 0 0;
    font-size: 14px;
    color: var(--text-strong);
    font-family: var(--font-body);
}

.gs1-page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 8px;
    gap: 20px;
    flex-wrap: wrap;
}

.gs1-page-subtitle {
    margin: 0 0 4px;
    max-width: 820px;
}

.gs1-loading {
    margin: 14px 0;
}

/* ── Intro block ────────────────────────────────────────────── */
.gs1-intro {
    background: #fff;
    border-radius: 8px;
    padding: 18px 22px;
    margin-top: 14px;
    border: 1px solid var(--light-grey);
    border-left: 3px solid var(--blue-brand);
}
.gs1-intro[data-accent="orange"] { border-left-color: var(--orange-brand); }
.gs1-intro[data-accent="blue"]   { border-left-color: var(--light-blue-3); }
.gs1-intro h3 {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 500;
    color: var(--blue-brand);
    margin: 0 0 4px;
}
.gs1-intro p {
    color: var(--text-mid);
    font-size: 13.5px;
    line-height: 1.6;
    margin: 0;
    max-width: 820px;
}

/* ── Section divider ────────────────────────────────────────── */
.gs1-section-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, var(--border-card) 20%, var(--border-card) 80%, transparent);
    margin: 48px 0 28px;
}

/* ── Card lists ─────────────────────────────────────────────── */
.gs1-card-list {
    list-style: none;
    padding: 0;
    margin: 20px 0 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.gs1-card-grid {
    list-style: none;
    padding: 0;
    margin: 20px 0 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 12px;
}
.gs1-card-grid.is-solo {
    display: block;
}

/* ── Card base ──────────────────────────────────────────────── */
.gs1-card {
    background: #fff;
    border-radius: 10px;
    border: 1px solid var(--border-card);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    overflow: hidden;
    transition: box-shadow 180ms ease;
}
.gs1-card.is-open {
    box-shadow: 0 4px 12px rgba(0, 44, 108, 0.08);
}

.gs1-card-header {
    cursor: pointer;
    outline: none;
}
.gs1-card-header:focus-visible {
    box-shadow: 0 0 0 2px var(--light-blue-3) inset;
}

.gs1-mono {
    letter-spacing: 0.02em;
}

.gs1-pill {
    padding: 3px 8px;
    border-radius: 999px;
}

.gs1-chevron {
    transition: transform 180ms ease;
    color: var(--text-muted);
    flex-shrink: 0;
}
.gs1-card.is-open .gs1-chevron { transform: rotate(180deg); }

.gs1-toggle-hint {
    color: var(--text-muted);
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* ── GCP card ───────────────────────────────────────────────── */
.gs1-gcp-card .gs1-card-header {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    gap: 20px;
    padding: 18px 22px;
    align-items: center;
}
/* Top row of the expanded card body: explainer paragraph on the
 * left, action button (e.g. "Sækja GCP vottorð") pinned to the
 * upper-right. Stacks on narrow viewports so the button sits
 * above the explainer rather than next to it. */
.gs1-card-body-top {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 18px;
}
.gs1-card-body-top .gs1-card-explainer {
    margin: 0;
    flex: 1 1 auto;
}
.gs1-card-body-action {
    flex-shrink: 0;
}
@media (max-width: 640px) {
    .gs1-card-body-top {
        flex-direction: column-reverse;
    }
}
.gs1-gcp-card .gs1-icon-tile {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: var(--light-blue);
    color: var(--blue-brand);
    display: flex;
    align-items: center;
    justify-content: center;
}
.gs1-gcp-card[data-tone="teal"] .gs1-icon-tile {
    background: #DCEEF4;
    color: #005B7C;
}
.gs1-gcp-card[data-tone="teal"] .gs1-pill {
    background: #DCEEF4;
    color: #005B7C;
}
.gs1-gcp-card[data-tone="navy"] .gs1-pill {
    background: var(--light-blue);
    color: var(--blue-brand);
}

.gs1-card-headline {
    min-width: 0;
}
.gs1-card-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.gs1-card-subtitle {
    margin-top: 4px;
}
.gs1-card-subtitle strong { color: var(--text-strong); }

.gs1-card-body {
    border-top: 1px solid var(--light-blue);
    padding: 22px 22px 24px;
}
.gs1-gcp-card[data-tone="navy"] .gs1-card-body {
    background: #F7FAFD;
    border-top-color: var(--light-blue);
}
.gs1-gcp-card[data-tone="teal"] .gs1-card-body {
    background: #F6FBFC;
    border-top-color: #DCEEF4;
}
.gs1-card-explainer {
    margin: 0 0 18px;
    max-width: 760px;
}
.gs1-card-explainer strong { color: var(--text-strong); }

.gs1-stat-label {
    margin-bottom: 4px;
}

/* ── GLN card ───────────────────────────────────────────────── */
.gs1-gln-card .gs1-card-header {
    padding: 16px 18px;
}
.gs1-gln-card.is-featured .gs1-card-header { padding: 20px 22px; }

.gs1-gln-num-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.gs1-gln-pin {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: #FCE7DA;
    color: var(--orange-brand);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.gs1-gln-spacer { flex: 1; }

.gs1-copy-btn {
    border: 0;
    background: transparent;
    padding: 4px 6px;
    cursor: pointer;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    line-height: 1;
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 500;
}
.gs1-copy-btn:hover { color: var(--text-mid); background: var(--light-grey); }
.gs1-copy-btn.is-copied { color: #276749; }
.gs1-copy-btn.is-copied:hover { background: transparent; }
.gs1-copy-btn .gs1-copy-label { display: none; }
.gs1-copy-btn.is-copied .gs1-copy-label { display: inline; }
.gs1-copy-btn .gs1-copied-icon { display: none; }
.gs1-copy-btn.is-copied .gs1-copied-icon { display: inline; }
.gs1-copy-btn.is-copied .gs1-copy-icon { display: none; }

.gs1-gln-name {
    color: var(--blue-brand);
    margin-bottom: 4px;
}

.gs1-gln-card .gs1-card-body {
    background: #FFFAF6;
    border-top-color: #FCE7DA;
    padding: 16px 22px 20px;
}
.gs1-gln-card .gs1-card-body p {
    margin: 0 0 14px;
    max-width: 720px;
}
.gs1-gln-card .gs1-card-body p strong { color: var(--text-strong); }
.gs1-card-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: center;
}

/* ── Solo GLN footer ────────────────────────────────────────── */
.gs1-gln-solo-footer {
    margin-top: 14px;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

/* ── Buttons ────────────────────────────────────────────────── */
.gs1-btn-planned {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    background: #fff;
    color: var(--text-muted);
    border: 1px dashed var(--light-blue-2);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: not-allowed;
}
.gs1-btn-row-planned {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    background: #fff;
    color: #9CA3AF;
    border: 1px dashed var(--light-blue-2);
    border-radius: 6px;
    font-size: 12px;
    cursor: not-allowed;
}
.gs1-coming {
    color: #9CA3AF;
    background: var(--light-grey);
    padding: 2px 6px;
    border-radius: 999px;
    margin-left: 2px;
}
.gs1-ghost-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--light-blue-3);
    font-size: 13px;
    padding: 7px 4px;
}

/* ── Shared primary / danger buttons ────────────────────────── */
.gs1-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--orange-brand);
    color: #fff;
    border: 0;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}
.gs1-btn-primary:hover { background: var(--orange-3); }
.gs1-btn-primary:disabled,
.gs1-btn-primary[disabled] {
    background: #FCE7DA;
    color: #fff;
    cursor: not-allowed;
}
.gs1-btn-danger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    background: #fff;
    color: #C53030;
    border: 1px solid #FDC8C3;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}
.gs1-btn-danger:hover { background: #FDE6E3; }
.gs1-btn-danger.is-confirming {
    background: #C53030;
    color: #fff;
    border-color: #C53030;
}

/* ── Chips ──────────────────────────────────────────────────── */
.gs1-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 999px;
    border: 1px solid;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}
.gs1-chip.is-blue   { background: var(--light-blue); color: #0B5394; border-color: var(--light-blue-2); }
.gs1-chip.is-green  { background: #DBEEDD;            color: #2E6B3D; border-color: #B5D9BB; }
.gs1-chip.is-red    { background: #FDE6E3;            color: #B02A20; border-color: #F6B5AE; }
.gs1-chip.is-muted  { background: #F3F4F6;            color: #9CA3AF; border-color: var(--border-card); }
.gs1-chip.is-struck > span { text-decoration: line-through; }

[hidden] { display: none !important; }

/* ── Reikningar tab ─────────────────────────────────────────── */
.gs1-invoice-list {
    list-style: none;
    padding: 0;
    margin: 20px 0 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.gs1-invoice-card {
    background: #fff;
    border-radius: 10px;
    border: 1px solid var(--border-card);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    padding: 16px 20px;
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    gap: 20px;
    align-items: center;
    cursor: pointer;
    transition: box-shadow 180ms ease, border-color 180ms ease;
}
.gs1-invoice-card:hover {
    border-color: var(--light-blue-2);
    box-shadow: 0 4px 12px rgba(0, 44, 108, 0.06);
}
.gs1-invoice-meta { min-width: 0; }
.gs1-invoice-title {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 500;
    color: var(--blue-brand);
}
.gs1-invoice-sub {
    color: var(--text-muted);
    font-size: 12px;
    margin-top: 4px;
    font-family: var(--font-mono);
}
.gs1-invoice-sep { margin: 0 6px; }
.gs1-invoice-amount {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 500;
    color: var(--text-strong);
    text-align: right;
    min-width: 110px;
}
.gs1-invoice-pdf {
    color: var(--light-blue-3);
    font-size: 13px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.gs1-status-pill {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 3px 9px;
    border-radius: 999px;
    white-space: nowrap;
}
.gs1-status-pill.is-paid    { background: #DBEEDD;            color: #2E6B3D; }
.gs1-status-pill.is-due     { background: var(--light-grey);  color: var(--text-muted); }
.gs1-status-pill.is-overdue { background: #FDE6E3;            color: #B02A20; }

/* ── Tengiliðir tab ─────────────────────────────────────────── */
.gs1-contact-card { /* inherits .gs1-card base */ }

.gs1-contact-header {
    display: grid;
    grid-template-columns: 44px 1fr auto auto;
    gap: 14px;
    align-items: center;
    padding: 14px 18px;
}
.gs1-contact-avatar {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: var(--light-grey);
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.02em;
}
.gs1-contact-card.is-helsti .gs1-contact-avatar {
    background: var(--light-blue);
    color: var(--blue-brand);
}
.gs1-contact-headline { min-width: 0; }
.gs1-contact-name {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 500;
    color: var(--text-strong);
    overflow: hidden;
    text-overflow: ellipsis;
}
.gs1-contact-email {
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 2px;
}
.gs1-contact-chips {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.gs1-contact-body {
    background: #F7FAFD;
    border-top: 1px solid var(--light-blue);
    padding: 20px 22px 22px;
}
.gs1-field-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 14px;
}
.gs1-field { display: block; margin-bottom: 16px; }
.gs1-field-grid .gs1-field { margin-bottom: 0; }
.gs1-field-label {
    display: block;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.gs1-field input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid var(--border-neutral);
    border-radius: 6px;
    background: #fff;
    font-family: var(--font-body);
    color: var(--text-strong);
    outline: none;
    transition: border-color 120ms ease, box-shadow 120ms ease;
}
.gs1-field input[type="email"] { font-family: var(--font-mono); }
.gs1-field input:focus {
    border-color: var(--light-blue-3);
    box-shadow: 0 0 0 3px rgba(0, 141, 189, 0.12);
}
.gs1-field-hint {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    color: var(--text-muted);
}
.gs1-checkbox-row {
    display: flex;
    gap: 22px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.gs1-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-strong);
}
.gs1-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--orange-brand);
    cursor: pointer;
}
.gs1-contact-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

/* ── Responsive: invoice + contact tabs ─────────────────────── */
@media (max-width: 768px) {
    .gs1-invoice-card {
        grid-template-columns: 1fr auto;
        row-gap: 8px;
    }
    .gs1-invoice-amount { text-align: left; min-width: 0; }
    .gs1-invoice-pdf { grid-column: 1 / -1; justify-self: start; }

    .gs1-contact-header {
        grid-template-columns: 44px 1fr auto;
        row-gap: 8px;
    }
    .gs1-contact-chips {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }
    .gs1-field-grid { grid-template-columns: 1fr; }
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
    .gs1-shell {
        grid-template-columns: 1fr;
    }
    .gs1-sidebar {
        min-height: auto;
        border-right: 0;
        border-bottom: 1px solid var(--border-card);
    }
    #gs1-tabs {
        flex-direction: row;
        overflow-x: auto;
    }
    .gs1-tab {
        white-space: nowrap;
    }
    .gs1-main { padding: 20px 16px 48px; }
    .gs1-gcp-card .gs1-card-header {
        grid-template-columns: auto 1fr;
        row-gap: 8px;
    }
    .gs1-gcp-card .gs1-card-header > :nth-child(3),
    .gs1-gcp-card .gs1-card-header > :nth-child(4) {
        grid-column: span 2;
        justify-self: end;
    }
}

/* ── Login landing page ─────────────────────────────────────── */
#gs1-login {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 64px 32px;
    text-align: center;
}
#gs1-login h1 {
    font-size: 40px;
    font-weight: 400;
    color: var(--blue-brand);
    margin-bottom: 12px;
}
#gs1-login p {
    color: var(--text-mid);
    font-size: 15px;
    margin-bottom: 24px;
}
#gs1-login-btn {
    display: inline-flex;
    align-items: center;
    padding: 10px 24px;
    border-radius: 4px;
    border: 0;
    background: var(--orange-brand);
    color: #fff;
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
}
#gs1-login-btn:hover { background: var(--orange-3); }

/* ════════════════════════════════════════════════════════════════
 * Vörugreind tab — V2Vorugreind
 * Ported from directions/vorugreind-embed.jsx + vorugreind-yfirlit.jsx
 * ════════════════════════════════════════════════════════════════ */

/* ── Sub-tab bar (flush with page chrome, orange underline) ── */
.vg-subtabs {
    background: #fff;
    border-bottom: 1px solid var(--border-card);
    margin-top: -40px;
    margin-bottom: 32px;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    width: 100vw;
    box-sizing: border-box;
    padding: 0 32px;
    display: flex;
    gap: 4px;
    align-items: center;
    overflow-x: auto;
}
.vg-subtab-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}
.vg-subtab {
    position: relative;
    background: transparent;
    border: 0;
    padding: 14px 14px 12px;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 400;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}
.vg-subtab:hover { color: var(--text-strong); }
.vg-subtab.is-active {
    color: var(--text-strong);
    font-weight: 500;
}
.vg-subtab.is-active::after {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: -1px;
    height: 2px;
    background: var(--orange-brand);
    border-radius: 1px;
}
.vg-subtab-wrap .vg-subtab { padding-right: 6px; }
.vg-subtab-wrap .vg-subtab.is-active::after { right: 6px; }
.vg-subtab-label {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.vg-subtab-close {
    width: 20px;
    height: 20px;
    padding: 0;
    border-radius: 3px;
    border: none;
    background: transparent;
    color: #9CA3AF;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
    transition: background 120ms ease, color 120ms ease;
}
.vg-subtab-close:hover {
    background: #FEE2E2;
    color: var(--error);
}

/* ── Detail view (iframe container) ─────────────────────────── */
.vg-view-detail {
    margin: 0 0 -72px;
    background: var(--light-grey);
    min-height: calc(100vh - 180px);
    display: flex;
}
.vg-detail-frame {
    flex: 1;
    border: 0;
    width: 100%;
    min-height: calc(100vh - 180px);
    background: var(--light-grey);
}

/* ── Grid-view page header ──────────────────────────────────── */
.vg-view-grid { display: block; }
.vg-page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.vg-page-header-text { min-width: 0; }
.vg-page-header h1 { margin: 0; }
.vg-page-subtitle {
    margin: 6px 0 0;
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ── Primary button + disabled variant ──────────────────────── */
.vg-btn-primary {
    background: var(--blue-brand);
    color: #fff;
    border: none;
    padding: 12px 22px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
    transition: background 120ms ease;
}
.vg-btn-primary:hover:not(:disabled) { background: var(--blue-4); }
.vg-btn-primary.vg-btn-disabled,
.vg-btn-primary:disabled {
    background: var(--light-blue-2);
    color: #fff;
    cursor: not-allowed;
    box-shadow: none;
}
.vg-btn-primary .gs1-coming {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-left: 4px;
}

/* ── Toolbar (filter tabs + search) ─────────────────────────── */
.vg-toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.vg-filter-tabs {
    display: flex;
    gap: 4px;
    align-items: center;
    border-bottom: 1px solid var(--border-card);
    flex-wrap: wrap;
}
.vg-filter-tab {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 10px 14px 12px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: -1px;
    font-family: inherit;
    transition: color 120ms ease, border-color 120ms ease;
}
.vg-filter-tab:hover { color: var(--text-strong); }
.vg-filter-tab.is-active {
    border-bottom-color: var(--orange-brand);
    color: var(--blue-brand);
    font-weight: 600;
}
.vg-filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 18px;
    padding: 0 6px;
    background: #F3F4F6;
    color: var(--text-muted);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}
.vg-filter-tab.is-active .vg-filter-count {
    background: var(--blue-brand);
    color: #fff;
}

/* ── Search input ───────────────────────────────────────────── */
.vg-search {
    position: relative;
    display: inline-flex;
    align-items: center;
    width: 300px;
    padding-bottom: 6px;
    max-width: 100%;
}
.vg-search svg {
    position: absolute;
    left: 11px;
    pointer-events: none;
    color: var(--text-muted);
}
.vg-search input {
    width: 100%;
    padding: 8px 12px 8px 34px;
    border: 1px solid var(--border-neutral);
    border-radius: 6px;
    font-size: 13px;
    font-family: inherit;
    outline: none;
    background: #fff;
    transition: border-color 120ms ease, box-shadow 120ms ease;
}
.vg-search input:focus {
    border-color: var(--light-blue-3);
    box-shadow: 0 0 0 3px rgba(0, 141, 189, 0.15);
}

/* ── Empty state ────────────────────────────────────────────── */
.vg-empty {
    padding: 60px 20px;
    text-align: center;
    background: #fff;
    border: 1px dashed var(--light-blue-2);
    border-radius: 6px;
    font-size: 15px;
    color: var(--text-muted);
}

/* ── Product grid ───────────────────────────────────────────── */
.vg-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
}

/* ── Product card ───────────────────────────────────────────── */
.vg-card {
    background: #fff;
    border: 1px solid var(--border-card);
    border-radius: 6px;
    padding: 14px 14px 12px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}
.vg-card:hover {
    border-color: var(--light-blue-3);
    box-shadow: 0 4px 12px rgba(0, 44, 108, 0.08);
}
.vg-card:focus-visible {
    outline: 2px solid var(--light-blue-3);
    outline-offset: 2px;
}
.vg-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.vg-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px 3px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.01em;
    white-space: nowrap;
    background: #F3F4F6;
    border: 1px solid #E5E7EB;
    color: var(--text-muted);
}
.vg-status-pill[data-status="ready"] {
    background: #FFFFF0;
    border-color: #FEFCBF;
    color: #975A16;
}
.vg-status-pill[data-status="reviewing"] {
    background: #E5F0FC;
    border-color: #C4D7ED;
    color: var(--blue-brand);
}
.vg-status-pill[data-status="approved"] {
    background: #F0FFF4;
    border-color: #C6F6D5;
    color: #276749;
}
.vg-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: #9CA3AF;
}
.vg-status-pill[data-status="processing"] .vg-status-dot {
    box-shadow: 0 0 0 2px rgba(156, 163, 175, 0.25);
}
.vg-brand {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.vg-card-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--blue-brand);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 38px;
}
.vg-card-gtin {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--text-muted);
}
.vg-card-gtin .gs1-mono {
    font-family: var(--font-mono);
    letter-spacing: 0.02em;
}
.vg-card-progress {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: auto;
}
.vg-card-progress-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
}
.vg-card-progress-text {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}
.vg-card-updated {
    font-size: 11px;
    color: #9CA3AF;
    font-variant-numeric: tabular-nums;
}
.vg-card-progress-bar {
    height: 4px;
    border-radius: 999px;
    overflow: hidden;
    background: #F3F4F6;
    display: flex;
}
.vg-card-progress-fill-approved {
    background: #22C55E;
    transition: width 200ms ease;
    height: 100%;
}

/* ── Toast ──────────────────────────────────────────────────── */
.gs1-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translate(-50%, 8px);
    background: var(--blue-brand);
    color: #fff;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 10px 25px rgba(0, 26, 77, 0.25);
    z-index: 1100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 200ms ease, transform 200ms ease;
    max-width: min(560px, calc(100vw - 32px));
    text-align: center;
}
.gs1-toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* ── Responsive tweaks ──────────────────────────────────────── */
@media (max-width: 768px) {
    .vg-subtabs {
        margin-top: -20px;
        margin-bottom: 24px;
        padding: 0 16px;
    }
    .vg-view-detail {
        margin: 0 0 -48px;
    }
    .vg-search { width: 100%; }
}

/* ── Templogin nudge modal ──────────────────────────────────── */
#gs1-templogin-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 48px 16px;
    background: rgba(15, 23, 42, 0.55);
    overflow-y: auto;
}

#gs1-templogin-modal .gs1-templogin-modal-box {
    background: var(--color-bg, #fff);
    border-radius: var(--radius-modal);
    box-shadow: var(--shadow-modal);
    width: min(760px, 100%);
    padding: 24px 28px 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#gs1-templogin-modal .gs1-templogin-disclaimer {
    border-left: 4px solid var(--color-accent-navy, #13294b);
    background: var(--color-bg-muted, #f5f7fb);
    padding: 14px 18px;
    border-radius: 4px;
    font-size: 15px;
    line-height: 1.5;
    margin: 0;
}

#gs1-templogin-modal .gs1-templogin-footer {
    min-height: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 8px;
}

#gs1-templogin-modal .gs1-templogin-skip {
    font-size: 13px;
    color: #6b7280;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 8px;
    opacity: 0;
    transition: opacity 400ms ease-in;
}
#gs1-templogin-modal .gs1-templogin-skip.is-visible { opacity: 1; }
#gs1-templogin-modal .gs1-templogin-skip:hover { text-decoration: underline; }

body.gs1-templogin-nudge-open { overflow: hidden; }

/* ════════════════════════════════════════════════════════════════
 * GCP licence card body — Vörukladdi CTA, GTIN anatomy + list,
 * SSCC collapsible. Reusable .gs1-anatomy-* block used by both
 * GTIN and SSCC sections.
 * ════════════════════════════════════════════════════════════════ */

/* ── Vörukladdi promo block ──────────────────────────────────
 * Tinted lavender card pitching the Vörukladdi service. Three
 * white feature tiles in a row (stacks on mobile), primary CTA
 * + secondary link, and a self-service note at the bottom. */
.gs1-vk-block {
    margin: 0 0 22px;
    padding: 18px 20px;
    background: #F5F1FB;
    border: 1px solid #E1D6F0;
    border-radius: 10px;
}
.gs1-vk-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.gs1-vk-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 6px;
    background: var(--vorukladdi);
    color: #fff;
    flex-shrink: 0;
}
.gs1-vk-title {
    margin: 0;
    color: var(--text-strong);
}
.gs1-vk-intro {
    margin: 0 0 14px;
}
.gs1-vk-intro strong {
    color: var(--vorukladdi);
    font-weight: 600;
}
.gs1-vk-tiles {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}
.gs1-vk-tile {
    background: #fff;
    border: 1px solid #E8E0F2;
    border-radius: 8px;
    padding: 14px 16px;
}
.gs1-vk-tile-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(148, 129, 175, 0.12);
    color: var(--vorukladdi);
    margin-bottom: 10px;
}
.gs1-vk-tile-title {
    color: var(--text-strong);
    margin-bottom: 4px;
    font-weight: 500;
}
.gs1-vk-tile-desc {
    margin: 0;
}
.gs1-vk-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}
.gs1-vk-secondary {
    color: var(--vorukladdi);
    text-decoration: underline;
    text-underline-offset: 2px;
    font-size: 14px;
}
.gs1-vk-secondary:hover {
    color: #7C699A;
}
.gs1-vk-note {
    display: flex;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid #E1D6F0;
}
.gs1-vk-note-icon {
    color: var(--vorukladdi);
    flex-shrink: 0;
    margin-top: 2px;
}
.gs1-vk-note p {
    margin: 0;
}
.gs1-vk-note strong {
    color: var(--text-strong);
    font-weight: 600;
}
@media (max-width: 720px) {
    .gs1-vk-tiles { grid-template-columns: 1fr; }
}

/* ── Primary CTA button (used by Vörukladdi block) ──────── */
.gs1-btn-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 18px;
    background: var(--vorukladdi);
    color: #fff;
    border: 0;
    border-radius: 6px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
}
.gs1-btn-cta:hover {
    background: #7C699A;
    text-decoration: none;
    color: #fff;
}

/* ── GTIN block ──────────────────────────────────────────────
 * Single card containing barcode + legend + GTIN list. See
 * .gs1-gtin-combined-block below for the outer chrome and grid.
 * ───────────────────────────────────────────────────────── */
/* Simple text list of GTINs in the licence range, with an intro
 * caption above. The wrap itself has no chrome — the outer
 * .gs1-gtin-combined-card supplies the card background. */
.gs1-gtin-list-intro {
    margin: 0 0 8px;
}
.gs1-gtin-text-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.gs1-gtin-text-row {
    letter-spacing: 0.05em;
    line-height: 1.6;
    white-space: nowrap;
}
.gs1-gtin-text-row > .gs1-seg + .gs1-seg {
    margin-left: 4px;
}
.gs1-gtin-text-row-ellipsis {
    font-style: italic;
    letter-spacing: 0;
    padding: 2px 0;
}

/* Real EAN-13 barcode container. Hosts a JsBarcode-rendered <svg>
 * with its native human-readable digits; per-digit colors are
 * applied to the <text> tspans by recolorEan13Digits() in
 * strikamerki.js. Chrome is supplied by .gs1-gtin-combined-card. */
.gs1-gtin-real-barcode {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: 16px 24px;
}
/* Barcode column: demo caption stacked over the SVG, sized to
 * the same max-width so the caption centers above the bars.
 * Flex-basis of 288px (the SVG's max-width) keeps the barcode at
 * its natural size on wide viewports — `min-width: 0` lets it
 * shrink only when the legend can't fit alongside it. The SVG
 * inside has `width: 100%; height: auto` so it scales with the
 * column while the legend stays pinned to its right. */
.gs1-gtin-barcode-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex: 1 1 288px;
    min-width: 0;
}
.gs1-gtin-barcode-col > svg {
    display: block;
    max-width: 288px;
    width: 100%;
    height: auto;
}

/* Color legend to the right of the barcode — one block per
 * structural segment, three stacked lines:
 *   line 1 → colored number portion of the GTIN (monospace)
 *   line 2 → segment name (bold)
 *   line 3 → short muted description (smaller)
 * Each <li> is its own flex column; the segments are separated
 * vertically by the gap on the parent. Stays pinned to the right
 * of the barcode at all widths — the barcode SVG scales down to
 * make room rather than letting the legend wrap below. */
.gs1-gtin-legend {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1 1 240px;
    min-width: 0;
}
.gs1-gtin-legend li {
    display: flex;
    flex-direction: column;
}
.gs1-gtin-legend-num {
    /* color set inline by JS to match the corresponding bar segment */
}
.gs1-gtin-legend-name {
    font-weight: 500;
}
/* Plain-text demo caption that signals "this is not a real
 * barcode" — sits inside the barcode column directly above the
 * SVG so it centers over the bars (not the whole card). */
.gs1-gtin-demo-note {
    margin: 0;
    max-width: 288px;
    text-align: center;
    font-style: italic;
    letter-spacing: 0.04em;
}
/* ── Combined comparison block ───────────────────────────────
 * Same content as the .gs1-gtin-pair above, but unified inside
 * a single white card. Two columns on desktop (barcode+legend |
 * GTIN list) with a vertical divider; stacks vertically on
 * narrow viewports so the barcode + its legend always sit
 * above the GTIN list.
 * ───────────────────────────────────────────────────────── */
.gs1-gtin-combined-block {
    margin: 0 0 22px;
}
.gs1-gtin-combined-card {
    background: #fff;
    border: 1px solid var(--border-card);
    border-radius: 8px;
    padding: 18px 20px;
}
.gs1-gtin-combined-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 18px 24px;
    align-items: start;
}
/* Vertical divider between the two columns on desktop. */
.gs1-gtin-combined-grid > .gs1-gtin-list-wrap {
    border-left: 1px solid var(--border-card);
    padding-left: 24px;
}
@media (max-width: 720px) {
    .gs1-gtin-combined-grid {
        grid-template-columns: 1fr;
    }
    .gs1-gtin-combined-grid > .gs1-gtin-list-wrap {
        border-left: 0;
        padding-left: 0;
        border-top: 1px solid var(--border-card);
        padding-top: 18px;
    }
}

/* ── Anatomy block (still used by SSCC collapsible) ──────── */
.gs1-anatomy-block {
    margin: 0 0 18px;
}
.gs1-anatomy-header {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 6px;
}
.gs1-anatomy-title {
    margin: 0;
}
.gs1-anatomy-caption {
    margin: 0 0 8px;
}
.gs1-anatomy-caption-em {
    font-style: italic;
    margin-top: 8px;
    margin-bottom: 0;
}

/* Legend: each segment is shown larger, with a label underneath. */
.gs1-anatomy-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 4px 6px;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid var(--border-card);
    border-radius: 6px;
    margin-bottom: 10px;
}
.gs1-anatomy-seg {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.gs1-anatomy-seg .gs1-seg {
    font-family: var(--font-mono);
    font-size: 17px;
    font-weight: 500;
    letter-spacing: 0.05em;
    padding: 2px 4px;
    border-radius: 3px;
}
.gs1-anatomy-seg-label {
    text-align: center;
    max-width: 96px;
}

/* List: rows of segmented numbers using the same colour scheme. */
.gs1-anatomy-list {
    list-style: none;
    margin: 0;
    padding: 0;
    background: #fff;
    border: 1px solid var(--border-card);
    border-radius: 6px;
    overflow: hidden;
}
.gs1-anatomy-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0 4px;
    padding: 9px 14px;
    letter-spacing: 0.05em;
    border-top: 1px solid var(--border-card);
}
.gs1-anatomy-list > .gs1-anatomy-row:first-child { border-top: 0; }
.gs1-anatomy-row-ellipsis {
    font-style: italic;
    letter-spacing: 0;
    justify-content: center;
    background: #FAFBFC;
}

/* ── Segment colours (the four-part anatomy) ─────────────── */
/* Used both in legend and list rows. */
.gs1-seg                     { color: var(--text-strong); }
.gs1-seg-prefix              { color: #6B7280; }                 /* GS1 prefix — neutral gray */
.gs1-seg-gcp                 { color: var(--blue-brand); }       /* GCP — brand blue */
.gs1-seg-serial              { color: var(--orange-3); }         /* Vörunúmer / serial — orange */
.gs1-seg-check               { color: #1FA84B; }                 /* Vartala — green */
.gs1-seg-extension           { color: #6B7280; }                 /* SSCC extension digit — gray */
.gs1-seg-internal            { color: #6B7280; }                 /* RCN '2' innanlandsnotkun — gray */
.gs1-seg-weight-unit         { color: #0E7490; }                 /* RCN X (3|4|5) þyngdareining — teal */
.gs1-seg-weight              { color: #7C3AED; }                 /* RCN GGGGG þyngd — purple */

/* Subtle background tint per kind, helps non-colour readers. */
.gs1-anatomy-seg .gs1-seg-prefix      { background: #F3F4F6; }
.gs1-anatomy-seg .gs1-seg-gcp         { background: var(--light-blue); }
.gs1-anatomy-seg .gs1-seg-serial      { background: #FCE7DA; }
.gs1-anatomy-seg .gs1-seg-check       { background: #DBEEDD; }
.gs1-anatomy-seg .gs1-seg-extension   { background: #F3F4F6; }
.gs1-anatomy-seg .gs1-seg-internal    { background: #F3F4F6; }
.gs1-anatomy-seg .gs1-seg-weight-unit { background: #CFFAFE; }
.gs1-anatomy-seg .gs1-seg-weight      { background: #EDE9FE; }

/* Teal-tone GCP cards override blue with the matching teal. */
.gs1-gcp-card[data-tone="teal"] .gs1-seg-gcp { color: #005B7C; }
.gs1-gcp-card[data-tone="teal"] .gs1-anatomy-seg .gs1-seg-gcp { background: #DCEEF4; }

/* ── SSCC collapsible block ──────────────────────────────── */
.gs1-sscc-block {
    margin: 0 0 18px;
}
.gs1-sscc-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    width: 100%;
    background: #fff;
    border: 1px solid var(--border-card);
    border-radius: 6px;
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--text-mid);
    text-align: left;
    cursor: pointer;
}
.gs1-sscc-toggle:hover { background: var(--light-grey); }
.gs1-sscc-toggle strong { color: var(--text-strong); font-weight: 500; }
.gs1-sscc-chevron {
    transition: transform 180ms ease;
    color: var(--text-muted);
    flex-shrink: 0;
}
.gs1-sscc-block.is-open .gs1-sscc-chevron { transform: rotate(180deg); }
.gs1-sscc-body {
    padding: 14px 4px 0;
}

/* ── Mobile tweaks ───────────────────────────────────────── */
@media (max-width: 640px) {
    .gs1-anatomy-legend { gap: 4px 4px; padding: 10px; }
    .gs1-anatomy-seg .gs1-seg { font-size: 14px; }
    .gs1-anatomy-seg-label { font-size: 9px; max-width: 70px; }
    .gs1-anatomy-row { font-size: 12px; padding: 8px 10px; }
    .gs1-btn-cta { padding: 10px 14px; font-size: 13px; }
}
