﻿@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Instrument+Serif:ital@0;1&display=swap');

:root {
    --kc-red: #d51a27;
    --kc-red-dark: #9c1018;
    --kc-red-soft: rgba(213, 26, 39, 0.1);
    --kc-black: #161112;
    --kc-ink: #241d1f;
    --kc-muted: #786e71;
    --kc-line: rgba(22, 17, 18, 0.1);
    --kc-card: rgba(255, 255, 255, 0.88);
    --kc-cream: #f3efec;
    --kc-shell: #ece9e7;
    --kc-success: #11a36a;
    --kc-success-soft: rgba(17, 163, 106, 0.12);
    --kc-warning: #ca7b16;
    --kc-warning-soft: rgba(202, 123, 22, 0.12);
    --kc-info: #2a76d2;
    --kc-info-soft: rgba(42, 118, 210, 0.12);
    --kc-shadow-xl: 0 26px 70px rgba(18, 14, 15, 0.18);
    --kc-shadow-lg: 0 18px 44px rgba(18, 14, 15, 0.1);
    --kc-shadow-sm: 0 10px 24px rgba(18, 14, 15, 0.06);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
    margin: 0;
}

body {
    font: 14px/1.55 "Plus Jakarta Sans", "Segoe UI", sans-serif;
    color: var(--kc-ink);
    background: var(--kc-shell);
}

body[data-view="login"] {
    display: grid;
    place-items: center;
    padding: 24px;
    background: white;
}

body[data-view="consultas"] {
    padding: 24px;
    background:
        radial-gradient(circle at 100% 0%, rgba(213, 26, 39, 0.08), transparent 22%),
        linear-gradient(180deg, #f1edeb 0%, #ebe7e5 100%);
}

/* Critical layout fix for Consultas (kept near top to avoid downstream parse/cascade issues) */
body[data-view="consultas"] .consultas-wrapper {
    max-width: 1320px;
    margin: 0 auto;
    padding: 10px 0 30px;
}

body[data-view="consultas"] .consultas-grid {
    display: grid !important;
    grid-template-columns: minmax(260px, 320px) minmax(0, 1fr) !important;
    gap: 24px;
    align-items: stretch;
}

body[data-view="consultas"] .portfolio-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: 100%;
    align-self: stretch;
}

body[data-view="consultas"] .portfolio-actions {
    display: flex;
    margin-top: auto;
    padding-top: 12px;
}

body[data-view="consultas"] .portfolio-actions .btn-salir-alt {
    width: 100%;
    justify-content: center;
}

body[data-view="consultas"] .portfolio-card,
body[data-view="consultas"] .filters-card,
body[data-view="consultas"] .table-card {
    background: #fff;
}

body[data-view="consultas"] .portfolio-logo img {
    width: 100% !important;
    max-width: 285px !important;
    height: auto !important;
    margin: 0 auto;
}

@media (max-width: 980px) {
    body[data-view="consultas"] .consultas-grid {
        grid-template-columns: 1fr !important;
    }
}

button,
input,
select {
    font: inherit;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

.is-hidden {
    display: none !important;
}

.auth-shell {
    width: min(1180px, 100%);
    min-height: min(760px, 88vh);
    display: grid;
    grid-template-columns: minmax(380px, 450px) 1fr;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.62);
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: var(--kc-shadow-xl);
    backdrop-filter: blur(14px);
}

.auth-panel {
    position: relative;
}

.auth-panel--form {
    padding: 42px 42px 34px;
    background: rgba(255, 255, 255, 0.94);
}

.auth-panel--hero {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 0;
    padding: 0;
    overflow: hidden;
    color: #fff;
    background:
        linear-gradient(145deg, rgba(220, 28, 29, 0.22), rgba(15, 15, 15, 0.35)),
        url("assets/image/teamkath.webp") center center / cover no-repeat;
}

.auth-panel--hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 14% 28%, rgba(224, 42, 42, 0.24), transparent 34%),
        radial-gradient(circle at 78% 84%, rgba(227, 38, 38, 0.16), transparent 40%),
        linear-gradient(180deg, rgba(16, 14, 18, 0.22) 8%, rgba(16, 10, 14, 0.38) 72%, rgba(16, 10, 14, 0.5) 100%);
    z-index: 1;
}

.auth-hero-media {
    position: absolute;
    inset: 0;
    --hero-media-image: url("assets/image/teamkath.webp");
    background:
        linear-gradient(145deg, rgba(220, 28, 29, 0.28), rgba(15, 15, 15, 0.45)),
        var(--hero-media-image) center center / cover no-repeat;
    z-index: 0;
    opacity: 1;
    filter: saturate(1.15);
}

.auth-hero-img {
    display: none;
}


.auth-panel--hero::after {
    content: none;
}

.auth-panel--hero > * {
    position: relative;
    z-index: 1;
}

.auth-brand img {
    width: 100%;
    max-width: 285px;
    height: auto;
}

.auth-copy {
    max-width: 420px;
    margin-top: 92px;
}

.auth-kicker,
.hero-kicker,
.sidebar-label,
.toolbar-kicker,
.subtle-label {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.auth-kicker {
    color: var(--kc-red);
    background: var(--kc-red-soft);
}

.auth-copy h1 {
    margin: 18px 0 14px;
    font-size: clamp(2.1rem, 5vw, 2.5rem);
    line-height: 1.02;
    letter-spacing: -2px;
}

.auth-copy p {
    margin: 0;
    color: var(--kc-muted);
    font-size: 15px;
}

.auth-form {
    max-width: 360px;
    margin-top: 34px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--kc-ink);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.input-wrap {
    position: relative;
}

.form-ctrl,
.ctrl-select,
.ctrl-text,
.ctrl-date,
.top-search input {
    width: 100%;
    border: 1px solid var(--kc-line);
    border-radius: 14px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.form-ctrl,
.ctrl-select,
.ctrl-text,
.ctrl-date {
    padding: 14px 15px;
    background: #fff;
    color: var(--kc-ink);
}

.form-ctrl::placeholder,
.ctrl-text::placeholder,
.top-search input::placeholder {
    color: #968b8f;
}

.form-ctrl:focus,
.ctrl-select:focus,
.ctrl-text:focus,
.ctrl-date:focus,
.top-search input:focus {
    border-color: rgba(213, 26, 39, 0.46);
    box-shadow: 0 0 0 4px rgba(213, 26, 39, 0.12);
}

.ctrl-pwd {
    padding-right: 50px;
}

.toggle-eye {
    position: absolute;
    top: 50%;
    right: 10px;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 999px;
    transform: translateY(-50%);
    color: #756b6e;
    background: transparent;
    cursor: pointer;
}

.toggle-eye:hover {
    background: rgba(22, 17, 18, 0.05);
}

.auth-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 2px 0 18px;
}

.check-control {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--kc-muted);
    font-size: 12px;
}

.check-control input {
    width: 16px;
    height: 16px;
    accent-color: var(--kc-red);
}

.auth-link {
    color: var(--kc-red);
    font-size: 12px;
    font-weight: 700;
}

.btn-ingresar,
.btn-buscar,
.btn-salir,
.quick-tab,
.doc-button,
.nav-item {
    border: none;
    cursor: pointer;
    transition: transform 0.14s ease, opacity 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn-ingresar,
.btn-buscar {
    color: #fff;
    background: linear-gradient(135deg, var(--kc-red) 0%, #b7121d 100%);
    box-shadow: 0 16px 28px rgba(213, 26, 39, 0.22);
}

.btn-ingresar {
    width: 100%;
    padding: 14px 16px;
    border-radius: 14px;
    font-weight: 700;
}

.btn-buscar {
    min-height: 48px;
    padding: 0 20px;
    border-radius: 16px;
    font-weight: 700;
}

.btn-ingresar:hover,
.btn-buscar:hover,
.btn-salir:hover,
.doc-button:hover,
.quick-tab:hover,
.nav-item:hover {
    transform: translateY(-1px);
}

.btn-ingresar:active,
.btn-buscar:active,
.btn-salir:active,
.doc-button:active,
.quick-tab:active,
.nav-item:active {
    transform: scale(0.98);
}

.btn-ingresar:disabled,
.btn-buscar:disabled,
.btn-salir:disabled,
.doc-button:disabled {
    cursor: not-allowed;
    opacity: 0.72;
    transform: none;
}

.error-panel,
.msg-error,
.msg-info {
    margin: 14px 0 0;
    padding: 12px 14px;
    border-radius: 16px;
    font-size: 13px;
}

.error-panel,
.msg-error {
    color: #9a141d;
    background: rgba(213, 26, 39, 0.08);
    border: 1px solid rgba(213, 26, 39, 0.16);
}

.msg-info {
    color: #7a2026;
    background: rgba(213, 26, 39, 0.07);
    border: 1px solid rgba(213, 26, 39, 0.14);
}

.helper-text,
.auth-footer {
    color: var(--kc-muted);
    font-size: 12px;
}

.helper-text {
    min-height: 18px;
    margin-top: 12px;
}

.auth-footer {
    max-width: 360px;
    margin-top: 24px;
}

.auth-hero-top img {
    width: auto;
    height: 36px;
}

.auth-hero-copy {
    position: relative;
    z-index: 2;
    max-width: 540px;
    margin: auto 0 0;
    padding: 34px 32px 32px;
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.4);
}

.hero-kicker {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.auth-hero-copy h2 {
    max-width: 9ch;
    margin: 14px 0 12px;
    font: 400 clamp(2.8rem, 5.3vw, 4.8rem)/0.92 "Instrument Serif", Georgia, serif;
}

.auth-hero-copy p {
    max-width: 44ch;
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.06rem;
}

.dashboard-shell {
    width: min(1440px, 100%);
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 22px;
    margin: 0 auto;
}

.dashboard-sidebar,
.toolbar-card,
.results-card,
.top-search,
.user-pill {
    background: var(--kc-card);
    backdrop-filter: blur(16px);
    box-shadow: var(--kc-shadow-sm);
}

.dashboard-sidebar {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 48px);
    padding: 28px 22px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 28px;
}

.sidebar-brand img {
    width: auto;
    height: 34px;
}

.sidebar-block {
    margin-top: 26px;
}

.sidebar-label,
.toolbar-kicker,
.subtle-label {
    color: var(--kc-muted);
    background: rgba(22, 17, 18, 0.04);
}

.sidebar-nav {
    display: grid;
    gap: 8px;
    margin-top: 14px;
}

.nav-item {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid transparent;
    border-radius: 14px;
    color: var(--kc-ink);
    background: transparent;
    font-weight: 600;
    text-align: left;
}

.nav-item.active {
    color: var(--kc-red);
    background: var(--kc-red-soft);
    border-color: rgba(213, 26, 39, 0.14);
}

.sidebar-block--status {
    padding: 18px;
    border: 1px solid rgba(22, 17, 18, 0.08);
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.85), rgba(247, 241, 236, 0.82));
}

.sidebar-status-list {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.sidebar-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(22, 17, 18, 0.04);
}

.sidebar-status span {
    color: var(--kc-muted);
    font-size: 12px;
}

.sidebar-status strong {
    color: var(--kc-ink);
    font-size: 14px;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 22px;
    color: var(--kc-muted);
    font-size: 12px;
}

.sidebar-footer strong {
    display: block;
    margin-bottom: 4px;
    color: var(--kc-ink);
}

.dashboard-main {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.dashboard-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.top-search {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 20px;
}

.top-search input {
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none;
}

.top-search input:focus {
    box-shadow: none;
}

.top-search-icon {
    color: var(--kc-muted);
    font-size: 16px;
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-pill {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 14px 8px 8px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 20px;
}

.user-avatar {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: #fff;
    background: linear-gradient(135deg, var(--kc-red) 0%, var(--kc-black) 100%);
    font-weight: 800;
}

.user-copy strong {
    display: block;
    font-size: 13px;
}

.user-copy span {
    color: var(--kc-muted);
    font-size: 12px;
}

.btn-salir {
    min-height: 44px;
    padding: 0 18px;
    border-radius: 16px;
    color: #fff;
    background: linear-gradient(135deg, #221617 0%, #3e171b 100%);
    font-weight: 700;
}

.dashboard-hero {
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    gap: 22px;
    padding: 28px 30px;
    overflow: hidden;
    border-radius: 28px;
    color: #fff;
    background:
        radial-gradient(circle at 20% 18%, rgba(213, 26, 39, 0.28), transparent 26%),
        linear-gradient(135deg, #181112 0%, #2c181a 55%, #431016 100%);
    box-shadow: var(--kc-shadow-lg);
}

.dashboard-hero::after {
    content: "";
    position: absolute;
    inset: auto -90px -90px auto;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(213, 26, 39, 0.28) 0%, transparent 70%);
}

.dashboard-hero > * {
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dashboard-hero h1 {
    max-width: 17ch;
    margin: 16px 0 12px;
    font: 400 clamp(2.2rem, 4vw, 3.4rem)/0.96 "Instrument Serif", Georgia, serif;
}

.dashboard-hero p {
    max-width: 56ch;
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
}

.metric-surface {
    padding: 18px 18px 16px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 22px;
    background: var(--kc-card);
    box-shadow: var(--kc-shadow-sm);
}

.metric-surface span,
.metric-surface small {
    display: block;
}

.metric-surface span {
    color: var(--kc-muted);
    font-size: 12px;
}

.metric-surface strong {
    display: block;
    margin: 8px 0 4px;
    font-size: clamp(1.8rem, 2.4vw, 2.2rem);
    line-height: 1;
}

.metric-surface small {
    color: var(--kc-muted);
    font-size: 12px;
}

.metric-surface--red {
    background: rgba(213, 26, 39, 0.08);
}

.metric-surface--rose {
    background: rgba(213, 26, 39, 0.1);
}

.metric-surface--mint {
    background: rgba(17, 163, 106, 0.1);
}

.metric-surface--sky {
    background: rgba(42, 118, 210, 0.1);
}

.metric-surface--sand {
    background: rgba(202, 123, 22, 0.1);
}

.toolbar-card,
.results-card {
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 28px;
}

.toolbar-head,
.results-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
}

.toolbar-head h2,
.results-head h3 {
    margin: 10px 0 0;
    font-size: 1.55rem;
}

.toolbar-summary,
.results-head p,
.total-row {
    color: var(--kc-muted);
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    align-items: end;
    margin-top: 20px;
}

.filter-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.quick-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.quick-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid rgba(22, 17, 18, 0.08);
    border-radius: 999px;
    color: var(--kc-ink);
    background: rgba(22, 17, 18, 0.04);
    font-weight: 600;
}

.quick-tab.active {
    color: #fff;
    background: linear-gradient(135deg, var(--kc-black) 0%, #3b2224 100%);
}

.quick-tab-count {
    display: inline-grid;
    place-items: center;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    font-size: 11px;
    font-weight: 700;
}

.quick-tab:not(.active) .quick-tab-count {
    background: rgba(22, 17, 18, 0.06);
}

.document-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 18px;
}

.document-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 260px;
    padding: 18px;
    overflow: hidden;
    border: 1px solid rgba(22, 17, 18, 0.08);
    border-radius: 24px;
    background: #fff;
    box-shadow: var(--kc-shadow-sm);
}

.document-card::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 4px;
    background: rgba(22, 17, 18, 0.08);
}

.document-card--emitido {
    background: linear-gradient(180deg, rgba(17, 163, 106, 0.06), #fff 24%);
}

.document-card--emitido::before {
    background: var(--kc-success);
}

.document-card--anulado {
    background: linear-gradient(180deg, rgba(213, 26, 39, 0.06), #fff 24%);
}

.document-card--anulado::before {
    background: var(--kc-red);
}

.document-card--other {
    background: linear-gradient(180deg, rgba(42, 118, 210, 0.05), #fff 24%);
}

.document-card--other::before {
    background: var(--kc-info);
}

.document-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.document-card-body {
    display: grid;
    gap: 6px;
}

.document-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.badge,
.doc-meta span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
}

.badge-tipo {
    color: var(--kc-red);
    background: var(--kc-red-soft);
}

.badge-emitido {
    color: var(--kc-success);
    background: var(--kc-success-soft);
}

.badge-anulado {
    color: var(--kc-red);
    background: rgba(213, 26, 39, 0.12);
}

.badge-otro {
    color: var(--kc-info);
    background: var(--kc-info-soft);
}

.document-index {
    color: var(--kc-muted);
    font-size: 12px;
    font-weight: 700;
}

.document-card-body h4 {
    margin: 0;
    font-size: 1.1rem;
}

.document-client {
    margin: 10px 0 0;
    color: var(--kc-ink);
    font-weight: 600;
}

.doc-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.doc-meta span {
    color: var(--kc-muted);
    background: rgba(22, 17, 18, 0.05);
    font-weight: 600;
}

.document-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
}

.document-stats div {
    padding: 12px;
    border-radius: 16px;
    background: rgba(22, 17, 18, 0.04);
}

.document-stats dt {
    color: var(--kc-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.document-stats dd {
    margin: 6px 0 0;
    color: var(--kc-ink);
    font-weight: 700;
}

.document-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
}

.document-actions .helper-text {
    margin-top: 0;
}

.doc-button {
    min-height: 38px;
    padding: 0 14px;
    border-radius: 12px;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.doc-button.pdf {
    background: linear-gradient(135deg, var(--kc-red) 0%, #b91018 100%);
}

.doc-button.xml {
    background: linear-gradient(135deg, #2b2324 0%, #53494c 100%);
}

.doc-button.cdr {
    background: linear-gradient(135deg, #2c7ad4 0%, #235fb0 100%);
}

.loading-state,
.no-data {
    grid-column: 1 / -1;
    display: grid;
    place-items: center;
    min-height: 240px;
    padding: 24px;
    border: 1px dashed rgba(22, 17, 18, 0.12);
    border-radius: 24px;
    color: var(--kc-muted);
    text-align: center;
    background: rgba(22, 17, 18, 0.03);
}

.no-data strong {
    display: block;
    margin-bottom: 8px;
    color: var(--kc-ink);
    font-size: 1rem;
}

.mono {
    font-family: "Consolas", "Courier New", monospace;
}

@media (max-width: 1300px) {
    .metrics-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .document-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 980px) {
    .auth-shell {
        grid-template-columns: 1fr;
    }

    .auth-panel--hero {
        min-height: 520px;
    }

    .dashboard-shell {
        grid-template-columns: 1fr;
    }

    .dashboard-sidebar {
        min-height: auto;
    }

    .filters-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    body[data-view="login"],
    body[data-view="consultas"] {
        padding: 14px;
    }

    .auth-panel--form,
    .auth-panel--hero,
    .dashboard-sidebar,
    .toolbar-card,
    .results-card {
        padding: 22px;
    }

    .auth-copy {
        margin-top: 44px;
    }

    .auth-meta-row,
    .dashboard-topbar,
    .top-actions,
    .toolbar-head,
    .results-head {
        flex-direction: column;
        align-items: stretch;
    }

    .top-actions {
        gap: 10px;
    }

    .dashboard-hero {
        grid-template-columns: 1fr;
        padding: 24px 22px;
    }

    .metrics-grid,
    .filters-grid,
    .document-grid,
    .document-stats {
        grid-template-columns: 1fr;
    }

}
@font-face {

  font-family: "Mona Sans";

  src: url("assets/font/mona-sans/Mona-Sans-Regular.ttf") format("truetype");

  font-weight: 400;

  font-style: normal;

  font-display: swap;
}

.document-client {
    margin: 10px 0 0;
    color: var(--kc-ink);
    font-weight: 600;
}

.doc-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.doc-meta span {
    color: var(--kc-muted);
    background: rgba(22, 17, 18, 0.05);
    font-weight: 600;
}

.document-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
}

.document-stats div {
    padding: 12px;
    border-radius: 16px;
    background: rgba(22, 17, 18, 0.04);
}

.document-stats dt {
    color: var(--kc-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.document-stats dd {
    margin: 6px 0 0;
    color: var(--kc-ink);
    font-weight: 700;
}

.document-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
}

.document-actions .helper-text {
    margin-top: 0;
}

.doc-button {
    min-height: 38px;
    padding: 0 14px;
    border-radius: 12px;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.doc-button.pdf {
    background: linear-gradient(135deg, var(--kc-red) 0%, #b91018 100%);
}

.doc-button.xml {
    background: linear-gradient(135deg, #2b2324 0%, #53494c 100%);
}

.doc-button.cdr {
    background: linear-gradient(135deg, #2c7ad4 0%, #235fb0 100%);
}

.loading-state,
.no-data {
    grid-column: 1 / -1;
    display: grid;
    place-items: center;
    min-height: 240px;
    padding: 24px;
    border: 1px dashed rgba(22, 17, 18, 0.12);
    border-radius: 24px;
    color: var(--kc-muted);
    text-align: center;
    background: rgba(22, 17, 18, 0.03);
}

.no-data strong {
    display: block;
    margin-bottom: 8px;
    color: var(--kc-ink);
    font-size: 1rem;
}

.mono {
    font-family: "Consolas", "Courier New", monospace;
}

@media (max-width: 1300px) {
    .metrics-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .document-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 980px) {
    .auth-shell {
        grid-template-columns: 1fr;
    }

    .auth-panel--hero {
        min-height: 520px;
    }

    .dashboard-shell {
        grid-template-columns: 1fr;
    }

    .dashboard-sidebar {
        min-height: auto;
    }

    .filters-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    body[data-view="login"],
    body[data-view="consultas"] {
        padding: 14px;
    }

    .auth-panel--form,
    .auth-panel--hero,
    .dashboard-sidebar,
    .toolbar-card,
    .results-card {
        padding: 22px;
    }

    .auth-copy {
        margin-top: 44px;
    }

    .auth-meta-row,
    .dashboard-topbar,
    .top-actions,
    .toolbar-head,
    .results-head {
        flex-direction: column;
        align-items: stretch;
    }

    .top-actions {
        gap: 10px;
    }

    .dashboard-hero {
        grid-template-columns: 1fr;
        padding: 24px 22px;
    }

    .metrics-grid,
    .filters-grid,
    .document-grid,
    .document-stats {
        grid-template-columns: 1fr;
    }

}

@font-face {
  font-family: "Mona Sans";
  src: url("assets/font/mona-sans/Mona-Sans-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Mona Sans";
  src: url("assets/font/mona-sans/Mona-Sans-SemiBold.ttf") format("truetype");
  font-weight: 600;
}


/* ==========================================================================
   DASHBOARD PEDIDOS: PREMIUM DESIGN SYSTEM
   ========================================================================== */


/* Layout Shell */
.dashboard-shell--pedidos {
    display: grid;
    grid-template-columns: 320px 1fr;
    min-height: 100vh;
    background: #f8fafc;
    background-image: radial-gradient(at 0% 0%, rgba(227, 30, 36, 0.03) 0, transparent 50%), 
                      radial-gradient(at 50% 0%, rgba(26, 115, 232, 0.02) 0, transparent 50%);
}


@media (max-width: 1024px) {
    .dashboard-shell--pedidos {
        grid-template-columns: 1fr;
    }
    
    .dashboard-sidebar--pedidos {
        position: fixed;
        left: -320px;
        top: 0;
        bottom: 0;
        z-index: 1000;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 20px 0 50px rgba(0,0,0,0.1);
    }
    
    .sidebar--open {
        transform: translateX(320px);
    }

    .dashboard-main {
        width: 100%;
        overflow-x: hidden;
    }

    .dashboard-header--pedidos {
        padding: 16px 20px;
    }

    .dashboard-title {
        font-size: 2.2rem;
    }
}

.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(4px);
    z-index: 999;
}



/* Sidebar Navigation */
.nav-button, .nav-group__toggle, .nav-subnav__button {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 4px;
    border-radius: 14px;
    border: none;
    background: transparent;
    color: #4a5568;
    font-weight: 600;
    font-size: 13px;
    text-align: left;
    transition: all 0.2s ease;
    cursor: pointer;
}

.nav-button:hover {
    background: rgba(0, 0, 0, 0.03);
}

.nav-button--active, .nav-subnav__button--active {
    background: #feeef0 !important;
    color: #e31e24 !important;
    font-weight: 700 !important;
}

.nav-button__icon {
    width: 28px;
    height: 28px;
    margin-right: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.05);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
}

.nav-button--active .nav-button__icon {
    background: white;
    color: #e31e24;
}

.sidebar-label {
    display: block;
    font-size: 11px;
    font-weight: 800;
    color: #94a3b8;
    letter-spacing: 0.1em;
    padding: 0 16px;
    margin-bottom: 12px;
}


/* Sidebar Status Block (Glassmorphism) */
.sidebar-block--status {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(20px);
    border-radius: 28px;
    padding: 28px;
    margin: 16px 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.04);
    border: 1px solid rgba(255, 255, 255, 0.7);
}

.sidebar-kicker {
    display: block;
    font-size: 10px;
    font-weight: 800;
    color: #94a3b8;
    letter-spacing: 2px;
    margin-bottom: 20px;
    text-transform: uppercase;
    opacity: 0.8;
}

.sidebar-status-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: white;
    border-radius: 16px;
    margin-bottom: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.01);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0,0,0,0.03);
}

.sidebar-status-row:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(227, 30, 36, 0.05);
    border-color: rgba(227, 30, 36, 0.1);
}



.sidebar-status-row span { font-size: 12px; color: #64748b; }
.sidebar-status-row strong { font-size: 14px; color: #e31e24; }

/* Dashboard Hero */
.dashboard-hero {
    background: linear-gradient(145deg, #181112 0%, #2c181a 45%, #431016 100%);
    border-radius: 32px;
    padding: 64px 48px;
    color: white;
    margin-bottom: 32px;
    position: relative;
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
}

.dashboard-hero h1 {
    font-family: "Instrument Serif", serif;
    font-size: clamp(2.5rem, 6vw, 4rem);
    line-height: 1.02;
    margin-top: 12px;
    letter-spacing: -0.02em;
}

/* Header Refinement */
.dashboard-header--pedidos {
    background: white;
    padding: 24px 48px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.dashboard-header__top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dashboard-header__main {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.dashboard-header__title-area {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dashboard-title {
    font-family: "Instrument Serif", serif;
    font-size: 2.8rem;
    color: #1e293b;
    margin: 0;
    line-height: 1;
}

.dashboard-subtitle {
    color: #64748b;
    font-size: 14px;
    margin: 0;
}

/* Breadcrumbs */
.breadcrumb-list {
    display: flex;
    align-items: center;
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    color: #94a3b8;
}

.breadcrumb-list a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-list a:hover {
    color: #1e293b;
}

.breadcrumb-separator {
    margin: 0 10px;
    font-weight: 400;
    opacity: 0.5;
}

.breadcrumb-list .active {
    color: #1e293b;
    pointer-events: none;
}

.breadcrumb-list li {
    list-style-type: none !important;
    display: flex;
    align-items: center;
}


/* Status Tabs */
.dashboard-header__tabs {
    margin-top: 12px;
}

.status-tabs {
    display: flex;
    gap: 8px;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 14px;
    width: fit-content;
}

.status-tab {
    padding: 8px 20px;
    border-radius: 10px;
    border: none;
    background: transparent;
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.status-tab:hover {
    color: #1e293b;
}

.status-tab.active {
    background: white;
    color: #e31e24;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* Search Bar Update */
.search-input-wrapper {
    position: relative;
    width: 380px;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 18px;
}

.header-search__input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.header-search__input:focus {
    background: white;
    border-color: #e31e24;
    box-shadow: 0 0 0 4px rgba(227, 30, 36, 0.08);
}


/* Metric Surface Colors */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}


.metric-surface {
    padding: 24px;
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 140px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.02);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.metric-surface--white { background: white; color: #1e293b; border-color: #f1f5f9; box-shadow: 0 10px 30px rgba(0,0,0,0.03); }
.metric-surface--pink  { background: linear-gradient(135deg, #fff5f6 0%, #feeef0 100%); color: #e31e24; border: 1px solid rgba(227, 30, 36, 0.1); box-shadow: 0 10px 25px rgba(227, 30, 36, 0.05); }
.metric-surface--mint  { background: linear-gradient(135deg, #f0fdf4 0%, #e6f6f0 100%); color: #11a36a; border: 1px solid rgba(17, 163, 106, 0.1); box-shadow: 0 10px 25px rgba(17, 163, 106, 0.05); }
.metric-surface--blue  { background: linear-gradient(135deg, #f1f7ff 0%, #eaf4ff 100%); color: #2a76d2; border: 1px solid rgba(42, 118, 210, 0.1); box-shadow: 0 10px 25px rgba(42, 118, 210, 0.05); }
.metric-surface--sand  { background: linear-gradient(135deg, #fefcf8 0%, #fdf6ec 100%); color: #b45309; border: 1px solid rgba(180, 83, 9, 0.1); box-shadow: 0 10px 25px rgba(180, 83, 9, 0.05); }



.metric-surface__val { font-size: 40px; font-weight: 700; line-height: 1; margin: 8px 0; }
.metric-surface__label { font-size: 12px; font-weight: 600; opacity: 0.8; }
.metric-surface__sub { font-size: 11px; opacity: 0.6; }

/* Quick Cards Enhancement */
.quick-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 20px;
}

.quick-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 24px;
    text-align: left;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.quick-card:hover {
    background: white;
    border-color: #e31e24;
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(227, 30, 36, 0.08);
}

.quick-card__icon {
    font-size: 24px;
    background: white;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
    margin-bottom: 8px;
}

.quick-card strong {
    font-size: 15px;
    color: #1e293b;
    display: block;
}

.quick-card span:not(.quick-card__icon) {
    font-size: 12px;
    color: #64748b;
    line-height: 1.4;
}

.status-icon {
    margin-right: 12px;
    font-size: 16px;
}

/* Metadata Footnote */
.dashboard-footnote {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 16px;
    font-weight: 500;
}


.table-wrap {
    width: 100%;
    overflow-x: auto;
    margin-top: 24px;
    border-radius: 12px;
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
}

.data-table th {
    background: #f8fafc;
    color: #64748b;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.05em;
    padding: 16px 20px;
    border-bottom: 2px solid #f1f5f9;
}

.data-table td {
    padding: 16px 20px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    vertical-align: middle;
}

.data-table tr:hover td {
    background: #fbfcfd;
}

/* Stock Badges */
.stock-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.stock-pill--empty   { background: #feeef0; color: #e11d48; }
.stock-pill--low     { background: #fff7ed; color: #ea580c; }
.stock-pill--healthy { background: #f0fdf4; color: #16a34a; }

/* Filter Controls */
.pedidos-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
}

.pedidos-filter-bar input,
.pedidos-filter-bar select {
    padding: 10px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-size: 13px;
    outline: none;
}

.pedidos-filter-bar input:focus { border-color: #e31e24; box-shadow: 0 0 0 3px rgba(227, 30, 36, 0.1); }

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
}

.pagination__info { font-size: 13px; color: #64748b; font-weight: 500; }

/* ========================================================================== */
/* Consultas | Layout and components                                          */
/* ========================================================================== */

body[data-view="consultas"] {
    min-height: 100vh;
    background: #fff;
    padding: 24px 12px 40px;
    font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
    color: #1f1f23;
}

.consultas-wrapper {
    max-width: 1320px;
    margin: 0 auto;
    padding: 10px 0 30px;
}

.consultas-grid {
    display: grid;
    grid-template-columns: minmax(260px, 320px) 1fr;
    gap: 24px;
    align-items: stretch;
}

.portfolio-column {
    display: flex;
}

.portfolio-card {
    width: 100%;
    background: #fff;
    border-radius: 32px;
    padding: 26px 24px 30px;
    border: 1px solid rgba(22, 17, 18, 0.08);
    box-shadow: var(--kc-shadow-lg);
    display: flex;
    flex-direction: column;
    gap: 18px;
    height: 100%;
    min-height: 100%;
}

.portfolio-logo img {
    width: 100%;
    max-width: 285px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.portfolio-divider {
    height: 1px;
    background: #e2dfe0;
    border-radius: 999px;
}

.portfolio-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.portfolio-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 14px;
    border-radius: 999px;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #d52127 0%, #a60f16 100%);
    box-shadow: 0 10px 20px rgba(213, 26, 39, 0.35);
}

.portfolio-value {
    font-size: 0.95rem;
    color: #1d1d1d;
    letter-spacing: 0.02em;
}

.portfolio-value-text {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: #2f2f2f;
}

.user-id-card {
    position: relative;
    border-radius: 18px;
    padding: 10px;
    background: linear-gradient(145deg, #391015 0%, #1b0d11 50%, #0f1016 100%);
    box-shadow: 0 16px 28px rgba(10, 8, 10, 0.45);
    border: 1px solid rgba(255, 80, 80, 0.25);
}

.user-id-card__screen {
    border-radius: 12px;
    padding: 10px 12px 12px;
    min-height: 156px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    background:
        radial-gradient(circle at 0% 0%, rgba(255, 44, 44, 0.26), transparent 30%),
        radial-gradient(circle at 100% 100%, rgba(255, 70, 70, 0.16), transparent 40%),
        linear-gradient(160deg, #290d13 0%, #17131d 58%, #0f1015 100%);
    color: #ffe7e7;
    border: 1px solid rgba(255, 70, 70, 0.22);
}

.user-id-card__chips {
    display: flex;
    justify-content: space-between;
    gap: 6px;
}

.user-id-card__chip {
    min-width: 108px;
    text-align: center;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 84, 84, 0.8);
    color: #ffd0d0;
    font: 700 13px/1.1 "Segoe UI", Tahoma, Arial, sans-serif;
    letter-spacing: 0.05em;
    background: rgba(30, 12, 18, 0.8);
}

.user-id-card__line-top {
    width: 52%;
    height: 14px;
    margin: -1px auto 0;
    border-left: 1px solid rgba(255, 84, 84, 0.8);
    border-right: 1px solid rgba(255, 84, 84, 0.8);
    border-bottom: 1px solid rgba(255, 84, 84, 0.8);
    border-radius: 0 0 10px 10px;
}

.user-id-card__identity {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-top: 0;
}

.user-id-card__ruc {
    font: 700 14px/1.1 "Segoe UI", Tahoma, Arial, sans-serif;
    color: #fff1f1;
    letter-spacing: 0.01em;
}

.user-id-card__name {
    max-width: 100%;
    font: 700 14px/1.15 "Segoe UI", Tahoma, Arial, sans-serif;
    text-transform: uppercase;
    color: #fff1f1;
    word-break: break-word;
}

.user-id-card__brand-mark {
    width: 116px;
    height: 74px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 0;
    background: transparent;
    padding: 0;
}

.user-id-card__company-icon {
    position: relative;
    display: block;
    width: 96px;
    height: 70px;
    border-radius: 10px;
    overflow: hidden;
    filter: drop-shadow(0 0 11px rgba(255, 130, 130, 0.24));
}

.user-id-card__company-icon svg {
    display: block;
    width: 100%;
    height: 100%;
}

.filters-card {
    background: #fff;
    border-radius: 32px;
    padding: 28px 32px;
    box-shadow: var(--kc-shadow-lg);
    border: 1px solid rgba(22, 17, 18, 0.08);
}

.filters-card__header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
}

.filters-card__tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    border-radius: 999px;
    background: rgba(213, 26, 39, 0.08);
    color: var(--kc-red);
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-weight: 800;
}

.filters-card__header h2 {
    margin: 6px 0 0;
    font-size: clamp(1.15rem, 1.9vw, 1.45rem);
    line-height: 1.1;
}

.filters-card__header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.filters-card__body {
    margin-top: 20px;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.filter-item {
    flex: 1;
    min-width: 160px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-item label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #5c5760;
    letter-spacing: 0.05em;
}

.filters-card__submit {
    display: flex;
    align-items: stretch;
    justify-content: flex-end;
    min-width: 170px;
}

.filters-card__submit .btn-buscar,
.filters-card__header-actions .btn-buscar--sm {
    min-width: 140px;
}

.filters-card .btn-buscar {
    min-height: 46px;
}

.btn-buscar--sm {
    padding: 12px 28px;
    font-size: 0.95rem;
}

.btn-buscar {
    border: none;
    border-radius: 16px;
    color: #fff;
    background: linear-gradient(135deg, var(--kc-red) 0%, #b7121d 100%);
    box-shadow: 0 18px 38px rgba(213, 26, 39, 0.35);
    font-weight: 700;
    letter-spacing: 0.04em;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-buscar:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-buscar:hover:not(:disabled) {
    transform: translateY(-1px);
}

.btn-salir-alt {
    background: linear-gradient(135deg, #d52127 0%, #a60f16 100%);
    padding: 12px 28px;
    border-radius: 16px;
    letter-spacing: 0.08em;
}

.table-card {
    background: #fff;
    border-radius: 32px;
    padding: 24px;
    border: 1px solid rgba(22, 17, 18, 0.08);
    box-shadow: var(--kc-shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.table-card .msg-info {
    margin: 0;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.grid-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
}

.grid-table thead tr {
    background: linear-gradient(135deg, #d52127 0%, #a60f16 100%);
    color: #fff;
}

.grid-table thead th {
    padding: 8px 10px;
    text-align: left;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    line-height: 1.1;
    text-transform: uppercase;
    font-weight: 700;
    border-bottom: 0;
    white-space: nowrap;
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
}

.grid-table tbody tr {
    border-bottom: 1px solid #f1f1f1;
}

.grid-table tbody tr:last-child {
    border-bottom: none;
}

.grid-table td {
    padding: 5px 10px;
    color: #2d2d33;
    vertical-align: middle;
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
    font-size: 12px;
    line-height: 1.2;
}

.acciones {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.acciones button {
    min-width: 46px;
    height: 30px;
    border: none;
    border-radius: 8px;
    padding: 0 8px;
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    color: #fff;
}

.acciones .btn-pdf {
    background: linear-gradient(135deg, #d52127 0%, #a60f16 100%);
}

.acciones .btn-xls {
    background: linear-gradient(135deg, #1f8f4e 0%, #136437 100%);
}

.acciones .btn-cdr {
    background: linear-gradient(135deg, #2a76d2 0%, #1e57a2 100%);
}

.acciones button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.grid-table td .badge-tipo {
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
    font-size: 12px;
}

.grid-table td .badge-emitido,
.grid-table td .badge-anulado,
.grid-table td .badge-otro {
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
    font-size: 12px;
}

.grid-table td.mono {
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
    font-size: 12px;
}

.tc {
    text-align: center;
}

.tr {
    text-align: right;
}

.mono {
    font-family: "Consolas", "Courier New", monospace;
    font-size: 12px;
}

.no-data {
    padding: 40px 20px;
    text-align: center;
    color: #9ca4b6;
    font-size: 14px;
}

.no-data span {
    font-size: 32px;
    display: block;
    margin-bottom: 8px;
}

.table-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.table-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.results-count {
    font-size: 0.9rem;
    color: #5a5660;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.table-footer .pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin: 0;
    padding-top: 0;
    border-top: 0;
}

.page-button {
    border: none;
    border-radius: 999px;
    padding: 6px 16px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: transparent;
    color: #a60f16;
    cursor: pointer;
    transition: background 0.2s ease;
}

.page-button:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.page-button.aspNetDisabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

.page-button:not(:disabled):not(.aspNetDisabled):hover {
    background: rgba(213, 26, 39, 0.12);
}

.page-counter {
    font-size: 0.85rem;
    color: #6a6170;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

@media (max-width: 980px) {
    .consultas-grid {
        grid-template-columns: 1fr;
    }
    .filters-card__body {
        flex-direction: column;
    }
    .filters-card__submit {
        justify-content: flex-start;
    }
    .portfolio-card {
        margin-bottom: 16px;
    }
}

@media (max-width: 760px) {
    body[data-view="consultas"] {
        padding: 18px 10px 30px;
    }
    .filters-card {
        padding: 20px;
    }
    .table-card {
        padding: 18px;
    }
    .grid-table thead th {
        font-size: 0.7rem;
    }
}

