.calculator-page { min-height: 100vh; background: var(--surface-low); }
.calculator-header { position: sticky; top: 0; z-index: 30; border-bottom: 1px solid var(--line); background: rgb(248 251 255 / 92%); backdrop-filter: blur(18px); }
.calculator-header-inner { min-height: 74px; display: flex; align-items: center; gap: 1.5rem; }
.calculator-header .workspace-tabs { display: flex; flex: 0 1 auto; align-items: center; gap: .3rem; overflow-x: auto; margin: 0 0 0 .5rem; border: 1px solid #dbe4f1; border-radius: 14px; padding: .3rem; background: #edf3fb; box-shadow: inset 0 1px 2px rgb(16 34 69 / 4%); scrollbar-width: none; }
.calculator-header .workspace-tabs::-webkit-scrollbar { display: none; }
.calculator-header .workspace-tab { display: inline-flex; flex: 0 0 auto; align-items: center; gap: .45rem; min-height: 38px; border: 0; border-radius: 10px; padding: .45rem .7rem; background: transparent; color: #64738a; font: inherit; font-size: .68rem; font-weight: 800; white-space: nowrap; cursor: pointer; transition: background .18s ease, color .18s ease, box-shadow .18s ease; }
.calculator-header .workspace-tab > span { display: grid; place-items: center; width: 21px; height: 21px; border-radius: 7px; background: rgb(100 115 138 / 10%); color: #64738a; font-size: .56rem; font-weight: 900; transition: inherit; }
.calculator-header .workspace-tab:hover { background: rgb(255 255 255 / 65%); color: var(--ink); }
.calculator-header .workspace-tab.active { background: #fff; color: var(--primary); box-shadow: 0 3px 10px rgb(24 73 148 / 12%); }
.calculator-header .workspace-tab.active > span { background: var(--primary); color: #fff; box-shadow: 0 3px 7px rgb(37 103 217 / 22%); }
.calculator-header .workspace-tab:focus-visible { outline: 3px solid rgb(37 103 217 / 16%); outline-offset: 1px; }
.calculator-header-actions { display: flex; align-items: center; gap: .75rem; margin-left: auto; }
.save-status { display: inline-flex; align-items: center; gap: .5rem; color: var(--muted); font-size: .72rem; font-weight: 700; }
.save-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--success); transition: transform 160ms ease; }
.save-status.saved i { transform: scale(1.8); }
.reset-profile-button { border: 1px solid #efcaca; border-radius: 9px; padding: .48rem .68rem; background: #fff7f7; color: #ad3434; font: inherit; font-size: .65rem; font-weight: 800; cursor: pointer; }
.reset-profile-button:hover { border-color: #d64545; background: #fff0f0; color: #8f2424; }
.reset-profile-button:focus-visible { outline: 3px solid rgb(214 69 69 / 18%); outline-offset: 2px; }
.icon-button, .close-button { border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); font-weight: 750; }
.icon-button { min-height: 42px; padding: .55rem .85rem; }
.close-button { width: 40px; height: 40px; font-size: 1.5rem; }
.calculator-main { padding: 2.5rem 0 5rem; }
.calculator-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1.4rem; align-items: start; }
.workspace-column { min-width: 0; }
.calculator-welcome { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.4rem; }
.calculator-welcome h1 { margin: .8rem 0 .3rem; font-size: clamp(2rem, 4vw, 3.4rem); line-height: 1.05; letter-spacing: -.045em; }
.calculator-welcome p { margin: 0; color: var(--muted); }
.mode-notice { margin-bottom: 1rem; border: 1px solid #f2d27d; border-radius: 14px; padding: .85rem 1rem; background: var(--yellow-soft); color: #704f0b; font-size: .8rem; font-weight: 650; }
.calc-card { margin-bottom: 1rem; border: 1px solid var(--line); border-radius: 22px; padding: 1.5rem; background: #fff; box-shadow: 0 10px 32px rgb(24 73 148 / 7%); }
.calc-card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.calc-card-heading h2 { margin: .25rem 0 0; font-size: 1.25rem; letter-spacing: -.02em; }
.optional-label { display: inline-block; margin-left: .35rem; border-radius: 999px; padding: .25rem .5rem; background: var(--yellow-soft); color: #76530a; font-family: var(--font-sans); font-size: .6rem; font-weight: 800; letter-spacing: .02em; vertical-align: middle; }
.calc-card-heading p { margin: .25rem 0 0; color: var(--muted); font-size: .78rem; }
.step-label { color: var(--primary); font-size: .68rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; }
.product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cost-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pricing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.calc-field { display: grid; gap: .38rem; min-width: 0; }
.calc-field > span:first-child, .mobile-label { color: #435574; font-size: .7rem; font-weight: 750; }
.calc-field input, .calc-field select { width: 100%; min-width: 0; height: 46px; border: 1px solid var(--line); border-radius: 11px; padding: .65rem .72rem; background: #fff; color: var(--ink); }
.calc-field input:focus, .calc-field select:focus { border-color: var(--primary); outline: 3px solid rgb(37 103 217 / 10%); }
.input-suffix, .currency-input { display: grid; grid-template-columns: 1fr auto; align-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.currency-input { grid-template-columns: auto 1fr; }
.input-suffix input, .currency-input input { border: 0; border-radius: 0; }
.input-suffix > span, .currency-input > span { padding: 0 .7rem; color: var(--muted); font-size: .72rem; font-weight: 750; white-space: nowrap; }
.input-suffix:focus-within, .currency-input:focus-within { border-color: var(--primary); outline: 3px solid rgb(37 103 217 / 10%); }
.input-suffix input:focus, .currency-input input:focus { outline: 0; }
.ingredient-row { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-areas: "name name price cost" "purchase purchase usage usage" "warning warning warning warning"; gap: .8rem; align-items: end; margin-top: .75rem; border: 1px solid var(--line); border-radius: 15px; padding: 1rem; background: #fbfdff; }
.ingredient-name { grid-area: name; }
.ingredient-price { grid-area: price; }
.ingredient-purchase { grid-area: purchase; }
.ingredient-usage { grid-area: usage; }
.quantity-unit { grid-template-columns: 1fr; }
.quantity-unit > span { grid-column: 1 / -1; }
.quantity-unit { display: grid; grid-template-columns: minmax(100px, 1fr) minmax(110px, 145px); gap: .5rem; }
.ingredient-cost { grid-area: cost; align-self: center; text-align: right; font-size: .78rem; }
.remove-ingredient { position: absolute; right: .6rem; top: .6rem; width: 30px; height: 30px; border: 0; border-radius: 9px; background: #f3f6fa; color: #7b89a0; font-size: 1.15rem; }
.remove-ingredient:hover { background: #ffe7e7; color: #a83030; }
.unit-warning { grid-area: warning; margin: 0; color: #a43d32; font-size: .68rem; }
.mobile-label { display: block; }
.empty-ingredients { padding: 2rem; border: 1px dashed var(--line); border-radius: 14px; text-align: center; }
.empty-ingredients p { margin: .2rem 0 0; color: var(--muted); font-size: .78rem; }
.packaging-row { position: relative; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-template-areas: "package-name package-name package-name package-price package-price package-cost" "package-purchase package-purchase package-usage package-usage package-packing package-packing"; gap: .8rem; align-items: end; margin-top: .75rem; border: 1px solid var(--line); border-radius: 15px; padding: 1rem; background: #fbfdff; }
.packaging-name { grid-area: package-name; }
.packaging-price { grid-area: package-price; }
.packaging-purchase { grid-area: package-purchase; }
.packaging-usage { grid-area: package-usage; }
.packaging-packing { grid-area: package-packing; }
.packaging-cost { grid-area: package-cost; align-self: center; padding-right: 2.3rem; text-align: right; font-size: .78rem; }
.remove-packaging { position: absolute; right: .6rem; top: .6rem; width: 30px; height: 30px; border: 0; border-radius: 9px; background: #f3f6fa; color: #7b89a0; font-size: 1.15rem; }
.remove-packaging:hover { background: #ffe7e7; color: #a83030; }
.calc-field > small { color: var(--muted); font-size: .65rem; }
.operation-stack { display: grid; gap: .9rem; }
.operation-block { border: 1px solid var(--line); border-radius: 16px; padding: 1rem; background: #fbfdff; }
.operation-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: .9rem; }
.operation-heading h3 { margin: 0; font-size: 1rem; }
.operation-heading p { margin: .2rem 0 0; color: var(--muted); font-size: .7rem; }
.operation-heading > strong { flex: 0 0 auto; color: var(--primary); font-size: .82rem; }
.operation-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: .75rem; }
.labor-fields { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.method-field { max-width: 420px; }
.value-unit { display: grid; grid-template-columns: minmax(0, 1fr) 100px; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.value-unit input, .value-unit select { border: 0; border-radius: 0; }
.value-unit select { border-left: 1px solid var(--line); }
.value-unit:focus-within { border-color: var(--primary); outline: 3px solid rgb(37 103 217 / 10%); }
.value-unit input:focus, .value-unit select:focus { outline: 0; }
.currency-select { display: grid; grid-template-columns: auto minmax(70px, 1fr) minmax(105px, auto); overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.currency-select > span { align-self: center; padding: 0 .65rem; color: var(--muted); font-size: .72rem; font-weight: 750; }
.currency-select input, .currency-select select { border: 0; border-radius: 0; }
.currency-select select { border-left: 1px solid var(--line); padding-inline: .45rem; }
.currency-select:focus-within { border-color: var(--primary); outline: 3px solid rgb(37 103 217 / 10%); }
.currency-select input:focus, .currency-select select:focus { outline: 0; }
.gas-fields { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; }
.gas-panel { display: contents; }
.water-fields { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; }
.water-panel { display: contents; }
.electricity-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-areas: "electricity-cost electricity-duration electricity-productions"; gap: .8rem; }
.electricity-cost { grid-area: electricity-cost; }
.electricity-duration { grid-area: electricity-duration; }
.electricity-productions { grid-area: electricity-productions; }
.other-operation-list { display: grid; gap: .65rem; margin-top: .8rem; }
.other-operation-row { position: relative; display: grid; grid-template-columns: 1.1fr 1.2fr 1.1fr 32px; gap: .7rem; align-items: end; border: 1px solid var(--line); border-radius: 13px; padding: .8rem; background: #fff; }
.remove-other-operation { width: 30px; height: 30px; border: 0; border-radius: 9px; background: #f3f6fa; color: #7b89a0; font-size: 1.15rem; }
.remove-other-operation:hover { background: #ffe7e7; color: #a83030; }
.empty-operations { margin-top: .75rem; border: 1px dashed var(--line); border-radius: 12px; padding: .8rem; color: var(--muted); font-size: .7rem; text-align: center; }
.estimate-guide { display: flex; flex-wrap: wrap; gap: .55rem; }
.estimate-guide span { border-radius: 999px; padding: .5rem .7rem; background: var(--primary-soft); color: var(--primary-dark); font-size: .7rem; font-weight: 700; }
.template-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; }
.template-grid button { display: grid; gap: .2rem; border: 1px solid var(--line); border-radius: 14px; padding: 1rem; background: #fff; color: var(--ink); text-align: left; }
.template-grid button:hover { border-color: var(--primary); background: var(--primary-soft); }
.template-grid button > span { font-size: 1.35rem; }
.template-grid small { color: var(--muted); }
.assumption-note { margin: .8rem 0 0; color: #85611c; font-size: .7rem; }
.scenario-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin-top: 1rem; }
.scenario-grid div { display: grid; border: 1px solid var(--line); border-radius: 12px; padding: .75rem; }
.scenario-grid span { color: var(--muted); font-size: .68rem; }
.scenario-grid strong { font-size: .85rem; }
.summary-column { position: sticky; top: 96px; display: grid; gap: .8rem; }
.margin-card { position: relative; overflow: hidden; border: 1px solid #cbd9ee; border-radius: 22px; padding: 1.25rem; background: linear-gradient(145deg, #fff 0%, #f4f8ff 70%, #fff7dd 145%); box-shadow: 0 14px 35px rgb(16 34 69 / 9%); }
.margin-decoration { position: absolute; top: -.8rem; right: .35rem; color: rgb(37 103 217 / 6%); font-size: 7rem; font-weight: 900; line-height: 1; pointer-events: none; }
.margin-title-row { position: relative; display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.margin-eyebrow { color: var(--primary); font-size: .62rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.margin-title-row h2 { margin: .2rem 0 0; font-size: 1.05rem; letter-spacing: -.02em; }
.margin-value-badge { border-radius: 999px; padding: .4rem .65rem; background: var(--yellow); color: #533800; font-size: .78rem; font-weight: 900; }
.margin-method { position: relative; display: grid; gap: .35rem; margin-top: 1.1rem; }
.margin-method > span, .margin-number > span { color: var(--muted); font-size: .64rem; font-weight: 750; }
.margin-method select { width: 100%; border: 1px solid var(--line); border-radius: 11px; padding: .72rem 2.1rem .72rem .75rem; background: #fff; color: var(--ink); font: inherit; font-size: .73rem; font-weight: 750; }
.margin-explanation { min-height: 2.1em; margin: .45rem 0 .8rem; color: var(--muted); font-size: .65rem; line-height: 1.55; }
.margin-control-row { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: .8rem; align-items: end; }
.margin-number { display: grid; gap: .35rem; }
.margin-number > div { display: grid; grid-template-columns: 1fr auto; align-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.margin-number input { min-width: 0; width: 100%; border: 0; padding: .66rem .25rem .66rem .7rem; background: transparent; color: var(--ink); font: inherit; font-size: .76rem; font-weight: 800; text-align: right; }
.margin-number b { padding-right: .65rem; color: var(--muted); font-size: .7rem; }
.margin-number > div:focus-within { border-color: var(--primary); outline: 3px solid rgb(37 103 217 / 10%); }
.margin-number input:focus { outline: 0; }
.margin-slider-wrap { min-width: 0; padding: 0 .2rem; }
.margin-slider { width: 100%; margin: 0 0 .15rem; accent-color: var(--primary); cursor: pointer; }
.margin-ticks { display: flex; justify-content: space-between; color: #8392aa; font-size: .52rem; font-weight: 750; }
.margin-warning { margin: .7rem 0 0; border-radius: 9px; padding: .55rem .65rem; background: #fff0ed; color: #a33d31; font-size: .62rem; line-height: 1.45; }
.selling-price { position: relative; display: grid; gap: .2rem; margin-top: 1rem; border-radius: 17px; padding: 1rem 1.05rem; background: linear-gradient(135deg, var(--primary-dark), var(--primary)); color: #fff; box-shadow: 0 14px 28px rgb(37 103 217 / 22%); }
.selling-price span { color: #d8e6ff; font-size: .66rem; font-weight: 750; }
.selling-price strong { color: #fff; font-size: clamp(2rem, 4vw, 2.7rem); line-height: 1.05; letter-spacing: -.045em; }
.selling-price small { color: #d8e6ff; font-size: .6rem; line-height: 1.45; }
.summary-card { overflow: hidden; border-radius: 24px; background: var(--ink); color: #fff; box-shadow: var(--shadow); }
.summary-overview { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.4rem 1.5rem; cursor: pointer; list-style: none; }
.summary-overview::-webkit-details-marker { display: none; }
.summary-overview:focus-visible { outline: 3px solid var(--yellow); outline-offset: -5px; border-radius: 24px; }
.summary-overview > span:first-child { min-width: 0; }
.summary-toggle { display: inline-flex; align-items: center; gap: .45rem; flex-shrink: 0; border: 1px solid rgb(255 255 255 / 17%); border-radius: 999px; padding: .45rem .65rem; color: #d8e2f0; font-size: .6rem; font-weight: 750; }
.summary-toggle i { width: .45rem; height: .45rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .2s ease; }
.summary-card[open] .summary-toggle i { transform: rotate(225deg) translate(-1px, -1px); }
.summary-details { border-top: 1px solid rgb(255 255 255 / 13%); padding: 1rem 1.5rem 1.4rem; animation: reveal-summary .2s ease-out; }
@keyframes reveal-summary { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }
.summary-label { display: block; color: #aebbd0; font-size: .72rem; }
.summary-value { display: block; margin: .35rem 0 0; font-size: 2.15rem; line-height: 1; letter-spacing: -.04em; }
.estimate-badge { display: inline-block; margin: -.3rem 0 1rem; border-radius: 999px; padding: .32rem .55rem; background: var(--yellow); color: #493000; font-size: .62rem; font-weight: 850; }
.summary-breakdown { display: grid; gap: .7rem; }
.summary-breakdown div { display: flex; justify-content: space-between; gap: .8rem; color: #bcc8da; font-size: .75rem; }
.summary-breakdown strong { color: #fff; }
.summary-breakdown .summary-total { border-top: 1px solid rgb(255 255 255 / 13%); padding-top: .7rem; color: #fff; }
.price-result, .monthly-result { display: grid; margin-top: 1rem; border-radius: 14px; padding: .85rem; background: rgb(244 185 66 / 14%); }
.price-result span, .monthly-result span { color: #d9c28e; font-size: .66rem; }
.price-result strong, .monthly-result strong { color: var(--yellow); font-size: 1.2rem; }
.price-result small { color: #adbbd0; }
.summary-help { margin: 1rem 0 0; color: #9eacc1; font-size: .68rem; }
.data-note { border: 1px solid var(--line); border-radius: 16px; padding: 1rem; background: #fff; }
.data-note strong { font-size: .75rem; }
.data-note p { margin: .2rem 0 0; color: var(--muted); font-size: .68rem; }
.settings-backdrop { position: fixed; inset: 0; z-index: 50; background: rgb(16 34 69 / 45%); backdrop-filter: blur(3px); }
.settings-panel { position: fixed; inset: 0 0 0 auto; z-index: 51; width: min(430px, 92vw); overflow-y: auto; padding: 2rem; background: #fff; box-shadow: -25px 0 70px rgb(16 34 69 / 20%); }
.settings-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.settings-heading h2 { margin: .3rem 0 0; }
.settings-panel > p { color: var(--muted); }
.mode-options { display: grid; gap: .65rem; margin-top: 1.5rem; }
.mode-options label { position: relative; display: grid; border: 1.5px solid var(--line); border-radius: 15px; padding: 1rem; cursor: pointer; }
.mode-options input { position: absolute; opacity: 0; }
.mode-options span { display: grid; }
.mode-options small { color: var(--muted); }
.mode-options label:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.settings-open { overflow: hidden; }
[hidden] { display: none !important; }

/* Dashboard */
.dashboard-shell { display: grid; gap: 1.5rem; }
.dashboard-hero { position: relative; display: flex; min-height: 280px; overflow: hidden; border-radius: 28px; padding: clamp(1.5rem, 4vw, 3.25rem); background: linear-gradient(125deg, #102245 0%, #174d9d 58%, #2567d9 100%); color: #fff; box-shadow: 0 24px 55px rgb(16 34 69 / 20%); }
.dashboard-hero::before { position: absolute; inset: 0; background: radial-gradient(circle at 78% 10%, rgb(255 255 255 / 18%), transparent 27%), linear-gradient(110deg, transparent 52%, rgb(255 255 255 / 5%)); content: ""; pointer-events: none; }
.dashboard-hero-copy { position: relative; z-index: 1; align-self: center; max-width: 680px; }
.dashboard-kicker { display: inline-flex; align-items: center; gap: .45rem; border: 1px solid rgb(255 255 255 / 22%); border-radius: 999px; padding: .42rem .7rem; background: rgb(255 255 255 / 9%); color: #dbe8ff; font-size: .66rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.dashboard-kicker::before { width: 6px; height: 6px; border-radius: 50%; background: var(--yellow); content: ""; box-shadow: 0 0 0 4px rgb(244 185 66 / 15%); }
.dashboard-hero h1 { max-width: 590px; margin: .85rem 0 .6rem; color: #fff; font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.04; letter-spacing: -.045em; }
.dashboard-hero h1 em { color: var(--yellow); font-family: Georgia, serif; font-weight: 500; }
.dashboard-hero p { max-width: 560px; margin: 0; color: #d5e3fb; font-size: .92rem; line-height: 1.65; }
.dashboard-hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin-top: 1.4rem; }
.dashboard-link-button { display: inline-flex; align-items: center; gap: .5rem; border: 0; padding: .7rem .8rem; background: transparent; color: #fff; font: inherit; font-size: .78rem; font-weight: 800; cursor: pointer; }
.dashboard-link-button:hover { color: var(--yellow); }
.dashboard-hero-mark { position: absolute; right: clamp(1.5rem, 7vw, 6rem); top: 50%; width: 170px; height: 170px; transform: translateY(-50%); }
.dashboard-hero-mark > span { position: absolute; inset: 20px; display: grid; place-items: center; border: 1px solid rgb(255 255 255 / 20%); border-radius: 38px; background: linear-gradient(145deg, rgb(255 255 255 / 19%), rgb(255 255 255 / 7%)); color: #fff; font-size: 5rem; font-weight: 900; box-shadow: inset 0 1px rgb(255 255 255 / 22%), 0 25px 45px rgb(4 22 57 / 25%); backdrop-filter: blur(10px); }
.dashboard-hero-mark i { position: absolute; border: 1px solid rgb(255 255 255 / 11%); border-radius: 50%; }
.dashboard-hero-mark i:nth-of-type(1) { inset: -30px; }
.dashboard-hero-mark i:nth-of-type(2) { inset: -55px; }
.dashboard-hero-mark i:nth-of-type(3) { right: -38px; top: 5px; width: 18px; height: 18px; border: 0; background: var(--yellow); box-shadow: 0 0 0 8px rgb(244 185 66 / 12%); }
.dashboard-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.dashboard-stat { position: relative; display: grid; grid-template-columns: auto 1fr; gap: 1rem; overflow: hidden; border: 1px solid #dbe4f1; border-radius: 22px; padding: 1.35rem; background: #fff; box-shadow: 0 12px 35px rgb(24 73 148 / 7%); }
.dashboard-stat::after { position: absolute; right: -45px; top: -45px; width: 130px; height: 130px; border-radius: 50%; background: var(--primary-soft); content: ""; opacity: .75; }
.dashboard-stat-icon { position: relative; z-index: 1; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 15px; background: var(--primary-soft); color: var(--primary); font-size: 1rem; font-weight: 900; }
.dashboard-stat-simulations .dashboard-stat-icon { background: #fff5d8; color: #9a6800; }
.dashboard-stat-copy { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr auto; gap: .15rem 1rem; align-items: center; }
.dashboard-stat-copy > span { color: var(--muted); font-size: .7rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.dashboard-stat-copy strong { grid-row: 1 / 3; grid-column: 2; color: var(--ink); font-size: 1.65rem; letter-spacing: -.04em; }
.dashboard-stat-copy p { margin: 0; color: var(--muted); font-size: .72rem; }
.dashboard-progress { grid-column: 1 / -1; overflow: hidden; height: 6px; border-radius: 99px; background: #edf2f8; }
.dashboard-progress i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--primary), #65a1ff); transition: width .35s ease; }
.dashboard-stat-simulations .dashboard-progress i { background: linear-gradient(90deg, #e4a319, var(--yellow)); }
.dashboard-section { overflow: hidden; border: 1px solid #dbe4f1; border-radius: 24px; background: #fff; box-shadow: 0 12px 38px rgb(24 73 148 / 7%); }
.dashboard-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.4rem 1.5rem; border-bottom: 1px solid #e7edf5; }
.dashboard-section-heading span { color: var(--primary); font-size: .62rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.dashboard-section-heading h2 { margin: .18rem 0 0; font-size: 1.25rem; letter-spacing: -.025em; }
.dashboard-section-heading button { display: inline-flex; align-items: center; gap: .55rem; border: 1px solid #d5dfed; border-radius: 11px; padding: .65rem .8rem; background: #fff; color: var(--ink); font: inherit; font-size: .7rem; font-weight: 800; cursor: pointer; }
.dashboard-section-heading button span { position: relative; display: block; width: 20px; height: 20px; border-radius: 7px; background: var(--primary-soft); color: transparent; font-size: 0; }
.dashboard-section-heading button span::before, .dashboard-section-heading button span::after { position: absolute; left: 50%; top: 50%; width: 9px; height: 2px; border-radius: 99px; background: var(--primary); content: ""; transform: translate(-50%, -50%); }
.dashboard-section-heading button span::after { transform: translate(-50%, -50%) rotate(90deg); }
.dashboard-section-heading button:hover { border-color: var(--primary); color: var(--primary); }
.dashboard-table-wrap { overflow-x: auto; }
.dashboard-table { width: 100%; border-collapse: collapse; text-align: left; }
.dashboard-table th { padding: .85rem 1.5rem; background: #f8fafd; color: #74839a; font-size: .62rem; font-weight: 850; letter-spacing: .05em; text-transform: uppercase; }
.dashboard-table th:last-child, .dashboard-table td:last-child { text-align: right; }
.dashboard-table td { padding: 1rem 1.5rem; border-top: 1px solid #edf1f6; color: var(--ink); font-size: .78rem; }
.dashboard-table tbody tr:first-child td { border-top: 0; }
.dashboard-table tbody tr:not(.dashboard-empty-row):hover { background: #fbfdff; }
.dashboard-table .dashboard-empty { padding: 2.4rem 1.5rem; color: var(--muted); text-align: center; }
.dashboard-empty-state { display: grid; justify-items: center; gap: .25rem; }
.dashboard-empty-state i { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: .3rem; border-radius: 14px; background: var(--primary-soft); color: var(--primary); font-style: normal; font-weight: 900; }
.dashboard-empty-state strong { color: var(--ink); font-size: .8rem; }
.dashboard-empty-state span { color: var(--muted); font-size: .68rem; }
.dashboard-name { display: flex; align-items: center; gap: .7rem; font-weight: 800; }
.dashboard-name::before { display: grid; flex: 0 0 auto; place-items: center; width: 31px; height: 31px; border-radius: 10px; background: var(--primary-soft); color: var(--primary); content: "P"; font-size: .67rem; }
.dashboard-value { color: var(--primary); font-weight: 850; }
.dashboard-profit { color: #07845d; font-weight: 850; }
.dashboard-date { color: var(--muted); font-size: .7rem; }
.dashboard-delete { border: 1px solid #f0caca; border-radius: 9px; padding: .42rem .7rem; background: #fff; color: #b74242; font: inherit; font-size: .66rem; font-weight: 800; cursor: pointer; }
.dashboard-delete:hover { border-color: #dc2626; background: #fff5f5; color: #a42020; }
.dashboard-row-actions { display: inline-flex; justify-content: flex-end; gap: .45rem; }
.dashboard-view { border: 1px solid #cbdaf0; border-radius: 9px; padding: .42rem .7rem; background: var(--primary-soft); color: var(--primary); font: inherit; font-size: .66rem; font-weight: 800; cursor: pointer; }
.dashboard-view:hover { border-color: var(--primary); background: #e6f0ff; }
.dashboard-detail-backdrop { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 1.25rem; background: rgb(10 28 58 / 58%); backdrop-filter: blur(5px); }
.dashboard-detail-modal { width: min(520px, 100%); overflow: hidden; border: 1px solid rgb(255 255 255 / 25%); border-radius: 24px; background: #fff; box-shadow: 0 30px 80px rgb(10 28 58 / 30%); animation: dashboard-modal-in .2s ease-out; }
@keyframes dashboard-modal-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.dashboard-detail-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1.4rem 1.5rem; background: linear-gradient(135deg, #102245, #2567d9); color: #fff; }
.dashboard-detail-heading span { color: #c9dcff; font-size: .62rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.dashboard-detail-heading h2 { margin: .25rem 0 0; color: #fff; font-size: 1.35rem; }
.dashboard-detail-heading button { display: grid; flex: 0 0 auto; place-items: center; width: 34px; height: 34px; border: 1px solid rgb(255 255 255 / 20%); border-radius: 10px; background: rgb(255 255 255 / 10%); color: #fff; font-size: 1.3rem; cursor: pointer; }
.dashboard-detail-heading button:hover { background: rgb(255 255 255 / 20%); }
.dashboard-detail-content { display: grid; padding: .65rem 1.5rem; }
.dashboard-detail-row { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding: .9rem 0; border-bottom: 1px solid #edf1f6; }
.dashboard-detail-row:last-child { border-bottom: 0; }
.dashboard-detail-row span { color: var(--muted); font-size: .72rem; }
.dashboard-detail-row strong { color: var(--ink); font-size: .78rem; text-align: right; }
.dashboard-detail-row.is-emphasis strong { color: var(--primary); font-size: 1.05rem; }
.dashboard-detail-note { border-top: 1px solid #e7edf5; padding: .85rem 1.5rem; background: #f8fafd; color: var(--muted); font-size: .65rem; text-align: center; }
.dashboard-detail-actions { display:grid; gap:.45rem; padding:1rem 1.5rem 1.35rem; }
.dashboard-detail-actions small { color:var(--muted); font-size:.65rem; text-align:center; }
.dashboard-section-note { color:var(--muted); font-size:.68rem; font-weight:700; }
.product-saved-modal { width:min(480px,100%); border-radius:28px; padding:2rem; background:#fff; box-shadow:0 28px 90px rgb(16 34 69 / 28%); text-align:center; animation:saved-pop .35s cubic-bezier(.2,.8,.2,1); }
.product-saved-modal h2 { margin:.65rem 0 .5rem; font-size:1.65rem; line-height:1.15; }
.product-saved-modal p { margin:0 auto 1.4rem; max-width:380px; color:var(--muted); font-size:.8rem; }
.product-saved-actions { display:grid; gap:.65rem; }
.saved-celebration { position:relative; display:grid; place-items:center; width:76px; height:76px; margin:0 auto 1rem; border-radius:24px; background:linear-gradient(145deg,#e7f8ef,#d7f1e4); color:#16835b; font-size:2rem; font-weight:900; transform:rotate(-3deg); }
.saved-celebration i { position:absolute; width:7px; height:7px; border-radius:50%; background:var(--yellow); animation:confetti 1.5s infinite; }.saved-celebration i:nth-child(2){top:-8px;left:8px}.saved-celebration i:nth-child(3){right:-12px;top:18px;animation-delay:.3s}.saved-celebration i:nth-child(4){bottom:-7px;left:4px;animation-delay:.6s}
@keyframes saved-pop{from{opacity:0;transform:translateY(14px) scale(.96)}to{opacity:1;transform:none}}@keyframes confetti{50%{transform:translateY(-5px) scale(1.35)}}
.dashboard-modal-open { overflow: hidden; }
.simulation-period-details { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .35rem; margin-top: .65rem; }
.simulation-period-details > div { display: grid; gap: .12rem; border: 1px solid var(--line); border-radius: 9px; padding: .45rem .5rem; background: #f8fafd; }
.simulation-period-details > div > span { color: var(--muted); font-size: .52rem; font-weight: 750; }
.simulation-period-details > div > strong { overflow: hidden; color: var(--ink); font-size: .62rem; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.simulation-period-details-light > div { border-color: rgb(255 255 255 / 16%); background: rgb(255 255 255 / 9%); }
.simulation-period-details-light > div > span { color: #c9dcff; }
.simulation-period-details-light > div > strong { color: #fff; }
.simulation-opex-list { display: grid; gap: 1rem; }
.simulation-opex-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: .9rem; border-radius: 16px; padding: 1.1rem; background: #f7faff; transition: background .18s ease, transform .18s ease; }
.simulation-opex-row:focus-within { background: #f1f6ff; }
.simulation-opex-label { display: grid; gap: .22rem; }
.simulation-opex-label strong { color: var(--ink); font-size: .82rem; }
.simulation-opex-label small { color: var(--muted); font-size: .64rem; line-height: 1.5; }
.simulation-opex-row > .currency-select { width: 100%; }
.simulation-worker-control { display: grid; grid-template-columns: minmax(150px, .55fr) minmax(250px, 1.45fr); gap: .8rem; min-width: 0; }
.simulation-inline-field { display: grid; min-width: 0; gap: .3rem; }
.simulation-inline-field > small { color: var(--muted); font-size: .56rem; font-weight: 750; }
.simulation-worker-control .input-suffix, .simulation-worker-control .currency-select { min-width: 0; width: 100%; }
.simulation-worker-control .input-suffix { grid-template-columns: minmax(0, 1fr) auto; }
.simulation-worker-control .input-suffix input { min-width: 0; width: 100%; }
.simulation-worker-control .input-suffix > span { border-left: 1px solid var(--line); padding-block: .15rem; }
.simulation-worker-fields { grid-template-columns: minmax(130px, .7fr) minmax(190px, 1.3fr) minmax(150px, 1fr); }

@media (max-width: 1200px) {
  .calculator-layout { grid-template-columns: 1fr; }
  .summary-column { position: static; }
}

@media (max-width: 1050px) {
  .calculator-header-inner { flex-wrap: wrap; gap: .65rem 1rem; padding-top: .6rem; padding-bottom: .6rem; }
  .calculator-header .workspace-tabs { order: 3; width: 100%; margin-left: 0; }
  .calculator-header .workspace-tab { flex: 1 0 auto; justify-content: center; }
}

@media (max-width: 800px) {
  .dashboard-hero-mark { right: -50px; opacity: .45; }
  .dashboard-hero-copy { max-width: 78%; }
  .dashboard-stats { grid-template-columns: 1fr; }
  .ingredient-row { grid-template-columns: 1fr; grid-template-areas: "name" "price" "purchase" "usage" "cost" "warning"; gap: .7rem; padding: 1rem; }
  .ingredient-cost { text-align: left; color: var(--primary); }
  .remove-ingredient { position: absolute; right: .6rem; top: .6rem; }
  .packaging-row { grid-template-columns: 1fr; grid-template-areas: "package-name" "package-price" "package-purchase" "package-usage" "package-packing" "package-cost"; gap: .7rem; }
  .packaging-cost { padding-right: 0; text-align: left; color: var(--primary); }
  .electricity-fields { grid-template-columns: 1fr; grid-template-areas: "electricity-cost" "electricity-duration" "electricity-productions"; }
  .labor-fields, .gas-fields, .water-fields { grid-template-columns: 1fr; }
  .gas-panel, .water-panel { display: grid; gap: .8rem; }
  .other-operation-row { grid-template-columns: 1fr; padding-right: 3rem; }
  .remove-other-operation { position: absolute; right: .6rem; top: .6rem; }
}

@media (max-width: 640px) {
  .simulation-period-details { grid-template-columns: 1fr; }
  .simulation-opex-row { gap: .75rem; padding: 1rem; }
  .simulation-worker-control { grid-template-columns: 1fr; }
  .dashboard-shell { gap: 1rem; }
  .dashboard-hero { min-height: 0; border-radius: 21px; }
  .dashboard-hero-copy { max-width: 100%; }
  .dashboard-hero-mark { display: none; }
  .dashboard-hero-actions { align-items: stretch; flex-direction: column; }
  .dashboard-hero-actions .button, .dashboard-link-button { justify-content: center; width: 100%; }
  .dashboard-stat { border-radius: 18px; padding: 1rem; }
  .dashboard-section { border-radius: 18px; }
  .dashboard-section-heading { align-items: flex-start; padding: 1rem; }
  .dashboard-section-heading button { padding: .5rem; }
  .dashboard-table { min-width: 620px; }
  .dashboard-table th, .dashboard-table td { padding-right: 1rem; padding-left: 1rem; }
  .calculator-header-inner { min-height: 66px; }
  .calculator-header .brand small, .save-status span, .icon-button span { display: none; }
  .calculator-header-actions { gap: .5rem; }
  .calculator-header .workspace-tabs { gap: .2rem; border-radius: 12px; padding: .25rem; }
  .calculator-header .workspace-tab { min-height: 36px; padding: .4rem .6rem; }
  .calculator-header .workspace-tab > span { width: 19px; height: 19px; }
  .reset-profile-button { padding: .45rem .55rem; font-size: .6rem; }
  .calculator-main { padding-top: 1.5rem; }
  .calculator-welcome { display: grid; }
  .calculator-welcome .button { width: fit-content; }
  .calculator-welcome h1 { font-size: 2.4rem; }
  .calc-card { border-radius: 18px; padding: 1rem; }
  .ingredient-heading { display: grid; }
  .ingredient-heading .button { width: 100%; }
  .form-grid, .cost-grid, .pricing-grid, .template-grid, .operation-grid { grid-template-columns: 1fr; }
  .quantity-unit { grid-template-columns: minmax(0, 1fr) minmax(92px, 120px); }
  .scenario-grid { grid-template-columns: 1fr; }
  .summary-card { display: block; }
  .summary-breakdown { margin-top: 1rem; }
  .summary-overview { padding: 1.2rem; }
  .summary-details { padding: .9rem 1.2rem 1.2rem; }
  .summary-toggle-text { display: none; }
  .summary-value { font-size: 1.9rem; }
  .selling-price strong { font-size: 2.35rem; }
  .margin-control-row { grid-template-columns: 1fr; }
  .margin-title-row { align-items: center; }
}
