* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Inter, Arial, sans-serif;
    background: #f5f0e8;
    color: #1f2a24;
}

a {
    color: inherit;
}

/* LOGIN */

.login-body {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background:
        radial-gradient(circle at top, rgba(20, 92, 63, 0.18), transparent 35%),
        #f5f0e8;
}

.login-card {
    width: 380px;
    background: #fffaf2;
    padding: 34px;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.12);
    border: 1px solid rgba(20, 92, 63, 0.15);
}

.logo {
    font-size: 42px;
    margin-bottom: 10px;
}

.login-card h1 {
    margin: 0;
    font-size: 32px;
}

.login-card p {
    margin: 8px 0 24px;
    color: #66746b;
}

label {
    display: block;
    font-size: 14px;
    margin: 14px 0 6px;
    color: #4f5f55;
}

input,
select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #d8cdbd;
    border-radius: 12px;
    background: #fff;
    font-size: 15px;
}

button,
.secondary-btn,
.card-link {
    display: inline-block;
    border: none;
    background: #145c3f;
    color: white;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 15px;
    cursor: pointer;
    text-decoration: none;
    margin-top: 14px;
}

button:hover,
.secondary-btn:hover,
.card-link:hover {
    background: #0e4630;
}

.error {
    background: #ffe5e5;
    color: #9d1c1c;
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 12px;
}

.hint {
    margin-top: 18px;
    color: #7c837d;
    font-size: 13px;
}

/* TOPBAR */

.topbar {
    height: 66px;
    background: #10291f;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
}

.topbar strong {
    font-size: 20px;
    margin-right: 12px;
}

.topbar span {
    color: #cbd8d0;
}

.topbar nav a {
    color: white;
    text-decoration: none;
    margin-left: 18px;
    opacity: 0.88;
}

.topbar nav a:hover {
    opacity: 1;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 32px;
}

.wide-container {
    max-width: 1600px;
}

.page-title {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 28px;
}

h1 {
    margin: 0 0 8px;
    font-size: 32px;
}

p {
    color: #68746d;
}

/* CARDS */

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 22px;
}

.store-card,
.table-card {
    background: #fffaf2;
    border: 1px solid rgba(20, 92, 63, 0.12);
    border-radius: 22px;
    padding: 22px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.store-card h2 {
    margin-top: 0;
}

.metric {
    display: flex;
    justify-content: space-between;
    padding: 9px 0;
    border-bottom: 1px solid #eee5d8;
}

.metric span {
    color: #66746b;
}

.metric strong {
    font-size: 17px;
}

.metric.bad strong,
.bad-text {
    color: #b42318;
    font-weight: 700;
}

.metric.warn strong,
.warn-text {
    color: #b86b00;
    font-weight: 700;
}

/* TABLES */

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    color: #4f5f55;
    font-size: 14px;
    border-bottom: 2px solid #ddd0be;
    padding: 12px;
}

td {
    padding: 12px;
    border-bottom: 1px solid #eee5d8;
}

/* SVG SHOWCASE */

.svg-layout-wrapper {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 24px;
    align-items: start;
}

.svg-card {
    background: #fffaf2;
    border-radius: 28px;
    border: 1px solid rgba(20, 92, 63, 0.12);
    box-shadow: 0 18px 50px rgba(0,0,0,0.08);
    overflow: hidden;
}

.svg-toolbar {
    height: 68px;
    padding: 0 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(180deg, #fffaf2, #f1e5d4);
    border-bottom: 1px solid #e6d8c6;
}

.svg-toolbar strong {
    display: block;
    font-size: 18px;
}

.svg-toolbar span {
    color: #68746d;
    font-size: 13px;
}

.legend {
    display: flex;
    gap: 14px;
    align-items: center;
}

.legend span {
    display: flex;
    gap: 6px;
    align-items: center;
}

.legend i {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.legend-good {
    background: #2e7d32;
}

.legend-bad {
    background: #b42318;
}

.legend-surplus {
    background: #b86b00;
}

.salon-svg {
    width: 100%;
    min-width: 1050px;
    display: block;
}

.svg-zone {
    cursor: pointer;
    transition: transform 0.15s ease, opacity 0.15s ease;
    transform-box: fill-box;
    transform-origin: center;
}

.svg-zone:hover {
    transform: translateY(-4px);
    opacity: 0.94;
}

.svg-title {
    font-size: 20px;
    font-weight: 700;
    fill: #3f2f22;
}

.svg-label {
    font-size: 17px;
    font-weight: 700;
    fill: #3f2f22;
}

.svg-small-label {
    font-size: 13px;
    font-weight: 700;
    fill: #3f2f22;
}

.svg-subtitle {
    font-size: 12px;
    fill: #6d5a43;
}

.dimensions line {
    stroke: rgba(65, 50, 36, 0.48);
    stroke-width: 2;
}

.dimensions text {
    fill: #584431;
    font-size: 13px;
    font-weight: 600;
}

.shelf-click:hover rect {
    fill: rgba(255, 239, 176, 0.28);
    stroke: rgba(180, 130, 48, 0.45);
    stroke-width: 2;
}

/* SIDE PANEL */

.zone-panel {
    background: #fffaf2;
    border-radius: 22px;
    padding: 22px;
    border: 1px solid rgba(20, 92, 63, 0.12);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.product-row {
    padding: 12px 0;
    border-bottom: 1px solid #eee5d8;
}

.product-row strong {
    display: block;
}

.product-row small {
    color: #66746b;
}

/* OLD DIV SHOWCASE SUPPORT */

.showcase-wrapper {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 24px;
    align-items: start;
    overflow-x: auto;
}

.showcase-board {
    position: relative;
    width: 1680px;
    height: 1050px;
    background: #f4eadc;
    border: 2px solid rgba(20, 92, 63, 0.22);
    border-radius: 28px;
    overflow: auto;
}

.zone {
    position: absolute;
    padding: 12px;
    cursor: pointer;
    border: 2px solid rgba(120, 89, 51, 0.45);
    background: linear-gradient(180deg, #fff8ec, #d9c3a8);
    color: #2c251d;
    border-radius: 20px;
}

/* RESPONSIVE */

@media (max-width: 1100px) {
    .svg-layout-wrapper {
        grid-template-columns: 1fr;
    }

    .zone-panel {
        position: static;
        max-height: none;
    }

    .topbar {
        height: auto;
        padding: 16px;
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .topbar nav a {
        margin-left: 0;
        margin-right: 14px;
    }

    .container {
        padding: 18px;
    }

    .page-title {
        flex-direction: column;
    }
}

/* SCRAP, EXCHANGE AND PARTNER GOLD */

[hidden] {
    display: none !important;
}

.scrap-body {
    --ink: #16231d;
    --forest: #123f31;
    --forest-deep: #0a2d23;
    --emerald: #16815d;
    --mint: #dff3e9;
    --gold: #c89d46;
    --gold-soft: #f4e8c9;
    --paper: #fffdf8;
    --line: #e7dfd0;
    background:
        radial-gradient(circle at 88% 4%, rgba(200, 157, 70, 0.13), transparent 24rem),
        #f4f1e9;
    color: var(--ink);
}

.scrap-topbar {
    height: 76px;
    background: rgba(10, 45, 35, 0.98);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

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

.brand-lockup .brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(145deg, #d9b966, #9e7430);
    color: #17382d;
    font-family: Georgia, serif;
    font-weight: 800;
}

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

.brand-lockup strong {
    font-family: Georgia, serif;
    letter-spacing: 0.03em;
}

.brand-lockup div > span {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.scrap-topbar nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.scrap-topbar nav a {
    margin: 0;
    padding: 9px 12px;
    border-radius: 10px;
    font-size: 14px;
}

.scrap-topbar nav a.active,
.scrap-topbar nav a:hover {
    background: rgba(255, 255, 255, 0.1);
}

.scrap-shell {
    padding-top: 38px;
    padding-bottom: 70px;
}

.scrap-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 28px;
    margin-bottom: 24px;
}

.eyebrow {
    color: #8a6a2e;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.scrap-hero h1 {
    max-width: 720px;
    margin: 7px 0 8px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(36px, 5vw, 62px);
    font-weight: 500;
    line-height: 0.98;
    letter-spacing: -0.035em;
}

.scrap-hero p {
    max-width: 660px;
    margin: 0;
    font-size: 17px;
}

.month-control {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    padding: 8px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 12px 28px rgba(22, 35, 29, 0.06);
}

.month-control > a {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    text-decoration: none;
    background: #f0ece2;
}

.month-control label {
    margin: 0 0 2px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.month-control input {
    width: 158px;
    padding: 5px 7px;
    border: 0;
    background: transparent;
    font-weight: 700;
}

.notice {
    margin-bottom: 18px;
    padding: 13px 16px;
    border: 1px solid;
    border-radius: 13px;
}

.success-notice {
    background: #e7f6ef;
    border-color: #b8dfce;
    color: #176245;
}

.error-notice {
    background: #fff0ed;
    border-color: #f1c0b8;
    color: #9b2c20;
}

.google-sync-bar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
    padding: 14px 16px;
    border: 1px solid #dfd4bd;
    border-radius: 16px;
    background: #fff9eb;
}

.google-sync-bar.is-ready {
    border-color: #b8ddcc;
    background: #edf8f3;
}

.google-sync-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: #fff;
    color: #287b56;
    box-shadow: 0 4px 12px rgba(22, 35, 29, 0.09);
    font-weight: 900;
}

.google-sync-copy strong,
.google-sync-copy span {
    display: block;
}

.google-sync-copy span {
    margin-top: 3px;
    color: #68766f;
    font-size: 12px;
}

.google-sync-bar form,
.google-sync-bar button {
    margin: 0;
}

.google-sync-bar a {
    color: var(--forest);
    font-size: 13px;
    font-weight: 800;
}

.gold-kpis {
    display: grid;
    grid-template-columns: 1.25fr repeat(4, 1fr);
    border: 1px solid var(--line);
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 14px 38px rgba(22, 35, 29, 0.07);
}

.gold-kpi {
    min-height: 164px;
    padding: 22px;
    background: var(--paper);
    border-right: 1px solid var(--line);
}

.gold-kpi:last-child {
    border-right: 0;
}

.gold-kpi > span,
.partner-balance small {
    display: block;
    color: #68766f;
    font-size: 12px;
    font-weight: 700;
}

.gold-kpi > strong {
    display: block;
    margin: 14px 0 10px;
    font-family: Georgia, serif;
    font-size: clamp(25px, 2.3vw, 36px);
    font-weight: 500;
    white-space: nowrap;
}

.gold-kpi strong small {
    font-family: Inter, Arial, sans-serif;
    font-size: 14px;
}

.gold-kpi p {
    margin: 0;
    font-size: 12px;
    line-height: 1.45;
}

.kpi-pace {
    display: grid;
    gap: 3px;
    margin-top: 11px;
    padding-top: 9px;
    border-top: 1px solid #e7e1d7;
    font-size: 10px;
    line-height: 1.4;
}

.kpi-pace span {
    color: #68766f;
}

.kpi-pace b {
    color: var(--forest);
}

.kpi-pace.behind b {
    color: #a43e32;
}

.kpi-pace.ahead b,
.kpi-pace.on-track b {
    color: #08734f;
}

.gold-kpi.primary-kpi {
    background: linear-gradient(145deg, var(--forest), var(--forest-deep));
    color: #fff;
}

.gold-kpi.primary-kpi > span,
.gold-kpi.primary-kpi p {
    color: #c9dcd4;
}

.stock-kpi {
    background: #fbf4e3;
}

.assay-policy-note {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    padding: 12px 16px;
    border: 1px solid #c9d9d1;
    border-radius: 14px;
    background: #f4f8f6;
    color: #43564d;
    font-size: 13px;
    line-height: 1.45;
}

.assay-policy-note strong {
    flex: 0 0 auto;
    color: var(--forest-deep);
}

.warehouse-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 24px;
    margin-top: 16px;
    padding: 20px 22px;
    border: 1px solid #b8ddcc;
    border-radius: 18px;
    background: #edf8f3;
}

.warehouse-panel.needs-count {
    border-color: #e2c778;
    background: #fff8e5;
}

.warehouse-panel h2 {
    margin: 4px 0 5px;
    font-family: Georgia, serif;
    font-size: 23px;
    font-weight: 500;
}

.warehouse-panel p {
    margin: 0;
    font-size: 13px;
}

.warehouse-count-form {
    min-width: 300px;
}

.warehouse-count-form summary {
    padding: 10px 13px;
    border-radius: 10px;
    background: var(--forest);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.warehouse-count-form[open] {
    width: min(620px, 72vw);
}

.warehouse-count-form .compact-form {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--paper);
}

.warehouse-count-form .wide-setting {
    grid-column: 1 / -1;
}

.danger-kpi {
    background: #fff0ed;
    color: #9b2c20;
}

.mini-progress {
    height: 5px;
    margin: -3px 0 9px;
    overflow: hidden;
    border-radius: 999px;
    background: #e7e1d5;
}

.mini-progress i,
.progress-track i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--emerald), #59b88f);
}

.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin: 42px 0 16px;
}

.section-heading h2,
.form-card-heading h2 {
    margin: 4px 0 0;
    font-family: Georgia, serif;
    font-size: 30px;
    font-weight: 500;
}

.text-link {
    color: var(--forest);
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    border-bottom: 1px solid #92ab9f;
}

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

.pace-context {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin: -4px 0 16px;
    padding: 14px 17px;
    border: 1px solid #c9d9d1;
    border-radius: 14px;
    background: #f2f7f4;
}

.pace-context strong {
    color: var(--forest-deep);
    font-size: 13px;
}

.pace-context span {
    color: #627169;
    font-size: 11px;
    text-align: right;
}

.location-card,
.form-card,
.partner-card,
.settings-card,
.empty-wide {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: 0 10px 28px rgba(22, 35, 29, 0.05);
}

.location-card {
    padding: 23px;
}

.location-card-head {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 23px;
}

.location-card-head span {
    color: #8a6a2e;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.location-card h3,
.partner-card h3 {
    margin: 4px 0;
    font-family: Georgia, serif;
    font-size: 25px;
    font-weight: 500;
}

.location-card p,
.partner-card p {
    margin: 0;
    font-size: 12px;
}

.stock-pill {
    min-width: 104px;
    padding: 10px 12px;
    align-self: flex-start;
    border-radius: 13px;
    background: var(--mint);
    text-align: right;
}

.stock-pill small,
.stock-pill strong {
    display: block;
}

.stock-pill small {
    color: #56806f;
    font-size: 10px;
    text-transform: uppercase;
}

.stock-pill.negative {
    background: #ffe3dd;
    color: #9b2c20;
}

.plan-line {
    display: grid;
    grid-template-columns: minmax(150px, 0.8fr) minmax(120px, 1.2fr) 42px;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
    border-top: 1px solid #ede6da;
}

.plan-block {
    border-top: 1px solid #ede6da;
}

.plan-block .plan-line {
    border-top: 0;
}

.pace-status {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 3px 14px;
    margin: -2px 0 10px;
    padding: 10px 12px;
    border-radius: 11px;
    background: #f2f5f3;
    color: #56645d;
    font-size: 10px;
}

.pace-status > strong {
    color: var(--forest);
    text-align: right;
}

.pace-status > small {
    grid-column: 1 / -1;
    color: #7b8781;
}

.pace-status.ahead,
.pace-status.on-track {
    background: #e8f5ee;
}

.pace-status.ahead > strong,
.pace-status.on-track > strong {
    color: #08734f;
}

.pace-status.behind {
    background: #fff0ed;
}

.pace-status.behind > strong {
    color: #a43e32;
}

.pace-status.no-plan,
.pace-status.waiting {
    background: #f4f1e9;
}

.plan-label strong,
.plan-label span {
    display: block;
}

.plan-label span {
    margin-top: 3px;
    color: #6c7972;
    font-size: 12px;
}

.plan-line > b {
    color: var(--forest);
    font-size: 13px;
    text-align: right;
}

.progress-track {
    position: relative;
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #e9e5dc;
}

.pace-marker {
    position: absolute;
    top: -3px;
    bottom: -3px;
    width: 2px;
    border-radius: 2px;
    background: #273a32;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.75);
    transform: translateX(-1px);
}

.exchange-line .progress-track i {
    background: linear-gradient(90deg, var(--gold), #e0bd6b);
}

.inline-editor {
    margin-top: 13px;
    border-top: 1px solid #ede6da;
}

.inline-editor summary,
.settings-card > summary {
    padding-top: 14px;
    color: #58675f;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.compact-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.compact-form label {
    margin: 0;
}

.compact-form input {
    margin-top: 5px;
}

.compact-form button,
.compact-form h3 {
    grid-column: 1 / -1;
}

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

.form-card {
    padding: 25px;
}

.accent-form-card {
    border-top: 4px solid var(--emerald);
}

.form-card-heading {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 20px;
}

.step-number {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--gold-soft);
    color: #7c5b1f;
    font-size: 11px;
    font-weight: 800;
}

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

.data-form label,
.compact-form label {
    color: #526159;
    font-size: 12px;
    font-weight: 700;
}

.data-form input,
.data-form select,
.data-form textarea,
.compact-form input {
    margin-top: 6px;
    border-color: #ddd6c9;
    border-radius: 10px;
    background: #fff;
}

.data-form textarea {
    width: 100%;
    padding: 12px 14px;
    resize: vertical;
    font: inherit;
}

.data-form .full-field {
    grid-column: 1 / -1;
}

.data-form button.full-field {
    width: 100%;
    margin-top: 3px;
}

.empty-state {
    padding: 28px;
    border: 1px dashed #cfc4b1;
    border-radius: 14px;
    text-align: center;
}

.company-heading {
    margin-top: 46px;
}

.partner-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 16px;
}

.partner-card {
    padding: 21px;
    border-top: 4px solid var(--gold);
}

.partner-card.balance-alert {
    border-top-color: #b42318;
}

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

.partner-name > span {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    border-radius: 13px;
    background: var(--forest);
    color: #f1d995;
    font-family: Georgia, serif;
    font-size: 20px;
}

.partner-balance {
    margin: 22px 0 17px;
    padding: 16px;
    border-radius: 14px;
    background: #f5f1e7;
}

.partner-balance strong {
    display: block;
    margin-top: 4px;
    font-family: Georgia, serif;
    font-size: 34px;
    font-weight: 500;
}

.partner-balance em {
    font-family: Inter, sans-serif;
    font-size: 13px;
    font-style: normal;
}

.partner-stats {
    display: grid;
    gap: 8px;
}

.partner-stats div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: #68766f;
    font-size: 12px;
}

.partner-stats b {
    color: var(--ink);
}

.empty-wide {
    padding: 36px;
    text-align: center;
}

.empty-wide p {
    margin-bottom: 0;
}

.settings-card {
    margin-top: 18px;
    padding: 20px 22px;
}

.settings-card > summary {
    padding: 0;
    color: var(--forest);
    font-size: 15px;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 30px;
    padding-top: 20px;
}

.google-settings-form {
    grid-column: 1 / -1;
}

.google-settings-form .wide-setting {
    grid-column: 1 / -1;
}

.checkbox-setting {
    display: flex !important;
    align-items: center;
    gap: 9px;
    min-height: 44px;
}

.checkbox-setting input {
    width: auto;
    margin: 0;
}

.credential-hint {
    margin: 0;
    padding: 10px 12px;
    overflow-wrap: anywhere;
    border-radius: 10px;
    background: #f3efe6;
    color: #66746b;
    font-size: 12px;
}

.credential-hint b {
    color: var(--forest);
}

.company-create-form {
    max-width: 760px;
    padding-top: 8px;
}

.form-hint {
    grid-column: 1 / -1;
    margin: 0;
    color: #66746b;
    font-size: 12px;
    line-height: 1.5;
}

.partner-opening-editor {
    margin-top: 15px;
}

.partner-opening-form {
    grid-template-columns: 1fr;
}

.partner-opening-form button,
.partner-opening-form .form-hint {
    grid-column: auto;
}

.location-settings-grid {
    grid-template-columns: 1fr;
    max-width: 960px;
}

.settings-grid h3 {
    margin: 0 0 12px;
}

.location-settings {
    padding: 12px 0 17px;
    border-bottom: 1px solid var(--line);
}

.journal-section {
    margin-top: 48px;
}

.journal-section .section-heading {
    margin-top: 0;
}

.record-count {
    color: #748078;
    font-size: 12px;
}

.ledger-table {
    padding: 0;
    overflow-x: auto;
    background: var(--paper);
}

.ledger-table table {
    min-width: 980px;
}

.ledger-table th {
    padding: 12px 14px;
    background: #f3efe6;
    border-bottom: 1px solid #ddd5c7;
    font-size: 11px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.ledger-table td {
    padding: 13px 14px;
    font-size: 13px;
}

.ledger-table td small {
    color: #829088;
}

.ledger-note,
.ledger-note small {
    display: block;
}

.ledger-note small {
    max-width: 190px;
    margin-top: 3px;
    white-space: normal;
}

.type-badge,
.status-done,
.status-cancelled {
    display: inline-block;
    padding: 5px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.type-badge.purchase,
.type-badge.shipment,
.status-done {
    background: #dff3e9;
    color: #176245;
}

.type-badge.exchange,
.type-badge.goods {
    background: #f6e9c9;
    color: #765618;
}

.type-badge.return {
    background: #e9e8f6;
    color: #514b8e;
}

.status-cancelled {
    background: #ffe2dd;
    color: #9b2c20;
}

.cancelled-row {
    opacity: 0.58;
    text-decoration: line-through;
}

.cancel-control summary {
    color: #176245;
    cursor: pointer;
    font-size: 11px;
    font-weight: 800;
}

.cancel-control form {
    width: 180px;
    margin-top: 7px;
}

.cancel-control input {
    padding: 7px 8px;
    font-size: 11px;
}

.cancel-control button {
    width: 100%;
    margin-top: 5px;
    padding: 7px 8px;
    background: #9b2c20;
    font-size: 11px;
}

.empty-cell {
    padding: 30px !important;
    color: #7d8881;
    text-align: center;
}

@media (max-width: 1250px) {
    .gold-kpis {
        grid-template-columns: repeat(3, 1fr);
    }

    .gold-kpi:nth-child(3) {
        border-right: 0;
    }

    .gold-kpi:nth-child(n+4) {
        border-top: 1px solid var(--line);
    }
}

@media (max-width: 900px) {
    .scrap-topbar nav {
        flex-wrap: wrap;
    }

    .scrap-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .gold-kpis,
    .location-grid,
    .entry-grid,
    .settings-grid {
        grid-template-columns: 1fr;
    }

    .warehouse-panel {
        grid-template-columns: 1fr;
    }

    .warehouse-count-form,
    .warehouse-count-form[open] {
        width: 100%;
        min-width: 0;
    }

    .gold-kpi,
    .gold-kpi:nth-child(3) {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .gold-kpi:last-child {
        border-bottom: 0;
    }
}

@media (max-width: 600px) {
    .scrap-shell {
        padding: 24px 14px 50px;
    }

    .assay-policy-note {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .scrap-hero h1 {
        font-size: 39px;
    }

    .month-control {
        width: 100%;
    }

    .month-control form {
        flex: 1;
    }

    .month-control input {
        width: 100%;
    }

    .google-sync-bar {
        grid-template-columns: auto 1fr;
    }

    .google-sync-bar form,
    .google-sync-bar > a {
        grid-column: 1 / -1;
    }

    .location-card-head,
    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .pace-context {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

    .pace-context span {
        text-align: left;
    }

    .stock-pill {
        text-align: left;
    }

    .plan-line {
        grid-template-columns: 1fr 42px;
    }

    .plan-label {
        grid-column: 1 / -1;
    }

    .pace-status {
        grid-template-columns: 1fr;
    }

    .pace-status > strong {
        text-align: left;
    }

    .data-form,
    .compact-form {
        grid-template-columns: 1fr;
    }

    .data-form .full-field,
    .compact-form button,
    .compact-form h3 {
        grid-column: auto;
    }
}
