:root {
    --sunat-ink: #172033;
    --sunat-muted: #647086;
    --sunat-primary: #087ca7;
    --sunat-primary-dark: #075d7d;
    --sunat-primary-soft: #e9f7fb;
    --sunat-accent: #f0a524;
    --sunat-line: #dfe5ec;
    --sunat-surface: #ffffff;
    --sunat-background: #f5f7fa;
    --sunat-success: #157a55;
    --sunat-danger: #b42318;
    --sunat-radius: 18px;
    --sunat-shadow: 0 16px 45px rgba(23, 32, 51, .09);
}

.sunat-catalog,
.sunat-catalog * {
    box-sizing: border-box;
}

.sunat-catalog {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    padding: clamp(42px, 7vw, 88px) 0;
    color: var(--sunat-ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
}

.sunat-catalog button,
.sunat-catalog input {
    font: inherit;
}

.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.sunat-hero {
    position: relative;
    overflow: visible;
    padding: clamp(32px, 6vw, 68px);
    border: 1px solid #d6e7ee;
    border-radius: 28px;
    background:
        radial-gradient(circle at 90% 10%, rgba(240, 165, 36, .18), transparent 28%),
        linear-gradient(135deg, #f2fbfe 0%, #ffffff 56%, #f8fbfc 100%);
}

.sunat-hero::before {
    position: absolute;
    top: 0;
    left: clamp(32px, 6vw, 68px);
    width: 76px;
    height: 4px;
    border-radius: 0 0 6px 6px;
    background: var(--sunat-accent);
    content: "";
}

.sunat-hero__eyebrow,
.sunat-list-header__eyebrow {
    display: inline-flex;
    align-items: center;
    margin-bottom: 13px;
    color: var(--sunat-primary-dark);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.sunat-hero h1,
.sunat-list-header h1 {
    max-width: 800px;
    margin: 0;
    color: var(--sunat-ink);
    font-size: clamp(2rem, 4vw, 3.35rem);
    font-weight: 760;
    letter-spacing: -.04em;
    line-height: 1.08;
}

.sunat-hero > p,
.sunat-list-header p {
    max-width: 700px;
    margin: 18px 0 0;
    color: var(--sunat-muted);
    font-size: clamp(1rem, 2vw, 1.12rem);
}

.sunat-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    margin-top: 32px;
}

.sunat-search__field {
    position: relative;
}

.sunat-search__field > svg,
.sunat-list-filter__field > svg {
    position: absolute;
    top: 50%;
    left: 19px;
    width: 21px;
    fill: none;
    stroke: #6c788b;
    stroke-linecap: round;
    stroke-width: 1.8;
    transform: translateY(-50%);
    pointer-events: none;
}

.sunat-search input,
.sunat-list-filter input {
    width: 100%;
    height: 58px;
    padding: 0 52px;
    border: 1px solid #cfd8e3;
    border-radius: 12px;
    outline: 0;
    background: var(--sunat-surface);
    color: var(--sunat-ink);
    box-shadow: 0 2px 4px rgba(23, 32, 51, .03);
    transition: border-color .2s, box-shadow .2s;
}

.sunat-search input:focus,
.sunat-list-filter input:focus {
    border-color: var(--sunat-primary);
    box-shadow: 0 0 0 4px rgba(8, 124, 167, .13);
}

.sunat-search__clear {
    position: absolute;
    top: 50%;
    right: 12px;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #7c8798;
    cursor: pointer;
    font-size: 1.55rem;
    line-height: 1;
    transform: translateY(-50%);
}

.sunat-search__button,
.sunat-list-filter > button {
    display: inline-flex;
    min-height: 58px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 0 26px;
    border: 0;
    border-radius: 12px;
    background: var(--sunat-primary);
    color: #fff;
    box-shadow: 0 9px 22px rgba(8, 124, 167, .22);
    cursor: pointer;
    font-weight: 750;
    transition: background .2s, transform .2s, box-shadow .2s;
}

.sunat-search__button:hover,
.sunat-list-filter > button:hover {
    background: var(--sunat-primary-dark);
    box-shadow: 0 12px 26px rgba(8, 93, 125, .28);
    transform: translateY(-1px);
}

.sunat-search__button svg {
    width: 21px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-width: 2;
}

.sunat-search.is-loading .sunat-search__button {
    opacity: .75;
    pointer-events: none;
}

.sunat-search__hint {
    margin-top: 10px;
    color: #758195;
    font-size: .83rem;
}

.sunat-suggestions {
    position: absolute;
    z-index: 20;
    top: calc(100% + 8px);
    right: 0;
    left: 0;
    overflow: hidden;
    padding: 7px;
    border: 1px solid var(--sunat-line);
    border-radius: 14px;
    background: #fff;
    box-shadow: var(--sunat-shadow);
}

.sunat-suggestion {
    display: grid;
    width: 100%;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    padding: 12px 13px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--sunat-ink);
    cursor: pointer;
    text-align: left;
}

.sunat-suggestion:hover,
.sunat-suggestion.is-active {
    background: var(--sunat-primary-soft);
}

.sunat-suggestion__name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sunat-suggestion__code {
    color: var(--sunat-primary-dark);
    font-size: .84rem;
    font-weight: 750;
}

mark {
    padding: 0;
    border-radius: 2px;
    background: #fff0c8;
    color: inherit;
}

.sunat-results {
    min-height: 200px;
    padding: clamp(36px, 6vw, 68px) 0 20px;
    scroll-margin-top: 28px;
}

.sunat-results__summary {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 28px;
    color: var(--sunat-muted);
}

.sunat-results__summary strong {
    color: var(--sunat-ink);
    font-size: 1.05rem;
}

.sunat-results__summary small {
    width: 100%;
    margin-top: 3px;
}

.sunat-result-group + .sunat-result-group {
    margin-top: 42px;
}

.sunat-result-group__heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 16px;
}

.sunat-result-group__heading h2 {
    margin: 0;
    font-size: clamp(1.25rem, 2.2vw, 1.55rem);
    letter-spacing: -.02em;
}

.sunat-result-group__heading span {
    color: var(--sunat-muted);
    font-size: .86rem;
}

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

.sunat-result-card {
    display: flex;
    min-height: 148px;
    flex-direction: column;
    padding: 21px;
    border: 1px solid var(--sunat-line);
    border-radius: var(--sunat-radius);
    background: var(--sunat-surface);
    box-shadow: 0 5px 18px rgba(23, 32, 51, .045);
    transition: border-color .2s, box-shadow .2s, transform .2s;
}

.sunat-result-card:hover {
    border-color: #b9d9e4;
    box-shadow: 0 12px 30px rgba(23, 32, 51, .08);
    transform: translateY(-2px);
}

.sunat-result-card__code {
    align-self: flex-start;
    padding: 5px 9px;
    border-radius: 7px;
    background: var(--sunat-primary-soft);
    color: var(--sunat-primary-dark);
    font-size: .77rem;
    font-weight: 800;
    letter-spacing: .025em;
}

.sunat-result-card h3 {
    margin: 13px 0 18px;
    font-size: 1rem;
    font-weight: 670;
    line-height: 1.4;
}

.sunat-result-card__copy {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: 7px;
    margin-top: auto;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--sunat-primary);
    cursor: pointer;
    font-size: .85rem;
    font-weight: 750;
}

.sunat-result-card__copy svg {
    width: 17px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.sunat-result-card__copy.is-copied {
    color: var(--sunat-success);
}

.sunat-empty {
    padding: 52px 24px;
    color: var(--sunat-muted);
    text-align: center;
}

.sunat-empty--bordered {
    border: 1px dashed #cbd6e1;
    border-radius: var(--sunat-radius);
    background: #fafcfd;
}

.sunat-empty__icon {
    display: grid;
    width: 62px;
    height: 62px;
    margin: 0 auto 18px;
    place-items: center;
    border-radius: 18px;
    background: var(--sunat-primary-soft);
    color: var(--sunat-primary);
}

.sunat-empty__icon svg {
    width: 30px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.5;
}

.sunat-empty h2 {
    margin: 0 0 8px;
    color: var(--sunat-ink);
    font-size: 1.25rem;
}

.sunat-empty p {
    margin: 0;
}

.sunat-empty a {
    display: inline-block;
    margin-top: 18px;
    color: var(--sunat-primary);
    font-weight: 750;
}

.sunat-all-codes {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 36px;
    margin-top: 44px;
    padding: clamp(28px, 5vw, 48px);
    border-radius: 24px;
    background: var(--sunat-ink);
    color: #fff;
}

.sunat-all-codes__label {
    color: #8fd2e8;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.sunat-all-codes h2 {
    margin: 7px 0 8px;
    font-size: clamp(1.4rem, 2.6vw, 2rem);
    letter-spacing: -.025em;
}

.sunat-all-codes p {
    max-width: 620px;
    margin: 0;
    color: #b9c4d4;
}

.sunat-all-codes__button {
    display: inline-flex;
    flex: 0 0 auto;
    min-height: 56px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 23px;
    border-radius: 12px;
    background: #fff;
    color: var(--sunat-ink);
    text-decoration: none;
    font-weight: 800;
    transition: background .2s, transform .2s;
}

.sunat-all-codes__button:hover {
    background: #eff8fb;
    transform: translateY(-1px);
}

.sunat-all-codes__button svg,
.sunat-breadcrumb svg,
.sunat-pagination svg {
    width: 18px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.sunat-catalog--list {
    padding-top: clamp(32px, 5vw, 60px);
}

.sunat-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 32px;
    color: var(--sunat-muted);
    font-size: .87rem;
}

.sunat-breadcrumb a {
    color: var(--sunat-primary);
    text-decoration: none;
    font-weight: 700;
}

.sunat-breadcrumb svg {
    width: 15px;
}

.sunat-list-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 38px;
    padding-bottom: 34px;
    border-bottom: 1px solid var(--sunat-line);
}

.sunat-list-header h1 {
    max-width: 760px;
    font-size: clamp(1.9rem, 3.8vw, 3rem);
}

.sunat-list-header__count {
    flex: 0 0 auto;
    padding: 14px 18px;
    border-left: 3px solid var(--sunat-accent);
}

.sunat-list-header__count strong,
.sunat-list-header__count span {
    display: block;
}

.sunat-list-header__count strong {
    color: var(--sunat-ink);
    font-size: 1.65rem;
    line-height: 1;
}

.sunat-list-header__count span {
    margin-top: 5px;
    color: var(--sunat-muted);
    font-size: .82rem;
}

.sunat-list-filter {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 30px 0 22px;
}

.sunat-list-filter__field {
    position: relative;
    flex: 1;
}

.sunat-list-filter > button {
    min-height: 52px;
    padding: 0 21px;
}

.sunat-list-filter input {
    height: 52px;
}

.sunat-list-filter > a {
    padding: 12px;
    color: var(--sunat-muted);
    font-size: .9rem;
    font-weight: 700;
    text-decoration: none;
}

.sunat-table-card {
    overflow: hidden;
    border: 1px solid var(--sunat-line);
    border-radius: var(--sunat-radius);
    background: #fff;
    box-shadow: 0 9px 30px rgba(23, 32, 51, .055);
}

.sunat-table-card__summary {
    padding: 15px 20px;
    border-bottom: 1px solid var(--sunat-line);
    background: #fafbfc;
    color: var(--sunat-muted);
    font-size: .85rem;
}

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

.sunat-table th,
.sunat-table td {
    padding: 17px 20px;
    border-bottom: 1px solid #e9edf2;
    text-align: left;
    vertical-align: middle;
}

.sunat-table th {
    background: #fff;
    color: #768195;
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .055em;
    text-transform: uppercase;
}

.sunat-table tr:last-child td {
    border-bottom: 0;
}

.sunat-table tbody tr {
    transition: background .15s;
}

.sunat-table tbody tr:hover {
    background: #f8fbfc;
}

.sunat-code {
    display: inline-flex;
    padding: 6px 9px;
    border-radius: 7px;
    background: var(--sunat-primary-soft);
    color: var(--sunat-primary-dark);
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: .9rem;
    font-weight: 800;
    letter-spacing: .025em;
}

.sunat-product {
    color: #303b4f;
    font-size: .94rem;
}

.sunat-table th:first-child {
    width: 180px;
}

.sunat-table th:last-child {
    width: 110px;
}

.sunat-copy {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 9px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--sunat-primary);
    cursor: pointer;
    font-size: .8rem;
    font-weight: 750;
}

.sunat-copy:hover {
    background: var(--sunat-primary-soft);
}

.sunat-copy.is-copied {
    color: var(--sunat-success);
}

.sunat-copy svg {
    width: 16px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.sunat-pagination {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 16px;
    margin-top: 24px;
}

.sunat-pagination__direction {
    display: inline-flex;
    width: max-content;
    min-height: 44px;
    align-items: center;
    gap: 6px;
    padding: 0 14px;
    border: 1px solid var(--sunat-line);
    border-radius: 10px;
    background: #fff;
    color: var(--sunat-ink);
    text-decoration: none;
    font-size: .87rem;
    font-weight: 750;
}

.sunat-pagination__direction:last-child {
    justify-self: end;
}

.sunat-pagination__direction.is-disabled {
    opacity: .42;
}

.sunat-pagination__status {
    color: var(--sunat-muted);
    font-size: .86rem;
}

.sunat-notice {
    padding: 18px 20px;
    border-radius: 12px;
}

.sunat-notice--error {
    border: 1px solid #f1c4c0;
    background: #fff5f4;
    color: var(--sunat-danger);
}

.sunat-toast {
    position: fixed;
    z-index: 100;
    right: 22px;
    bottom: 22px;
    padding: 12px 17px;
    border-radius: 10px;
    background: var(--sunat-ink);
    color: #fff;
    box-shadow: var(--sunat-shadow);
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
    transition: opacity .2s, transform .2s;
}

.sunat-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 760px) {
    .sunat-catalog {
        width: min(100% - 22px, 1120px);
        padding-top: 28px;
    }

    .sunat-hero {
        padding: 32px 20px 26px;
        border-radius: 21px;
    }

    .sunat-hero::before {
        left: 20px;
    }

    .sunat-search {
        grid-template-columns: 1fr;
    }

    .sunat-search__button {
        width: 100%;
    }

    .sunat-result-grid {
        grid-template-columns: 1fr;
    }

    .sunat-all-codes,
    .sunat-list-header {
        align-items: stretch;
        flex-direction: column;
    }

    .sunat-all-codes {
        gap: 24px;
        padding: 28px 22px;
        border-radius: 20px;
    }

    .sunat-all-codes__button {
        width: 100%;
    }

    .sunat-list-header__count {
        align-self: flex-start;
    }

    .sunat-list-filter {
        align-items: stretch;
        flex-direction: column;
    }

    .sunat-list-filter > a {
        text-align: center;
    }

    .sunat-table-wrap {
        overflow: visible;
    }

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

    .sunat-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
    }

    .sunat-table tbody {
        padding: 8px 14px;
    }

    .sunat-table tr {
        position: relative;
        padding: 15px 0;
        border-bottom: 1px solid var(--sunat-line);
    }

    .sunat-table tr:last-child {
        border-bottom: 0;
    }

    .sunat-table td {
        padding: 3px 0;
        border: 0;
    }

    .sunat-table td:last-child {
        margin-top: 7px;
    }

    .sunat-pagination {
        grid-template-columns: 1fr 1fr;
    }

    .sunat-pagination__status {
        grid-column: 1 / -1;
        grid-row: 1;
        text-align: center;
    }

    .sunat-pagination__direction {
        grid-row: 2;
    }
}

@media (max-width: 420px) {
    .sunat-result-group__heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .sunat-suggestion {
        grid-template-columns: 1fr;
        gap: 2px;
    }

    .sunat-pagination__direction {
        width: 100%;
        justify-content: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sunat-catalog *,
    .sunat-catalog *::before,
    .sunat-catalog *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}
.sunat-back-button {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    gap: 9px;
    margin-bottom: 25px;
    padding: 0 17px;
    border: 1px solid #d7e1e9;
    border-radius: 11px;
    background: #ffffff;
    color: #087ca7;
    box-shadow: 0 4px 14px rgba(23, 32, 51, 0.06);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition:
        color 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease,
        transform 0.2s ease;
}

.sunat-back-button svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.sunat-back-button:hover {
    border-color: #087ca7;
    background: #effaff;
    color: #075d7d;
    transform: translateX(-2px);
}

@media (max-width: 600px) {
    .sunat-back-button {
        width: 100%;
        justify-content: center;
    }
}

