html.loading {
    visibility: hidden;
}
:root {
    --green: #244b35;
    --green-dark: #1f3f2d;
    --text: #111827;
    --muted: #6b7280;
    --border: #cfd8e3;
    --bg: #ffffff;
    --error: #dc2626;
    --success: #15803d;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    color: var(--text);
}

/* LOGIN */

.login-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: white;
}

.login-left {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: white;
}

.login-form {
    width: 100%;
    max-width: 440px;
}

.login-logo {
    display: block;
    width: 280px;
    max-width: 85%;
    margin: 0 auto 48px;
}

.login-form input {
    width: 100%;
    height: 46px;
    margin-bottom: 16px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 15px;
    outline: none;
}

.login-form input:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(36, 75, 53, 0.12);
}

.login-form button {
    width: 150px;
    height: 44px;
    margin-left: auto;
    display: block;
    border: none;
    border-radius: 4px;
    background: var(--green);
    color: white;
    font-size: 15px;
    cursor: pointer;
}

.login-form button:hover {
    background: var(--green-dark);
}

#message {
    margin-top: 16px;
    font-weight: bold;
}

#message.error {
    color: var(--error);
}

#message.success {
    color: var(--success);
}

.login-right {
    position: relative;
    background:
        radial-gradient(circle at 82% 18%, rgba(255, 255, 255, 0.12), transparent 26%),
        linear-gradient(135deg, #244b35 0%, #1f3f2d 100%);
    overflow: hidden;
}

.login-right::before {
    content: "";
    position: absolute;
    width: 520px;
    height: 520px;
    border-radius: 48px;
    background: rgba(255, 255, 255, 0.065);
    right: -150px;
    top: -120px;
    transform: rotate(18deg);
}

.login-right::after {
    content: "";
    position: absolute;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.055);
    left: -150px;
    bottom: -130px;
}

.login-text {
    position: relative;
    z-index: 2;
    max-width: 620px;
    margin-left: 12%;
    margin-right: 12%;
    margin-top: 31vh;
    color: white;
}

.login-text::before {
    content: "";
    display: block;
    width: 72px;
    height: 5px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.7);
    margin-bottom: 26px;
}

.login-text p {
    margin: 0 0 16px;
    font-size: 15px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-weight: 700;
    opacity: 0.86;
}

.login-text h1 {
    margin: 0;
    max-width: 560px;
    font-size: clamp(44px, 4.8vw, 68px);
    line-height: 1.02;
    letter-spacing: -0.055em;
    font-weight: 850;
    color: white;
}

/* MENU / ØVRIGE SIDER */

.topbar {
    max-width: 1180px;
    margin: 24px auto 0;
    padding: 16px 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.logo-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: var(--green);
    color: white;
    font-weight: 900;
}

.ghost-button,
.ghost-link {
    width: auto;
    border-radius: 999px;
    padding: 11px 18px;
    border: 1px solid var(--border);
    background: white;
    color: var(--text);
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.page-shell {
    max-width: 1180px;
    margin: 10px auto 60px;
    padding: 0 22px;
}

.hero-card,
.feature-card,
.side-card,
.table-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 24px;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
}

.hero-card {
    padding: 40px;
    margin-bottom: 24px;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--green);
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.hero-card h1 {
    margin: 0;
    font-size: clamp(34px, 5vw, 58px);
}

.hero-card p {
    color: var(--muted);
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.feature-card {
    min-height: 260px;
    padding: 30px;
    text-decoration: none;
    color: inherit;
}

.feature-card.disabled {
    opacity: 0.55;
}

.feature-icon {
    font-size: 32px;
}

.stock-layout {
    display: grid;
    grid-template-columns: 330px 1fr;
    gap: 24px;
    align-items: start;
}

.side-card,
.table-card {
    padding: 26px;
}

.side-card {
    position: sticky;
    top: 20px;
}

input,
select {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px 15px;
    font-size: 15px;
}

label {
    display: block;
    margin-top: 18px;
    margin-bottom: 7px;
    font-weight: 700;
}

.side-card button {
    width: 100%;
    border: none;
    border-radius: 14px;
    padding: 14px 18px;
    background: var(--green);
    color: white;
    font-weight: 800;
    cursor: pointer;
}

.status-box {
    margin: 22px 0;
    padding: 18px;
    border-radius: 18px;
    background: var(--green);
    color: white;
}

.status-box span {
    display: block;
    opacity: 0.8;
}

.status-box strong {
    display: block;
    margin-top: 8px;
    font-size: 28px;
}

.table-header {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 20px;
    align-items: center;
    margin-bottom: 18px;
}

.product-table-head,
.product-row {
    display: grid;
    grid-template-columns: minmax(220px, 2.5fr) 70px 90px 110px 110px 90px;
    gap: 12px;
    align-items: center;
}

.product-table-head {
    padding: 12px 14px;
    border-radius: 14px;
    background: #f8fafc;
    color: var(--muted);
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
}

.product-row {
    padding: 13px 14px;
    border-bottom: 1px solid #e5e7eb;
}

.product-name {
    font-weight: 800;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-unit {
    color: var(--muted);
    font-weight: 700;
}

.product-row input {
    text-align: right;
}

/* MOBIL */

@media (max-width: 850px) {
    .login-page {
        grid-template-columns: 1fr;
    }

    .login-right {
        display: none;
    }

    .login-left {
        min-height: 100vh;
        padding: 28px;
    }

.login-logo {
    display: block;
    height: 110px;
    width: auto;
    max-width: 100%;
    margin: 0 auto 48px;
}

    .menu-grid,
    .stock-layout,
    .table-header {
        grid-template-columns: 1fr;
    }

    .side-card {
        position: static;
    }
}

@media (max-width: 560px) {
    .login-form button {
        width: 150px;
    }


}
/* OPTIBIZ MENU */

.app-page {
    min-height: 100vh;
    background: #ffffff;
}

.app-topbar {
    max-width: 1180px;
    margin: 0 auto;
    padding: 28px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.app-logo {
    width: auto;
    height: 80px;
    display: block;
}

.app-logout {
    width: auto;
    padding: 11px 22px;
    border-radius: 999px;
    border: 1px solid rgba(36, 75, 53, 0.22);
    background: white;
    color: #244b35;
    box-shadow: none;
    font-weight: 700;
}

.app-logout:hover {
    background: #244b35;
    color: white;
    transform: none;
}

.menu-page {
    max-width: 1180px;
    margin: 0 auto;
    padding: 20px 24px 70px;
}

.menu-hero {
    background:
        linear-gradient(135deg, #244b35 0%, #1f3f2d 100%);
    color: white;
    border-radius: 34px;
    padding: 54px;
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(36, 75, 53, 0.22);
}

.menu-hero::after {
    content: "";
    position: absolute;
    width: 360px;
    height: 360px;
    right: -110px;
    top: -130px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
}

.menu-hero p {
    margin: 0 0 14px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 14px;
    font-weight: 700;
    opacity: 0.85;
}

.menu-hero h1 {
    margin: 0;
    max-width: 760px;
    font-size: clamp(42px, 6vw, 76px);
    line-height: 1.02;
    letter-spacing: -0.06em;
}

.menu-hero span {
    display: block;
    margin-top: 20px;
    font-size: 18px;
    opacity: 0.82;
}

.menu-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.menu-card {
    min-height: 280px;
    padding: 32px;
    border-radius: 30px;
    background: white;
    border: 1px solid rgba(36, 75, 53, 0.10);
    box-shadow: 0 18px 45px rgba(31, 41, 51, 0.08);
    color: #111827;
    text-decoration: none;
    transition: 0.2s ease;
}

.menu-card.active:hover {
    transform: translateY(-5px);
    border-color: rgba(36, 75, 53, 0.35);
    box-shadow: 0 24px 60px rgba(36, 75, 53, 0.16);
}

.menu-card.disabled {
    opacity: 0.55;
}

.menu-icon {
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    border-radius: 20px;
    background: rgba(36, 75, 53, 0.10);
    font-size: 30px;
}

.menu-card h2 {
    margin: 24px 0 10px;
    font-size: 30px;
    letter-spacing: -0.04em;
    color: #1f3f2d;
}

.menu-card p {
    margin: 0 0 34px;
    color: #6b7280;
    line-height: 1.6;
}

.menu-card strong {
    color: #244b35;
}

@media (max-width: 850px) {
    .app-topbar {
        padding: 22px 20px;
    }

    .app-logo {
        width: 155px;
    }

    .menu-cards {
        grid-template-columns: 1fr;
    }

    .menu-hero {
        padding: 34px;
    }
}
/* OPTIBIZ LAGER */

.lager-page {
    max-width: 1180px;
    margin: 0 auto;
    padding: 20px 24px 70px;
}

.lager-hero {
    background: linear-gradient(135deg, #244b35 0%, #1f3f2d 100%);
    color: white;
    border-radius: 34px;
    padding: 46px 54px;
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(36, 75, 53, 0.22);
}

.lager-hero::after {
    content: "";
    position: absolute;
    width: 360px;
    height: 360px;
    right: -120px;
    top: -150px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
}

.lager-hero p {
    margin: 0 0 14px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 14px;
    font-weight: 700;
    opacity: 0.85;
}

.lager-hero h1 {
    margin: 0;
    max-width: 760px;
    font-size: clamp(42px, 6vw, 72px);
    line-height: 1.02;
    letter-spacing: -0.06em;
}

.lager-hero span {
    display: block;
    margin-top: 18px;
    font-size: 18px;
    opacity: 0.84;
}

.lager-layout {
    display: grid;
    grid-template-columns: 330px 1fr;
    gap: 24px;
    align-items: start;
}

.lager-panel,
.lager-table {
    background: white;
    border: 1px solid rgba(36, 75, 53, 0.10);
    border-radius: 30px;
    box-shadow: 0 18px 45px rgba(31, 41, 51, 0.08);
}

.lager-panel {
    padding: 28px;
    position: sticky;
    top: 20px;
}

.lager-table {
    padding: 28px;
}

.lager-panel h2,
.lager-table h2 {
    margin: 0;
    color: #1f3f2d;
    font-size: 28px;
    letter-spacing: -0.04em;
}

.lager-panel p,
.lager-table p {
    color: #6b7280;
    line-height: 1.5;
}

.lager-panel label {
    display: block;
    margin-top: 20px;
    margin-bottom: 8px;
    color: #1f3f2d;
    font-weight: 800;
}

.lager-panel select,
.lager-table input {
    width: 100%;
    border: 1px solid #cfd8e3;
    border-radius: 14px;
    padding: 14px 15px;
    font-size: 15px;
    outline: none;
}

.lager-panel select:focus,
.lager-table input:focus {
    border-color: #244b35;
    box-shadow: 0 0 0 3px rgba(36, 75, 53, 0.12);
}

.lager-status {
    margin: 24px 0;
    padding: 20px;
    border-radius: 22px;
    background: linear-gradient(135deg, #75BF87 0%, #66AE78 100%);
    color: white;
    box-shadow: 0 12px 30px rgba(117, 191, 135, 0.30);
}

.lager-status span {
    display: block;
    font-size: 14px;
    opacity: 0.82;
}

.lager-status strong {
    display: block;
    margin-top: 8px;
    font-size: 34px;
}

.lager-panel button {
    width: 100%;
    border: none;
    border-radius: 16px;
    padding: 15px 18px;
    background: #244b35;
    color: white;
    font-weight: 800;
    cursor: pointer;
}

.lager-panel button:hover {
    background: #1f3f2d;
}

.lager-table-header {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 20px;
    align-items: center;
    margin-bottom: 20px;
}

.product-table-head {
    display: grid;
    grid-template-columns: 1fr 120px 140px;
    gap: 12px;
    padding: 13px 16px;
    border-radius: 16px;
    background: rgba(36, 75, 53, 0.07);
    color: #244b35;
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.product-row {
    display: grid;
    grid-template-columns: 1fr 120px 140px;
    gap: 12px;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid #e5e7eb;
}

.product-row:hover {
    background: #f7faf7;
}

.product-name {
    font-weight: 800;
    color: #111827;
}

.product-unit {
    color: #6b7280;
    font-weight: 700;
}

.product-row input {
    width: 100%;
    text-align: right;
    border-radius: 14px;
}

@media (max-width: 850px) {
    .lager-layout,
    .lager-table-header {
        grid-template-columns: 1fr;
    }

    .lager-panel {
        position: static;
    }

    .lager-hero {
        padding: 34px;
    }
}

@media (max-width: 560px) {
    .lager-page {
        padding: 14px 18px 50px;
    }

    .lager-panel,
    .lager-table {
        border-radius: 22px;
        padding: 22px;
    }

    .product-table-head,
    .product-row {
        grid-template-columns: 1fr 80px 90px;
    }
}
.product-table-head,
.product-row {
    grid-template-columns: 1fr 90px 110px 130px 130px 110px;
}

.stock-pill {
    padding: 10px 12px;
    border-radius: 999px;
    background: #f3f6f3;
    color: #244b35;
    font-weight: 800;
    text-align: right;
}

.stock-pill.positive {
    background: rgba(117, 191, 135, 0.18);
    color: #244b35;
}

.stock-pill.negative {
    background: rgba(220, 38, 38, 0.10);
    color: #b91c1c;
}

.stock-pill.neutral {
    background: #f3f6f3;
    color: #6b7280;
}

@media (max-width: 900px) {
    .lager-table {
        overflow-x: auto;
    }

    .product-table-head,
    .product-row {
        min-width: 820px;
        grid-template-columns: 280px 70px 90px 110px 110px 90px;
    }

    .product-name {
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
    }
}
/* FIX: mere plads til produktnavn i lagerlisten */

.lager-page {
    max-width: 1400px;
}

.lager-layout {
    grid-template-columns: 300px minmax(0, 1fr);
}

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

.product-table-head,
.product-row {
    min-width: 980px;
    grid-template-columns: 320px 70px 90px 110px 110px 90px !important;
}

.product-name {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: unset !important;
    line-height: 1.25;
}

@media (max-width: 850px) {
    .lager-layout {
        grid-template-columns: 1fr;
    }

    .product-table-head,
    .product-row {
        min-width: 980px;
        grid-template-columns: 320px 70px 90px 110px 110px 90px !important;
    }
}
.company-switcher {
    display: flex;
    align-items: center;
    gap: 12px;
}

.company-switcher select {
    min-width: 220px;
    border: 1px solid rgba(36, 75, 53, 0.22);
    border-radius: 999px;
    padding: 11px 18px;
    color: #244b35;
    font-weight: 700;
    background: white;
}

@media (max-width: 700px) {
    .app-topbar {
        align-items: flex-start;
        gap: 18px;
        flex-direction: column;
    }

    .company-switcher {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .company-switcher select,
    .company-switcher button {
        width: 100%;
    }
}
/* SETTINGS PAGES */

.settings-page {
    max-width: 1180px;
    margin: 0 auto;
    padding: 20px 24px 70px;
}

.settings-layout {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 24px;
    align-items: start;
}

.settings-form,
.settings-table {
    background: white;
    border: 1px solid rgba(36, 75, 53, 0.10);
    border-radius: 30px;
    box-shadow: 0 18px 45px rgba(31, 41, 51, 0.08);
    padding: 28px;
}

.settings-form {
    position: sticky;
    top: 20px;
}

.settings-form h2,
.settings-form h3,
.settings-table h2 {
    margin-top: 0;
    color: #1f3f2d;
    letter-spacing: -0.03em;
}

.settings-form h3 {
    margin-top: 28px;
    margin-bottom: 12px;
    font-size: 18px;
}

.settings-form label {
    display: block;
    margin-top: 18px;
    margin-bottom: 8px;
    color: #1f3f2d;
    font-weight: 800;
}

.settings-form input,
.settings-form select,
.settings-table input {
    width: 100%;
    border: 1px solid #cfd8e3;
    border-radius: 14px;
    padding: 13px 14px;
    font-size: 15px;
    outline: none;
}

.settings-form input:focus,
.settings-form select:focus,
.settings-table input:focus {
    border-color: #244b35;
    box-shadow: 0 0 0 3px rgba(36, 75, 53, 0.12);
}

.settings-form input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

.settings-form button,
.small-button {
    border: none;
    border-radius: 14px;
    padding: 12px 18px;
    background: #244b35;
    color: white;
    font-weight: 800;
    cursor: pointer;
}

.settings-form button {
    width: 100%;
    margin-top: 22px;
}

.settings-form button:hover,
.small-button:hover {
    background: #1f3f2d;
}

.small-button {
    width: auto;
    white-space: nowrap;
}

.settings-form hr {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 30px 0;
}

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

.settings-table table {
    width: 100%;
    border-collapse: collapse;
    min-width: 640px;
}

.settings-table th {
    text-align: left;
    padding: 14px 12px;
    color: #244b35;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 1px solid #e5e7eb;
}

.settings-table td {
    padding: 14px 12px;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: middle;
}

.settings-table tr:hover {
    background: #f7faf7;
}

.settings-table span {
    color: #6b7280;
    font-size: 13px;
}

.check-row {
    display: flex !important;
    align-items: center;
    gap: 8px;
    margin: 8px 0 !important;
    padding: 10px 12px;
    border-radius: 12px;
    background: #f7faf7;
    color: #1f3f2d !important;
    font-weight: 700 !important;
}

.check-row input {
    width: auto !important;
    margin: 0 !important;
}

@media (max-width: 900px) {
    .settings-layout {
        grid-template-columns: 1fr;
    }

    .settings-form {
        position: static;
    }
}

@media (max-width: 560px) {
    .settings-page {
        padding: 14px 18px 50px;
    }

    .settings-form,
    .settings-table {
        border-radius: 22px;
        padding: 22px;
    }
}
/* TOPBAR FIX */

.app-logout {
    white-space: nowrap;
    min-width: fit-content;
}

.company-switcher {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
}

.app-logo {
    width: auto;
    max-width: 240px;
    height: auto;
    max-height: 80px;
    object-fit: contain;
}

@media (max-width: 850px) {
    .app-logo {
        width: auto !important;
        max-width: 190px;
        height: auto !important;
        max-height: 70px;
        object-fit: contain;
    }
}

@media (max-width: 560px) {
    .app-logo {
        max-width: 165px;
        max-height: 62px;
    }
}
.owner-only {
    display: none;
}

#impersonateSelect {
    min-width: 240px;
    border: 1px solid rgba(36, 75, 53, 0.22);
    border-radius: 999px;
    padding: 11px 18px;
    color: #244b35;
    font-weight: 700;
    background: white;
}

#stopImpersonateButton {
    background: #75BF87;
    color: white;
    border-color: #75BF87;
}

#stopImpersonateButton:hover {
    background: #66AE78;
}
.secondary-button {
    width: 100%;
    margin-top: 10px !important;
    border: 1px solid rgba(36, 75, 53, 0.22) !important;
    background: white !important;
    color: #244b35 !important;
    box-shadow: none !important;
}

.secondary-button:hover {
    background: #f7faf7 !important;
}

.status-active,
.status-inactive {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
}

.status-active {
    background: rgba(117, 191, 135, 0.18);
    color: #244b35;
}

.status-inactive {
    background: rgba(220, 38, 38, 0.10);
    color: #b91c1c;
}
.import-message {
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    font-weight: 800;
    line-height: 1.4;
    display: none;
}

.import-message.success,
.import-message.error {
    display: block;
}

.import-message.success {
    background: rgba(117, 191, 135, 0.18);
    color: #244b35;
}

.import-message.error {
    background: rgba(220, 38, 38, 0.10);
    color: #b91c1c;
}

#uploadExcelButton:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}
.sortable-product-row {
    display: flex;
    align-items: center;
    gap: 18px;

    background: white;

    border: 1px solid rgba(36,75,53,.08);

    border-radius: 16px;

    padding: 14px 18px;

    margin-bottom: 12px;

    box-shadow:
        0 4px 12px rgba(0,0,0,.04);
}

.sortable-handle {
    cursor: grab;

    font-size: 24px;

    color: #75BF87;

    width: 30px;

    text-align: center;
}

.sortable-info {
    flex: 1;

    display: flex;
    flex-direction: column;
}

.sortable-info strong {
    color: #244b35;
}

.sortable-info span {
    color: #777;
    font-size: 13px;
}

.location-input {
    width: 220px;
}
.product-sort-toolbar {
    margin-bottom: 24px;
}

.inline-action {
    display: grid;
    grid-template-columns: 1fr 120px;
    gap: 12px;
}

.location-board {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 22px;
    align-items: start;
}

.location-column {
    background: white;
    border: 1px solid rgba(36, 75, 53, 0.10);
    border-radius: 26px;
    box-shadow: 0 18px 45px rgba(31, 41, 51, 0.08);
    padding: 18px;
    min-height: 240px;
}

.no-location-column {
    border-style: dashed;
    opacity: 0.85;
}

.location-column-header {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    margin-bottom: 14px;
}

.location-column-header h2 {
    margin: 0;
    color: #1f3f2d;
    font-size: 22px;
    letter-spacing: -0.03em;
}

.location-count {
    color: #6b7280;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.location-product-list {
    min-height: 150px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.location-product-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f7faf7;
    border: 1px solid rgba(36, 75, 53, 0.08);
    border-radius: 16px;
    padding: 12px 14px;
}

.location-product-card strong {
    display: block;
    color: #244b35;
}

.location-product-card span {
    display: block;
    color: #6b7280;
    font-size: 13px;
}

.location-product-card .sortable-handle {
    cursor: grab;
    font-size: 22px;
    color: #75BF87;
}

@media (max-width: 560px) {
    .inline-action {
        grid-template-columns: 1fr;
    }
}
.lager-location-tag {
    display: inline-flex;
    margin-right: 8px;
    margin-bottom: 4px;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(117, 191, 135, 0.18);
    color: #244b35;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.location-board-inner {
    display: contents;
}

.location-title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.location-drag-handle {
    cursor: grab;
    color: #75BF87;
    font-size: 22px;
    font-weight: 900;
}

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

.icon-button {
    width: 34px;
    height: 34px;
    border: 1px solid rgba(36, 75, 53, 0.15);
    border-radius: 10px;
    background: white;
    cursor: pointer;
    box-shadow: none;
    padding: 0;
}

.icon-button:hover {
    background: #f7faf7;
}

.icon-button.danger:hover {
    background: rgba(220, 38, 38, 0.10);
}
.company-logo-preview {
    max-width: 220px;
    max-height: 120px;
    object-fit: contain;
    margin-top: 14px;
    padding: 12px;
    border-radius: 16px;
    border: 1px solid rgba(36, 75, 53, 0.12);
    background: white;
}
:root {
    --brand-secondary: #75BF87;
}

.lager-status,
#stopImpersonateButton,
.status-active,
.lager-location-tag {
    background-color: var(--brand-secondary);
}
:root {
    --company-primary: #244b35;
    --company-secondary: #75BF87;
}

/* COMPANY THEME OVERRIDES */

.menu-hero,
.lager-hero {
    background: var(--company-primary) !important;
}

.menu-hero p,
.lager-hero p {
    color: white !important;
}

.menu-card h2,
.settings-form h2,
.settings-form h3,
.settings-table h2,
.settings-table th,
.location-column-header h2,
.product-name,
.sortable-info strong {
    color: var(--company-primary) !important;
}

.settings-form button,
.small-button,
.app-logout,
#stopImpersonateButton {
    background: var(--company-secondary) !important;
    border-color: var(--company-secondary) !important;
    color: white !important;
}

.menu-card.active strong {
    background: transparent !important;
    color: var(--company-primary) !important;
}

.status-active,
.lager-location-tag {
    background: rgba(117, 191, 135, 0.18) !important;
    color: var(--company-primary) !important;
}

.optional-label {
    color: #8a948e;
    font-size: 12px;
    font-weight: 700;
}

.bom-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
    padding: 18px 20px;
    border-radius: 18px;
    background: rgba(117, 191, 135, 0.14);
    color: var(--company-primary);
    font-weight: 900;
}

.bom-summary strong {
    font-size: 24px;
}

.bom-board {
    display: grid;
    grid-template-columns: 320px 1fr 1fr;
    gap: 24px;
    align-items: start;
}

.bom-library,
.bom-area {
    background: white;
    border: 1px solid rgba(36, 75, 53, 0.10);
    border-radius: 26px;
    padding: 22px;
    box-shadow: 0 18px 45px rgba(31, 41, 51, 0.08);
}

.bom-library {
    position: sticky;
    top: 20px;
}

.bom-library h2,
.bom-area h2 {
    margin-top: 0;
    color: var(--company-primary);
}

.bom-library p,
.bom-area p {
    color: #6b7280;
}

#bomSearch {
    margin-bottom: 18px;
}

#productLibraryList {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bom-library-card {
    padding: 12px 14px;
    border-radius: 16px;
    background: #f7faf7;
    border: 1px solid rgba(36, 75, 53, 0.08);
    cursor: grab;
}

.bom-library-card strong {
    display: block;
    color: var(--company-primary);
}

.bom-library-card span,
.bom-library-card small {
    color: #6b7280;
}

.bom-target-board {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.bom-target-card {
    border: 1px solid rgba(36, 75, 53, 0.10);
    border-radius: 22px;
    padding: 16px;
    background: #fbfdfb;
}

.bom-target-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 14px;
}

.bom-target-header h3 {
    margin: 0;
    color: var(--company-primary);
}

.bom-target-header span {
    color: #6b7280;
    font-size: 13px;
}

.bom-target-cost {
    text-align: right;
}

.bom-target-cost span {
    display: block;
    font-size: 12px;
    color: #6b7280;
    font-weight: 800;
}

.bom-target-cost strong {
    display: block;
    color: var(--company-primary);
    font-size: 20px;
}

.bom-drop-zone {
    min-height: 70px;
    padding: 10px;
    border-radius: 16px;
    border: 2px dashed rgba(36, 75, 53, 0.18);
    background: white;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
}

.bom-line-card {
    display: grid;
    grid-template-columns: 1fr 220px 80px;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border-radius: 14px;
    background: #f7faf7;
    border: 1px solid rgba(36, 75, 53, 0.08);
}

.bom-line-main strong {
    display: block;
    color: var(--company-primary);
}

.bom-line-main span {
    color: #6b7280;
    font-size: 12px;
}

.bom-line-controls {
    display: grid;
    grid-template-columns: 1fr 1fr 36px;
    gap: 8px;
    align-items: end;
}

.bom-line-controls label {
    font-size: 11px;
    color: #6b7280;
    font-weight: 800;
}

.bom-line-controls input {
    height: 34px;
    padding: 6px 8px;
    font-size: 13px;
}

.bom-line-total {
    text-align: right;
    font-weight: 900;
    color: var(--company-primary);
}

.type-raw {
    border-left: 5px solid #75BF87;
}

.type-sub {
    border-left: 5px solid #f59e0b;
}

.type-finished {
    border-left: 5px solid #6366f1;
}

@media (max-width: 1100px) {
    .bom-board {
        grid-template-columns: 1fr;
    }

    .bom-library {
        position: static;
    }

    .bom-line-card {
        grid-template-columns: 1fr;
    }

    .bom-line-total {
        text-align: left;
    }
}

.bom-target-card.collapsed .bom-card-body {
    display: none;
}

.bom-target-header {
    cursor: pointer;
}

.bom-target-header:hover {
    background: rgba(117, 191, 135, 0.08);
    border-radius: 16px;
}

.readonly-cost {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    font-size: 11px;
    color: #6b7280;
    font-weight: 800;
}

.readonly-cost strong {
    color: var(--company-primary);
    font-size: 13px;
}

.bom-line-controls.single-cost {
    grid-template-columns: 1fr 1fr 36px;
}

.menu-section-title {
    grid-column: 1 / -1;
    margin-top: 16px;
}

.menu-section-title h2 {
    margin: 0;
    color: var(--company-primary);
    font-size: 22px;
}



html.loading {
    visibility: hidden;
}