body.calc-public-body {
            min-height: 100vh;
            background:
                linear-gradient(135deg, rgba(13, 35, 58, 0.9), rgba(13, 35, 58, 0.78)),
                radial-gradient(circle at top right, rgba(243, 156, 18, 0.22), transparent 30%),
                url('images/navio.avif') no-repeat center center fixed;
            background-size: cover;
        }

        .calc-public-page {
            padding: 140px 0 56px;
        }

        .calc-public-page .container {
            width: 100%;
            max-width: 1320px !important;
            margin: 0 auto !important;
            padding: 0 20px;
            box-sizing: border-box;
        }

        .calc-public-shell {
            display: grid;
            grid-template-columns: minmax(0, 1fr);
            gap: 22px;
        }

        .calc-public-hero,
        .calc-public-panel,
        .calc-public-list,
        .calc-public-totals,
        .calc-public-converters {
            background: rgba(255, 255, 255, 0.94);
            backdrop-filter: blur(12px);
            border: 1px solid rgba(255, 255, 255, 0.55);
            border-radius: 24px;
            box-shadow: 0 18px 50px rgba(5, 18, 35, 0.18);
        }

        .calc-public-hero {
            padding: 28px;
            width: 100%;
            min-width: 0;
            display: grid;
            grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.9fr);
            gap: 24px;
            align-items: center;
            box-sizing: border-box;
        }

        .calc-public-title {
            margin: 0;
            color: #fff;
            font-size: clamp(1.9rem, 3vw, 3rem);
            line-height: 1.08;
            font-weight: 900;
        }

        .calc-public-subtitle {
            margin: 16px 0 0;
            max-width: 720px;
            color: rgba(255, 255, 255, 0.86);
            font-size: 1.02rem;
            line-height: 1.6;
        }

        .calc-public-hero-content {
            padding: 22px 24px;
            border-radius: 24px;
            background: linear-gradient(180deg, rgba(13, 35, 58, 0.96), rgba(23, 51, 82, 0.94));
            box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
            min-width: 0;
        }

        .calc-public-badges {
            margin-top: 18px;
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
        }

        .calc-public-badge {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 10px 14px;
            border-radius: 999px;
            background: rgba(255, 255, 255, 0.08);
            color: #fff;
            font-weight: 700;
            font-size: 0.92rem;
        }

        .calc-public-rate-card {
            padding: 22px;
            border-radius: 22px;
            background: linear-gradient(180deg, #fff8ec, #fff2da);
            border: 1px solid rgba(243, 156, 18, 0.18);
            color: var(--primary-color);
        }

        .calc-public-rate-card span {
            display: block;
            color: var(--text-light);
            font-size: 0.88rem;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }

        .calc-public-rate-card strong {
            display: block;
            margin-top: 10px;
            font-size: clamp(2rem, 4vw, 3rem);
            line-height: 1;
            color: var(--secondary-color);
        }

        .calc-public-rate-card p {
            margin: 14px 0 0;
            color: var(--text-light);
            font-size: 0.95rem;
            line-height: 1.55;
        }

        .calc-public-rate-mini {
            margin-top: 18px;
            display: inline-flex;
            align-items: center;
            gap: 10px;
            padding: 10px 18px;
            border-radius: 999px;
            background: rgba(255, 255, 255, 0.1);
            color: #fff;
            font-size: 0.92rem;
            font-weight: 700;
        }

        .calc-public-rate-mini strong {
            color: #f39c12;
            font-size: 1.05rem;
        }

        .calc-public-calc-card {
            padding: 20px;
            border-radius: 22px;
            background: linear-gradient(180deg, #ffffff, #f8fafc);
            border: 1px solid rgba(255, 255, 255, 0.55);
            box-shadow: 0 10px 30px rgba(5, 18, 35, 0.10);
            display: flex;
            flex-direction: column;
            width: 100%;
            min-width: 0;
        }

        .calc-public-calc-card h3 {
            margin: 0 0 14px;
            color: var(--primary-color);
            font-size: 1rem;
            font-weight: 900;
        }

        .math-calc-display {
            min-height: 64px;
            margin-bottom: 14px;
            padding: 12px 16px;
            border-radius: 16px;
            background: linear-gradient(180deg, #0d233a, #162d4a);
            color: #ffffff;
            font-size: 2rem;
            font-weight: 800;
            text-align: right;
            display: flex;
            align-items: center;
            justify-content: flex-end;
            overflow-x: auto;
        }

        .math-calc-keypad {
            display: grid;
            grid-template-columns: repeat(4, minmax(0, 1fr));
            gap: 10px;
            width: 100%;
            min-width: 0;
        }

        .math-calc-key {
            border: none;
            border-radius: 14px;
            min-height: 50px;
            min-width: 0;
            background: #ffffff;
            color: var(--primary-color);
            font-size: 1.25rem;
            font-weight: 800;
            font-family: var(--font-main);
            cursor: pointer;
            box-shadow: inset 0 0 0 1px #e2e8f0, 0 2px 0 #e2e8f0;
            transition: background 0.12s, transform 0.08s;
        }

        .math-calc-key:active {
            transform: translateY(1px);
            box-shadow: inset 0 0 0 1px #e2e8f0;
        }

        .math-calc-key.operator {
            background: #fff7ed;
            color: #c26c00;
            box-shadow: inset 0 0 0 1px rgba(243, 156, 18, 0.22), 0 2px 0 rgba(243, 156, 18, 0.15);
        }

        .math-calc-key.equal {
            background: linear-gradient(180deg, var(--secondary-color), var(--secondary-hover));
            color: #ffffff;
            box-shadow: none;
        }

        .math-calc-key.wide {
            grid-column: span 2;
        }

        @media (max-width: 920px) {
            .calc-public-calc-card {
                max-width: 420px;
                margin: 0 auto;
            }
        }

        .calc-public-panel {
            padding: 24px;
        }

        .calc-public-section-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 14px;
            margin-bottom: 18px;
            flex-wrap: wrap;
        }

        .calc-public-section-head h2,
        .calc-public-section-head h3 {
            margin: 0;
            color: var(--primary-color);
            font-size: 1.08rem;
            font-weight: 900;
        }

        .calc-public-section-head p {
            margin: 4px 0 0;
            color: var(--text-light);
            font-size: 0.94rem;
        }

        .calc-public-form {
            display: flex;
            flex-direction: column;
            gap: 0;
        }

        .calc-public-form > .calc-public-form-row + .calc-public-form-row {
            margin-top: 14px;
        }

        .calc-public-form-section {
            display: flex;
            flex-direction: column;
            gap: 14px;
        }

        .calc-public-form-section + .calc-public-form-section,
        .calc-public-results.calc-public-form-section {
            border-top: 1px solid #dbe2ea;
            padding-top: 14px;
            margin-top: 14px;
        }

        .calc-public-form-row {
            display: grid;
            grid-template-columns: repeat(6, minmax(0, 1fr));
            gap: 14px;
        }

        .calc-public-field {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .calc-public-field.item-field {
            grid-column: span 4;
        }

        .calc-public-field.rate-field {
            grid-column: span 2;
        }

        .calc-public-field.triple-field {
            grid-column: span 2;
        }

        .calc-public-form-row.row-2 {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }

        .calc-public-form-row.row-3 {
            grid-template-columns: repeat(3, minmax(0, 1fr));
        }

        .calc-public-form-row.row-3-qty-item-ncm {
            grid-template-columns: 20% auto 20%;
        }

        .calc-public-form-row.row-4 {
            grid-template-columns: repeat(4, minmax(0, 1fr));
        }

        .calc-public-form-row.row-5 {
            grid-template-columns: repeat(5, minmax(0, 1fr));
        }

        .calc-public-form-row.row-6 {
            grid-template-columns: repeat(6, minmax(0, 1fr));
        }

        .calc-public-form-row.row-7 {
            grid-template-columns: repeat(7, minmax(0, 1fr));
        }

        .row-2 .calc-public-field,
        .row-3 .calc-public-field,
        .row-4 .calc-public-field,
        .row-5 .calc-public-field,
        .row-6 .calc-public-field,
        .row-7 .calc-public-field {
            grid-column: span 1;
        }

        .calc-public-field.tax-field {
            background: rgba(255, 240, 245, 0.55);
            border: 1px solid rgba(255, 182, 193, 0.45);
            border-radius: 12px;
            padding: 10px;
        }

        .calc-public-field.tax-field label {
            color: #b03060;
        }

        .calc-public-field.tax-field input {
            background: #ffffff;
            border-color: #ffb6c1;
        }

        .calc-public-field.tax-field input:focus {
            border-color: #ff69b4;
            box-shadow: 0 0 0 3px rgba(255, 182, 193, 0.25);
        }

        .ncm-input-group {
            position: relative;
            display: flex;
            align-items: center;
        }

        .ncm-input-group input {
            flex: 1;
            min-width: 0;
            padding-right: 54px;
        }

        .ncm-input-group button {
            position: absolute;
            right: 8px;
            top: 50%;
            transform: translateY(-50%);
            width: 38px;
            height: 38px;
            border: 1px solid #0d233a;
            border-radius: 10px;
            background: linear-gradient(180deg, #0d233a, #162d4a);
            color: #ffffff;
            font-size: 1rem;
            cursor: pointer;
            transition: background 0.2s, transform 0.1s;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .ncm-input-group button:hover {
            background: linear-gradient(180deg, #162d4a, #0d233a);
        }

        .ncm-input-group button:active {
            transform: scale(0.96);
        }

        .ncm-input-group button:disabled {
            opacity: 0.6;
            cursor: wait;
        }

        .calc-public-field label {
            color: var(--primary-color);
            font-size: 0.92rem;
            font-weight: 800;
        }

        .calc-public-field input {
            width: 100%;
            min-height: 52px;
            padding: 0 16px;
            border: 1px solid #d9e1ec;
            border-radius: 16px;
            background: #fff;
            color: var(--primary-color);
            font-size: 1rem;
            font-weight: 700;
            font-family: var(--font-main);
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
        }

        .calc-public-field input:focus {
            outline: none;
            border-color: var(--secondary-color);
            box-shadow: 0 0 0 4px rgba(243, 156, 18, 0.14);
        }

        .calc-public-field input[readonly] {
            background: #f8fafc;
            color: #516072;
        }

        .calc-public-actions {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            margin-top: 6px;
        }

        .calc-public-actions .btn {
            min-height: 46px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            border-radius: 16px;
            padding: 0 18px;
            font-weight: 800;
        }

        .calc-public-status {
            min-height: 22px;
            margin-top: 12px;
            color: #0f766e;
            font-size: 0.92rem;
            font-weight: 700;
        }

        .calc-public-status.error {
            color: #b91c1c;
        }

        .calc-public-list {
            padding: 24px;
        }

        .calc-public-table-wrap {
            overflow: auto;
            border: 1px solid #e5eaf1;
            border-radius: 18px;
        }

        .calc-public-table {
            width: 100%;
            min-width: 980px;
            border-collapse: collapse;
        }

        .calc-public-table th,
        .calc-public-table td {
            padding: 14px 16px;
            border-bottom: 1px solid #edf2f7;
            text-align: left;
            font-size: 0.92rem;
            vertical-align: middle;
        }

        .calc-public-table th {
            background: #f8fafc;
            color: var(--primary-color);
            font-weight: 900;
            white-space: nowrap;
        }

        .calc-public-table td.numeric {
            text-align: right;
            white-space: nowrap;
        }

        .calc-public-empty {
            padding: 26px 18px;
            text-align: center;
            color: var(--text-light);
            font-size: 0.96rem;
        }

        .calc-public-mobile-list {
            display: none;
            gap: 14px;
            margin-top: 14px;
        }

        .calc-public-mobile-card {
            padding: 18px;
            border: 1px solid #e5eaf1;
            border-radius: 18px;
            background: #fff;
            box-shadow: 0 10px 22px rgba(15, 23, 42, 0.05);
        }

        .calc-public-mobile-card h4 {
            margin: 0 0 12px;
            color: var(--primary-color);
            font-size: 1rem;
            font-weight: 900;
        }

        .calc-public-mobile-grid {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 10px 12px;
        }

        .calc-public-mobile-kv span {
            display: block;
            color: var(--text-light);
            font-size: 0.76rem;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0.04em;
        }

        .calc-public-mobile-kv strong {
            display: block;
            margin-top: 3px;
            color: var(--primary-color);
            font-size: 0.94rem;
            line-height: 1.35;
        }

        .calc-public-card-actions {
            margin-top: 14px;
            display: flex;
            justify-content: flex-end;
            gap: 8px;
        }

        .calc-public-totals {
            padding: 24px;
            display: grid;
            grid-template-columns: repeat(5, minmax(0, 1fr));
            gap: 14px;
        }

        .calc-public-total-card {
            padding: 18px;
            border-radius: 18px;
            background: linear-gradient(180deg, #ffffff, #f8fafc);
            border: 1px solid #e5eaf1;
        }

        .calc-public-total-card span {
            display: block;
            color: var(--text-light);
            font-size: 0.82rem;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0.04em;
        }

        .calc-public-total-card strong {
            display: block;
            margin-top: 8px;
            color: var(--primary-color);
            font-size: 1.3rem;
            line-height: 1.2;
        }

        .calc-public-actions-bar {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
        }

        .calc-public-actions-bar .btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            min-height: 44px;
            border-radius: 14px;
        }

        .calc-public-list-note {
            margin-top: 12px;
            color: var(--text-light);
            font-size: 0.86rem;
        }

        .calc-public-converters {
            padding: 24px;
        }

        .calc-public-converter-box {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 14px;
            padding: 16px 18px;
            border: 1px solid #e0e0e0;
            border-radius: 18px;
            background: #fff;
        }

        .calc-public-converter-rate {
            color: #d00000;
            font-size: 1.02rem;
            font-weight: 900;
            white-space: nowrap;
            flex: 0 0 auto;
        }

        .calc-public-converter-fields {
            flex: 1;
            min-width: 0;
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 12px;
            align-items: start;
        }

        .calc-public-converter-field {
            display: flex;
            align-items: center;
            gap: 10px;
            min-width: 0;
        }

        .calc-public-converter-field label {
            color: var(--text-light);
            font-size: 0.95rem;
            font-weight: 900;
            white-space: nowrap;
            line-height: 1;
        }

        .calc-public-converter-field input {
            width: 100%;
            min-width: 0;
            min-height: 50px;
            padding: 0 14px;
            border: 1px solid #d9e1ec;
            border-radius: 16px;
            background: #fff;
            color: var(--primary-color);
            font-size: 1rem;
            font-weight: 700;
            font-family: var(--font-main);
        }

        .calc-public-converter-field input:focus {
            outline: none;
            border-color: var(--secondary-color);
            box-shadow: 0 0 0 4px rgba(243, 156, 18, 0.14);
        }

        @media (max-width: 920px) {
            .calc-public-converter-box {
                align-items: stretch;
            }

            .calc-public-converter-rate {
                width: 100%;
                white-space: normal;
                line-height: 1.3;
            }

            .calc-public-converter-fields {
                width: 100%;
                flex-basis: 100%;
                grid-template-columns: 1fr;
            }

            .calc-public-converter-field {
                flex-direction: column;
                align-items: stretch;
                gap: 8px;
            }

            .calc-public-converter-field label {
                font-size: 0.92rem;
            }
        }

        @media (max-width: 1100px) {
            .calc-public-hero {
                grid-template-columns: 1fr;
            }
        }

        @media (max-width: 768px) {
            .calc-public-page {
                padding-top: 164px;
            }

            .calc-public-hero,
            .calc-public-panel,
            .calc-public-list,
            .calc-public-totals,
            .calc-public-converters {
                border-radius: 22px;
            }

            .calc-public-hero,
            .calc-public-panel,
            .calc-public-list,
            .calc-public-totals,
            .calc-public-converters {
                padding: 18px;
            }

            .calc-public-calc-card {
                width: 100%;
                max-width: 100%;
            }

            .calc-public-form-row {
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }

            .calc-public-form-row.row-2,
            .calc-public-form-row.row-3,
            .calc-public-form-row.row-4,
            .calc-public-form-row.row-5,
            .calc-public-form-row.row-6,
            .calc-public-form-row.row-7 {
                grid-template-columns: 1fr;
            }

            .calc-public-field.item-field,
            .calc-public-field.rate-field,
            .calc-public-field.triple-field {
                grid-column: span 2;
            }

            .row-2 .calc-public-field,
            .row-3 .calc-public-field,
            .row-4 .calc-public-field,
            .row-5 .calc-public-field,
            .row-6 .calc-public-field,
            .row-7 .calc-public-field {
                grid-column: span 1;
            }

            .calc-public-actions .btn,
            .calc-public-actions-bar .btn {
                width: 100%;
            }

            .calc-public-table-wrap {
                display: none;
            }

            .calc-public-mobile-list {
                display: grid;
            }

            .calc-public-totals {
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }

            .calc-public-converter-box {
                padding: 14px;
                gap: 12px;
            }

            .calc-public-converter-fields {
                gap: 10px;
            }

            .calc-public-converter-field {
                gap: 7px;
            }

            .calc-public-converter-rate {
                font-size: 0.98rem;
            }

            .calc-public-converter-field input {
                min-height: 48px;
                padding: 0 12px;
                font-size: 0.98rem;
            }
        }

/* Calculadora Expert extras */
.calc-public-mode-switch { margin-top: 20px; display: flex; gap: 10px; flex-wrap: wrap; }
.calc-public-mode-switch .btn { padding: 10px 22px; border-radius: 14px; font-weight: 800; }
.calc-public-results { padding: 24px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.calc-public-results .calc-public-total-card { background: linear-gradient(180deg, #ffffff, #f8fafc); border: 1px solid #e5eaf1; }
.calc-public-results .calc-public-total-card.result-total { background: linear-gradient(180deg, rgba(243,156,18,0.12), rgba(243,156,18,0.04)); border-color: rgba(243,156,18,0.5); }
.calc-public-results .calc-public-total-card.result-icms { background: linear-gradient(180deg, rgba(13,35,58,0.06), rgba(13,35,58,0.02)); }
.calc-public-table.expert-table { table-layout: auto; width: 100%; min-width: 0; }
.calc-public-table.expert-table th,
.calc-public-table.expert-table td { padding: 10px 8px; font-size: 0.78rem; white-space: normal; word-wrap: break-word; overflow-wrap: anywhere; vertical-align: middle; }
.calc-public-table.expert-table th { font-weight: 800; }
.calc-public-table.expert-table th:first-child,
.calc-public-table.expert-table td:first-child { width: 100%; min-width: 150px; }
.calc-public-table.expert-table th:not(:first-child),
.calc-public-table.expert-table td:not(:first-child) { width: 1%; white-space: nowrap; }
.calc-public-table.expert-table td.numeric { white-space: nowrap; }
@media (max-width: 1200px) {
    .calc-public-table.expert-table th,
    .calc-public-table.expert-table td { padding: 8px 4px; font-size: 0.72rem; }
}
@media (max-width: 768px) {
    .calc-public-table.expert-table { table-layout: auto; min-width: 0; }
    .calc-public-results { grid-template-columns: 1fr; }
}

/* Botões das ações */
.calc-public-actions .btn,
.calc-public-actions-bar .btn {
    min-height: 46px;
    padding: 0 22px;
    border-radius: 14px;
    font-size: 0.95rem;
    font-weight: 800;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(13, 35, 58, 0.10);
    transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}

.calc-public-actions .btn:hover,
.calc-public-actions-bar .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(13, 35, 58, 0.16);
}

.calc-public-actions .btn:active,
.calc-public-actions-bar .btn:active {
    transform: translateY(0);
}

.calc-public-actions .btn-primary,
.calc-public-actions-bar .btn-primary {
    background: linear-gradient(180deg, #1d487a, var(--primary-color));
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.calc-public-actions .btn-primary:hover,
.calc-public-actions-bar .btn-primary:hover {
    background: linear-gradient(180deg, #23518c, #1a3d66);
}

.calc-public-actions .btn-secondary,
.calc-public-actions-bar .btn-secondary {
    background: linear-gradient(180deg, #f9b043, #d9860a);
    border: 1px solid rgba(255, 255, 255, 0.10);
}

.calc-public-actions .btn-secondary:hover,
.calc-public-actions-bar .btn-secondary:hover {
    background: linear-gradient(180deg, #fabf5a, #e89418);
}

body.calc-public-body-embed {
    background: #f7f9fc;
}

body.calc-public-body-embed .calc-public-page {
    background: #f7f9fc;
    padding: 0;
}

body.calc-public-body-embed .calc-public-shell {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

body.calc-public-body-embed .calc-public-panel,
body.calc-public-body-embed .calc-public-list,
body.calc-public-body-embed .calc-public-totals,
body.calc-public-body-embed .calc-public-converters {
    background: #fff;
    border: 1px solid #e5eaf1;
    border-radius: 18px;
    padding: 14px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
    backdrop-filter: none;
}

body.calc-public-body-embed .calc-public-section-head {
    margin-bottom: 6px;
}

body.calc-public-body-embed .calc-public-section-head h2,
body.calc-public-body-embed .calc-public-section-head h3 {
    margin: 0 0 6px;
    color: var(--primary-color);
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.2;
}

body.calc-public-body-embed .calc-public-section-head p {
    margin: 0 0 18px;
    color: var(--text-light);
    font-size: 0.92rem;
}

body.calc-public-body-embed .calc-public-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

body.calc-public-body-embed .calc-public-field label {
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 700;
}

body.calc-public-body-embed .calc-public-field input {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid #d8e0ea;
    border-radius: 12px;
    background: #fff;
    color: var(--primary-color);
    font-size: 0.95rem;
    font-weight: 600;
    box-shadow: none;
}

body.calc-public-body-embed .calc-public-field input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 4px rgba(243, 156, 18, 0.12);
}

body.calc-public-body-embed .calc-public-field input[readonly] {
    background: #f8fafc;
    color: #516072;
}

body.calc-public-body-embed #expertRate {
    background: #fffacd !important;
}

body.calc-public-body-embed .calc-public-actions,
body.calc-public-body-embed .calc-public-actions-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

body.calc-public-body-embed .calc-public-actions .btn,
body.calc-public-body-embed .calc-public-actions-bar .btn {
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid #d8e0ea;
    border-radius: 12px;
    background: #fff;
    color: var(--primary-color);
    font-size: 0.92rem;
    font-weight: 700;
    box-shadow: none;
    transform: none;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

body.calc-public-body-embed .calc-public-actions .btn:hover,
body.calc-public-body-embed .calc-public-actions-bar .btn:hover {
    background: #f8fafc;
    transform: none;
    box-shadow: none;
}

body.calc-public-body-embed .calc-public-actions .btn-secondary,
body.calc-public-body-embed .calc-public-actions-bar .btn-secondary {
    border-color: var(--secondary-color);
    background: var(--secondary-color);
    color: #fff;
}

body.calc-public-body-embed .calc-public-actions .btn-secondary:hover,
body.calc-public-body-embed .calc-public-actions-bar .btn-secondary:hover {
    background: var(--secondary-hover);
    border-color: var(--secondary-hover);
}

body.calc-public-body-embed .calc-public-table-wrap {
    overflow: auto;
    border: 1px solid #e5eaf1;
    border-radius: 16px;
}

body.calc-public-body-embed .calc-public-table {
    min-width: 760px;
    border-collapse: collapse;
}

body.calc-public-body-embed .calc-public-table th,
body.calc-public-body-embed .calc-public-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #edf2f7;
    text-align: left;
    font-size: 0.92rem;
    vertical-align: middle;
}

body.calc-public-body-embed .calc-public-table th {
    background: #f8fafc;
    color: var(--primary-color);
    font-weight: 700;
    white-space: nowrap;
}

body.calc-public-body-embed .calc-public-table tbody tr:hover {
    background: #fcfdff;
}

body.calc-public-body-embed .calc-public-table .numeric {
    text-align: right;
    white-space: nowrap;
}

body.calc-public-body-embed .calc-public-results {
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    background: transparent;
    border: none;
    box-shadow: none;
}

body.calc-public-body-embed .calc-public-results .calc-public-total-card {
    border: 1px solid #e5eaf1;
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff, #f8fafc);
    padding: 16px;
    box-shadow: none;
}

body.calc-public-body-embed .calc-public-results .calc-public-total-card.result-total,
body.calc-public-body-embed .calc-public-results .calc-public-total-card.result-icms {
    background: linear-gradient(180deg, #ffffff, #f8fafc);
    border-color: #e5eaf1;
}

body.calc-public-body-embed .calc-public-total-card span {
    display: block;
    color: var(--text-light);
    font-size: 0.84rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

body.calc-public-body-embed .calc-public-total-card strong {
    display: block;
    margin-top: 8px;
    color: var(--primary-color);
    font-size: 1.2rem;
    line-height: 1.2;
}

body.calc-public-body-embed .calc-public-converter-box {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 16px;
    background: #fff;
}

body.calc-public-body-embed .calc-public-converter-rate {
    color: #d00000;
    font-weight: 700;
    white-space: nowrap;
}

body.calc-public-body-embed .calc-public-converter-fields {
    flex: 1;
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

body.calc-public-body-embed .calc-public-converter-field {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 7px;
}

body.calc-public-body-embed .calc-public-converter-field label {
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 700;
}

body.calc-public-body-embed .calc-public-converter-field input {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid #d8e0ea;
    border-radius: 12px;
    background: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    box-shadow: none;
}

body.calc-public-body-embed .calc-public-converter-field input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 4px rgba(243, 156, 18, 0.12);
}

body.calc-public-body-embed .calc-public-mobile-card {
    background: #fff;
    border: 1px solid #e5eaf1;
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
}

body.calc-public-body-embed .calc-public-mobile-card h4 {
    margin: 0 0 12px;
    font-size: 1rem;
    font-weight: 800;
    color: var(--primary-color);
}

body.calc-public-body-embed .calc-public-mobile-kv span {
    display: block;
    color: var(--text-light);
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

body.calc-public-body-embed .calc-public-mobile-kv strong {
    display: block;
    margin-top: 3px;
    color: var(--primary-color);
    font-size: 0.95rem;
}

@media (max-width: 768px) {
    body.calc-public-body-embed .calc-public-results {
        grid-template-columns: 1fr;
    }

    body.calc-public-body-embed .calc-public-converter-fields {
        grid-template-columns: 1fr;
    }

    body.calc-public-body-embed .calc-public-converter-field {
        align-items: stretch;
    }

    body.calc-public-body-embed .calc-public-actions .btn,
    body.calc-public-body-embed .calc-public-actions-bar .btn {
        width: 100%;
    }
}

.calc-public-input-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.calc-public-input-icon input {
    width: 100%;
    padding-right: 42px;
}

.calc-input-calc-icon {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: #f3f7fb;
    color: var(--secondary-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    transition: background 0.2s;
}

.calc-input-calc-icon:hover {
    background: #e7eef5;
}

.expert-math-calc-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.expert-math-calc-modal[hidden] {
    display: none;
}

.expert-math-calc-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
}

.expert-math-calc-dialog {
    position: relative;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.2);
    width: min(360px, 94vw);
    overflow: hidden;
}

.expert-math-calc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid #e5eaf1;
}

.expert-math-calc-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
    color: var(--primary-color);
}

.expert-math-calc-close {
    background: none;
    border: none;
    color: #6b7b8f;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 4px;
}

.expert-math-calc-body {
    padding: 18px;
}

.expert-math-calc-display {
    min-height: 56px;
    margin-bottom: 14px;
    padding: 12px 16px;
    background: linear-gradient(180deg, #f8fafc, #edf2f7);
    border: 1px solid #d8e0ea;
    border-radius: 14px;
    color: var(--primary-color);
    font-size: 1.6rem;
    font-weight: 700;
    text-align: right;
    overflow-x: auto;
    white-space: nowrap;
}

.expert-math-calc-keypad {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.expert-math-calc-key {
    border: none;
    border-radius: 14px;
    min-height: 48px;
    background: #f8fafc;
    color: var(--primary-color);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: inset 0 0 0 1px #e2e8f0;
    transition: background 0.12s, transform 0.08s;
}

.expert-math-calc-key:active {
    transform: translateY(1px);
    box-shadow: inset 0 0 0 1px #e2e8f0;
}

.expert-math-calc-key.operator {
    background: #fff7ed;
    color: #c26c00;
    box-shadow: inset 0 0 0 1px rgba(243, 156, 18, 0.22), 0 2px 0 rgba(243, 156, 18, 0.15);
}

.expert-math-calc-key.equal {
    background: linear-gradient(180deg, var(--secondary-color), var(--secondary-hover));
    color: #ffffff;
    box-shadow: none;
}

.expert-math-calc-key.insert {
    background: linear-gradient(180deg, #10b981, #059669);
    color: #ffffff;
    box-shadow: none;
    grid-column: span 4;
}

.expert-math-calc-key.wide {
    grid-column: span 2;
}
