:root {
    --white: #ffffff;
    --canvas: #f4f6f9;
    --surface-soft: #f8fafc;
    --line: #e3e8ef;
    --line-strong: #cfd7e3;
    --ink: #172033;
    --muted: #697386;
    --navy: #1f2b50;
    --navy-2: #29385f;
    --navy-soft: #edf1f8;
    --olive: #65704a;
    --red: #b93845;
    --green: #31795a;
    --amber: #9a6a1d;
    --danger: #a42d3a;
    --shadow-sm: 0 8px 24px rgba(31, 43, 80, 0.06);
    --shadow-md: 0 18px 48px rgba(31, 43, 80, 0.10);
    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 24px;
    --sidebar-width: 264px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--canvas);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
    font: inherit;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

button,
a,
input,
select,
textarea {
    outline-color: var(--navy-2);
    outline-offset: 2px;
}

.app-shell {
    min-height: 100vh;
}

.app-shell--centered {
    display: grid;
    place-items: center;
    min-height: 100svh;
    padding: 24px;
    background:
        radial-gradient(circle at 15% 15%, rgba(41, 56, 95, 0.08), transparent 32%),
        radial-gradient(circle at 85% 82%, rgba(185, 56, 69, 0.06), transparent 28%),
        var(--canvas);
}

.app-shell--centered .main-area {
    width: 100%;
    margin-left: 0;
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 40;
    width: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    padding: 26px 20px 20px;
    background: linear-gradient(180deg, #1d294d 0%, #16213f 100%);
    color: var(--white);
    box-shadow: 10px 0 40px rgba(23, 32, 51, 0.10);
}

.brand {
    display: inline-flex;
    align-items: center;
}

.brand--sidebar {
    min-height: 58px;
    padding: 2px 8px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.brand--sidebar img {
    width: 155px;
    height: auto;
}

.brand--mobile img {
    width: 128px;
}

.nav {
    display: grid;
    gap: 8px;
    margin-top: 28px;
}

.nav__link {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 46px;
    padding: 11px 13px;
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.74);
    font-weight: 650;
    transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.nav__link:hover,
.nav__link.is-active {
    color: var(--white);
    background: rgba(255, 255, 255, 0.11);
    transform: translateX(2px);
}

.nav__link.is-active {
    box-shadow: inset 3px 0 0 #d85660;
}

.nav__icon {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.09);
    font-size: 17px;
}

.sidebar__footer {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
}

.user-chip__avatar {
    display: grid;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    font-weight: 800;
}

.user-chip span:last-child {
    min-width: 0;
}

.user-chip strong,
.user-chip small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-chip small {
    margin-top: 1px;
    color: rgba(255, 255, 255, 0.62);
    text-transform: capitalize;
}

.sidebar__logout {
    display: inline-block;
    margin-top: 12px;
    color: rgba(255, 255, 255, 0.66);
    font-size: 13px;
}

.sidebar__logout:hover {
    color: var(--white);
}

.main-area {
    min-width: 0;
    margin-left: var(--sidebar-width);
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 25;
    display: flex;
    min-height: 72px;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    padding: 12px clamp(18px, 3vw, 42px);
    border-bottom: 1px solid rgba(227, 232, 239, 0.88);
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(14px);
}

.topbar__meta {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 650;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4d9b72;
    box-shadow: 0 0 0 5px rgba(77, 155, 114, 0.10);
}

.menu-toggle,
.brand--mobile {
    display: none;
}

.icon-button {
    appearance: none;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.content {
    width: min(1480px, 100%);
    margin: 0 auto;
    padding: clamp(22px, 4vw, 48px);
}

.content--centered {
    width: 100%;
    max-width: 760px;
    margin-inline: auto;
    padding: 0;
}

.content--centered .alert,
.content--centered .auth-card {
    width: 100%;
    max-width: 760px;
    margin-inline: auto;
}

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

.hero h1,
.page-heading h1,
.auth-card h1 {
    margin: 6px 0 10px;
    color: var(--ink);
    font-size: clamp(28px, 4vw, 43px);
    line-height: 1.13;
    letter-spacing: -0.035em;
}

.hero p,
.page-heading p,
.auth-card p {
    max-width: 730px;
    margin: 0;
    color: var(--muted);
    font-size: 16px;
}

.eyebrow {
    color: var(--navy-2);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero__badge {
    flex: 0 0 auto;
    min-width: 210px;
    padding: 15px 18px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.hero__badge span,
.hero__badge strong {
    display: block;
}

.hero__badge span {
    color: var(--muted);
    font-size: 12px;
}

.hero__badge strong {
    margin-top: 2px;
    color: var(--navy);
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.metric-card {
    position: relative;
    overflow: hidden;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.metric-card::after {
    position: absolute;
    right: -24px;
    bottom: -32px;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: var(--navy-soft);
    content: "";
}

.metric-card__label,
.metric-card strong,
.metric-card small {
    position: relative;
    z-index: 1;
    display: block;
}

.metric-card__label {
    color: var(--muted);
    font-size: 13px;
    font-weight: 650;
}

.metric-card strong {
    margin: 8px 0 3px;
    color: var(--navy);
    font-size: 30px;
    letter-spacing: -0.04em;
}

.metric-card small {
    color: #8791a2;
}

.panel {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-sm);
    padding: clamp(18px, 3vw, 28px);
}

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

.panel__header h2 {
    margin: 4px 0 0;
    font-size: 22px;
    letter-spacing: -0.025em;
}

.result-count {
    padding: 7px 11px;
    border-radius: 999px;
    background: var(--navy-soft);
    color: var(--navy);
    font-size: 12px;
    font-weight: 750;
    white-space: nowrap;
}

.filter-grid {
    display: grid;
    grid-template-columns: minmax(210px, 1.5fr) repeat(3, minmax(150px, 1fr)) auto;
    gap: 12px;
    align-items: end;
    margin-bottom: 22px;
}

.field {
    display: grid;
    gap: 7px;
    min-width: 0;
}

.field > span {
    color: #4d596c;
    font-size: 12px;
    font-weight: 750;
}

.field input,
.field select,
.field textarea,
.compact-filters input,
.compact-filters select {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: var(--white);
    color: var(--ink);
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.field textarea {
    min-height: 86px;
    resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.compact-filters input:focus,
.compact-filters select:focus {
    border-color: var(--navy-2);
    box-shadow: 0 0 0 4px rgba(41, 56, 95, 0.09);
}

.field input::placeholder,
.field textarea::placeholder,
.compact-filters input::placeholder {
    color: #9aa3b2;
}

.field-error {
    color: var(--danger);
    font-weight: 650;
}

.filter-actions {
    display: flex;
    gap: 8px;
}

.button {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 15px;
    border: 1px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 750;
    line-height: 1.2;
    transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease, border-color 150ms ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button--primary {
    background: var(--navy);
    color: var(--white);
    box-shadow: 0 8px 18px rgba(31, 43, 80, 0.18);
}

.button--primary:hover {
    background: var(--navy-2);
    box-shadow: 0 10px 24px rgba(31, 43, 80, 0.24);
}

.button--secondary {
    background: var(--navy-soft);
    color: var(--navy);
}

.button--ghost {
    border-color: var(--line-strong);
    background: var(--white);
    color: var(--navy);
}

.button--ghost:hover {
    border-color: var(--navy-2);
}

.button--light {
    background: var(--white);
    color: var(--navy);
}

.button--danger-ghost {
    border-color: #efd4d7;
    background: #fff8f8;
    color: var(--danger);
}

.button--small {
    min-height: 34px;
    padding: 7px 11px;
    font-size: 13px;
}

.button--full {
    width: 100%;
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 14px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
}

.data-table th,
.data-table td {
    padding: 14px 15px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.data-table th {
    background: var(--surface-soft);
    color: #5c6677;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.045em;
    text-transform: uppercase;
    white-space: nowrap;
}

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

.data-table tbody tr:hover {
    background: #fbfcfe;
}

.data-table td strong,
.data-table td small {
    display: block;
}

.data-table td small {
    margin-top: 3px;
    max-width: 360px;
    color: var(--muted);
}

.rate-value {
    display: inline-flex !important;
    width: max-content;
    margin-top: 5px;
    padding: 4px 8px;
    border-radius: 8px;
    background: #eef6f1;
    color: var(--green);
    font-weight: 850;
}

.rate-value--full {
    background: #eef2f8;
    color: var(--navy-2);
}

.empty-state {
    padding: 34px !important;
    color: var(--muted);
    text-align: center !important;
}

.panel__note {
    margin: 16px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.loading-line {
    height: 3px;
    margin: -2px 0 14px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--navy-soft);
}

.loading-line::after {
    display: block;
    width: 42%;
    height: 100%;
    border-radius: inherit;
    background: var(--navy-2);
    animation: loading 900ms ease-in-out infinite alternate;
    content: "";
}

@keyframes loading {
    from { transform: translateX(-10%); }
    to { transform: translateX(150%); }
}

.alert {
    margin-bottom: 18px;
    padding: 13px 15px;
    border: 1px solid;
    border-radius: 12px;
    font-weight: 650;
}

.alert--success {
    border-color: #c9e5d6;
    background: #f0f9f4;
    color: #256247;
}

.alert--warning {
    border-color: #ead9b8;
    background: #fff9eb;
    color: #79551c;
}

.alert--danger {
    border-color: #edcdd1;
    background: #fff5f6;
    color: #842733;
}

.auth-card {
    width: 100%;
    max-width: 760px;
    margin-inline: auto;
    padding: clamp(28px, 6vw, 48px);
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--white);
    box-shadow: var(--shadow-md);
}

.auth-card__brand {
    display: inline-block;
    margin-bottom: 28px;
}

.auth-card__brand img {
    width: 155px;
}

.auth-card h1 {
    font-size: 31px;
}

.auth-form,
.stack-form {
    display: grid;
    gap: 16px;
    margin-top: 24px;
}

.back-link {
    display: inline-block;
    margin-top: 20px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 650;
}

.back-link:hover,
.text-link:hover {
    color: var(--navy);
}

.page-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.page-heading h1 {
    font-size: clamp(28px, 3vw, 38px);
}

.admin-grid {
    display: grid;
    grid-template-columns: minmax(340px, 0.78fr) minmax(520px, 1.22fr);
    gap: 22px;
    align-items: start;
}

.panel--sticky {
    position: sticky;
    top: 94px;
}

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

.input-suffix {
    display: flex;
    align-items: center;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--white);
}

.input-suffix:focus-within {
    border-color: var(--navy-2);
    box-shadow: 0 0 0 4px rgba(41, 56, 95, 0.09);
}

.input-suffix input {
    border: 0;
    border-radius: 0;
    box-shadow: none !important;
}

.input-suffix span {
    padding: 0 12px;
    color: var(--muted);
    font-weight: 750;
}

.switch-field {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: #4d596c;
    font-weight: 650;
}

.switch-field input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.switch {
    position: relative;
    width: 42px;
    height: 24px;
    border-radius: 999px;
    background: #cdd4df;
    transition: background 150ms ease;
}

.switch::after {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--white);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.16);
    transition: transform 150ms ease;
    content: "";
}

.switch-field input:checked + .switch {
    background: var(--green);
}

.switch-field input:checked + .switch::after {
    transform: translateX(18px);
}

.compact-filters {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) 140px 120px auto;
    gap: 8px;
    margin-bottom: 18px;
}

.records-list {
    display: grid;
    gap: 10px;
}

.record-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--white);
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.record-card:hover {
    border-color: #c8d2e0;
    box-shadow: var(--shadow-sm);
}

.record-card__main {
    min-width: 0;
}

.record-card__title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.record-card__title .rate-value {
    margin-top: 0;
}

.record-card h3 {
    margin: 7px 0 2px;
    font-size: 16px;
}

.record-card p,
.record-card small {
    margin: 0;
    color: var(--muted);
}

.record-card__actions {
    display: flex;
    flex: 0 0 auto;
    gap: 7px;
}

.bulk-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 18px 0 14px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: var(--surface-soft);
}

.page-heading__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.bulk-select-all {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--navy);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.bulk-select-all input,
.record-select input {
    width: 18px;
    height: 18px;
    accent-color: var(--navy);
}

.records-list--selectable .record-card {
    position: relative;
    padding-left: 52px;
}

.record-select {
    position: absolute;
    top: 50%;
    left: 18px;
    display: grid;
    place-items: center;
    transform: translateY(-50%);
    cursor: pointer;
}

.record-select input:disabled {
    cursor: not-allowed;
    opacity: 0.42;
}

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

.import-result {
    margin-bottom: 20px;
}

.import-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    padding: clamp(20px, 3vw, 28px);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.import-card__icon {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border-radius: 14px;
    background: var(--navy-soft);
    color: var(--navy);
    font-size: 22px;
    font-weight: 900;
}

.import-card h2 {
    margin: 16px 0 7px;
    font-size: 23px;
}

.import-card p {
    margin: 0 0 18px;
    color: var(--muted);
}

.upload-dropzone {
    display: grid;
    min-height: 142px;
    place-items: center;
    gap: 6px;
    padding: 22px;
    border: 2px dashed var(--line-strong);
    border-radius: 15px;
    background: var(--surface-soft);
    text-align: center;
    cursor: pointer;
    transition: border-color 160ms ease, background 160ms ease;
}

.upload-dropzone:hover,
.upload-dropzone:focus-within {
    border-color: var(--navy-2);
    background: var(--navy-soft);
}

.upload-dropzone input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
}

.upload-dropzone strong,
.upload-dropzone small {
    display: block;
}

.upload-dropzone small {
    color: var(--muted);
}

.import-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.import-help {
    margin-top: 20px;
    padding: 18px 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-soft);
}

.import-help h3 {
    margin: 0 0 8px;
    font-size: 16px;
}

.import-help ol {
    margin: 0;
    padding-left: 20px;
    color: var(--muted);
}

@media (max-width: 760px) {
    .bulk-toolbar,
    .import-card__actions,
    .page-heading__actions {
        align-items: stretch;
        flex-direction: column;
    }

    .import-grid {
        grid-template-columns: 1fr;
    }

    .bulk-toolbar .button,
    .import-card__actions .button,
    .page-heading__actions .button {
        width: 100%;
        justify-content: center;
    }
}

.status-badge {
    display: inline-flex;
    padding: 3px 7px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.status-badge--active {
    background: #eaf6ef;
    color: var(--green);
}

.status-badge--inactive {
    background: #f0f2f5;
    color: #747e8e;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 13px;
    font-weight: 650;
}

.pagination a,
.text-link {
    color: var(--navy);
    font-weight: 750;
}

.empty-card {
    padding: 28px;
    border: 1px dashed var(--line-strong);
    border-radius: 14px;
    color: var(--muted);
    text-align: center;
}

@media (max-width: 1180px) {
    .filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .field--wide {
        grid-column: 1 / -1;
    }

    .filter-actions {
        align-self: end;
    }

    .admin-grid {
        grid-template-columns: 1fr;
    }

    .panel--sticky {
        position: static;
    }
}

@media (max-width: 960px) {
    .sidebar {
        width: min(82vw, 290px);
        transform: translateX(-105%);
        transition: transform 180ms ease;
    }

    .sidebar.is-open {
        transform: translateX(0);
    }

    body.menu-open::after {
        position: fixed;
        inset: 0;
        z-index: 35;
        background: rgba(15, 22, 39, 0.48);
        content: "";
    }

    .main-area {
        margin-left: 0;
    }

    .topbar {
        justify-content: space-between;
        min-height: 64px;
    }

    .menu-toggle,
    .brand--mobile {
        display: inline-flex;
    }

    .menu-toggle {
        width: 40px;
        height: 40px;
        align-items: center;
        justify-content: center;
        border: 1px solid var(--line);
        border-radius: 10px;
        background: var(--white);
        color: var(--navy);
        font-size: 20px;
    }

    .topbar__meta {
        display: none;
    }

    .metrics-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    html {
        -webkit-text-size-adjust: 100%;
    }

    input,
    select,
    textarea,
    button {
        font-size: 16px;
    }

    .content {
        padding: 20px 14px 34px;
    }

    .hero,
    .page-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .hero__badge {
        width: 100%;
    }

    .metrics-grid {
        gap: 10px;
    }

    .metric-card {
        padding: 16px;
    }

    .metric-card strong {
        font-size: 25px;
    }

    .filter-grid,
    .form-row,
    .compact-filters {
        grid-template-columns: 1fr;
    }

    .filter-actions,
    .filter-actions .button {
        width: 100%;
    }

    .panel {
        padding: 17px;
        border-radius: 18px;
    }

    .page-heading,
    .page-heading > div,
    .panel,
    .record-card__main {
        min-width: 0;
        width: 100%;
    }

    .record-card h3,
    .record-card p,
    .data-table td {
        overflow-wrap: anywhere;
    }

    .panel__header {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .table-wrap {
        overflow: visible;
        border: 0;
    }

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

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

    .data-table tbody {
        display: grid;
        gap: 12px;
    }

    .data-table tr {
        overflow: hidden;
        border: 1px solid var(--line);
        border-radius: 14px;
        background: var(--white);
        box-shadow: var(--shadow-sm);
    }

    .data-table td {
        position: relative;
        min-height: 46px;
        padding: 12px 14px 12px 42% !important;
        border-bottom: 1px solid var(--line);
    }

    .data-table td::before {
        position: absolute;
        left: 14px;
        width: 35%;
        color: var(--muted);
        content: attr(data-label);
        font-size: 11px;
        font-weight: 800;
        letter-spacing: 0.03em;
        text-transform: uppercase;
    }

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

    .data-table .empty-state {
        padding: 30px 16px !important;
    }

    .data-table .empty-state::before {
        display: none;
    }

    .record-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .record-card__actions,
    .record-card__actions form,
    .record-card__actions .button {
        width: 100%;
    }

    .pagination {
        align-items: stretch;
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 440px) {
    .metrics-grid {
        grid-template-columns: 1fr;
    }

    .auth-card {
        padding: 26px 20px;
        border-radius: 18px;
    }

    .data-table td {
        padding-left: 14px !important;
    }

    .data-table td::before {
        position: static;
        display: block;
        width: auto;
        margin-bottom: 5px;
    }
}

.role-guide {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.role-guide article {
    display: grid;
    gap: 5px;
    padding: 17px 18px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.role-guide strong {
    color: var(--navy);
}

.role-guide span {
    color: var(--muted);
    font-size: 13px;
}

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

/* Plena 2026 — ajustes de responsividade sem alterar a identidade visual. */
html, body { max-width: 100%; }
.app-shell, .main-area, .content, .panel, .table-wrap, .admin-grid, .admin-grid > *, .page-heading > *, .record-card__main { min-width: 0; }
.panel, .content, .page-heading { max-width: 100%; }
.table-wrap { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data-table { min-width: 650px; }
.data-table td, .record-card, .record-card__title, .panel__header, .page-heading, .page-heading__actions { overflow-wrap: anywhere; }
.field, .field input, .field select, .compact-filters input, .compact-filters select { min-width: 0; max-width: 100%; }
@media (max-width: 720px) {
    .content { width: 100%; }
    .table-wrap { overflow: visible; }
    .data-table { min-width: 0; }
    .data-table td { display: block; min-height: 0; padding: 11px 13px !important; white-space: normal; overflow-wrap: anywhere; }
    .data-table td::before { position: static; display: block; width: auto; margin: 0 0 5px; line-height: 1.4; }
    .data-table td .rate-value { margin-top: 2px; }
    .record-card { min-width: 0; }
    .filter-grid, .admin-grid, .form-row, .compact-filters { min-width: 0; }
}
@media (max-width: 360px) {
    .app-shell--centered { padding: 10px; }
    .panel { padding: 14px; }
    .content { padding: 16px 10px 24px; }
}

/* Auditoria fiscal 2026 */
.fiscal-status { display:inline-flex;align-items:center;gap:.25rem;line-height:1.25;padding:.32rem .62rem;border-radius:8px;font-weight:700;font-size:.73rem;letter-spacing:.02em;color:#724a18;background:#fff0d7;white-space:normal;}
.fiscal-status--ok{color:#1e6749;background:#e5f5ec;}
.audit-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:20px 0;}
.audit-summary>div{min-width:0;padding:14px;border:1px solid var(--line);border-radius:12px;display:flex;flex-direction:column;gap:2px;overflow-wrap:anywhere;background:var(--surface-soft);}
.audit-summary strong{font-size:.78rem;color:var(--muted);}
@media(max-width:740px){.audit-summary{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:360px){.audit-summary{grid-template-columns:1fr;}}
