:root {
    --green: #71c80f;
    --green-strong: #4f9d14;
    --green-soft: #eef8e8;
    --teal: #00a884;
    --blue: #1a73e8;
    --yellow: #fbbc04;
    --red: #d93025;
    --ink: #202124;
    --muted: #5f6368;
    --line: #e0e6dd;
    --line-strong: #cfd8cc;
    --page: #f7faf6;
    --surface: #ffffff;
    --shadow: 0 1px 2px rgba(60, 64, 67, 0.1), 0 8px 24px rgba(60, 64, 67, 0.08);
    --shadow-hover: 0 2px 6px rgba(60, 64, 67, 0.12), 0 14px 32px rgba(60, 64, 67, 0.1);
    --focus: 0 0 0 4px rgba(113, 200, 15, 0.16);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    background:
        linear-gradient(180deg, rgba(113, 200, 15, 0.08), rgba(255, 255, 255, 0) 340px),
        var(--page);
    color: var(--ink);
    font-family: "Google Sans", "Segoe UI", Arial, Helvetica, sans-serif;
    letter-spacing: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select {
    font: inherit;
}

button {
    border: 0;
}

h1,
h2 {
    margin: 0;
}

form {
    display: grid;
    gap: 16px;
}

label {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 700;
}

input,
select,
textarea {
    width: 100%;
    min-height: 50px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #ffffff;
    color: var(--ink);
    outline: none;
    padding: 0 16px;
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

input:hover,
select:hover,
textarea:hover {
    border-color: var(--line-strong);
    background: #fbfdf9;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--green);
    box-shadow: var(--focus);
}

textarea {
    min-height: 112px;
    padding: 14px 16px;
    resize: vertical;
}

input::placeholder,
textarea::placeholder {
    color: #8a9088;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 700;
    padding: 0 22px;
    transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease, color 140ms ease;
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: var(--green);
    color: #ffffff;
    box-shadow: 0 1px 2px rgba(60, 64, 67, 0.18), 0 6px 16px rgba(79, 157, 20, 0.18);
}

.btn-primary:hover {
    background: var(--green-strong);
    box-shadow: 0 2px 4px rgba(60, 64, 67, 0.18), 0 10px 22px rgba(79, 157, 20, 0.2);
}

.btn-float {
    box-shadow: 0 1px 2px rgba(60, 64, 67, 0.18), 0 6px 16px rgba(79, 157, 20, 0.18);
}

.btn-ghost {
    border: 1px solid var(--line);
    background: #ffffff;
    color: var(--green-strong);
}

.btn-ghost:hover {
    background: var(--green-soft);
}

.btn-danger {
    background: #fff1f0;
    color: var(--red);
    box-shadow: none;
}

.btn-danger:hover {
    background: var(--red);
    color: #ffffff;
}

.btn-small {
    min-height: 34px;
    background: var(--green-soft);
    color: var(--green-strong);
    padding: 0 14px;
}

.alert {
    border-radius: 8px;
    margin-bottom: 18px;
    padding: 12px 14px;
    font-weight: 700;
}

.alert-error {
    background: #fce8e6;
    color: #a50e0e;
}

.alert-success {
    background: #e6f4ea;
    color: #137333;
}

.login-page {
    display: grid;
    place-items: center;
    min-height: 100svh;
    padding: clamp(12px, 2.5vw, 24px);
    overflow-x: hidden;
    background:
        radial-gradient(circle at 15% 12%, rgba(113, 200, 15, 0.26), transparent 30%),
        radial-gradient(circle at 86% 18%, rgba(0, 168, 132, 0.14), transparent 28%),
        linear-gradient(180deg, #f4fbf0, #ffffff 58%, #edf8e8);
}

.login-shell {
    display: grid;
    grid-template-columns: minmax(360px, 1.08fr) minmax(340px, 430px);
    width: min(1040px, 100%);
    min-height: min(640px, calc(100svh - 32px));
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 34px;
    background: var(--surface);
    box-shadow: 0 24px 80px rgba(25, 65, 20, 0.2);
}

.brand-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 0;
    padding: clamp(28px, 4vw, 48px);
    overflow: hidden;
    background: #162315;
    color: #ffffff;
}

.brand-panel::before {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.09) 1px, transparent 1px),
        linear-gradient(0deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
        linear-gradient(140deg, rgba(91, 196, 12, 0.74), rgba(0, 95, 75, 0.28));
    background-size: 46px 46px, 46px 46px, auto;
    content: "";
    z-index: 1;
}

.brand-panel::after {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 55% 45% 0 0 / 100% 100% 0 0;
    bottom: -1px;
    content: "";
    display: block;
    height: 78px;
    left: -8%;
    position: absolute;
    right: -8%;
    transform: translateY(48%);
    z-index: 2;
}

.orb {
    display: none;
}

.brand-logo {
    position: relative;
    z-index: 3;
    width: 132px;
    height: 132px;
    object-fit: cover;
    border-radius: 50%;
    border: 0;
    clip-path: circle(43% at 50% 50%);
    box-shadow: none;
    animation: logo-breathe 4.8s ease-in-out infinite;
}

.hero-logo {
    transform: none;
}

.brand-panel-head {
    align-items: center;
    display: flex;
    gap: 16px;
    position: relative;
    z-index: 3;
}

.brand-panel-head::before {
    animation: logo-orbit 6s linear infinite;
    background: conic-gradient(from 90deg, transparent 0 48%, rgba(113, 200, 15, 0.98) 52%, rgba(0, 168, 132, 0.9) 62%, transparent 72%);
    border-radius: 50%;
    content: "";
    height: 134px;
    left: -1px;
    pointer-events: none;
    position: absolute;
    top: 50%;
    width: 134px;
    z-index: 2;
}

.brand-panel-head strong,
.brand-panel-head span {
    display: block;
}

.brand-panel-head strong {
    font-size: 1.55rem;
    line-height: 1;
}

.brand-panel-head span {
    color: rgba(255, 255, 255, 0.86);
    font-weight: 700;
    margin-top: 5px;
}

.brand-panel-copy {
    margin-top: clamp(42px, 7vw, 80px);
    margin-bottom: 44px;
    position: relative;
    z-index: 3;
}

.login-photo {
    background:
        linear-gradient(90deg, rgba(18, 35, 17, 0.2), rgba(18, 35, 17, 0.52)),
        linear-gradient(0deg, rgba(18, 35, 17, 0.5), rgba(18, 35, 17, 0.02) 48%, rgba(18, 35, 17, 0.72)),
        url("login/login-gas-installer.png") center / cover no-repeat;
    inset: 0;
    opacity: 0.9;
    position: absolute;
    transform: scale(1.03);
}

.login-kicker {
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.26);
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.92);
    display: inline-flex;
    font-size: 0.78rem;
    font-weight: 900;
    margin-bottom: 14px;
    padding: 7px 12px;
    text-transform: uppercase;
}

.brand-panel h1 {
    position: relative;
    z-index: 3;
    max-width: 420px;
    margin: 0 0 12px;
    font-size: clamp(2.1rem, 4vw, 3.35rem);
    line-height: 1.02;
}

.brand-panel p {
    position: relative;
    z-index: 3;
    max-width: 390px;
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    line-height: 1.5;
}

.login-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(28px, 4vw, 46px);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), #ffffff),
        #ffffff;
    position: relative;
    z-index: 2;
}

.mini-brand,
.side-brand,
.profile-chip {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mini-brand img,
.side-brand img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
}

.mini-brand span,
.side-brand strong {
    font-weight: 800;
}

.login-card h2 {
    margin: 24px 0 18px;
    font-size: clamp(1.8rem, 3vw, 2.35rem);
    line-height: 1.06;
    position: relative;
}

.login-card h2::after {
    background: var(--green);
    border-radius: 999px;
    content: "";
    display: block;
    height: 4px;
    margin-top: 10px;
    width: 56px;
}

.login-help {
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 700;
    margin: 18px 0 0;
    padding-top: 16px;
    text-align: center;
}

@keyframes logo-breathe {
    0%,
    100% {
        transform: translateY(0) scale(1);
        box-shadow: 0 16px 36px rgba(32, 33, 36, 0.18);
    }
    50% {
        transform: translateY(-4px) scale(1.035);
        box-shadow: 0 22px 42px rgba(32, 33, 36, 0.22);
    }
}

@keyframes logo-orbit {
    from {
        transform: translateY(-50%) rotate(0deg);
    }
    to {
        transform: translateY(-50%) rotate(360deg);
    }
}

.login-card .btn {
    min-height: 52px;
    margin-top: 2px;
    width: 100%;
}

.demo-users {
    display: grid;
    gap: 10px;
    margin-top: 18px;
    border-top: 1px solid var(--line);
    padding-top: 16px;
    color: var(--muted);
    font-size: 0.82rem;
}

.demo-users strong {
    color: var(--ink);
}

.demo-users div {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.demo-users span {
    background: var(--green-soft);
    border: 1px solid #d9edcf;
    border-radius: 999px;
    color: var(--green-strong);
    font-weight: 800;
    padding: 6px 10px;
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    display: flex;
    flex-direction: column;
    width: 248px;
    padding: 22px;
    border-right: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(18px);
}

.side-brand span,
.profile-chip span,
.eyebrow,
.muted,
small {
    color: var(--muted);
}

.eyebrow {
    font-weight: 700;
}

.sidebar nav {
    display: grid;
    gap: 8px;
    margin: 32px 0 auto;
}

.sidebar nav button {
    border: 0;
    text-align: left;
}

.sidebar nav a,
.nav-item,
.nav-parent {
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-weight: 700;
    padding: 12px 16px;
    transition: background 140ms ease, color 140ms ease;
}

.sidebar nav a.active,
.sidebar nav a:hover,
.nav-item.active,
.nav-item:hover,
.nav-parent:hover {
    background: var(--green-soft);
    color: var(--green-strong);
}

.side-nav {
    align-content: start;
}

.nav-group {
    display: grid;
    gap: 6px;
}

.nav-parent {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.chevron {
    color: var(--muted);
    font-size: 1rem;
    transition: transform 160ms ease;
}

.nav-group.is-open .chevron {
    transform: rotate(180deg);
}

.nav-submenu {
    display: none;
    gap: 6px;
    padding-left: 12px;
}

.nav-group.is-open .nav-submenu {
    display: grid;
}

.nav-submenu .nav-item {
    min-height: 38px;
    padding: 9px 14px;
    font-size: 0.9rem;
}

.dashboard {
    min-height: 100vh;
    margin-left: 248px;
    padding: clamp(20px, 3vw, 34px);
}

.topbar,
.toolbar,
.section-title,
.form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.topbar {
    margin-bottom: 22px;
}

.topbar h1 {
    margin-top: 6px;
    font-size: clamp(2rem, 3vw, 2.75rem);
    line-height: 1.08;
}

.view-panel {
    display: none;
}

.view-panel.is-active {
    display: block;
}

.module-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}

.module-head h2 {
    margin-top: 4px;
    font-size: clamp(1.45rem, 2vw, 1.9rem);
}

.module-head p {
    max-width: 420px;
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.profile-chip {
    justify-content: flex-end;
    min-width: 240px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #ffffff;
    padding: 10px 16px;
    text-align: right;
    box-shadow: 0 1px 2px rgba(60, 64, 67, 0.08);
}

.profile-chip span,
.profile-chip strong {
    display: block;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.metric {
    min-height: 116px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 20px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(60, 64, 67, 0.08);
    overflow: hidden;
    position: relative;
}

.metric::before {
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: var(--green);
    content: "";
}

.metric::after {
    position: absolute;
    inset: auto 18px 18px auto;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--green-soft);
    content: "";
}

.metric span {
    display: block;
    margin-bottom: 14px;
    color: var(--muted);
    font-weight: 700;
}

.metric strong {
    font-size: clamp(2.1rem, 4vw, 2.8rem);
    line-height: 1;
}

.metric-lime::before {
    background: var(--green);
}

.metric-teal::before {
    background: var(--teal);
}

.metric-white::before {
    background: var(--yellow);
}

.metric-blue::before {
    background: var(--blue);
}

.toolbar,
.users-table,
.form-panel {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(60, 64, 67, 0.08);
}

.toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    margin-bottom: 18px;
    padding: 16px;
}

.result-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(60, 64, 67, 0.08);
    padding: 18px;
}

.result-card span {
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 700;
}

.result-card strong {
    font-size: 1.2rem;
}

.filter-form {
    grid-template-columns: minmax(240px, 1fr) minmax(170px, 220px) auto;
    min-width: 0;
    width: auto;
}

.toolbar > form:not(.filter-form) {
    justify-self: end;
}

.users-table {
    overflow: hidden;
    margin-bottom: 22px;
}

.section-title {
    padding: 16px 18px;
    border-bottom: 1px solid var(--line);
    background: #ffffff;
}

.section-title h2 {
    font-size: 1.14rem;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

th,
td {
    border-bottom: 1px solid var(--line);
    padding: 14px 18px;
    text-align: left;
    vertical-align: middle;
}

tbody tr {
    transition: background 140ms ease;
}

tbody tr:hover {
    background: #f8fbf6;
}

th {
    color: var(--muted);
    font-size: 0.76rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

td small {
    display: block;
    margin-top: 4px;
}

.pill,
.status {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    border-radius: 999px;
    padding: 0 10px;
    font-size: 0.78rem;
    font-weight: 800;
}

.pill {
    background: var(--green-soft);
    color: var(--green-strong);
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag {
    align-items: center;
    background: #f1f8e9;
    border: 1px solid #d8edc8;
    border-radius: 999px;
    color: var(--green-strong);
    display: inline-flex;
    font-size: 0.74rem;
    font-weight: 800;
    min-height: 26px;
    padding: 0 9px;
}

.row-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.row-actions form {
    display: inline;
    width: auto;
}

.btn-danger {
    background: #fce8e6;
    color: #b3261e;
}

.status.is-active {
    background: #e6f4ea;
    color: #137333;
}

.status.is-inactive {
    background: #f1f3f4;
    color: #5f6368;
}

.form-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
    gap: 18px;
}

.company-form {
    padding: 18px;
}

.company-form-grid,
.field-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 0.7fr);
    gap: 14px;
}

.logo-preview-row,
.company-preview-head {
    display: flex;
    align-items: center;
    gap: 14px;
}

.logo-preview-row {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfdf9;
    padding: 12px;
}

.logo-preview-row img,
.company-preview-head img {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    object-fit: cover;
}

.format-builder {
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
}

.compact-title {
    border-bottom: 1px solid var(--line);
}

.format-fields {
    display: grid;
    gap: 12px;
    padding: 14px;
}

.field-row {
    align-items: end;
    border: 1px solid #edf0ec;
    border-radius: 8px;
    background: #ffffff;
    padding: 12px;
}

.field-row .check-label {
    align-items: center;
    display: flex;
    gap: 8px;
    min-height: 50px;
}

.check-label input,
.preview-check input {
    width: auto;
    min-height: auto;
}

.table-logo {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    object-fit: cover;
}

.inline-search {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto;
    min-width: min(100%, 430px);
}

.company-preview-head {
    border-bottom: 1px solid var(--line);
    padding: 18px;
}

.digital-form-preview {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    padding: 18px;
}

.preview-check {
    align-items: center;
    display: flex;
    gap: 10px;
    min-height: 50px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #ffffff;
    padding: 0 16px;
}

.reset-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.8fr);
    gap: 18px;
}

.reset-grid.single-column {
    grid-template-columns: minmax(0, 720px);
}

.module-card {
    max-width: 920px;
}

.danger-card {
    border-color: #f4c7c3;
}

.danger-card .section-title {
    color: #a50e0e;
}

.form-panel {
    overflow: hidden;
}

.user-form,
.password-form {
    padding: 18px;
}

.user-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.wide,
.form-actions {
    grid-column: 1 / -1;
}

@media (max-width: 1200px) {
    .toolbar {
        grid-template-columns: 1fr;
    }

    .toolbar > form:not(.filter-form) {
        justify-self: end;
    }

    .filter-form {
        grid-template-columns: minmax(190px, 1fr) minmax(160px, 220px) auto;
    }
}

@media (max-width: 900px) {
    .login-shell,
    .form-grid,
    .reset-grid {
        grid-template-columns: 1fr;
    }

    .login-shell {
        width: min(520px, 100%);
        min-height: auto;
    }

    .brand-panel {
        min-height: 0;
        padding: 26px 28px 36px;
    }

    .brand-panel-copy {
        margin-top: 26px;
        margin-bottom: 10px;
    }

    .brand-panel h1 {
        font-size: 2rem;
    }

    .brand-panel p {
        max-width: 100%;
    }

    .sidebar {
        position: static;
        flex-direction: row;
        align-items: center;
        gap: 14px;
        width: auto;
        border-right: 0;
        border-bottom: 1px solid var(--line);
        padding: 14px 18px;
    }

    .sidebar nav {
        display: flex;
        flex: 1;
        flex-wrap: wrap;
        margin: 0;
    }

    .nav-group {
        min-width: min(100%, 360px);
    }

    .nav-submenu {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding-left: 0;
    }

    .dashboard {
        margin-left: 0;
        padding: 18px;
    }

    .topbar {
        align-items: stretch;
        flex-direction: column;
    }

    .toolbar {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .filter-form,
    .user-form,
    .company-form-grid,
    .field-row,
    .digital-form-preview,
    .inline-search {
        grid-template-columns: 1fr;
    }

    .module-head,
    .result-card {
        align-items: stretch;
        flex-direction: column;
    }
}

@media (max-width: 720px) {
    .metric-grid {
        grid-template-columns: 1fr;
    }

    .table-wrap {
        overflow: visible;
        padding: 12px;
    }

    table,
    thead,
    tbody,
    tr,
    td {
        display: block;
        width: 100%;
        min-width: 0;
    }

    thead {
        display: none;
    }

    tbody {
        display: grid;
        gap: 12px;
    }

    tr {
        border: 1px solid var(--line);
        border-radius: 8px;
        background: #ffffff;
        box-shadow: 0 1px 2px rgba(60, 64, 67, 0.08);
        overflow: hidden;
    }

    td {
        display: grid;
        grid-template-columns: 108px minmax(0, 1fr);
        gap: 12px;
        border-bottom: 1px solid #edf0ec;
        padding: 12px 14px;
    }

    td::before {
        color: var(--muted);
        content: attr(data-label);
        font-size: 0.76rem;
        font-weight: 800;
        text-transform: uppercase;
    }

    td:last-child {
        border-bottom: 0;
    }
}

@media (max-width: 560px) {
    .login-page {
        align-items: start;
        background: #101510;
        min-height: 100svh;
        overflow: hidden;
        padding: 0;
    }

    .dashboard {
        padding: 12px;
    }

    .login-shell {
        background: transparent;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        display: block;
        height: 100svh;
        min-height: 100svh;
        overflow: hidden;
        position: relative;
        width: 100%;
    }

    .brand-panel {
        inset: 0;
        min-height: 100svh;
        padding: 22px 22px 34px;
        position: absolute;
    }

    .login-photo {
        background:
            linear-gradient(180deg, rgba(9, 17, 9, 0.12), rgba(9, 17, 9, 0.22) 36%, rgba(9, 17, 9, 0.64)),
            url("login/login-gas-installer.png") center / cover no-repeat;
        opacity: 1;
        transform: scale(1);
    }

    .brand-panel::before {
        background:
            linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
            linear-gradient(0deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
        background-size: 42px 42px;
    }

    .brand-panel::after {
        display: none;
    }

    .login-card {
        backdrop-filter: blur(18px);
        background: rgba(255, 255, 255, 0.9);
        border: 1px solid rgba(255, 255, 255, 0.58);
        border-radius: 28px;
        bottom: max(14px, env(safe-area-inset-bottom));
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.24);
        justify-content: start;
        left: 14px;
        margin: 0;
        padding: 22px 18px 16px;
        position: absolute;
        right: 14px;
    }

    .brand-logo {
        width: 146px;
        height: 146px;
        border: 0;
    }

    .brand-panel-head::before {
        height: 144px;
        left: 1px;
        width: 144px;
    }

    .brand-panel-head {
        gap: 13px;
    }

    .brand-panel-head strong {
        font-size: 1.34rem;
    }

    .brand-panel-head span {
        font-size: 0.9rem;
    }

    .brand-panel p {
        display: none;
    }

    .brand-panel-copy {
        display: none;
    }

    .mini-brand {
        display: none;
    }

    .login-card h2 {
        font-size: 1.5rem;
        margin: 0 0 10px;
    }

    .login-card h2::after {
        height: 3px;
        margin-top: 7px;
        width: 46px;
    }

    .login-card form {
        gap: 9px;
    }

    .login-card label {
        gap: 6px;
    }

    .login-card input {
        background: rgba(255, 255, 255, 0.92);
        font-size: 16px;
        min-height: 45px;
        border-radius: 15px;
    }

    .login-card .btn {
        min-height: 47px;
    }

    .demo-users {
        margin-top: 14px;
        padding-top: 12px;
    }

    .demo-users div {
        gap: 6px;
    }

    .demo-users span {
        font-size: 0.74rem;
        padding: 5px 8px;
    }

    .login-help {
        font-size: 0.78rem;
        margin-top: 10px;
        padding-top: 10px;
    }

    .profile-chip,
    .form-actions {
        align-items: stretch;
        flex-direction: column;
        text-align: left;
    }

    .sidebar {
        align-items: stretch;
        flex-direction: column;
    }

    .sidebar nav {
        display: grid;
        grid-template-columns: 1fr;
    }

    .sidebar nav a,
    .sidebar nav button,
    .sidebar .btn {
        padding-inline: 10px;
        text-align: center;
    }

    .nav-parent {
        justify-content: center;
    }

    .nav-parent .chevron {
        margin-left: 8px;
    }

    .nav-submenu {
        grid-template-columns: 1fr;
    }

    td {
        grid-template-columns: 1fr;
        gap: 6px;
    }
}

.gas-module {
    background: #f6faf4;
}

.gas-workspace .module-head {
    align-items: center;
}

.installation-list {
    display: grid;
    gap: 14px;
}

.installation-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(60, 64, 67, 0.08);
    padding: 18px;
}

.installation-card h2 {
    margin: 10px 0 6px;
    font-size: 1.18rem;
}

.installation-card p {
    margin: 0;
    color: var(--muted);
}

.installation-card dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(110px, 1fr));
    gap: 12px;
    margin: 0;
}

.installation-card dt {
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
}

.installation-card dd {
    margin: 4px 0 0;
    font-weight: 700;
}

.gas-form-shell {
    display: contents;
}

.gas-field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(60, 64, 67, 0.08);
    padding: 18px;
}

.iso-tool {
    display: grid;
    gap: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(60, 64, 67, 0.08);
    padding: 14px;
}

.iso-toolbar,
.iso-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tool-button {
    min-height: 38px;
    border-radius: 999px;
    background: #f1f3f4;
    color: var(--muted);
    cursor: pointer;
    font-weight: 800;
    padding: 0 14px;
}

.tool-button.active {
    background: var(--green-soft);
    color: var(--green-strong);
}

.iso-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.iso-canvas {
    width: 100%;
    height: min(68vh, 620px);
    min-height: 430px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    touch-action: none;
}

.autosave-status {
    align-self: center;
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 700;
}

.evidence-upload {
    display: grid;
    gap: 14px;
    margin-bottom: 18px;
    padding: 18px;
}

.evidence-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
}

.evidence-grid figure {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    margin: 0;
    overflow: hidden;
}

.evidence-grid img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.evidence-grid figcaption {
    color: var(--muted);
    font-size: 0.8rem;
    padding: 10px;
}

.digital-act-form {
    display: grid;
    gap: 18px;
}

.act-form-grid {
    display: grid;
    gap: 18px;
}

.act-section {
    border-radius: 18px;
    padding: 20px;
}

.act-section .section-title {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-bottom: 16px;
}

.act-section .section-title h2 {
    font-size: 22px;
    margin: 0;
}

.act-section .section-title span {
    background: #eef7e8;
    border-radius: 999px;
    color: var(--green-dark);
    font-size: 13px;
    font-weight: 800;
    padding: 6px 10px;
}

.act-fields {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.act-fields.single {
    grid-template-columns: 1fr;
}

.act-fields label {
    color: var(--muted);
    display: grid;
    font-size: 14px;
    font-weight: 800;
    gap: 8px;
}

.act-fields input,
.act-fields textarea {
    background: #f8faf7;
    border: 1px solid #dce8d7;
    border-radius: 14px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
    color: var(--ink);
    font: inherit;
    outline: none;
    padding: 14px 15px;
    transition: border 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.act-fields textarea {
    min-height: 116px;
    resize: vertical;
}

.act-fields input:focus,
.act-fields textarea:focus {
    background: #ffffff;
    border-color: var(--green);
    box-shadow: 0 0 0 4px rgba(117, 199, 31, 0.18);
}

.sticky-save-bar {
    align-items: center;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: var(--shadow);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding: 12px;
    position: sticky;
    bottom: 14px;
    z-index: 20;
}

.act-drawing-card {
    background: #f8faf7;
    border: 1px solid #dce8d7;
    border-radius: 18px;
    display: grid;
    gap: 12px;
    margin-top: 16px;
    padding: 14px;
}

.act-drawing-card p {
    color: var(--muted);
    font-size: 16px;
    font-weight: 750;
    margin: 0;
}

.act-free-canvas {
    background: #ffffff;
    border: 1px solid #cbd9c7;
    border-radius: 14px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
    height: 280px;
    touch-action: none;
    width: 100%;
}

.signature-canvas {
    height: 170px;
}

.signature-pad-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    margin-top: 18px;
}

.canvas-actions {
    display: flex;
    justify-content: flex-end;
}

.act-digital-sheet {
    background: #ffffff;
    border: 1px solid #cbd9c7;
    border-radius: 8px;
    box-shadow: var(--shadow);
    color: #152313;
    display: grid;
    font-size: 13px;
    gap: 10px;
    margin: 0 auto;
    max-width: 1180px;
    padding: 18px;
}

.act-digital-sheet header {
    align-items: center;
    border-bottom: 2px solid #233c7a;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(210px, 1fr) 1.4fr minmax(140px, 0.6fr);
    padding-bottom: 10px;
}

.act-brand {
    align-items: center;
    display: grid;
    gap: 4px 10px;
    grid-template-columns: 54px 1fr;
}

.act-brand img {
    border-radius: 50%;
    grid-row: span 2;
    height: 54px;
    object-fit: cover;
    width: 54px;
}

.act-brand strong,
.act-digital-sheet h2 {
    color: #17306d;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.act-brand strong {
    font-size: 20px;
    letter-spacing: 0;
}

.act-brand span {
    color: #42526c;
    font-size: 11px;
    font-weight: 800;
}

.act-digital-sheet h2 {
    font-size: 26px;
    margin: 0;
    text-align: center;
}

.act-number {
    border: 2px solid #233c7a;
    border-radius: 8px;
    color: #8a1d2a;
    font-size: 20px;
    font-weight: 900;
    padding: 10px 12px;
    text-align: center;
}

.act-mini-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.act-mini-grid.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.act-mini-grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.act-mini-grid span {
    border: 1px solid #cbd9c7;
    min-height: 46px;
    padding: 7px;
}

.act-mini-grid strong {
    display: block;
    font-size: 14px;
    margin-top: 4px;
    word-break: break-word;
}

.act-band {
    background: #eef3ec;
    border: 1px solid #cbd9c7;
    color: #17306d;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.06em;
    padding: 7px 10px;
    text-align: center;
}

.act-layout {
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(0, 1fr) minmax(340px, 0.9fr);
}

.act-layout section {
    display: grid;
    gap: 8px;
}

.act-layout p {
    border: 1px solid #cbd9c7;
    line-height: 1.45;
    margin: 0;
    min-height: 72px;
    padding: 10px;
    white-space: normal;
}

.act-iso-preview {
    background: #ffffff;
    border: 1px solid #cbd9c7;
    border-radius: 4px;
    display: block;
    height: auto;
    max-width: 100%;
    width: 100%;
}

.act-digital-sheet footer {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 18px;
}

.act-digital-sheet footer div {
    border-top: 1px solid #152313;
    display: grid;
    gap: 6px;
    min-height: 48px;
    padding-top: 8px;
    text-align: center;
}

.act-digital-sheet footer span {
    color: #42526c;
    font-weight: 800;
}

.act-replica-sheet {
    border: 1.5px solid #233c7a;
    color: #101820;
    gap: 0;
    line-height: 1.22;
    max-width: 1420px;
    padding: 8px;
}

.act-replica-header {
    align-items: start;
    border-bottom: 1.5px solid #233c7a;
    grid-template-columns: minmax(260px, 1fr) minmax(420px, 1.3fr) minmax(170px, 0.62fr);
    min-height: 70px;
    padding: 4px 0 8px;
    position: relative;
}

.act-replica-header h2 {
    align-self: center;
    color: #0b2a68;
    font-size: 34px;
    font-weight: 900;
    letter-spacing: 0.34em;
    line-height: 1.05;
    margin: 0;
    text-align: center;
    white-space: nowrap;
}

.replica-brand img {
    height: 62px;
    width: 62px;
}

.replica-brand strong {
    color: #0b2a68;
    font-size: 30px;
    font-weight: 950;
    line-height: 1;
}

.replica-brand span {
    color: #0b2a68;
    font-size: 12px;
}

.act-replica-sheet .act-number {
    align-self: start;
    border: 2px solid #233c7a;
    border-radius: 6px;
    color: #7d1424;
    font-size: 26px;
    justify-self: end;
    letter-spacing: 0.12em;
    padding: 9px 10px;
    text-align: center;
    width: min(100%, 170px);
    z-index: 2;
}

.act-replica-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 250px;
}

.act-replica-left {
    display: grid;
    min-width: 0;
}

.act-section-title {
    align-items: center;
    background: #eef3ec;
    border: 1px solid #8da0c8;
    color: #0b2a68;
    display: grid;
    font-size: 12px;
    font-weight: 900;
    grid-template-columns: 24px 1fr;
    letter-spacing: 0.04em;
    min-height: 22px;
    text-align: center;
}

.act-section-title b {
    align-items: center;
    background: #0b2a68;
    border-radius: 50%;
    color: #ffffff;
    display: inline-flex;
    font-size: 11px;
    height: 18px;
    justify-content: center;
    margin-left: 3px;
    width: 18px;
}

.act-section-title small {
    border-left: 1px solid #8da0c8;
    color: #0b2a68;
    font-size: 10px;
    min-height: 20px;
    padding-top: 4px;
}

.act-material-column .act-section-title {
    grid-template-columns: 1fr 48px 48px;
}

.act-row {
    display: grid;
}

.act-row-six {
    grid-template-columns: 0.8fr 0.9fr 1.8fr 0.85fr 0.75fr 1.05fr;
}

.act-row-eight {
    grid-template-columns: 0.75fr 0.9fr 1.45fr 0.75fr 0.65fr 0.72fr 0.5fr 1.05fr;
}

.act-row-three {
    grid-template-columns: 1.7fr 0.9fr 0.9fr;
}

.act-row-four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.act-row-two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.act-row span,
.act-check-grid span {
    border: 1px solid #8da0c8;
    color: #334;
    display: block;
    font-size: 10px;
    min-height: 35px;
    padding: 4px 5px;
}

.act-row strong,
.act-check-grid strong {
    color: #111820;
    display: block;
    font-size: 13px;
    font-weight: 850;
    line-height: 1.22;
    margin-top: 3px;
    word-break: break-word;
}

.client-row strong {
    font-size: 18px;
}

.compact-row span {
    min-height: 32px;
}

.compact-row strong {
    font-size: 12px;
}

.act-mid-grid {
    display: grid;
    grid-template-columns: 1.3fr 0.95fr;
}

.act-check-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.install-choice-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.act-check-grid strong {
    min-height: 14px;
    text-align: center;
}

.act-plan-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(420px, 0.9fr);
}

.act-plan-grid section {
    display: grid;
}

.act-text-box {
    border: 1px solid #8da0c8;
    color: #101820;
    font-size: 12px;
    line-height: 1.3;
    overflow: hidden;
    padding: 7px;
    white-space: pre-line;
}

.act-text-box.tall {
    min-height: 132px;
}

.act-text-box.mid {
    min-height: 94px;
}

.act-text-box.small {
    min-height: 74px;
}

.act-data-table {
    border-collapse: collapse;
    color: #101820;
    table-layout: fixed;
    width: 100%;
}

.act-data-table th,
.act-data-table td {
    border: 1px solid #8da0c8;
    font-size: 9px;
    line-height: 1.14;
    min-height: 22px;
    padding: 3px;
    text-align: center;
    vertical-align: top;
    word-break: break-word;
}

.act-data-table th {
    color: #0b2a68;
    font-weight: 900;
}

.act-data-table td {
    height: 26px;
    text-align: left;
}

.supply-table td {
    height: 25px;
}

.appliance-table td {
    height: 24px;
}

.replica-iso {
    border: 1px solid #8da0c8;
    border-radius: 0;
    height: 222px;
}

.act-plant-grid {
    background-color: #ffffff;
    background-image:
        linear-gradient(#dfe8da 1px, transparent 1px),
        linear-gradient(90deg, #dfe8da 1px, transparent 1px);
    background-size: 10px 10px;
    border: 1px solid #8da0c8;
    display: grid;
    min-height: 188px;
    place-items: stretch;
}

.act-plant-grid img {
    display: block;
    height: 100%;
    object-fit: contain;
    width: 100%;
}

.act-material-column {
    border-left: 1.5px solid #233c7a;
    display: grid;
    grid-auto-rows: min-content;
}

.material-line {
    display: grid;
    grid-template-columns: 1fr 48px 48px;
}

.material-line span,
.material-line i {
    border: 1px solid #8da0c8;
    color: #101820;
    font-size: 11px;
    font-style: normal;
    min-height: 22px;
    padding: 3px 5px;
}

.act-replica-footer {
    border-top: 1.5px solid #233c7a;
    display: grid;
    gap: 0;
    grid-template-columns: 1fr 1fr;
    margin-top: 0;
}

.act-replica-footer section {
    border-right: 1px solid #8da0c8;
    display: grid;
}

.act-replica-footer section:last-child {
    border-right: 0;
}

.act-replica-footer p {
    border: 1px solid #8da0c8;
    font-size: 10.5px;
    line-height: 1.24;
    margin: 0;
    min-height: 58px;
    padding: 6px;
}

.signature-line {
    align-items: end;
    border: 1px solid #8da0c8;
    display: grid;
    min-height: 64px;
    padding: 4px 36px;
    text-align: center;
}

.signature-line strong {
    border-bottom: 1px solid #101820;
    display: block;
    min-height: 26px;
}

.signature-line img {
    display: block;
    height: 42px;
    margin: 0 auto;
    max-width: 90%;
    object-fit: contain;
}

.signature-line span {
    color: #101820;
    font-size: 10px;
    font-weight: 800;
}

.yes-no-boxes {
    align-items: center;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    padding: 4px 18px 8px;
}

.yes-no-boxes span {
    font-weight: 900;
}

.yes-no-boxes i {
    border: 1px solid #233c7a;
    display: inline-block;
    height: 18px;
    width: 18px;
}

.act-legal-note {
    border-top: 1px solid #233c7a;
    color: #0b2a68;
    font-size: 10px;
    font-weight: 700;
    padding: 6px 12px 0;
    text-align: center;
}

.legacy-act-replica-sheet {
    display: none !important;
}

.act-blank-sheet {
    display: none !important;
}

.act-scan-sheet {
    background: #ffffff;
    border: 2px solid #0b1f4d;
    color: #071b45;
    display: grid;
    font-family: Arial, Helvetica, sans-serif;
    grid-template-rows: 72px 1fr 250px 26px;
    margin: 0 auto;
    width: 1600px;
}

.scan-header {
    align-items: center;
    border-bottom: 2px solid #0b1f4d;
    display: grid;
    grid-template-columns: 420px 1fr 260px;
}

.scan-brand {
    align-items: center;
    display: grid;
    grid-template-columns: 92px 1fr;
}

.scan-brand img {
    height: 86px;
    object-fit: contain;
    width: 92px;
}

.scan-brand strong {
    color: #0756b0;
    display: block;
    font-size: 44px;
    line-height: 0.9;
}

.scan-brand span {
    color: #111;
    font-size: 15px;
    font-weight: 900;
}

.scan-header h2 {
    color: #071b66;
    font-size: 42px;
    letter-spacing: 0.28em;
    margin: 0;
    text-align: center;
    white-space: nowrap;
}

.scan-number {
    border: 2px solid #111;
    border-radius: 5px;
    color: #8d1018;
    font-size: 34px;
    font-weight: 900;
    justify-self: end;
    margin-right: 8px;
    padding: 12px 22px;
}

.scan-body {
    display: grid;
    grid-template-columns: 1fr 285px;
    min-height: 0;
}

.scan-main {
    display: grid;
    grid-template-rows: 82px 58px 205px 1fr;
    min-width: 0;
}

.scan-materials {
    border-left: 2px solid #0b1f4d;
    display: grid;
    grid-auto-rows: min-content;
}

.scan-title {
    align-items: center;
    background: #f8fbff;
    border-bottom: 2px solid #0b1f4d;
    border-top: 0;
    display: grid;
    font-size: 16px;
    font-weight: 900;
    grid-template-columns: 28px 1fr;
    min-height: 24px;
    text-align: center;
}

.scan-title b {
    align-items: center;
    background: #071b66;
    border-radius: 50%;
    color: #fff;
    display: inline-flex;
    font-size: 17px;
    height: 22px;
    justify-content: center;
    margin-left: 3px;
    width: 22px;
}

.scan-grid {
    display: grid;
}

.scan-grid > div,
.scan-table th,
.scan-table td,
.scan-material-row span,
.scan-material-row i {
    border-bottom: 1.5px solid #0b1f4d;
    border-right: 1.5px solid #0b1f4d;
    box-sizing: border-box;
}

.scan-grid > div {
    font-size: 15px;
    min-height: 28px;
    padding: 4px 6px;
    text-align: center;
}

.scan-grid strong {
    display: block;
    font-size: 18px;
    line-height: 1.05;
}

.general-grid {
    grid-template-columns: 1.1fr 1.15fr 1.9fr 1.1fr 0.75fr 0.82fr 0.55fr 1.55fr;
}

.client-grid {
    grid-template-columns: 1.4fr 0.8fr 0.45fr;
}

.scan-top-details {
    display: grid;
    grid-template-columns: 1.55fr 0.7fr 0.7fr;
}

.scan-section {
    min-width: 0;
}

.scan-table {
    border-collapse: collapse;
    table-layout: fixed;
    width: 100%;
}

.scan-table th,
.scan-table td {
    color: #071b45;
    font-size: 12px;
    font-weight: 700;
    height: 24px;
    line-height: 1.05;
    padding: 2px 4px;
    text-align: center;
    vertical-align: middle;
}

.install-table td {
    height: 22px;
}

.parameters-table th,
.parameters-table td {
    height: 29px;
}

.meter-table td {
    height: 39px;
}

.scan-lower {
    display: grid;
    grid-template-columns: 0.92fr 0.68fr;
    min-height: 0;
}

.supply-clone-table th,
.supply-clone-table td {
    height: 24px;
}

.appliance-clone-table th,
.appliance-clone-table td {
    height: 22px;
}

.vertical {
    writing-mode: vertical-rl;
}

.scan-observations {
    border-bottom: 2px solid #0b1f4d;
    border-right: 2px solid #0b1f4d;
    font-size: 12px;
    font-weight: 900;
    height: 110px;
    padding: 9px 8px;
}

.scan-observations span {
    border-bottom: 1px solid #0b1f4d;
    display: inline-block;
    font-weight: 600;
    margin-left: 20px;
    min-width: 520px;
}

.scan-plan-column {
    display: grid;
    grid-template-rows: 24px 360px 24px 1fr;
    min-width: 0;
}

.scan-iso-canvas {
    border-bottom: 2px solid #0b1f4d;
    border-right: 2px solid #0b1f4d;
    display: block;
    height: 360px;
    object-fit: fill;
    width: 100%;
}

.scan-plant-grid {
    background-color: #fff;
    background-image:
        linear-gradient(#d4dce6 1px, transparent 1px),
        linear-gradient(90deg, #d4dce6 1px, transparent 1px);
    background-size: 10px 10px;
    border-bottom: 2px solid #0b1f4d;
    border-right: 2px solid #0b1f4d;
}

.blank-iso-grid {
    background-color: #ffffff;
    background-image:
        linear-gradient(30deg, rgba(11, 31, 77, 0.08) 1px, transparent 1px),
        linear-gradient(150deg, rgba(11, 31, 77, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(11, 31, 77, 0.04) 1px, transparent 1px);
    background-size: 18px 18px;
}

.scan-plant-grid img {
    display: block;
    height: 100%;
    object-fit: fill;
    width: 100%;
}

.material-head {
    display: grid;
    font-size: 11px;
    font-weight: 900;
    grid-template-columns: 1fr 92px;
    min-height: 32px;
    text-align: center;
}

.material-head span,
.material-head strong {
    border-bottom: 1.5px solid #0b1f4d;
    border-right: 1.5px solid #0b1f4d;
}

.material-head small {
    display: inline-block;
    font-size: 9px;
    width: 45%;
}

.scan-material-row {
    display: grid;
    grid-template-columns: 1fr 46px 46px;
}

.scan-material-row span,
.scan-material-row i {
    font-size: 13px;
    font-style: normal;
    font-weight: 800;
    height: 28px;
    padding: 6px 7px;
}

.scan-footer {
    border-top: 2px solid #0b1f4d;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.scan-footer section {
    border-right: 2px solid #0b1f4d;
    display: grid;
    grid-template-rows: 26px 42px 86px 1fr;
}

.installer-grid {
    grid-template-columns: 0.35fr 0.35fr 1fr;
}

.user-grid {
    grid-template-columns: 1fr;
}

.scan-footer p {
    border-bottom: 1.5px solid #0b1f4d;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.12;
    margin: 0;
    padding: 11px 12px;
}

.scan-signature {
    align-content: end;
    display: grid;
    justify-items: center;
    padding: 0 40px 10px;
}

.scan-signature img {
    height: 48px;
    object-fit: contain;
}

.scan-signature span {
    border-top: 2px solid #071b45;
    display: block;
    font-size: 12px;
    padding-top: 4px;
    text-align: center;
    width: 420px;
}

.scan-yes-no {
    align-self: end;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin: -28px 28px 4px 0;
}

.scan-yes-no i {
    border: 1.5px solid #071b45;
    height: 20px;
    width: 20px;
}

.scan-legal {
    align-items: center;
    color: #071b45;
    display: flex;
    font-size: 11px;
    font-weight: 700;
    justify-content: center;
    padding: 0 18px;
    text-align: center;
}

.act-card {
    display: grid;
    gap: 10px;
    max-width: 900px;
    padding: 24px;
}

.act-card p {
    margin: 0;
    line-height: 1.6;
}

.signature-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    margin-top: 34px;
}

.signature-grid span {
    border-top: 1px solid var(--ink);
    padding-top: 10px;
    text-align: center;
}

.print-clone-root {
    display: none;
}

.act-image-sheet {
    background: #ffffff;
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.12);
    color: #061947;
    display: block;
    font-family: Arial, Helvetica, sans-serif;
    height: 1197px;
    margin: 0 auto;
    overflow: hidden;
    position: relative;
    width: 1315px;
}

.act-image-bg {
    display: block;
    height: 1197px;
    inset: 0;
    object-fit: fill;
    position: absolute;
    width: 1315px;
    z-index: 1;
}

.act-value {
    align-items: center;
    box-sizing: border-box;
    display: flex;
    font-size: 13px;
    font-weight: 700;
    height: calc(var(--h) * 1px);
    justify-content: center;
    left: calc(var(--x) * 1px);
    line-height: 1.05;
    overflow: hidden;
    padding: 0 3px;
    position: absolute;
    text-align: center;
    top: calc(var(--y) * 1px);
    white-space: normal;
    width: calc(var(--w) * 1px);
    z-index: 3;
}

.act-value.small {
    font-size: 11px;
}

.act-value.micro,
.act-value.tiny-date {
    font-size: 9px;
}

.act-value.tiny-date {
    align-items: flex-end;
    justify-content: flex-end;
    padding: 0 4px 1px;
}

.act-value.large {
    font-size: 21px;
}

.act-value.mark {
    font-size: 12px;
    font-weight: 900;
    padding: 0;
}

.act-value.multiline {
    align-items: flex-start;
    font-size: 12px;
    justify-content: flex-start;
    line-height: 1.2;
    padding: 4px 6px;
    text-align: left;
}

.act-no-value {
    background: #ffffff;
    border: 2px solid #111111;
    border-radius: 5px;
    color: #8b1017;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 29px;
    font-weight: 900;
    height: 56px;
    left: 1089px;
    letter-spacing: 0.04em;
    top: 36px;
    width: 215px;
}

.act-no-value::before {
    content: "Nº";
    margin-right: 28px;
}

.act-image-iso {
    height: 296px;
    left: 620px;
    object-fit: fill;
    position: absolute;
    top: 368px;
    width: 454px;
    z-index: 2;
}

.act-image-plant {
    height: 236px;
    left: 620px;
    object-fit: fill;
    position: absolute;
    top: 699px;
    width: 454px;
    z-index: 2;
}

.act-signature-img {
    height: 52px;
    object-fit: contain;
    position: absolute;
    z-index: 4;
}

.installer-signature-img {
    left: 174px;
    top: 1092px;
    width: 335px;
}

.user-signature-img {
    left: 842px;
    top: 1092px;
    width: 322px;
}

@media (max-width: 900px) {
    .installation-card {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .gas-field-grid,
    .iso-options,
    .signature-grid {
        grid-template-columns: 1fr;
    }

    .iso-canvas {
        height: 58vh;
        min-height: 360px;
    }
}

@media print {
    @page {
        margin: 5mm;
        size: 841mm 594mm;
    }

    .sidebar,
    .topbar,
    .module-head,
    .alert,
    .digital-act-form,
    .gas-menu-toggle,
    .gas-menu-backdrop,
    .view-panel:not([data-view-panel="acta-preview"]) {
        display: none !important;
    }

    body.use-print-clone > :not(.print-clone-root) {
        display: none !important;
    }

    body.use-print-clone .print-clone-root {
        align-items: flex-start;
        background: #ffffff !important;
        display: flex !important;
        justify-content: flex-start;
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
    }

    body,
    html,
    .dashboard {
        background: #ffffff !important;
        margin: 0;
        padding: 0;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .gas-workspace,
    .view-panel[data-view-panel="acta-preview"] {
        display: block !important;
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
    }

    .act-card,
    .act-digital-sheet {
        border: 0;
        border-radius: 0;
        box-shadow: none;
        max-width: none;
        padding: 0;
    }

    .act-digital-sheet {
        font-size: 10px;
    }

    .act-replica-sheet {
        box-sizing: border-box;
        border: 1px solid #233c7a;
        display: grid;
        grid-template-rows: 40mm minmax(0, 1fr) 92mm 10mm;
        height: 584mm;
        margin: 0;
        min-height: 0;
        overflow: visible;
        padding: 4mm;
        transform-origin: top left;
        width: 831mm;
        zoom: 1;
    }

    .print-clone-root .act-replica-sheet {
        border: 1px solid #233c7a !important;
        box-shadow: none !important;
        box-sizing: border-box !important;
        display: grid !important;
        grid-template-rows: 40mm minmax(0, 1fr) 92mm 10mm !important;
        height: 584mm !important;
        margin: 0 !important;
        min-height: 0 !important;
        overflow: visible !important;
        padding: 4mm !important;
        transform-origin: top left !important;
        width: 831mm !important;
        zoom: 1 !important;
    }

    .act-replica-header {
        align-items: start;
        display: grid;
        grid-template-columns: 135mm 1fr 92mm;
        min-height: 0;
        padding: 0 0 0.8mm;
        position: relative;
    }

    .act-replica-header h2 {
        align-self: center;
        font-size: 38px;
        letter-spacing: 0.26em;
        line-height: 1.05;
        text-align: center;
        white-space: nowrap;
    }

    .replica-brand img {
        height: 28mm;
        width: 28mm;
    }

    .replica-brand strong {
        font-size: 42px;
    }

    .act-replica-sheet .act-number {
        align-self: start;
        font-size: 30px;
        justify-self: end;
        line-height: 1.1;
        padding: 3px 6px;
        width: 82mm;
    }

    .act-layout p {
        min-height: 54px;
    }

    .act-section-title {
        font-size: 14px;
        grid-template-columns: 17px 1fr;
        min-height: 8mm;
    }

    .act-section-title b {
        font-size: 13px;
        height: 24px;
        margin-left: 2px;
        width: 24px;
    }

    .act-row span,
    .act-check-grid span,
    .material-line span,
    .material-line i {
        font-size: 13px;
        min-height: 8.5mm;
        padding: 2px 3px;
    }

    .act-row strong,
    .act-check-grid strong {
        font-size: 14px;
        margin-top: 1px;
    }

    .client-row strong {
        font-size: 20px;
    }

    .act-text-box {
        font-size: 13px;
        padding: 2px 3px;
    }

    .act-data-table th,
    .act-data-table td {
        font-size: 11px;
        min-height: 12px;
        padding: 0.8px 1px;
    }

    .act-data-table td,
    .supply-table td,
    .appliance-table td {
        height: 7mm;
    }

    .act-replica-body {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 124mm;
        min-height: 0;
        overflow: hidden;
    }

    .act-replica-left {
        min-height: 0;
    }

    .act-replica-footer {
        min-height: 0;
        overflow: visible;
    }

    .act-mid-grid {
        grid-template-columns: 1.28fr 0.95fr;
    }

    .act-plan-grid {
        grid-template-columns: minmax(0, 1fr) 0.92fr;
        min-height: 0;
    }

    .replica-iso {
        height: 86mm;
    }

    .act-plant-grid {
        min-height: 66mm;
    }

    .act-material-column {
        border-left: 1.5px solid #233c7a;
        border-top: 0;
        display: grid;
        grid-auto-rows: min-content;
        margin-top: 0;
    }

    .act-replica-footer {
        border-top: 1px solid #233c7a;
        display: grid;
        grid-template-columns: 1fr 1fr;
        margin-top: 1.5mm;
    }

    .act-replica-footer p {
        font-size: 13px;
        min-height: 23mm;
        padding: 2px 3px;
    }

    .signature-line {
        align-items: center;
        min-height: 45mm;
        padding: 1px 16px;
    }

    .signature-line img {
        height: 36mm;
        max-height: 36mm;
        object-fit: contain;
    }

    .signature-line strong {
        min-height: 14mm;
    }

    .signature-line span {
        font-size: 13px;
    }

    .material-line {
        grid-template-columns: 1fr 24mm 24mm;
    }

    .act-material-column .act-section-title {
        grid-template-columns: 1fr 24mm 24mm;
    }

    .material-line span,
    .material-line i {
        min-height: 8.6mm;
    }

    .act-brand {
        gap: 1px 5px;
        grid-template-columns: 30mm 1fr;
    }

    .replica-brand span {
        font-size: 15px;
    }

    .yes-no-boxes {
        font-size: 13px;
        padding: 4px 22px 8px;
    }

    .yes-no-boxes i {
        height: 18px;
        width: 18px;
    }

    .act-legal-note {
        font-size: 12px;
        padding-top: 4px;
    }

    .act-scan-sheet.act-replica-sheet,
    .print-clone-root .act-scan-sheet.act-replica-sheet {
        border: 2px solid #0b1f4d !important;
        display: grid !important;
        grid-template-rows: 112px 1fr 360px 42px !important;
        height: 584mm !important;
        margin: 0 !important;
        overflow: visible !important;
        padding: 0 !important;
        width: 584mm !important;
        zoom: 1 !important;
    }

    .print-clone-root .act-blank-sheet.print-active {
        display: grid !important;
    }

    .act-scan-sheet .scan-header {
        display: grid !important;
        grid-template-columns: 420px 1fr 260px !important;
        min-height: 112px !important;
    }

    .act-scan-sheet .scan-body {
        display: grid !important;
        grid-template-columns: 1fr 285px !important;
        overflow: visible !important;
    }

    .act-scan-sheet .scan-main {
        display: grid !important;
        grid-template-rows: 122px 86px 305px 1fr !important;
    }

    .act-scan-sheet .scan-top-details {
        display: grid !important;
        grid-template-columns: 1.55fr 0.7fr 0.7fr !important;
    }

    .act-scan-sheet .scan-lower {
        display: grid !important;
        grid-template-columns: 0.92fr 0.68fr !important;
    }

    .act-scan-sheet .scan-iso-canvas.replica-iso {
        height: 540px !important;
        object-fit: fill !important;
        width: 100% !important;
    }

    .act-scan-sheet .scan-plan-column {
        grid-template-rows: 34px 540px 34px 1fr !important;
    }

    .act-scan-sheet .scan-footer {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        margin-top: 0 !important;
    }

    .act-scan-sheet .scan-footer section {
        grid-template-rows: 38px 62px 126px 1fr !important;
    }

    .act-scan-sheet .scan-table th,
    .act-scan-sheet .scan-table td {
        font-size: 15px !important;
        line-height: 1.12 !important;
    }

    .act-scan-sheet .install-table td {
        height: 34px !important;
    }

    .act-scan-sheet .parameters-table th,
    .act-scan-sheet .parameters-table td {
        height: 42px !important;
    }

    .act-scan-sheet .meter-table td {
        height: 56px !important;
    }

    .act-scan-sheet .supply-clone-table th,
    .act-scan-sheet .supply-clone-table td {
        height: 35px !important;
    }

    .act-scan-sheet .appliance-clone-table th,
    .act-scan-sheet .appliance-clone-table td {
        height: 34px !important;
    }

    .act-scan-sheet .scan-observations {
        height: 150px !important;
    }

    .act-scan-sheet .scan-plant-grid img {
        object-fit: fill !important;
    }

    .act-scan-sheet .scan-material-row span,
    .act-scan-sheet .scan-material-row i {
        min-height: 0 !important;
    }
}

/* Fixed high-fidelity delivery act. The 1315 x 1197 coordinate system matches
   the approved source document and prevents browser table reflow. */
@media print {
    @page {
        margin: 0;
        size: 348mm 317mm;
    }

    html,
    body,
    body.use-print-clone,
    body.use-print-clone .print-clone-root {
        height: 317mm !important;
        margin: 0 !important;
        min-height: 317mm !important;
        overflow: hidden !important;
        padding: 0 !important;
        width: 348mm !important;
    }

    body.use-print-clone .print-clone-root {
        align-items: flex-start !important;
        display: block !important;
    }

    .print-clone-root .act-image-sheet {
        border: 0 !important;
        box-shadow: none !important;
        display: block !important;
        height: 1197px !important;
        margin: 0 !important;
        overflow: hidden !important;
        page-break-after: avoid !important;
        page-break-before: avoid !important;
        page-break-inside: avoid !important;
        transform: none !important;
        width: 1315px !important;
    }

    .print-clone-root .act-image-bg {
        height: 1197px !important;
        width: 1315px !important;
    }

    .print-clone-root .act-blank-sheet.print-active {
        display: block !important;
    }
}

/* Mobile-first field technician experience */
.gas-module {
    font-size: 16px;
}

.gas-module .btn,
.gas-module .nav-item,
.gas-module .tool-button {
    min-height: 48px;
    font-size: 18px;
}

.gas-module input,
.gas-module select,
.gas-module textarea {
    min-height: 54px;
    font-size: 16px;
}

.gas-module .topbar h1,
.gas-module .module-head h2 {
    font-size: clamp(22px, 6vw, 28px);
}

.gas-menu-toggle,
.gas-menu-backdrop {
    display: none;
}

.gas-module .nav-item span {
    display: inline-flex;
    min-width: 28px;
}

@media (max-width: 900px) {
    .gas-module {
        background: #f7fbf5;
    }

    .gas-menu-toggle {
        align-items: center;
        background: #ffffff;
        border: 1px solid var(--line);
        border-radius: 16px;
        box-shadow: var(--shadow);
        color: var(--ink);
        display: inline-flex;
        font-size: 26px;
        height: 54px;
        justify-content: center;
        left: 14px;
        position: fixed;
        top: 12px;
        width: 58px;
        z-index: 80;
    }

    .gas-menu-backdrop {
        background: rgba(32, 33, 36, 0.36);
        display: block;
        inset: 0;
        opacity: 0;
        pointer-events: none;
        position: fixed;
        transition: opacity 180ms ease;
        z-index: 70;
    }

    .gas-menu-open .gas-menu-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    .gas-sidebar {
        align-items: stretch;
        border-radius: 0 22px 22px 0;
        border-right: 1px solid var(--line);
        bottom: 0;
        box-shadow: var(--shadow-hover);
        flex-direction: column;
        left: 0;
        max-width: 320px;
        padding: 20px;
        position: fixed;
        top: 0;
        transform: translateX(-106%);
        transition: transform 220ms ease;
        width: min(82vw, 320px);
        z-index: 90;
    }

    .gas-menu-open .gas-sidebar {
        transform: translateX(0);
    }

    .gas-sidebar .side-brand {
        margin-bottom: 18px;
    }

    .gas-sidebar nav {
        display: grid;
        gap: 10px;
    }

    .gas-sidebar .nav-item {
        justify-content: flex-start;
        padding: 0 16px;
        text-align: left;
    }

    .gas-workspace {
        margin-left: 0;
        padding: 84px 14px 18px;
    }

    .gas-workspace .topbar {
        margin-bottom: 18px;
    }

    .gas-workspace .topbar .eyebrow {
        display: block;
        margin-left: 72px;
    }

    .gas-workspace .topbar h1 {
        margin-left: 72px;
    }

    .gas-workspace .profile-chip {
        border-radius: 18px;
        justify-content: flex-start;
        min-width: 0;
        text-align: left;
    }

    .gas-workspace .module-head {
        align-items: stretch;
        gap: 12px;
    }

    .gas-workspace .module-head p {
        font-size: 16px;
        max-width: none;
    }

    .installation-card {
        border-radius: 18px;
        gap: 18px;
        padding: 18px;
    }

    .installation-card h2 {
        font-size: 22px;
    }

    .installation-card p,
    .installation-card dd {
        font-size: 16px;
    }

    .installation-card .btn {
        width: 100%;
    }

    .gas-field-grid,
    .evidence-upload,
    .act-card,
    .act-section {
        border-radius: 18px;
        padding: 16px;
    }

    .act-fields {
        grid-template-columns: 1fr;
    }

    .sticky-save-bar {
        bottom: 10px;
        display: grid;
        grid-template-columns: 1fr;
    }

    .sticky-save-bar .btn {
        width: 100%;
    }

    .act-digital-sheet {
        border-radius: 14px;
        font-size: 12px;
        overflow-x: auto;
        padding: 12px;
    }

    .act-digital-sheet header,
    .act-layout,
    .act-mini-grid,
    .act-mini-grid.three,
    .act-mini-grid.two,
    .act-digital-sheet footer {
        grid-template-columns: 1fr;
    }

    .act-digital-sheet h2 {
        font-size: 22px;
        text-align: left;
    }

    .iso-tool {
        border-radius: 18px;
        padding: 10px;
    }

    .iso-toolbar {
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: max-content;
        overflow-x: auto;
        padding-bottom: 4px;
        scroll-snap-type: x proximity;
    }

    .tool-button {
        min-width: 96px;
        scroll-snap-align: start;
    }

    .iso-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .autosave-status {
        grid-column: 1 / -1;
        min-height: 28px;
    }
}

.is-isometric-mode {
    overflow: hidden;
}

@media (max-width: 900px) {
    .is-isometric-mode .gas-menu-toggle,
    .is-isometric-mode .gas-sidebar,
    .is-isometric-mode .gas-menu-backdrop,
    .is-isometric-mode .topbar,
    .is-isometric-mode [data-view-panel="isometrico"] .module-head,
    .is-isometric-mode .iso-options {
        display: none;
    }

    .is-isometric-mode .gas-workspace {
        margin: 0;
        padding: 0;
    }

    .is-isometric-mode [data-view-panel="isometrico"] {
        display: block;
        height: 100vh;
        width: 100vw;
    }

    .is-isometric-mode .iso-tool {
        border: 0;
        border-radius: 0;
        display: block;
        height: 100vh;
        padding: 8px;
        position: relative;
    }

    .is-isometric-mode .iso-toolbar {
        background: rgba(255, 255, 255, 0.94);
        border: 1px solid var(--line);
        border-radius: 16px;
        padding: 8px;
    }

    .is-isometric-mode .tool-button {
        min-height: 44px;
        min-width: 86px;
        font-size: 16px;
    }

    .is-isometric-mode .iso-canvas {
        height: calc(100vh - 78px);
        min-height: 0;
        margin-top: 8px;
    }

    .is-isometric-mode .iso-actions {
        background: rgba(255, 255, 255, 0.94);
        border: 1px solid var(--line);
        border-radius: 16px;
        bottom: 8px;
        box-shadow: var(--shadow);
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        left: 8px;
        padding: 8px;
        position: fixed;
        right: 82px;
        z-index: 55;
    }

    .is-isometric-mode .iso-actions .btn {
        min-height: 44px;
        padding: 0 10px;
        font-size: 14px;
    }

    .is-isometric-mode .autosave-status {
        display: none;
    }

    .iso-floating-save {
        align-items: center;
        background: var(--green);
        border-radius: 999px;
        bottom: 82px;
        box-shadow: var(--shadow-hover);
        color: #ffffff;
        display: inline-flex;
        font-size: 28px;
        height: 62px;
        justify-content: center;
        position: fixed;
        right: 16px;
        width: 62px;
        z-index: 60;
    }
}

.iso-floating-save {
    display: none;
}

@media (max-width: 900px) {
    .is-isometric-mode .iso-floating-save {
        display: inline-flex;
    }
}

@media (orientation: portrait) and (max-width: 900px) {
    .is-isometric-mode::before {
        align-items: center;
        background: rgba(32, 33, 36, 0.86);
        color: #ffffff;
        content: "Gira el telefono para dibujar mas comodo";
        display: flex;
        font-size: 20px;
        font-weight: 800;
        inset: 0 0 auto 0;
        justify-content: center;
        min-height: 54px;
        padding: 10px 16px;
        position: fixed;
        text-align: center;
        z-index: 100;
    }

    .is-isometric-mode .iso-tool {
        padding-top: 64px;
    }
}
