:root {
    --magenta: #b02384;
    --magenta-dark: #861767;
    --turquoise: #2ba9a8;
    --lime: #a1ce3a;
    --orange: #f28c28;
    --ink: #202331;
    --muted: #687084;
    --line: #e4e8ef;
    --surface: #ffffff;
    --page: #f5f7fb;
    --shadow: 0 18px 45px rgba(32, 35, 49, 0.12);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--page);
    color: var(--ink);
    font-family: "Poppins", sans-serif;
}

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

select {
    appearance: none;
    padding-right: 40px;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--magenta) 50%),
        linear-gradient(135deg, var(--magenta) 50%, transparent 50%);
    background-position:
        calc(100% - 18px) 50%,
        calc(100% - 12px) 50%;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}

button {
    cursor: pointer;
}

.hidden {
    display: none !important;
}

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

.login-screen {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        linear-gradient(135deg, rgba(176, 35, 132, 0.14), rgba(43, 169, 168, 0.12)),
        var(--page);
}

.login-card {
    width: min(100%, 430px);
    display: grid;
    gap: 22px;
    padding: 32px;
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
    border-top: 8px solid var(--magenta);
}

.login-logo {
    width: 74px;
    height: 74px;
    border-radius: 50%;
    object-fit: cover;
}

.eyebrow {
    margin: 0 0 4px;
    color: var(--turquoise);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

h1,
h2 {
    margin: 0;
    line-height: 1.15;
}

.login-copy {
    margin: 8px 0 0;
    color: var(--muted);
}

.login-form {
    display: grid;
    gap: 10px;
}

.login-form label {
    color: var(--ink);
    font-size: 0.9rem;
    font-weight: 600;
}

input,
select,
textarea {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
}

textarea {
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--turquoise);
    outline: 3px solid rgba(43, 169, 168, 0.16);
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    transition: grid-template-columns 0.2s ease;
}

.app-shell.sidebar-collapsed {
    grid-template-columns: 86px minmax(0, 1fr);
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 22px 16px;
    background: #ffffff;
    border-right: 1px solid var(--line);
    overflow: hidden;
}

.brand-block {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 8px 22px;
}

.brand-block img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

.brand-block span {
    display: block;
    color: var(--muted);
    font-size: 0.86rem;
}

.sidebar-toggle {
    width: 44px;
    height: 40px;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 0 14px auto;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--muted);
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.06);
    cursor: pointer;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.sidebar-toggle:hover {
    border-color: rgba(176, 35, 132, 0.24);
    color: var(--magenta);
    box-shadow: 0 8px 18px rgba(176, 35, 132, 0.12);
    transform: translateY(-1px);
}

.sidebar-toggle:focus-visible {
    outline: 3px solid rgba(43, 169, 168, 0.28);
    outline-offset: 2px;
}

.sidebar-toggle-icon {
    width: 18px;
    display: grid;
    gap: 4px;
}

.sidebar-toggle-icon span {
    display: block;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
}

.app-shell.sidebar-collapsed .sidebar-toggle {
    margin-right: auto;
}

.main-nav {
    display: grid;
    gap: 8px;
}

.nav-item,
.bottom-nav-item {
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    font-weight: 600;
}

.nav-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    text-align: left;
}

.nav-icon {
    width: 28px;
    min-width: 28px;
    height: 28px;
    display: inline-grid;
    place-items: center;
    border-radius: 8px;
    background: rgba(43, 169, 168, 0.1);
    color: var(--turquoise);
    font-weight: 900;
}

.nav-text,
.brand-block > div {
    transition: opacity 0.16s ease, width 0.16s ease;
}

.app-shell.sidebar-collapsed .brand-block {
    justify-content: center;
    padding-right: 0;
    padding-left: 0;
}

.app-shell.sidebar-collapsed .brand-block > div,
.app-shell.sidebar-collapsed .nav-text {
    width: 0;
    opacity: 0;
    overflow: hidden;
    white-space: nowrap;
}

.app-shell.sidebar-collapsed .nav-item {
    justify-content: center;
    padding-right: 8px;
    padding-left: 8px;
}

.nav-item:hover,
.nav-item.active,
.bottom-nav-item.active {
    background: rgba(176, 35, 132, 0.1);
    color: var(--magenta);
}

.main-content {
    min-width: 0;
    padding: 24px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
}

.topbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.user-pill {
    max-width: 220px;
    overflow: hidden;
    padding: 9px 12px;
    border-radius: 999px;
    background: #fff;
    color: var(--muted);
    font-size: 0.84rem;
    text-overflow: ellipsis;
    white-space: nowrap;
    border: 1px solid var(--line);
}

.btn-primary,
.btn-secondary,
.btn-ghost,
.icon-button {
    min-height: 42px;
    border-radius: 8px;
    font-weight: 700;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn-primary {
    border: 0;
    padding: 10px 16px;
    background: var(--magenta);
    color: #fff;
    box-shadow: 0 10px 22px rgba(176, 35, 132, 0.22);
}

.btn-primary:hover,
.icon-button:hover {
    transform: translateY(-1px);
}

.btn-secondary {
    width: 100%;
    border: 1px dashed var(--turquoise);
    padding: 10px;
    background: rgba(43, 169, 168, 0.08);
    color: var(--turquoise);
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    padding: 10px 14px;
    background: #fff;
    color: var(--ink);
    text-decoration: none;
}

.icon-button {
    width: 44px;
    border: 1px solid var(--line);
    background: #fff;
    font-size: 1.1rem;
}

.btn-full {
    width: 100%;
    margin-top: 8px;
}

.module-view {
    display: none;
}

.module-view.active {
    display: block;
}

.calendar-panel,
.placeholder-panel,
.clients-panel,
.catalog-panel,
.quotes-panel,
.finance-panel,
.reports-panel {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 12px 30px rgba(32, 35, 49, 0.08);
}

.calendar-panel {
    padding: 16px;
}

.placeholder-panel {
    min-height: 360px;
    display: grid;
    align-content: center;
    justify-items: center;
    padding: 32px;
    text-align: center;
}

.placeholder-panel p:last-child {
    margin: 10px 0 0;
    color: var(--muted);
}

.home-dashboard {
    display: grid;
    gap: 18px;
}

.home-hero,
.home-panel {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(32, 35, 49, 0.08);
}

.home-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 22px;
    border-top: 6px solid var(--magenta);
    background:
        linear-gradient(135deg, rgba(176, 35, 132, 0.08), rgba(43, 169, 168, 0.07)),
        #fff;
}

.home-hero h2 {
    margin: 2px 0 4px;
    font-size: clamp(1.45rem, 2.2vw, 2.1rem);
}

.home-hero p:not(.eyebrow) {
    margin: 0 0 12px;
    color: var(--muted);
}

.home-hero strong {
    display: inline-flex;
    max-width: 100%;
    color: var(--magenta-dark);
    font-size: 1rem;
    overflow-wrap: anywhere;
}

.home-date-pill {
    flex: 0 0 auto;
    max-width: 280px;
    padding: 10px 14px;
    border: 1px solid rgba(43, 169, 168, 0.28);
    border-radius: 8px;
    background: rgba(43, 169, 168, 0.08);
    color: var(--turquoise);
    font-size: 0.84rem;
    font-weight: 700;
    text-align: right;
    text-transform: capitalize;
}

.home-kpi-grid,
.home-mini-kpis,
.home-finance-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.home-kpi-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.home-kpi-card {
    display: grid;
    gap: 6px;
    min-height: 118px;
    padding: 14px;
    border: 1px solid var(--line);
    border-top: 5px solid var(--magenta);
    border-radius: 8px;
    background: #fff;
}

.home-kpi-card.turquoise {
    border-top-color: var(--turquoise);
}

.home-kpi-card.lime {
    border-top-color: var(--lime);
}

.home-kpi-card.orange {
    border-top-color: var(--orange);
}

.home-kpi-card.gray {
    border-top-color: #9aa3af;
}

.home-kpi-card span {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
}

.home-kpi-card strong {
    color: var(--ink);
    font-size: clamp(1.35rem, 2vw, 1.86rem);
    line-height: 1.05;
    overflow-wrap: anywhere;
}

.home-kpi-card small {
    color: var(--muted);
    font-size: 0.74rem;
}

.home-section-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 18px;
    align-items: start;
}

.home-panel {
    display: grid;
    gap: 14px;
    min-width: 0;
    padding: 18px;
}

.home-panel-head,
.home-list-main,
.home-list-actions,
.home-alert-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.home-panel-head h3 {
    margin: 2px 0 0;
    font-size: 1.05rem;
}

.home-panel-head .btn-ghost {
    flex: 0 0 auto;
}

.home-event-list,
.home-alert-list,
.home-quote-list {
    display: grid;
    gap: 10px;
}

.home-list-card {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f9fbfe;
}

.home-list-card.compact {
    padding: 12px;
}

.home-list-card h4 {
    margin: 0 0 4px;
    font-size: 0.98rem;
    overflow-wrap: anywhere;
}

.home-list-card p,
.home-list-card small {
    display: block;
    margin: 0;
    color: var(--muted);
    overflow-wrap: anywhere;
}

.home-list-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    color: var(--muted);
    font-size: 0.82rem;
}

.home-list-meta span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.home-status-badge,
.home-tag,
.home-alert-item > span {
    flex: 0 0 auto;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
}

.home-status-badge {
    padding: 6px 9px;
    background: rgba(43, 169, 168, 0.1);
    color: var(--turquoise);
}

.home-tag {
    padding: 6px 9px;
    background: rgba(242, 140, 40, 0.12);
    color: #a9550c;
}

.home-alert-item {
    align-items: center;
    padding: 12px;
    border: 1px solid rgba(242, 140, 40, 0.28);
    border-radius: 8px;
    background: rgba(242, 140, 40, 0.08);
}

.home-alert-item > span {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    background: #fff;
    color: var(--orange);
}

.home-alert-item p {
    flex: 1 1 auto;
    margin: 0;
    color: var(--ink);
    font-size: 0.88rem;
    overflow-wrap: anywhere;
}

.home-subsection-title {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 800;
}

.home-quick-actions {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.home-quick-actions button {
    min-height: 46px;
    white-space: normal;
}

.home-empty-state {
    padding: 18px;
    border: 1px dashed var(--line);
    border-radius: 8px;
    background: #f9fbfe;
    color: var(--muted);
    text-align: center;
}

.clients-panel,
.catalog-panel,
.quotes-panel,
.finance-panel {
    padding: 20px;
    background:
        linear-gradient(180deg, rgba(176, 35, 132, 0.035), rgba(43, 169, 168, 0.025)),
        #fff;
}

.clients-header,
.catalog-header,
.quotes-header,
.finance-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
}

.catalog-header p:last-child,
.quotes-header p:last-child,
.finance-header p:last-child {
    margin: 6px 0 0;
    color: var(--muted);
}

.clients-tools,
.catalog-tools,
.quotes-tools,
.finance-tools {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto;
    align-items: end;
    gap: 14px;
    margin-bottom: 18px;
    padding: 14px;
    border: 1px solid rgba(228, 232, 239, 0.9);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 10px 22px rgba(32, 35, 49, 0.05);
}

.catalog-tools {
    grid-template-columns: minmax(260px, 1fr) auto minmax(190px, 240px);
}

.catalog-view-tabs {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    padding: 5px;
    border: 1px solid rgba(228, 232, 239, 0.95);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
}

.catalog-view-tab {
    min-height: 38px;
    padding: 9px 14px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    font-weight: 800;
    cursor: pointer;
}

.catalog-view-tab.active {
    background: linear-gradient(135deg, var(--magenta), #d837a0);
    color: #fff;
    box-shadow: 0 10px 20px rgba(176, 35, 132, 0.22);
}

.catalog-view {
    display: none;
}

.catalog-view.active {
    display: block;
}

.visual-catalog-section {
    display: none;
}

.visual-catalog-section.active {
    display: grid;
    gap: 16px;
}

.visual-catalog-header {
    margin-bottom: 0;
}

.visual-catalog-toolbar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
    gap: 12px;
    align-items: end;
    max-width: 100%;
    overflow: hidden;
    padding: 14px;
    border: 1px solid rgba(228, 232, 239, 0.9);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 10px 22px rgba(32, 35, 49, 0.05);
}

.visual-catalog-search {
    grid-column: span 2;
    min-width: 0;
}

.visual-catalog-toolbar > *,
.visual-catalog-toolbar input,
.visual-catalog-toolbar select {
    min-width: 0;
    max-width: 100%;
}

.visual-catalog-toolbar input,
.visual-catalog-toolbar select {
    width: 100%;
}

.visual-catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
    min-width: 0;
}

.visual-catalog-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 14px 28px rgba(32, 35, 49, 0.1);
}

.visual-catalog-image {
    position: relative;
    aspect-ratio: 5 / 4;
    overflow: hidden;
    background: #eef2f7;
}

.visual-catalog-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
    transform: rotate(var(--visual-image-rotation, 0deg)) scale(var(--visual-image-scale, 1));
    transition: transform 0.18s ease;
}

.visual-catalog-card:hover .visual-catalog-image img {
    transform: rotate(var(--visual-image-rotation, 0deg)) scale(calc(var(--visual-image-scale, 1) * 1.035));
}

.visual-catalog-badge {
    position: absolute;
    left: 9px;
    max-width: calc(100% - 18px);
    padding: 5px 8px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 900;
    box-shadow: 0 8px 18px rgba(32, 35, 49, 0.18);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.visual-catalog-badge.favorite {
    top: 9px;
    background: var(--lime);
    color: #20300b;
}

.visual-catalog-badge.category {
    bottom: 9px;
    background: rgba(176, 35, 132, 0.94);
    color: #fff;
}

.visual-catalog-card-body {
    display: grid;
    gap: 9px;
    flex: 1;
    align-content: start;
    padding: 12px;
}

.visual-catalog-card-title {
    display: grid;
    gap: 3px;
}

.visual-catalog-card-title h3 {
    margin: 0;
    color: var(--ink);
    font-size: 0.98rem;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.visual-catalog-card-title span,
.visual-catalog-meta span,
.visual-catalog-card-body p {
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.visual-catalog-meta {
    display: grid;
    gap: 3px;
}

.visual-catalog-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 0;
}

.visual-catalog-chip {
    max-width: 100%;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(43, 169, 168, 0.12);
    color: #167c7b;
    font-size: 0.7rem;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.visual-catalog-chip.tag {
    background: rgba(176, 35, 132, 0.1);
    color: var(--magenta);
}

.visual-catalog-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: auto;
    padding: 0 12px 12px;
    border-top: 1px solid rgba(228, 232, 239, 0.72);
    padding-top: 12px;
}

.visual-catalog-actions .btn-ghost {
    width: 100%;
    min-height: 36px;
    padding: 7px 8px;
    font-size: 0.72rem;
    white-space: normal;
}

.visual-catalog-empty {
    display: grid;
    gap: 6px;
    min-height: 220px;
    place-items: center;
    padding: 28px;
    border: 1px dashed rgba(176, 35, 132, 0.32);
    border-radius: 8px;
    background: #fff7fc;
    text-align: center;
}

.visual-catalog-empty h3 {
    margin: 0;
    color: var(--magenta);
}

.visual-catalog-empty p {
    margin: 0;
    color: var(--muted);
}

.quotes-tools {
    grid-template-columns: minmax(260px, 1fr) auto;
}

.finance-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.finance-summary-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.finance-summary-card {
    min-height: 104px;
    display: grid;
    align-content: space-between;
    gap: 12px;
    padding: 16px;
    border: 1px solid rgba(228, 232, 239, 0.92);
    border-top: 5px solid var(--magenta);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 26px rgba(32, 35, 49, 0.08);
}

.finance-summary-card small {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.finance-summary-card strong {
    color: var(--ink);
    font-size: 1.28rem;
    line-height: 1.1;
}

.finance-summary-card.collected {
    border-top-color: var(--lime);
}

.finance-summary-card.pending {
    border-top-color: var(--orange);
}

.finance-summary-card.overdue {
    border-top-color: #d33;
}

.finance-summary-card.invoiced {
    border-top-color: var(--turquoise);
}

.finance-summary-card.uninvoiced {
    border-top-color: var(--muted);
}

.finance-tools {
    grid-template-columns: minmax(240px, 1.4fr) repeat(auto-fit, minmax(150px, 1fr));
}

.finance-tools > * {
    min-width: 0;
}

.finance-custom-range {
    min-width: 0;
}

.finance-custom-range input {
    min-width: 0;
}

.quote-filter-tabs {
    grid-template-columns: repeat(6, max-content);
}

.client-search-field {
    display: grid;
    gap: 7px;
}

.client-search-field span,
.catalog-filter-group span {
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
}

.client-search-field input {
    min-height: 50px;
    border-color: rgba(176, 35, 132, 0.12);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: inset 3px 0 0 rgba(43, 169, 168, 0.24), 0 10px 22px rgba(32, 35, 49, 0.045);
}

.client-filter-tabs {
    display: inline-grid;
    grid-template-columns: repeat(3, max-content);
    gap: 5px;
    padding: 5px;
    border: 1px solid rgba(228, 232, 239, 0.9);
    border-radius: 8px;
    background: rgba(248, 250, 252, 0.9);
    box-shadow: 0 10px 22px rgba(32, 35, 49, 0.035);
}

.client-filter-tab {
    min-height: 38px;
    border: 0;
    border-radius: 7px;
    padding: 8px 12px;
    background: transparent;
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 800;
}

.client-filter-tab.active {
    background: linear-gradient(135deg, var(--magenta), #c73596);
    color: #fff;
    box-shadow: 0 9px 18px rgba(176, 35, 132, 0.24);
}

.catalog-filter-group {
    display: grid;
    gap: 6px;
}

.catalog-filter-group select {
    min-height: 48px;
    border-color: rgba(242, 140, 40, 0.24);
    background-color: #fff;
}

.clients-list,
.products-list,
.quotes-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
}

.clients-list {
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 20px;
    align-items: start;
}

@media (min-width: 1180px) {
    .clients-list {
        grid-template-columns: repeat(3, minmax(340px, 1fr));
    }
}

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

.client-card,
.product-card,
.quote-card {
    display: grid;
    align-content: start;
    gap: 14px;
    padding: 18px;
    border: 1px solid rgba(228, 232, 239, 0.92);
    border-top: 5px solid var(--magenta);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 14px 30px rgba(32, 35, 49, 0.09);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.client-card:hover,
.product-card:hover,
.quote-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(32, 35, 49, 0.12);
}

.client-card {
    position: relative;
    overflow: hidden;
    gap: 14px;
    padding: 17px;
    border-color: rgba(228, 232, 239, 0.78);
    border-top: 0;
    border-radius: 10px;
    background:
        linear-gradient(#fff, #fff) padding-box,
        linear-gradient(90deg, rgba(176, 35, 132, 0.58), rgba(43, 169, 168, 0.52), rgba(161, 206, 58, 0.42)) border-box;
    box-shadow: 0 12px 30px rgba(32, 35, 49, 0.07);
}

.client-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 2px;
    background: linear-gradient(90deg, rgba(176, 35, 132, 0.86), rgba(43, 169, 168, 0.78), rgba(161, 206, 58, 0.64));
}

.client-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 40px rgba(32, 35, 49, 0.105);
}

.finance-record-card {
    display: grid;
    gap: 14px;
    padding: 18px;
    border: 1px solid rgba(228, 232, 239, 0.92);
    border-left: 6px solid var(--orange);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 14px 30px rgba(32, 35, 49, 0.09);
}

.finance-record-card.payment-pagado {
    border-left-color: var(--lime);
    background: linear-gradient(90deg, rgba(161, 206, 58, 0.06), #fff 42%);
}

.finance-record-card.payment-parcial {
    border-left-color: var(--turquoise);
}

.finance-record-card.payment-vencido,
.finance-record-card.collection-vencido {
    border-left-color: #d33;
    background: linear-gradient(90deg, rgba(211, 51, 51, 0.06), #fff 42%);
}

.finance-record-card.is-cancelled {
    border-left-color: var(--muted);
    background: linear-gradient(90deg, rgba(104, 112, 132, 0.1), #fff 46%);
    opacity: 0.86;
}

.finance-record-head,
.finance-record-title,
.finance-record-concept {
    min-width: 0;
}

.finance-record-head {
    display: flex;
    justify-content: space-between;
    gap: 14px;
}

.finance-record-title {
    display: grid;
    gap: 4px;
}

.finance-record-title > span {
    width: fit-content;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(176, 35, 132, 0.1);
    color: var(--magenta);
    font-size: 0.72rem;
    font-weight: 800;
}

.finance-record-title h3 {
    margin: 0;
    font-size: 1.14rem;
    line-height: 1.2;
}

.finance-record-title p,
.finance-record-concept span {
    margin: 0;
    color: var(--muted);
    font-size: 0.88rem;
}

.finance-badges {
    display: flex;
    align-content: flex-start;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 7px;
}

.finance-badge {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(242, 140, 40, 0.14);
    color: #ad5c0f;
    font-size: 0.74rem;
    font-weight: 800;
}

.finance-badge.pagado,
.finance-badge.facturado {
    background: rgba(161, 206, 58, 0.18);
    color: #4f7210;
}

.finance-badge.parcial,
.finance-badge.credito {
    background: rgba(43, 169, 168, 0.12);
    color: var(--turquoise);
}

.finance-badge.vencido {
    background: rgba(211, 51, 51, 0.12);
    color: #b02828;
}

.finance-badge.no-facturado {
    background: rgba(104, 112, 132, 0.12);
    color: var(--muted);
}

.finance-badge.activo {
    background: rgba(43, 169, 168, 0.12);
    color: var(--turquoise);
}

.finance-badge.anulado {
    background: rgba(104, 112, 132, 0.16);
    color: #555c6d;
}

.finance-record-concept {
    display: grid;
    gap: 4px;
}

.finance-amount-grid,
.finance-detail-grid,
.finance-actions {
    display: grid;
    gap: 10px;
}

.finance-amount-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.finance-amount-grid span {
    display: grid;
    gap: 4px;
    padding: 12px;
    border-radius: 8px;
    background: #f7f9fc;
}

.finance-amount-grid small {
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
}

.finance-amount-grid b {
    color: var(--magenta);
    font-size: 1.18rem;
    line-height: 1.1;
    overflow-wrap: break-word;
}

.finance-detail-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    color: var(--muted);
    font-size: 0.82rem;
}

.finance-detail-grid span {
    min-width: 0;
    overflow-wrap: break-word;
}

.finance-actions {
    grid-template-columns: repeat(auto-fit, minmax(120px, max-content));
    justify-content: start;
}

.finance-payment-history {
    display: grid;
    gap: 10px;
    text-align: left;
}

.finance-payment-history div {
    display: grid;
    gap: 3px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f7f9fc;
}

.finance-payment-history span,
.finance-payment-history small {
    color: var(--muted);
}

.client-card.inactive,
.product-card.inactive {
    border-top-color: var(--muted);
    opacity: 0.72;
}

.product-card {
    border-top-color: var(--turquoise);
}

.quote-card {
    border-top-color: var(--orange);
}

.quote-status-aprobada {
    border-top-color: var(--lime);
}

.quote-status-enviada {
    border-top-color: var(--turquoise);
}

.quote-status-rechazada {
    border-top-color: #d33;
}

.quote-status-vencida {
    border-top-color: var(--muted);
}

.quote-status-anulada,
.quote-status-eliminada,
.quote-inactive {
    border-top-color: var(--muted);
}

.client-card-header,
.product-card-header,
.quote-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 2px;
}

.client-card-header {
    align-items: flex-start;
    gap: 16px;
    padding-bottom: 11px;
    border-bottom: 1px solid rgba(228, 232, 239, 0.78);
}

.client-heading {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    align-items: start;
    gap: 12px;
    min-width: 0;
    flex: 1 1 auto;
}

.client-avatar {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1;
    box-shadow: inset 0 -8px 14px rgba(32, 35, 49, 0.1), 0 8px 18px rgba(32, 35, 49, 0.095);
}

.client-avatar.magenta {
    background: linear-gradient(135deg, #d454a8, #9f247d);
}

.client-avatar.turquoise {
    background: linear-gradient(135deg, #65cfcd, #238f8d);
}

.client-avatar.lime {
    background: linear-gradient(135deg, #b8da63, #6f9d22);
}

.client-avatar.orange {
    background: linear-gradient(135deg, #f5ad62, #c86f22);
}

.client-avatar.lilac {
    background: linear-gradient(135deg, #caa7ee, #8c67c8);
}

.client-title {
    min-width: 0;
    display: grid;
    gap: 3px;
    padding-top: 1px;
}

.product-title {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.quote-title {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.quote-title span {
    width: fit-content;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(176, 35, 132, 0.1);
    color: var(--magenta);
    font-size: 0.72rem;
    font-weight: 800;
}

.client-card h3,
.product-card h3,
.quote-card h3 {
    margin: 0;
    color: var(--ink);
    font-size: 1.22rem;
    line-height: 1.2;
    overflow-wrap: break-word;
    word-break: normal;
}

.client-title h3 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 1.08rem;
    line-height: 1.24;
    font-weight: 800;
}

.client-title p {
    color: #7a8294;
    font-size: 0.8rem;
    line-height: 1.35;
}

.client-card p,
.product-card p,
.quote-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
    overflow-wrap: break-word;
    word-break: normal;
}

.client-badges {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    align-content: flex-start;
    align-items: flex-start;
    gap: 6px;
    flex: 0 0 112px;
    max-width: 132px;
    padding-top: 1px;
}

.status-pill,
.type-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 23px;
    padding: 3px 8px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1;
}

.status-pill .client-icon,
.type-pill .client-icon {
    width: 12px;
    height: 12px;
}

.client-icon {
    width: 1em;
    height: 1em;
    flex: 0 0 auto;
    color: currentColor;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.status-pill {
    border-color: rgba(161, 206, 58, 0.2);
    background: rgba(161, 206, 58, 0.14);
    color: #4f7210;
}

.status-pill.inactive {
    border-color: rgba(104, 112, 132, 0.14);
    background: rgba(104, 112, 132, 0.12);
    color: var(--muted);
}

.type-pill {
    width: fit-content;
    border-color: rgba(43, 169, 168, 0.16);
    background: rgba(43, 169, 168, 0.09);
    color: var(--turquoise);
}

.type-pill.company {
    border-color: rgba(242, 140, 40, 0.18);
    background: rgba(242, 140, 40, 0.1);
    color: #b75f0d;
}

.product-category-pill {
    background: rgba(176, 35, 132, 0.1);
    color: var(--magenta);
}

.quote-status-badge {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(242, 140, 40, 0.14);
    color: #ad5c0f;
    font-size: 0.74rem;
    font-weight: 800;
}

.quote-card-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}

.quote-status-badge.enviada {
    background: rgba(43, 169, 168, 0.12);
    color: var(--turquoise);
}

.quote-status-badge.aprobada {
    background: rgba(161, 206, 58, 0.18);
    color: #4f7210;
}

.quote-status-badge.rechazada {
    background: rgba(211, 51, 51, 0.12);
    color: #b02828;
}

.quote-status-badge.vencida {
    background: rgba(104, 112, 132, 0.12);
    color: var(--muted);
}

.quote-status-badge.anulada,
.quote-status-badge.eliminada {
    background: rgba(104, 112, 132, 0.14);
    color: var(--muted);
}

.quote-status-badge.event-created {
    background: rgba(43, 169, 168, 0.14);
    color: var(--turquoise);
}

.quote-status-badge.finance-created {
    background: rgba(176, 35, 132, 0.1);
    color: var(--magenta);
}

.quote-status-badge.price-visibility {
    background: rgba(43, 169, 168, 0.1);
    color: #217f7e;
}

.quote-card-body {
    display: grid;
    gap: 10px;
}

.quote-inactive {
    opacity: 0.78;
    background: #f8fafc;
}

.quote-card-topic {
    color: var(--ink) !important;
    font-weight: 700;
}

.quote-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 12px;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(43, 169, 168, 0.08), rgba(242, 140, 40, 0.08));
    color: var(--muted);
    font-size: 0.82rem;
}

.quote-meta-grid span {
    min-width: 0;
    overflow-wrap: break-word;
}

.quote-total-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px;
    border-radius: 8px;
    background: #fff5fb;
}

.quote-total-row small,
.quote-total-box small,
.quote-item-subtotal small {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.quote-total-row strong {
    color: var(--magenta);
    font-size: 1.45rem;
    line-height: 1;
}

.product-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(43, 169, 168, 0.1), rgba(161, 206, 58, 0.12));
}

.product-price-row div {
    display: grid;
    gap: 3px;
}

.product-price-row small {
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 800;
    text-transform: uppercase;
}

.product-price-row strong {
    color: var(--magenta);
    font-size: 1.35rem;
    line-height: 1;
}

.product-price-row span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 10px;
    border-radius: 999px;
    background: #fff;
    color: var(--turquoise);
    font-size: 0.78rem;
    font-weight: 800;
}

.client-finance-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    padding: 12px;
    border: 1px solid rgba(43, 169, 168, 0.14);
    border-radius: 8px;
    background: rgba(43, 169, 168, 0.06);
}

.client-finance-summary span {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.client-finance-summary small {
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
}

.client-finance-summary b {
    color: var(--ink);
    font-size: 0.88rem;
    overflow-wrap: break-word;
}

.product-copy {
    display: grid;
    gap: 8px;
}

.product-notes {
    padding: 10px;
    border-left: 4px solid var(--orange);
    border-radius: 8px;
    background: rgba(242, 140, 40, 0.08);
}

.client-contact-grid,
.client-stats {
    display: grid;
    gap: 9px;
}

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

.client-detail-item {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 11px;
    border: 1px solid rgba(228, 232, 239, 0.86);
    border-radius: 8px;
    background: #fff;
}

.client-detail-icon {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: rgba(43, 169, 168, 0.1);
    color: var(--turquoise);
    font-size: 0.78rem;
    font-weight: 900;
}

.client-detail-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.client-detail-copy small {
    display: block;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
}

.client-detail-copy strong {
    display: block;
    min-width: 0;
    overflow-wrap: break-word;
    word-break: normal;
    color: var(--ink);
    font-size: 0.88rem;
    font-weight: 600;
}

.client-contact-grid .client-detail-item:nth-child(3) {
    grid-column: 1 / -1;
}

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

.client-detail-grid-full .client-detail-item:nth-child(3) {
    grid-column: auto;
}

.client-compact-contact {
    display: grid;
    gap: 7px;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid rgba(228, 232, 239, 0.62);
    border-radius: 8px;
    background: rgba(252, 253, 255, 0.86);
    color: var(--muted);
    font-size: 0.81rem;
    line-height: 1.35;
}

.client-contact-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px 16px;
    min-width: 0;
}

.client-contact-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    overflow-wrap: anywhere;
}

.client-contact-item.full {
    width: 100%;
}

.client-compact-contact .client-icon {
    width: 13px;
    height: 13px;
    color: rgba(43, 169, 168, 0.9);
}

.client-compact-contact b {
    color: var(--turquoise);
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.client-activity-strip {
    display: grid;
    gap: 7px;
    padding: 11px 12px;
    border: 1px solid rgba(43, 169, 168, 0.11);
    border-left: 3px solid rgba(43, 169, 168, 0.78);
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(43, 169, 168, 0.05), rgba(161, 206, 58, 0.035));
}

.client-activity-strip.empty {
    border-left-color: rgba(104, 112, 132, 0.38);
    background: rgba(248, 250, 252, 0.72);
}

.client-activity-strip p {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    color: var(--ink);
    font-size: 0.81rem;
    line-height: 1.45;
    max-height: calc(0.81rem * 1.45 * 2);
    overflow: hidden;
}

.client-activity-strip p b {
    font-weight: 800;
}

.client-activity-strip .client-icon {
    width: 15px;
    height: 15px;
    margin-top: 2px;
    color: rgba(43, 169, 168, 0.92);
}

.client-compact-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 0.82rem;
}

.client-compact-meta p {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    line-height: 1.35;
}

.client-compact-meta p span,
.client-compact-alert {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
    max-width: 100%;
    min-height: 29px;
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.73rem;
    font-weight: 800;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.client-compact-alert .client-icon {
    width: 12px;
    height: 12px;
}

.client-compact-meta > p > .client-icon {
    width: 14px;
    height: 14px;
    color: var(--magenta);
}

.client-compact-alert.pending {
    border-color: rgba(242, 140, 40, 0.18);
    background: rgba(242, 140, 40, 0.1);
    color: #ad5c0f;
}

.client-compact-alert.overdue {
    border-color: rgba(211, 51, 51, 0.16);
    background: rgba(211, 51, 51, 0.09);
    color: #b02828;
}

.client-compact-alert.ok {
    border-color: rgba(161, 206, 58, 0.18);
    background: rgba(161, 206, 58, 0.11);
    color: #4f7210;
}

.client-compact-alert.quote {
    border-color: rgba(176, 35, 132, 0.13);
    background: rgba(176, 35, 132, 0.07);
    color: var(--magenta);
}

.client-compact-meta p span {
    border-color: rgba(176, 35, 132, 0.13);
    background: rgba(176, 35, 132, 0.07);
    color: var(--magenta);
}

.client-compact-alert span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 7px;
    border-radius: 999px;
    background: rgba(43, 169, 168, 0.12);
    color: var(--turquoise);
}

.client-detail-overview {
    gap: 12px;
}

.client-detail-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.client-detail-head h3,
.client-detail-head p {
    margin: 0;
}

.client-detail-head p {
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.88rem;
}

.client-detail-admin-actions {
    justify-content: flex-start;
}

.client-contacts-section {
    display: grid;
    gap: 14px;
    text-align: left;
}

.client-contacts-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.client-contacts-head h3 {
    margin: 0;
    color: var(--ink);
    font-size: 1rem;
}

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

.client-contact-card {
    display: grid;
    gap: 9px;
    min-width: 0;
    padding: 12px;
    border: 1px solid rgba(228, 232, 239, 0.94);
    border-left: 4px solid var(--turquoise);
    border-radius: 8px;
    background: #fff;
}

.client-contact-card.inactive {
    border-left-color: var(--muted);
    opacity: 0.72;
}

.client-contact-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.client-contact-card-head div,
.client-contact-meta {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.client-contact-card strong,
.client-contact-card span,
.client-contact-card small,
.client-contact-card p {
    overflow-wrap: break-word;
}

.client-contact-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.86rem;
}

.client-contact-badge {
    width: fit-content;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(43, 169, 168, 0.12);
    color: var(--turquoise);
    font-size: 0.74rem;
    font-weight: 800;
}

.client-contact-meta {
    color: var(--muted);
    font-size: 0.82rem;
}

.client-contact-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.client-contact-link {
    text-decoration: none;
}

.quote-contact-selector {
    margin-top: 12px;
}

.event-contact-summary {
    color: var(--muted);
    font-size: 0.86rem;
}

.contact-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    text-align: left;
}

.contact-form-grid label {
    display: grid;
    gap: 5px;
    margin: 0;
    color: var(--ink);
    font-size: 0.82rem;
    font-weight: 700;
}

.contact-form-grid .swal2-input,
.contact-form-grid .swal2-textarea {
    width: 100%;
    margin: 0;
}

.contact-form-full {
    grid-column: 1 / -1;
}

.client-stats {
    grid-template-columns: 92px minmax(0, 1fr);
    align-items: center;
    padding: 11px;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(176, 35, 132, 0.08), rgba(43, 169, 168, 0.09));
}

.client-stat-count {
    display: grid;
    justify-items: center;
    padding: 10px;
    border-radius: 8px;
    background: #fff;
}

.client-stat-count span {
    color: var(--magenta);
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1;
}

.client-stat-count small {
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 600;
    text-align: center;
}

.client-event-lines {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.client-event-lines p {
    overflow-wrap: break-word;
    word-break: normal;
}

.client-quote-summary {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid rgba(242, 140, 40, 0.18);
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(242, 140, 40, 0.1), rgba(176, 35, 132, 0.08));
}

.client-quote-summary.empty {
    place-items: center;
    min-height: 58px;
    border-style: dashed;
    background: #fff8fb;
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 800;
    text-align: center;
}

.client-quote-summary-head {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.client-quote-summary-head div {
    display: grid;
    gap: 3px;
    min-width: 0;
    padding: 10px;
    border-radius: 8px;
    background: #fff;
}

.client-quote-summary small {
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
}

.client-quote-summary strong {
    min-width: 0;
    color: var(--magenta);
    font-size: 1.05rem;
    overflow-wrap: break-word;
}

.client-quote-status-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
}

.client-quote-status-grid span {
    display: grid;
    gap: 2px;
    min-width: 0;
    padding: 8px 6px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.78);
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 700;
    text-align: center;
}

.client-quote-status-grid b {
    color: var(--ink);
    font-size: 1rem;
}

.client-quote-summary p {
    color: var(--ink);
    font-size: 0.82rem;
}

.client-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    padding-top: 2px;
}

.client-actions .btn-ghost,
.client-actions .btn-secondary {
    width: 100%;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    gap: 9px;
    border-radius: 14px;
    border-width: 1.5px;
    line-height: 1.16;
    white-space: normal;
    text-align: center;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    box-shadow: 0 12px 22px rgba(32, 35, 49, 0.095), inset 0 1px 0 rgba(255, 255, 255, 0.92);
    transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, border-color 180ms ease, color 180ms ease, outline-color 180ms ease;
    will-change: transform;
}

.client-actions .btn-ghost:hover,
.client-actions .btn-secondary:hover {
    transform: translateY(-2px);
}

.client-actions .btn-ghost:active,
.client-actions .btn-secondary:active {
    transform: translateY(0);
    box-shadow: 0 5px 10px rgba(32, 35, 49, 0.09), inset 0 1px 2px rgba(32, 35, 49, 0.08);
}

.client-actions .btn-ghost:focus-visible,
.client-actions .btn-secondary:focus-visible,
.client-actions a:focus-visible {
    outline: 3px solid rgba(184, 28, 139, 0.22);
    outline-offset: 2px;
}

.client-actions .client-icon {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    align-self: center;
}

.client-actions .action-edit {
    border-color: rgba(176, 35, 132, 0.22);
    color: var(--magenta);
}

.client-actions .action-state {
    border-color: rgba(242, 140, 40, 0.28);
    color: #ad5c0f;
}

.client-actions .action-whatsapp {
    border-color: rgba(104, 151, 18, 0.52);
    background: linear-gradient(180deg, #f7ffe8 0%, #e6f8b7 52%, #d3ee8d 100%);
    color: #2f5f08;
    box-shadow: 0 13px 24px rgba(93, 137, 16, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.95), inset 0 -12px 22px rgba(126, 178, 24, 0.08);
}

.client-actions .action-event {
    border-color: rgba(21, 151, 151, 0.5);
    background: linear-gradient(180deg, #effffd 0%, #c8f4ef 52%, #9fe6df 100%);
    color: #046f72;
    box-shadow: 0 13px 24px rgba(25, 145, 145, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.95), inset 0 -12px 22px rgba(43, 169, 168, 0.08);
}

.client-actions .action-quote {
    border-color: rgba(204, 105, 14, 0.5);
    background: linear-gradient(180deg, #fff7e9 0%, #ffe0b5 52%, #ffc982 100%);
    color: #864506;
    box-shadow: 0 13px 24px rgba(184, 91, 8, 0.17), inset 0 1px 0 rgba(255, 255, 255, 0.94), inset 0 -12px 22px rgba(242, 140, 40, 0.08);
}

.client-actions .action-history {
    border-color: rgba(74, 85, 104, 0.32);
    background: linear-gradient(180deg, #ffffff 0%, #f5f8fc 48%, #e5ebf3 100%);
    color: #202331;
    box-shadow: 0 14px 25px rgba(32, 35, 49, 0.145), inset 0 1px 0 rgba(255, 255, 255, 0.98), inset 0 -12px 22px rgba(74, 85, 104, 0.065);
}

.client-actions .action-whatsapp:hover {
    border-color: rgba(87, 132, 10, 0.66);
    background: linear-gradient(180deg, #f2ffda 0%, #dbf49b 48%, #c4e76b 100%);
    box-shadow: 0 18px 32px rgba(86, 130, 13, 0.27), inset 0 1px 0 rgba(255, 255, 255, 0.98), inset 0 -12px 22px rgba(126, 178, 24, 0.12);
}

.client-actions .action-quote:hover {
    border-color: rgba(186, 88, 5, 0.64);
    background: linear-gradient(180deg, #fff1d8 0%, #ffd39a 48%, #ffb85c 100%);
    box-shadow: 0 18px 32px rgba(173, 83, 4, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.97), inset 0 -12px 22px rgba(242, 140, 40, 0.12);
}

.client-actions .action-event:hover {
    border-color: rgba(15, 132, 133, 0.64);
    background: linear-gradient(180deg, #e7fffb 0%, #b4eee7 48%, #82ddd4 100%);
    box-shadow: 0 18px 32px rgba(20, 136, 137, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.97), inset 0 -12px 22px rgba(43, 169, 168, 0.12);
}

.client-actions .action-history:hover {
    border-color: rgba(74, 85, 104, 0.42);
    background: linear-gradient(180deg, #ffffff 0%, #eef4fa 48%, #dbe4ef 100%);
    color: #171923;
    box-shadow: 0 18px 32px rgba(32, 35, 49, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.99), inset 0 -12px 22px rgba(74, 85, 104, 0.09);
}

.client-actions .action-whatsapp:active,
.client-actions .action-quote:active,
.client-actions .action-event:active,
.client-actions .action-history:active {
    transform: translateY(0);
    box-shadow: 0 6px 12px rgba(32, 35, 49, 0.11), inset 0 1px 3px rgba(32, 35, 49, 0.12);
}

.product-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.quote-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
    gap: 8px;
}

.quote-actions .btn-ghost,
.quote-actions .quote-state-select {
    min-height: 38px;
    padding: 8px 10px;
    font-size: 0.8rem;
    font-weight: 800;
}

.quote-state-select {
    border-color: rgba(43, 169, 168, 0.24);
}

.client-actions .action-disabled {
    opacity: 0.48;
    cursor: not-allowed;
}

.empty-state {
    display: grid;
    justify-items: center;
    gap: 8px;
    padding: 38px 18px;
    text-align: center;
}

.empty-state h3 {
    margin: 0;
    color: var(--magenta);
}

.empty-state p {
    max-width: 460px;
    margin: 0;
    color: var(--muted);
}

.fc {
    color: var(--ink);
}

.fc .fc-toolbar-title {
    font-size: 1.35rem;
}

.fc .fc-button-primary {
    border-color: var(--turquoise);
    background: var(--turquoise);
}

.fc .fc-button-primary:not(:disabled).fc-button-active,
.fc .fc-button-primary:not(:disabled):active {
    border-color: var(--magenta);
    background: var(--magenta);
}

.fc-daygrid-event {
    border: 0;
    padding: 2px 4px;
    border-radius: 6px;
}

.modal {
    display: none;
    position: fixed;
    z-index: 999;
    inset: 0;
    padding: 18px;
    background: rgba(16, 18, 28, 0.72);
}

.modal-content {
    position: relative;
    width: min(100%, 520px);
    max-height: calc(100vh - 36px);
    overflow-y: auto;
    margin: 0 auto;
    padding: 24px;
    border-radius: 8px;
    border-top: 8px solid var(--magenta);
    background:
        linear-gradient(180deg, rgba(176, 35, 132, 0.035), rgba(43, 169, 168, 0.025) 38%, transparent),
        #fff;
    box-shadow: var(--shadow);
}

.modal-content-wide {
    width: min(100%, 780px);
}

.modal-content-quote {
    width: min(100%, 1040px);
}

.modal-content h2 {
    margin-bottom: 12px;
    color: var(--magenta);
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: rgba(176, 35, 132, 0.1);
    color: var(--magenta);
    font-size: 1.5rem;
    line-height: 1;
}

#eventForm,
#clientForm,
#productForm,
#quoteForm {
    display: grid;
    gap: 10px;
}

.event-client-picker {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid rgba(43, 169, 168, 0.22);
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(43, 169, 168, 0.09), rgba(176, 35, 132, 0.045));
}

.quote-event-context {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 12px;
    margin-bottom: 12px;
    padding: 12px;
    border: 1px solid rgba(176, 35, 132, 0.16);
    border-radius: 8px;
    background: rgba(176, 35, 132, 0.055);
    color: var(--ink);
    font-size: 0.82rem;
}

.quote-event-context span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.client-picker-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.client-picker-head label {
    color: var(--ink);
    font-size: 0.9rem;
    font-weight: 800;
}

.selected-client-chip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 11px 12px;
    border: 1px solid rgba(161, 206, 58, 0.34);
    border-radius: 8px;
    background: #fff;
}

.selected-client-chip div {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.selected-client-chip strong,
.selected-client-chip span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.selected-client-chip strong {
    color: var(--magenta);
    font-size: 0.94rem;
}

.selected-client-chip span {
    color: var(--muted);
    font-size: 0.8rem;
}

.selected-client-chip .btn-ghost {
    min-height: 34px;
    padding: 7px 10px;
    color: var(--turquoise);
}

.client-autocomplete {
    position: relative;
}

.client-autocomplete-results {
    position: absolute;
    right: 0;
    left: 0;
    top: calc(100% + 6px);
    z-index: 1000;
    max-height: 280px;
    overflow-y: auto;
    border: 1px solid rgba(43, 169, 168, 0.22);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 36px rgba(32, 35, 49, 0.16);
}

.client-result {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border: 0;
    border-bottom: 1px solid #eef1f6;
    background: #fff;
    color: var(--ink);
    text-align: left;
}

.client-result:hover,
.client-result:focus {
    background: rgba(43, 169, 168, 0.08);
    outline: none;
}

.client-result span {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.client-result small {
    overflow: hidden;
    color: var(--muted);
    font-size: 0.78rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.client-result em {
    flex: 0 0 auto;
    color: var(--turquoise);
    font-size: 0.72rem;
    font-style: normal;
    font-weight: 700;
}

.quote-add-product-btn {
    width: 100%;
    min-height: 46px;
    margin: 10px 0 14px;
    justify-content: center;
}

.quote-add-product-btn:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.selected-quote-product {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 10px;
    padding: 12px;
    border: 1px solid rgba(43, 169, 168, 0.24);
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(43, 169, 168, 0.1), rgba(161, 206, 58, 0.1));
}

.selected-quote-product div {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.selected-quote-product small {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
}

.selected-quote-product strong {
    color: var(--magenta);
    font-size: 0.98rem;
}

.selected-quote-product span {
    overflow: hidden;
    color: var(--ink);
    font-size: 0.82rem;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.client-autocomplete-empty {
    padding: 13px;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
}

.form-row-inline {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
}

.client-form {
    gap: 13px !important;
}

.client-form-section {
    display: grid;
    gap: 11px;
    padding: 13px;
    border: 1px solid rgba(228, 232, 239, 0.9);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 10px 24px rgba(32, 35, 49, 0.045);
}

.client-company-section {
    border-color: rgba(176, 35, 132, 0.16);
    background: linear-gradient(135deg, rgba(176, 35, 132, 0.045), rgba(242, 140, 40, 0.045));
}

.client-company-contacts-section {
    border-color: rgba(43, 169, 168, 0.22);
    background: rgba(43, 169, 168, 0.045);
}

.client-company-contacts-section .client-contacts-grid {
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.client-company-contacts-section .client-history-empty {
    margin: 0;
}

.client-form-section-title {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0;
    color: var(--magenta);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
}

.client-form-section-title::before {
    content: "";
    flex: 0 0 auto;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--turquoise);
}

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

.form-field {
    display: grid;
    gap: 5px;
    min-width: 0;
    color: var(--ink);
    font-size: 0.88rem;
    font-weight: 700;
}

.form-field label {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.form-field input,
.form-field select,
.form-field textarea {
    min-height: 46px;
    border-color: rgba(228, 232, 239, 0.98);
    background-color: #fff;
    box-shadow: 0 1px 0 rgba(32, 35, 49, 0.03);
}

.form-field select {
    border-color: rgba(43, 169, 168, 0.26);
    background-color: #fff;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--turquoise) 50%),
        linear-gradient(135deg, var(--turquoise) 50%, transparent 50%),
        linear-gradient(to bottom, rgba(43, 169, 168, 0.08), rgba(43, 169, 168, 0.08));
    background-position:
        calc(100% - 20px) 50%,
        calc(100% - 14px) 50%,
        calc(100% - 42px) 50%;
    background-size: 6px 6px, 6px 6px, 1px 24px;
    background-repeat: no-repeat;
}

.form-field textarea {
    min-height: 110px;
}

.form-grid-full {
    grid-column: 1 / -1;
}

.money-field {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: center;
    min-height: 46px;
    border: 1px solid rgba(228, 232, 239, 0.98);
    border-radius: 8px;
    background: #fff;
    box-shadow: inset 4px 0 0 rgba(161, 206, 58, 0.35);
}

.money-field span {
    display: grid;
    place-items: center;
    height: 100%;
    color: var(--magenta);
    font-weight: 900;
}

.money-field input {
    width: 100%;
    min-height: 44px;
    border: 0;
    border-radius: 0 8px 8px 0;
    box-shadow: none;
}

.product-active-row {
    min-height: 46px;
    margin: 0;
    border-color: rgba(161, 206, 58, 0.32);
    background: rgba(161, 206, 58, 0.08);
}

.client-type-field {
    padding: 0;
    border: 0;
    background: transparent;
}

.empresa-field.featured {
    padding: 12px;
    border: 1px solid rgba(176, 35, 132, 0.22);
    border-radius: 8px;
    background: #fff5fb;
}

.client-history-list {
    display: grid;
    gap: 10px;
    text-align: left;
}

.client-history-sections {
    display: grid;
    gap: 16px;
    text-align: left;
}

.client-history-section {
    display: grid;
    gap: 10px;
}

.client-history-section h3 {
    margin: 0;
    color: var(--ink);
    font-size: 1rem;
}

.client-history-item {
    display: grid;
    gap: 4px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.client-history-item strong {
    color: var(--magenta);
}

.client-history-item span,
.client-history-item small,
.client-history-empty {
    color: var(--muted);
}

.client-history-quote-ref {
    width: fit-content;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(43, 169, 168, 0.1);
    color: var(--turquoise) !important;
    font-size: 0.76rem;
    font-weight: 800;
}

.client-history-quote-item {
    gap: 10px;
}

.client-history-quote-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.client-history-quote-top > div:first-child {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.client-history-quote-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
}

.client-history-quote-meta span {
    min-width: 0;
    padding: 8px;
    border-radius: 8px;
    background: #f8fafc;
    color: var(--muted);
    font-size: 0.8rem;
    overflow-wrap: break-word;
}

.client-history-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.client-history-actions .btn-ghost,
.client-history-actions .quote-state-select {
    width: 100%;
    min-height: 36px;
    padding: 8px 9px;
    font-size: 0.78rem;
    font-weight: 800;
    white-space: normal;
}

.quote-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.quote-section-head .btn-ghost {
    min-height: 34px;
    padding: 7px 10px;
    color: var(--turquoise);
}

.quote-client-price-visibility {
    display: grid;
    gap: 12px;
    margin-top: 14px;
    padding: 14px;
    border: 1px solid rgba(43, 169, 168, 0.18);
    border-radius: 8px;
    background: rgba(43, 169, 168, 0.05);
}

.quote-client-price-visibility h4 {
    margin: 0 0 4px;
    color: var(--ink);
    font-size: 0.95rem;
}

.quote-client-price-visibility p {
    margin: 0;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.45;
}

.quote-price-visibility-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.quote-price-visibility-options label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid rgba(228, 232, 239, 0.96);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    font-size: 0.84rem;
    font-weight: 800;
    cursor: pointer;
}

.quote-price-visibility-options input {
    accent-color: var(--magenta);
}

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

.quote-items-empty {
    padding: 14px;
    border: 1px dashed rgba(176, 35, 132, 0.24);
    border-radius: 8px;
    background: rgba(176, 35, 132, 0.05);
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
}

.quote-item-card {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid rgba(228, 232, 239, 0.96);
    border-left: 5px solid var(--turquoise);
    border-radius: 8px;
    background: #fff;
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.quote-item-card.is-editing {
    border-color: rgba(176, 35, 132, 0.48);
    border-left-color: var(--magenta);
    background: rgba(176, 35, 132, 0.025);
    box-shadow: 0 0 0 3px rgba(176, 35, 132, 0.1);
}

.quote-item-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.quote-item-header div:first-child {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.quote-item-header small {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
}

.quote-item-header strong {
    overflow-wrap: anywhere;
    color: var(--ink);
    font-size: 1rem;
}

.quote-item-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}

.quote-badge {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
}

.quote-badge-origin {
    background: rgba(176, 35, 132, 0.12);
    color: var(--magenta);
}

.quote-badge-category {
    background: rgba(43, 169, 168, 0.12);
    color: var(--turquoise);
}

.quote-badge-edited {
    background: rgba(242, 140, 40, 0.16);
    color: #a95b0f;
}

.quote-item-source {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    padding: 10px;
    border-radius: 8px;
    background: rgba(245, 247, 251, 0.95);
    color: var(--muted);
    font-size: 0.78rem;
}

.quote-item-source strong {
    color: var(--ink);
}

.quote-item-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(190px, 240px);
    gap: 10px;
}

.quote-item-numbers {
    display: grid;
    grid-template-columns: minmax(120px, 150px) minmax(170px, 220px) minmax(140px, 1fr);
    gap: 10px;
    align-items: end;
}

.quote-item-subtotal,
.quote-total-box {
    display: grid;
    align-content: center;
    gap: 4px;
    min-height: 46px;
    padding: 10px 12px;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(161, 206, 58, 0.12), rgba(43, 169, 168, 0.08));
}

.quote-item-subtotal strong,
.quote-total-box strong {
    color: var(--magenta);
    font-size: 1.08rem;
    line-height: 1;
}

.quote-item-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.quote-item-footer span {
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 700;
}

.quote-item-footer .btn-ghost {
    min-height: 34px;
    padding: 7px 10px;
}

.quote-item-image-box {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 12px;
    padding: 10px;
    border: 1px solid rgba(43, 169, 168, 0.16);
    border-radius: 8px;
    background: rgba(43, 169, 168, 0.05);
}

.quote-item-image-preview {
    display: grid;
    place-items: center;
    width: 96px;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 8px;
    background: #fff;
    border: 1px solid var(--line);
}

.quote-item-image-preview img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.quote-item-image-preview.empty span {
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 700;
    text-align: center;
}

.quote-item-image-controls {
    display: grid;
    align-content: center;
    gap: 6px;
    min-width: 0;
}

.quote-item-image-controls strong {
    color: var(--ink);
    font-size: 0.9rem;
}

.quote-item-image-controls small {
    color: var(--muted);
    overflow-wrap: anywhere;
}

.quote-item-image-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.quote-item-file-trigger {
    cursor: pointer;
}

.quote-item-file-trigger input {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    opacity: 0;
    pointer-events: none;
}

.quote-item-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.quote-item-edit-btn {
    border-color: rgba(176, 35, 132, 0.28);
    color: var(--magenta);
}

.quote-item-edit-btn:hover,
.quote-item-edit-btn:focus-visible {
    border-color: var(--magenta);
    background: rgba(176, 35, 132, 0.08);
}

.quote-item-edit-message {
    display: none;
    margin: -2px 0 0;
    color: var(--magenta);
    font-size: 0.8rem;
    font-weight: 700;
}

.quote-item-card.is-editing .quote-item-edit-message {
    display: block;
}

.quote-totals-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    align-items: end;
}

.quote-total-final {
    background: linear-gradient(135deg, rgba(176, 35, 132, 0.12), rgba(242, 140, 40, 0.1));
}

.quote-total-final strong {
    font-size: 1.32rem;
}

.quote-summary {
    display: grid;
    gap: 12px;
    text-align: left;
    color: var(--ink);
    font-size: 0.92rem;
}

.quote-summary-list {
    display: grid;
    gap: 8px;
}

.quote-summary-item {
    display: grid;
    gap: 3px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.quote-summary-item strong {
    color: var(--magenta);
}

.quote-summary-item span,
.quote-summary-item small {
    color: var(--muted);
}

.quote-summary-totals {
    display: grid;
    gap: 6px;
    padding: 12px;
    border-radius: 8px;
    background: rgba(43, 169, 168, 0.08);
}

.quote-summary-totals span {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.quote-version-list {
    display: grid;
    gap: 12px;
    max-height: min(65vh, 620px);
    overflow-y: auto;
    padding: 4px;
    text-align: left;
}

.quote-version-card {
    align-items: center;
    background: #fff;
    border: 1px solid #eaddea;
    border-radius: 14px;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    padding: 14px;
}

.quote-version-main,
.quote-version-main > div {
    display: flex;
    gap: 7px;
}

.quote-version-main {
    align-items: flex-start;
    flex-direction: column;
    min-width: 0;
}

.quote-version-main small {
    color: #687079;
    overflow-wrap: anywhere;
}

.quote-version-badge,
.quote-historical-notice {
    background: #f6e7f2;
    border-radius: 999px;
    color: #8c246e;
    font-size: .72rem;
    font-weight: 800;
    padding: 4px 8px;
}

.quote-version-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    justify-content: flex-end;
}

.quote-historical-notice {
    display: inline-block;
    margin-bottom: 12px;
    text-transform: uppercase;
}

@media (max-width: 640px) {
    .quote-version-card {
        align-items: stretch;
        flex-direction: column;
    }

    .quote-version-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .quote-version-actions .btn-ghost {
        width: 100%;
    }
}

.swal-quote-pdf-preview {
    padding: 0;
}

.dpb-quote-preview-modal {
    max-width: min(1100px, 94vw);
}

.dpb-quote-preview-modal .swal2-html-container {
    margin: 0;
    overflow: visible;
}

.dpb-quote-preview-modal .swal2-actions {
    padding: 0 18px 18px;
}

.dpb-quote-preview-wrap {
    width: 100%;
    max-height: 74vh;
    min-height: min(720px, 70vh);
    overflow: auto;
    padding: 18px;
    background: #f6f8fb;
    text-align: left;
}

.dpb-quote-preview-wrap .dpb-quote-pdf {
    display: grid;
    justify-content: center;
    gap: 18px;
}

.dpb-quote-render-host {
    position: fixed;
    left: -10000px;
    top: 0;
    z-index: -1;
    width: 794px;
    background: #fff;
}

.dpb-quote-pdf {
    color: #273043;
    font-family: "Poppins", Arial, sans-serif;
}

.dpb-quote-page {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 794px;
    min-height: 1123px;
    overflow: hidden;
    padding: 34px 54px 34px;
    background:
        radial-gradient(circle at 8% 13%, rgba(244, 118, 185, 0.14) 0 34px, transparent 35px),
        radial-gradient(circle at 34% 8%, rgba(161, 206, 58, 0.12) 0 24px, transparent 25px),
        radial-gradient(circle at 88% 10%, rgba(43, 169, 168, 0.14) 0 42px, transparent 43px),
        radial-gradient(circle at 94% 34%, rgba(190, 145, 218, 0.12) 0 26px, transparent 27px),
        radial-gradient(circle at 90% 76%, rgba(161, 206, 58, 0.13) 0 50px, transparent 51px),
        radial-gradient(circle at 14% 88%, rgba(190, 145, 218, 0.13) 0 46px, transparent 47px),
        radial-gradient(circle at 41% 92%, rgba(244, 118, 185, 0.11) 0 24px, transparent 25px),
        radial-gradient(circle at 63% 96%, rgba(242, 140, 40, 0.10) 0 38px, transparent 39px),
        #fff;
    box-shadow: 0 18px 44px rgba(28, 34, 50, 0.14);
}

.dpb-quote-header {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    min-height: 86px;
    padding: 0 0 14px;
    border-bottom: 2px solid rgba(176, 35, 132, 0.12);
}

.dpb-quote-logo {
    position: relative;
    z-index: 2;
    display: block;
    width: 208px;
    max-width: 46%;
    height: auto;
    object-fit: contain;
}

.quote-bg-bubble {
    position: absolute;
    z-index: 0;
    display: block;
    border-radius: 999px;
    pointer-events: none;
}

.quote-bg-bubble-logo {
    left: -22px;
    top: -16px;
    width: 68px;
    height: 68px;
    background: rgba(244, 118, 185, 0.14);
}

.quote-bg-bubble-social {
    right: -28px;
    top: -18px;
    width: 92px;
    height: 92px;
    background: rgba(43, 169, 168, 0.14);
}

.quote-socials {
    position: relative;
    z-index: 2;
    display: grid;
    gap: 7px;
    justify-items: end;
    color: #687084;
    font-size: 12px;
    font-weight: 600;
    text-align: right;
}

.quote-social-item {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    white-space: nowrap;
}

.quote-social-icon-svg,
.quote-social-icon-img {
    display: block;
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
}

.dpb-quote-body {
    position: relative;
    z-index: 1;
    flex: 1;
    padding-top: 16px;
}

.dpb-quote-date {
    margin-bottom: 14px;
    color: #596174;
    font-size: 14px;
    font-weight: 600;
    text-align: right;
}

.dpb-quote-client {
    display: grid;
    gap: 3px;
    margin-bottom: 14px;
    color: #273043;
    font-size: 16px;
}

.dpb-quote-client strong {
    color: #b02384;
    font-size: 20px;
}

.dpb-quote-intro,
.dpb-quote-conditions p,
.dpb-quote-closing p {
    color: #394153;
    font-size: 14px;
    line-height: 1.55;
}

.dpb-quote-event {
    display: grid;
    grid-template-columns: 1fr 1fr 1.25fr;
    gap: 10px;
    margin: 16px 0;
}

.dpb-quote-event div {
    display: grid;
    gap: 5px;
    padding: 12px;
    border-radius: 8px;
    background: rgba(43, 169, 168, 0.09);
}

.dpb-quote-event small,
.dpb-quote-item-meta,
.dpb-quote-footer {
    color: #687084;
    font-size: 11px;
    font-weight: 700;
}

.dpb-quote-event strong {
    color: #273043;
    font-size: 13px;
}

.dpb-quote-continuation,
.dpb-quote-conditions h2 {
    margin: 0 0 14px;
    color: #b02384;
    font-size: 24px;
}

.dpb-quote-items {
    display: grid;
    gap: 10px;
}

.dpb-quote-item {
    display: grid;
    grid-template-columns: 116px minmax(0, 1fr) 104px;
    gap: 12px;
    align-items: stretch;
    min-height: 108px;
    padding: 10px;
    border: 1px solid rgba(228, 232, 239, 0.96);
    border-left: 5px solid #2ba9a8;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.92);
}

.dpb-quote-item.no-image {
    grid-template-columns: minmax(0, 1fr) 104px;
}

.dpb-quote-item-total-only {
    grid-template-columns: 116px minmax(0, 1fr);
}

.dpb-quote-item-image {
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 8px;
    background: #f5f7fb;
}

.dpb-quote-item-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

img.dpb-quote-item-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dpb-quote-item-image-empty span {
    color: #687084;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
}

.dpb-quote-image-placeholder {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    min-height: 84px;
    padding: 10px;
    color: #687084;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
}

.dpb-quote-item-copy {
    display: grid;
    align-content: start;
    gap: 6px;
    min-width: 0;
}

.dpb-quote-item-copy strong {
    color: #b02384;
    font-size: 15px;
}

.dpb-quote-item-copy p {
    margin: 0;
    color: #394153;
    font-size: 12px;
    line-height: 1.36;
}

.dpb-quote-item-copy small {
    color: #687084;
    font-size: 11px;
}

.dpb-quote-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
}

.dpb-quote-item-value {
    display: grid;
    place-items: center end;
    color: #273043;
    font-size: 16px;
    font-weight: 800;
    text-align: right;
}

.dpb-quote-totals {
    display: grid;
    gap: 7px;
    width: 300px;
    margin: 16px 0 0 auto;
    padding: 15px 16px;
    border-radius: 8px;
    border: 1px solid rgba(176, 35, 132, 0.16);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 10px 24px rgba(176, 35, 132, 0.08);
}

.dpb-quote-totals span {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    color: #596174;
    font-size: 12px;
}

.dpb-quote-totals .total {
    color: #b02384;
    font-size: 20px;
    font-weight: 800;
    padding: 6px 0;
    border-top: 1px solid rgba(176, 35, 132, 0.14);
    border-bottom: 1px solid rgba(176, 35, 132, 0.14);
    text-transform: uppercase;
}

.dpb-quote-totals-total-only .total {
    border-top: 0;
}

.dpb-quote-totals b {
    min-width: 120px;
    color: #273043;
    text-align: right;
}

.dpb-quote-totals .total b {
    color: #b02384;
}

.dpb-quote-conditions {
    display: grid;
    gap: 13px;
    margin-top: 18px;
}

.dpb-quote-closing {
    display: grid;
    gap: 7px;
    margin-top: 38px;
}

.dpb-quote-closing span {
    color: #687084;
    font-weight: 700;
}

.dpb-quote-closing strong {
    color: #b02384;
    font-family: "Brush Script MT", "Segoe Script", cursive;
    font-size: 42px;
    font-weight: 400;
    line-height: 1.1;
}

.dpb-quote-closing small {
    color: #394153;
    font-size: 13px;
    font-weight: 700;
}

.dpb-quote-footer {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding-top: 14px;
    border-top: 1px solid rgba(228, 232, 239, 0.96);
}

.swal-client-detail {
    display: grid;
    gap: 8px;
    text-align: left;
    font-size: 0.9rem;
}

.swal-client-detail a {
    color: var(--turquoise);
    font-weight: 700;
}

.swal-event-detail {
    width: min(900px, calc(100vw - 24px)) !important;
}

.swal-event-detail .swal2-html-container {
    margin: 14px 0 0;
    overflow-x: hidden;
}

.event-detail-wrap {
    display: grid;
    gap: 16px;
    text-align: left;
}

.event-detail-reference {
    width: 100%;
    max-height: 240px;
    border-radius: 8px;
    object-fit: cover;
}

.event-cancelled-badge {
    width: fit-content;
    padding: 6px 10px;
    border: 1px solid rgba(104, 112, 132, 0.28);
    border-radius: 999px;
    background: #f3f4f6;
    color: #4b5563;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.event-detail-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 8px;
    border-top: 1px solid var(--line);
}

.event-photos-section {
    display: grid;
    gap: 14px;
    padding: 14px;
    border: 1px solid rgba(43, 169, 168, 0.2);
    border-radius: 8px;
    background: linear-gradient(180deg, #ffffff 0%, #f7fffd 100%);
}

.event-photos-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.event-photos-head h3 {
    margin: 0;
    color: var(--ink);
    font-size: 1rem;
}

.event-photos-head p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 0.82rem;
}

.event-photo-upload-btn {
    min-height: 38px;
    padding: 9px 14px;
    white-space: nowrap;
}

.event-photos-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.event-photo-card {
    display: grid;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(32, 35, 49, 0.08);
}

.event-photo-thumb {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: #eef2f7;
}

.event-photo-thumb img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.18s ease;
}

.event-photo-thumb:hover img {
    transform: scale(1.03);
}

.event-photo-main-badge {
    position: absolute;
    top: 9px;
    left: 9px;
    padding: 5px 8px;
    border-radius: 999px;
    background: var(--lime);
    color: #1e2b0b;
    font-size: 0.72rem;
    font-weight: 900;
    box-shadow: 0 6px 16px rgba(32, 35, 49, 0.16);
}

.event-photo-catalog-badge {
    position: absolute;
    right: 9px;
    bottom: 9px;
    max-width: calc(100% - 18px);
    padding: 5px 8px;
    border-radius: 999px;
    background: rgba(176, 35, 132, 0.94);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 900;
    box-shadow: 0 6px 16px rgba(32, 35, 49, 0.16);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.event-photo-body {
    display: grid;
    gap: 4px;
    padding: 10px;
}

.event-photo-body strong {
    color: var(--ink);
    font-size: 0.86rem;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.event-photo-body span,
.event-photo-body small {
    color: var(--muted);
    font-size: 0.75rem;
    overflow-wrap: anywhere;
}

.event-photo-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    padding: 0 10px 10px;
}

.event-photo-actions .btn-ghost {
    width: 100%;
    min-height: 34px;
    padding: 7px 8px;
    font-size: 0.73rem;
    white-space: normal;
}

.event-photo-empty {
    display: grid;
    gap: 5px;
    min-height: 126px;
    place-items: center;
    padding: 22px;
    border: 1px dashed rgba(176, 35, 132, 0.34);
    border-radius: 8px;
    background: #fff5fb;
    color: var(--muted);
    text-align: center;
}

.event-photo-empty strong {
    color: var(--magenta);
}

.event-photo-viewer {
    display: grid;
    gap: 12px;
    text-align: left;
}

.event-photo-viewer img {
    width: 100%;
    max-height: min(68vh, 620px);
    border-radius: 8px;
    object-fit: contain;
    background: #f8fafc;
}

.event-photo-viewer-meta {
    display: grid;
    gap: 4px;
    color: var(--muted);
}

.event-photo-viewer-meta strong {
    color: var(--ink);
}

.swal-event-photo-viewer {
    width: min(900px, calc(100vw - 24px)) !important;
}

.visual-catalog-source-preview {
    display: grid;
    grid-template-columns: 118px 1fr;
    gap: 12px;
    align-items: center;
    margin-bottom: 14px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    text-align: left;
}

.visual-catalog-source-preview img {
    width: 118px;
    aspect-ratio: 4 / 3;
    border-radius: 8px;
    object-fit: cover;
    background: #eef2f7;
}

.visual-catalog-source-preview div {
    display: grid;
    gap: 4px;
}

.visual-catalog-source-preview strong {
    color: var(--ink);
}

.visual-catalog-source-preview span {
    color: var(--muted);
    font-size: 0.85rem;
}

.swal-visual-catalog-form {
    width: min(760px, calc(100vw - 24px)) !important;
}

.swal-visual-catalog-form .swal2-html-container,
.swal-visual-catalog-detail .swal2-html-container {
    margin: 0;
}

.visual-catalog-form {
    text-align: left;
}

.visual-catalog-detail {
    display: grid;
    gap: 14px;
    text-align: left;
}

.visual-catalog-detail-image {
    display: grid;
    place-items: center;
    width: 100%;
    max-height: min(66vh, 620px);
    overflow: hidden;
    border-radius: 8px;
    background: #f8fafc;
}

.visual-catalog-detail-image img {
    width: 100%;
    max-height: min(66vh, 620px);
    object-fit: contain;
    transform: rotate(var(--visual-image-rotation, 0deg));
}

.visual-catalog-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px;
    color: var(--muted);
    font-size: 0.9rem;
}

.visual-catalog-detail p {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.visual-catalog-detail-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
}

.client-history-visual-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
    padding: 10px;
    border: 1px solid rgba(43, 169, 168, 0.2);
    border-radius: 8px;
    background: #f7fffd;
}

.client-history-visual-summary span {
    color: var(--turquoise);
    font-weight: 800;
    font-size: 0.86rem;
}

.client-history-event-photos {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 6px;
    padding-top: 8px;
    border-top: 1px solid var(--line);
}

.client-history-event-photos span {
    color: var(--turquoise);
    font-size: 0.8rem;
    font-weight: 800;
}

.client-history-event-photos .btn-ghost {
    min-height: 32px;
    padding: 7px 10px;
    font-size: 0.76rem;
}

.swal-finance-form {
    width: min(760px, calc(100vw - 28px)) !important;
}

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

.swal-form-grid label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.swal-form-grid input,
.swal-form-grid select,
.swal-form-grid textarea {
    min-height: 44px;
    color: var(--ink);
    font-size: 0.92rem;
    font-weight: 500;
    text-transform: none;
}

.swal-form-full {
    grid-column: 1 / -1;
}

.swal-check-row {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.swal-check-row input {
    width: 20px;
    min-height: 20px;
}

#drop-zone {
    border: 2px dashed var(--magenta);
    border-radius: 8px;
    padding: 18px;
    text-align: center;
    background: #fff5fb;
    color: var(--magenta);
    transition: all 0.2s ease;
    cursor: pointer;
}

#drop-zone.hover {
    border-style: solid;
    background: var(--magenta);
    color: #fff;
}

#fotoDiseno {
    display: none;
}

#file-name {
    display: block;
    margin-top: 6px;
    color: inherit;
    font-size: 0.82rem;
    font-weight: 700;
}

.check-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    font-weight: 600;
}

.check-row input {
    width: 20px;
    min-height: 20px;
}

.estructura-row {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 10px;
    margin-bottom: 8px;
}

#notasLogisticas {
    min-height: 86px;
    resize: vertical;
}

.reports-dashboard {
    display: grid;
    gap: 18px;
    padding: 20px;
}

.reports-header,
.reports-export-panel {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.reports-header p,
.reports-export-panel p {
    margin: 6px 0 0;
    color: var(--muted);
}

.reports-filters {
    display: grid;
    grid-template-columns: repeat(6, minmax(145px, 1fr));
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f9fbfe;
}

.reports-filters .catalog-filter-group {
    min-width: 0;
}

.reports-filters input,
.reports-filters select {
    width: 100%;
    min-width: 0;
}

.reports-client-filter {
    grid-column: span 2;
    min-width: 0;
}

.reports-client-combobox {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.reports-client-combobox input {
    flex: 1 1 auto;
}

.reports-client-clear {
    flex: 0 0 auto;
    min-height: 40px;
    padding: 0 12px;
    white-space: nowrap;
}

.reports-client-internal {
    display: none;
}

.reports-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.reports-kpi-card {
    display: grid;
    gap: 6px;
    min-height: 128px;
    padding: 14px;
    border: 1px solid var(--line);
    border-top: 5px solid var(--magenta);
    border-radius: 8px;
    background: #fff;
}

.reports-kpi-card.turquoise {
    border-top-color: var(--turquoise);
}

.reports-kpi-card.lime {
    border-top-color: var(--lime);
}

.reports-kpi-card.orange,
.reports-kpi-card.danger {
    border-top-color: var(--orange);
}

.reports-kpi-card span {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
}

.reports-kpi-card strong {
    color: var(--ink);
    font-size: clamp(1.25rem, 2vw, 1.72rem);
    line-height: 1.1;
}

.reports-kpi-card small {
    color: var(--muted);
    font-size: 0.78rem;
}

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

.report-chart-card,
.reports-table-card,
.reports-export-panel {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.report-chart-card {
    position: relative;
    min-height: 330px;
    padding: 16px;
}

.report-chart-card h3,
.reports-table-card h3,
.reports-export-panel h3 {
    margin: 0;
    font-size: 1rem;
}

.report-chart-card canvas {
    width: 100% !important;
    height: 260px !important;
    margin-top: 12px;
}

.reports-export-panel {
    padding: 16px;
}

.reports-export-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

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

.reports-table-card {
    min-width: 0;
    padding: 16px;
}

.reports-table-wrap {
    width: 100%;
    overflow-x: auto;
    margin-top: 12px;
}

.reports-table {
    width: 100%;
    min-width: 680px;
    border-collapse: collapse;
    font-size: 0.84rem;
}

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

.reports-table th {
    color: var(--magenta);
    font-size: 0.76rem;
    text-transform: uppercase;
}

.reports-empty-state {
    display: grid;
    place-items: center;
    min-height: 82px;
    padding: 14px;
    border: 1px dashed var(--line);
    border-radius: 8px;
    color: var(--muted);
    text-align: center;
    background: #fbfcff;
}

.bottom-nav {
    display: none;
}

@media (max-width: 1024px) {
    .app-shell {
        grid-template-columns: 210px minmax(0, 1fr);
    }

    .app-shell.sidebar-collapsed {
        grid-template-columns: 76px minmax(0, 1fr);
    }

    .main-content {
        padding: 18px;
    }

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

    .topbar-actions {
        justify-content: flex-start;
    }

    .finance-summary-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .finance-tools {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .reports-filters {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .reports-client-filter {
        grid-column: span 1;
    }

    .reports-kpi-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .home-kpi-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .home-mini-kpis,
    .home-finance-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-section-grid {
        grid-template-columns: 1fr;
    }

    .home-quick-actions {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .reports-chart-grid,
    .reports-table-grid {
        grid-template-columns: 1fr;
    }

    .finance-tools .client-search-field {
        grid-column: 1 / -1;
    }

    .visual-catalog-toolbar {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .visual-catalog-search {
        grid-column: 1 / -1;
    }

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

    .clients-list {
        grid-template-columns: repeat(2, minmax(320px, 1fr));
    }

    .app-shell.sidebar-collapsed .brand-block img {
        width: 42px;
        height: 42px;
    }
}

@media (max-width: 720px) {
    .app-shell {
        display: block;
        padding-bottom: 74px;
    }

    .app-shell.sidebar-collapsed {
        display: block;
    }

    .sidebar {
        display: none;
    }

    .main-content {
        padding: 14px;
    }

    .reports-dashboard {
        padding: 14px;
    }

    .reports-header,
    .reports-export-panel {
        align-items: stretch;
        flex-direction: column;
    }

    .reports-header .btn-primary,
    .reports-export-actions,
    .reports-export-actions .btn-ghost {
        width: 100%;
    }

    .reports-filters,
    .reports-kpi-grid {
        grid-template-columns: 1fr;
    }

    .home-hero,
    .home-panel-head,
    .home-list-main,
    .home-list-actions,
    .home-alert-item {
        align-items: stretch;
        flex-direction: column;
    }

    .home-date-pill {
        max-width: none;
        text-align: left;
    }

    .home-kpi-grid,
    .home-mini-kpis,
    .home-finance-grid,
    .home-list-meta,
    .home-quick-actions {
        grid-template-columns: 1fr;
    }

    .home-panel {
        padding: 14px;
    }

    .home-panel-head .btn-ghost,
    .home-list-actions .btn-ghost,
    .home-alert-item .btn-ghost,
    .home-quick-actions button {
        width: 100%;
    }

    .reports-client-filter {
        grid-column: 1 / -1;
    }

    .report-chart-card {
        min-height: 300px;
    }

    .report-chart-card canvas {
        height: 230px !important;
    }

    .topbar {
        gap: 14px;
    }

    .topbar h1 {
        font-size: 1.45rem;
    }

    .topbar-actions {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr auto auto;
    }

    .user-pill,
    #btnLogout {
        grid-column: 1 / -1;
        max-width: none;
        width: 100%;
    }

    #btnNuevoEvento {
        min-width: 132px;
    }

    .calendar-panel {
        padding: 10px;
    }

    .clients-panel,
    .catalog-panel,
    .quotes-panel,
    .finance-panel {
        padding: 14px;
    }

    .clients-header,
    .clients-tools,
    .catalog-header,
    .catalog-tools,
    .quotes-header,
    .quotes-tools,
    .finance-header,
    .finance-tools {
        align-items: stretch;
    }

    .clients-header,
    .catalog-header,
    .quotes-header,
    .finance-header {
        flex-direction: column;
    }

    .clients-tools,
    .catalog-tools,
    .visual-catalog-toolbar,
    .quotes-tools,
    .finance-tools {
        grid-template-columns: 1fr;
    }

    .finance-header-actions {
        justify-content: stretch;
    }

    .finance-header-actions .btn-primary,
    .finance-header-actions .btn-ghost {
        width: 100%;
    }

    .finance-summary-grid,
    .finance-amount-grid,
    .finance-detail-grid,
    .client-finance-summary,
    .swal-form-grid {
        grid-template-columns: 1fr;
    }

    .client-filter-tabs,
    .quote-filter-tabs {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        width: 100%;
    }

    .client-filter-tab {
        padding-right: 8px;
        padding-left: 8px;
    }

    .clients-list,
    .products-list,
    .quotes-list,
    .visual-catalog-grid {
        grid-template-columns: 1fr;
    }

    .client-card {
        padding: 15px;
    }

    .client-card-header,
    .product-card-header,
    .quote-card-header,
    .finance-record-head,
    .selected-client-chip {
        align-items: stretch;
        flex-direction: column;
    }

    .client-badges,
    .quote-card-badges,
    .finance-badges {
        justify-content: flex-start;
        max-width: none;
    }

    .client-contact-grid,
    .client-contacts-grid,
    .contact-form-grid,
    .client-detail-grid-full,
    .client-stats {
        grid-template-columns: 1fr;
    }

    .client-detail-head {
        align-items: stretch;
        flex-direction: column;
    }

    .client-quote-summary-head,
    .client-history-quote-meta {
        grid-template-columns: 1fr;
    }

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

    .client-history-quote-top {
        align-items: stretch;
        flex-direction: column;
    }

    .client-history-actions {
        grid-template-columns: 1fr;
    }

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

    .event-photos-head,
    .client-history-event-photos,
    .client-history-visual-summary,
    .event-detail-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .event-photo-upload-btn,
    .event-detail-actions .btn-ghost,
    .client-history-visual-summary .btn-ghost,
    .client-history-event-photos .btn-ghost {
        width: 100%;
    }

    .visual-catalog-detail-grid,
    .visual-catalog-actions {
        grid-template-columns: 1fr;
    }

    .visual-catalog-detail-actions .btn-ghost {
        width: 100%;
    }

    .visual-catalog-source-preview {
        grid-template-columns: 1fr;
    }

    .visual-catalog-source-preview img {
        width: 100%;
    }

    .client-actions .btn-ghost,
    .client-actions .btn-secondary,
    .client-actions a {
        width: 100%;
    }

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

    .product-actions {
        grid-template-columns: 1fr;
    }

    .quote-actions,
    .finance-actions,
    .quote-meta-grid,
    .quote-item-main,
    .quote-item-numbers,
    .quote-totals-grid {
        grid-template-columns: 1fr;
    }

    .finance-actions .btn-ghost {
        width: 100%;
    }

    .selected-quote-product,
    .quote-item-header {
        align-items: stretch;
        flex-direction: column;
    }

    .selected-quote-product span {
        white-space: normal;
    }

    .selected-quote-product .btn-ghost,
    .quote-add-product-btn {
        width: 100%;
    }

    .quote-item-badges,
    .quote-item-actions {
        justify-content: flex-start;
    }

    .dpb-quote-preview-wrap .dpb-quote-header {
        align-items: center;
        flex-direction: column;
        gap: 14px;
        text-align: center;
    }

    .dpb-quote-preview-wrap .dpb-quote-logo {
        max-width: 280px;
        width: 70%;
    }

    .dpb-quote-preview-wrap .quote-socials {
        justify-items: center;
        text-align: center;
    }

    .dpb-quote-preview-wrap .quote-social-item {
        justify-content: center;
    }

    .quote-section-head,
    .quote-item-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .quote-section-head .btn-ghost,
    .quote-item-footer .btn-ghost,
    .quote-item-actions {
        width: 100%;
    }

    .fc .fc-toolbar {
        gap: 8px;
        align-items: stretch;
        flex-direction: column;
    }

    .fc .fc-toolbar-title {
        font-size: 1.08rem;
        text-align: center;
    }

    .fc .fc-button {
        padding: 0.34em 0.52em;
        font-size: 0.82rem;
    }

    .modal {
        padding: 10px;
    }

    .modal-content {
        max-height: calc(100vh - 20px);
        padding: 22px 16px;
    }

    .estructura-row {
        grid-template-columns: 82px minmax(0, 1fr);
    }

    .form-row-inline,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .client-picker-head {
        align-items: stretch;
        flex-direction: column;
    }

    .client-picker-head .btn-ghost,
    .selected-client-chip .btn-ghost {
        width: 100%;
    }

    .bottom-nav {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 500;
        display: grid;
        grid-template-columns: repeat(7, 1fr);
        gap: 2px;
        padding: 8px;
        border-top: 1px solid var(--line);
        background: rgba(255, 255, 255, 0.96);
        box-shadow: 0 -10px 24px rgba(32, 35, 49, 0.12);
    }

    .bottom-nav-item {
        min-height: 46px;
        padding: 6px 4px;
        font-size: 0.64rem;
    }
}

@media (max-width: 420px) {
    .login-card {
        padding: 24px 18px;
    }

    .topbar-actions {
        grid-template-columns: 48px minmax(0, 1fr);
    }

    #btnNuevoEvento {
        min-width: 0;
        width: 100%;
    }

    .event-photos-grid,
    .event-photo-actions {
        grid-template-columns: 1fr;
    }

    .client-card-header {
        gap: 10px;
    }

    .client-heading {
        grid-template-columns: 38px minmax(0, 1fr);
        gap: 10px;
    }

    .client-avatar {
        width: 38px;
        height: 38px;
    }

    .client-actions {
        grid-template-columns: 1fr;
    }
}
