@charset "UTF-8";
:root {
    --wine: #651f2b;
    --wine-hover: #7e2c3a;
    --gold: #b99154;
    --bg: #f7f3eb;
    --surface: #fffefa;
    --text: #24252a;
    --muted: #6b6766;
    --border: #e8e1d8;
    --soft: #f1ebe1;
    --success: #287a58;
    --shadow: 0 7px 24px #30211605;
    color-scheme: light;
}

:root[data-theme="dark"] {
    --bg: #17191d;
    --surface: #202329;
    --text: #f3eee6;
    --muted: #b5b0ac;
    --border: #37383f;
    --soft: #2c2e35;
    --wine: #8f394b;
    --wine-hover: #a84a5e;
    --success: #72c79e;
    --shadow: none;
    color-scheme: dark;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    font-size: 14px;
    line-height: 1.55;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select {
    font: inherit;
}

button,
a,
input,
select {
    touch-action: manipulation;
}

button {
    cursor: pointer;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.65;
}

:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 4px;
}

h1,
h2,
h3,
p {
    margin: 0;
}

h1 {
    font-family: Georgia, serif;
    font-size: 38px;
    line-height: 1.2;
    font-weight: 500;
    margin: 9px 0;
}

h2 {
    font-size: 18px;
    font-weight: 600;
}

h3 {
    font-size: 15px;
}

small {
    font-size: 12px;
}

hr {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 26px 0;
}

.muted,
.data-note {
    color: var(--muted);
}

.eyebrow {
    font-size: 10px;
    letter-spacing: 1.8px;
    font-weight: 700;
    color: var(--muted);
}

.skip {
    position: fixed;
    top: -80px;
    left: 20px;
    z-index: 100;
    background: var(--surface);
    padding: 12px;
}

.skip:focus {
    top: 10px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    background: #1c1d21;
    color: #dfdbd7;
    width: 260px;
    position: fixed;
    inset: 0 auto 0 0;
    padding: 34px 23px 22px;
    display: flex;
    flex-direction: column;
    z-index: 20;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.brand {
    display: flex;
    gap: 12px;
    align-items: center;
    font-size: 13px;
    font-weight: 650;
    letter-spacing: 1.1px;
}

.brand small {
    display: block;
    font-size: 8px;
    letter-spacing: 1.5px;
    margin-top: 5px;
    color: #bcb4ad;
}

.monogram {
    font:
        32px Georgia,
        serif;
    color: #d9bd87;
    border: 1px solid #b9915460;
    display: inline-grid;
    place-items: center;
    width: 46px;
    height: 51px;
    flex-shrink: 0;
}

.nav-caption {
    font-size: 9px;
    letter-spacing: 1.6px;
    color: #b7aaa1;
    margin: 48px 11px 17px;
}

.nav-link {
    display: flex;
    gap: 13px;
    align-items: center;
    padding: 13px;
    border-radius: 7px;
    margin-bottom: 8px;
    color: #c5c0bc;
}

.nav-link span {
    font-size: 20px;
    line-height: 1;
}

.nav-link:hover {
    background: #ffffff08;
}

.nav-link.active {
    background: #651f2b;
    color: #fff6e8;
    box-shadow: inset 3px 0 #b99154;
}

.sidebar-note {
    margin-top: auto;
    padding: 65px 12px 28px;
}

.sidebar-note .eyebrow {
    color: #c2a879;
}

.sidebar-note p {
    font:
        24px/1.4 Georgia,
        serif;
    margin: 12px 0;
    color: #eee6db;
}

.sidebar-note small {
    color: #bbb1a8;
}

.sidebar-footer {
    border-top: 1px solid #393535;
    padding: 22px 11px 0;
    font-size: 12px;
}

.sidebar-footer small {
    display: block;
    color: #b6aba1;
    padding-top: 5px;
}

.dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #83bd98;
    margin-right: 7px;
}

.workspace {
    margin-left: 260px;
    width: calc(100% - 260px);
}

.topbar {
    min-height: 89px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 40px;
    gap: 20px;
}

.company strong {
    display: block;
    font-size: 14px;
    margin-top: 3px;
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 21px;
}

.theme-label {
    display: flex;
    gap: 8px;
    align-items: center;
    color: var(--muted);
    font-size: 12px;
}

.theme-select {
    padding: 7px 9px;
    max-width: 140px;
}

.user {
    border-left: 1px solid var(--border);
    padding-left: 22px;
    max-width: 230px;
}

.user strong {
    font-size: 13px;
}

.user small {
    display: block;
    color: var(--muted);
}

main#contenido {
    outline: none;
}

.workspace main {
    max-width: 1700px;
    margin: auto;
    padding: 30px 40px 24px;
}

.breadcrumb {
    font-size: 11px;
    color: var(--muted);
    margin-bottom: 32px;
}

.breadcrumb span {
    padding: 0 10px;
    color: var(--gold);
}

.page-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin: 0 0 28px;
}

.page-heading p {
    color: var(--muted);
    font-size: 13px;
}

.badge {
    display: inline-block;
    padding: 5px 10px;
    background: var(--soft);
    color: var(--text);
    border-radius: 5px;
    font-size: 11px;
    white-space: nowrap;
}

.badge.gold {
    color: #775724;
    background: #f0e5cd;
}

[data-theme="dark"] .badge.gold {
    color: #e0bf83;
    background: #473925;
}

.welcome-banner {
    background: #651f2b;
    color: #fff8ed;
    padding: 31px 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 10px;
    margin-bottom: 25px;
    gap: 22px;
}

.welcome-banner .eyebrow {
    color: #e4c28e;
}

.welcome-banner h2 {
    font:
        27px/1.35 Georgia,
        serif;
    margin: 9px 0 10px;
}

.welcome-banner p {
    font-size: 12px;
    color: #e0c9cb;
}

.banner-seal {
    font:
        66px Georgia,
        serif;
    text-align: center;
    color: #d3b17b;
    min-width: 110px;
    border-left: 1px solid #ffffff25;
    padding-left: 30px;
}

.banner-seal span {
    display: block;
    font:
        8px "Segoe UI",
        sans-serif;
    letter-spacing: 2px;
}

.metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 26px;
}

.metric {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 9px;
    padding: 22px;
    box-shadow: var(--shadow);
}

.metric > span {
    font-size: 12px;
    color: var(--muted);
}

.metric strong {
    display: block;
    font-size: clamp(21px, 2.2vw, 32px);
    font-weight: 600;
    letter-spacing: -1px;
    margin: 11px 0;
}

.metric small {
    color: var(--muted);
    font-size: 10px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 24px;
}

.panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: var(--shadow);
    margin-bottom: 22px;
    overflow: hidden;
}

.panel-heading {
    padding: 22px 25px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.panel-heading p {
    font-size: 12px;
    color: var(--muted);
    margin-top: 5px;
}

.empty {
    text-align: center;
    padding: 57px 26px 64px;
}

.empty-icon {
    display: inline-grid;
    place-items: center;
    font-size: 30px;
    width: 60px;
    height: 60px;
    border: 1px solid var(--border);
    border-radius: 14px;
    color: var(--gold);
    margin-bottom: 19px;
}

.empty p {
    color: var(--muted);
    font-size: 13px;
    max-width: 400px;
    margin: 9px auto;
}

.empty small {
    color: var(--muted);
    font-size: 11px;
}

.overview {
    padding: 26px;
}

.event-count {
    display: block;
    font-size: 44px;
    font-weight: 500;
    color: var(--gold);
    margin: 14px 0 8px;
}

.overview h2 {
    font-size: 16px;
}

.overview p {
    font-size: 12px;
    margin: 10px 0 18px;
}

.text-link {
    color: var(--wine);
    font-weight: 600;
    font-size: 12px;
}

[data-theme="dark"] .text-link {
    color: #e4a2af;
}

.text-link:hover {
    text-decoration: underline;
}

.data-note {
    font-size: 11px;
    max-width: 850px;
    margin: 5px 0 30px;
}

.page-footer {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid var(--border);
    padding-top: 20px;
    color: var(--muted);
    font-size: 10px;
    margin-top: 40px;
    gap: 16px;
}

.button {
    padding: 10px 16px;
    border-radius: 6px;
    display: inline-flex;
    gap: 18px;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid transparent;
    white-space: normal;
}

.primary {
    background: var(--wine);
    color: #fff;
}

.primary:hover {
    background: var(--wine-hover);
}

.quiet {
    background: var(--soft);
    color: var(--text);
    border-color: var(--border);
}

.alert,
.notice {
    padding: 16px 20px;
    background: var(--soft);
    border-left: 3px solid var(--gold);
    margin: 18px 0;
    border-radius: 4px;
    font-size: 13px;
}

.alert ul {
    margin-bottom: 0;
}

.filters {
    display: flex;
    align-items: end;
    gap: 14px;
    padding: 24px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}

.filters label {
    min-width: 110px;
    flex: 1;
    font-size: 11px;
    color: var(--muted);
}

.filters .search-field {
    flex: 2;
    min-width: 200px;
}

label > input,
label > select {
    display: block;
    width: 100%;
    margin-top: 7px;
}

input,
select {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 5px;
    color: var(--text);
    min-height: 40px;
    padding: 9px 12px;
    max-width: 100%;
}

input::placeholder {
    color: var(--muted);
}

.table-scroll {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 12px;
}

th {
    font-size: 10px;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: var(--muted);
    background: var(--soft);
    font-weight: 600;
}

th,
td {
    padding: 16px 23px;
    border-bottom: 1px solid var(--border);
}

td strong {
    font-weight: 600;
    display: block;
}

td small {
    display: block;
    font-size: 10px;
    color: var(--muted);
    margin-top: 4px;
}

tbody tr:hover {
    background: var(--soft);
}

.numeric {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    color: var(--muted);
    font-size: 12px;
    gap: 15px;
}

.pagination > div {
    display: flex;
    gap: 15px;
    align-items: center;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 28px;
    gap: 20px;
}

.detail-grid p,
.detail-grid h2 {
    margin-top: 12px;
}

.article-form {
    padding: 28px;
}

fieldset {
    border: 0;
    padding: 0;
    margin: 0;
}

legend {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 22px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}

.form-grid label {
    font-size: 12px;
}

.form-actions {
    display: flex;
    gap: 14px;
    margin: 30px 0 18px;
}

.menu-button {
    display: none;
}

.login-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.05fr 1fr;
}

.login-story {
    background: #651f2b;
    color: #fcf4e7;
    padding: 46px 60px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100vh;
}

.login-story .eyebrow {
    color: #d9bd87;
}

.story-body {
    margin: 70px 0;
}

.story-body h1 {
    font:
        clamp(36px, 4.2vw, 62px)/1.17 Georgia,
        serif;
    margin: 20px 0 24px;
}

.story-body p {
    color: #dfc6c9;
    max-width: 320px;
    font-size: 14px;
    line-height: 1.8;
}

.story-rule {
    width: 50px;
    height: 1px;
    background: var(--gold);
    margin: 36px 0 22px;
}

.login-story > small {
    color: #d5bfc0;
    font-size: 10px;
}

.login-panel {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 45px;
}

.login-tools {
    position: absolute;
    right: 35px;
    top: 35px;
}

.login-tools label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
}

.login-tools select {
    width: auto;
    margin: 0;
}

.login-card {
    width: 100%;
    max-width: 360px;
}

.login-card h2 {
    font:
        36px Georgia,
        serif;
    margin: 16px 0 12px;
}

.login-card .muted {
    font-size: 13px;
}

.stack {
    display: flex;
    flex-direction: column;
    margin-top: 34px;
}

.stack label {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 8px;
}

.stack input {
    margin-bottom: 22px;
    min-height: 46px;
}

.stack .button {
    min-height: 46px;
    justify-content: space-between;
    margin-top: 8px;
}

.login-help {
    font-size: 11px;
    color: var(--muted);
    margin-top: 28px;
}

.login-bottom {
    position: absolute;
    bottom: 32px;
    font-size: 10px;
    color: var(--muted);
}

.error-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 28px;
    text-align: center;
    gap: 20px;
}

.error-page h1 {
    font-size: 80px;
    margin: 0;
}

.error-page p {
    max-width: 480px;
    color: var(--muted);
}

.workspace {
    min-width: 0;
}

.table-scroll {
    position: relative;
}

@media (min-width: 1550px) {
    .workspace main {
        padding: 38px 60px;
    }

    .topbar {
        padding-left: 60px;
        padding-right: 60px;
    }

    .metrics {
        gap: 24px;
    }
}

@media (max-width: 1150px) {
    .sidebar {
        width: 220px;
        padding-left: 18px;
        padding-right: 18px;
    }

    .workspace {
        margin-left: 220px;
        width: calc(100% - 220px);
    }

    .workspace main,
    .topbar {
        padding-left: 25px;
        padding-right: 25px;
    }

    .top-actions {
        gap: 12px;
    }

    .theme-label {
        font-size: 0;
    }

    .user {
        padding-left: 14px;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .overview {
        display: none;
    }

    .metric {
        padding: 18px 14px;
    }

    .login-story {
        padding: 40px;
    }

    .brand {
        font-size: 11px;
    }
}

@media (max-width: 850px) {
    .sidebar {
        transform: translateX(-100%);
        width: 260px;
    }

    .nav-open .sidebar {
        transform: translateX(0);
        top: 78px;
    }

    .workspace {
        width: 100%;
        margin: 0;
    }

    .menu-button {
        display: inline-block;
        border: 1px solid var(--border);
        border-radius: 5px;
        background: var(--soft);
        color: var(--text);
        padding: 8px 12px;
    }

    .topbar {
        padding: 14px 20px;
        min-height: 78px;
    }

    .company {
        margin-right: auto;
    }

    .top-actions {
        gap: 10px;
    }

    .user {
        max-width: 150px;
    }

    .user strong {
        font-size: 11px;
    }

    .user small {
        font-size: 10px;
    }

    .metrics {
        grid-template-columns: 1fr 1fr;
    }

    .metric strong {
        font-size: 29px;
    }

    .detail-grid {
        grid-template-columns: 1fr 1fr;
    }

    .login-story {
        padding: 35px;
    }

    .story-body h1 {
        font-size: 40px;
    }

    .login-panel {
        padding: 90px 30px;
    }

    .theme-select {
        max-width: 100px;
    }
}

@media (max-width: 600px) {
    .workspace main {
        padding: 22px 18px;
    }

    .topbar {
        flex-wrap: wrap;
        gap: 10px;
    }

    .top-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .top-actions .user {
        margin-right: auto;
        border-left: 0;
        padding-left: 0;
        max-width: 180px;
    }

    .company strong {
        font-size: 12px;
    }

    .theme-label {
        font-size: 11px;
    }

    .breadcrumb {
        margin-bottom: 24px;
    }

    .page-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
    }

    h1 {
        font-size: 32px;
    }

    .welcome-banner {
        padding: 24px;
    }

    .welcome-banner h2 {
        font-size: 24px;
    }

    .banner-seal {
        display: none;
    }

    .metrics {
        gap: 12px;
    }

    .metric {
        padding: 16px;
    }

    .metric strong {
        font-size: 25px;
    }

    .page-footer {
        flex-direction: column;
        gap: 7px;
    }

    .filters {
        padding: 18px;
        gap: 12px;
    }

    .filters label {
        min-width: 120px;
    }

    .filters .search-field {
        min-width: 100%;
        flex: 1;
    }

    .filters .button {
        min-width: 100%;
    }

    th,
    td {
        padding: 14px 16px;
    }

    .form-grid,
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .form-actions,
    .pagination,
    .pagination > div {
        flex-wrap: wrap;
    }

    .article-form {
        padding: 20px;
    }

    .login-shell {
        display: block;
    }

    .login-story {
        min-height: 0;
        padding: 24px;
    }

    .login-story .story-body,
    .login-story > small {
        display: none;
    }

    .login-panel {
        min-height: calc(100vh - 99px);
        padding: 100px 28px 80px;
    }

    .login-tools {
        top: 20px;
        right: 28px;
    }

    .login-card h2 {
        font-size: 33px;
    }

    .login-bottom {
        bottom: 25px;
    }

    .overview {
        display: block;
    }

    .story-body {
        margin: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}

@media print {
    :root,
    :root[data-theme="dark"] {
        --bg: #fff;
        --surface: #fff;
        --text: #000;
        --muted: #444;
        --border: #bbb;
        --soft: #eee;
        color-scheme: light;
    }

    .sidebar,
    .topbar,
    .breadcrumb,
    .button,
    .page-footer,
    .filters {
        display: none !important;
    }

    .workspace {
        margin: 0;
        width: 100%;
    }

    .workspace main {
        padding: 0;
    }

    .welcome-banner {
        background: #fff;
        color: #000;
        border: 1px solid #ccc;
    }

    .welcome-banner p,
    .welcome-banner .eyebrow {
        color: #444;
    }

    .metrics {
        grid-template-columns: repeat(4, 1fr);
    }

    .panel,
    .metric {
        break-inside: avoid;
        box-shadow: none;
    }

    .table-scroll {
        overflow: visible;
    }
}

/* agregado por nosotros 28-10-2026*/
/* COBROS - FORMULARIO */

/* FORMULARIO DE COBROS */

.payment-form {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.payment-client-heading {
    padding: 4px 0 22px;
}

.payment-client-title {
    margin-top: 8px;
}

.payment-section {
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-width: 0;
}

.payment-description {
    font-size: 12px;
    color: var(--muted);
    margin-top: 6px;
}

.payment-note {
    margin: 0;
    max-width: 100%;
}

.payment-amount-input {
    width: 150px;
    max-width: 100%;
    font-variant-numeric: tabular-nums;
}

.payment-confirmation-section {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 22px;
    padding-top: 26px;
    border-top: 1px solid var(--border);
}

.payment-confirmation {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    width: 100%;
}

.payment-confirmation input[type="checkbox"] {
    appearance: auto;
    -webkit-appearance: checkbox;
    display: inline-block;
    position: static;
    width: 18px;
    min-width: 18px;
    max-width: 18px;
    height: 18px;
    min-height: 18px;
    max-height: 18px;
    margin: 0;
    padding: 0;
    flex: 0 0 18px;
    accent-color: var(--wine);
    cursor: pointer;
}

.payment-confirmation label {
    display: inline-block;
    width: auto;
    margin: 0;
    padding: 0;
    cursor: pointer;
    font-size: 13px;
    line-height: 1.5;
}

.payment-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.payment-actions .button {
    padding: 13px 24px;
    min-height: 44px;
}

@media (max-width: 600px) {
    .payment-form {
        gap: 24px;
    }

    .payment-confirmation-section {
        gap: 18px;
    }

    .payment-amount-input {
        width: 110px;
    }
}

/* DETALLE DE COBROS WEB */

.payment-detail {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Resumen principal */

.payment-detail-summary {
    padding: 34px 36px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.payment-detail-summary-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

.payment-detail-amount {
    font-family: Georgia, serif;
    font-size: clamp(34px, 4vw, 48px);
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -1px;
    color: var(--wine);
    font-variant-numeric: tabular-nums;
}

.payment-detail-description {
    font-size: 12px;
    line-height: 1.7;
    color: var(--muted);
    max-width: 800px;
}

/* Detalles de aplicaciones */

.payment-detail-section {
    display: flex;
    flex-direction: column;
    gap: 22px;
    padding: 32px 36px 36px;
    min-width: 0;
}

.payment-detail-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.payment-detail-section-heading h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 7px;
}

/* Tabla de pedidos */

.payment-detail-table {
    width: 100%;
    border-collapse: collapse;
}

.payment-detail-table th {
    padding: 17px 22px;
    background: var(--soft);
}

.payment-detail-table td {
    padding: 23px 22px;
    vertical-align: middle;
}

.payment-detail-table tbody tr:last-child td {
    border-bottom: none;
}

.payment-detail-value {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* Responsive */

@media (max-width: 600px) {
    .payment-detail-summary {
        padding: 26px 20px;
    }

    .payment-detail-section {
        padding: 26px 20px;
        gap: 18px;
    }

    .payment-detail-table th,
    .payment-detail-table td {
        padding: 16px 14px;
    }

    .payment-detail-amount {
        font-size: 36px;
    }
}

/* =========================================================
   PEDIDOS - DETALLE DE ARTICULOS Y COMPONENTES
   ========================================================= */

.order-items-container {
    margin-top: 18px;
    border: 1px solid var(--border);
    border-radius: 10px;
}

.order-items-table {
    width: 100%;
    border-collapse: collapse;
}

.order-items-table thead th {
    padding: 16px 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.045em;
    text-transform: uppercase;
    white-space: nowrap;
}

.order-items-table tbody td {
    padding: 22px 20px;
    vertical-align: top;
    border-bottom: 1px solid var(--border);
}

.order-items-table tbody tr:last-child td {
    border-bottom: 0;
}

/* Articulo principal */

.order-item-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    min-width: 220px;
}

.order-item-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.order-item-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: 9px;
    color: var(--wine);
}

.order-item-name {
    font-size: 14px;
    font-weight: 650;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.order-item-quantity {
    font-size: 14px;
    font-weight: 650;
    font-variant-numeric: tabular-nums;
}

.order-item-unit,
.order-item-price {
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

.order-item-total {
    font-size: 14px;
    font-weight: 700;
    color: var(--wine);
    font-variant-numeric: tabular-nums;
}

/* Componentes historicos de kits */

.order-item-components {
    width: 100%;
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: 9px;
}

.order-item-components-heading {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 12px;
}

.order-item-components-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.035em;
    text-transform: uppercase;
    color: var(--muted);
}

.order-item-components-count {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
}

.order-components-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.order-component {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.order-component-marker {
    display: block;
    flex: 0 0 6px;
    width: 6px;
    height: 6px;
    margin-top: 7px;
    border-radius: 50%;
    background: var(--wine);
}

.order-component-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.order-component-name {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.order-component-details {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 11px;
    line-height: 1.6;
    color: var(--muted);
}

.order-items-empty {
    padding: 34px 20px !important;
    text-align: center;
    color: var(--muted);
}

.order-items-note {
    margin-top: 16px;
    line-height: 1.7;
}

/* Pantallas pequenas */

@media (max-width: 768px) {
    .order-items-table thead th {
        padding: 14px 12px;
    }

    .order-items-table tbody td {
        padding: 18px 12px;
    }

    .order-item-content {
        min-width: 180px;
    }

    .order-item-components {
        padding: 13px;
    }

    .order-item-icon {
        flex-basis: 32px;
        width: 32px;
        height: 32px;
    }
}

/* =========================================================
   SALDOS WEB - CARTERA Y SEGUIMIENTO
   ========================================================= */

/* Resumen del cliente */

.balance-summary {
    padding: 30px 34px;
}

.balance-summary-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.balance-summary-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    min-width: 0;
}

.balance-summary-amount {
    margin: 0;
    font-family: Georgia, serif;
    font-size: clamp(36px, 4vw, 52px);
    font-weight: 500;
    line-height: 1.15;
    letter-spacing: -1px;
    color: var(--wine);
    font-variant-numeric: tabular-nums;
}

.balance-summary-caption {
    margin: 0;
    font-size: 12px;
    line-height: 1.6;
    color: var(--muted);
}

.balance-summary-link {
    white-space: nowrap;
}

/* Panel principal */

.balance-panel {
    display: flex;
    flex-direction: column;
    gap: 26px;
    padding: 30px 34px;
    min-width: 0;
}

.balance-section-heading {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.balance-section-heading h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 650;
}

.balance-description {
    margin: 6px 0 0;
    font-size: 12px;
    line-height: 1.7;
    color: var(--muted);
}

/* Filtros */

.balance-filters {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
    padding-bottom: 26px;
    border-bottom: 1px solid var(--border);
}

.balance-filters .search-field {
    flex: 1 1 280px;
    max-width: 480px;
    min-width: 200px;
}

.balance-filters .button {
    min-height: 40px;
}

.balance-clear-filter {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
}

/* Resultados */

.balance-results {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
}

.balance-results-heading h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 650;
}

.balance-table-container {
    border: 1px solid var(--border);
    border-radius: 10px;
}

.balance-table {
    width: 100%;
    border-collapse: collapse;
}

.balance-table thead th {
    padding: 17px 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.balance-table tbody td {
    padding: 22px 20px;
    vertical-align: middle;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}

.balance-table tbody tr:last-child td {
    border-bottom: none;
}

/* Identificadores */

.balance-order-link {
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.balance-client-link {
    font-weight: 500;
    line-height: 1.5;
}

/* Importes */

.balance-value,
.balance-outstanding {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.balance-outstanding {
    font-weight: 700;
    color: var(--wine);
}

.balance-warning {
    display: block;
    margin-top: 8px;
    max-width: 240px;
    font-size: 11px;
    font-weight: 400;
    line-height: 1.5;
    color: var(--muted);
    white-space: normal;
}

/* Paginacion */

.balance-pagination {
    padding-top: 8px;
}

/* Sin resultados */

.balance-empty {
    padding: 44px 20px;
    text-align: center;
}

/* Responsive */

@media (max-width: 768px) {
    .balance-summary {
        padding: 24px 20px;
    }

    .balance-panel {
        padding: 24px 20px;
        gap: 22px;
    }

    .balance-filters {
        gap: 12px;
        padding-bottom: 22px;
    }

    .balance-table thead th {
        padding: 14px 12px;
    }

    .balance-table tbody td {
        padding: 18px 12px;
    }
}

@media (max-width: 480px) {
    .balance-summary-content {
        align-items: flex-start;
        gap: 18px;
    }

    .balance-summary-amount {
        font-size: 38px;
    }

    .balance-filters .search-field {
        flex-basis: 100%;
        min-width: 0;
        max-width: 100%;
    }
}

.balance-client-navigation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 12px 0 24px;
    border-bottom: 1px solid var(--border);
}

.balance-client-navigation-text {
    font-size: 12px;
    line-height: 1.6;
    color: var(--muted);
}

/* =========================================================
   EVENTOS WEB - INDEX Y SHOW
   ========================================================= */

/* Contenedor principal */

.events-index-panel {
    display: flex;
    flex-direction: column;
    gap: 28px;
    padding: 30px 34px;
    min-width: 0;
}

/* Encabezados */

.events-section-heading,
.events-detail-section-heading {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.events-section-heading h2,
.events-detail-section-heading h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 650;
}

.events-description {
    margin: 5px 0 0;
    font-size: 12px;
    line-height: 1.7;
    color: var(--muted);
}

/* Filtros */

.events-filters {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--border);
}

.events-filters label {
    flex: 1 1 145px;
    min-width: 140px;
}

.events-filters .search-field {
    flex: 1.6 1 240px;
    min-width: 200px;
}

.events-filters .button {
    min-height: 40px;
}

.events-clear-filter {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
}

/* Resultados */

.events-results {
    display: flex;
    flex-direction: column;
    gap: 22px;
    min-width: 0;
}

.events-results-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 18px;
}

.events-results-heading h2 {
    margin: 7px 0 0;
    font-size: 20px;
    font-weight: 650;
}

.events-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 13px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 7px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

/* Tabla */

.events-table-container {
    border: 1px solid var(--border);
    border-radius: 10px;
}

.events-table {
    width: 100%;
    border-collapse: collapse;
}

.events-table thead th {
    padding: 17px 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.events-table tbody td {
    padding: 21px 20px;
    vertical-align: middle;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}

.events-table tbody tr:last-child td {
    border-bottom: none;
}

.events-name-cell {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.events-name {
    font-size: 13px;
    font-weight: 650;
    line-height: 1.5;
}

.events-channel {
    font-size: 11px;
    color: var(--muted);
}

.events-date {
    font-weight: 550;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.events-series {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.035em;
    color: var(--wine);
}

.events-no-series {
    font-size: 12px;
    color: var(--muted);
}

.events-number {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.events-detail-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.events-pagination {
    padding-top: 4px;
}

/* Estado vacio */

.events-empty {
    padding: 48px 20px;
    text-align: center;
}

/* Detalle del evento */

.events-back-link {
    display: inline-flex;
    align-items: center;
    margin-bottom: 22px;
}

.events-detail-heading {
    margin-bottom: 26px;
}

.events-detail-panel {
    padding: 32px 34px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.events-detail-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.events-detail-field {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 22px 24px;
    border: 1px solid var(--border);
    border-radius: 9px;
    min-width: 0;
}

.events-detail-field dt {
    margin: 0;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
}

.events-detail-field dd {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.events-detail-highlight {
    font-family: Georgia, serif;
    font-size: 28px !important;
    font-weight: 500 !important;
    color: var(--wine);
    font-variant-numeric: tabular-nums;
}

.events-edit-status {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
}

.events-edit-available {
    color: var(--text);
}

.events-edit-protected {
    color: var(--wine);
}

/* Notas informativas */

.events-info-note {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 18px;
    padding: 15px 18px;
    max-width: 760px;
    border: 1px solid var(--border);
    border-left: 3px solid var(--wine);
    border-radius: 8px;
    background: var(--surface);
}

.events-info-icon {
    flex: 0 0 20px;
    font-size: 18px;
    line-height: 1.2;
    color: var(--wine);
}

.events-info-note p {
    margin: 0;
    font-size: 12px;
    line-height: 1.7;
    color: var(--muted);
}

/* Responsive */

@media (max-width: 768px) {
    .events-index-panel,
    .events-detail-panel {
        padding: 24px 20px;
        gap: 22px;
    }

    .events-filters {
        gap: 12px;
        padding-bottom: 22px;
    }

    .events-table thead th {
        padding: 14px 12px;
    }

    .events-table tbody td {
        padding: 17px 12px;
    }

    .events-detail-fields {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .events-detail-field {
        padding: 18px;
    }

    .events-info-note {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .events-filters label,
    .events-filters .search-field {
        flex-basis: 100%;
        min-width: 0;
    }

    .events-results-heading {
        align-items: flex-start;
    }
}

/* =========================================================
   PEDIDOS WEB - DOCUMENTO DE IMPRESION
   ========================================================= */

.order-print-document {
    max-width: 1120px;
    margin: 0 auto;
    padding: 36px 42px;
    background: #fff;
    color: #242424;
}

.order-print-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 38px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e9e1d7;
}

.order-print-toolbar span {
    font-size: 12px;
    color: #79736e;
}

/* Encabezado */

.order-print-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 32px;
    padding-bottom: 26px;
    margin-bottom: 28px;
    border-bottom: 2px solid #702333;
}

.order-print-business {
    flex: 1;
    min-width: 0;
}

.order-print-business h1 {
    margin: 10px 0 12px;
    font-family: Georgia, serif;
    font-size: 30px;
    font-weight: 500;
    line-height: 1.2;
}

.order-print-business-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.order-print-business-info p {
    margin: 0;
    font-size: 11px;
    line-height: 1.6;
    color: #66605b;
}

.order-print-identification {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    text-align: right;
    min-width: 190px;
}

.order-print-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: #77706a;
}

.order-print-identification h2 {
    margin: 0;
    font-family: Georgia, serif;
    font-size: 31px;
    line-height: 1.2;
    color: #702333;
    font-variant-numeric: tabular-nums;
}

.order-print-status {
    padding: 6px 11px;
    border: 1px solid #e1d5ce;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 600;
}

/* Secciones */

.order-print-section {
    margin-bottom: 28px;
}

.order-print-section-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e9e1d7;
}

.order-print-section-heading h2 {
    margin: 0;
    font-family: Arial, sans-serif;
    font-size: 15px;
    font-weight: 700;
}

.order-print-section-number {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 25px;
    width: 25px;
    height: 25px;
    border: 1px solid #e3d8d0;
    border-radius: 5px;
    font-size: 10px;
    font-weight: 700;
    color: #702333;
}

/* Datos generales */

.order-print-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.order-print-fields > div {
    padding: 15px 17px;
    border: 1px solid #e9e1d7;
    border-radius: 6px;
    min-width: 0;
}

.order-print-fields dt {
    margin-bottom: 7px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #77706a;
}

.order-print-fields dd {
    margin: 0;
    font-size: 12px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.order-print-fields dd span {
    display: block;
    margin-top: 3px;
    color: #77706a;
}

/* Articulos */

.order-print-items {
    min-width: 0;
}

.order-print-items .table-scroll {
    overflow: visible;
    border: 1px solid #e9e1d7;
    border-radius: 7px;
}

.order-print-items table {
    width: 100%;
    border-collapse: collapse;
}

.order-print-items th {
    padding: 12px 14px;
    background: #f1ece5;
    color: #4c4640;
    font-size: 10px;
    text-transform: uppercase;
}

.order-print-items td {
    padding: 15px 14px;
    border-bottom: 1px solid #ece6df;
    vertical-align: top;
    font-size: 11px;
    line-height: 1.6;
}

/* Totales */

.order-print-totals-wrapper {
    display: flex;
    justify-content: flex-end;
}

.order-print-totals {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 440px;
    gap: 0;
    margin: 0;
    padding: 0;
}

.order-print-total-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 11px 14px;
    border-bottom: 1px solid #e9e1d7;
}

.order-print-total-row dt {
    font-size: 12px;
    color: #5d5651;
}

.order-print-total-row dd {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.order-print-total-primary {
    font-weight: 700;
}

.order-print-total-balance {
    margin-top: 6px;
    border: 1px solid #702333;
    border-radius: 5px;
    background: #f8f2f0;
}

.order-print-total-balance dt,
.order-print-total-balance dd {
    font-weight: 700;
    color: #702333;
}

.order-print-financial-warning,
.order-print-operational-note {
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid #e9e1d7;
    font-size: 11px;
    line-height: 1.6;
}

/* Notas */

.order-print-notes {
    margin-top: 26px;
}

.order-print-notes-content {
    min-height: 60px;
    padding: 15px 17px;
    border: 1px solid #e9e1d7;
    border-radius: 6px;
}

.order-print-notes-content p {
    margin: 0;
    font-size: 12px;
    line-height: 1.7;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.order-print-additional-info {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 14px;
}

.order-print-additional-info > div {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 12px 14px;
    border: 1px solid #e9e1d7;
    border-radius: 6px;
}

.order-print-additional-info span {
    font-size: 10px;
    color: #77706a;
}

.order-print-additional-info strong {
    font-size: 12px;
}

/* Pie */

.order-print-footer {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 36px;
    padding-top: 16px;
    border-top: 1px solid #e9e1d7;
    font-size: 10px;
    color: #77706a;
}

/* Impresion real */

@media print {
    @page {
        size: letter portrait;
        margin: 12mm;
    }

    html,
    body {
        width: auto;
        margin: 0 !important;
        padding: 0 !important;
        background: #fff !important;
        color: #242424 !important;
    }

    .order-print-document {
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 0;
        border: 0;
        box-shadow: none;
    }

    .order-print-toolbar {
        display: none !important;
    }

    .order-print-header {
        margin-top: 0;
        padding-bottom: 16px;
        margin-bottom: 18px;
    }

    .order-print-section {
        margin-bottom: 18px;
    }

    .order-print-section-heading {
        break-after: avoid;
        page-break-after: avoid;
    }

    .order-print-fields > div,
    .order-print-total-row,
    .order-print-notes-content,
    .order-print-additional-info > div {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .order-print-items thead {
        display: table-header-group;
    }

    .order-print-items tr {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .order-print-items .table-scroll {
        overflow: visible !important;
    }

    .order-print-footer {
        margin-top: 22px;
    }

    a,
    a:visited {
        color: inherit;
        text-decoration: none;
    }

    * {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* Adaptacion en pantalla */

@media screen and (max-width: 700px) {
    .order-print-document {
        padding: 24px 18px;
    }

    .order-print-header {
        flex-direction: column;
    }

    .order-print-identification {
        align-items: flex-start;
        text-align: left;
    }

    .order-print-fields,
    .order-print-additional-info {
        grid-template-columns: 1fr;
    }

    .order-print-footer {
        flex-direction: column;
    }
}

/* Ajuste de distribución de la nota histórica */

.order-history-notice {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    width: calc(100% - 48px);
    max-width: 760px;
    margin: 24px 24px 28px;
    padding: 20px 22px;
    box-sizing: border-box;
    border: 1px solid var(--border);
    border-left: 3px solid var(--wine);
    border-radius: 10px;
    background: var(--surface);
}

.order-history-notice-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    margin: 0;
    color: var(--wine);
    background: transparent;
}

.order-history-notice-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.order-history-notice-content strong {
    display: block;
    margin: 0;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.5;
}

.order-history-notice-content p {
    margin: 0;
    font-size: 12px;
    line-height: 1.8;
    color: var(--muted);
    overflow-wrap: anywhere;
}

@media (max-width: 600px) {
    .order-history-notice {
        width: calc(100% - 24px);
        margin: 18px 12px 22px;
        padding: 16px;
        gap: 12px;
    }

    .order-history-notice-icon {
        flex-basis: 28px;
        width: 28px;
        height: 28px;
    }
}
