:root {
    --color-primary: #09A7FF;
    --color-bg-soft: #EBF7FF;
    --color-bg-alt: #E1F4FF;
    --color-white: #FFFFFF;
    --color-dark: #08324A;
    --shadow-soft: 0 10px 30px rgba(8, 50, 74, 0.12);
    --radius: 16px;
    --list-font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    --list-font-size: 13px;
    --list-header-font-size: 12px;
    --list-line-height: 1.18;
    --list-cell-pad-y: 5px;
    --list-cell-pad-x: 8px;
    --list-row-btn-font-size: 11px;
    --list-row-btn-pad-y: 4px;
    --list-row-btn-pad-x: 7px;
    --list-mobile-font-size: 13px;
    --list-mobile-line-height: 1.22;
    --list-mobile-pad-y: 8px;
    --list-mobile-pad-x: 9px;
    --dashboard-mobile-frame-height: 72dvh;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    color: var(--color-dark);
    background: linear-gradient(150deg, var(--color-bg-soft), var(--color-bg-alt));
    min-height: 100vh;
}

.dashboard-page {
    overflow: hidden;
}

a {
    text-decoration: none;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px;
}

.container-wide {
    width: 100%;
}

.card {
    background: var(--color-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
}

.topbar {
    background: var(--color-white);
    border-bottom: 1px solid #d4ecfa;
}

.topbar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 18px;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo {
    width: 100%;
    max-width: 230px;
    height: auto;
    object-fit: contain;
}

.user-pill {
    background: var(--color-bg-soft);
    border: 1px solid #bee6fb;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.user-name {
    display: inline-block;
    min-width: 0;
}

.user-role {
    white-space: nowrap;
}

.btn {
    background: var(--color-primary);
    color: var(--color-white);
    border: none;
    border-radius: 10px;
    padding: 9px 13px;
    font-size: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    line-height: 1.15;
}

.btn:hover {
    filter: brightness(0.95);
}

.btn-outline {
    background: var(--color-white);
    border: 1px solid var(--color-primary);
    color: var(--color-dark);
}

.auth-wrap {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 20px;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

.auth-logo {
    display: block;
    margin: 0 auto 16px;
    max-width: 260px;
    width: 100%;
}

.auth-title {
    text-align: center;
    margin: 0 0 14px;
    font-size: 22px;
}

.field {
    margin-bottom: 11px;
}

.field label {
    display: block;
    font-size: 14px;
    margin-bottom: 5px;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    border: 1px solid #cbe7f8;
    border-radius: 10px;
    padding: 8px 11px;
    outline: none;
    background: #fff;
    font: inherit;
    line-height: 1.2;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(9, 167, 255, 0.15);
}

.field textarea {
    resize: vertical;
    min-height: 56px;
}

.field-check label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.field-check input {
    width: auto;
}

.auth-page {
    background: linear-gradient(155deg, #f7fcff 0%, #eaf7ff 38%, #ddf2ff 70%, #ebf7ff 100%);
    position: relative;
    overflow-x: hidden;
}

.auth-page::before {
    content: none;
}

.auth-page::after {
    content: none;
}

.auth-page .auth-wrap.auth-wrap-single {
    min-height: 100vh;
    max-width: 760px;
    margin: 0 auto;
    padding: 28px 20px;
    display: grid;
    grid-template-columns: 1fr;
    place-items: center;
    position: relative;
    z-index: 1;
}

.auth-card-modern {
    padding: 22px 22px;
    border: 1px solid #bfe8ff;
    background: linear-gradient(175deg, #ffffff 0%, #f5fbff 100%);
    width: 100%;
    max-width: 520px;
}

.auth-login-head {
    display: grid;
    justify-items: center;
    text-align: center;
    gap: 4px;
    margin-bottom: 12px;
}

.auth-logo-compact {
    margin: 0 auto 2px;
    max-width: 210px;
}

.auth-subtitle {
    margin: 0 0 4px;
    color: #1a6289;
    font-size: 14px;
}

.auth-form {
    margin-top: 8px;
}

.auth-submit-btn {
    width: 100%;
    padding: 10px 14px;
    margin-top: 4px;
    font-weight: 700;
    letter-spacing: 0.01em;
    background: linear-gradient(135deg, #09a7ff 0%, #0a84c8 100%);
    box-shadow: 0 12px 20px rgba(9, 167, 255, 0.25);
}

.auth-submit-btn:hover {
    filter: none;
    transform: translateY(-1px);
}

.info-msg {
    border-radius: 10px;
    padding: 8px 11px;
    margin-bottom: 12px;
    font-size: 14px;
    background: #e6f5ff;
    color: #0b5278;
    border: 1px solid #b9e3fa;
}

.form-grid {
    max-width: 620px;
}

.error-msg,
.success-msg {
    border-radius: 10px;
    padding: 8px 11px;
    margin-bottom: 12px;
    font-size: 14px;
}

.error-msg {
    background: #ffe8e8;
    color: #8e2727;
    border: 1px solid #ffd2d2;
}

.success-msg {
    background: #e9fff0;
    color: #1d6e3a;
    border: 1px solid #cef6dc;
}

.welcome-box {
    margin-top: 14px;
    padding: 16px;
}

.menu-grid {
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.menu-section {
    padding: 12px;
}

.menu-section h3 {
    margin: 0 0 10px;
    color: var(--color-dark);
    font-size: 17px;
}

.option-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

.option-list a {
    display: block;
    padding: 9px 10px;
    border-radius: 10px;
    background: var(--color-bg-soft);
    color: var(--color-dark);
    border: 1px solid #d3edfc;
    transition: all 0.2s ease;
    font-size: 14px;
}

.option-list a:hover {
    background: var(--color-primary);
    color: var(--color-white);
}

.dashboard-menu-grid {
    width: 100%;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.dashboard-ribbon {
    margin-top: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
    align-items: stretch;
}

.dashboard-ribbon-section {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 4px;
    border-radius: 8px;
    box-shadow: none;
}

.dashboard-ribbon-section h3 {
    margin: 0;
    font-size: 11px;
    white-space: normal;
}

.dashboard-group-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    text-align: left;
    border: 1px solid #d3edfc;
    border-radius: 6px;
    background: #f2faff;
    color: var(--color-dark);
    padding: 5px 7px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.dashboard-group-toggle[aria-expanded="true"] {
    background: #e6f5ff;
    border-color: #8fd0f4;
    box-shadow: inset 0 0 0 1px rgba(9, 167, 255, 0.16);
}

.dashboard-group-toggle.is-collapsed {
    background: #eef7ff;
    box-shadow: none;
}

.dashboard-group-title {
    min-width: 0;
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    gap: 6px;
}

.dashboard-group-emoji {
    flex: 0 0 auto;
    font-size: 1.02em;
    line-height: 1;
}

.dashboard-group-title-caption {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-group-indicator {
    flex: 0 0 auto;
    width: 16px;
    text-align: center;
    font-size: 11px;
    line-height: 1;
    transition: transform 0.22s ease;
}

.dashboard-group-toggle.is-collapsed .dashboard-group-indicator {
    transform: rotate(-90deg);
}

.dashboard-option-list {
    gap: 10px;
}

.dashboard-ribbon-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
    overflow: hidden;
    max-height: var(--dashboard-list-max-height, 420px);
    opacity: 1;
    transform: translateY(0);
    transform-origin: top;
    transition: max-height 0.32s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.24s ease, transform 0.28s ease;
}

.dashboard-ribbon-list.is-collapsed {
    max-height: 0;
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
}

.dashboard-ribbon-list li {
    margin: 0;
}

.dashboard-option-list a {
    display: grid;
    grid-template-columns: auto 1fr;
    width: 100%;
    min-height: 26px;
    align-items: center;
    justify-content: stretch;
    gap: 0;
    padding: 0;
    overflow: hidden;
    border-radius: 6px;
    background: linear-gradient(180deg, #09A7FF 0%, #068ED8 100%);
    border: 1px solid #068ED8;
    color: var(--color-white);
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 1px 4px rgba(6, 142, 216, 0.16);
    transition: filter 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.dashboard-btn-emoji {
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: stretch;
    padding: 0 6px;
    background: #E1F4FF;
    border-right: 1px solid rgba(8, 50, 74, 0.12);
    font-size: 0.98em;
    line-height: 1;
    color: #09A7FF;
}

.dashboard-btn-caption {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding: 6px 7px;
    line-height: 1.2;
    color: var(--color-white);
    white-space: nowrap;
}

.dashboard-btn-caption:only-child {
    grid-column: 1 / -1;
}

.dashboard-option-list a:hover {
    filter: brightness(0.94);
    color: var(--color-white);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(6, 142, 216, 0.24);
}

.dashboard-option-list a:active {
    transform: translateY(0);
}

.module-box {
    margin-top: 0;
    padding: 6px;
}

.dashboard-main.dashboard-split {
    display: flex;
    align-items: stretch;
    gap: 2px;
    padding: 0;
    height: calc(100vh - 92px);
    position: relative;
    width: 100vw;
    max-width: none;
    margin: 0;
    padding-right: 0;
}

.dashboard-sidebar {
    width: 250px;
    min-width: 250px;
    height: 100%;
    overflow: hidden;
    padding: 4px;
    position: static;
    transition: width 0.28s ease, min-width 0.28s ease, padding 0.28s ease, opacity 0.2s ease;
}

.dashboard-master-toggle {
    align-self: center;
    width: 15px;
    min-width: 15px;
    height: 62px;
    border: 1px solid #9dd8f7;
    border-radius: 8px;
    background: linear-gradient(180deg, #ffffff 0%, #dff3ff 100%);
    color: #0a6fa5;
    box-shadow: 0 8px 18px rgba(8, 50, 74, 0.16);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.dashboard-master-toggle:hover {
    transform: translateX(1px);
    box-shadow: 0 10px 20px rgba(8, 50, 74, 0.2);
}

.dashboard-master-toggle:active {
    transform: translateX(0);
}

.dashboard-master-toggle-icon {
    font-size: 10px;
    line-height: 1;
    transition: transform 0.22s ease;
}

.dashboard-split.is-menu-collapsed .dashboard-master-toggle-icon {
    transform: rotate(180deg);
}

.dashboard-split.is-menu-collapsed .dashboard-sidebar {
    width: 0;
    min-width: 0;
    padding: 0;
    opacity: 0;
}

.dashboard-split.is-menu-collapsed .dashboard-master-toggle {
    width: 25px;
    min-width: 25px;
    background: linear-gradient(180deg, #ffffff 0%, #e7f7ff 100%);
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
}

.dashboard-split.is-menu-collapsed .dashboard-master-toggle:hover {
    transform: translateY(-50%) translateX(1px);
}

.dashboard-split.is-menu-collapsed .dashboard-master-toggle:active {
    transform: translateY(-50%);
}

.dashboard-content {
    flex: 1 1 auto;
    min-width: 0;
    min-height: calc(100vh - 92px);
    height: calc(100vh - 92px);
    display: flex;
    padding: 0;
}

.dashboard-frame-shell {
    position: relative;
    flex: 1 1 auto;
    width: 100%;
    height: 100%;
    min-height: 100%;
    overflow: hidden;
}

.dashboard-frame-loading {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: block;
    background: #ffffff;
    border-radius: 6px;
    padding: 0;
}

.dashboard-frame-loading.is-hidden {
    display: none;
}

.dashboard-loading-surface {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 100%;
    border: 1px solid #d9ecf9;
    border-radius: 6px;
    background: linear-gradient(180deg, #f8fcff 0%, #eef8ff 100%);
    padding: 16px;
    display: grid;
    grid-template-rows: auto auto 1fr auto;
    gap: 14px;
}

.dashboard-loading-title {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%);
    z-index: 3;
    gap: 12px;
    color: #0a4f74;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.2px;
    white-space: nowrap;
    max-width: calc(100% - 24px);
    background: rgba(255, 255, 255, 0.74);
    padding: 8px 14px;
    border-radius: 999px;
    box-shadow: 0 10px 24px rgba(8, 50, 74, 0.12);
    backdrop-filter: blur(3px);
}

.dashboard-frame-loading-emoji {
    font-size: 24px;
    line-height: 1;
}

.dashboard-skeleton-toolbar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.dashboard-skeleton-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.dashboard-skeleton-windows {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.dashboard-skeleton-window {
    display: grid;
    grid-template-rows: 20px 14px 10px;
    gap: 8px;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid #d5ebfa;
    background: #f6fbff;
}

.dashboard-skeleton-table {
    display: grid;
    grid-auto-rows: 1fr;
    gap: 10px;
    min-height: 0;
}

.dashboard-skeleton-block {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    background: #dbeefb;
}

.dashboard-skeleton-block::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.55) 45%, rgba(255, 255, 255, 0) 100%);
    transform: translateX(-100%);
    animation: dashboard-skeleton-shimmer 1.2s infinite;
}

.sk-pill {
    height: 30px;
    border-radius: 999px;
}

.sk-w-22 {
    width: 22%;
    min-width: 130px;
}

.sk-w-16 {
    width: 16%;
    min-width: 100px;
}

.sk-w-14 {
    width: 14%;
    min-width: 90px;
}

.sk-card {
    height: 90px;
}

.sk-window-top {
    border-radius: 6px;
}

.sk-window-line {
    border-radius: 6px;
}

.sk-window-line-short {
    width: 72%;
}

.sk-row {
    min-height: 36px;
}

@keyframes dashboard-skeleton-shimmer {
    100% {
        transform: translateX(100%);
    }
}

.dashboard-content .module-box {
    margin-top: 0;
    min-height: calc(100vh - 140px);
}

.dashboard-frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    border-radius: 6px;
    box-shadow: none;
}

.module-box p {
    margin: 8px 0;
}

.module-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.module-title-row h1,
.module-title-row .auth-title {
    margin: 0;
    min-width: 0;
    flex: 1 1 auto;
}

.module-title-row .btn {
    white-space: nowrap;
}

.btn-back-icon {
    width: 40px;
    min-width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 999px;
    font-size: 18px;
    line-height: 1;
}

.user-list-box {
    padding: 15px;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 14px 0;
}

.filter-grid .actions {
    margin-top: 28px;
}

.user-filter-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: end;
}

.user-filter-grid .field {
    margin-bottom: 0;
}

.user-filter-grid .user-actions {
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.company-filter-grid {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto;
    gap: 10px;
    margin: 14px 0;
    align-items: end;
}

.company-filter-grid .field {
    margin-bottom: 0;
}

.company-actions {
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

body.crm-history-page {
    min-height: 100vh;
    height: 100vh;
    overflow: hidden;
}

body.crm-history-page #crm-app {
    height: 100vh;
    padding-top: 10px;
    padding-bottom: 10px;
    overflow: hidden;
}

body.crm-history-page #crm-app > .module-box {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.crm-layout {
    display: grid;
    grid-template-columns: minmax(220px, 0.9fr) minmax(320px, 1.2fr) minmax(0, 2fr);
    gap: 16px;
    align-items: stretch;
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
}

.crm-layout > * {
    min-width: 0;
}

.crm-side {
    padding: 14px;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    font-size: 13px;
}

.crm-middle {
    padding: 14px;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-size: 13px;
    gap: 12px;
}

.crm-right {
    padding: 14px;
    min-height: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 12px;
    overflow: hidden;
    min-width: 0;
    font-size: 13px;
}

.crm-subtitle {
    margin: 0 0 10px;
    color: #0c567e;
    font-size: 13px;
}

.crm-side label,
.crm-middle label,
.crm-side input,
.crm-middle input,
.crm-middle textarea,
.crm-side .crm-search-meta,
.crm-middle .crm-selected-client p,
.crm-middle .crm-latest-title,
.crm-middle .crm-latest-text {
    font-size: 13px;
}

.crm-side .crm-search-name,
.crm-middle .crm-selected-client h3,
.crm-middle .crm-latest h3 {
    font-size: 13px;
}

.crm-search-results {
    margin: 0;
    padding: 0;
    list-style: none;
    border: 1px solid #cbe7f8;
    border-radius: 12px;
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow: auto;
    background: #fff;
}

.crm-search-results li + li {
    border-top: 1px solid #edf7ff;
}

.crm-search-btn {
    width: 100%;
    border: 0;
    background: #fff;
    text-align: left;
    cursor: pointer;
    padding: 10px 12px;
    color: #08324A;
}

.crm-search-btn:hover,
.crm-search-btn:focus {
    background: #EBF7FF;
    outline: none;
}

.crm-search-name {
    display: block;
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 2px;
}

.crm-search-meta {
    display: block;
    font-size: 12px;
    color: #25556f;
}

.crm-search-empty {
    padding: 10px 12px;
    color: #506979;
    font-size: 13px;
}

.crm-selected-client {
    border: 1px solid #cbe7f8;
    border-radius: 12px;
    padding: 10px 12px;
    background: #f7fcff;
}

.crm-selected-client h3 {
    margin: 0;
    font-size: 14px;
}

.crm-selected-client p {
    margin: 4px 0 0;
    font-size: 12px;
    color: #325a70;
}

.crm-selected-client.is-empty {
    border-style: dashed;
    color: #506979;
}

.crm-form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    align-items: start;
    margin-bottom: 12px;
}

.crm-form-row textarea {
    min-height: 84px;
}

#crm-save-btn {
    justify-self: end;
    align-self: end;
}

.crm-feedback {
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 13px;
    margin-bottom: 10px;
    display: none;
}

.crm-feedback.is-visible {
    display: block;
}

.crm-feedback.is-error {
    background: #fff2f2;
    color: #8a1721;
    border: 1px solid #f7c5cb;
}

.crm-feedback.is-ok {
    background: #f1fbf2;
    color: #1f6e2a;
    border: 1px solid #ccefd1;
}

#crm-comment-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.crm-latest {
    border: 1px solid #cbe7f8;
    border-radius: 12px;
    background: linear-gradient(180deg, #f6fcff 0%, #EBF7FF 100%);
    padding: 12px;
}

.crm-latest h3 {
    margin: 0 0 10px;
    font-size: 14px;
}

.crm-latest-empty {
    font-size: 13px;
    color: #4a6779;
}

.crm-latest-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid #d5ebf8;
}

.crm-latest-row {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 8px;
    align-items: start;
    min-width: 0;
}

.crm-latest-row + .crm-latest-row {
    padding-top: 8px;
    border-top: 1px solid #dbeef9;
}

.crm-latest-label {
    font-size: 12px;
    font-weight: 700;
    color: #2d5b73;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.crm-latest-value {
    min-width: 0;
    font-size: 13px;
    font-weight: 700;
    color: #08324A;
    word-break: break-word;
}

.crm-latest-type {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.crm-latest-text {
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 14px;
    line-height: 1.45;
    padding-top: 10px;
    border-top: 1px solid #cfe7f7;
    color: #08324A;
}

.crm-latest-title {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 6px;
    color: #08324A;
}

.crm-comment-title {
    display: block;
    font-weight: 700;
    margin-bottom: 4px;
    color: #08324A;
}

.crm-type-cell {
    white-space: normal;
}

.crm-th-stack {
    display: inline-flex;
    flex-direction: column;
    line-height: 1.05;
}

.crm-date-cell {
    white-space: normal;
    line-height: 1.12;
}

.crm-date-main {
    display: block;
    font-weight: 700;
}

.crm-date-time {
    display: block;
    font-size: 12px;
    color: #315a6f;
    margin-top: 1px;
}

.crm-filters {
    display: grid;
    grid-template-columns: 151px 151px minmax(110px, 0.8fr) 138px auto;
    align-items: end;
    gap: 8px;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

.crm-filters .field {
    min-width: 0;
    margin-bottom: 0;
    box-sizing: border-box;
}

.crm-filter-actions {
    display: flex;
    justify-content: flex-end;
    align-items: end;
    min-width: 0;
    box-sizing: border-box;
}

.crm-filter-actions .btn {
    width: auto;
    white-space: nowrap;
    padding: 8px 10px;
}

.crm-right label,
.crm-right input,
.crm-right select,
.crm-right button,
.crm-right .crm-history-empty,
.crm-right .crm-history-loading,
.crm-right .crm-history-table th,
.crm-right .crm-history-table td {
    font-size: 13px;
}

.crm-right .crm-history-table th,
.crm-right .crm-history-table td {
    padding: 9px 10px;
}

.crm-right .field > label {
    white-space: nowrap;
    font-size: 12px;
}

.crm-right .field input,
.crm-right .field select {
    width: 100%;
    box-sizing: border-box;
    padding: 8px 9px;
    min-width: 0;
}

.crm-right input[type="date"] {
    font-size: 12px;
    min-width: 0;
    padding: 8px 8px;
    padding-right: 18px;
}

#crm-filter-responsable {
    font-size: 12px;
    padding-left: 8px;
    padding-right: 8px;
}

#crm-filter-user-type-id {
    font-size: 12px;
}

#crm-filter-reset {
    padding-left: 12px;
    padding-right: 12px;
}

.crm-history-shell {
    border: 1px solid #cbe7f8;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    flex: 1 1 auto;
    min-height: 0;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.crm-history-scroll {
    height: 100%;
    max-height: 100%;
    overflow-y: auto;
    overflow-x: auto;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

.crm-history-table {
    width: 100%;
    max-width: 100%;
    table-layout: fixed;
    min-width: 0;
    box-sizing: border-box;
    border-collapse: collapse;
}

.crm-history-table th,
.crm-history-table td {
    border-bottom: 1px solid #e2f1fb;
    text-align: left;
    vertical-align: middle;
    overflow-wrap: break-word;
    word-break: normal;
    white-space: normal;
}

.crm-history-table th {
    background: #dcecf8;
    white-space: normal;
}

.crm-history-table th:nth-child(1),
.crm-history-table td:nth-child(1) {
    width: 18%;
}

.crm-history-table th:nth-child(2),
.crm-history-table td:nth-child(2) {
    width: 20%;
}

.crm-history-table th:nth-child(3),
.crm-history-table td:nth-child(3) {
    width: 17%;
}

.crm-history-table th:nth-child(4),
.crm-history-table td:nth-child(4) {
    width: 45%;
}

.crm-history-empty {
    padding: 14px;
    font-size: 13px;
    color: #506979;
}

.crm-status-chip {
    display: inline-flex;
    margin-top: 6px;
    font-size: 11px;
    border-radius: 999px;
    padding: 3px 8px;
    border: 1px solid transparent;
}

.crm-status-pending {
    background: #fff9e8;
    color: #8a6200;
    border-color: #f5d98b;
}

.crm-status-error {
    background: #fff2f2;
    color: #8a1721;
    border-color: #f7c5cb;
}

.crm-comment-cell {
    white-space: pre-wrap;
    overflow-wrap: break-word;
    word-break: break-word;
    line-height: 1.4;
}

.crm-retry-btn {
    margin-top: 6px;
    border: 1px solid #f7c5cb;
    border-radius: 8px;
    background: #fff;
    color: #8a1721;
    font-size: 12px;
    padding: 5px 8px;
    cursor: pointer;
}

.crm-mobile-cell {
    display: none;
}

.crm-scroll-sentinel {
    height: 1px;
}

.crm-history-loading {
    display: none;
    padding: 10px 12px 12px;
    font-size: 12px;
    color: #315a6f;
    text-align: center;
}

.crm-history-loading.is-visible {
    display: block;
}

@media (max-width: 1080px) {
    body.crm-history-page {
        height: auto;
        overflow: auto;
    }

    body.crm-history-page #crm-app {
        height: auto;
        overflow: visible;
    }

    body.crm-history-page #crm-app > .module-box {
        height: auto;
        overflow: visible;
    }

    .crm-layout {
        grid-template-columns: 1fr;
        flex: 1 1 auto;
        overflow: auto;
    }

    .crm-side,
    .crm-middle,
    .crm-right {
        overflow: visible;
    }

    .crm-history-shell {
        min-height: 220px;
    }

    .crm-history-scroll {
        height: auto;
        max-height: none;
        overflow: visible;
    }
}

@media (max-width: 900px) {
    .crm-filters {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .crm-filters .field:nth-child(1),
    .crm-filters .field:nth-child(2),
    .crm-filters .field:nth-child(3),
    .crm-filters .field:nth-child(4),
    .crm-filter-actions {
        flex: initial;
    }

    .crm-filter-actions {
        grid-column: 1 / -1;
    }

    .crm-form-row {
        grid-template-columns: 1fr;
    }

    .crm-latest-row {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .crm-history-table thead {
        display: none;
    }

    .crm-history-table tbody tr {
        display: block;
        border-bottom: 1px solid #e5f2fb;
    }

    .crm-history-table tbody td {
        display: none;
    }

    .crm-history-table tbody .crm-mobile-cell {
        display: block;
        padding: 10px 12px;
        font-size: 13px;
    }

    .crm-mobile-title {
        font-weight: 700;
        margin-bottom: 4px;
    }

    .crm-mobile-meta {
        font-size: 12px;
        color: #385f73;
        margin-bottom: 4px;
    }
}

.companies-table {
    min-width: 1100px;
}

.companies-table td:nth-child(2),
.companies-table td:nth-child(4),
.companies-table td:nth-child(6) {
    min-width: 220px;
}

.company-mobile-cell {
    display: none;
}

.company-mobile-title {
    font-weight: 700;
    margin-bottom: 8px;
}

.cbe-mobile-cell {
    display: none;
}

.cbe-mobile-title {
    font-weight: 700;
    margin-bottom: 8px;
}

.cbe-mobile-action {
    margin-top: 10px;
}

.cbe-mobile-action .btn {
    width: auto;
}

.vur-mobile-cell {
    display: none;
}

.vur-mobile-title {
    font-weight: 700;
    margin-bottom: 8px;
}

.vur-mobile-action {
    margin-top: 10px;
}

.vur-mobile-action .btn {
    width: auto;
}

.garantia-vencida {
    color: #b42318;
    font-weight: 700;
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid #d6ecfa;
    border-radius: 12px;
    background: #fff;
}

.users-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 950px;
}

.users-table th,
.users-table td {
    border-bottom: 1px solid #e2f1fb;
    padding: 8px;
    text-align: left;
    font-size: 14px;
    vertical-align: middle;
    line-height: 1.2;
}

.users-table th {
    background: var(--color-bg-soft);
}

.users-table:not(.chw-grid-table):not(.chw-doc-table) {
    font-family: var(--list-font-family);
}

.users-table:not(.chw-grid-table):not(.chw-doc-table) th,
.users-table:not(.chw-grid-table):not(.chw-doc-table) td {
    padding: var(--list-cell-pad-y) var(--list-cell-pad-x);
    font-size: var(--list-font-size);
    line-height: var(--list-line-height);
}

.users-table:not(.chw-grid-table):not(.chw-doc-table) th {
    font-size: var(--list-header-font-size);
}

.users-table:not(.chw-grid-table):not(.chw-doc-table) .row-actions {
    gap: 5px;
}

.users-table:not(.chw-grid-table):not(.chw-doc-table) .btn-sm {
    padding: var(--list-row-btn-pad-y) var(--list-row-btn-pad-x);
    font-size: var(--list-row-btn-font-size);
    min-height: 26px;
}

.users-table:not(.chw-grid-table):not(.chw-doc-table) .icon-btn {
    min-width: 28px;
    padding: 5px;
}

.users-table.vur-table .row-actions .icon-btn,
.users-table.nube-table .row-actions .icon-btn,
.users-table.cbe-table .row-actions .icon-btn {
    width: 28px;
    height: 28px;
    min-width: 28px;
    font-size: 14px;
}

.users-table.chw-grid-table thead th {
    position: sticky;
    top: 0;
    z-index: 5;
    background: #ebf7ff;
    box-shadow: inset 0 -1px 0 #cfe8f8;
}

.chw-grid-head-float {
    display: none;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 120;
    overflow: hidden;
    border: 1px solid #d6ecfa;
    border-radius: 8px 8px 0 0;
    background: #ebf7ff;
    box-shadow: 0 6px 14px rgba(8, 50, 74, 0.14);
    pointer-events: none;
}

.chw-grid-head-float table {
    margin: 0;
    border-collapse: collapse;
    table-layout: fixed;
    background: #ebf7ff;
}

.chw-grid-head-float thead th {
    pointer-events: auto;
}

.row-disabled {
    background: #fff5f5;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 8px;
}

.status-on {
    background: #e8fff0;
    color: #1f6e3d;
    border: 1px solid #b9edcc;
}

.status-off {
    background: #ffe9e9;
    color: #9a2929;
    border: 1px solid #ffcaca;
}

.row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.vur-table .row-actions .icon-btn {
    width: 32px;
    height: 32px;
    min-width: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    line-height: 1;
}

.vur-table .row-actions form {
    margin: 0;
}

.btn-sm {
    padding: 6px 9px;
    font-size: 12px;
    line-height: 1.1;
}

.icon-btn {
    min-width: 30px;
    padding: 6px;
}

.btn-danger {
    background: #e05555;
    color: #fff;
}

.btn-danger:hover {
    background: #c94343;
}

.pager {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    align-items: center;
}

.pager-summary {
    font-size: 14px;
}

.pager-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pager-page {
    font-size: 14px;
    font-weight: 600;
}

.field small {
    color: #4f7286;
    font-size: 12px;
}

.payment-result {
    background: var(--color-bg-soft);
    border: 1px solid #bee6fb;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 14px;
}

.payment-result label {
    display: block;
    font-size: 14px;
    margin-bottom: 8px;
}

.link-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.link-row input {
    flex: 1 1 auto;
    min-width: 0;
}

.payment-result small {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    color: #4f7286;
}

.licencia-box {
    max-width: 980px;
    margin: 24px auto;
}

.license-group {
    border: 1px solid #d6ecfa;
    border-radius: 12px;
    margin: 12px 0;
    padding: 10px;
}

.license-group legend {
    font-weight: 700;
    font-size: 14px;
    padding: 0 6px;
}

.license-btn-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.license-action-btn {
    min-height: 42px;
    text-align: center;
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    justify-content: stretch;
    gap: 0;
    padding: 0;
    overflow: hidden;
}

.license-action-btn .license-btn-emoji {
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: stretch;
    padding: 0 12px;
    background: #E1F4FF;
    border-right: 1px solid rgba(8, 50, 74, 0.12);
    font-size: 1.28em;
    line-height: 1;
    color: #09A7FF;
}

.license-action-btn .license-btn-caption {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding: 10px 12px;
    line-height: 1.2;
    color: var(--color-white);
}

.serie-panel,
.history-panel {
    margin-top: 14px;
    background: #f9fdff;
    border: 1px solid #d6ecfa;
    border-radius: 12px;
    padding: 12px;
}

.serie-panel h2,
.history-panel h2 {
    margin: 0 0 8px;
    font-size: 16px;
}

.serie-output {
    background: #111;
    color: #fff;
    border-radius: 10px;
    min-height: 86px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Courier New", Courier, monospace;
    font-size: 30px;
    letter-spacing: 2px;
    padding: 10px;
    text-align: center;
    word-break: break-all;
}

.history-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 6px;
}

.history-list li {
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 14px;
    border: 1px solid #dceefa;
    background: #fff;
}

.history-ok {
    color: #0e5730;
}

.history-error {
    color: #8e2727;
    background: #fff3f3;
    border-color: #ffd2d2;
}

.share-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999;
    background: rgba(8, 50, 74, 0.45);
    align-items: center;
    justify-content: center;
    padding: 14px;
    overflow-y: auto;
}

.share-modal-card {
    width: 100%;
    max-width: 520px;
    background: #fff;
    border-radius: 14px;
    padding: 16px;
}

.share-modal-card h3 {
    margin: 0 0 8px;
}

.share-modal-card p {
    margin: 0 0 10px;
}

.share-modal-card textarea {
    width: 100%;
    border: 1px solid #cbe7f8;
    border-radius: 10px;
    padding: 10px;
    min-height: 86px;
    resize: vertical;
}

.firma-modal-card {
    max-width: 620px;
    max-height: calc(100vh - 28px);
    overflow-y: auto;
    overscroll-behavior: contain;
}

@supports (height: 100dvh) {
    .firma-modal-card {
        max-height: calc(100dvh - 28px);
    }
}

.firma-modal-card h3 {
    margin: 0 0 8px;
}

.firma-modal-card p {
    margin: 0 0 10px;
}

.firma-readonly input[readonly] {
    background: #f3fbff;
    color: #08324A;
    border-color: #bfe6fa;
}

.actions {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.control-box {
    padding: 15px;
}

.ce-kpi-grid {
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.ce-kpi-card {
    background: linear-gradient(180deg, #ffffff, #f6fcff);
    border: 1px solid #d5edfb;
    border-radius: 14px;
    padding: 12px;
}

.ce-kpi-card h3 {
    margin: 0;
    font-size: 14px;
}

.ce-kpi-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.ce-kpi-value {
    margin: 8px 0 0;
    font-size: 26px;
    font-weight: 700;
    color: var(--color-dark);
}

.ce-kpi-value-row {
    margin-top: 8px;
    display: grid;
    grid-template-columns: auto auto;
    align-items: center;
    gap: 10px;
}

.ce-kpi-value-row .ce-kpi-value {
    margin: 0;
}

.ce-inline-form {
    margin: 0;
    display: inline-flex;
    justify-self: end;
}

.ce-inline-form .btn {
    width: auto;
    white-space: nowrap;
}

.ce-kpi-ok {
    background: linear-gradient(180deg, #f4fff8, #edfff4);
    border-color: #ccefd9;
}

.ce-kpi-bad {
    background: linear-gradient(180deg, #fff7f7, #fff3f3);
    border-color: #ffd5d5;
}

.ce-chart-grid {
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.ce-chart-card {
    padding: 14px;
    border: 1px solid #d5edfb;
}

.ce-chart-card h2 {
    margin: 0 0 10px;
    font-size: 17px;
}

.ce-donut-row {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 16px;
    align-items: center;
}

.ce-donut {
    width: 170px;
    height: 170px;
    border-radius: 50%;
    position: relative;
    display: grid;
    place-items: center;
}

.ce-donut::before {
    content: '';
    width: 116px;
    height: 116px;
    border-radius: 50%;
    background: #fff;
    box-shadow: inset 0 0 0 1px #d6ecfa;
}

.ce-donut span,
.ce-donut small {
    position: absolute;
    color: var(--color-dark);
}

.ce-donut span {
    font-size: 24px;
    font-weight: 700;
    top: 62px;
}

.ce-donut small {
    top: 93px;
    font-size: 12px;
    color: #4f7286;
}

.ce-legend {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 8px;
    font-size: 14px;
}

.ce-legend li {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ce-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    display: inline-block;
}

.ce-dot-cola {
    background: #09A7FF;
}

.ce-dot-ok {
    background: #25b05d;
}

.ce-dot-error {
    background: #e05555;
}

.ce-bars {
    display: grid;
    gap: 8px;
}

.ce-bar-row {
    display: grid;
    grid-template-columns: minmax(120px, 180px) 1fr 44px;
    align-items: center;
    gap: 8px;
}

.ce-bar-label {
    font-size: 12px;
    color: #4f7286;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ce-bar-track {
    width: 100%;
    height: 11px;
    border-radius: 999px;
    background: #dff1fc;
    overflow: hidden;
}

.ce-bar-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #09A7FF, #08324A);
}

.ce-bar-value {
    text-align: right;
    font-size: 12px;
    font-weight: 700;
}

.ce-tab-row {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ce-table-card {
    margin-top: 12px;
    padding: 12px;
    border: 1px solid #d5edfb;
}

.ce-mini-title h2 {
    margin: 0;
    font-size: 18px;
}

.ce-count-chip {
    background: var(--color-bg-soft);
    border: 1px solid #bee6fb;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 700;
}

.ce-mobile-cell {
    display: none;
}

.ce-mobile-title {
    font-weight: 700;
    margin-bottom: 8px;
}

.ce-mobile-action {
    margin-top: 10px;
}

.ce-mobile-action .btn {
    width: auto;
}

.nube-filter-grid {
    display: grid;
    grid-template-columns: 120px 170px minmax(200px, 1fr) minmax(200px, 1fr) auto auto;
    gap: 12px;
    margin: 16px 0;
    align-items: end;
}

.nube-filter-grid .field {
    margin-bottom: 0;
}

.nube-actions {
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
}

.nube-actions .btn {
    white-space: nowrap;
}

.nube-table {
    min-width: 1480px;
}

.nube-table .row-actions {
    flex-wrap: nowrap;
    align-items: center;
}

.nube-table .row-actions form {
    margin: 0;
}

@media (min-width: 641px) {
    .nube-table th.nube-actions-col,
    .nube-table td.nube-actions-col {
        position: sticky;
        right: 0;
        z-index: 3;
        background: #ffffff;
        width: 1%;
        white-space: nowrap;
    }

    .nube-table th.nube-actions-col {
        z-index: 4;
        box-shadow: -6px 0 8px -6px rgba(8, 50, 74, 0.25);
    }

    .nube-table td.nube-actions-col {
        box-shadow: -6px 0 8px -6px rgba(8, 50, 74, 0.2);
        min-width: max-content;
    }
}

.nube-row-problema {
    background: #fff1f1;
}

.nube-fecha-problema,
.nube-respaldo-atrasado {
    background: #b42318;
    color: #fff;
    font-weight: 700;
    border-radius: 6px;
    padding: 2px 6px;
    white-space: nowrap;
}

.control-edit-modal-card {
    max-width: 620px;
}

.nube-mobile-cell {
    display: none;
}

.nube-mobile-title {
    font-weight: 700;
    margin-bottom: 8px;
}

.nube-mobile-action-row {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.nube-mobile-action-row .btn {
    width: auto;
}

.visor-table {
    min-width: 720px;
}

.visor-mobile-cell {
    display: none;
}

.visor-mobile-title {
    font-weight: 700;
    margin-bottom: 8px;
}

.visor-mobile-action {
    margin-top: 10px;
}

.visor-mobile-action .btn {
    width: auto;
}

.vee-filter-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
    gap: 12px;
    margin: 16px 0;
    align-items: end;
}

.vee-filter-grid .field {
    margin-bottom: 0;
}

.cfe-filter-grid {
    display: grid;
    grid-template-columns: 130px minmax(170px, 230px) 130px 150px auto;
    gap: 10px;
    margin: 16px 0;
    align-items: end;
}

.cfe-filter-grid .field {
    margin-bottom: 0;
}

.cfe-actions {
    margin-top: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: nowrap;
    justify-self: end;
}

.cfe-actions .btn {
    white-space: nowrap;
}

.vee-actions {
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.vee-general-actions {
    margin-top: 8px;
}

.vee-total-box {
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.vee-total-box label {
    margin: 0;
}

.vee-total-value {
    margin-left: auto;
    text-align: right;
    font-size: 34px;
    line-height: 1;
    font-weight: 800;
    color: var(--color-dark);
}

.vee-table {
    min-width: 1180px;
}

.vee-table .row-actions {
    flex-wrap: nowrap;
    align-items: center;
}

.vee-table .row-actions form {
    margin: 0;
}

.vee-table .row-actions .vee-action-btn,
.vee-mobile-action-row .vee-action-btn {
    width: auto;
    height: 38px;
    min-height: 38px;
    white-space: nowrap;
}

.vee-table .row-actions .vee-action-btn.icon-btn,
.vee-mobile-action-row .vee-action-btn.icon-btn {
    width: 38px;
    min-width: 38px;
    padding: 0;
    line-height: 1;
}

.sheyla-web-page .sheyla-web-main {
    padding-top: 8px;
}

.sheyla-web-page .module-box.user-list-box {
    margin-top: 0;
}

.vee-col-right {
    text-align: right;
}

.vee-docs-bold {
    font-weight: 700;
}

.vee-monto-muted {
    color: #8ea2b0;
}

.vee-fecha-cortada {
    background: #b42318;
    color: #fff;
    font-weight: 700;
    border-radius: 6px;
    padding: 2px 6px;
}

.vee-table tbody tr.vee-row-eliminada > td {
    background: #fff1f1;
    color: #8f1f1f;
    border-color: #f2c8c8;
}

.vee-table tbody tr.vee-row-eliminada .vee-fecha-cortada {
    background: #8f1f1f;
    color: #ffffff;
}

.vee-mobile-cell {
    display: none;
}

.vee-mobile-title {
    font-weight: 700;
    margin-bottom: 8px;
}

.vee-mobile-action-row {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.vee-mobile-action-row .btn {
    width: auto;
}

.app-filter-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr)) auto;
    gap: 12px;
    margin: 16px 0;
    align-items: end;
}

.app-filter-grid .field {
    margin-bottom: 0;
}

.app-actions {
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.app-table {
    min-width: 1320px;
}

.app-table .row-actions {
    flex-wrap: nowrap;
}

.app-actions-col {
    min-width: 210px;
}

.app-action-btn {
    width: auto;
    white-space: nowrap;
}

.app-modal-card {
    max-width: 640px;
}

.app-periodo-head {
    display: grid;
    gap: 6px;
    border: 1px solid #d6ecfa;
    background: #f5fcff;
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 12px;
}

.app-periodo-quick {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.app-mobile-cell {
    display: none;
}

.app-mobile-title {
    font-weight: 700;
    margin-bottom: 8px;
}

.app-mobile-action-row {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

@media (min-width: 641px) {
    .app-table th.app-actions-col,
    .app-table td.app-actions-col {
        position: sticky;
        right: 0;
        z-index: 3;
        background: #ffffff;
    }

    .app-table th.app-actions-col {
        z-index: 4;
        box-shadow: -6px 0 8px -6px rgba(8, 50, 74, 0.25);
    }

    .app-table td.app-actions-col {
        box-shadow: -6px 0 8px -6px rgba(8, 50, 74, 0.2);
        min-width: 210px;
    }
}

.cxml-filter-grid {
    display: grid;
    grid-template-columns: 170px minmax(250px, 1fr) 180px auto;
    gap: 12px;
    margin: 16px 0;
    align-items: end;
}

.cxml-filter-grid .field {
    margin-bottom: 0;
}

.cxml-actions {
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.cxml-table {
    min-width: 1120px;
}

.cxml-table td:last-child {
    white-space: nowrap;
}

.cxml-mobile-cell {
    display: none;
}

.cxml-mobile-title {
    font-weight: 700;
    margin-bottom: 8px;
}

.cxml-mobile-action {
    margin-top: 10px;
}

.cxml-mobile-action .btn {
    width: auto;
}

.cxml-visor-box {
    padding-bottom: 16px;
}

.cxml-visor-actions {
    margin-top: 6px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.cxml-current-ruta {
    border: 1px solid #cbe7f8;
    background: #f2fbff;
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 12px;
    color: #2e5970;
}

.cxml-breadcrumbs {
    margin: 6px 0 12px;
    font-size: 14px;
}

.cxml-breadcrumbs a {
    color: #0b66c3;
}

.cxml-breadcrumbs a:hover {
    text-decoration: underline;
}

.cxml-visor-table {
    min-width: 980px;
}

.cxml-visor-table td:nth-child(3) {
    word-break: break-all;
}

.cxml-visor-table .row-actions {
    flex-wrap: wrap;
}

.vg-filter-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 16px 0;
    align-items: end;
}

.vg-filter-grid .field {
    margin-bottom: 0;
}

.vg-actions {
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    grid-column: 1 / -1;
}

.vg-total-inline {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #bfe6fa;
    background: #f2fbff;
    border-radius: 12px;
    padding: 8px 12px;
    min-height: 42px;
}

.vg-total-inline-label {
    font-size: 12px;
    font-weight: 700;
    color: #3f6376;
}

.vg-total-inline-value {
    font-size: 18px;
    line-height: 1;
    color: var(--color-dark);
}

.vg-table {
    min-width: 1220px;
    width: 100%;
    table-layout: fixed;
}

.vg-table th,
.vg-table td {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.25;
}

.vg-table th.vg-col-num,
.vg-table td.vg-col-num {
    text-align: right !important;
}

.vg-table th.vg-col-cliente,
.vg-table td.vg-col-cliente {
    width: 190px;
    max-width: 190px;
}

.vg-table th.vg-col-producto,
.vg-table td.vg-col-producto {
    width: 200px;
    max-width: 200px;
}

.vg-scroll-top {
    display: none;
    overflow-x: auto;
    overflow-y: hidden;
    height: 14px;
    margin: 8px 0 6px;
    border: 1px solid #d6ecfa;
    border-radius: 8px;
    background: #f8fdff;
}

.vg-scroll-top-inner {
    height: 1px;
}

.vg-table th:nth-child(1),
.vg-table td:nth-child(1) {
    width: 108px;
}

.vg-table th:nth-child(2),
.vg-table td:nth-child(2) {
    width: 92px;
}

.vg-table th:nth-child(3),
.vg-table td:nth-child(3) {
    width: 76px;
}

.vg-table th:nth-child(4),
.vg-table td:nth-child(4) {
    width: 96px;
}

.vg-table th:nth-child(5),
.vg-table td:nth-child(5) {
    width: 98px;
}

.vg-table th:nth-child(6),
.vg-table td:nth-child(6) {
    width: 108px;
}

.vg-table th:nth-child(8),
.vg-table td:nth-child(8) {
    width: 72px;
}

.vg-table th:nth-child(10),
.vg-table td:nth-child(10) {
    width: 112px;
}

.vg-mobile-cell {
    display: none;
}

.vg-mobile-title {
    font-weight: 700;
    margin-bottom: 8px;
}

.ch-filter-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
    margin: 16px 0;
    align-items: end;
}

.ch-filter-grid .field {
    margin-bottom: 0;
}

.ch-actions {
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    grid-column: 1 / -1;
}

.ch-auto-refresh {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #3f6376;
    border: 1px solid #bfe6fa;
    border-radius: 999px;
    padding: 8px 12px;
    background: #f2fbff;
}

.ch-auto-refresh input {
    width: auto;
    margin: 0;
}

.ch-kpi-row {
    margin: 8px 0 14px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.ch-kpi-item {
    border: 1px solid #d6ecfa;
    border-radius: 12px;
    padding: 10px 12px;
    background: #f8fdff;
}

.ch-kpi-item span {
    display: block;
    font-size: 12px;
    color: #4f7286;
    margin-bottom: 4px;
}

.ch-kpi-item strong {
    font-size: 20px;
    line-height: 1.1;
}

.ch-table {
    min-width: 1880px;
}

.ch-table th,
.ch-table td {
    white-space: nowrap;
}

.ch-col-num {
    text-align: right !important;
}

.ch-mobile-cell {
    display: none;
}

.ch-mobile-title {
    font-weight: 700;
    margin-bottom: 8px;
}

.chw-filter-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
    margin: 16px 0;
    align-items: end;
}

.chw-filter-grid .field {
    margin-bottom: 0;
}

.chw-vendedor-picker {
    display: flex;
    align-items: center;
    gap: 6px;
}

.chw-vendedor-picker select {
    flex: 1 1 auto;
    min-width: 0;
}

.chw-vendedor-search {
    min-width: 32px;
    width: 32px;
    padding-left: 0;
    padding-right: 0;
}

.chw-actions {
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    grid-column: 1 / -1;
}

.chw-grid-table {
    min-width: 0;
    width: 100%;
    table-layout: fixed;
}

.chw-grid-table th,
.chw-grid-table td {
    font-size: 12px;
    line-height: 1.28;
    padding: 5px 5px;
    white-space: nowrap;
}

.chw-grid-table th {
    overflow: hidden;
    text-overflow: ellipsis;
}

.chw-grid-table thead th {
    position: sticky;
    top: 0;
    z-index: 4;
}

.chw-grid-table tbody tr:nth-child(even) td {
    background: #f7fcff;
}

.chw-grid-table tbody tr:hover td {
    background: #eaf7ff;
}

.chw-grid-table .ch-col-num {
    text-align: right !important;
}

.chw-grid-table .ch-col-center {
    text-align: center !important;
}

.chw-grid-table .btn-link {
    border: none;
    background: transparent;
    color: #08324A;
    cursor: pointer;
    padding: 0;
    font-size: 12px;
    line-height: 1;
}

.chw-grid-table .btn-link:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.chw-grid-table .ch-toggle {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    border: 1px solid #9ec4d8;
    background: #ffffff;
    display: inline-block;
    position: relative;
    transition: background-color 0.16s ease, border-color 0.16s ease, transform 0.12s ease;
    vertical-align: middle;
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
    color: #1f9e4d;
    padding: 0;
}

.chw-grid-table .ch-toggle[data-state="1"] {
    background: #f2fff7;
    border-color: #3abf67;
    color: #1e9c4b;
}

.chw-grid-table .ch-toggle:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(8, 50, 74, 0.12);
}

.chw-grid-table td.chw-toggle-pending {
    box-shadow: inset 0 0 0 999px rgba(9, 167, 255, 0.14);
    transition: box-shadow 0.12s ease-out;
}

.chw-grid-table td.chw-cell-dim {
    color: #8a95a0 !important;
}

.chw-grid-table td.chw-cell-alert {
    color: #c62828 !important;
    font-weight: 700;
}

.chw-grid-table th[data-col="0"],
.chw-grid-table td[data-col="0"] {
    width: 68px;
    max-width: 68px;
}

.chw-grid-table th[data-col="1"],
.chw-grid-table td[data-col="1"] {
    width: 42px;
    max-width: 42px;
}

.chw-grid-table th[data-col="2"],
.chw-grid-table td[data-col="2"] {
    width: 72px;
    max-width: 72px;
}

.chw-grid-table th[data-col="3"],
.chw-grid-table td[data-col="3"] {
    width: 62px;
    max-width: 62px;
}

.chw-grid-table th[data-col="4"],
.chw-grid-table td[data-col="4"] {
    width: 66px;
    max-width: 66px;
}

.chw-grid-table th[data-col="5"],
.chw-grid-table td[data-col="5"] {
    width: 88px;
    max-width: 88px;
}

.chw-grid-table th[data-col="6"],
.chw-grid-table td[data-col="6"] {
    width: 96px;
    max-width: 96px;
}

.chw-grid-table th[data-col="7"],
.chw-grid-table td[data-col="7"],
.chw-grid-table th[data-col="8"],
.chw-grid-table td[data-col="8"],
.chw-grid-table th[data-col="9"],
.chw-grid-table td[data-col="9"],
.chw-grid-table th[data-col="10"],
.chw-grid-table td[data-col="10"],
.chw-grid-table th[data-col="11"],
.chw-grid-table td[data-col="11"],
.chw-grid-table th[data-col="12"],
.chw-grid-table td[data-col="12"],
.chw-grid-table th[data-col="13"],
.chw-grid-table td[data-col="13"],
.chw-grid-table th[data-col="14"],
.chw-grid-table td[data-col="14"],
.chw-grid-table th[data-col="15"],
.chw-grid-table td[data-col="15"],
.chw-grid-table th[data-col="16"],
.chw-grid-table td[data-col="16"],
.chw-grid-table th[data-col="17"],
.chw-grid-table td[data-col="17"] {
    width: 56px;
    max-width: 56px;
}

.chw-grid-table th[data-col="18"],
.chw-grid-table td[data-col="18"],
.chw-grid-table th[data-col="19"],
.chw-grid-table td[data-col="19"] {
    width: 32px;
    max-width: 32px;
}

.chw-grid-table td[data-col="0"],
.chw-grid-table td[data-col="5"],
.chw-grid-table td[data-col="6"] {
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 11px;
}

.chw-grid-table td[data-col="2"] .ch-open-doc {
    display: inline;
    color: #0b5ea8;
    text-decoration-line: underline !important;
    text-underline-offset: 2px;
    font-weight: 400;
    cursor: pointer;
}

.chw-grid-table td[data-col="2"] .ch-open-doc:hover {
    color: #08324A;
}

.chw-grid-table td.chw-clickable-cell {
    color: #0b5ea8;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

.chw-row-total td {
    background: #08324A !important;
    color: #ffffff;
    font-weight: 700;
}

.chw-row-total td.chw-cell-dim {
    color: #ffffff !important;
}

.chw-row-total td.chw-cell-alert {
    color: #ffffff !important;
}

.chw-row-count td {
    background: #E1F4FF !important;
    color: #08324A;
    font-weight: 700;
}

.chw-label8 {
    margin-top: 12px;
    font-size: 18px;
    font-weight: 700;
    color: #08324A;
}

.chw-actions .chw-label8 {
    margin-top: 0;
    margin-left: auto;
    font-size: 14px;
    white-space: nowrap;
}

.chw-kpi-cards {
    margin-left: auto;
    display: flex;
    align-items: stretch;
    gap: 8px;
    flex-wrap: wrap;
}

.chw-kpi-card {
    background: #E1F4FF;
    border: 1px solid #b9e2ff;
    border-radius: 10px;
    padding: 6px 10px;
    min-width: 180px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.chw-kpi-title {
    font-size: 11px;
    color: #2e5970;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .2px;
}

.chw-kpi-value {
    margin-top: 2px;
    font-size: 15px;
    line-height: 1.1;
    color: #08324A;
    text-align: right;
    display: block;
    font-variant-numeric: tabular-nums;
}

.chw-vendor-modal-card {
    max-width: 560px;
}

.chw-vendor-modal-body {
    display: grid;
    gap: 10px;
}

.chw-vendor-list {
    max-height: 50vh;
    overflow: auto;
    border: 1px solid #d6ecfa;
    border-radius: 10px;
    background: #f8fdff;
    padding: 6px;
}

.chw-vendor-option {
    display: block;
    width: 100%;
    text-align: left;
    border: 1px solid #cbe7f8;
    background: #ffffff;
    color: #08324A;
    border-radius: 8px;
    padding: 8px 10px;
    margin-bottom: 6px;
    cursor: pointer;
}

.chw-vendor-option:last-child {
    margin-bottom: 0;
}

.chw-vendor-option:hover {
    background: #eaf7ff;
    border-color: #09A7FF;
}

.chw-vendor-empty {
    color: #5b7486;
    padding: 8px;
    font-size: 13px;
}

.chw-modal-card {
    max-width: 1100px;
}

.chw-modal-body {
    max-height: 72vh;
    overflow: auto;
    padding-right: 4px;
}

.chw-doc-sheet {
    border: 1px solid #d6ecfa;
    border-radius: 12px;
    background: #ffffff;
    padding: 12px;
}

.chw-doc-head {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 10px;
}

.chw-doc-chip {
    background: #ebf7ff;
    border: 1px solid #d3ebf9;
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 13px;
}

.chw-doc-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 10px;
}

.chw-doc-meta > div {
    border: 1px solid #d8edf9;
    border-radius: 10px;
    background: #f7fcff;
    padding: 8px 10px;
}

.chw-doc-meta span {
    display: block;
    color: #4d6f83;
    font-size: 12px;
    margin-bottom: 2px;
}

.chw-doc-meta strong {
    color: #08324A;
    font-size: 13px;
}

.chw-doc-table {
    min-width: 700px;
    margin-bottom: 0;
}

.chw-doc-table th.ch-num,
.chw-doc-table td.ch-num {
    text-align: right !important;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.chw-doc-table tfoot td {
    background: #f8fcff !important;
    border-top: 1px solid #dbeef9;
    white-space: nowrap;
    line-height: 1.2;
}

.chw-doc-table .chw-doc-total-label {
    font-weight: 700;
    color: #08324A;
    text-align: right;
    white-space: nowrap;
}

.chw-doc-table .chw-doc-total-value {
    font-weight: 700;
    color: #08324A;
    white-space: nowrap;
    min-width: 130px;
}

.chw-doc-table .chw-doc-total-row .chw-doc-total-label,
.chw-doc-table .chw-doc-total-row .chw-doc-total-value {
    background: #e1f4ff !important;
    color: #06273b;
}

.chw-doc-table th:nth-child(5),
.chw-doc-table td:nth-child(5) {
    min-width: 110px;
}

.chw-doc-table th:nth-child(6),
.chw-doc-table td:nth-child(6) {
    min-width: 130px;
}

.chw-doc-obs {
    margin-top: 10px;
    border: 1px solid #d6ecfa;
    border-radius: 10px;
    padding: 10px;
    background: #f8fdff;
}

.chw-obs-pre {
    margin: 0;
    white-space: pre-wrap;
    font-family: Consolas, "Courier New", monospace;
    font-size: 13px;
    color: #0b3148;
}

.chw-obs-card {
    border: 1px solid #d6ecfa;
    border-radius: 12px;
    background: #ffffff;
    padding: 12px;
}

.chw-obs-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 10px;
}

.chw-obs-grid > div {
    border: 1px solid #d8edf9;
    border-radius: 10px;
    background: #f7fcff;
    padding: 8px 10px;
}

.chw-obs-grid span {
    display: block;
    color: #4d6f83;
    font-size: 12px;
    margin-bottom: 2px;
}

.chw-obs-grid strong {
    color: #08324A;
    font-size: 13px;
}

.chw-obs-block {
    border: 1px solid #d6ecfa;
    border-radius: 10px;
    padding: 10px;
    background: #f8fdff;
}

.chw-obs-block h4 {
    margin: 0 0 8px;
    color: #08324A;
    font-size: 13px;
}

.chw-codes-modal-card {
    max-width: 860px;
    width: min(92vw, 860px);
    max-height: 88vh;
    overflow: hidden;
}

.chw-codes-modal-body {
    display: grid;
    gap: 10px;
    max-height: calc(88vh - 92px);
}

.chw-codes-help {
    margin: 0;
    color: #3f6378;
    font-size: 13px;
}

.chw-codes-modal-card .chw-codes-text {
    width: 100%;
    min-height: 64vh;
    height: 64vh;
    max-height: calc(88vh - 190px);
    border: 1px solid #cfe7f7;
    border-radius: 10px;
    background: #f8fcff;
    color: #08324A;
    font-family: Consolas, "Courier New", monospace;
    font-size: 13px;
    line-height: 1.4;
    padding: 10px;
    resize: vertical;
}

.chw-codes-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.chw-save-toast {
    display: none;
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 1200;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #cfe7f7;
    background: #ffffff;
    color: #08324A;
    box-shadow: 0 8px 20px rgba(8, 50, 74, 0.18);
    font-size: 13px;
}

.chw-save-toast.is-ok {
    border-color: #a7e0bb;
    background: #ecfff3;
    color: #0d6a34;
}

.chw-save-toast.is-error {
    border-color: #f1bbbb;
    background: #fff1f1;
    color: #8d2525;
}

@media (max-width: 760px) {
    .chw-doc-head,
    .chw-doc-meta,
    .chw-obs-grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 641px) {
    .vee-table th.vee-actions-col,
    .vee-table td.vee-actions-col {
        position: sticky;
        right: 0;
        z-index: 3;
        background: #ffffff;
        width: 1%;
        white-space: nowrap;
    }

    .vee-table th.vee-actions-col {
        z-index: 4;
        box-shadow: -6px 0 8px -6px rgba(8, 50, 74, 0.25);
    }

    .vee-table td.vee-actions-col {
        box-shadow: -6px 0 8px -6px rgba(8, 50, 74, 0.2);
        min-width: max-content;
    }
}

@media (max-width: 980px) {
    .dashboard-page {
        overflow-x: hidden;
        overflow-y: auto;
    }

    .auth-page .auth-wrap.auth-wrap-single {
        max-width: 560px;
        padding: 18px 16px 22px;
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .menu-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ce-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ce-chart-grid {
        grid-template-columns: 1fr;
    }

    .vg-total-inline {
        width: 100%;
        justify-content: space-between;
    }

    .dashboard-main.dashboard-split {
        flex-direction: column;
        height: auto;
    }

    .dashboard-master-toggle {
        width: 100%;
        min-width: 0;
        min-height: 44px;
        height: 44px;
        border-radius: 12px;
        padding: 0 14px;
        justify-content: center;
        gap: 8px;
        font-size: 14px;
        font-weight: 700;
        border-color: #74c9f4;
        background: linear-gradient(180deg, #ffffff 0%, #d8f1ff 100%);
        color: #075885;
        touch-action: manipulation;
        margin-top: 14px;
        margin-bottom: 10px;
        position: static;
        top: auto;
    }

    .dashboard-master-toggle-icon {
        font-size: 16px;
    }

    .dashboard-main.dashboard-split .dashboard-master-toggle::after {
        content: "Ocultar menu";
    }

    .dashboard-main.dashboard-split.is-menu-collapsed .dashboard-master-toggle::after {
        content: "Mostrar menu";
    }

    .dashboard-sidebar {
        width: 100%;
        min-width: 0;
        height: auto;
        max-height: none;
        position: static;
        overflow: visible;
        opacity: 1;
        padding: 4px 6px 6px 2px;
    }

    .dashboard-ribbon-list {
        gap: 6px;
    }

    .dashboard-group-toggle {
        min-height: 44px;
        font-size: 16px;
        padding: 9px 10px;
        border-radius: 10px;
    }

    .dashboard-group-emoji {
        font-size: 1.18em;
    }

    .dashboard-option-list a {
        min-height: 46px;
        font-size: 16px;
        border-radius: 10px;
    }

    .dashboard-btn-emoji {
        padding: 0 10px;
        font-size: 1.18em;
    }

    .dashboard-btn-caption {
        padding: 10px 9px;
    }

    .dashboard-split.is-menu-collapsed .dashboard-sidebar {
        width: 100%;
        min-width: 0;
        height: 0;
        padding: 0;
        overflow: hidden;
        opacity: 0;
    }

    .dashboard-split.is-menu-collapsed .dashboard-master-toggle {
        position: sticky;
        top: 122px;
        z-index: 14;
        width: 100%;
        min-width: 0;
        min-height: 46px;
        height: 46px;
        border-radius: 14px;
        box-shadow: 0 10px 22px rgba(8, 50, 74, 0.22);
        background: linear-gradient(180deg, #ffffff 0%, #ccecff 100%);
    }

    .dashboard-content .module-box {
        min-height: auto;
    }

    .dashboard-content {
        height: var(--dashboard-mobile-frame-height);
        min-height: var(--dashboard-mobile-frame-height);
        overflow: hidden;
    }

    .dashboard-frame-shell {
        height: var(--dashboard-mobile-frame-height);
        min-height: var(--dashboard-mobile-frame-height);
        overflow: hidden;
    }

    .dashboard-loading-title {
        left: 50%;
        right: auto;
        bottom: 14px;
        transform: translateX(-50%);
        width: calc(100% - 20px);
        max-width: 320px;
        padding: 10px 14px;
        font-size: 18px;
        white-space: normal;
        text-align: center;
    }

    .dashboard-frame-loading-emoji {
        font-size: 20px;
    }

    .dashboard-skeleton-cards {
        grid-template-columns: 1fr;
    }

    .dashboard-skeleton-windows {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}

@media (min-width: 981px) {
    .container.container-wide:not(.dashboard-main) {
        max-width: none;
        padding-left: 24px;
        padding-right: 24px;
    }

    .container.container-wide.dashboard-main.dashboard-split {
        padding-left: 0;
        padding-right: 0;
    }
}

@media (max-width: 640px) {
    .dashboard-loading-surface {
        padding: 12px;
    }

    .dashboard-loading-title {
        bottom: 12px;
        gap: 10px;
        font-size: 16px;
    }

    .dashboard-frame-loading-emoji {
        font-size: 18px;
    }

    .auth-page .auth-wrap.auth-wrap-single {
        padding: 14px 12px 18px;
        gap: 12px;
    }

    .auth-page .auth-card-modern {
        padding: 18px 16px;
    }

    .topbar-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .topbar-right {
        width: 100%;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
    }

    .topbar-right .btn {
        width: auto;
        white-space: nowrap;
        flex: 0 0 auto;
    }

    .topbar-right .user-pill {
        flex: 1 1 auto;
        min-width: 0;
    }

    .topbar-right .user-name {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: 140px;
    }

    .menu-grid {
        grid-template-columns: 1fr;
    }

    .module-title-row {
        flex-wrap: nowrap;
        align-items: center;
    }

    .module-title-row .btn {
        width: auto;
        flex: 0 0 auto;
    }

    .license-btn-grid {
        grid-template-columns: 1fr;
    }

    .serie-output {
        font-size: 22px;
    }

    .auth-card {
        padding: 18px;
        border-radius: 14px;
    }

    .filter-grid {
        grid-template-columns: 1fr;
    }

    .filter-grid .actions {
        margin-top: 0;
    }

    .company-filter-grid {
        grid-template-columns: 1fr;
    }

    .vee-filter-grid {
        grid-template-columns: 1fr;
    }

    .cfe-filter-grid {
        grid-template-columns: 1fr;
    }

    .vg-filter-grid {
        grid-template-columns: 1fr;
    }

    .ch-filter-grid {
        grid-template-columns: 1fr;
    }

    .chw-filter-grid {
        grid-template-columns: 1fr;
    }

    .chw-grid-table {
        min-width: 2600px;
    }

    .vee-total-box {
        align-items: flex-start;
    }

    .vee-total-value {
        font-size: 28px;
    }

    .nube-filter-grid {
        grid-template-columns: 1fr;
    }

    .app-filter-grid {
        grid-template-columns: 1fr;
    }

    .cxml-filter-grid {
        grid-template-columns: 1fr;
    }

    .users-table.companies-table {
        min-width: 0;
    }

    .companies-table thead {
        display: none;
    }

    .companies-table tbody tr.has-mobile-card {
        display: block;
        border: 1px solid #d6ecfa;
        border-radius: 12px;
        margin-bottom: 10px;
        background: #fff;
    }

    .companies-table tbody tr.has-mobile-card td {
        display: none;
    }

    .companies-table tbody tr.has-mobile-card td.company-mobile-cell {
        display: block;
        border-bottom: none;
        padding: 12px;
        font-size: 14px;
        line-height: 1.35;
    }

    .companies-table tbody tr.has-mobile-card td.company-mobile-cell div {
        margin-bottom: 4px;
        word-break: break-word;
    }

    .companies-table tbody tr.has-mobile-card td.company-mobile-cell div:last-child {
        margin-bottom: 0;
    }

    .users-table.cbe-table {
        min-width: 0;
    }

    .cbe-table thead {
        display: none;
    }

    .cbe-table tbody tr.has-mobile-card {
        display: block;
        border: 1px solid #d6ecfa;
        border-radius: 12px;
        margin-bottom: 10px;
        background: #fff;
    }

    .cbe-table tbody tr.has-mobile-card td {
        display: none;
    }

    .cbe-table tbody tr.has-mobile-card td.cbe-mobile-cell {
        display: block;
        border-bottom: none;
        padding: 12px;
        font-size: 14px;
        line-height: 1.35;
    }

    .cbe-table tbody tr.has-mobile-card td.cbe-mobile-cell div {
        margin-bottom: 4px;
        word-break: break-word;
    }

    .cbe-table tbody tr.has-mobile-card td.cbe-mobile-cell div:last-child {
        margin-bottom: 0;
    }

    .users-table.ce-list-table {
        min-width: 0;
    }

    .ce-list-table thead {
        display: none;
    }

    .ce-list-table tbody tr.has-mobile-card {
        display: block;
        border: 1px solid #d6ecfa;
        border-radius: 12px;
        margin-bottom: 10px;
        background: #fff;
    }

    .ce-list-table tbody tr.has-mobile-card td {
        display: none;
    }

    .ce-list-table tbody tr.has-mobile-card td.ce-mobile-cell {
        display: block;
        border-bottom: none;
        padding: 12px;
        font-size: 14px;
        line-height: 1.35;
    }

    .ce-list-table tbody tr.has-mobile-card td.ce-mobile-cell div {
        margin-bottom: 4px;
        word-break: break-word;
    }

    .ce-list-table tbody tr.has-mobile-card td.ce-mobile-cell div:last-child {
        margin-bottom: 0;
    }

    .users-table.vur-table {
        min-width: 0;
    }

    .vur-table thead {
        display: none;
    }

    .vur-table tbody tr.has-mobile-card {
        display: block;
        border: 1px solid #d6ecfa;
        border-radius: 12px;
        margin-bottom: 10px;
        background: #fff;
    }

    .vur-table tbody tr.has-mobile-card td {
        display: none;
    }

    .vur-table tbody tr.has-mobile-card td.vur-mobile-cell {
        display: block;
        border-bottom: none;
        padding: 12px;
        font-size: 14px;
        line-height: 1.35;
    }

    .vur-table tbody tr.has-mobile-card td.vur-mobile-cell div {
        margin-bottom: 4px;
        word-break: break-word;
    }

    .vur-table tbody tr.has-mobile-card td.vur-mobile-cell div:last-child {
        margin-bottom: 0;
    }

    .users-table.nube-table {
        min-width: 0;
    }

    .nube-table thead {
        display: none;
    }

    .nube-table tbody tr {
        display: block;
        border: 1px solid #d6ecfa;
        border-radius: 12px;
        margin-bottom: 10px;
        background: #fff;
    }

    .nube-table tbody tr td {
        display: none;
    }

    .nube-table tbody tr td.nube-mobile-cell {
        display: block;
        border-bottom: none;
        padding: 12px;
    }

    .nube-table tbody tr td.nube-mobile-cell div {
        margin-bottom: 4px;
        word-break: break-word;
    }

    .nube-table tbody tr td.nube-mobile-cell div:last-child {
        margin-bottom: 0;
    }

    .users-table.visor-table {
        min-width: 0;
    }

    .visor-table thead {
        display: none;
    }

    .visor-table tbody tr.has-mobile-card {
        display: block;
        border: 1px solid #d6ecfa;
        border-radius: 12px;
        margin-bottom: 10px;
        background: #fff;
    }

    .visor-table tbody tr.has-mobile-card td {
        display: none;
    }

    .visor-table tbody tr.has-mobile-card td.visor-mobile-cell {
        display: block;
        border-bottom: none;
        padding: 12px;
        font-size: 14px;
    }

    .users-table.vee-table {
        min-width: 0;
    }

    .vee-table thead {
        display: none;
    }

    .vee-table tbody tr.has-mobile-card {
        display: block;
        border: 1px solid #d6ecfa;
        border-radius: 12px;
        margin-bottom: 10px;
        background: #fff;
    }

    .vee-table tbody tr.has-mobile-card td {
        display: none;
    }

    .vee-table tbody tr.has-mobile-card td.vee-mobile-cell {
        display: block;
        border-bottom: none;
        padding: 12px;
        font-size: 14px;
        line-height: 1.35;
    }

    .vee-table tbody tr.has-mobile-card td.vee-mobile-cell div {
        margin-bottom: 4px;
        word-break: break-word;
    }

    .vee-table tbody tr.has-mobile-card td.vee-mobile-cell div:last-child {
        margin-bottom: 0;
    }

    .users-table.vg-table {
        min-width: 0;
    }

    .users-table.app-table {
        min-width: 0;
    }

    .app-table thead {
        display: none;
    }

    .app-table tbody tr.has-mobile-card {
        display: block;
        border: 1px solid #d6ecfa;
        border-radius: 12px;
        margin-bottom: 10px;
        background: #fff;
    }

    .app-table tbody tr.has-mobile-card td {
        display: none;
    }

    .app-table tbody tr.has-mobile-card td.app-mobile-cell {
        display: block;
        border-bottom: none;
        padding: 12px;
        font-size: 14px;
        line-height: 1.35;
    }

    .app-table tbody tr.has-mobile-card td.app-mobile-cell div {
        margin-bottom: 4px;
        word-break: break-word;
    }

    .app-table tbody tr.has-mobile-card td.app-mobile-cell div:last-child {
        margin-bottom: 0;
    }

    .users-table.cxml-table {
        min-width: 0;
    }

    .cxml-table thead {
        display: none;
    }

    .cxml-table tbody tr.has-mobile-card {
        display: block;
        border: 1px solid #d6ecfa;
        border-radius: 12px;
        margin-bottom: 10px;
        background: #fff;
    }

    .cxml-table tbody tr.has-mobile-card td {
        display: none;
    }

    .cxml-table tbody tr.has-mobile-card td.cxml-mobile-cell {
        display: block;
        border-bottom: none;
        padding: 12px;
        font-size: 14px;
        line-height: 1.35;
    }

    .cxml-table tbody tr.has-mobile-card td.cxml-mobile-cell div {
        margin-bottom: 4px;
        word-break: break-word;
    }

    .cxml-table tbody tr.has-mobile-card td.cxml-mobile-cell div:last-child {
        margin-bottom: 0;
    }

    .cxml-visor-actions .btn {
        width: auto;
    }

    .cxml-current-ruta {
        width: 100%;
    }

    .vg-table thead {
        display: none;
    }

    .vg-table tbody tr.has-mobile-card {
        display: block;
        border: 1px solid #d6ecfa;
        border-radius: 12px;
        margin-bottom: 10px;
        background: #fff;
    }

    .vg-table tbody tr.has-mobile-card td {
        display: none;
    }

    .vg-table tbody tr.has-mobile-card td.vg-mobile-cell {
        display: block;
        border-bottom: none;
        padding: 12px;
        font-size: 14px;
        line-height: 1.35;
    }

    .vg-table tbody tr.has-mobile-card td.vg-mobile-cell div {
        margin-bottom: 4px;
        word-break: break-word;
    }

    .vg-table tbody tr.has-mobile-card td.vg-mobile-cell div:last-child {
        margin-bottom: 0;
    }

    .users-table.ch-table {
        min-width: 0;
    }

    .ch-kpi-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ch-table thead {
        display: none;
    }

    .ch-table tbody tr.has-mobile-card {
        display: block;
        border: 1px solid #d6ecfa;
        border-radius: 12px;
        margin-bottom: 10px;
        background: #fff;
    }

    .ch-table tbody tr.has-mobile-card td {
        display: none;
    }

    .ch-table tbody tr.has-mobile-card td.ch-mobile-cell {
        display: block;
        border-bottom: none;
        padding: 12px;
        font-size: 14px;
        line-height: 1.35;
    }

    .ch-table tbody tr.has-mobile-card td.ch-mobile-cell div {
        margin-bottom: 4px;
        word-break: break-word;
    }

    .ch-table tbody tr.has-mobile-card td.ch-mobile-cell div:last-child {
        margin-bottom: 0;
    }

    .pager {
        flex-direction: column;
        align-items: flex-start;
    }

    .btn {
        width: 100%;
    }

    .actions .btn {
        width: auto;
    }

    .link-row {
        flex-direction: column;
        align-items: stretch;
    }

    .ce-kpi-grid {
        grid-template-columns: 1fr;
    }

    .ce-kpi-value-row {
        grid-template-columns: auto auto;
    }

    .ce-donut-row {
        grid-template-columns: 1fr;
        justify-items: center;
    }

    .ce-bar-row {
        grid-template-columns: 96px 1fr 36px;
    }

    .ce-tab-row .btn {
        width: auto;
    }
}

@media (max-width: 640px) {
    .users-table:not(.chw-grid-table):not(.chw-doc-table) tbody tr.has-mobile-card {
        margin-bottom: 8px;
        border-radius: 10px;
    }

    .users-table:not(.chw-grid-table):not(.chw-doc-table) tbody tr td[class$="-mobile-cell"] {
        padding: var(--list-mobile-pad-y) var(--list-mobile-pad-x);
        font-size: var(--list-mobile-font-size);
        line-height: var(--list-mobile-line-height);
    }

    .users-table:not(.chw-grid-table):not(.chw-doc-table) tbody tr td[class$="-mobile-cell"] div {
        margin-bottom: 3px;
    }

    .users-table:not(.chw-grid-table):not(.chw-doc-table) tbody tr td[class$="-mobile-cell"] div:last-child {
        margin-bottom: 0;
    }

    .users-table:not(.chw-grid-table):not(.chw-doc-table) tbody tr td[class$="-mobile-cell"] .row-actions,
    .users-table:not(.chw-grid-table):not(.chw-doc-table) tbody tr td[class$="-mobile-cell"] [class$="-mobile-action-row"] {
        margin-top: 8px;
        gap: 6px;
    }

    .users-table:not(.chw-grid-table):not(.chw-doc-table) tbody tr td[class$="-mobile-cell"] .btn-sm {
        min-height: 30px;
    }
}

.fm-module-shell {
    gap: 12px;
}

.fm-kpi-grid {
    margin-bottom: 14px;
}

.fm-current-path {
    word-break: break-word;
}

.fm-breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 10px 0 16px;
    font-size: 14px;
}

.fm-breadcrumbs a {
    color: #0a72a9;
    font-weight: 700;
}

.fm-breadcrumb-sep {
    color: #5f7d8f;
}

.fm-filter-grid {
    display: grid;
    grid-template-columns: minmax(220px, 1.4fr) 180px 180px auto;
    gap: 12px;
    margin: 16px 0;
    align-items: end;
}

.fm-filter-grid .field {
    margin-bottom: 0;
}

.fm-filter-actions {
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.fm-admin-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.fm-admin-card {
    padding: 14px;
    border: 1px solid #d6ecfa;
}

.fm-progress {
    margin-top: 8px;
    width: 100%;
    height: 10px;
    border-radius: 999px;
    background: #dff1fc;
    overflow: hidden;
}

.fm-progress-bar {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #09A7FF, #08324A);
}

.fm-bulk-actions {
    margin-bottom: 12px;
}

.fm-table {
    min-width: 1180px;
}

.fm-entry-link {
    color: #08324A;
    font-weight: 700;
}

.fm-entry-link:hover {
    color: #0a72a9;
}

.fm-actions-col {
    min-width: 240px;
}

.fm-mobile-cell {
    display: none;
}

.fm-mobile-title {
    font-weight: 700;
    margin-bottom: 8px;
}

.fm-mobile-action-row {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.fm-mobile-action-row .btn {
    width: auto;
}

@media (max-width: 980px) {
    .fm-filter-grid {
        grid-template-columns: 1fr 1fr;
    }

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

@media (max-width: 640px) {
    .fm-filter-grid {
        grid-template-columns: 1fr;
    }

    .users-table.fm-table {
        min-width: 0;
    }

    .fm-table thead {
        display: none;
    }

    .fm-table tbody tr.has-mobile-card {
        display: block;
        border: 1px solid #d6ecfa;
        border-radius: 12px;
        margin-bottom: 10px;
        background: #fff;
    }

    .fm-table tbody tr.has-mobile-card td {
        display: none;
    }

    .fm-table tbody tr.has-mobile-card td.fm-mobile-cell {
        display: block;
        border-bottom: none;
        padding: 12px;
        font-size: 14px;
        line-height: 1.35;
    }

    .fm-table tbody tr.has-mobile-card td.fm-mobile-cell div {
        margin-bottom: 4px;
        word-break: break-word;
    }

    .fm-table tbody tr.has-mobile-card td.fm-mobile-cell div:last-child {
        margin-bottom: 0;
    }
}
