/*
 * GMIS theme
 * ----------
 * Replaces the 986KB DexignZone bundle (which carried Bootstrap 4.3.1 plus
 * styling for dozens of demo components this app never used).
 *
 * This implements only the class surface the application templates actually
 * reference -- the grid, cards, buttons, forms, tables and the handful of
 * utilities in use -- so existing markup keeps working unchanged. That matters
 * most for the device dashboards, which size each instrument with col-xl-{n}.
 *
 * Partner branding is injected by the layouts as --gmis-brand (colour_1) and
 * --gmis-surface (colour_2); everything else is theme-neutral.
 */

/* ---------- tokens ---------- */

:root {
    --gmis-brand: #0E2A38;
    --gmis-surface: #FFFFFF;

    /* Light scheme. The dark equivalents are further down; everything else in
       this file references these names only, so neither scheme is hardcoded
       into a component. */
    --gmis-bg: #F4F6F8;
    --gmis-panel: #FFFFFF;
    --gmis-ink: #1B2430;
    --gmis-ink-soft: #5A6672;
    --gmis-ink-faint: #8A94A0;
    --gmis-line: #E3E8ED;
    --gmis-line-soft: #EEF1F4;

    --gmis-primary: #1D6F9C;
    --gmis-primary-dark: #17587C;
    --gmis-success: #2E7D5B;
    --gmis-info: #2A7AA8;
    --gmis-warning: #B4761B;
    --gmis-danger: #C0392B;

    --gmis-on-accent: #FFFFFF;
    --gmis-tint: 0, 0, 0;
    --gmis-shadow: rgba(16, 26, 36, .18);

    --gmis-radius: 6px;
    --gmis-radius-sm: 4px;

    /* Compact spacing scale. */
    --gmis-s1: 4px;
    --gmis-s2: 8px;
    --gmis-s3: 12px;
    --gmis-s4: 16px;
    --gmis-s5: 24px;

    --gmis-sidebar-w: 56px;
    --gmis-header-h: 52px;
}

/* Dark scheme.
   Applied when the OS asks for it, unless the viewer has chosen otherwise;
   data-theme on <html> always wins so the switcher can override the system in
   both directions. Both selectors carry the same block rather than one
   referencing the other, because a media query cannot be overridden by a
   plain selector on specificity alone. */

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        /* The partner's colour_2 is a light card fill chosen for the light
           scheme, and the layouts inject it as --gmis-surface. Left alone it
           keeps the sign-in card white while the text turns light, which is
           unreadable, so dark mode takes the surface back. Both selectors here
           outrank the plain :root the layouts write, so this wins regardless of
           source order. */
        --gmis-surface: #1A2129;

        --gmis-bg: #12171D;
        --gmis-panel: #1A2129;
        --gmis-ink: #E6EBF0;
        --gmis-ink-soft: #A7B2BE;
        --gmis-ink-faint: #79858F;
        --gmis-line: #2C353F;
        --gmis-line-soft: #232B34;

        --gmis-primary: #4FA3D1;
        --gmis-primary-dark: #6FB7DE;
        --gmis-success: #4CAF82;
        --gmis-info: #4FA3D1;
        --gmis-warning: #D79B3E;
        --gmis-danger: #E06055;

        --gmis-on-accent: #0E1418;
        --gmis-tint: 255, 255, 255;
        --gmis-shadow: rgba(0, 0, 0, .5);

        color-scheme: dark;
    }
}

:root[data-theme="dark"] {
    /* See the note in the media query above. */
    --gmis-surface: #1A2129;

    --gmis-bg: #12171D;
    --gmis-panel: #1A2129;
    --gmis-ink: #E6EBF0;
    --gmis-ink-soft: #A7B2BE;
    --gmis-ink-faint: #79858F;
    --gmis-line: #2C353F;
    --gmis-line-soft: #232B34;

    --gmis-primary: #4FA3D1;
    --gmis-primary-dark: #6FB7DE;
    --gmis-success: #4CAF82;
    --gmis-info: #4FA3D1;
    --gmis-warning: #D79B3E;
    --gmis-danger: #E06055;

    --gmis-on-accent: #0E1418;
    --gmis-tint: 255, 255, 255;
    --gmis-shadow: rgba(0, 0, 0, .5);

    color-scheme: dark;
}

:root[data-theme="light"] { color-scheme: light; }

/* ---------- reset ---------- */

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

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

body {
    margin: 0;
    background: var(--gmis-bg);
    color: var(--gmis-ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
    font-size: 13.5px;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0 0 var(--gmis-s2);
    font-weight: 600;
    line-height: 1.25;
    color: var(--gmis-ink);
}

h1 { font-size: 1.5rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.15rem; }
h4 { font-size: 1rem; }
h5 { font-size: .9rem; }
h6 { font-size: .82rem; }

p { margin: 0 0 var(--gmis-s3); }

a { color: var(--gmis-primary); text-decoration: none; }
a:hover { color: var(--gmis-primary-dark); text-decoration: underline; }

code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .85em;
    background: var(--gmis-line-soft);
    padding: 1px 4px;
    border-radius: var(--gmis-radius-sm);
}

hr { border: 0; border-top: 1px solid var(--gmis-line); margin: var(--gmis-s4) 0; }

img { max-width: 100%; height: auto; }

/* ---------- grid ---------- */

.container { width: 100%; margin: 0 auto; padding: 0 var(--gmis-s4); }

.row {
    display: flex;
    flex-wrap: wrap;
    margin-left: calc(var(--gmis-s3) * -1);
    margin-right: calc(var(--gmis-s3) * -1);
}

.row > * { padding-left: var(--gmis-s3); padding-right: var(--gmis-s3); }

.no-gutters { margin-left: 0; margin-right: 0; }
.no-gutters > * { padding-left: 0; padding-right: 0; }

[class*="col-"] { width: 100%; min-width: 0; }

/* The dashboards size instruments with col-xl-{n}; generate 1..12 for every
   breakpoint the templates use. */
.col-1  { width: 8.333333%; }  .col-2  { width: 16.666667%; }
.col-3  { width: 25%; }        .col-4  { width: 33.333333%; }
.col-5  { width: 41.666667%; } .col-6  { width: 50%; }
.col-7  { width: 58.333333%; } .col-8  { width: 66.666667%; }
.col-9  { width: 75%; }        .col-10 { width: 83.333333%; }
.col-11 { width: 91.666667%; } .col-12 { width: 100%; }

@media (min-width: 576px) {
    .col-sm-1  { width: 8.333333%; }  .col-sm-2  { width: 16.666667%; }
    .col-sm-3  { width: 25%; }        .col-sm-4  { width: 33.333333%; }
    .col-sm-5  { width: 41.666667%; } .col-sm-6  { width: 50%; }
    .col-sm-7  { width: 58.333333%; } .col-sm-8  { width: 66.666667%; }
    .col-sm-9  { width: 75%; }        .col-sm-10 { width: 83.333333%; }
    .col-sm-11 { width: 91.666667%; } .col-sm-12 { width: 100%; }
}

@media (min-width: 768px) {
    .col-md-1  { width: 8.333333%; }  .col-md-2  { width: 16.666667%; }
    .col-md-3  { width: 25%; }        .col-md-4  { width: 33.333333%; }
    .col-md-5  { width: 41.666667%; } .col-md-6  { width: 50%; }
    .col-md-7  { width: 58.333333%; } .col-md-8  { width: 66.666667%; }
    .col-md-9  { width: 75%; }        .col-md-10 { width: 83.333333%; }
    .col-md-11 { width: 91.666667%; } .col-md-12 { width: 100%; }
    .p-md-0 { padding: 0 !important; }
}

@media (min-width: 992px) {
    .col-lg-1  { width: 8.333333%; }  .col-lg-2  { width: 16.666667%; }
    .col-lg-3  { width: 25%; }        .col-lg-4  { width: 33.333333%; }
    .col-lg-5  { width: 41.666667%; } .col-lg-6  { width: 50%; }
    .col-lg-7  { width: 58.333333%; } .col-lg-8  { width: 66.666667%; }
    .col-lg-9  { width: 75%; }        .col-lg-10 { width: 83.333333%; }
    .col-lg-11 { width: 91.666667%; } .col-lg-12 { width: 100%; }
}

@media (min-width: 1200px) {
    .col-xl-1  { width: 8.333333%; }  .col-xl-2  { width: 16.666667%; }
    .col-xl-3  { width: 25%; }        .col-xl-4  { width: 33.333333%; }
    .col-xl-5  { width: 41.666667%; } .col-xl-6  { width: 50%; }
    .col-xl-7  { width: 58.333333%; } .col-xl-8  { width: 66.666667%; }
    .col-xl-9  { width: 75%; }        .col-xl-10 { width: 83.333333%; }
    .col-xl-11 { width: 91.666667%; } .col-xl-12 { width: 100%; }
}

/* ---------- cards ---------- */

.card {
    background: var(--gmis-panel);
    border: 1px solid var(--gmis-line);
    border-radius: var(--gmis-radius);
    margin-bottom: var(--gmis-s4);
    display: flex;
    flex-direction: column;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--gmis-s2);
    padding: var(--gmis-s3) var(--gmis-s4);
    border-bottom: 1px solid var(--gmis-line-soft);
    background: transparent;
}

.card-header.border-0 { border-bottom: 0; }

.card-title {
    margin: 0;
    font-size: .82rem;
    font-weight: 600;
    letter-spacing: .02em;
    text-transform: uppercase;
    color: var(--gmis-ink-soft);
}

.card-body { padding: var(--gmis-s4); flex: 1 1 auto; }
.card-body > :last-child { margin-bottom: 0; }

/* Cards sitting side by side in a row end ragged when their content differs,
   which reads as inconsistent spacing. Stretch a column's single card to the
   row's height so the bottoms line up. Columns that hold several cards stack
   them normally and are unaffected. */

.row > [class*="col-"] { display: flex; flex-direction: column; }
.row > [class*="col-"] > .card:only-child { flex: 1 1 auto; }

/* A row of plain controls -- the save/cancel bar under a form -- needs the same
   gap beneath it as a card does above it. */
.row > [class*="col-"] > .btn { align-self: flex-start; margin-bottom: var(--gmis-s4); }
.row > [class*="col-"] > .btn + .btn,
.row > [class*="col-"] > .btn + a.btn { margin-left: var(--gmis-s2); }

/* ---------- page heading ---------- */

.page-titles {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: var(--gmis-s4) 0 var(--gmis-s3);
    margin-bottom: var(--gmis-s2);
    border-bottom: 1px solid var(--gmis-line);
}

.welcome-text h4 { margin-bottom: 2px; font-size: 1.15rem; }
.welcome-text p { margin: 0; color: var(--gmis-ink-faint); font-size: .82rem; }

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: .8rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "/";
    padding: 0 var(--gmis-s2);
    color: var(--gmis-ink-faint);
}

.breadcrumb-item.active > a,
.breadcrumb-item.active { color: var(--gmis-ink-faint); text-decoration: none; }

/* ---------- buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--gmis-s1);
    padding: 6px 12px;
    border: 1px solid transparent;
    border-radius: var(--gmis-radius-sm);
    background: var(--gmis-line-soft);
    color: var(--gmis-ink);
    font: inherit;
    font-size: .82rem;
    font-weight: 500;
    line-height: 1.4;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color .12s ease, border-color .12s ease;
}

.btn:hover { text-decoration: none; filter: brightness(.96); }
.btn:focus-visible { outline: 2px solid var(--gmis-primary); outline-offset: 1px; }
.btn:disabled, .btn[disabled] { opacity: .55; cursor: default; }

.btn-sm { padding: 3px 8px; font-size: .76rem; }

.btn-primary { background: var(--gmis-primary); border-color: var(--gmis-primary); color: var(--gmis-on-accent); }
.btn-info    { background: var(--gmis-info);    border-color: var(--gmis-info);    color: var(--gmis-on-accent); }
.btn-success { background: var(--gmis-success); border-color: var(--gmis-success); color: var(--gmis-on-accent); }
.btn-warning { background: var(--gmis-warning); border-color: var(--gmis-warning); color: var(--gmis-on-accent); }
.btn-danger  { background: var(--gmis-danger);  border-color: var(--gmis-danger);  color: var(--gmis-on-accent); }

.btn-light {
    background: var(--gmis-panel);
    border-color: var(--gmis-line);
    color: var(--gmis-ink-soft);
}

.btn-outline-primary {
    background: transparent;
    border-color: var(--gmis-primary);
    color: var(--gmis-primary);
}
.btn-outline-primary:hover { background: var(--gmis-primary); color: var(--gmis-on-accent); filter: none; }

.btn-outline-secondary {
    background: transparent;
    border-color: var(--gmis-line);
    color: var(--gmis-ink-soft);
}
.btn-outline-secondary:hover { background: var(--gmis-line-soft); filter: none; }

.btn-group, .btn-group-sm { display: inline-flex; }
.btn-group > .btn { border-radius: 0; }
.btn-group > .btn:first-child { border-top-left-radius: var(--gmis-radius-sm); border-bottom-left-radius: var(--gmis-radius-sm); }
.btn-group > .btn:last-child  { border-top-right-radius: var(--gmis-radius-sm); border-bottom-right-radius: var(--gmis-radius-sm); }
.btn-group > .btn + .btn { margin-left: -1px; }

/* ---------- forms ---------- */

.form-group { margin-bottom: var(--gmis-s3); }

label {
    display: inline-block;
    margin-bottom: var(--gmis-s1);
    font-size: .78rem;
    font-weight: 600;
    color: var(--gmis-ink-soft);
}

.form-control {
    display: block;
    width: 100%;
    padding: 6px 10px;
    border: 1px solid var(--gmis-line);
    border-radius: var(--gmis-radius-sm);
    background: var(--gmis-panel);
    color: var(--gmis-ink);
    font: inherit;
    font-size: .85rem;
    line-height: 1.4;
}

.form-control:focus {
    outline: none;
    border-color: var(--gmis-primary);
    box-shadow: 0 0 0 3px rgba(29, 111, 156, .12);
}

.form-control-sm { padding: 3px 8px; font-size: .78rem; }

textarea.form-control { min-height: 70px; resize: vertical; }
select.form-control { appearance: auto; }

.form-row { display: flex; flex-wrap: wrap; margin-left: -6px; margin-right: -6px; }
.form-row > * { padding-left: 6px; padding-right: 6px; }

.form-inline { display: flex; flex-wrap: wrap; align-items: center; gap: var(--gmis-s2); }
.form-inline .form-control { width: auto; display: inline-block; }
.form-inline .mr-2 { margin-right: 0 !important; }

.input-group { display: flex; width: 100%; }
.input-group > .form-control { border-radius: 0 var(--gmis-radius-sm) var(--gmis-radius-sm) 0; }
.input-group-prepend { display: flex; }

.input-group-text {
    display: flex;
    align-items: center;
    padding: 6px 10px;
    border: 1px solid var(--gmis-line);
    border-right: 0;
    border-radius: var(--gmis-radius-sm) 0 0 var(--gmis-radius-sm);
    background: var(--gmis-line-soft);
    color: var(--gmis-ink-soft);
    font-size: .82rem;
}

.custom-control { position: relative; display: block; padding-left: 22px; min-height: 18px; }
.custom-control-input { position: absolute; left: 0; top: 2px; margin: 0; width: 14px; height: 14px; }
.custom-control-label { margin: 0; font-weight: 400; color: var(--gmis-ink); cursor: pointer; }

/* ---------- tables ---------- */

.table { width: 100%; border-collapse: collapse; font-size: .84rem; }

.table th, .table td {
    padding: var(--gmis-s2) var(--gmis-s3);
    border-bottom: 1px solid var(--gmis-line-soft);
    text-align: left;
    vertical-align: middle;
}

.table thead th {
    border-bottom: 1px solid var(--gmis-line);
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .03em;
    text-transform: uppercase;
    color: var(--gmis-ink-faint);
    white-space: nowrap;
}

.table tbody tr:last-child td { border-bottom: 0; }
.table-hover tbody tr:hover { background: var(--gmis-line-soft); }
.table-sm th, .table-sm td { padding: var(--gmis-s1) var(--gmis-s2); }

.table-responsive, .table-responsive-md { width: 100%; overflow-x: auto; }

/* ---------- badges, alerts, pagination ---------- */

.badge {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 20px;
    font-size: .7rem;
    font-weight: 600;
    line-height: 1.5;
    background: var(--gmis-line-soft);
    color: var(--gmis-ink-soft);
    white-space: nowrap;
}

.badge-secondary { background: var(--gmis-line-soft); color: var(--gmis-ink-soft); }
.badge-dark      { background: var(--gmis-ink-soft); color: var(--gmis-panel); }
.badge-info      { background: rgba(42,122,168,.13);  color: var(--gmis-info); }
.badge-success   { background: rgba(46,125,91,.13);   color: var(--gmis-success); }
.badge-warning   { background: rgba(180,118,27,.15);  color: var(--gmis-warning); }
.badge-danger    { background: rgba(179,69,60,.13);   color: var(--gmis-danger); }

.alert {
    position: relative;
    padding: var(--gmis-s3) var(--gmis-s4);
    margin-bottom: var(--gmis-s3);
    border: 1px solid transparent;
    border-left-width: 3px;
    border-radius: var(--gmis-radius-sm);
    font-size: .85rem;
}

.alert-success { background: rgba(46,125,91,.10);  border-color: var(--gmis-success); color: var(--gmis-ink); }
.alert-danger  { background: rgba(179,69,60,.10);  border-color: var(--gmis-danger);  color: var(--gmis-ink); }
.alert-info    { background: rgba(42,122,168,.10); border-color: var(--gmis-info);    color: var(--gmis-ink); }

.alert .close {
    position: absolute;
    top: var(--gmis-s2);
    right: var(--gmis-s3);
    border: 0;
    background: transparent;
    font-size: 1.1rem;
    line-height: 1;
    color: inherit;
    opacity: .5;
    cursor: pointer;
}
.alert .close:hover { opacity: 1; }

.pagination { display: flex; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; gap: 2px; }
.pagination li a, .pagination li span {
    display: block;
    padding: 3px 9px;
    border: 1px solid var(--gmis-line);
    border-radius: var(--gmis-radius-sm);
    font-size: .78rem;
    color: var(--gmis-ink-soft);
}
.pagination li.active a, .pagination li.active span {
    background: var(--gmis-primary);
    border-color: var(--gmis-primary);
    color: var(--gmis-on-accent);
}
.pagination li a:hover { background: var(--gmis-line-soft); text-decoration: none; }

/* ---------- utilities ---------- */

.d-flex { display: flex !important; }
.d-block { display: block !important; }
.d-inline-block { display: inline-block !important; }
.d-none { display: none !important; }

.flex-wrap { flex-wrap: wrap !important; }
.flex-shrink-0 { flex-shrink: 0 !important; }
.align-items-center { align-items: center !important; }
.align-items-end { align-items: flex-end !important; }
.align-middle { vertical-align: middle !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-center { justify-content: center !important; }
.h-100 { height: 100% !important; }

.text-center { text-align: center !important; }
.text-right { text-align: right !important; }
.text-muted { color: var(--gmis-ink-faint) !important; }
.text-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.text-decoration-none, .text-decoration-none:hover { text-decoration: none !important; }
.small, small { font-size: .78rem; }

.list-unstyled { list-style: none; padding-left: 0; margin: 0; }
.rounded { border-radius: var(--gmis-radius) !important; }
.border-0 { border: 0 !important; }

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: var(--gmis-s1) !important; }
.mb-2 { margin-bottom: var(--gmis-s2) !important; }
.mb-3 { margin-bottom: var(--gmis-s3) !important; }
.mb-4 { margin-bottom: var(--gmis-s4) !important; }
.mt-2 { margin-top: var(--gmis-s2) !important; }
.mt-3 { margin-top: var(--gmis-s3) !important; }
.mt-4 { margin-top: var(--gmis-s4) !important; }
.mr-1 { margin-right: var(--gmis-s1) !important; }
.mr-2 { margin-right: var(--gmis-s2) !important; }
.mr-3 { margin-right: var(--gmis-s3) !important; }
.ml-1 { margin-left: var(--gmis-s1) !important; }
.ml-2 { margin-left: var(--gmis-s2) !important; }
.mx-0 { margin-left: 0 !important; margin-right: 0 !important; }
.pb-0 { padding-bottom: 0 !important; }
.py-4 { padding-top: var(--gmis-s4) !important; padding-bottom: var(--gmis-s4) !important; }

@media (min-width: 576px) {
    .justify-content-sm-end { justify-content: flex-end !important; }
    .mt-sm-0 { margin-top: 0 !important; }
}

/* ---------- app shell ---------- */

.gmis-shell { display: flex; min-height: 100vh; }

.gmis-sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: var(--gmis-sidebar-w);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--gmis-s3) 0;
    background: var(--gmis-brand);
    z-index: 30;
}

.gmis-sidebar-brand { display: block; margin-bottom: var(--gmis-s4); padding: 0 var(--gmis-s2); }
.gmis-sidebar-brand img { max-width: 100%; max-height: 26px; }

.gmis-nav { list-style: none; margin: 0; padding: 0; width: 100%; }

.gmis-nav .nav-link {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    color: rgba(255, 255, 255, .62);
    border-left: 2px solid transparent;
    transition: color .12s ease, background-color .12s ease;
}

.gmis-nav .nav-link:hover { color: #fff; background: rgba(255, 255, 255, .07); text-decoration: none; }
.gmis-nav .nav-link.active { color: #fff; background: rgba(255, 255, 255, .11); border-left-color: #fff; }
.gmis-nav .nav-link svg { width: 18px; height: 18px; }

.gmis-sidebar-foot { margin-top: auto; }
.gmis-sidebar-foot a { display: flex; align-items: center; justify-content: center; height: 40px; width: var(--gmis-sidebar-w); color: rgba(255,255,255,.62); }
.gmis-sidebar-foot a:hover { color: #fff; }
.gmis-sidebar-foot svg { width: 18px; height: 18px; }

.gmis-main { flex: 1 1 auto; margin-left: var(--gmis-sidebar-w); min-width: 0; display: flex; flex-direction: column; }

.gmis-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--gmis-s3);
    height: var(--gmis-header-h);
    padding: 0 var(--gmis-s5);
    background: var(--gmis-panel);
    border-bottom: 1px solid var(--gmis-line);
}

.gmis-header-title { font-size: .9rem; font-weight: 600; }
.gmis-header-meta { display: flex; align-items: center; gap: var(--gmis-s3); font-size: .8rem; color: var(--gmis-ink-faint); }

.gmis-content { flex: 1 1 auto; padding: 0 var(--gmis-s5) var(--gmis-s5); }

.gmis-footer {
    padding: var(--gmis-s3) var(--gmis-s5);
    border-top: 1px solid var(--gmis-line);
    font-size: .76rem;
    color: var(--gmis-ink-faint);
}

@media (max-width: 767px) {
    .gmis-sidebar { flex-direction: row; bottom: auto; width: 100%; height: 46px; padding: 0 var(--gmis-s2); align-items: center; }
    .gmis-sidebar-brand { margin: 0 var(--gmis-s3) 0 0; }
    .gmis-nav { display: flex; width: auto; }
    .gmis-nav .nav-link { height: 46px; width: 42px; border-left: 0; border-bottom: 2px solid transparent; }
    .gmis-nav .nav-link.active { border-left-color: transparent; border-bottom-color: #fff; }
    .gmis-sidebar-foot { margin-left: auto; }
    .gmis-sidebar-foot a { height: 46px; width: 42px; }
    .gmis-main { margin-left: 0; margin-top: 46px; }
    .gmis-header, .gmis-content, .gmis-footer { padding-left: var(--gmis-s4); padding-right: var(--gmis-s4); }
}

/* ---------- sign-in ---------- */

.authincation {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: var(--gmis-s4);
}

.authincation-content {
    width: 100%;
    max-width: 380px;
    background: var(--gmis-surface);
    border: 1px solid var(--gmis-line);
    border-radius: var(--gmis-radius);
    box-shadow: 0 10px 30px var(--gmis-shadow);
    overflow: hidden;
}

.auth-form { padding: var(--gmis-s5); }
.auth-form img { display: block; max-height: 46px; width: auto; margin: 0 auto var(--gmis-s4); }
.auth-form h4 { text-align: center; margin-bottom: var(--gmis-s4); font-size: 1rem; }
.auth-form .form-group { margin-bottom: var(--gmis-s3); }
.auth-form .btn { width: 100%; padding: 8px 12px; }

/* ---------- dynamic tables ---------- */

.gmis-tablebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--gmis-s3);
    margin-bottom: var(--gmis-s3);
}

.gmis-tablebar input { max-width: 260px; }
.gmis-tablecount { white-space: nowrap; }

th.gmis-sortable { cursor: pointer; user-select: none; position: relative; padding-right: 18px; }
th.gmis-sortable:hover { color: var(--gmis-ink); }

th.gmis-sortable::after {
    content: "";
    position: absolute;
    right: 6px;
    top: 50%;
    margin-top: -2px;
    border: 4px solid transparent;
    border-top-color: var(--gmis-line);
}

th.gmis-sort-asc::after { border-top-color: transparent; border-bottom-color: var(--gmis-primary); margin-top: -6px; }
th.gmis-sort-desc::after { border-top-color: var(--gmis-primary); }

/* ---------- radial gauge (replaces Kendo RadialGauge) ---------- */

/* Fills the card it is given. The dial keeps its aspect ratio, so a wider
   column simply draws a larger dial, which is the intent. */
.gmis-gauge { width: 100%; margin: 0 auto; text-align: center; }
.gmis-gauge svg { width: 100%; height: auto; display: block; }
.gmis-gauge-tick { font-size: 7px; fill: var(--gmis-ink-soft); font-family: inherit; }
.gmis-gauge-value { font-size: 22px; font-weight: 600; fill: var(--gmis-ink); font-family: inherit; }
.gmis-gauge-unit { font-size: 13px; font-weight: 500; fill: var(--gmis-ink-faint); }
.gmis-gauge-stamp { font-size: 8.5px; fill: var(--gmis-ink-faint); font-family: inherit; }

/* ---------- wide sidebar (dashboard and partner portals) ----------
   The admin rail is icon-only, but these portals list the signed-in user's
   devices, which needs room for names. */

.gmis-shell--wide { --gmis-sidebar-w: 220px; }

.gmis-shell--wide .gmis-sidebar { align-items: stretch; padding: var(--gmis-s3) 0; }

.gmis-shell--wide .gmis-sidebar-brand {
    padding: 0 var(--gmis-s4) var(--gmis-s3);
    margin-bottom: var(--gmis-s2);
    border-bottom: 1px solid rgba(255, 255, 255, .12);
}
.gmis-shell--wide .gmis-sidebar-brand img { max-height: 34px; }

.gmis-shell--wide .gmis-nav .nav-link {
    justify-content: flex-start;
    gap: var(--gmis-s3);
    padding: 0 var(--gmis-s4);
    height: 36px;
    font-size: .84rem;
    font-weight: 500;
}

.gmis-shell--wide .gmis-sidebar-foot a { justify-content: flex-start; gap: var(--gmis-s3); padding: 0 var(--gmis-s4); width: 100%; font-size: .84rem; }

.gmis-sidebar-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--gmis-s2);
    padding: var(--gmis-s4) var(--gmis-s4) var(--gmis-s1);
    font-size: .66rem;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .42);
}

/* Fleet size, so a scrolled list still says how much is below the fold. */
.gmis-devicecount {
    flex: none;
    min-width: 20px;
    padding: 1px 6px;
    border-radius: 9px;
    background: rgba(255, 255, 255, .10);
    color: rgba(255, 255, 255, .62);
    font-size: .64rem;
    letter-spacing: .03em;
    text-align: center;
}

.gmis-devicefilter { padding: 0 var(--gmis-s4) var(--gmis-s2); }

.gmis-devicefilter input {
    width: 100%;
    padding: 5px 9px;
    border: 1px solid rgba(255, 255, 255, .13);
    border-radius: var(--gmis-radius);
    background: rgba(0, 0, 0, .22);
    color: #fff;
    font-size: .78rem;
}
.gmis-devicefilter input::placeholder { color: rgba(255, 255, 255, .38); }
.gmis-devicefilter input:focus {
    outline: 0;
    border-color: rgba(255, 255, 255, .34);
    background: rgba(0, 0, 0, .34);
}

.gmis-devicelist { list-style: none; margin: 0; padding: 0; overflow-y: auto; }

.gmis-devicelist a {
    display: flex;
    align-items: center;
    gap: var(--gmis-s2);
    padding: 5px var(--gmis-s4);
    font-size: .8rem;
    color: rgba(255, 255, 255, .70);
    border-left: 2px solid transparent;
}
.gmis-devicename { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.gmis-devicelist a:hover { color: #fff; background: rgba(255, 255, 255, .07); text-decoration: none; }
.gmis-devicelist a.active {
    color: #fff;
    background: rgba(255, 255, 255, .10);
    border-left-color: var(--gmis-brand, #1f9d6d);
}

/* Reporting health at a glance. Shape backs up the colour so the states stay
   distinguishable without relying on hue alone. */
.gmis-dot {
    flex: none;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .30);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, .18);
}
.gmis-dot--ok { background: #35c17f; }
.gmis-dot--late { background: #e8a33d; }
.gmis-dot--never { background: transparent; border: 1px solid rgba(255, 255, 255, .34); }
.gmis-dot--unknown { background: rgba(255, 255, 255, .30); }

.gmis-devicelist-empty {
    margin: 0;
    padding: var(--gmis-s2) var(--gmis-s4);
    color: rgba(255, 255, 255, .42);
    font-size: .76rem;
}

@media (max-width: 767px) {
    .gmis-shell--wide .gmis-sidebar {
        position: static;
        width: 100%;
        height: auto;
        flex-direction: column;
        align-items: stretch;
    }
    .gmis-shell--wide .gmis-nav { display: block; width: 100%; }
    .gmis-shell--wide .gmis-nav .nav-link { height: 40px; width: auto; border-left: 2px solid transparent; border-bottom: 0; }
    .gmis-shell--wide .gmis-main { margin-left: 0; margin-top: 0; }
    .gmis-devicelist { max-height: 190px; }
}

/* ---------- impersonation banner ---------- */

.gmis-impersonating {
    position: sticky;
    top: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--gmis-s3);
    flex-wrap: wrap;
    padding: var(--gmis-s2) var(--gmis-s4);
    background: repeating-linear-gradient(
        45deg, #B4761B, #B4761B 12px, #A56A15 12px, #A56A15 24px
    );
    color: #fff;
    font-size: .82rem;
    font-weight: 500;
}

.gmis-impersonating .btn { padding: 2px 10px; }

/* ---------- table action groups ----------
   A row's actions mix plain links with buttons wrapped in their own <form>
   (CSRF needs a real POST). Laying the group out as flex puts them all on one
   baseline and at one height, instead of the links and buttons disagreeing. */

.gmis-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--gmis-s1);
    flex-wrap: wrap;
}

.gmis-actions form { display: inline-flex; margin: 0; }
.gmis-actions .btn { height: 24px; line-height: 1; }

/* ---------- contacts editor ---------- */

.gmis-contacts .js-contact-row { align-items: flex-end; }
.gmis-contacts .form-group { margin-bottom: var(--gmis-s2); }

/* ---------- colour scheme switcher ---------- */

.gmis-theme-switch {
    display: inline-flex;
    border: 1px solid var(--gmis-line);
    border-radius: var(--gmis-radius-sm);
    overflow: hidden;
}

.gmis-theme-switch button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 24px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--gmis-ink-faint);
    cursor: pointer;
}

.gmis-theme-switch button + button { border-left: 1px solid var(--gmis-line); }
.gmis-theme-switch button:hover { color: var(--gmis-ink); background: var(--gmis-line-soft); }
.gmis-theme-switch button.is-active { color: var(--gmis-on-accent); background: var(--gmis-primary); }
.gmis-theme-switch svg { width: 13px; height: 13px; }

.gmis-theme-corner {
    position: fixed;
    top: var(--gmis-s3);
    right: var(--gmis-s3);
    z-index: 40;
    background: var(--gmis-panel);
    border-radius: var(--gmis-radius-sm);
}

/* ---------- line graph preview axes ---------- */

.ip-chart { display: flex; align-items: stretch; gap: 5px; width: 100%; flex: 1 1 auto; min-height: 90px; }
.ip-chart-y {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    font-size: .6rem;
    color: var(--gmis-ink-faint);
    text-align: right;
    flex-shrink: 0;
}
.ip-chart-x {
    display: flex;
    justify-content: space-between;
    width: 100%;
    font-size: .6rem;
    color: var(--gmis-ink-faint);
}

/* ---------- maps ---------- */

.gmis-map { display: flex; flex-direction: column; width: 100%; height: 100%; min-height: 260px; }

/* Fills whatever the card gives it rather than a fixed 300px box. */
.gmis-map-canvas {
    flex: 1 1 auto;
    width: 100%;
    min-height: 240px;
    border-radius: var(--gmis-radius-sm);
    background: var(--gmis-line-soft);
}

.gmis-map-empty {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--gmis-s1);
    min-height: 240px;
    border: 1px dashed var(--gmis-line);
    border-radius: var(--gmis-radius-sm);
    color: var(--gmis-ink-faint);
    font-size: .8rem;
    text-align: center;
    padding: var(--gmis-s3);
}

.gmis-map-meta {
    display: flex;
    justify-content: space-between;
    gap: var(--gmis-s3);
    flex-wrap: wrap;
    padding-top: var(--gmis-s2);
    font-size: .75rem;
    color: var(--gmis-ink-faint);
}

/* The standalone /map page should use the viewport, not a 300px strip. */
.gmis-map-page { display: flex; flex-direction: column; min-height: calc(100vh - 220px); }
.gmis-map-page .gmis-map,
.gmis-map-page .gmis-map-canvas { flex: 1 1 auto; min-height: 420px; }

/* ---------- section heading instrument ---------- */

.gmis-label {
    width: 100%;
    margin: var(--gmis-s3) 0 var(--gmis-s2);
    line-height: 1.25;
    color: var(--gmis-ink);
}

/* ---------- partner logo ---------- */

/* Two files, one shown. The selectors carry two classes so they outrank the
   plain `.auth-form img` and `.gmis-public-brand img` sizing rules, which would
   otherwise put the hidden variant back on display. */
.gmis-logo { display: inline-block; line-height: 0; }
.gmis-logo img { display: block; }
.gmis-logo .gmis-logo-for-dark { display: none; }

/* The mark stacks its wordmark under the leaf, so it needs more height than a
   wide lockup would to keep the text legible. */
.gmis-public-brand .gmis-logo img { max-height: 46px; width: auto; }
.auth-form .gmis-logo { margin: 0 auto var(--gmis-s4); }
.auth-form .gmis-logo img { max-height: 96px; width: auto; }

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .gmis-logo .gmis-logo-for-light { display: none; }
    :root:not([data-theme="light"]) .gmis-logo .gmis-logo-for-dark { display: block; }
}

:root[data-theme="dark"] .gmis-logo .gmis-logo-for-light { display: none; }
:root[data-theme="dark"] .gmis-logo .gmis-logo-for-dark { display: block; }

:root[data-theme="light"] .gmis-logo .gmis-logo-for-light { display: block; }
:root[data-theme="light"] .gmis-logo .gmis-logo-for-dark { display: none; }

/* ---------- public landing page ---------- */

.gmis-public { background: var(--gmis-panel); }

.gmis-public-nav {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--gmis-s4);
    padding: var(--gmis-s3) var(--gmis-s5);
    background: var(--gmis-panel);
    border-bottom: 1px solid var(--gmis-line);
}

.gmis-public-brand img { max-height: 34px; width: auto; display: block; }
.gmis-public-actions { display: flex; align-items: center; gap: var(--gmis-s3); }

.gmis-public-section { padding: var(--gmis-s5) var(--gmis-s5); border-bottom: 1px solid var(--gmis-line-soft); }
.gmis-public-inner { max-width: 860px; margin: 0 auto; }

/* Sections that carry a grid need more room than a column of prose. */
.gmis-public-wide { max-width: 1100px; }

/* Banding is asked for by the section rather than taken from its position, so
   inserting or hiding a section cannot flip the whole page's stripes. */
.gmis-public-alt { background: var(--gmis-bg); }

.gmis-section-head { max-width: 68ch; margin-bottom: var(--gmis-s5); }
.gmis-section-head .gmis-public-body { margin-bottom: 0; }

.gmis-public-hero { padding-top: calc(var(--gmis-s5) * 2); padding-bottom: calc(var(--gmis-s5) * 2); }
.gmis-public-hero h1 { font-size: 2rem; line-height: 1.2; margin-bottom: var(--gmis-s3); }

/* Hero: copy on one side, the product shot on the other. Wider than the other
   sections because it carries two columns rather than one. */
.gmis-public-hero .gmis-public-inner {
    max-width: 1100px;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    align-items: center;
    gap: var(--gmis-s5);
}

.gmis-hero-text { min-width: 0; }
.gmis-hero-text .gmis-public-body { max-width: 52ch; }

/* The render is on a near-white background of its own, so it sits on a light
   card in both schemes rather than floating on a dark panel. */
.gmis-hero-media {
    min-width: 0;
    padding: var(--gmis-s4);
    background: #FFFFFF;
    border: 1px solid var(--gmis-line);
    border-radius: var(--gmis-radius);
}

.gmis-hero-media img { display: block; width: 100%; height: auto; }

@media (max-width: 900px) {
    .gmis-public-hero .gmis-public-inner,
    .gmis-dashboard-grid,
    .gmis-contact-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: var(--gmis-s4);
    }
    /* Lead with the words on a phone; the picture follows. */
    .gmis-hero-text { order: 1; }
    .gmis-hero-media { order: 2; }
    .gmis-mock-body { grid-template-columns: minmax(0, 1fr); }
}

.gmis-eyebrow {
    margin: 0 0 var(--gmis-s2);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--gmis-primary);
}

.gmis-public-section h2 { font-size: 1.5rem; margin-bottom: var(--gmis-s3); }
.gmis-public-body { font-size: .95rem; line-height: 1.65; color: var(--gmis-ink-soft); max-width: 68ch; }

.gmis-public-points {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--gmis-s3);
    list-style: none;
    margin: var(--gmis-s4) 0 0;
    padding: 0;
}

.gmis-public-points li {
    padding: var(--gmis-s3) var(--gmis-s4);
    border: 1px solid var(--gmis-line);
    border-radius: var(--gmis-radius);
    background: var(--gmis-panel);
    font-size: .88rem;
    font-weight: 600;
}

.gmis-public-cta { display: flex; flex-wrap: wrap; gap: var(--gmis-s2); margin-top: var(--gmis-s4); }
.gmis-public-cta .btn { padding: 9px 18px; font-size: .88rem; }

.gmis-lede { font-size: 1.02rem; color: var(--gmis-ink); }

/* Headline figures under the hero copy. */
.gmis-hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: var(--gmis-s5);
    list-style: none;
    margin: var(--gmis-s5) 0 0;
    padding: 0;
}

.gmis-hero-stats li { display: flex; flex-direction: column; gap: 2px; }
.gmis-hero-stats strong { font-size: 1.15rem; color: var(--gmis-ink); }
.gmis-hero-stats span { font-size: .78rem; color: var(--gmis-ink-faint); }

/* ---------- product cards ---------- */

.gmis-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--gmis-s4);
}

.gmis-card {
    display: flex;
    flex-direction: column;
    background: var(--gmis-panel);
    border: 1px solid var(--gmis-line);
    border-radius: var(--gmis-radius);
    overflow: hidden;
}

/* The renders are on a near-white background of their own, so the media area
   stays light in both schemes rather than sitting in a dark box. */
/* A fixed box that images are fitted into rather than cropped or stretched to
   fill: the cards mix wide product renders with a tall logo mark, and letting
   each set its own height left the row ragged. */
.gmis-card-media {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16 / 10;
    padding: var(--gmis-s3);
    background: #FFFFFF;
    border-bottom: 1px solid var(--gmis-line);
}

.gmis-card-media img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.gmis-card-body { padding: var(--gmis-s4); }
.gmis-card-body h3 { font-size: 1.05rem; margin: 0 0 2px; }
.gmis-card-sub { margin: 0 0 var(--gmis-s3); font-size: .8rem; color: var(--gmis-primary); font-weight: 600; }
.gmis-card-body .gmis-public-body { font-size: .88rem; margin-bottom: var(--gmis-s3); }

.gmis-bullets { margin: 0; padding-left: 1.1em; }
.gmis-bullets li { font-size: .84rem; line-height: 1.55; color: var(--gmis-ink-soft); }

/* ---------- feature grid ---------- */

.gmis-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--gmis-s4);
}

.gmis-feature {
    padding: var(--gmis-s4);
    background: var(--gmis-panel);
    border: 1px solid var(--gmis-line);
    border-radius: var(--gmis-radius);
}

.gmis-feature-icon { font-size: 1.5rem; line-height: 1; margin-bottom: var(--gmis-s3); }
.gmis-feature h3 { font-size: .98rem; margin: 0 0 var(--gmis-s2); }
.gmis-feature p { margin: 0; font-size: .86rem; line-height: 1.6; color: var(--gmis-ink-soft); }

/* ---------- dashboard mock ---------- */

.gmis-dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: var(--gmis-s5);
}

.gmis-mock-window {
    background: var(--gmis-panel);
    border: 1px solid var(--gmis-line);
    border-radius: var(--gmis-radius);
    box-shadow: 0 10px 30px var(--gmis-shadow);
    overflow: hidden;
}

.gmis-mock-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px var(--gmis-s3);
    background: var(--gmis-bg);
    border-bottom: 1px solid var(--gmis-line);
}

.gmis-mock-bar span { width: 9px; height: 9px; border-radius: 50%; background: var(--gmis-line); }
.gmis-mock-bar em { margin-left: auto; font-style: normal; font-size: .72rem; color: var(--gmis-ink-faint); }

.gmis-mock-body {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--gmis-s3);
    padding: var(--gmis-s4);
}

.gmis-mock-tile {
    padding: var(--gmis-s3);
    border: 1px solid var(--gmis-line);
    border-radius: var(--gmis-radius);
    background: var(--gmis-bg);
}

.gmis-mock-label { display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--gmis-ink-faint); }
.gmis-mock-value { display: block; margin: 4px 0 var(--gmis-s2); font-size: 1.15rem; font-weight: 700; color: var(--gmis-ink); }
.gmis-mock-value em { font-style: normal; font-size: .78rem; font-weight: 500; color: var(--gmis-ink-faint); }
.gmis-mock-meter { height: 5px; border-radius: 3px; background: var(--gmis-line); overflow: hidden; }
.gmis-mock-meter div { height: 100%; background: var(--gmis-primary); }

/* ---------- applications ---------- */

.gmis-apps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--gmis-s4);
}

.gmis-app {
    padding: var(--gmis-s4);
    background: var(--gmis-panel);
    border: 1px solid var(--gmis-line);
    border-radius: var(--gmis-radius);
}

.gmis-app h3 { font-size: .95rem; margin: 0 0 var(--gmis-s2); }
.gmis-app p { margin: 0; font-size: .85rem; line-height: 1.6; color: var(--gmis-ink-soft); }

/* ---------- contact ---------- */

/* Fixed dark, not theme-dependent: the wordmark on it is white, and a white
   logo on a light panel is invisible. */
.gmis-public-dark {
    background: #12171D;
    border-bottom: 0;
    color: #E6EBF0;
}

.gmis-public-dark h1,
.gmis-public-dark h2,
.gmis-public-dark h3 { color: #FFFFFF; }
.gmis-public-dark .gmis-public-body { color: #A7B2BE; }
.gmis-public-dark .gmis-eyebrow { color: #4CAF82; }

.gmis-contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
    align-items: start;
    gap: var(--gmis-s5);
}

.gmis-contact-logo { display: block; max-width: 220px; height: auto; margin-bottom: var(--gmis-s4); }

.gmis-contact-card {
    padding: var(--gmis-s4);
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: var(--gmis-radius);
}

.gmis-contact-card dl { margin: 0 0 var(--gmis-s4); }
.gmis-contact-card dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: #79858F; }
.gmis-contact-card dd { margin: 2px 0 var(--gmis-s3); font-size: .9rem; color: #E6EBF0; }
.gmis-contact-card dd a { color: #6FB7DE; }
.gmis-btn-block { display: block; width: 100%; text-align: center; }

.gmis-public-closing { text-align: center; border-bottom: 0; }
.gmis-public-closing .gmis-public-body { margin-left: auto; margin-right: auto; }
.gmis-public-closing .gmis-public-cta { justify-content: center; }

.gmis-public-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--gmis-s3);
    padding: var(--gmis-s4) var(--gmis-s5);
    border-top: 1px solid var(--gmis-line);
    font-size: .78rem;
    color: var(--gmis-ink-faint);
}

@media (max-width: 767px) {
    .gmis-public-nav, .gmis-public-section, .gmis-public-footer {
        padding-left: var(--gmis-s4);
        padding-right: var(--gmis-s4);
    }
    .gmis-public-hero h1 { font-size: 1.6rem; }
}

/* ---------- export column picker ---------- */

.gmis-column-picker {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--gmis-s2) var(--gmis-s4);
}

/* ---------- camera widget and gallery ---------- */

.gmis-camera { display: flex; flex-direction: column; width: 100%; height: 100%; }

.gmis-camera-frame {
    display: block;
    flex: 1 1 auto;
    min-height: 0;
    border-radius: var(--gmis-radius-sm);
    overflow: hidden;
    background: var(--gmis-line-soft);
}

.gmis-camera-frame img { display: block; width: 100%; height: auto; }

.gmis-camera-empty {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 160px;
    border: 1px dashed var(--gmis-line);
    border-radius: var(--gmis-radius-sm);
    color: var(--gmis-ink-faint);
    font-size: .8rem;
}

.gmis-camera-meta {
    display: flex;
    justify-content: space-between;
    gap: var(--gmis-s3);
    flex-wrap: wrap;
    padding-top: var(--gmis-s2);
    font-size: .75rem;
    color: var(--gmis-ink-faint);
}

.gmis-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: var(--gmis-s4);
}

.gmis-gallery-item { margin: 0; }
.gmis-gallery-item a { display: block; border-radius: var(--gmis-radius-sm); overflow: hidden; background: var(--gmis-line-soft); }
.gmis-gallery-item img { display: block; width: 100%; height: 170px; object-fit: cover; transition: transform .18s ease; }
.gmis-gallery-item a:hover img { transform: scale(1.03); }
.gmis-gallery-item figcaption { padding-top: var(--gmis-s1); font-size: .74rem; color: var(--gmis-ink-faint); }

/* ---------- lightbox ---------- */

.gmis-lightbox {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: var(--gmis-s5);
    background: rgba(8, 12, 16, .88);
}

.gmis-lightbox.is-open { display: flex; }
.gmis-lightbox figure { margin: 0; max-width: 100%; max-height: 100%; text-align: center; }
.gmis-lightbox img { max-width: 100%; max-height: 82vh; border-radius: var(--gmis-radius); display: block; }
.gmis-lightbox figcaption { margin-top: var(--gmis-s3); color: #fff; font-size: .82rem; }

.gmis-lightbox-close {
    position: absolute;
    top: var(--gmis-s4);
    right: var(--gmis-s5);
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .14);
    color: #fff;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
}
.gmis-lightbox-close:hover { background: rgba(255, 255, 255, .26); }

/* ---------- colour swatch beside a hex field ---------- */

.gmis-swatch {
    display: inline-block;
    width: 34px;
    align-self: stretch;
    border: 1px solid var(--gmis-line);
    border-left: 0;
    border-radius: 0 var(--gmis-radius-sm) var(--gmis-radius-sm) 0;
    background-clip: padding-box;
}

/* Form action bar: one line, consistent gap, aligned with the cards above. */
.gmis-formactions {
    flex-direction: row !important;
    flex-wrap: wrap;
    gap: var(--gmis-s2);
    align-items: center;
    margin-bottom: var(--gmis-s4);
}
.gmis-formactions > .btn { margin-bottom: 0; margin-left: 0 !important; }
