:root {
    --bg: #f8fbf1;
    --surface: #ffffff;
    --ink: #17231c;
    --muted: #5f6d61;
    --line: #dfecca;
    --primary: #4f8f3a;
    --primary-dark: #356f35;
    --accent: #bfe35b;
    --accent-strong: #9fcd39;
    --accent-soft: #f0f9cf;
    --leaf-soft: #f2f8e8;
    --danger: #b42318;
    --shadow: 0 18px 42px rgba(74, 117, 51, .12);
}

[hidden] {
    display: none !important;
}

.technical-tools button[data-tool="wall"]::before { content: "M"; }
.technical-tools button[data-tool="door"]::before { content: "D"; }
.technical-tools button[data-tool="window"]::before { content: "V"; }
.technical-tools button[data-tool="room"]::before { content: "H"; }
.technical-tools button[data-tool="lot"]::before { content: "L"; }
.technical-tools button[data-tool="install-point"]::before { content: "I"; }
.technical-tools button[data-tool="kitchen"]::before { content: "C"; }
.technical-tools button[data-tool="bath"]::before { content: "B"; }
.technical-tools button[data-tool="living"]::before { content: "S"; }
.technical-tools button[data-tool="dining"]::before { content: "Co"; }
.technical-tools button[data-tool="bedroom"]::before { content: "H"; }

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
}

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

button, input, select, textarea {
    font: inherit;
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 280px 1fr;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 24px;
    background: #13251d;
    color: #fff;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    display: block;
    object-fit: cover;
    background: #fff;
    padding: 2px;
}

.brand small {
    display: block;
    margin-top: 4px;
    color: #bdd0c7;
}

.nav a {
    display: block;
    padding: 12px 14px;
    border-radius: 8px;
    background: rgba(255,255,255,.1);
}

.logout-form { margin-top: auto; }

.content {
    padding: 32px;
    overflow-x: hidden;
}

.auth-content {
    grid-column: 1 / -1;
}

.login-screen {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background: linear-gradient(135deg, #10241b 0%, #245b40 55%, #f0b84a 160%);
}

.login-panel {
    width: min(980px, 100%);
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 24px;
    align-items: stretch;
}

.login-copy {
    color: #fff;
    padding: 44px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-copy h1,
.page-header h1 {
    margin: 8px 0 0;
    font-size: clamp(32px, 4vw, 54px);
    line-height: 1.02;
}

.login-copy p {
    max-width: 520px;
    color: #dce9e2;
    font-size: 18px;
}

.eyebrow {
    color: var(--accent);
    text-transform: uppercase;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
}

.form-card,
.panel,
.table-section,
.work-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.form-card {
    padding: 28px;
    display: grid;
    gap: 16px;
}

label {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

input, select, textarea {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 11px 12px;
    background: #fff;
    color: var(--ink);
}

textarea {
    min-height: 92px;
    resize: vertical;
}

.primary-button,
.ghost-button {
    border: 0;
    border-radius: 8px;
    min-height: 44px;
    padding: 0 16px;
    cursor: pointer;
    font-weight: 800;
    display: inline-grid;
    place-items: center;
}

.primary-button {
    background: var(--primary);
    color: #fff;
}

.primary-button:hover { background: var(--primary-dark); }

.ghost-button {
    width: 100%;
    background: rgba(255,255,255,.12);
    color: #fff;
}

.muted { color: var(--muted); }

.page-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: end;
    margin-bottom: 24px;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.metrics-grid article {
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.metrics-grid strong {
    display: block;
    font-size: 34px;
}

.metrics-grid span {
    color: var(--muted);
}

.workspace-grid {
    display: grid;
    grid-template-columns: minmax(280px, .8fr) minmax(320px, 1.2fr);
    gap: 20px;
    align-items: start;
}

.panel {
    padding: 22px;
}

.panel h2,
.table-section h2,
.work-card h2 {
    margin: 0 0 16px;
    font-size: 20px;
}

.stack-form {
    display: grid;
    gap: 12px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.table-section {
    margin-top: 24px;
    overflow: hidden;
}

.section-title {
    padding: 18px 20px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    border-bottom: 1px solid var(--line);
}

.search {
    max-width: 280px;
}

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

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

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

th {
    color: var(--muted);
    font-size: 13px;
}

.badge {
    display: inline-flex;
    min-height: 28px;
    align-items: center;
    padding: 0 10px;
    border-radius: 999px;
    background: #e9f5ee;
    color: var(--primary-dark);
    font-weight: 800;
    font-size: 12px;
}

.table-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 8px 13px;
    border-radius: 999px;
    background: #2b6546;
    color: #fff;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 8px 20px rgba(43, 101, 70, 0.18);
}

.table-action:hover {
    background: #1f5036;
}

.cards-list {
    display: grid;
    gap: 16px;
}

.work-card {
    padding: 20px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
    gap: 18px;
}

.work-card p {
    color: var(--muted);
    margin: 8px 0;
}

.work-actions {
    display: grid;
    gap: 10px;
}

.alert {
    margin-bottom: 16px;
    padding: 13px 16px;
    border-radius: 8px;
    background: #eef8f2;
    border: 1px solid #bfe5cf;
}

.alert.error {
    background: #fff0ed;
    border-color: #ffcbc2;
    color: var(--danger);
}

.empty,
.empty-state {
    color: var(--muted);
}

.empty-state {
    min-height: 70vh;
    display: grid;
    place-content: center;
    text-align: center;
    gap: 12px;
}

@media (max-width: 980px) {
    .app-shell,
    .login-panel,
    .workspace-grid,
    .work-card {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        height: auto;
    }

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

@media (max-width: 640px) {
    .content,
    .login-copy,
    .form-card {
        padding: 20px;
    }

    .metrics-grid,
    .form-row {
        grid-template-columns: 1fr;
    }

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

    .search {
        max-width: none;
    }
}

/* Light lime corporate theme */
body {
    background:
        radial-gradient(circle at 10% 0%, rgba(202, 232, 94, .28), transparent 28rem),
        radial-gradient(circle at 90% 10%, rgba(112, 183, 76, .18), transparent 24rem),
        linear-gradient(135deg, #fbfff4 0%, #f0f8df 48%, #f8fbf1 100%);
}

.sidebar {
    background:
        linear-gradient(180deg, rgba(97, 154, 68, .96) 0%, rgba(75, 137, 62, .96) 54%, rgba(54, 111, 53, .98) 100%);
    box-shadow: 14px 0 34px rgba(75, 137, 62, .18);
}

.brand small,
.nav small {
    color: rgba(250, 255, 241, .82);
}

.nav a {
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .16);
    transition: transform .22s ease, background .22s ease, box-shadow .22s ease;
}

.nav a:hover,
.nav a.active {
    background: rgba(255, 255, 255, .24);
    box-shadow: 0 12px 26px rgba(35, 92, 44, .18);
    transform: translateX(2px);
}

.login-screen,
.auth-content {
    background:
        radial-gradient(circle at 18% 12%, rgba(208, 237, 100, .34), transparent 20rem),
        radial-gradient(circle at 82% 20%, rgba(99, 172, 76, .22), transparent 24rem),
        linear-gradient(135deg, #f9fff1 0%, #edf8d7 48%, #f7fbec 100%);
}

.dashboard-hero,
.dashboard-metrics article,
.admin-card,
.table-section,
.work-card,
.panel,
.form-card,
.record-item {
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .94) 0%, rgba(246, 252, 232, .9) 100%);
    border-color: rgba(151, 195, 87, .28);
    box-shadow:
        14px 14px 32px rgba(112, 152, 78, .14),
        -10px -10px 24px rgba(255, 255, 255, .86);
}

.dashboard-hero::before,
.table-section::before,
.admin-card::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(120deg, transparent 0%, rgba(198, 230, 91, .16) 45%, transparent 72%);
    opacity: 0;
    animation: limeSheen 7s ease-in-out infinite;
}

.dashboard-hero,
.table-section,
.admin-card {
    position: relative;
    overflow: hidden;
}

.dashboard-hero > *,
.table-section > *,
.admin-card > * {
    position: relative;
    z-index: 1;
}

.primary-button,
.admin-card .primary-button,
.table-section .primary-button,
.btn-lime,
.mobile-action-strip a,
.table-action {
    background: linear-gradient(135deg, #c9eb61 0%, #86c947 52%, #58a64c 100%);
    color: #16351d;
    border: 1px solid rgba(255, 255, 255, .38);
    box-shadow: 0 12px 26px rgba(115, 174, 67, .26);
    transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}

.primary-button:hover,
.admin-card .primary-button:hover,
.table-section .primary-button:hover,
.btn-lime:hover,
.mobile-action-strip a:hover,
.table-action:hover {
    background: linear-gradient(135deg, #d8f279 0%, #98d55a 50%, #65b55a 100%);
    box-shadow: 0 16px 32px rgba(115, 174, 67, .32);
    filter: saturate(1.04);
    transform: translateY(-1px);
}

.card-heading span,
.badge,
.metric-pill,
.status-dot {
    background: linear-gradient(135deg, #d7f36f, #8fce4f);
    color: #17351e;
    box-shadow: 0 10px 22px rgba(115, 174, 67, .22);
}

.eyebrow,
.dashboard-metrics strong,
.hero-copy h1,
.card-heading h2,
.table-section h2 {
    color: #2f6f34;
}

.mobile-action-strip a,
.search,
.admin-card input,
.admin-card select,
.admin-card textarea,
.inline-edit-form input,
.inline-edit-form select,
.inline-edit-form textarea,
input,
select,
textarea {
    border-color: rgba(151, 195, 87, .3);
    background: rgba(255, 255, 255, .84);
}

.admin-card input:focus,
.admin-card select:focus,
.admin-card textarea:focus,
.inline-edit-form input:focus,
.inline-edit-form select:focus,
.inline-edit-form textarea:focus,
.search:focus,
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: rgba(128, 190, 68, .74);
    box-shadow:
        0 0 0 4px rgba(199, 230, 91, .24),
        inset 2px 2px 5px rgba(103, 146, 73, .08);
}

.edit-row td {
    background: linear-gradient(135deg, rgba(246, 252, 232, .9), rgba(255, 255, 255, .88));
}

body.crud-modal-active {
    overflow: hidden;
}

.edit-row.modal-open {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: grid !important;
    place-items: center;
    padding: 18px;
    background: rgba(32, 58, 28, .36);
    backdrop-filter: blur(10px);
}

.edit-row.modal-open td {
    display: block;
    width: min(980px, 96vw);
    max-height: 88vh;
    overflow: auto;
    border-radius: 22px;
    background:
        linear-gradient(145deg, rgba(255,255,255,.98), rgba(243, 251, 223, .98)) !important;
    box-shadow: 0 28px 70px rgba(62, 108, 48, .28);
}

.modal-close {
    float: right;
    margin: 0 0 12px 12px;
    border: 0;
    border-radius: 999px;
    padding: 9px 15px;
    background: linear-gradient(135deg, #eef9c8, #c3ec68);
    color: #17351e;
    font-weight: 900;
    cursor: pointer;
}

.danger-button {
    min-height: 42px;
    border: 0;
    border-radius: 999px;
    padding: 0 16px;
    background: linear-gradient(135deg, #ffe1dd, #f06d5f) !important;
    color: #64190f !important;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(202, 74, 58, .18);
}

.modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.modal-actions form {
    margin: 0;
}

table th {
    color: #2f6f34;
}

table tbody tr {
    transition: background .2s ease, transform .2s ease;
}

table tbody tr:not(.edit-row):hover {
    background: rgba(241, 249, 220, .72);
}

.brand-mark,
.dashboard-logo,
.access-logo,
.panel-logo {
    box-shadow:
        0 12px 28px rgba(126, 178, 73, .18),
        0 0 0 4px rgba(210, 239, 105, .2);
}

@keyframes limeSheen {
    0%, 72%, 100% {
        opacity: 0;
        transform: translateX(-18%);
    }
    42% {
        opacity: 1;
        transform: translateX(18%);
    }
}

@media (prefers-reduced-motion: reduce) {
    .dashboard-hero::before,
    .table-section::before,
    .admin-card::before {
        animation: none;
    }

    .primary-button,
    .btn-lime,
    .table-action,
    .nav a {
        transition: none;
    }
}

/* Layout interno separado y estilo app */
body:has(.content) {
    background: #f2f5ef;
}

.app-shell:has(.content) {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    min-height: 100vh;
    transition: grid-template-columns .24s ease;
}

body.sidebar-collapsed .app-shell:has(.content) {
    grid-template-columns: 82px minmax(0, 1fr);
}

.sidebar {
    position: sticky;
    top: 0;
    z-index: 20;
    width: auto;
}

.sidebar-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.brand-text,
.nav em,
.logout-form .ghost-button {
    transition: opacity .18s ease, width .18s ease;
}

.sidebar-toggle {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
}

body.sidebar-collapsed .sidebar-toggle {
    transform: rotate(180deg);
}

body.sidebar-collapsed .brand {
    justify-content: center;
}

body.sidebar-collapsed .brand-text,
body.sidebar-collapsed .nav em {
    width: 0;
    opacity: 0;
    overflow: hidden;
    white-space: nowrap;
}

body.sidebar-collapsed .sidebar {
    padding-left: 14px;
    padding-right: 14px;
}

body.sidebar-collapsed .sidebar-top {
    justify-content: center;
}

body.sidebar-collapsed .sidebar-toggle {
    position: absolute;
    right: -16px;
    top: 22px;
    background: #245b3c;
    box-shadow: 0 8px 18px rgba(0, 0, 0, .18);
}

.nav {
    display: grid;
    gap: 10px;
}

.nav a {
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
}

.nav a span {
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: rgba(255, 255, 255, .1);
}

.nav svg,
.module-card svg,
.mobile-tabbar svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.nav a.active span {
    background: rgba(168, 199, 67, .22);
    color: #dcefa2;
}

.nav a em {
    font-style: normal;
}

body.sidebar-collapsed .nav a {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
}

body.sidebar-collapsed .logout-form .ghost-button {
    font-size: 0;
    padding: 0;
}

body.sidebar-collapsed .logout-form .ghost-button::before {
    content: "×";
    font-size: 24px;
}

.content {
    min-width: 0;
    width: 100%;
    padding: clamp(16px, 2.6vw, 30px);
}

.module-launcher {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.module-card {
    min-height: 180px;
    padding: 20px;
    border-radius: 18px;
    background: #eef3e9;
    border: 1px solid rgba(81, 103, 76, .14);
    box-shadow:
        14px 14px 30px rgba(81, 103, 76, .16),
        -10px -10px 24px rgba(255, 255, 255, .88);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #17231c;
}

.module-card span {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #245b3c;
    color: #fff;
    font-weight: 900;
}

.module-card svg {
    width: 23px;
    height: 23px;
}

.module-card strong {
    margin-top: 18px;
    font-size: 22px;
}

.module-card small {
    color: #667268;
    line-height: 1.45;
}

.module-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.module-header > a {
    min-width: 78px;
    min-height: 40px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: #eef3e9;
    color: #245b3c;
    font-weight: 900;
    border: 1px solid rgba(81, 103, 76, .14);
    box-shadow:
        8px 8px 18px rgba(81, 103, 76, .14),
        -7px -7px 16px rgba(255, 255, 255, .86);
}

.module-header h1 {
    margin: 4px 0 0;
    color: #17231c;
    font-size: clamp(30px, 4vw, 44px);
}

.single-module {
    display: grid;
    grid-template-columns: minmax(320px, 480px) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.single-module > .table-section:only-child {
    grid-column: 1 / -1;
    width: 100%;
}

.mobile-tabbar {
    display: none;
}

@media (max-width: 1120px) {
    .module-launcher {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

@media (max-width: 760px) {
    .app-shell:has(.content),
    body.sidebar-collapsed .app-shell:has(.content) {
        display: block;
        padding-bottom: 76px;
    }

    .sidebar {
        position: sticky;
        top: 0;
        height: auto;
        padding: 12px 14px;
        border-radius: 0 0 22px 22px;
    }

    .sidebar-toggle,
    .sidebar .nav,
    .sidebar .logout-form {
        display: none;
    }

    .brand-mark {
        width: 40px;
        height: 40px;
    }

    .content {
        padding: 12px;
    }

    .dashboard-hero {
        margin-top: 12px;
    }

    .module-launcher {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .module-card {
        min-height: 118px;
        padding: 18px;
        display: grid;
        grid-template-columns: 48px 1fr;
        align-items: center;
        column-gap: 14px;
    }

    .module-card strong {
        margin-top: 0;
        font-size: 20px;
    }

    .module-card small {
        grid-column: 2;
    }

    .dashboard-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .dashboard-metrics article {
        padding: 15px;
    }

    .module-header {
        margin-top: 12px;
    }

    .single-module {
        gap: 14px;
    }

    .mobile-tabbar {
        position: fixed;
        left: 10px;
        right: 10px;
        bottom: 10px;
        z-index: 40;
        display: flex;
        gap: 6px;
        padding: 8px;
        border-radius: 22px;
        background: rgba(238, 243, 233, .95);
        border: 1px solid rgba(81, 103, 76, .16);
        box-shadow: 0 18px 42px rgba(23, 61, 42, .2);
        backdrop-filter: blur(12px);
        overflow-x: auto;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .mobile-tabbar::-webkit-scrollbar {
        display: none;
    }

    .mobile-tabbar a {
        flex: 0 0 72px;
        min-height: 48px;
        display: grid;
        place-items: center;
        gap: 2px;
        border-radius: 16px;
        color: #667268;
        font-weight: 900;
    }

    .mobile-logout {
        flex: 0 0 72px;
        margin: 0;
    }

    .mobile-logout button {
        width: 100%;
        min-height: 48px;
        border: 0;
        display: grid;
        place-items: center;
        gap: 2px;
        border-radius: 16px;
        background: transparent;
        color: #667268;
        font: inherit;
        font-weight: 900;
        cursor: pointer;
    }

    .mobile-tabbar a.active {
        background: #245b3c;
        color: #fff;
    }

    .mobile-tabbar span,
    .mobile-logout span {
        width: 22px;
        height: 22px;
        display: grid;
        place-items: center;
    }

    .mobile-tabbar small,
    .mobile-logout small {
        font-size: 10px;
    }
}

/* Mejoras exclusivas para escritorio */
@media (min-width: 761px) {
    .content {
        padding: 24px 32px 36px;
    }

    .alert {
        position: sticky;
        top: 16px;
        z-index: 35;
        width: min(560px, 100%);
        margin: 0 0 18px auto;
        box-shadow: 0 16px 34px rgba(23, 61, 42, .14);
    }

    .single-module {
        grid-template-columns: minmax(380px, 500px) minmax(520px, 1fr);
        gap: 24px;
        max-width: 1440px;
        margin: 0 auto;
    }

    .single-module > .admin-card {
        position: sticky;
        top: 24px;
        max-height: calc(100vh - 48px);
        overflow: auto;
        scrollbar-width: thin;
    }

    .single-module > .table-section {
        min-width: 0;
        max-height: calc(100vh - 48px);
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }

    .single-module > .table-section .compact-list,
    .single-module > .table-section .table-wrap {
        overflow: auto;
    }

    .single-module > .table-section .compact-list {
        max-height: calc(100vh - 130px);
    }

    .table-section .table-wrap {
        flex: 1;
    }

    table {
        min-width: 920px;
    }

    th,
    td {
        white-space: nowrap;
    }

    td:nth-child(1),
    td:nth-child(2),
    td:nth-child(3) {
        white-space: normal;
        min-width: 170px;
    }

    .records-grid,
    .module-launcher,
    .dashboard-metrics,
    .home-summary,
    .dashboard-hero {
        max-width: 1440px;
        margin-left: auto;
        margin-right: auto;
    }

    .module-launcher {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }

    .dashboard-metrics {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }

    .module-card {
        min-height: 170px;
    }
}

@media (min-width: 1280px) {
    .single-module {
        grid-template-columns: minmax(420px, 540px) minmax(680px, 1fr);
    }

    .content {
        padding-left: 40px;
        padding-right: 40px;
    }
}

/* Flujo de campo del instalador */
.order-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
}

.order-card {
    display: grid;
    gap: 9px;
    padding: 18px;
    border-radius: 18px;
    background: #eef3e9;
    border: 1px solid rgba(81, 103, 76, .14);
    box-shadow:
        14px 14px 30px rgba(81, 103, 76, .16),
        -10px -10px 24px rgba(255, 255, 255, .88);
}

.order-topline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    color: #667268;
    font-size: 13px;
    font-weight: 800;
}

.order-card h2 {
    margin: 0;
    color: #17231c;
    font-size: 22px;
}

.order-card p {
    margin: 0;
    color: #4f5f54;
    line-height: 1.45;
}

.order-card small {
    color: #667268;
    line-height: 1.4;
}

.order-client-card {
    margin-bottom: 16px;
}

.field-report-form {
    display: grid;
    gap: 16px;
    padding-bottom: 86px;
}

.field-section {
    padding: 18px;
    border-radius: 18px;
    background: #eef3e9;
    border: 1px solid rgba(81, 103, 76, .14);
    box-shadow:
        14px 14px 30px rgba(81, 103, 76, .16),
        -10px -10px 24px rgba(255, 255, 255, .88);
    display: grid;
    gap: 12px;
}

.field-section h2 {
    margin: 0 0 2px;
    color: #17231c;
    font-size: 20px;
}

.field-section input,
.field-section select,
.field-section textarea {
    border: 1px solid rgba(81, 103, 76, .2);
    border-radius: 14px;
    background: rgba(255, 255, 255, .78);
    box-shadow:
        inset 3px 3px 7px rgba(81, 103, 76, .1),
        inset -3px -3px 7px rgba(255, 255, 255, .78);
}

.google-field {
    display: grid;
    gap: 8px;
    align-content: start;
    padding: 12px;
    border: 1px solid #e0edce;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(73, 111, 54, .07);
}

.google-field span {
    color: #28442b;
    font-size: 12px;
    font-weight: 900;
    line-height: 1.25;
}

.google-field input,
.google-field select,
.google-field textarea {
    width: 100%;
    min-height: 44px;
    padding: 10px 11px;
    border-color: #d4e4c2;
    border-radius: 12px;
    background: #fbfdf7;
    box-shadow: none;
}

.google-field input::placeholder,
.google-field textarea::placeholder {
    color: #a1ad9a;
}

.google-field input:focus,
.google-field select:focus,
.google-field textarea:focus {
    border-color: #9ed55b;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(184, 229, 93, .2);
}

.google-field-wide {
    grid-column: 1 / -1;
}

.materials-rows {
    display: grid;
    gap: 10px;
}

.material-row {
    display: grid;
    grid-template-columns: 1fr 110px 90px;
    gap: 10px;
}

.checkline {
    min-height: 46px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .58);
    color: #435146;
    font-weight: 800;
}

.checkline input {
    width: 20px;
    height: 20px;
    min-height: 20px;
}

.upload-field {
    min-height: 58px;
    display: grid;
    gap: 6px;
    padding: 11px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .64);
    border: 1px solid rgba(81, 103, 76, .16);
    color: #435146;
    font-weight: 900;
}

.upload-field input {
    min-height: auto;
    padding: 0;
    border: 0;
    box-shadow: none;
    background: transparent;
    font-size: 12px;
}

.print-act-button {
    min-height: 40px;
    display: inline-grid;
    place-items: center;
    padding: 0 16px;
    border-radius: 999px;
    background: #245b3c;
    color: #fff;
    font-weight: 900;
    box-shadow: 0 10px 22px rgba(36, 91, 60, .22);
    white-space: nowrap;
}

.print-act-button.secondary-print {
    background: #ffffff;
    color: #245b3c;
    border: 1px solid rgba(36, 91, 60, .2);
}

.drawing-board-wrap,
.signature-box {
    display: grid;
    gap: 8px;
}

.drawing-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #173d2a;
}

.drawing-toolbar button {
    min-height: 34px;
    border: 0;
    border-radius: 999px;
    padding: 0 12px;
    background: rgba(36, 91, 60, .12);
    color: #173d2a;
    font-weight: 900;
    cursor: pointer;
}

[data-finish-drawing] {
    display: none;
}

[data-undo-drawing],
[data-redo-drawing],
[data-rotate-iso],
[data-scale-iso] {
    display: none;
}

.technical-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px;
    border: 1px solid rgba(36, 91, 60, .14);
    border-radius: 14px;
    background: rgba(247, 251, 242, .78);
}

.technical-tools summary {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 14px;
    border-radius: 999px;
    background: #245b3c;
    color: #fff;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
    list-style: none;
}

.technical-tools summary::-webkit-details-marker {
    display: none;
}

.technical-tools summary::after {
    content: "v";
    font-size: 13px;
    line-height: 1;
}

.technical-tools button {
    min-height: 36px;
    border: 0;
    border-radius: 999px;
    padding: 0 12px;
    background: #edf4e5;
    color: #244233;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.technical-tools button::before {
    content: "";
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    background: #fff;
    color: #245b3c;
    border: 1px solid rgba(36, 91, 60, .22);
    font-size: 15px;
    font-weight: 900;
    line-height: 1;
}

.technical-tools button[data-tool="free"]::before { content: "✎"; }
.technical-tools button[data-tool="pipe"]::before { content: "━"; }
.technical-tools button[data-tool="pipe-hidden"]::before { content: "┄"; }
.technical-tools button[data-tool="pipe-wall"]::before { content: "╍"; }
.technical-tools button[data-tool="point"]::before { content: "●"; }
.technical-tools button[data-tool="elbow"]::before { content: "┗"; }
.technical-tools button[data-tool="tee"]::before { content: "┻"; }
.technical-tools button[data-tool="valve"]::before,
.technical-tools button[data-tool="meter"]::before,
.technical-tools button[data-tool="regulator"]::before,
.technical-tools button[data-tool="stove"]::before,
.technical-tools button[data-tool="stove2"]::before,
.technical-tools button[data-tool="stove3"]::before,
.technical-tools button[data-tool="stove4"]::before,
.technical-tools button[data-tool="oven"]::before,
.technical-tools button[data-tool="heater"]::before,
.technical-tools button[data-tool="center"]::before,
.technical-tools button[data-tool="center-reverse"]::before {
    content: "";
    width: 30px;
    height: 30px;
    border-radius: 10px;
    border: 2px solid #102619;
    background-color: #ffd338;
    color: #102619;
    box-shadow: inset 0 -3px 0 rgba(16, 38, 25, .16), 0 2px 7px rgba(6, 29, 19, .18);
}

.technical-tools button[data-tool="valve"]::before {
    border-radius: 50%;
    background:
        linear-gradient(90deg, transparent 0 14%, #102619 14% 21%, transparent 21% 79%, #102619 79% 86%, transparent 86%),
        conic-gradient(from 45deg, transparent 0 12.5%, #ffd338 12.5% 37.5%, transparent 37.5% 62.5%, #ffd338 62.5% 87.5%, transparent 87.5%),
        linear-gradient(#ffd338, #f2b705);
}

.technical-tools button[data-tool="meter"]::before {
    border-radius: 50%;
    background:
        radial-gradient(circle at 50% 50%, #ffffff 0 21%, transparent 22%),
        radial-gradient(circle at 50% 50%, transparent 0 37%, #102619 38% 45%, transparent 46%),
        linear-gradient(#ffd338, #f2b705);
}

.technical-tools button[data-tool="regulator"]::before {
    border-radius: 12px;
    background:
        linear-gradient(90deg, #102619 0 12%, transparent 12% 88%, #102619 88% 100%),
        radial-gradient(circle at 50% 50%, #ffffff 0 18%, transparent 19%),
        linear-gradient(#ffd338, #f2b705);
}

.technical-tools button[data-tool="stove"]::before,
.technical-tools button[data-tool="stove4"]::before {
    background:
        radial-gradient(circle at 32% 32%, transparent 0 3px, #102619 3.5px 5px, transparent 5.5px),
        radial-gradient(circle at 68% 32%, transparent 0 3px, #102619 3.5px 5px, transparent 5.5px),
        radial-gradient(circle at 32% 68%, transparent 0 3px, #102619 3.5px 5px, transparent 5.5px),
        radial-gradient(circle at 68% 68%, transparent 0 3px, #102619 3.5px 5px, transparent 5.5px),
        linear-gradient(#ffd338, #f2b705);
}

.technical-tools button[data-tool="stove2"]::before {
    background:
        radial-gradient(circle at 35% 42%, transparent 0 3.5px, #102619 4px 5.5px, transparent 6px),
        radial-gradient(circle at 65% 58%, transparent 0 3.5px, #102619 4px 5.5px, transparent 6px),
        linear-gradient(#ffd338, #f2b705);
}

.technical-tools button[data-tool="stove3"]::before {
    background:
        radial-gradient(circle at 32% 35%, transparent 0 3px, #102619 3.5px 5px, transparent 5.5px),
        radial-gradient(circle at 68% 35%, transparent 0 3px, #102619 3.5px 5px, transparent 5.5px),
        radial-gradient(circle at 50% 68%, transparent 0 3px, #102619 3.5px 5px, transparent 5.5px),
        linear-gradient(#ffd338, #f2b705);
}

.technical-tools button[data-tool="oven"]::before {
    background:
        linear-gradient(#102619, #102619) 25% 28% / 50% 2px no-repeat,
        linear-gradient(#102619, #102619) 25% 50% / 50% 2px no-repeat,
        linear-gradient(#fff8c4, #fff8c4) 50% 66% / 56% 28% no-repeat,
        linear-gradient(#ffd338, #f2b705);
}

.technical-tools button[data-tool="heater"]::before {
    border-radius: 13px;
    background:
        repeating-linear-gradient(90deg, transparent 0 4px, #102619 4px 5px, transparent 5px 8px) 50% 22% / 56% 8px no-repeat,
        radial-gradient(circle at 50% 50%, #fff8c4 0 16%, transparent 17%),
        linear-gradient(#ffd338, #f2b705);
}

.technical-tools button[data-tool="center"]::before {
    content: "";
    display: inline-grid;
    place-items: center;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background:
        url("data:image/svg+xml,%3Csvg viewBox='0 0 64 64' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23102619' stroke-width='7.5' stroke-linecap='square' stroke-linejoin='round'%3E%3Cpath d='M17 30 45 15v23'/%3E%3Cpath d='M12 27v23M52 10v28M12 27 52 10'/%3E%3Cellipse cx='30' cy='43' rx='18' ry='11' transform='rotate(-27 30 43)'/%3E%3C/g%3E%3C/svg%3E") center / 29px 29px no-repeat;
}

.technical-tools button[data-tool="center-reverse"]::before {
    content: "";
    display: inline-grid;
    place-items: center;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background:
        url("data:image/svg+xml,%3Csvg viewBox='0 0 64 64' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23102619' stroke-width='7.5' stroke-linecap='square' stroke-linejoin='round' transform='translate(64 0) scale(-1 1)'%3E%3Cpath d='M17 30 45 15v23'/%3E%3Cpath d='M12 27v23M52 10v28M12 27 52 10'/%3E%3Cellipse cx='30' cy='43' rx='18' ry='11' transform='rotate(-27 30 43)'/%3E%3C/g%3E%3C/svg%3E") center / 29px 29px no-repeat;
}

.technical-board.isometric-editor-active.drawing-active .technical-tools button[data-tool="valve"]::before,
.technical-board.isometric-editor-active.drawing-active .technical-tools button[data-tool="meter"]::before,
.technical-board.isometric-editor-active.drawing-active .technical-tools button[data-tool="regulator"]::before,
.technical-board.isometric-editor-active.drawing-active .technical-tools button[data-tool="stove"]::before,
.technical-board.isometric-editor-active.drawing-active .technical-tools button[data-tool="stove2"]::before,
.technical-board.isometric-editor-active.drawing-active .technical-tools button[data-tool="stove3"]::before,
.technical-board.isometric-editor-active.drawing-active .technical-tools button[data-tool="stove4"]::before,
.technical-board.isometric-editor-active.drawing-active .technical-tools button[data-tool="oven"]::before,
.technical-board.isometric-editor-active.drawing-active .technical-tools button[data-tool="heater"]::before,
.technical-board.isometric-editor-active.drawing-active .technical-tools button[data-tool="center"]::before,
.technical-board.isometric-editor-active.drawing-active .technical-tools button[data-tool="center-reverse"]::before {
    width: 30px;
    height: 30px;
    border: 2px solid #102619;
    color: #102619;
    opacity: 1;
}

.technical-board.isometric-editor-active.drawing-active .technical-tools button[data-tool="valve"]::before {
    border-radius: 50%;
    background:
        linear-gradient(90deg, transparent 0 14%, #102619 14% 21%, transparent 21% 79%, #102619 79% 86%, transparent 86%),
        conic-gradient(from 45deg, transparent 0 12.5%, #ffd338 12.5% 37.5%, transparent 37.5% 62.5%, #ffd338 62.5% 87.5%, transparent 87.5%),
        linear-gradient(#ffd338, #f2b705);
}

.technical-board.isometric-editor-active.drawing-active .technical-tools button[data-tool="meter"]::before {
    border-radius: 50%;
    background:
        radial-gradient(circle at 50% 50%, #ffffff 0 21%, transparent 22%),
        radial-gradient(circle at 50% 50%, transparent 0 37%, #102619 38% 45%, transparent 46%),
        linear-gradient(#ffd338, #f2b705);
}

.technical-board.isometric-editor-active.drawing-active .technical-tools button[data-tool="regulator"]::before {
    border-radius: 12px;
    background:
        linear-gradient(90deg, #102619 0 12%, transparent 12% 88%, #102619 88% 100%),
        radial-gradient(circle at 50% 50%, #ffffff 0 18%, transparent 19%),
        linear-gradient(#ffd338, #f2b705);
}

.technical-board.isometric-editor-active.drawing-active .technical-tools button[data-tool="stove"]::before,
.technical-board.isometric-editor-active.drawing-active .technical-tools button[data-tool="stove4"]::before {
    background:
        radial-gradient(circle at 32% 32%, transparent 0 3px, #102619 3.5px 5px, transparent 5.5px),
        radial-gradient(circle at 68% 32%, transparent 0 3px, #102619 3.5px 5px, transparent 5.5px),
        radial-gradient(circle at 32% 68%, transparent 0 3px, #102619 3.5px 5px, transparent 5.5px),
        radial-gradient(circle at 68% 68%, transparent 0 3px, #102619 3.5px 5px, transparent 5.5px),
        linear-gradient(#ffd338, #f2b705);
}

.technical-board.isometric-editor-active.drawing-active .technical-tools button[data-tool="stove2"]::before {
    background:
        radial-gradient(circle at 35% 42%, transparent 0 3.5px, #102619 4px 5.5px, transparent 6px),
        radial-gradient(circle at 65% 58%, transparent 0 3.5px, #102619 4px 5.5px, transparent 6px),
        linear-gradient(#ffd338, #f2b705);
}

.technical-board.isometric-editor-active.drawing-active .technical-tools button[data-tool="stove3"]::before {
    background:
        radial-gradient(circle at 32% 35%, transparent 0 3px, #102619 3.5px 5px, transparent 5.5px),
        radial-gradient(circle at 68% 35%, transparent 0 3px, #102619 3.5px 5px, transparent 5.5px),
        radial-gradient(circle at 50% 68%, transparent 0 3px, #102619 3.5px 5px, transparent 5.5px),
        linear-gradient(#ffd338, #f2b705);
}

.technical-board.isometric-editor-active.drawing-active .technical-tools button[data-tool="oven"]::before {
    background:
        linear-gradient(#102619, #102619) 25% 28% / 50% 2px no-repeat,
        linear-gradient(#102619, #102619) 25% 50% / 50% 2px no-repeat,
        linear-gradient(#fff8c4, #fff8c4) 50% 66% / 56% 28% no-repeat,
        linear-gradient(#ffd338, #f2b705);
}

.technical-board.isometric-editor-active.drawing-active .technical-tools button[data-tool="heater"]::before {
    border-radius: 13px;
    background:
        repeating-linear-gradient(90deg, transparent 0 4px, #102619 4px 5px, transparent 5px 8px) 50% 22% / 56% 8px no-repeat,
        radial-gradient(circle at 50% 50%, #fff8c4 0 16%, transparent 17%),
        linear-gradient(#ffd338, #f2b705);
}

.technical-board.isometric-editor-active.drawing-active .technical-tools button[data-tool="center"]::before {
    content: "";
    display: inline-grid;
    place-items: center;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background:
        url("data:image/svg+xml,%3Csvg viewBox='0 0 64 64' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23eef7fb' stroke-width='7.5' stroke-linecap='square' stroke-linejoin='round'%3E%3Cpath d='M17 30 45 15v23'/%3E%3Cpath d='M12 27v23M52 10v28M12 27 52 10'/%3E%3Cellipse cx='30' cy='43' rx='18' ry='11' transform='rotate(-27 30 43)'/%3E%3C/g%3E%3C/svg%3E") center / 29px 29px no-repeat;
}

.technical-board.isometric-editor-active.drawing-active .technical-tools button[data-tool="center-reverse"]::before {
    content: "";
    display: inline-grid;
    place-items: center;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background:
        url("data:image/svg+xml,%3Csvg viewBox='0 0 64 64' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23eef7fb' stroke-width='7.5' stroke-linecap='square' stroke-linejoin='round' transform='translate(64 0) scale(-1 1)'%3E%3Cpath d='M17 30 45 15v23'/%3E%3Cpath d='M12 27v23M52 10v28M12 27 52 10'/%3E%3Cellipse cx='30' cy='43' rx='18' ry='11' transform='rotate(-27 30 43)'/%3E%3C/g%3E%3C/svg%3E") center / 29px 29px no-repeat;
}

.technical-tools button.active::before,
.technical-tools button:focus-visible::before {
    background: #a8c743;
    color: #102619;
    border-color: rgba(255, 255, 255, .55);
}

.technical-tools button.active,
.technical-tools button:focus-visible {
    background: #245b3c;
    color: #fff;
    outline: none;
}

.technical-board.drawing-active {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: block;
    padding: max(10px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
    background: #f7fbf2;
    outline: 0;
    overflow: hidden;
}

.pipe-meta-open {
    overflow: hidden;
}

.pipe-meta-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: grid;
    place-items: center;
    padding: 12px;
    background: rgba(7, 28, 21, .52);
    backdrop-filter: blur(9px);
}

.pipe-meta-dialog {
    width: min(392px, 94vw);
    max-height: min(88dvh, 620px);
    overflow: auto;
    border: 1px solid rgba(184, 219, 74, .55);
    border-radius: 20px;
    background:
        linear-gradient(180deg, rgba(247, 255, 229, .98), rgba(255, 255, 255, .98));
    box-shadow: 0 24px 70px rgba(7, 28, 21, .34);
    padding: 14px;
    color: #102619;
}

.pipe-meta-head {
    margin-bottom: 10px;
    padding: 12px;
    border-radius: 16px;
    background: linear-gradient(135deg, #d9ff68, #8ccf43);
    box-shadow: inset 0 -2px 0 rgba(16, 38, 25, .12);
}

.pipe-meta-head span,
.pipe-meta-label,
.pipe-meta-meters span {
    display: block;
    color: #3e5b30;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.pipe-meta-head strong {
    display: block;
    margin-top: 4px;
    font-size: 20px;
    line-height: 1;
}

.pipe-stepper {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-top: 10px;
}

.pipe-stepper span {
    min-height: 26px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, .56);
    color: #4d6544;
    font-weight: 1000;
    box-shadow: inset 0 0 0 1px rgba(16, 38, 25, .08);
}

.pipe-stepper span.active,
.pipe-stepper span.done {
    background: #102619;
    color: #d9ff68;
}

.pipe-step {
    display: none;
    min-height: 155px;
    animation: pipeStepIn .18s ease;
}

.pipe-step.active {
    display: block;
}

@keyframes pipeStepIn {
    from { opacity: 0; transform: translateY(7px); }
    to { opacity: 1; transform: translateY(0); }
}

.pipe-meta-meters {
    display: grid;
    gap: 8px;
    margin-bottom: 14px;
}

.pipe-meta-meters strong {
    display: block;
    font-size: 20px;
    line-height: 1.15;
}

.pipe-meta-meters input {
    width: 100%;
    min-height: 46px;
    border: 1px solid #cfe2bf;
    border-radius: 14px;
    padding: 0 15px;
    background: #fff;
    color: #102619;
    font-size: 20px;
    font-weight: 900;
    outline: none;
    box-shadow: inset 0 2px 8px rgba(36, 91, 60, .08);
}

.pipe-meta-dialog.needs-value .pipe-meta-meters input {
    border-color: #dc2626;
    box-shadow: 0 0 0 4px rgba(220, 38, 38, .1);
}

.pipe-custom-size {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.pipe-custom-size[hidden] {
    display: none;
}

.pipe-custom-size span {
    color: #3e5b30;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.pipe-custom-size input {
    width: 100%;
    min-height: 46px;
    border: 1px solid #cfe2bf;
    border-radius: 14px;
    padding: 0 15px;
    background: #fff;
    color: #102619;
    font-size: 18px;
    font-weight: 900;
    outline: none;
    box-shadow: inset 0 2px 8px rgba(36, 91, 60, .08);
}

.pipe-meta-dialog.needs-size .pipe-custom-size input {
    border-color: #dc2626;
    box-shadow: 0 0 0 4px rgba(220, 38, 38, .1);
}

.pipe-meta-label {
    margin: 14px 0 8px;
}

.pipe-family-options,
.pipe-size-options,
.pipe-meta-actions {
    display: grid;
    gap: 8px;
}

.pipe-family-options {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pipe-size-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pipe-family-options button,
.pipe-size-options button,
.pipe-meta-actions button {
    min-height: 44px;
    border: 1px solid #d7e8c8;
    border-radius: 14px;
    background: #ffffff;
    color: #244233;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(36, 91, 60, .08);
}

.pipe-family-options button.active,
.pipe-size-options button.active {
    border-color: #7fc83d;
    background: linear-gradient(135deg, #d9ff68, #8ccf43);
    color: #102619;
    box-shadow: 0 12px 26px rgba(127, 200, 61, .28);
}

.pipe-size-options button {
    display: grid;
    place-items: center;
    gap: 2px;
    padding: 8px;
}

.pipe-size-options strong {
    font-size: 17px;
}

.pipe-size-options span {
    font-size: 11px;
    color: #4d6544;
}

.pipe-meta-actions {
    grid-template-columns: .9fr .9fr 1.25fr;
    margin-top: 12px;
}

.pipe-meta-dialog[data-step="1"] .pipe-meta-actions {
    grid-template-columns: 1fr 1.2fr;
}

.pipe-meta-dialog[data-step="2"] .pipe-meta-actions,
.pipe-meta-dialog[data-step="3"] .pipe-meta-actions {
    grid-template-columns: .9fr .95fr 1.15fr;
}

.pipe-meta-actions button[hidden] {
    display: none;
}

.pipe-meta-actions .pipe-cancel {
    background: #ffffff;
}

.pipe-meta-actions .pipe-next,
.pipe-meta-actions .pipe-ok {
    border-color: #78bd37;
    background: #9edb4d;
    color: #102619;
}

.pipe-meta-actions .pipe-back {
    background: #f5faeb;
}

.iso-line-tooltip {
    position: absolute;
    z-index: 12;
    max-width: min(260px, calc(100vw - 32px));
    padding: 8px 11px;
    border: 1px solid rgba(217, 255, 104, .45);
    border-radius: 13px;
    background: rgba(13, 39, 57, .94);
    color: #f7ffe7;
    font-size: 13px;
    font-weight: 900;
    line-height: 1.2;
    pointer-events: none;
    box-shadow: 0 14px 32px rgba(6, 29, 19, .25);
    transform: translate(-50%, -100%);
    white-space: nowrap;
}

@media (max-width: 420px) {
    .pipe-family-options {
        grid-template-columns: 1fr;
    }
}

.technical-board.drawing-active [data-start-drawing] {
    display: none;
}

.technical-board.drawing-active [data-finish-drawing] {
    display: inline-flex;
    align-items: center;
    background: #245b3c;
    color: #fff;
}

.technical-board.drawing-active [data-undo-drawing],
.technical-board.drawing-active [data-redo-drawing],
.technical-board.drawing-active [data-rotate-iso],
.technical-board.drawing-active [data-scale-iso] {
    display: inline-flex;
    align-items: center;
}

.technical-board.drawing-active .drawing-toolbar {
    position: absolute;
    left: max(10px, env(safe-area-inset-left));
    right: max(10px, env(safe-area-inset-right));
    top: max(8px, env(safe-area-inset-top));
    z-index: 5;
    justify-content: flex-start;
    flex-wrap: wrap;
    min-height: 46px;
    padding: 6px 8px;
    border-radius: 16px;
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 8px 24px rgba(23, 61, 42, .16);
}

.technical-board.drawing-active .drawing-toolbar strong {
    margin-right: auto;
}

.technical-board.drawing-active .technical-tools {
    position: absolute;
    left: max(10px, env(safe-area-inset-left));
    right: auto;
    top: calc(max(8px, env(safe-area-inset-top)) + 58px);
    z-index: 6;
    display: block;
    min-width: min(280px, calc(100vw - 20px));
    max-width: min(360px, calc(100vw - 20px));
    overflow-x: auto;
    overflow-y: hidden;
    padding: 9px 10px 11px;
    border-radius: 16px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 8px 24px rgba(23, 61, 42, .18);
    -webkit-overflow-scrolling: touch;
}

.technical-board.drawing-active .technical-tools:not([open]) {
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.technical-board.drawing-active .technical-tools:not([open]) button {
    display: none;
}

.technical-board.drawing-active .technical-tools[open] {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.technical-board.drawing-active .technical-tools[open] summary {
    flex: 1 0 100%;
}

.technical-board.drawing-active .technical-tools button {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 0 15px;
    font-size: 13px;
}

.technical-board.drawing-active .technical-canvas {
    position: absolute;
    left: max(10px, env(safe-area-inset-left));
    right: max(10px, env(safe-area-inset-right));
    top: calc(max(8px, env(safe-area-inset-top)) + 62px);
    bottom: max(10px, env(safe-area-inset-bottom));
    width: calc(100% - max(10px, env(safe-area-inset-left)) - max(10px, env(safe-area-inset-right)));
    height: calc(100% - max(10px, env(safe-area-inset-bottom)) - max(8px, env(safe-area-inset-top)) - 62px);
    min-height: 0;
    aspect-ratio: auto;
    border-radius: 12px;
}

.technical-board.isometric-editor-active.drawing-active {
    padding: 0;
    background: #ffffff;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

.technical-board.isometric-editor-active.drawing-active .drawing-toolbar {
    left: max(10px, env(safe-area-inset-left));
    right: auto;
    top: max(10px, env(safe-area-inset-top));
    width: 74px;
    max-height: calc(100vh - max(10px, env(safe-area-inset-top)) - max(10px, env(safe-area-inset-bottom)) - 20px);
    max-height: calc(100dvh - max(10px, env(safe-area-inset-top)) - max(10px, env(safe-area-inset-bottom)) - 20px);
    min-height: 0;
    padding: 12px 9px;
    border-radius: 28px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    background: #0d2739;
    box-shadow: 0 18px 34px rgba(7, 24, 37, .28);
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
}

.technical-board.isometric-editor-active.drawing-active .drawing-toolbar::-webkit-scrollbar {
    display: none;
}

.technical-board.isometric-editor-active.drawing-active .drawing-toolbar strong {
    display: none;
}

.technical-board.isometric-editor-active.drawing-active .drawing-toolbar button {
    width: 54px;
    height: 48px;
    min-height: 48px;
    padding: 0;
    border-radius: 16px;
    background: transparent;
    color: #eef7fb;
    font-size: 0;
    display: inline-grid;
    place-items: center;
    position: relative;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
}

.technical-board.isometric-editor-active.drawing-active .drawing-toolbar button:hover,
.technical-board.isometric-editor-active.drawing-active .drawing-toolbar button:focus-visible {
    background: rgba(255, 255, 255, .10);
    outline: none;
}

.technical-board.isometric-editor-active.drawing-active .drawing-toolbar button::before {
    font-size: 29px;
    line-height: 1;
}

.technical-board.isometric-editor-active.drawing-active [data-undo-drawing]::before { content: "↶"; }
.technical-board.isometric-editor-active.drawing-active [data-redo-drawing]::before { content: "↷"; }
.technical-board.isometric-editor-active.drawing-active [data-fix-selected]::before { content: "⌖"; }
.technical-board.isometric-editor-active.drawing-active [data-rotate-iso]::before { content: "⟳"; }
.technical-board.isometric-editor-active.drawing-active [data-scale-step="-0.15"]::before { content: "−"; }
.technical-board.isometric-editor-active.drawing-active [data-scale-step="0.15"]::before { content: "+"; }

.technical-board.isometric-editor-active.drawing-active [data-finish-drawing]::before {
    content: "✓";
    font-size: 31px;
    font-weight: 800;
}

.technical-board.isometric-editor-active.drawing-active [data-clear-canvas]::before {
    content: "×";
    font-size: 34px;
}

.technical-board.isometric-editor-active.drawing-active .technical-tools {
    left: calc(max(10px, env(safe-area-inset-left)) + 84px);
    right: auto;
    top: max(10px, env(safe-area-inset-top));
    max-width: calc(100vw - max(10px, env(safe-area-inset-left)) - 104px);
    min-width: 68px;
    max-height: calc(100vh - max(10px, env(safe-area-inset-top)) - 20px);
    overflow: auto;
    padding: 10px;
    border: 0;
    border-radius: 24px;
    background: #0d2739;
    box-shadow: 0 18px 34px rgba(7, 24, 37, .25);
    touch-action: pan-x pan-y;
}

.technical-board.isometric-editor-active.drawing-active .technical-tools:not([open]) {
    padding: 10px;
    background: #0d2739;
    box-shadow: 0 18px 34px rgba(7, 24, 37, .25);
}

.technical-board.isometric-editor-active.drawing-active .technical-tools[open] {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(78px, 1fr));
    gap: 7px;
    width: min(760px, calc(100vw - max(10px, env(safe-area-inset-left)) - 104px));
    align-items: stretch;
}

.technical-board.isometric-editor-active.drawing-active .technical-tools summary {
    flex: 0 0 auto;
    width: 48px;
    min-height: 48px;
    padding: 0;
    border-radius: 16px;
    background: rgba(255, 255, 255, .08);
    color: #eef7fb;
    font-size: 0;
    display: inline-grid;
    place-items: center;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
}

.technical-board.isometric-editor-active.drawing-active .technical-tools summary::before {
    content: "☰";
    font-size: 25px;
}

.technical-board.isometric-editor-active.drawing-active .technical-tools summary::after {
    display: none;
}

.technical-board.isometric-editor-active.drawing-active .technical-tools button {
    width: auto;
    min-width: 0;
    height: auto;
    min-height: 66px;
    padding: 7px 6px 6px;
    border-radius: 15px;
    background: rgba(255, 255, 255, .055);
    color: rgba(238, 247, 251, .9);
    font-size: 10px;
    font-weight: 900;
    line-height: 1.08;
    text-align: center;
    display: inline-grid;
    grid-template-rows: 36px auto;
    gap: 4px;
    place-items: center;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
}

.technical-board.isometric-editor-active.drawing-active .technical-tools button::before {
    width: 34px;
    height: 34px;
    border-radius: 13px;
    background: transparent;
    border-color: transparent;
    color: rgba(255, 255, 255, .75);
    font-size: 22px;
}

.technical-board.isometric-editor-active.drawing-active .technical-tools button.active,
.technical-board.isometric-editor-active.drawing-active .technical-tools button:focus-visible {
    background: rgba(241, 96, 60, .22);
    outline: none;
}

.technical-board.isometric-editor-active.drawing-active .technical-tools button.active::before,
.technical-board.isometric-editor-active.drawing-active .technical-tools button:focus-visible::before {
    color: #ff7048;
    background: rgba(255, 112, 72, .18);
    border-color: rgba(255, 112, 72, .36);
}

.technical-board.isometric-editor-active.drawing-active .technical-canvas {
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 0;
    background: #ffffff;
}

@media (max-height: 460px) {
    .technical-board.isometric-editor-active.drawing-active .drawing-toolbar {
        width: 62px;
        padding: 9px 7px;
        border-radius: 23px;
        gap: 4px;
    }

    .technical-board.isometric-editor-active.drawing-active .drawing-toolbar button {
        width: 48px;
        height: 38px;
        min-height: 38px;
        border-radius: 13px;
    }

    .technical-board.isometric-editor-active.drawing-active .drawing-toolbar button::before {
        font-size: 24px;
    }

    .technical-board.isometric-editor-active.drawing-active [data-finish-drawing]::before {
        font-size: 26px;
    }

    .technical-board.isometric-editor-active.drawing-active [data-clear-canvas]::before {
        font-size: 29px;
    }

    .technical-board.isometric-editor-active.drawing-active .technical-tools {
        left: calc(max(10px, env(safe-area-inset-left)) + 70px);
        max-width: calc(100vw - max(10px, env(safe-area-inset-left)) - 90px);
        padding: 8px;
        border-radius: 20px;
    }

    .technical-board.isometric-editor-active.drawing-active .technical-tools[open] {
        grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
        width: min(680px, calc(100vw - max(10px, env(safe-area-inset-left)) - 90px));
    }

    .technical-board.isometric-editor-active.drawing-active .technical-tools button {
        min-height: 58px;
        padding: 5px;
        font-size: 9px;
        grid-template-rows: 30px auto;
    }

    .technical-board.isometric-editor-active.drawing-active .technical-tools button::before {
        width: 30px;
        height: 30px;
        font-size: 19px;
    }
}

@media (pointer: coarse) {
    .technical-board.isometric-editor-active.drawing-active .technical-canvas {
        left: 50%;
        right: auto;
        top: 50%;
        bottom: auto;
        width: min(100vw, calc(100dvh * 2.148));
        width: min(100lvw, calc(100lvh * 2.148));
        height: min(100dvh, calc(100vw / 2.148));
        height: min(100lvh, calc(100lvw / 2.148));
        transform: translate(-50%, -50%);
        aspect-ratio: 1160 / 540;
    }
}

body.technical-editor-open {
    overflow: hidden;
}

.drawing-canvas {
    width: 100%;
    border-radius: 14px;
    background: #fff;
    border: 1px solid rgba(81, 103, 76, .22);
    touch-action: none;
}

.isometric-canvas {
    aspect-ratio: 900 / 520;
}

.iso-route-summary {
    display: grid;
    gap: 7px;
    padding: 12px;
    border: 1px solid rgba(184, 229, 93, .38);
    border-radius: 14px;
    background: rgba(251, 254, 245, .86);
    color: #173d2a;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.35;
}

.iso-route-summary:empty {
    display: none;
}

.iso-route-summary span {
    display: block;
    padding: 8px 10px;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(23, 61, 42, .08);
}

.iso-route-summary .empty {
    color: #6b8060;
    font-weight: 700;
}

.signature-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.signature-canvas {
    aspect-ratio: 520 / 180;
}

.acta-digital {
    border: 2px solid rgba(36, 91, 60, .18);
}

.acta-titlebar {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(81, 103, 76, .18);
}

.acta-titlebar img {
    width: 58px;
    height: 58px;
    object-fit: contain;
    border-radius: 50%;
    background: #fff;
}

.acta-titlebar h2 {
    margin: 2px 0 0;
    text-transform: uppercase;
    letter-spacing: 0;
}

.acta-block {
    display: grid;
    gap: 10px;
    padding: 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .46);
    border: 1px solid rgba(81, 103, 76, .12);
}

.acta-block h3 {
    margin: 0;
    color: #173d2a;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0;
}

.acta-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.acta-grid .span-all {
    grid-column: 1 / -1;
    min-height: 86px;
    resize: vertical;
}

.acta-grid .is-hidden-field {
    display: none;
}

.pipe-segments-panel {
    display: grid;
    gap: 10px;
    min-height: 0;
    padding: 12px;
    border: 1px solid rgba(130, 190, 65, .32);
    border-radius: 14px;
    background: #fbfff5;
}

.pipe-segments-panel > div:first-child {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    align-items: baseline;
    justify-content: space-between;
}

.pipe-segments-panel span {
    color: #4c7d28;
    font-size: 11px;
    font-weight: 950;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.pipe-segments-panel strong {
    color: #173d2a;
    font-size: 14px;
    font-weight: 950;
}

.pipe-segments-preview {
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid rgba(81, 103, 76, .12);
    background: #fff;
}

.pipe-segments-empty {
    padding: 14px;
    color: #66785a;
    font-size: 13px;
    font-weight: 800;
}

.pipe-segments-table {
    display: grid;
    min-width: 0;
}

.pipe-segments-head,
.pipe-segments-row {
    display: grid;
    grid-template-columns: 1.25fr 1fr .8fr .8fr 1.35fr;
    align-items: stretch;
}

.pipe-segments-head {
    background: #eefbd8;
}

.pipe-segments-head span,
.pipe-segments-row span {
    padding: 9px 10px;
    border-right: 1px solid rgba(81, 103, 76, .12);
    border-bottom: 1px solid rgba(81, 103, 76, .1);
    color: #173d2a;
    font-size: 12px;
    font-weight: 900;
    line-height: 1.15;
    text-transform: none;
    letter-spacing: 0;
}

.pipe-segments-head span {
    color: #42761f;
    font-size: 11px;
    text-transform: uppercase;
}

.pipe-segments-row span:last-child,
.pipe-segments-head span:last-child {
    border-right: 0;
}

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

.acta-stamp-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.acta-stamp-button {
    min-height: 58px;
    border: 1px solid rgba(146, 198, 76, .46);
    border-radius: 14px;
    background: rgba(255, 255, 255, .92);
    color: #173d2a;
    box-shadow: 0 10px 24px rgba(28, 74, 45, .08);
    cursor: pointer;
    display: grid;
    gap: 3px;
    align-content: center;
    justify-items: start;
    padding: 10px 13px;
    text-align: left;
}

.acta-stamp-button span {
    font-size: 11px;
    font-weight: 950;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #5f7b38;
}

.acta-stamp-button strong {
    font-size: 13px;
    font-weight: 950;
}

.acta-stamp-button.stamped {
    border-color: rgba(110, 171, 50, .68);
    background: linear-gradient(135deg, #f1ffd7, #ffffff);
}

.two-acta-columns {
    grid-template-columns: 1fr 1fr;
}

.acta-block textarea {
    min-height: 74px;
}

@media (max-width: 980px) {
    .acta-grid,
    .acta-grid.compact,
    .two-acta-columns {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 760px) {
    .acta-titlebar {
        align-items: flex-start;
    }

    .acta-titlebar img {
        width: 48px;
        height: 48px;
    }

    .acta-grid,
    .acta-grid.compact,
    .two-acta-columns {
        grid-template-columns: 1fr;
    }

    .acta-block {
        padding: 10px;
    }

    .pipe-segments-panel {
        padding: 10px;
    }

    .pipe-segments-head {
        display: none;
    }

    .pipe-segments-row {
        display: grid;
        grid-template-columns: 1fr;
        padding: 8px 10px;
        border-bottom: 1px solid rgba(81, 103, 76, .12);
    }

    .pipe-segments-row:last-child {
        border-bottom: 0;
    }

    .pipe-segments-row span {
        display: grid;
        grid-template-columns: 94px minmax(0, 1fr);
        gap: 8px;
        padding: 5px 0;
        border: 0;
        font-size: 12px;
    }

    .pipe-segments-row span::before {
        content: attr(data-label);
        color: #5f8d28;
        font-size: 10px;
        font-weight: 950;
        text-transform: uppercase;
    }

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

    .print-act-button {
        width: 100%;
    }
}

.secondary-button {
    min-height: 44px;
    border: 1px solid rgba(36, 91, 60, .24);
    border-radius: 999px;
    background: rgba(255, 255, 255, .68);
    color: #245b3c;
    font-weight: 900;
    cursor: pointer;
}

.sticky-save {
    position: sticky;
    bottom: 14px;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 20px;
    background: rgba(238, 243, 233, .94);
    border: 1px solid rgba(81, 103, 76, .16);
    box-shadow: 0 18px 42px rgba(23, 61, 42, .18);
    backdrop-filter: blur(12px);
}

.sticky-save .primary-button {
    flex: 1;
}

.sticky-save .print-act-button {
    flex: 0 0 auto;
    min-height: 44px;
}

.sticky-save span {
    color: #667268;
    font-size: 12px;
    font-weight: 800;
}

@media (max-width: 760px) {
    .field-report-form {
        padding-bottom: calc(190px + env(safe-area-inset-bottom));
    }

    .field-section {
        padding: 15px;
        gap: 10px;
    }

    .field-section h2 {
        font-size: 18px;
    }

    .material-row {
        grid-template-columns: 1fr;
    }

    .sticky-save {
        position: fixed;
        left: 10px;
        right: 10px;
        bottom: calc(88px + env(safe-area-inset-bottom));
        z-index: 55;
        display: grid;
        grid-template-columns: 1fr;
    }

    .sticky-save .print-act-button {
        width: 100%;
    }

    .technical-tools {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 10px;
        -webkit-overflow-scrolling: touch;
    }

    .technical-tools button {
        flex: 0 0 auto;
        min-height: 42px;
        padding: 0 14px;
    }

    .technical-board.drawing-active {
        padding: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
    }

    .technical-board.drawing-active .technical-canvas {
        min-height: 0;
    }
}

/* Refinamiento visual limon corporativo y tablas de escritorio */
body {
    background:
        radial-gradient(circle at top left, rgba(183, 216, 61, .22), transparent 32rem),
        linear-gradient(135deg, #f8fbef 0%, #eef6e6 48%, #f5f8ee 100%);
}

.sidebar {
    background: linear-gradient(180deg, #102c1d 0%, #173d2a 62%, #102619 100%);
    box-shadow: 14px 0 36px rgba(18, 52, 32, .18);
}

.nav a {
    background: rgba(255, 255, 255, .075);
    border: 1px solid rgba(255, 255, 255, .08);
}

.nav a.active,
.nav a:hover {
    background: rgba(183, 216, 61, .18);
    color: #f6ffd6;
}

.form-card,
.panel,
.table-section,
.work-card,
.metrics-grid article,
.field-section,
.acta-block {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(250, 253, 244, .93)),
        var(--surface);
    border-color: rgba(126, 154, 83, .22);
    box-shadow: 0 18px 44px rgba(28, 58, 38, .10);
}

.panel,
.table-section,
.work-card,
.field-section,
.acta-block {
    border-radius: 14px;
}

.module-card {
    background:
        linear-gradient(145deg, #ffffff 0%, #f2f8df 100%);
    border-color: rgba(159, 197, 36, .24);
    box-shadow: 0 18px 38px rgba(31, 80, 54, .12);
}

.module-card span,
.card-heading span,
.primary-button,
.mobile-tabbar a.active {
    background: linear-gradient(135deg, #214f35, #2f6a48);
}

.module-card span {
    box-shadow: inset 0 0 0 2px rgba(183, 216, 61, .34);
}

.eyebrow,
.badge {
    color: #214f35;
}

.badge {
    background: var(--accent-soft);
    border: 1px solid rgba(159, 197, 36, .32);
}

.primary-button {
    box-shadow: 0 12px 26px rgba(33, 79, 53, .22);
}

.primary-button:hover,
.table-action:hover {
    background: #123420;
}

input,
select,
textarea {
    border-color: rgba(112, 139, 83, .26);
    background: rgba(255, 255, 255, .94);
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--accent-strong);
    outline: 3px solid rgba(183, 216, 61, .24);
    box-shadow: 0 0 0 1px rgba(159, 197, 36, .18);
}

.section-title {
    background: linear-gradient(90deg, rgba(183, 216, 61, .16), rgba(255, 255, 255, .86));
    border-bottom-color: rgba(126, 154, 83, .2);
}

.table-wrap {
    background: rgba(255, 255, 255, .72);
    scrollbar-width: thin;
}

table {
    border-collapse: separate;
    border-spacing: 0;
}

th {
    background: #f3f8df;
    color: #214f35;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: .02em;
}

td {
    color: #26352b;
}

tbody tr:nth-child(even) td {
    background: rgba(247, 250, 237, .62);
}

tbody tr:hover td {
    background: rgba(238, 248, 200, .72);
}

.record-item {
    background: linear-gradient(135deg, #fff, #f6faea);
    border-color: rgba(126, 154, 83, .2);
}

@media (min-width: 761px) {
    .single-module {
        grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
        max-width: 1680px;
        gap: 28px;
    }

    .single-module > .admin-card {
        max-height: calc(100vh - 56px);
    }

    .single-module > .table-section {
        max-height: none;
        min-height: calc(100vh - 150px);
    }

    .single-module > .table-section:only-child {
        grid-column: 1 / -1;
    }

    .table-section .table-wrap {
        max-width: 100%;
        border-radius: 0 0 14px 14px;
    }

    table {
        min-width: 760px;
        table-layout: auto;
    }

    th,
    td {
        padding: 13px 14px;
        white-space: normal;
        overflow-wrap: anywhere;
        word-break: normal;
        line-height: 1.35;
    }

    th {
        position: sticky;
        top: 0;
        z-index: 2;
    }

    td:nth-child(1),
    td:nth-child(2),
    td:nth-child(3) {
        min-width: 0;
    }

    .table-section table td:first-child,
    .table-section table th:first-child {
        padding-left: 20px;
    }

    .table-section table td:last-child,
    .table-section table th:last-child {
        padding-right: 20px;
    }

    .table-action {
        min-width: max-content;
    }

    .search {
        max-width: 360px;
    }
}

@media (min-width: 1280px) {
    .single-module {
        grid-template-columns: minmax(340px, 440px) minmax(720px, 1fr);
    }
}

@media (max-width: 760px) and (orientation: portrait) {
    .technical-board.drawing-active::before {
        content: "Gira el telefono a horizontal para usar toda la pantalla";
        position: absolute;
        inset: auto 14px 14px;
        z-index: 2;
        padding: 10px 12px;
        border-radius: 14px;
        background: rgba(16, 38, 25, .9);
        color: #fff;
        text-align: center;
        font-size: 13px;
        font-weight: 900;
        pointer-events: none;
    }
}

/* Login neumorfico limon */
.auth-content {
    min-height: 100vh;
}

.login-screen {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        linear-gradient(135deg, rgba(168, 199, 67, .2), transparent 34%),
        linear-gradient(315deg, rgba(36, 91, 60, .14), transparent 42%),
        #f2f5ef;
}

.auth-box {
    width: min(920px, 96vw);
    min-height: clamp(470px, 78vh, 590px);
    border-radius: clamp(18px, 3vw, 28px);
    background: #eef3e9;
    box-shadow:
        22px 22px 48px rgba(81, 103, 76, .24),
        -16px -16px 34px rgba(255, 255, 255, .96),
        inset 1px 1px 0 rgba(255, 255, 255, .7);
    overflow: hidden;
    position: relative;
}

.auth-box::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 60%;
    width: 1px;
    background: rgba(107, 134, 89, .2);
    box-shadow: 1px 0 0 rgba(255, 255, 255, .78);
    z-index: 10;
    transition: left .72s cubic-bezier(.65, 0, .35, 1);
    pointer-events: none;
}

.auth-box.signup-mode::after {
    left: 40%;
}

.lime-bg {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(255,255,255,.22), transparent 32%, rgba(168, 199, 67, .12)),
        repeating-linear-gradient(135deg, rgba(255,255,255,.16) 0 1px, transparent 1px 18px);
    opacity: .55;
    pointer-events: none;
}

.lime-orbit {
    display: none;
}

.panel {
    position: absolute;
    top: 0;
    height: 100%;
    transition: left .72s cubic-bezier(.65, 0, .35, 1);
}

.pA {
    left: 0;
    width: 60%;
    z-index: 1;
    background: rgba(255, 255, 255, .16);
    box-shadow: inset -10px 0 28px rgba(107, 134, 89, .08);
}

.auth-box.signup-mode .pA {
    left: 40%;
}

.pB {
    left: 60%;
    width: 40%;
    z-index: 3;
    overflow: hidden;
    background: #eef3e9;
    box-shadow:
        inset 9px 9px 20px rgba(81, 103, 76, .14),
        inset -9px -9px 20px rgba(255, 255, 255, .82);
}

.auth-box.signup-mode .pB {
    left: 0;
}

.proviservicios-auth-box::after,
.proviservicios-auth-box .lime-bg {
    display: none;
}

.proviservicios-auth-box .pA {
    width: 100%;
    background: transparent;
    box-shadow: none;
}

.proviservicios-auth-box .pA-login {
    gap: 10px;
}

.d1,
.d2 {
    position: absolute;
    pointer-events: none;
    background: rgba(168, 199, 67, .2);
    box-shadow:
        8px 8px 18px rgba(81, 103, 76, .16),
        -8px -8px 18px rgba(255, 255, 255, .78);
}

.d1 {
    width: 150%;
    height: 86px;
    top: 34px;
    right: -44%;
    transform: rotate(-18deg);
    border-radius: 999px;
}

.d2 {
    width: 140%;
    height: 76px;
    bottom: 44px;
    left: -42%;
    transform: rotate(-18deg);
    border-radius: 999px;
}

.p-inner {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: clamp(24px, 5vh, 54px) clamp(22px, 5vw, 58px);
}

.pA-reg {
    display: none;
}

.pA.show-reg .pA-login {
    display: none;
}

.pA.show-reg .pA-reg {
    display: flex;
}

.pB-hello,
.pB-welcome {
    text-align: center;
    transition: opacity .18s ease;
}

.pB-welcome {
    opacity: 0;
    pointer-events: none;
}

.pB.show-welcome .pB-hello {
    opacity: 0;
    pointer-events: none;
}

.pB.show-welcome .pB-welcome {
    opacity: 1;
    pointer-events: auto;
}

.fp-title {
    margin: 8px 0 10px;
    color: #17231c;
    font-size: clamp(34px, 5vw, 54px);
    line-height: 1;
    font-weight: 900;
    letter-spacing: 0;
}

.panel-logo {
    display: block;
    object-fit: contain;
    border-radius: 50%;
    background: #ffffff;
    box-shadow:
        8px 8px 18px rgba(81, 103, 76, .18),
        -6px -6px 16px rgba(255, 255, 255, .9);
}

.panel-logo {
    width: 92px;
    height: 92px;
    margin-bottom: 18px;
    position: relative;
    z-index: 1;
}

.access-logo {
    width: clamp(72px, 8vw, 92px);
    height: clamp(72px, 8vw, 92px);
    display: block;
    object-fit: contain;
    border-radius: 50%;
    background: #ffffff;
    margin: 10px 0 16px;
    box-shadow:
        10px 10px 22px rgba(81, 103, 76, .16),
        -8px -8px 18px rgba(255, 255, 255, .92);
}

.social-row {
    display: flex;
    gap: 12px;
    margin: 12px 0 8px;
}

.s-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: #315f42;
    background: #eef3e9;
    display: grid;
    place-items: center;
    box-shadow:
        7px 7px 14px rgba(81, 103, 76, .24),
        -7px -7px 14px rgba(255, 255, 255, .95);
}

.s-icon svg {
    width: 21px;
    height: 21px;
    opacity: .62;
}

.s-icon.active {
    color: #102619;
    background: #a8c743;
    box-shadow:
        inset 4px 4px 8px rgba(59, 86, 50, .22),
        inset -4px -4px 8px rgba(255, 255, 255, .72);
}

.social-hint {
    max-width: 360px;
    margin: 0 0 20px;
    color: #647066;
    font-size: 14px;
    line-height: 1.55;
    text-align: center;
}

.field {
    width: 100%;
    display: grid;
    gap: 7px;
    margin-bottom: 12px;
    color: #4f5f54;
    font-size: 13px;
    font-weight: 800;
}

.field input {
    min-height: 50px;
    border: 1px solid rgba(81, 103, 76, .22);
    border-radius: 14px;
    background: rgba(255, 255, 255, .76);
    color: #17231c;
    padding: 12px 16px;
    outline: none;
    box-shadow:
        inset 3px 3px 7px rgba(81, 103, 76, .11),
        inset -3px -3px 7px rgba(255, 255, 255, .78);
}

.field input:focus {
    border-color: rgba(87, 130, 72, .68);
    background: #fff;
    box-shadow:
        0 0 0 4px rgba(168, 199, 67, .2),
        inset 2px 2px 5px rgba(81, 103, 76, .08);
}

.btn-lime {
    min-height: 48px;
    border: 0;
    border-radius: 999px;
    padding: 0 30px;
    display: inline-grid;
    place-items: center;
    cursor: pointer;
    background: #245b3c;
    color: #f9fff3;
    font-weight: 900;
    letter-spacing: 0;
    box-shadow:
        0 13px 26px rgba(36, 91, 60, .28),
        inset 0 1px 0 rgba(255, 255, 255, .68);
    transition: transform .2s, box-shadow .22s, background .22s;
    position: relative;
    z-index: 1;
}

.btn-lime:hover {
    transform: translateY(-1px);
    background: #173d2a;
    box-shadow: 0 16px 30px rgba(36, 91, 60, .34);
}

.btn-full {
    width: 100%;
}

.login-note {
    margin: 16px 0 0;
    font-size: 12px;
    text-align: center;
}

.permission-list {
    width: 100%;
    display: grid;
    gap: 10px;
    margin: 10px 0 22px;
}

.permission-list span {
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 0 15px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .7);
    color: #435146;
    font-weight: 800;
    box-shadow:
        inset 2px 2px 6px rgba(81, 103, 76, .1),
        inset -2px -2px 6px rgba(255, 255, 255, .82);
}

.o-title {
    position: relative;
    z-index: 1;
    color: #17231c;
    font-size: clamp(25px, 4vw, 38px);
    font-weight: 900;
    line-height: 1.05;
    margin-bottom: 14px;
}

.o-sub {
    position: relative;
    z-index: 1;
    max-width: 260px;
    margin: 0 0 26px;
    color: #667268;
    font-size: 14px;
    line-height: 1.72;
}

.mobile-nav {
    display: none;
}

@media (max-width: 720px) {
    .login-screen {
        align-items: start;
        padding: 14px;
    }

    .auth-box {
        width: min(440px, 100%);
        min-height: 0;
        margin: 0 auto;
        overflow: hidden;
        border-radius: 22px;
    }

    .auth-box::after,
    .pB,
    .d1,
    .d2 {
        display: none;
    }

    .mobile-nav {
        position: relative;
        z-index: 5;
        display: grid;
        grid-template-columns: 1fr 1fr;
        padding: 8px;
        gap: 8px;
        background: #eef3e9;
        border-bottom: 1px solid rgba(81, 103, 76, .14);
    }

    .m-tab {
        min-height: 42px;
        border: 0;
        border-radius: 14px;
        background: transparent;
        color: #667268;
        font-weight: 900;
        cursor: pointer;
    }

    .auth-box:not(.signup-mode) .m-tab-si,
    .auth-box.signup-mode .m-tab-su {
        background: #245b3c;
        color: #f9fff3;
        box-shadow:
            6px 6px 14px rgba(81, 103, 76, .2),
            -4px -4px 12px rgba(255, 255, 255, .85);
    }

    .panel,
    .pA,
    .auth-box.signup-mode .pA {
        position: relative;
        left: 0;
        width: 100%;
        height: auto;
        transition: none;
        background: transparent;
        box-shadow: none;
    }

    .p-inner {
        position: relative;
        inset: auto;
        min-height: auto;
        padding: 28px 20px 24px;
    }

    .auth-box:not(.signup-mode) .pA-reg {
        display: none;
    }

    .auth-box.signup-mode .pA-login {
        display: none;
    }

    .auth-box.signup-mode .pA-reg {
        display: flex;
    }

    .fp-title {
        font-size: 38px;
    }

    .access-logo {
        width: 74px;
        height: 74px;
        margin: 6px 0 12px;
    }


    .social-hint {
        margin-bottom: 16px;
    }

    .field input {
        min-height: 52px;
    }
}

/* Dashboard corporativo movil */
.content {
    background:
        linear-gradient(135deg, rgba(168, 199, 67, .16), transparent 34%),
        linear-gradient(315deg, rgba(36, 91, 60, .1), transparent 42%),
        #f2f5ef;
}

.sidebar {
    background: #173d2a;
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, .08);
}

.brand-mark {
    background: #a8c743;
    border-radius: 50%;
    padding: 2px;
}

.nav a {
    background: rgba(255, 255, 255, .09);
}

.dashboard-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: clamp(20px, 4vw, 34px);
    margin-bottom: 18px;
    border-radius: 18px;
    background: #eef3e9;
    border: 1px solid rgba(81, 103, 76, .14);
    box-shadow:
        16px 16px 36px rgba(81, 103, 76, .18),
        -12px -12px 28px rgba(255, 255, 255, .88);
}

.hero-copy h1 {
    margin: 6px 0 8px;
    color: #17231c;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.02;
}

.hero-copy p {
    max-width: 620px;
    margin: 0;
    color: #667268;
    line-height: 1.6;
}

.dashboard-logo {
    width: clamp(72px, 9vw, 104px);
    height: clamp(72px, 9vw, 104px);
    object-fit: contain;
    border-radius: 50%;
    background: #fff;
    flex: 0 0 auto;
    box-shadow:
        8px 8px 18px rgba(81, 103, 76, .16),
        -7px -7px 16px rgba(255, 255, 255, .92);
}

.mobile-action-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}

.mobile-action-strip a {
    min-height: 42px;
    display: grid;
    place-items: center;
    padding: 0 10px;
    border-radius: 999px;
    background: #eef3e9;
    color: #245b3c;
    font-weight: 900;
    font-size: 13px;
    border: 1px solid rgba(81, 103, 76, .12);
    box-shadow:
        7px 7px 16px rgba(81, 103, 76, .14),
        -6px -6px 14px rgba(255, 255, 255, .88);
}

.dashboard-metrics article,
.admin-card,
.table-section {
    background: #eef3e9;
    border: 1px solid rgba(81, 103, 76, .14);
    box-shadow:
        14px 14px 30px rgba(81, 103, 76, .16),
        -10px -10px 24px rgba(255, 255, 255, .88);
}

.dashboard-metrics article {
    border-radius: 16px;
}

.dashboard-metrics strong {
    color: #173d2a;
}

.admin-modules {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    align-items: start;
}

.admin-card {
    padding: 20px;
    border-radius: 18px;
}

.card-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.card-heading span {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #245b3c;
    color: #f9fff3;
    font-weight: 900;
    box-shadow: 0 10px 22px rgba(36, 91, 60, .24);
}

.card-heading h2 {
    margin: 0;
    font-size: 19px;
    color: #17231c;
}

.admin-card input,
.admin-card select,
.admin-card textarea,
.search {
    border: 1px solid rgba(81, 103, 76, .2);
    border-radius: 14px;
    background: rgba(255, 255, 255, .76);
    box-shadow:
        inset 3px 3px 7px rgba(81, 103, 76, .1),
        inset -3px -3px 7px rgba(255, 255, 255, .78);
}

.admin-card input:focus,
.admin-card select:focus,
.admin-card textarea:focus,
.search:focus {
    outline: none;
    border-color: rgba(87, 130, 72, .68);
    box-shadow:
        0 0 0 4px rgba(168, 199, 67, .2),
        inset 2px 2px 5px rgba(81, 103, 76, .08);
}

.admin-card .primary-button,
.table-section .primary-button {
    background: #245b3c;
    border-radius: 999px;
    box-shadow: 0 13px 26px rgba(36, 91, 60, .24);
}

.admin-card .primary-button:hover,
.table-section .primary-button:hover {
    background: #173d2a;
}

.records-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-top: 18px;
}

.compact-list {
    display: grid;
    gap: 10px;
    padding: 16px;
}

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

.record-item {
    padding: 13px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .62);
    border: 1px solid rgba(81, 103, 76, .1);
}

.record-item strong {
    display: block;
    color: #17231c;
    line-height: 1.35;
}

.record-item span {
    display: block;
    margin-top: 4px;
    color: #667268;
    font-size: 13px;
}

.table-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.table-filters .search,
.table-filters select {
    min-width: min(220px, 100%);
}

.edit-row td {
    background: rgba(238, 246, 227, .8);
    padding: 14px;
}

.inline-edit-form {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    align-items: end;
}

.wide-edit-form {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.inline-edit-form input,
.inline-edit-form select,
.inline-edit-form textarea {
    width: 100%;
    min-height: 42px;
    border: 1px solid rgba(81, 103, 76, .18);
    border-radius: 12px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, .84);
    color: #17231c;
    font: inherit;
}

.inline-edit-form textarea {
    min-height: 42px;
    resize: vertical;
}

.inline-edit-form .primary-button {
    min-height: 42px;
}

.nested-title {
    margin-top: 18px;
    border-top: 1px solid rgba(81, 103, 76, .12);
}

.table-section {
    border-radius: 18px;
}

.section-title {
    border-bottom-color: rgba(81, 103, 76, .14);
}

.badge {
    background: rgba(168, 199, 67, .22);
    color: #173d2a;
}

@media (max-width: 980px) {
    .content {
        padding: 18px;
    }

    .sidebar {
        height: auto;
        padding: 16px;
    }

    .logout-form {
        margin-top: 0;
    }

    .admin-modules,
    .records-grid {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 640px) {
    .content {
        padding: 12px;
    }

    .dashboard-hero {
        align-items: flex-start;
        padding: 18px;
        border-radius: 18px;
    }

    .table-filters {
        width: 100%;
        justify-content: stretch;
    }

    .table-filters .search,
    .table-filters select,
    .inline-edit-form,
    .wide-edit-form {
        grid-template-columns: 1fr;
        width: 100%;
    }

    .hero-copy h1 {
        font-size: 30px;
    }

    .hero-copy p {
        font-size: 14px;
    }

    .dashboard-logo {
        width: 66px;
        height: 66px;
    }

    .mobile-action-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mobile-action-strip a {
        min-height: 46px;
    }

    .admin-card {
        padding: 16px;
    }

    .two-column-list {
        grid-template-columns: 1fr;
    }

    table {
        min-width: 760px;
    }
}

/* Final lime override: keep the whole platform light and gradient-based. */
:root {
    --bg: #fbfff4;
    --surface: #ffffff;
    --ink: #21351f;
    --muted: #6d8064;
    --line: #dbeebd;
    --primary: #7fc64a;
    --primary-dark: #5eac4a;
    --accent: #d7f36f;
    --accent-strong: #aeda42;
    --accent-soft: #f3fad9;
    --leaf-soft: #f5fbe9;
    --shadow: 0 18px 42px rgba(112, 166, 75, .14);
}

body,
.app-shell,
.content,
.auth-content {
    background:
        radial-gradient(circle at 8% 4%, rgba(218, 244, 116, .34), transparent 25rem),
        radial-gradient(circle at 88% 10%, rgba(128, 205, 84, .22), transparent 24rem),
        linear-gradient(135deg, #fcfff5 0%, #eff9dc 46%, #f9fdf0 100%) !important;
    color: #21351f;
}

.sidebar {
    background:
        linear-gradient(160deg, rgba(214, 244, 112, .94) 0%, rgba(145, 212, 87, .96) 48%, rgba(95, 181, 83, .98) 100%) !important;
    color: #17351e !important;
    box-shadow: 12px 0 32px rgba(119, 180, 82, .2) !important;
}

.sidebar a,
.sidebar button,
.brand strong,
.brand small {
    color: #17351e !important;
}

.nav a,
.ghost-button,
.logout-form button {
    background: linear-gradient(135deg, rgba(255,255,255,.52), rgba(238, 250, 202, .68)) !important;
    color: #17351e !important;
    border: 1px solid rgba(255, 255, 255, .52) !important;
    box-shadow: 0 10px 22px rgba(107, 169, 74, .18) !important;
}

.nav a:hover,
.nav a.active {
    background: linear-gradient(135deg, rgba(255,255,255,.76), rgba(219, 244, 129, .76)) !important;
    transform: translateX(2px);
}

.login-screen,
.auth-box,
.pB,
.mobile-nav {
    background:
        radial-gradient(circle at 20% 15%, rgba(222, 246, 123, .38), transparent 18rem),
        linear-gradient(135deg, #fbfff4 0%, #eef9d8 50%, #f8fdef 100%) !important;
}

.panel,
.form-card,
.admin-card,
.table-section,
.work-card,
.dashboard-hero,
.dashboard-metrics article,
.metrics-grid article,
.record-item,
.metric-card,
.order-card {
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .96), rgba(246, 253, 226, .92)) !important;
    border-color: rgba(166, 211, 92, .34) !important;
    box-shadow:
        14px 14px 30px rgba(119, 166, 86, .13),
        -10px -10px 24px rgba(255, 255, 255, .88) !important;
}

.primary-button,
.btn-lime,
.table-action,
.admin-card .primary-button,
.table-section .primary-button,
.mobile-action-strip a,
.card-heading span,
.badge,
button[type="submit"] {
    background: linear-gradient(135deg, #e2f77c 0%, #b8e55d 34%, #7dcb54 68%, #60ba62 100%) !important;
    color: #17351e !important;
    border: 1px solid rgba(255, 255, 255, .55) !important;
    box-shadow: 0 12px 26px rgba(118, 186, 75, .28) !important;
}

.primary-button:hover,
.btn-lime:hover,
.table-action:hover,
.admin-card .primary-button:hover,
.table-section .primary-button:hover,
.mobile-action-strip a:hover,
button[type="submit"]:hover {
    background: linear-gradient(135deg, #edfb99 0%, #c8ed6d 34%, #91d761 70%, #70c775 100%) !important;
    transform: translateY(-1px);
    box-shadow: 0 16px 32px rgba(118, 186, 75, .34) !important;
}

.eyebrow,
.hero-copy h1,
.dashboard-metrics strong,
.metrics-grid strong,
.card-heading h2,
.table-section h2,
.panel h2,
.work-card h2,
.record-item strong,
table th {
    color: #4f963c !important;
}

input,
select,
textarea,
.search,
.admin-card input,
.admin-card select,
.admin-card textarea,
.inline-edit-form input,
.inline-edit-form select,
.inline-edit-form textarea {
    background: rgba(255, 255, 255, .88) !important;
    border-color: rgba(166, 211, 92, .34) !important;
    color: #21351f !important;
}

input:focus,
select:focus,
textarea:focus,
.search:focus {
    border-color: rgba(132, 203, 80, .8) !important;
    box-shadow:
        0 0 0 4px rgba(216, 244, 112, .28),
        inset 2px 2px 5px rgba(119, 166, 86, .08) !important;
}

table tbody tr:not(.edit-row):hover,
.edit-row td {
    background: linear-gradient(135deg, rgba(251,255,244,.92), rgba(235, 249, 198, .78)) !important;
}

.d1,
.d2,
.s-icon,
.m-tab,
.field input {
    background: linear-gradient(145deg, #ffffff, #f0fad8) !important;
}

.o-title,
.fp-title,
.field span {
    color: #3f8339 !important;
}

.dashboard-hero::after,
.admin-card::after,
.table-section::after {
    content: "";
    position: absolute;
    inset: -40% auto auto -30%;
    width: 60%;
    height: 180%;
    background: linear-gradient(100deg, transparent, rgba(255,255,255,.28), transparent);
    transform: rotate(12deg);
    animation: limeSweep 8s ease-in-out infinite;
    pointer-events: none;
}

@keyframes limeSweep {
    0%, 72%, 100% {
        opacity: 0;
        translate: -30% 0;
    }
    38% {
        opacity: 1;
        translate: 190% 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .dashboard-hero::after,
    .admin-card::after,
    .table-section::after {
        animation: none !important;
    }
}

/* Menu-only polish: white brand banner + separated white option buttons. */
.sidebar {
    padding: 0 18px 18px !important;
    background:
        linear-gradient(180deg, #ffffff 0 104px, rgba(224, 247, 126, .96) 104px, rgba(143, 215, 89, .98) 56%, rgba(95, 186, 95, .98) 100%) !important;
    color: #17351e !important;
    box-shadow: 14px 0 34px rgba(100, 160, 74, .18) !important;
}

.sidebar-top {
    min-height: 104px;
    margin: 0 -18px 18px;
    padding: 18px;
    background: #ffffff !important;
    border-bottom: 1px solid rgba(166, 211, 92, .24);
    box-shadow: 0 12px 26px rgba(104, 157, 76, .1);
}

.brand {
    color: #17351e !important;
}

.brand strong {
    color: #17351e !important;
}

.brand small {
    color: #6d8064 !important;
}

.brand-mark {
    background: #ffffff !important;
    box-shadow:
        0 10px 24px rgba(116, 176, 76, .16),
        0 0 0 4px rgba(219, 244, 129, .2) !important;
}

.sidebar-toggle {
    background: linear-gradient(135deg, #f4fbdb, #d7f36f) !important;
    color: #17351e !important;
    border: 1px solid rgba(166, 211, 92, .42) !important;
}

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

.sidebar .nav a,
.sidebar .logout-form .ghost-button {
    background: linear-gradient(135deg, #ffffff 0%, #f8fde8 100%) !important;
    color: #17351e !important;
    border: 1px solid rgba(255, 255, 255, .78) !important;
    box-shadow:
        0 10px 24px rgba(98, 157, 73, .18),
        inset 0 1px 0 rgba(255, 255, 255, .9) !important;
}

.sidebar .nav a svg,
.sidebar .logout-form svg {
    stroke: #5eac4a !important;
}

.sidebar .nav a:hover,
.sidebar .nav a.active,
.sidebar .logout-form .ghost-button:hover {
    background: linear-gradient(135deg, #ffffff 0%, #e9f99f 100%) !important;
    color: #17351e !important;
    transform: translateX(3px);
}

.sidebar .nav a.active {
    outline: 2px solid rgba(255, 255, 255, .66);
}

.mobile-tabbar {
    background: linear-gradient(135deg, rgba(224, 247, 126, .96), rgba(124, 203, 85, .96)) !important;
    border-color: rgba(255, 255, 255, .72) !important;
}

.mobile-tabbar a,
.mobile-logout button {
    background: linear-gradient(135deg, #ffffff, #f6fce4) !important;
    color: #17351e !important;
    border: 1px solid rgba(255, 255, 255, .8) !important;
    box-shadow: 0 9px 20px rgba(96, 156, 73, .18) !important;
}

.mobile-tabbar a.active,
.mobile-tabbar a:hover,
.mobile-logout button:hover {
    background: linear-gradient(135deg, #ffffff, #e7f88d) !important;
}

/* CRUD modal refinement */
.edit-row.modal-open {
    align-items: center !important;
    justify-items: center !important;
    padding: 18px !important;
    background:
        radial-gradient(circle at 20% 10%, rgba(218, 244, 116, .22), transparent 20rem),
        rgba(42, 76, 34, .34) !important;
}

.edit-row.modal-open td {
    width: min(1040px, 96vw) !important;
    max-height: min(88vh, 820px) !important;
    padding: 0 !important;
    overflow: hidden !important;
    border-radius: 24px !important;
    border: 1px solid rgba(255, 255, 255, .76) !important;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .99), rgba(244, 252, 225, .98)) !important;
    box-shadow:
        0 30px 78px rgba(55, 99, 42, .28),
        inset 0 1px 0 rgba(255, 255, 255, .86) !important;
}

.crud-modal-header {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 18px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .98), rgba(231, 248, 141, .92)) !important;
    border-bottom: 1px solid rgba(166, 211, 92, .32);
}

.crud-modal-header span {
    display: block;
    margin-bottom: 3px;
    color: #6d8064;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.crud-modal-header strong {
    display: block;
    color: #2f6f34;
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.1;
}

.modal-close {
    float: none !important;
    width: 42px;
    min-width: 42px;
    height: 42px;
    margin: 0 !important;
    padding: 0 !important;
    display: grid;
    place-items: center;
    border-radius: 50% !important;
    background: #ffffff !important;
    color: #3f8339 !important;
    border: 1px solid rgba(166, 211, 92, .38) !important;
    box-shadow: 0 8px 18px rgba(112, 166, 75, .15) !important;
    font-size: 14px;
    line-height: 1;
}

.edit-row.modal-open .inline-edit-form {
    padding: 18px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    align-items: start;
    background: transparent;
}

.edit-row.modal-open .wide-edit-form {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.edit-row.modal-open .inline-edit-form input,
.edit-row.modal-open .inline-edit-form select,
.edit-row.modal-open .inline-edit-form textarea {
    min-height: 46px;
    border-radius: 14px;
    border: 1px solid rgba(166, 211, 92, .34) !important;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .96), rgba(249, 253, 238, .92)) !important;
    box-shadow:
        inset 2px 2px 5px rgba(112, 166, 75, .07),
        inset -2px -2px 5px rgba(255, 255, 255, .8);
}

.edit-row.modal-open .inline-edit-form textarea {
    grid-column: span 2;
    min-height: 92px;
}

.edit-row.modal-open .inline-edit-form .primary-button {
    min-height: 46px;
    align-self: stretch;
}

.edit-row.modal-open .modal-actions {
    padding: 0 18px 18px;
    justify-content: flex-end;
    border-top: 1px solid rgba(166, 211, 92, .2);
    padding-top: 14px;
}

.edit-row.modal-open .modal-actions::before {
    content: "Zona de acciones";
    margin-right: auto;
    color: #6d8064;
    font-size: 12px;
    font-weight: 900;
}

.edit-row.modal-open .review-modal-actions {
    display: flex;
    justify-content: flex-end;
    grid-column: 1 / -1;
}

.edit-row.modal-open .reject-upload-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: end;
    margin: 0 18px 18px;
    padding: 16px;
    border: 1px solid rgba(239, 68, 68, .22);
    border-radius: 18px;
    background: #fff7f7;
}

.edit-row.modal-open .reject-upload-form::before {
    content: "Rechazar con observacion";
    grid-column: 1 / -1;
    margin: 0;
    color: #8a1f1f;
    font-size: 12px;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.edit-row.modal-open .reject-upload-form textarea {
    width: 100%;
    min-height: 86px;
    resize: vertical;
    border-radius: 14px;
    border: 1px solid rgba(239, 68, 68, .28);
    background: #ffffff;
}

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

.row-actions form {
    margin: 0;
}

.row-actions .danger-button,
.row-actions .table-action {
    min-height: 36px;
    padding: 0 12px;
    font-size: 12px;
}

@media (max-width: 980px) {
    .edit-row.modal-open .inline-edit-form,
    .edit-row.modal-open .wide-edit-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .edit-row.modal-open {
        padding: 10px !important;
        align-items: end !important;
    }

    .edit-row.modal-open td {
        width: 100% !important;
        max-height: 92vh !important;
        border-radius: 22px 22px 0 0 !important;
    }

    .crud-modal-header {
        padding: 14px;
    }

    .crud-modal-header strong {
        font-size: 18px;
    }

    .edit-row.modal-open .inline-edit-form,
    .edit-row.modal-open .wide-edit-form {
        grid-template-columns: 1fr;
        padding: 14px;
        gap: 10px;
    }

    .edit-row.modal-open .inline-edit-form textarea {
        grid-column: auto;
    }

    .edit-row.modal-open .modal-actions {
        padding: 12px 14px 16px;
        justify-content: stretch;
    }

    .edit-row.modal-open .modal-actions::before {
        width: 100%;
        margin: 0 0 4px;
    }

    .edit-row.modal-open .modal-actions form,
    .edit-row.modal-open .modal-actions .danger-button {
        width: 100%;
    }
}

.filter-count,
.filter-clear {
    align-self: center;
    border-radius: 999px;
    padding: 9px 12px;
    font-size: 12px;
    font-weight: 900;
}

.filter-count {
    color: #4f963c;
    background: rgba(226, 247, 124, .34);
}

.filter-clear {
    border: 1px solid rgba(166, 211, 92, .34);
    background: rgba(255, 255, 255, .82);
    color: #4f963c;
    cursor: pointer;
}

.danger-button,
.danger-button:hover,
button.danger-button[type="submit"],
button.danger-button[type="submit"]:hover {
    background: linear-gradient(135deg, #ffe1dd, #ef7568) !important;
    color: #64190f !important;
    box-shadow: 0 12px 24px rgba(202, 74, 58, .22) !important;
}

/* Flat app surfaces, semantic buttons. Gradients stay only in menu/banner. */
body,
.app-shell,
.content,
.auth-content,
.login-screen,
.auth-box,
.pB,
.mobile-nav {
    background: #f7fbef !important;
}

.panel,
.form-card,
.admin-card,
.table-section,
.work-card,
.dashboard-hero,
.dashboard-metrics article,
.metrics-grid article,
.record-item,
.metric-card,
.order-card,
.edit-row.modal-open td,
.crud-modal-header,
.edit-row.modal-open .inline-edit-form input,
.edit-row.modal-open .inline-edit-form select,
.edit-row.modal-open .inline-edit-form textarea,
input,
select,
textarea,
.search {
    background: #ffffff !important;
}

.admin-card,
.table-section,
.dashboard-hero,
.panel,
.work-card,
.record-item {
    border-color: #dcebc7 !important;
    box-shadow: 0 14px 32px rgba(93, 132, 67, .11) !important;
}

.edit-row.modal-open {
    background: rgba(34, 57, 29, .34) !important;
}

.crud-modal-header {
    border-bottom: 1px solid #dcebc7 !important;
}

.edit-row.modal-open .modal-actions {
    background: #fbfdf7 !important;
}

.primary-button,
.btn-lime,
.admin-card .primary-button,
.table-section .primary-button,
button[type="submit"]:not(.danger-button),
.modal-close {
    background: #cfeea3 !important;
    color: #244a24 !important;
    border: 1px solid #b9df83 !important;
    box-shadow: 0 10px 20px rgba(116, 166, 73, .16) !important;
}

.primary-button:hover,
.btn-lime:hover,
.admin-card .primary-button:hover,
.table-section .primary-button:hover,
button[type="submit"]:not(.danger-button):hover {
    background: #bfe686 !important;
    color: #1f421f !important;
    box-shadow: 0 12px 24px rgba(116, 166, 73, .2) !important;
}

.table-action,
.filter-clear {
    background: #ffe889 !important;
    color: #5b4300 !important;
    border: 1px solid #efd36a !important;
    box-shadow: 0 9px 18px rgba(196, 150, 30, .16) !important;
}

.table-action:hover,
.filter-clear:hover {
    background: #ffdf61 !important;
    color: #4d3900 !important;
}

.danger-button,
.danger-button:hover,
button.danger-button[type="submit"],
button.danger-button[type="submit"]:hover {
    background: #f27a6d !important;
    color: #ffffff !important;
    border: 1px solid #df6659 !important;
    box-shadow: 0 10px 20px rgba(202, 74, 58, .18) !important;
}

.badge,
.filter-count,
.card-heading span {
    background: #e8f5c9 !important;
    color: #3f7534 !important;
    box-shadow: none !important;
}

table tbody tr:not(.edit-row):hover,
.edit-row td {
    background: #f4faea !important;
}

/* Preserve the requested menu/banner treatment. */
.sidebar {
    background:
        linear-gradient(180deg, #ffffff 0 104px, rgba(224, 247, 126, .96) 104px, rgba(143, 215, 89, .98) 56%, rgba(95, 186, 95, .98) 100%) !important;
}

.sidebar-top,
.brand,
.brand-mark {
    background: #ffffff !important;
}

.sidebar .nav a,
.sidebar .logout-form .ghost-button,
.mobile-tabbar a,
.mobile-logout button {
    background: #ffffff !important;
    color: #17351e !important;
    border: 1px solid rgba(255, 255, 255, .8) !important;
    box-shadow: 0 9px 20px rgba(96, 156, 73, .18) !important;
}

.sidebar .nav a:hover,
.sidebar .nav a.active,
.sidebar .logout-form .ghost-button:hover,
.mobile-tabbar a.active,
.mobile-tabbar a:hover,
.mobile-logout button:hover {
    background: #eef9c8 !important;
}

.mobile-tabbar {
    background: linear-gradient(135deg, rgba(224, 247, 126, .96), rgba(124, 203, 85, .96)) !important;
}

.import-card {
    margin-top: 18px;
}

.file-import-box {
    display: grid;
    gap: 7px;
    padding: 16px;
    border: 1px dashed #b9d98b;
    border-radius: 16px;
    background: #ffffff;
    color: #244a24;
}

.file-import-box strong {
    font-size: 15px;
}

.file-import-box small {
    color: #667860;
    line-height: 1.45;
}

.file-import-box input {
    margin-top: 4px;
    width: 100%;
}

.import-form .primary-button {
    justify-self: start;
}

.ot-board-table {
    border-collapse: separate;
    border-spacing: 0 10px;
    min-width: 1120px;
}

.ot-board-table thead th {
    border-bottom: 0;
    color: #5d6e57;
    font-size: 11px;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.ot-board-table tbody tr.ot-row {
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(73, 111, 54, .08);
}

.ot-board-table tbody tr.ot-row td {
    border-top: 1px solid #e0edce;
    border-bottom: 1px solid #e0edce;
    vertical-align: middle;
}

.ot-board-table tbody tr.ot-row td:first-child {
    border-left: 1px solid #e0edce;
    border-radius: 16px 0 0 16px;
}

.ot-board-table tbody tr.ot-row td:last-child {
    border-right: 1px solid #e0edce;
    border-radius: 0 16px 16px 0;
}

.ot-contract-cell strong,
.ot-user-cell {
    color: #17351e;
    font-weight: 900;
}

.ot-contract-cell small {
    display: block;
    margin-top: 4px;
    color: #708067;
    font-size: 11px;
    font-weight: 800;
}

.ot-address-cell {
    min-width: 210px;
    color: #354834;
}

.ot-municipality-pill {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    background: #eef8d4;
    color: #315d2e;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}

@media (max-width: 760px) {
    .import-form .primary-button {
        width: 100%;
        justify-self: stretch;
    }

    .ot-board-table {
        min-width: 0;
        border-spacing: 0 12px;
    }

    .ot-board-table thead {
        display: none;
    }

    .ot-board-table,
    .ot-board-table tbody,
    .ot-board-table tr,
    .ot-board-table td {
        display: block;
        width: 100%;
    }

    .ot-board-table tbody tr.ot-row {
        padding: 14px;
        border: 1px solid #e0edce;
        border-radius: 18px;
    }

    .ot-board-table tbody tr.ot-row td,
    .ot-board-table tbody tr.ot-row td:first-child,
    .ot-board-table tbody tr.ot-row td:last-child {
        display: grid;
        grid-template-columns: 96px minmax(0, 1fr);
        gap: 10px;
        padding: 8px 0;
        border: 0;
        border-radius: 0;
    }

    .ot-board-table tbody tr.ot-row td::before {
        content: attr(data-label);
        color: #708067;
        font-size: 11px;
        font-weight: 900;
        text-transform: uppercase;
    }

    .ot-board-table .ot-contract-cell {
        grid-template-columns: 1fr !important;
        padding-bottom: 12px !important;
        border-bottom: 1px solid #edf4e3 !important;
    }

    .ot-board-table .ot-contract-cell::before {
        display: none;
    }

    .ot-board-table .table-action {
        width: 100%;
        justify-content: center;
    }
}

/* Mobile recovery: keep the top brand compact and leave navigation only below. */
@media (max-width: 900px) {
    .app-shell:has(.content),
    body.sidebar-collapsed .app-shell:has(.content) {
        display: block !important;
        grid-template-columns: 1fr !important;
        padding-bottom: calc(92px + env(safe-area-inset-bottom)) !important;
    }

    .sidebar,
    body.sidebar-collapsed .sidebar {
        position: sticky !important;
        top: 0 !important;
        z-index: 35 !important;
        width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        padding: 10px 12px !important;
        border-radius: 0 0 18px 18px !important;
        background: #ffffff !important;
        box-shadow: 0 8px 24px rgba(76, 120, 50, .14) !important;
    }

    .sidebar-top,
    body.sidebar-collapsed .sidebar-top {
        min-height: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        justify-content: flex-start !important;
        background: #ffffff !important;
    }

    .brand,
    body.sidebar-collapsed .brand {
        width: 100% !important;
        min-height: 42px !important;
        justify-content: flex-start !important;
        gap: 10px !important;
        background: #ffffff !important;
    }

    .brand-mark {
        width: 42px !important;
        height: 42px !important;
        flex: 0 0 42px !important;
    }

    .brand-text,
    body.sidebar-collapsed .brand-text {
        width: auto !important;
        opacity: 1 !important;
        overflow: visible !important;
        white-space: normal !important;
        color: #17351e !important;
    }

    .brand-text strong,
    .brand-text small {
        color: #17351e !important;
    }

    .sidebar-toggle,
    .sidebar .nav,
    .sidebar .logout-form,
    body.sidebar-collapsed .sidebar-toggle,
    body.sidebar-collapsed .sidebar .nav,
    body.sidebar-collapsed .sidebar .logout-form {
        display: none !important;
    }

    .content {
        padding-top: 12px !important;
    }

    .mobile-tabbar {
        position: fixed !important;
        left: 10px !important;
        right: 10px !important;
        top: auto !important;
        bottom: calc(10px + env(safe-area-inset-bottom)) !important;
        z-index: 70 !important;
        display: flex !important;
        max-width: calc(100vw - 20px) !important;
        overflow-x: auto !important;
    }

    .mobile-tabbar a,
    .mobile-logout,
    .mobile-logout button {
        flex: 0 0 72px !important;
    }
}

/* Mobile CRUD modal: keep actions visible and avoid opening below the fold. */
@media (max-width: 760px) {
    body.crud-modal-active {
        overflow: hidden !important;
    }

    .edit-row.modal-open {
        align-items: center !important;
        justify-items: center !important;
        padding: max(10px, env(safe-area-inset-top)) 10px max(10px, env(safe-area-inset-bottom)) !important;
    }

    .edit-row.modal-open td {
        width: min(100%, 430px) !important;
        height: min(88dvh, 680px) !important;
        max-height: min(88dvh, 680px) !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
        border-radius: 22px !important;
    }

    .crud-modal-header {
        flex: 0 0 auto !important;
        position: relative !important;
        top: auto !important;
    }

    .edit-row.modal-open .inline-edit-form,
    .edit-row.modal-open .wide-edit-form {
        flex: 1 1 auto !important;
        min-height: 0 !important;
        overflow-y: auto !important;
        padding-bottom: 16px !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .edit-row.modal-open .modal-actions {
        flex: 0 0 auto !important;
        position: sticky !important;
        bottom: 0 !important;
        z-index: 3 !important;
        width: 100% !important;
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 8px !important;
        padding: 10px 14px calc(12px + env(safe-area-inset-bottom)) !important;
        background: #ffffff !important;
        box-shadow: 0 -10px 24px rgba(72, 110, 48, .12) !important;
    }

    .edit-row.modal-open .modal-actions::before {
        display: none !important;
    }

    .edit-row.modal-open .modal-actions form,
    .edit-row.modal-open .modal-actions button,
    .edit-row.modal-open .modal-actions .primary-button,
    .edit-row.modal-open .modal-actions .danger-button {
        width: 100% !important;
        min-height: 44px !important;
    }
}

/* Google-style field cards for mobile acta forms. */
.field-report-form .google-field {
    background: #ffffff !important;
}

.field-report-form .google-field input,
.field-report-form .google-field select,
.field-report-form .google-field textarea {
    background: #fbfdf7 !important;
    border-color: #d4e4c2 !important;
    box-shadow: none !important;
}

.field-report-form .google-field input:focus,
.field-report-form .google-field select:focus,
.field-report-form .google-field textarea:focus {
    background: #ffffff !important;
    border-color: #9ed55b !important;
    box-shadow: 0 0 0 3px rgba(184, 229, 93, .2) !important;
}

.installer-scope-box select[multiple] {
    min-height: 132px;
    padding: 10px;
}

.installer-scope-box option {
    padding: 8px 10px;
}

.ot-board-table td[data-label="Barrio"],
.ot-board-table td[data-label="Direccion"] {
    max-width: 260px;
}

.order-filter-panel {
    display: grid;
    gap: 12px;
    margin: 0 0 16px;
    padding: 14px;
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid rgba(132, 176, 76, .2);
    box-shadow: 0 12px 30px rgba(80, 112, 55, .1);
}

.order-filter-heading {
    align-items: center;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(220px, 1fr) minmax(260px, 420px);
}

.order-filter-heading span {
    color: #3f8c30;
    display: block;
    font-size: .72rem;
    font-weight: 950;
    letter-spacing: 0;
    text-transform: uppercase;
}

.order-filter-heading strong {
    color: #18351f;
    display: block;
    font-size: 1.05rem;
    font-weight: 950;
}

.order-filter-panel .search,
.order-filter-panel select {
    width: 100%;
    min-height: 44px;
    border: 1px solid #d6e6c5;
    border-radius: 14px;
    padding: 10px 12px;
    background: #fbfdf7;
    color: #213321;
    font-weight: 700;
}

.order-filter-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(150px, 1fr));
    gap: 10px;
}

.order-filter-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #5f705b;
    font-size: 13px;
    font-weight: 800;
}

.order-filter-footer button {
    min-height: 38px;
    border: 0;
    border-radius: 999px;
    padding: 0 16px;
    background: #ecf5e2;
    color: #31572a;
    font-weight: 900;
    cursor: pointer;
}

.order-filter-empty {
    background: rgba(247, 253, 238, .92);
    border: 1px dashed rgba(126, 184, 62, .5);
    border-radius: 16px;
    color: #526952;
    font-size: .9rem;
    font-weight: 850;
    margin: 0 0 16px;
    padding: 16px;
    text-align: center;
}

.order-action-card {
    align-content: start;
}

.order-card-actions {
    display: grid;
    grid-template-columns: 44px 44px 44px minmax(110px, 1fr);
    align-items: center;
    gap: 9px;
    margin-top: 4px;
}

.quick-action,
.open-order-button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 900;
}

.quick-action {
    background: #ffffff;
    border: 1px solid rgba(128, 168, 82, .22);
    color: #2c4a28;
    box-shadow: 0 8px 16px rgba(70, 106, 52, .1);
}

.quick-action svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.quick-action.whatsapp {
    color: #128c3a;
}

.quick-action.call {
    color: #2563eb;
}

.quick-action.mail {
    color: #6d5bd0;
}

.quick-action[aria-disabled="true"] {
    opacity: .38;
    pointer-events: none;
}

.open-order-button {
    padding: 0 18px;
    border: 0;
    cursor: pointer;
    font-family: inherit;
    font-size: .9rem;
    background: #b9df62;
    color: #1d3218;
    box-shadow: 0 12px 24px rgba(132, 176, 76, .28);
}

.preopen-novelty-card {
    max-width: 640px;
}

.preopen-question {
    display: grid;
    gap: 8px;
    padding: 12px 0 16px;
}

.preopen-question h2 {
    color: #14351f;
    font-size: 1.25rem;
    font-weight: 950;
    margin: 0;
}

.preopen-question p {
    color: #526952;
    font-weight: 750;
    margin: 0;
}

.preopen-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}

.preopen-actions .primary-button,
.preopen-actions .table-action,
.preopen-actions .ghost-button {
    min-height: 42px;
}

.preopen-novelty-form {
    background: #f8fdf0;
    border: 1px solid rgba(126, 184, 62, .32);
    border-radius: 16px;
    display: grid;
    gap: 12px;
    padding: 14px;
}

.preopen-novelty-form > strong {
    color: #18351f;
    font-size: .92rem;
    font-weight: 950;
}

.novelty-check-grid {
    display: grid;
    gap: 9px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.novelty-check-grid label {
    align-items: flex-start;
    background: #ffffff;
    border: 1px solid rgba(184, 229, 93, .46);
    border-radius: 12px;
    color: #213321;
    display: flex;
    font-size: .88rem;
    font-weight: 850;
    gap: 8px;
    line-height: 1.25;
    padding: 10px;
}

.novelty-check-grid input {
    accent-color: #77b82a;
    margin-top: 2px;
}

.preopen-novelty-form textarea {
    border: 1px solid #d6e6c5;
    border-radius: 14px;
    min-height: 86px;
    padding: 12px;
    resize: vertical;
    width: 100%;
}

.admin-live-board {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin: 16px 0;
}

.status-mini-table {
    min-width: 720px;
}

.status-mini-table td strong {
    color: #203919;
}

@media (max-width: 920px) {
    .order-filter-grid,
    .admin-live-board {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .order-filter-panel {
        position: sticky;
        top: 8px;
        z-index: 12;
        border-radius: 16px;
    }

    .order-card-actions {
        grid-template-columns: repeat(3, 44px) 1fr;
    }

    .status-mini-table {
        min-width: 0;
    }
}

/* Desktop admin polish: forms breathe above, tables use the full workspace. */
@media (min-width: 1024px) {
    .content {
        max-width: none;
    }

    .single-module {
        grid-template-columns: repeat(2, minmax(360px, 1fr)) !important;
        align-items: start;
        max-width: min(1760px, calc(100vw - 96px)) !important;
        gap: 20px !important;
    }

    .single-module > .admin-card {
        position: relative !important;
        top: auto !important;
        max-height: none !important;
        overflow: visible !important;
    }

    .single-module > .table-section {
        grid-column: 1 / -1;
        max-height: none !important;
        overflow: visible !important;
        min-width: 0;
    }

    .single-module > .table-section .table-wrap {
        max-height: calc(100vh - 250px);
        overflow: auto;
        padding: 4px 4px 16px;
        scrollbar-width: thin;
    }

    .section-title {
        align-items: flex-start;
        gap: 14px;
        padding: 18px 20px;
    }

    .table-filters {
        flex: 1 1 auto;
        justify-content: flex-end;
        align-items: center;
    }

    .table-filters .search {
        flex: 1 1 280px;
        max-width: 420px;
    }

    .table-filters select {
        min-width: 168px;
    }

    table[data-filterable],
    .status-mini-table {
        width: 100%;
        min-width: 0;
    }

    .table-section table thead th {
        position: sticky;
        top: 0;
        z-index: 2;
        background: #f7fbea;
        box-shadow: 0 1px 0 #dcebc6;
    }

    .table-section table th,
    .table-section table td {
        padding: 13px 14px;
        vertical-align: middle;
    }

    .table-section table td {
        white-space: normal;
        line-height: 1.35;
    }

    .ot-board-table {
        min-width: 1320px;
        border-spacing: 0 12px;
    }

    .ot-board-table tbody tr.ot-row td {
        max-width: 220px;
    }

    .ot-board-table .ot-contract-cell {
        min-width: 160px;
    }

    .ot-board-table .ot-user-cell,
    .ot-board-table .ot-address-cell {
        min-width: 220px;
    }

    .ot-board-table td[data-label="Accion"] {
        min-width: 140px;
    }
}

.template-download-card {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    padding: 14px 16px;
    border-radius: 16px;
    background: linear-gradient(135deg, #f8fff0 0%, #e2f5bc 100%);
    border: 1px solid #cfe99a;
    color: #21351f;
    text-decoration: none;
    box-shadow: 0 12px 24px rgba(113, 165, 72, .12);
}

.excel-download-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: #1f8f4d;
    color: #ffffff;
    box-shadow: inset 0 -10px 18px rgba(0, 0, 0, .12), 0 10px 18px rgba(31, 143, 77, .24);
}

.excel-download-icon svg {
    width: 28px;
    height: 28px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.template-download-card strong {
    font-size: 15px;
    font-weight: 900;
}

.template-download-card small {
    color: #64765b;
    line-height: 1.45;
}

.template-download-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 30px rgba(113, 165, 72, .18);
}

/* Refined admin workspace: balanced capture panels and readable data grids. */
@media (min-width: 1024px) {
    .module-header,
    .single-module,
    .records-grid,
    .module-launcher,
    .dashboard-metrics,
    .home-summary,
    .dashboard-hero,
    .admin-live-board {
        max-width: min(1680px, calc(100vw - 96px)) !important;
    }

    .single-module {
        grid-template-columns: 1fr !important;
        gap: 22px !important;
    }

    .single-module > .admin-card {
        grid-column: 1 / -1;
        width: 100%;
        padding: 22px;
        border-radius: 22px;
        background: rgba(255, 255, 255, .84) !important;
        border: 1px solid rgba(174, 218, 66, .24) !important;
        box-shadow: 0 18px 44px rgba(85, 130, 54, .12) !important;
    }

    .admin-card .card-heading {
        margin-bottom: 18px;
    }

    .admin-card .stack-form {
        display: grid;
        grid-template-columns: repeat(4, minmax(180px, 1fr));
        gap: 12px;
        align-items: end;
    }

    .admin-card .stack-form > input,
    .admin-card .stack-form > select,
    .admin-card .stack-form > textarea,
    .admin-card .stack-form > label,
    .admin-card .stack-form > .form-row,
    .admin-card .stack-form > .template-download-card {
        min-width: 0;
    }

    .admin-card .stack-form > textarea,
    .admin-card .stack-form > .file-import-box,
    .admin-card .stack-form > .template-download-card {
        grid-column: span 2;
    }

    .admin-card .stack-form > .primary-button {
        align-self: stretch;
        min-height: 48px;
    }

    .admin-card .form-row {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .admin-card input,
    .admin-card select,
    .admin-card textarea,
    .table-filters .search,
    .table-filters select {
        min-height: 48px;
        border-radius: 16px;
        background: #fbfdf7 !important;
        border-color: #dbeaba !important;
        box-shadow: none !important;
    }

    .import-card {
        display: grid;
        grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
        gap: 14px 18px;
        align-items: start;
        padding: 18px !important;
    }

    .import-card .card-heading {
        grid-column: 1 / -1;
    }

    .import-card .template-download-card {
        margin: 0;
        height: 100%;
    }

    .import-card .import-form {
        grid-template-columns: minmax(260px, 1fr) minmax(190px, .7fr) auto;
        gap: 10px;
        align-items: stretch;
    }

    .import-card .import-form .file-import-box {
        grid-column: auto;
    }

    .import-card .import-form .form-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .import-card .primary-button {
        min-width: 160px;
        align-self: stretch;
        background: #a9d957 !important;
        color: #1e3219 !important;
        box-shadow: 0 12px 24px rgba(137, 184, 67, .2) !important;
    }

    .file-import-box {
        padding: 12px 14px !important;
        border-radius: 16px !important;
        background: #fbfdf7 !important;
    }

    .file-import-box strong {
        font-size: 14px;
    }

    .file-import-box small {
        font-size: 12px;
    }

    .table-section {
        grid-column: 1 / -1;
        border-radius: 24px !important;
        background: rgba(255, 255, 255, .9) !important;
        border: 1px solid rgba(174, 218, 66, .2) !important;
        box-shadow: 0 20px 50px rgba(75, 118, 52, .12) !important;
        overflow: hidden;
    }

    .section-title {
        padding: 20px 22px !important;
        background: #fbfdf5;
        border-bottom: 1px solid #e5efcf !important;
    }

    .section-title h2 {
        font-size: 20px;
        color: #1f341c;
    }

    .table-wrap {
        padding: 12px 18px 20px !important;
        background: #ffffff;
    }

    .table-section table:not(.ot-board-table) {
        width: 100%;
        min-width: 900px;
        border-collapse: separate;
        border-spacing: 0 10px;
    }

    .table-section table:not(.ot-board-table) thead th {
        padding: 12px 14px;
        color: #65765c;
        font-size: 11px;
        letter-spacing: .04em;
        text-transform: uppercase;
        background: #f8fcec;
        border: 0;
    }

    .table-section table:not(.ot-board-table) tbody tr:not(.edit-row) {
        box-shadow: 0 10px 24px rgba(74, 112, 52, .07);
    }

    .table-section table:not(.ot-board-table) tbody tr:not(.edit-row) td {
        padding: 15px 14px;
        background: #ffffff;
        border-top: 1px solid #e2edcf;
        border-bottom: 1px solid #e2edcf;
    }

    .table-section table:not(.ot-board-table) tbody tr:not(.edit-row) td:first-child {
        border-left: 1px solid #e2edcf;
        border-radius: 16px 0 0 16px;
        font-weight: 900;
        color: #1e351c;
    }

    .table-section table:not(.ot-board-table) tbody tr:not(.edit-row) td:last-child {
        border-right: 1px solid #e2edcf;
        border-radius: 0 16px 16px 0;
    }

    .table-action {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 38px;
        padding: 0 14px;
        border-radius: 999px;
    }
}

@media (min-width: 1024px) and (max-width: 1320px) {
    .admin-card .stack-form {
        grid-template-columns: repeat(2, minmax(180px, 1fr));
    }

    .import-card,
    .import-card .import-form {
        grid-template-columns: 1fr;
    }
}

/* Installations table: strong desktop structure, no cramped vertical words. */
@media (min-width: 1024px) {
    .installations-module .table-section {
        background: #ffffff !important;
    }

    .installations-module .table-wrap {
        overflow-x: auto;
        overflow-y: auto;
        max-height: calc(100vh - 230px);
    }

    .installations-module .ot-board-table {
        min-width: 1480px;
        width: 100%;
        table-layout: fixed;
        border-collapse: separate;
        border-spacing: 0 12px;
    }

    .installations-module .ot-board-table th,
    .installations-module .ot-board-table td {
        white-space: normal !important;
        word-break: normal !important;
        overflow-wrap: normal !important;
        hyphens: none !important;
        line-height: 1.35;
    }

    .installations-module .ot-board-table thead th {
        padding: 12px 14px;
        background: #f4f9e6;
        color: #63745b;
        font-size: 11px;
        letter-spacing: .04em;
        text-transform: uppercase;
        border: 0;
    }

    .installations-module .ot-board-table tbody tr.ot-row {
        box-shadow: 0 12px 26px rgba(78, 118, 54, .08);
    }

    .installations-module .ot-board-table tbody tr.ot-row td {
        padding: 15px 14px;
        background: #ffffff;
        max-width: none;
    }

    .installations-module .ot-board-table th:nth-child(1),
    .installations-module .ot-board-table td:nth-child(1) {
        width: 170px;
    }

    .installations-module .ot-board-table th:nth-child(2),
    .installations-module .ot-board-table td:nth-child(2),
    .installations-module .ot-board-table th:nth-child(3),
    .installations-module .ot-board-table td:nth-child(3),
    .installations-module .ot-board-table th:nth-child(5),
    .installations-module .ot-board-table td:nth-child(5),
    .installations-module .ot-board-table th:nth-child(9),
    .installations-module .ot-board-table td:nth-child(9),
    .installations-module .ot-board-table th:nth-child(11),
    .installations-module .ot-board-table td:nth-child(11),
    .installations-module .ot-board-table th:nth-child(12),
    .installations-module .ot-board-table td:nth-child(12) {
        width: 120px;
    }

    .installations-module .ot-board-table th:nth-child(4),
    .installations-module .ot-board-table td:nth-child(4),
    .installations-module .ot-board-table th:nth-child(6),
    .installations-module .ot-board-table td:nth-child(6) {
        width: 220px;
    }

    .installations-module .ot-board-table th:nth-child(7),
    .installations-module .ot-board-table td:nth-child(7),
    .installations-module .ot-board-table th:nth-child(8),
    .installations-module .ot-board-table td:nth-child(8),
    .installations-module .ot-board-table th:nth-child(10),
    .installations-module .ot-board-table td:nth-child(10) {
        width: 160px;
    }

    .installations-module .ot-contract-cell strong {
        display: block;
        font-size: 15px;
    }

    .installations-module .ot-contract-cell small {
        display: inline-flex;
        margin-top: 7px;
        padding: 4px 8px;
        border-radius: 999px;
        background: #eef8d4;
        color: #55714d;
    }

    .installations-module .ot-user-cell {
        font-size: 14px;
        color: #1c311a;
    }

    .installations-module .ot-address-cell {
        color: #3f513b;
    }

    .installations-module .badge {
        display: inline-flex;
        min-height: 30px;
        align-items: center;
        padding: 0 10px;
        border-radius: 999px;
        white-space: nowrap;
    }

    .installations-module .table-action {
        min-width: 116px;
        background: #f7fbe9;
        border: 1px solid #dbeaba;
    }
}

/* Compact admin controls: keep actions button-sized, not panel-sized. */
@media (min-width: 1024px) {
    .admin-card .stack-form > .primary-button,
    .import-card .primary-button,
    .table-section .primary-button {
        width: auto !important;
        min-width: 150px !important;
        max-width: 220px !important;
        min-height: 42px !important;
        align-self: center !important;
        justify-self: start !important;
        padding: 0 20px !important;
        border-radius: 999px !important;
        font-size: 13px !important;
        letter-spacing: .02em !important;
        box-shadow: 0 10px 20px rgba(137, 184, 67, .18) !important;
    }

    .import-card .import-form {
        grid-template-columns: minmax(260px, 1fr) minmax(190px, 280px) max-content !important;
        align-items: center !important;
    }

    .installations-module .section-title {
        display: grid !important;
        grid-template-columns: minmax(220px, auto) 1fr;
        align-items: start !important;
    }

    .installations-module .table-filters {
        display: grid !important;
        grid-template-columns: minmax(220px, 1.25fr) repeat(3, minmax(130px, .72fr));
        gap: 8px !important;
        justify-content: stretch !important;
        align-items: center !important;
    }

    .installations-module .table-filters .search,
    .installations-module .table-filters select {
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        min-height: 40px !important;
        padding: 8px 11px !important;
        border-radius: 13px !important;
        font-size: 13px !important;
    }

    .installations-module .table-filters .filter-count,
    .installations-module .table-filters .filter-clear {
        min-height: 34px !important;
        font-size: 12px !important;
    }
}

@media (min-width: 1024px) and (max-width: 1320px) {
    .installations-module .table-filters {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

.company-review-panel {
    max-width: min(1680px, calc(100vw - 96px));
    margin: 0 auto 22px;
}

.company-upload-review-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
    padding: 18px;
}

.company-upload-review-card {
    display: grid;
    gap: 14px;
    padding: 16px;
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid #e0edce;
    box-shadow: 0 12px 28px rgba(75, 118, 52, .1);
}

.company-upload-review-card h3 {
    margin: 8px 0 4px;
    color: #1f341c;
    font-size: 17px;
    overflow-wrap: anywhere;
}

.company-upload-review-card p {
    margin: 0;
    color: #65765c;
    font-weight: 800;
}

.company-upload-review-card dl {
    display: grid;
    gap: 8px;
    margin: 0;
}

.company-upload-review-card dl div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 10px;
    border-radius: 12px;
    background: #f7fbea;
}

.company-upload-review-card dt {
    color: #6a7d62;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.company-upload-review-card dd {
    margin: 0;
    color: #21351f;
    font-weight: 900;
    text-align: right;
}

.upload-preview {
    border: 1px solid #e1edcf;
    border-radius: 14px;
    background: #fbfdf7;
    overflow: hidden;
}

.preview-open-button {
    justify-self: start;
}

.upload-preview-modal {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(24, 43, 22, .42);
    backdrop-filter: blur(8px);
}

.upload-preview-modal[hidden] {
    display: none !important;
}

.upload-preview-dialog {
    width: min(1180px, calc(100vw - 28px));
    height: min(760px, calc(100dvh - 28px));
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 24px;
    background: #ffffff;
    border: 1px solid #dcebc6;
    box-shadow: 0 28px 70px rgba(23, 51, 21, .28);
}

.upload-preview-dialog .crud-modal-header {
    flex: 0 0 auto;
    position: relative;
    top: auto;
}

.upload-preview-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 18px;
    background: #f7fbea;
    border-bottom: 1px solid #e1edcf;
}

.upload-preview-meta span {
    display: inline-flex;
    min-height: 30px;
    align-items: center;
    padding: 0 10px;
    border-radius: 999px;
    background: #ffffff;
    color: #31572a;
    font-size: 12px;
    font-weight: 900;
    border: 1px solid #dcebc6;
}

.upload-preview summary {
    cursor: pointer;
    padding: 11px 12px;
    color: #21351f;
    font-weight: 900;
}

.upload-preview-table-wrap {
    flex: 1 1 auto;
    max-height: none;
    overflow: auto;
    border-top: 1px solid #e1edcf;
}

.upload-preview-table {
    width: 100%;
    min-width: 980px;
    border-collapse: collapse;
    background: #ffffff;
}

.upload-preview-table th,
.upload-preview-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #edf4e2;
    text-align: left;
    font-size: 13px;
    line-height: 1.35;
}

.upload-preview-table th {
    position: sticky;
    top: 0;
    background: #f4f9e6;
    color: #63745b;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.upload-preview small {
    display: block;
    padding: 9px 12px 12px;
    color: #6b7e63;
    font-weight: 800;
}

.upload-preview-dialog > small {
    flex: 0 0 auto;
    display: block;
    padding: 10px 18px 16px;
    color: #6b7e63;
    font-weight: 800;
}

@media (max-width: 760px) {
    .upload-preview-modal {
        padding: 0;
    }

    .upload-preview-dialog {
        width: 100vw;
        height: 100dvh;
        border-radius: 0;
    }

    .upload-preview-table {
        min-width: 900px;
    }
}

.company-approve-form {
    display: grid;
    gap: 10px;
}

body.preview-modal-active {
    overflow: hidden;
}

body.preview-modal-active .sidebar,
body.preview-modal-active .mobile-tabbar {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.upload-preview-modal {
    z-index: 10000 !important;
    padding: 16px !important;
    place-items: stretch !important;
    background: rgba(12, 31, 20, .58) !important;
    backdrop-filter: blur(10px) saturate(1.05);
}

.upload-preview-dialog {
    width: min(1500px, calc(100vw - 20px)) !important;
    height: calc(100dvh - 20px) !important;
    max-width: none !important;
    max-height: none !important;
    margin: auto;
    border-radius: 12px;
    border: 1px solid rgba(183, 216, 61, .4);
    background: #fbfdf7;
    box-shadow: 0 30px 80px rgba(11, 31, 18, .36);
}

.upload-preview-table-wrap {
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
}

.upload-preview-table {
    width: max-content !important;
    min-width: 100% !important;
}

.upload-preview-table th,
.upload-preview-table td {
    min-width: 150px;
    max-width: 340px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.upload-preview-table th {
    z-index: 2;
}

.upload-preview-table td:hover {
    white-space: normal;
    overflow: visible;
}

.company-upload-review-card textarea {
    width: 100%;
    min-height: 82px;
    border: 1px solid #dbeaba;
    border-radius: 14px;
    padding: 10px 12px;
    background: #fff;
    color: #21351f;
    resize: vertical;
}

.company-upload-review-card .primary-button,
.company-upload-review-card .danger-button,
.company-upload-module .primary-button {
    width: auto !important;
    min-height: 42px !important;
    justify-self: start !important;
    padding: 0 18px !important;
    border-radius: 999px !important;
}

@media (max-width: 760px) {
    .upload-preview-modal {
        padding: 0 !important;
    }

    .upload-preview-dialog {
        width: 100vw !important;
        height: 100dvh !important;
        border-radius: 0 !important;
    }

    .upload-preview-table th,
    .upload-preview-table td {
        min-width: 132px;
        max-width: 260px;
        padding: 10px 11px;
    }

    .company-review-panel {
        max-width: none;
        margin: 0 0 16px;
    }

    .company-upload-review-grid {
        grid-template-columns: 1fr;
        padding: 12px;
    }
}

.order-filter-panel {
    overflow: hidden;
}

.order-filter-heading {
    grid-template-columns: minmax(0, 1fr) minmax(240px, 420px);
}

.order-filter-heading > div,
.order-filter-heading .search,
.order-filter-grid select {
    min-width: 0;
}

.order-filter-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.preopen-novelty-modal {
    align-items: center !important;
    justify-items: center !important;
    padding: 18px !important;
    place-items: center !important;
}

.preopen-novelty-card {
    background:
        linear-gradient(135deg, rgba(248, 253, 240, .96), rgba(255, 255, 255, .98));
    border: 1px solid rgba(184, 229, 93, .52);
    border-radius: 22px;
    box-shadow: 0 30px 80px rgba(12, 31, 20, .28);
    display: grid;
    gap: 14px;
    max-height: min(760px, calc(100dvh - 36px));
    max-width: 680px;
    overflow: auto;
    padding: 18px;
    width: min(680px, calc(100vw - 36px));
}

.preopen-novelty-card .upload-preview-header {
    align-items: center;
    border-bottom: 1px solid rgba(184, 229, 93, .32);
    display: flex;
    gap: 12px;
    justify-content: space-between;
    padding-bottom: 12px;
}

.preopen-novelty-card .upload-preview-header span {
    color: #3f8c30;
    display: block;
    font-size: .72rem;
    font-weight: 950;
    letter-spacing: 0;
    text-transform: uppercase;
}

.preopen-novelty-card .upload-preview-header strong {
    color: #122b19;
    display: block;
    font-size: 1.08rem;
    font-weight: 950;
}

.preopen-novelty-card .upload-preview-header button {
    align-items: center;
    background: #eaf9bd;
    border: 1px solid rgba(126, 184, 62, .45);
    border-radius: 999px;
    color: #18351f;
    cursor: pointer;
    display: inline-flex;
    flex: 0 0 38px;
    font-family: inherit;
    font-size: .9rem;
    font-weight: 950;
    height: 38px;
    justify-content: center;
    text-transform: uppercase;
    width: 38px;
}

.preopen-novelty-card .primary-button,
.preopen-novelty-card .table-action,
.preopen-novelty-card .ghost-button {
    justify-content: center;
    text-align: center;
    white-space: normal;
}

@media (max-width: 900px) {
    .order-filter-heading {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 640px) {
    .order-filter-panel {
        border-radius: 14px;
        padding: 12px;
        position: relative;
        top: auto;
        z-index: auto;
    }

    .order-filter-heading strong {
        font-size: .98rem;
    }

    .order-filter-panel .search,
    .order-filter-panel select {
        min-height: 42px;
        padding: 9px 11px;
    }

    .order-filter-grid {
        grid-template-columns: 1fr;
    }

    .order-filter-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .order-filter-footer button {
        width: 100%;
    }

    .preopen-novelty-modal {
        padding: 10px !important;
    }

    .preopen-novelty-card {
        border-radius: 18px;
        max-height: calc(100dvh - 20px);
        padding: 14px;
        width: calc(100vw - 20px);
    }

    .preopen-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .preopen-actions .primary-button,
    .preopen-actions .table-action,
    .preopen-actions .ghost-button {
        width: 100% !important;
    }

    .novelty-check-grid {
        grid-template-columns: 1fr;
    }

    .novelty-check-grid label {
        min-height: 46px;
    }
}

.password-toggle-wrap {
    position: relative;
    display: block;
    width: 100%;
}

.password-toggle-wrap input {
    width: 100%;
    padding-right: 82px !important;
}

.password-toggle-button {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    min-width: 58px;
    min-height: 30px;
    border: 0;
    border-radius: 999px;
    background: #eef9c8;
    color: #254021;
    font-size: 11px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: inset 0 0 0 1px rgba(141, 190, 69, .3);
}

.password-toggle-button:hover {
    background: #dff482;
}

.upload-municipality-title,
.upload-name-cell strong {
    color: #2b6d2f;
    font-weight: 950;
}

.upload-name-cell {
    min-width: 220px;
}

.upload-name-cell small {
    display: block;
    margin-top: 4px;
    color: #6c7c63;
    font-size: 11px;
    font-weight: 750;
}

.company-uploads-status-table .company-upload-row {
    position: relative;
}

.company-uploads-status-table .company-upload-row td {
    border-bottom-width: 2px;
}

.company-uploads-status-table .status-pending td {
    background: #fff8dc;
    border-bottom-color: #f1ca54;
}

.company-uploads-status-table .status-authorized td {
    background: #edf9e8;
    border-bottom-color: #7fc65b;
}

.company-uploads-status-table .status-rejected td {
    background: #fff0f0;
    border-bottom-color: #e86b6b;
}

.status-badge.status-pending {
    background: #ffe89a !important;
    color: #6a4a00 !important;
}

.status-badge.status-authorized {
    background: #bdeba6 !important;
    color: #225a20 !important;
}

.status-badge.status-rejected {
    background: #ffb3b3 !important;
    color: #842424 !important;
}

.assigned-tech-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.assigned-tech-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    padding: 4px 5px 4px 11px;
    border-radius: 999px;
    background: #ffffff;
    color: #24401f;
    font-size: 12px;
    font-weight: 900;
    box-shadow: 0 8px 18px rgba(73, 124, 47, .12);
}

.company-upload-actions-cell {
    min-width: 220px;
}

.company-dashboard-panel {
    margin-bottom: 18px;
}

.company-summary-panel {
    display: grid;
    gap: 16px;
    margin-bottom: 18px;
    padding: 18px;
    border: 1px solid rgba(180, 219, 123, .46);
    background:
        linear-gradient(135deg, rgba(255,255,255,.94), rgba(246,251,229,.78));
}

.company-query-head {
    display: grid;
    grid-template-columns: minmax(220px, .8fr) minmax(320px, 1.35fr);
    gap: 18px;
    align-items: start;
}

.company-query-head span {
    color: #5b9b2d;
    font-size: 11px;
    font-weight: 950;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.company-query-head h2 {
    margin: 4px 0 5px;
    color: #1c7d29;
    font-size: 22px;
    line-height: 1.05;
    font-weight: 950;
}

.company-query-head p {
    margin: 0;
    color: #60715c;
    font-size: 13px;
    font-weight: 750;
}

.company-query-filters {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr .85fr;
    gap: 10px;
    width: 100%;
}

.company-query-filters input,
.company-query-filters select {
    min-height: 44px;
    border-radius: 8px;
    border-color: rgba(167, 211, 102, .72);
    background-color: rgba(255, 255, 255, .92);
    color: #102619;
    font-weight: 800;
}

.company-query-empty-copy {
    margin: 0;
    padding: 18px;
    border: 1px dashed rgba(132, 185, 73, .55);
    border-radius: 8px;
    background: rgba(248, 252, 235, .78);
    color: #58704f;
    font-size: 14px;
    font-weight: 800;
    text-align: center;
}

.company-summary-cards {
    gap: 12px;
}

.company-summary-card {
    display: grid;
    gap: 14px;
    padding: 16px;
    border: 1px solid rgba(160, 207, 92, .7);
    border-radius: 8px;
    background: linear-gradient(180deg, #ffffff, #fbfff0);
    box-shadow: 0 14px 30px rgba(73, 124, 47, .1);
}

.company-summary-card[hidden] {
    display: none !important;
}

.company-summary-card-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
}

.company-summary-card-head strong {
    display: block;
    color: #0e2818;
    font-size: 18px;
    line-height: 1.08;
    font-weight: 950;
}

.company-summary-card-head small {
    display: block;
    color: #52644d;
    font-size: 12px;
    font-weight: 800;
}

.company-summary-stats {
    display: grid;
    grid-template-columns: repeat(6, minmax(80px, 1fr));
    gap: 8px;
}

.company-summary-stats span {
    min-height: 58px;
    display: grid;
    place-items: center;
    gap: 2px;
    padding: 7px;
    border-radius: 8px;
    background: #f4fad9;
    border: 1px solid rgba(180, 219, 123, .52);
}

.company-summary-stats b {
    color: #0e2818;
    font-size: 22px;
    line-height: 1;
    font-weight: 950;
}

.company-summary-stats small {
    color: #438d32;
    font-size: 10px;
    line-height: 1;
    font-weight: 900;
    text-transform: uppercase;
}

.company-order-preview-list {
    display: grid;
    gap: 10px;
    align-content: start;
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    padding: 14px;
    background: linear-gradient(180deg, #f7fbea, #ffffff);
    border-top: 1px solid rgba(180, 219, 123, .5);
    border-bottom: 1px solid rgba(180, 219, 123, .35);
}

.company-order-preview-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 14px 16px;
    border-radius: 8px;
    border: 1px solid rgba(180, 219, 123, .68);
    background: linear-gradient(180deg, #ffffff, #fbfff2);
    box-shadow: 0 10px 22px rgba(73, 124, 47, .08);
}

.company-order-preview-card strong,
.company-order-preview-card span,
.company-order-preview-card small {
    display: block;
}

.company-order-preview-card strong {
    color: #0e2818;
    font-size: 15.5px;
    letter-spacing: 0;
    font-weight: 950;
}

.company-order-preview-card span {
    color: #1a3322;
    font-size: 13.5px;
    font-weight: 850;
}

.company-order-preview-card small {
    color: #52644d;
    font-size: 11px;
    font-weight: 750;
}

.company-order-preview-card > div:last-child {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    align-items: center;
}

.company-acta-empty {
    display: inline-flex !important;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    background: #f2f4ec;
    color: #66735f !important;
    font-size: 12px !important;
    font-weight: 900 !important;
}

.company-order-preview-card .badge {
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0 12px;
    background: #eaf7c6;
    color: #386326;
    font-size: 12px;
    font-weight: 950;
}

.company-summary-table th {
    color: #2f6f20;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.company-summary-table td {
    vertical-align: middle;
}

.company-summary-table tbody tr {
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(73, 124, 47, .08);
}

.company-summary-table tbody td:nth-child(n+3) {
    color: #0e2818;
    font-size: 18px;
    font-weight: 950;
}

.tech-contact-actions {
    display: grid;
    gap: 9px;
}

.tech-contact-row {
    display: grid;
    gap: 6px;
}

.tech-contact-row small {
    color: #52644d;
    font-size: 11px;
    font-weight: 900;
}

.tech-contact-row > div {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.tech-action-button {
    min-height: 34px;
    border: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 11px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 950;
    text-decoration: none;
    box-shadow: 0 10px 20px rgba(39, 99, 45, .16);
    cursor: pointer;
    font-family: inherit;
}

.tech-action-button svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
}

.tech-action-button.whatsapp {
    background: #25d366;
}

.tech-action-button.call {
    background: #2563eb;
}

.tech-action-button.preview {
    background: #eef9c8;
    color: #24401f;
    border: 1px solid rgba(135, 181, 77, .34);
    box-shadow: 0 10px 20px rgba(73, 124, 47, .12);
}

.tech-action-button.approve {
    background: #d9f99d;
    color: #234018;
    border: 1px solid rgba(115, 190, 76, .35);
}

.tech-action-button.reject {
    background: #fee2e2;
    color: #8a1f1f;
    border: 1px solid rgba(239, 68, 68, .28);
}

.tech-action-button:hover {
    filter: brightness(.97) saturate(1.08);
    transform: translateY(-1px);
}

.tech-action-button[aria-disabled="true"] {
    opacity: .42;
    pointer-events: none;
}

.installer-check-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.installer-check-option {
    min-height: 62px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid rgba(135, 181, 77, .25);
    box-shadow: 0 8px 18px rgba(73, 124, 47, .08);
    cursor: pointer;
}

.installer-check-option input {
    width: 18px;
    height: 18px;
    accent-color: #73be4c;
}

.installer-check-option span {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.installer-check-option strong {
    color: #21351f;
    font-size: 13px;
    line-height: 1.2;
}

.installer-check-option small {
    color: #6c7c63;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.25;
}

.installer-check-option:has(input:checked) {
    border-color: #83c64d;
    background: #f1fbe7;
    box-shadow: 0 10px 22px rgba(92, 159, 61, .15);
}

.authorization-share-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    margin-bottom: 18px;
    padding: 18px;
    border-radius: 20px;
    background: #eef9c8;
    border: 1px solid rgba(135, 181, 77, .26);
    box-shadow: 0 16px 34px rgba(70, 106, 52, .13);
}

.authorization-share-card h2 {
    margin: 3px 0 4px;
    color: #23421f;
    font-size: 22px;
}

.authorization-share-card p {
    margin: 0;
    color: #53674c;
    font-weight: 800;
}

.authorization-share-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 9px;
}

.orders-dashboard-panel {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.orders-dashboard-card {
    min-height: 150px;
    display: grid;
    align-content: space-between;
    gap: 12px;
    padding: 18px;
    border-radius: 20px;
    background: #ffffff;
    border: 1px solid rgba(135, 181, 77, .2);
    box-shadow: 0 14px 30px rgba(65, 101, 48, .1);
}

.orders-dashboard-card span {
    color: #53674c;
    font-size: 12px;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.orders-dashboard-card strong {
    color: #17351e;
    font-size: clamp(34px, 5vw, 54px);
    line-height: 1;
}

.orders-dashboard-card small {
    color: #6f8067;
    font-weight: 800;
    line-height: 1.35;
}

.orders-dashboard-card.primary {
    background: linear-gradient(135deg, #f8fde8, #e5f88f);
}

.orders-dashboard-card.pending {
    border-color: #efd46f;
    background: #fff9de;
}

.orders-dashboard-card.process {
    border-color: #9ab8ff;
    background: #eef4ff;
}

.orders-dashboard-card.rejected {
    border-color: #f0a0a0;
    background: #fff0f0;
}

.orders-dashboard-card.new {
    border-color: #98d65d;
    background: #f1fbe7;
}

.orders-dashboard-card.finished {
    border-color: #7fc65b;
    background: #edf9e8;
}

.orders-dashboard-card.novelty {
    border-color: #d9bdff;
    background: #f6f0ff;
}

.municipality-summary-module {
    display: grid;
    gap: 14px;
    margin-top: 18px;
    margin-bottom: 18px;
    padding: 16px;
    border-radius: 22px;
    background: rgba(255, 255, 255, .72);
    border: 1px solid rgba(135, 181, 77, .18);
    box-shadow: 0 14px 30px rgba(65, 101, 48, .08);
}

.municipality-summary-module .section-title {
    margin: 0;
}

.municipality-dashboard-panel {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 760px) {
    .password-toggle-wrap input {
        padding-right: 74px !important;
    }

    .password-toggle-button {
        min-width: 52px;
        min-height: 28px;
        font-size: 10px;
    }

    .assigned-tech-actions,
    .tech-contact-row > div {
        justify-content: flex-end;
    }

    .authorization-share-card {
        grid-template-columns: 1fr;
        padding: 15px;
    }

    .authorization-share-actions {
        justify-content: stretch;
    }

    .authorization-share-actions .tech-action-button {
        width: 100%;
    }

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

    .installer-check-option {
        min-height: 58px;
        padding: 10px;
    }

    .orders-dashboard-panel {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .orders-dashboard-card {
        min-height: 132px;
        padding: 14px;
        border-radius: 16px;
    }

    .orders-dashboard-card strong {
        font-size: 34px;
    }

    .municipality-summary-module {
        padding: 12px;
        border-radius: 18px;
    }

    .municipality-summary-module .section-title {
        gap: 10px;
    }

    .municipality-dashboard-panel {
        grid-template-columns: 1fr 1fr;
    }

    .company-upload-module .table-wrap,
    .company-summary-panel .table-wrap {
        overflow: visible;
        border: 0;
        background: transparent;
        box-shadow: none;
    }

    .company-uploads-status-table,
    .company-summary-table,
    .company-uploads-status-table tbody,
    .company-summary-table tbody,
    .company-uploads-status-table tr,
    .company-summary-table tr,
    .company-uploads-status-table td {
        display: block;
        width: 100%;
    }

    .company-summary-table td {
        display: block;
        width: 100%;
    }

    .company-uploads-status-table thead,
    .company-summary-table thead {
        display: none;
    }

    .company-uploads-status-table,
    .company-summary-table {
        min-width: 0 !important;
        border-collapse: separate;
        border-spacing: 0 12px;
        background: transparent;
    }

    .company-uploads-status-table .company-upload-row,
    .company-summary-table tbody tr {
        margin-bottom: 12px;
        padding: 13px;
        border-radius: 18px;
        border: 1px solid rgba(135, 181, 77, .22);
        box-shadow: 0 12px 26px rgba(70, 106, 52, .1);
        overflow: hidden;
    }

    .company-uploads-status-table .company-upload-row td,
    .company-summary-table tbody td {
        min-height: 38px;
        display: grid;
        grid-template-columns: minmax(88px, 34%) minmax(0, 1fr);
        gap: 10px;
        align-items: start;
        padding: 9px 0;
        border: 0;
        background: transparent !important;
        text-align: right;
    }

    .company-uploads-status-table .company-upload-row td::before,
    .company-summary-table tbody td::before {
        content: attr(data-label);
        color: #5b6b53;
        font-size: 11px;
        font-weight: 950;
        text-transform: uppercase;
        letter-spacing: .03em;
        text-align: left;
    }

    .company-uploads-status-table .company-upload-row td:first-child,
    .company-summary-table tbody td:first-child {
        grid-template-columns: 1fr;
        text-align: left;
        padding-top: 0;
    }

    .company-uploads-status-table .company-upload-row td:first-child::before,
    .company-summary-table tbody td:first-child::before {
        display: none;
    }

    .company-uploads-status-table .company-upload-row td:last-child,
    .company-summary-table tbody td:last-child {
        padding-bottom: 0;
    }

    .company-uploads-status-table .status-pending {
        background: #fff8dc;
        border-left: 5px solid #f1ca54;
    }

    .company-uploads-status-table .status-authorized {
        background: #edf9e8;
        border-left: 5px solid #7fc65b;
    }

    .company-uploads-status-table .status-rejected {
        background: #fff0f0;
        border-left: 5px solid #e86b6b;
    }

    .company-upload-actions-cell {
        min-width: 0;
    }

    .tech-contact-actions,
    .assigned-tech-actions {
        justify-items: end;
    }

    .tech-contact-row > div {
        justify-content: flex-end;
    }

    .company-summary-card-head,
    .company-order-preview-card {
        grid-template-columns: 1fr;
    }

    .company-query-head,
    .company-query-filters {
        grid-template-columns: 1fr;
    }

    .company-summary-panel {
        padding: 14px;
    }

    .company-summary-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .company-order-preview-card > div:last-child {
        justify-content: flex-start;
    }
}

.settings-module .admin-card {
    max-width: 720px;
}

.muted-copy {
    color: #5f6f62;
    font-size: 0.95rem;
    line-height: 1.55;
    margin: -6px 0 18px;
}

.form-label {
    color: #17351f;
    display: grid;
    font-size: 0.86rem;
    font-weight: 800;
    gap: 8px;
}

.check-card {
    align-items: flex-start;
    background: rgba(244, 252, 237, 0.82);
    border: 1px solid rgba(184, 229, 93, 0.55);
    border-radius: 14px;
    color: #26442d;
    cursor: pointer;
    display: flex;
    font-size: 0.92rem;
    gap: 10px;
    line-height: 1.4;
    padding: 12px 14px;
}

.check-card input {
    accent-color: #77b82a;
    margin-top: 2px;
}

.reports-module {
    gap: 18px;
}

.report-template-grid,
.report-next-steps {
    display: grid;
    gap: 12px;
}

.report-template-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    margin-top: 16px;
}

.report-template-card {
    background: rgba(247, 253, 238, .88);
    border: 1px solid rgba(184, 229, 93, .58);
    border-radius: 16px;
    box-shadow: 0 14px 30px rgba(50, 110, 45, .08);
    display: grid;
    gap: 7px;
    padding: 16px;
}

.report-template-card strong {
    color: #14351f;
    font-size: 1rem;
    font-weight: 950;
}

.report-template-card span {
    color: #3f8c30;
    font-size: .78rem;
    font-weight: 950;
    text-transform: uppercase;
}

.report-template-card small {
    color: #506853;
    line-height: 1.45;
}

.report-next-steps {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    margin-top: 12px;
}

.report-next-steps span {
    background: #f2fbdf;
    border: 1px dashed rgba(126, 184, 62, .52);
    border-radius: 999px;
    color: #24401f;
    font-size: .84rem;
    font-weight: 900;
    padding: 10px 13px;
}

.report-template-button {
    align-items: center;
    background: #eaf9bd;
    border: 1px solid rgba(126, 184, 62, .48);
    border-radius: 999px;
    color: #234018;
    display: inline-flex;
    font-family: inherit;
    font-size: .84rem;
    font-weight: 950;
    gap: 8px;
    min-height: 36px;
    padding: 0 14px;
    text-decoration: none;
    width: max-content;
}

.report-template-button svg {
    height: 18px;
    width: 18px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.report-template-button:hover {
    background: #d9f57a;
    transform: translateY(-1px);
}

.installer-cert-box {
    display: grid;
    gap: 12px;
}

.cert-attachment-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(138px, 1fr));
}

.cert-attachment-grid span {
    background: rgba(255, 255, 255, .78);
    border: 1px solid rgba(184, 229, 93, .42);
    border-radius: 12px;
    display: grid;
    gap: 6px;
    padding: 8px;
}

.cert-attachment-grid small {
    color: #2f6b27;
    font-size: .72rem;
    font-weight: 950;
    text-transform: uppercase;
}

.cert-attachment-grid input[type="file"] {
    border-radius: 10px;
    font-size: .78rem;
    min-height: 38px;
    padding: 7px;
}

.cert-status {
    align-items: center;
    background: #eef4ea;
    border: 1px solid rgba(40, 73, 48, .12);
    border-radius: 999px;
    color: #26442d;
    display: inline-grid;
    gap: 0 8px;
    grid-template-columns: 10px auto;
    line-height: 1.1;
    min-width: 132px;
    padding: 8px 11px;
}

.cert-status b {
    border-radius: 999px;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, .76);
    display: block;
    height: 10px;
    width: 10px;
}

.cert-status em {
    font-size: .78rem;
    font-style: normal;
    font-weight: 950;
    text-transform: uppercase;
}

.cert-status small {
    color: rgba(23, 53, 31, .72);
    font-size: .7rem;
    font-weight: 800;
    grid-column: 2;
}

.cert-status.vigente {
    background: #eefbdc;
    border-color: rgba(80, 177, 54, .35);
}

.cert-status.vigente b {
    background: #37b34a;
}

.cert-status.por-vencer {
    background: #fff7d8;
    border-color: rgba(230, 180, 38, .4);
}

.cert-status.por-vencer b {
    background: #f2c230;
}

.cert-status.critica,
.cert-status.vencida {
    background: #ffe9e5;
    border-color: rgba(220, 69, 45, .36);
}

.cert-status.critica b,
.cert-status.vencida b {
    background: #dc3d2b;
}

.cert-status.sin-fecha b {
    background: #8aa090;
}

.cert-preview-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cert-attachment-link {
    align-items: center;
    background: #eaf9bd;
    border: 1px solid rgba(126, 184, 62, .44);
    border-radius: 999px;
    color: #24401f;
    display: inline-flex;
    font-size: .76rem;
    font-weight: 950;
    min-height: 30px;
    padding: 0 11px;
    text-decoration: none;
}

.cert-attachment-link:hover {
    background: #d9f57a;
}

.novelty-admin-section {
    margin-top: 18px;
}

.novelty-admin-table td small {
    color: #5f705b;
    display: block;
    font-size: .72rem;
    font-weight: 850;
    margin-top: 3px;
}

.novelty-reason-cell {
    color: #18351f;
    font-weight: 850;
    line-height: 1.35;
    min-width: 220px;
    white-space: normal;
}

/* Ajustes finales para filtros y modal de novedad en tecnico. */
.order-filter-heading {
    grid-template-columns: minmax(0, 1fr) minmax(240px, 420px);
}

.order-filter-grid {
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.preopen-novelty-card {
    container-type: inline-size;
    width: min(720px, calc(100vw - 28px));
}

.preopen-actions .primary-button,
.preopen-actions .table-action,
.preopen-actions .ghost-button {
    flex: 1 1 180px;
}

.novelty-check-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.novelty-check-grid label {
    justify-content: flex-start;
    text-align: left;
}

.novelty-check-grid input[type="checkbox"] {
    flex: 0 0 18px;
    height: 18px;
    margin-top: 2px;
    min-height: 0;
    padding: 0;
    width: 18px;
}

@container (max-width: 560px) {
    .novelty-check-grid {
        grid-template-columns: 1fr;
    }

    .preopen-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .preopen-actions .primary-button,
    .preopen-actions .table-action,
    .preopen-actions .ghost-button {
        width: 100% !important;
    }
}

@media (max-width: 980px), (max-height: 560px) and (pointer: coarse) {
    .order-filter-heading {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 640px) {
    .order-filter-grid {
        grid-template-columns: 1fr;
    }

    .preopen-novelty-card {
        border-radius: 18px;
        max-height: calc(100dvh - 20px);
        padding: 14px;
        width: calc(100vw - 20px);
    }
}
.permission-note{margin:12px 0;padding:12px 14px;border:1px solid #ead9aa;border-radius:10px;background:#fff8e8;color:#725d2a;font-size:13px;line-height:1.5}.installer-scope-box{display:block;border:1px solid #dbe5d8;border-radius:12px;margin:0;padding:14px}.installer-scope-box>strong{display:block;margin-bottom:5px}.installer-scope-box>small{display:block;margin-bottom:10px}.installer-scope-box .checkline{display:flex;align-items:center;gap:8px;margin:8px 0}.installer-scope-box input[type=checkbox]{width:auto}

