@font-face {
    font-family: "Reddit Sans";
    src: url("../fonts/RedditSans-Light.ttf");
    font-weight: 300;
}

@font-face {
    font-family: "Reddit Sans";
    src: url("../fonts/RedditSans-Regular.ttf");
    font-weight: 400;
}

@font-face {
    font-family: "Reddit Sans";
    src: url("../fonts/RedditSans-SemiBold.ttf");
    font-weight: 600;
}

* {
    padding: 0px;
    margin: 0px;
    outline: none !important;
    line-height: normal;
    word-break: auto-phrase;
    box-sizing: border-box;
}

:root {
    --font: "Reddit Sans", sans-serif;
    --thin: 300;
    --regular: 400;
    --bold: 600;
    --color-1: #2b187c;
    --color-2: #463e63;
    --color-3: #30284F;
    --color-4: #574e75;
    --color-5: #a79fc4;
    --color-6: #472faf;
    --color-6-light: #f2f0f9;
    --color-7: #ebebeb;
    --color-8: #f7f7f7;
    --color-9: #dddddd;
    --color-10: #d6d2e6;
    --color-11: #f1f1f1;
    --black: #000000;
    --white: #ffffff;
    --white-d: #fafafa;
    --text: #8597a8;
    --text-d: #48515a;
    --light-bg: #f1f1f1;
    --scoring-risk: rgb(186 0 0);
    --scoring-warning: rgb(186, 84, 0);
    --scoring-ok: rgb(26, 138, 74);
    --positive: #00a87e;
    --negative: #a80000;
    --radius: 12px;
    --radius-m: 6px;
    --semiradius: 25px;
    --fullradius: 50%;
    --top-bar: 69px;
    --header-collapsed: 64px;
    --header-regular: 192px;
    --notification-success: #10b981;
    --notification-warning: #f59e0b;
    --notification-error: #cf0a0a;
    --notification-info: #3b82f6;
    --notification-bg: #ffffff;
    --notification-border: #e5e7eb;
    --notification-shadow: rgba(0, 0, 0, 0.1);
    --notification-text: #374151;
    --notification-text-light: #6b7280;
    --partially: #7031c4;
    --old: #d5ebd8;
    --light-old: #def0df;
    --new: #fbe6e6;
    --light-new: #f0dede;
    --warning-light: #fff5e6;
    --info-light: #d5e1eb;
    --box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
    --red: #dc3545;
    --red-light: #f8d7da;
    --primary: #2b187c;
    --primary-rgb: 43, 24, 124;
    --erp: #059669;
    --erp-light: rgba(5, 150, 105, 0.08);
    --sales: #ea580c;
    --sales-light: rgba(234, 88, 12, 0.08);
    --online-sales: #ccfbf1;
    --online-sales-light: #f0fdfa;
    --suggestion: #b36628;
    --suggestion-h: #ce6611;
    --manual: #2848b3;
    --manual-h: #0d3bcf;
    font-family: var(--font);
    font-size: 16px;
    font-weight: var(--regular);
}

::-webkit-scrollbar {
    width: 14px;
    display: block;
}

::-webkit-scrollbar-thumb {
    user-select: none;
    width: 12px;
    background: #2b187c;
    border: 4px solid #fafafa;
    border-radius: 16px;
    background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover,
::-webkit-scrollbar-thumb:active {
    background: #472faf;
}

::-webkit-scrollbar-track {
    background: #fafafa;
}

*>i {
    font-weight: var(--regular) !important;
}

/* Remix Icon: nitidez sin cambiar el look (evita peso sintético en Windows + caja estable) */
[class^="ri-"],
[class*=" ri-"] {
    font-family: "remixicon" !important;
    font-weight: normal !important;
    font-style: normal !important;
    line-height: 1 !important;
    letter-spacing: normal;
    text-transform: none;
    word-break: normal;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: geometricPrecision;
}

html {
    width: 100%;
    height: 100%;
    scrollbar-gutter: stable stable;
}

body {
    width: 100%;
    height: auto;
    display: block;
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
    z-index: 0;
    background: var(--color-10);
    transition: grid-template-columns 0.3s;
}

body h1,
body h2,
body h3,
body h4 {
    line-height: normal;
    font-weight: var(--bold);
}

body a {
    cursor: pointer;
    text-decoration: none;
    font-weight: var(--bold);
}

body input,
body select,
body textarea,
body button {
    font-family: var(--font) !important;
}

/* Global fix for buttons with icons and text */
body button i,
body button span,
body button p {
    pointer-events: none;
}

/* HEADER - EXPANDIDO */
body header {
    width: var(--header-regular);
    height: 100vh;
    display: flex;
    flex-flow: row nowrap;
    justify-content: space-between;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 5;
    background: var(--white-d);
    border-right: 1px solid var(--color-9);
    transition: width 0.3s;
}

body header .wrapper {
    width: 100%;
    height: auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

body header .wrapper .logo {
    width: auto;
    min-height: var(--top-bar);
    padding: 1rem;
    display: flex;
    flex-flow: row nowrap;
    justify-content: flex-start;
    position: relative;
}

body header .wrapper .logo img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    margin: auto 0.5rem auto 0;
}

body header .wrapper .logo span {
    font-size: 1.25rem;
    font-weight: var(--thin);
    color: var(--color-1);
    text-transform: uppercase;
    margin: auto 0;
    white-space: nowrap;
    overflow: hidden;
    max-width: 180px;
    opacity: 1;
    transition: max-width 0.2s ease-out, opacity 0.1s ease-out;
}

/* Selector de producto (FYSCAL / People / Facturador) */
body header .wrapper .product-switcher {
    position: relative;
    z-index: 20;
}

body header .wrapper .product-switcher-trigger {
    cursor: pointer;
    width: 100%;
    min-height: 0;
    padding: 0;
    display: flex;
    flex-flow: row nowrap;
    align-items: center;
    gap: 0;
    border: none;
    background: transparent;
    border-radius: var(--radius-m);
    transition: background 0.2s ease;
}

body header .wrapper .product-switcher-trigger:hover,
body header .wrapper .product-switcher-trigger[aria-expanded="true"] {
    background: var(--color-11);
}

body header .wrapper .product-switcher-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    flex-shrink: 0;
    margin: auto 0.5rem auto 0;
}

body header .wrapper .product-switcher-label {
    font-size: 1.25rem;
    font-weight: var(--thin);
    color: var(--color-1);
    text-transform: uppercase;
    margin: auto 0;
    white-space: nowrap;
    overflow: hidden;
    max-width: 140px;
    opacity: 1;
    transition: max-width 0.2s ease-out, opacity 0.1s ease-out;
}

body header .wrapper .product-switcher-chevron {
    font-size: 1rem;
    color: var(--text);
    margin-left: auto;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

body header .wrapper .product-switcher-trigger[aria-expanded="true"] .product-switcher-chevron {
    transform: rotate(180deg);
}

/* Panel del selector: filas compactas al estilo del menú lateral */
body header .wrapper .product-switcher-menu {
    position: absolute;
    top: calc(100% + 0.25rem);
    left: 0;
    min-width: 10.5rem;
    padding: 0.35rem;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    background: var(--white);
    border: 1px solid var(--color-9);
    border-radius: var(--radius);
    box-shadow: var(--box-shadow);
    z-index: 100;
}

body header .wrapper .product-switcher-menu[hidden] {
    display: none;
}

body header .wrapper .product-switcher-option {
    cursor: pointer;
    width: 100%;
    height: 32px;
    min-height: 32px;
    padding: 0 0.5rem 0 0.4rem;
    display: flex;
    flex-flow: row nowrap;
    align-items: center;
    gap: 0.5rem;
    border: none;
    border-radius: var(--radius-m);
    background: transparent;
    text-align: left;
    transition: background 0.2s ease;
}

body header .wrapper .product-switcher-option:hover {
    background: var(--color-11);
}

body header .wrapper .product-switcher-option.active {
    background: var(--color-1);
}

body header .wrapper .product-switcher-option.active .product-switcher-name {
    color: var(--white);
    font-weight: var(--bold);
}

body header .wrapper .product-switcher-option.active .product-switcher-external {
    color: rgba(255, 255, 255, 0.85);
}

body header .wrapper .product-switcher-dot {
    width: 8px;
    height: 8px;
    flex-shrink: 0;
    border-radius: var(--fullradius);
}

body header .wrapper .product-switcher-dot--fyscal {
    background: var(--color-1);
}

body header .wrapper .product-switcher-dot--people {
    background: #0d9488;
}

body header .wrapper .product-switcher-dot--facturador {
    background: #ea580c;
}

body header .wrapper .product-switcher-option.active .product-switcher-dot {
    background: var(--white);
}

body header .wrapper .product-switcher-name {
    flex: 1;
    font-size: 0.8rem;
    font-weight: var(--regular);
    color: var(--text-d);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body header .wrapper .product-switcher-external {
    font-size: 0.85rem;
    color: var(--text);
    flex-shrink: 0;
    opacity: 0.65;
}

body header .wrapper nav {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 0.5rem;
}

body header .wrapper nav .nav-wrapper {
    width: 100%;
    padding: 0 1rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

body header .wrapper nav .nav-wrapper a {
    user-select: none;
    cursor: pointer;
    width: 100%;
    height: 32px;
    min-height: 32px;
    padding: 0.25rem 0.35rem;
    display: flex;
    flex-flow: row nowrap;
    justify-content: flex-start;
    text-decoration: none;
    position: relative;
    gap: 0.6rem;
    border-radius: var(--radius-m);
    transition: all 0.3s ease;
}

body header .wrapper nav .nav-wrapper a i {
    padding-left: 0.1rem;
    width: 1rem;
    height: 1rem;
    font-size: 1rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text);
    margin: auto 0;
    flex-shrink: 0;
}

.taurus-icon {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
    display: block;
    overflow: visible;
    shape-rendering: geometricPrecision;
    stroke-width: 1.75;
}

body header .wrapper nav .nav-wrapper a .taurus-icon {
    padding-left: 0.1rem;
    color: var(--text);
    margin: auto 0;
}

/* Logo Atlas: WebP blanco colorizado por estado de navegación */
body header .wrapper nav .nav-wrapper a img.taurus-icon {
    width: 1rem;
    height: 1rem;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    padding: 0;
    margin: auto 0;
    background: none;
    border-radius: 0;
    box-shadow: none;
    filter: brightness(0) saturate(100%) invert(66%) sepia(22%) saturate(283%) hue-rotate(169deg) brightness(86%) contrast(88%);
    transition: filter 0.3s ease;
}

body header .wrapper nav .nav-wrapper a span {
    max-width: 180px;
    overflow: hidden;
    font-size: 0.8rem;
    font-weight: var(--regular);
    color: var(--text-d);
    white-space: nowrap;
    opacity: 1;
    transition: max-width 0.2s ease-out, opacity 0.1s ease-out;
    margin: auto 0;
}

body header .wrapper nav .nav-wrapper a:hover {
    opacity: 1;
    transition: all 0.3s ease;
}

body header .wrapper nav .nav-wrapper a:hover i,
body header .wrapper nav .nav-wrapper a:hover span,
body header .wrapper nav .nav-wrapper a:hover .taurus-icon {
    color: var(--black);
}

body header .wrapper nav .nav-wrapper a:hover img.taurus-icon {
    filter: brightness(0) saturate(100%);
}

body header .wrapper nav .nav-wrapper a.active {
    background: var(--color-1);
    border-radius: 9999px;
    box-shadow: 0 2px 8px rgba(43, 24, 124, 0.22);
    transition: all 0.3s ease;
}

body header .wrapper nav .nav-wrapper a.active i,
body header .wrapper nav .nav-wrapper a.active span,
body header .wrapper nav .nav-wrapper a.active .taurus-icon {
    color: var(--white);
    transition: all 0.3s ease;
}

body header .wrapper nav .nav-wrapper a.active img.taurus-icon {
    filter: brightness(0) saturate(100%) invert(100%);
}

/* Servicios no disponibles - Indicador visual */
body header .wrapper nav .nav-wrapper a.unavailable-service,
body header .wrapper nav .bottom-wrapper a.unavailable-service,
body header .wrapper nav .nav-wrapper a.locked-module,
body header .wrapper nav .bottom-wrapper a.locked-module,
body header .wrapper nav .nav-wrapper .header-fake-link.locked-module > .header-fake-link-w {
    position: relative;
    opacity: 0.6;
}

body header .wrapper nav .nav-wrapper a.entitlement-hidden,
body header .wrapper nav .bottom-wrapper a.entitlement-hidden,
body header .wrapper nav .nav-wrapper .header-fake-link.entitlement-hidden,
body header .wrapper nav .nav-wrapper .header-fake-link.entitlement-group-hidden {
    display: none !important;
}

body header .wrapper nav .nav-wrapper a.locked-module i,
body header .wrapper nav .bottom-wrapper a.locked-module i,
body header .wrapper nav .nav-wrapper .header-fake-link.locked-module > .header-fake-link-w i {
    opacity: 0.5;
    filter: grayscale(1);
    position: relative;
}

body header .wrapper nav .nav-wrapper a.locked-module i::after,
body header .wrapper nav .bottom-wrapper a.locked-module i::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 2px;
    height: 140%;
    background: currentColor;
    transform: translate(-50%, -50%) rotate(45deg);
    opacity: 0.85;
}

body header .wrapper nav .nav-wrapper a.unavailable-service i,
body header .wrapper nav .bottom-wrapper a.unavailable-service i {
    opacity: 0.5;
    filter: grayscale(1);
    position: relative;
}

body header .wrapper nav .nav-wrapper a.unavailable-service i::after,
body header .wrapper nav .bottom-wrapper a.unavailable-service i::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 2px;
    height: 100%;
    background-color: var(--red);
    opacity: 0.8;
    transform: translate(-50%, -50%) rotate(45deg);
    z-index: 6;
    pointer-events: none;
}

body header .wrapper nav .nav-wrapper a.unavailable-service:hover,
body header .wrapper nav .bottom-wrapper a.unavailable-service:hover {
    opacity: 0.7;
}

body header .wrapper nav .nav-wrapper a.unavailable-service.active i,
body header .wrapper nav .bottom-wrapper a.unavailable-service.active i {
    opacity: 0.6;
    filter: grayscale(0.8);
}

body header .wrapper nav .nav-wrapper a.unavailable-service.active i::after,
body header .wrapper nav .bottom-wrapper a.unavailable-service.active i::after {
    background-color: var(--white);
    opacity: 0.9;
}

body header .wrapper nav .bottom-wrapper {
    width: 100%;
    padding: 0.5rem 1rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 0.5rem;
    transition: all 0.3s ease;
    margin-top: auto;
}

body header .wrapper nav .bottom-wrapper a {
    user-select: none;
    cursor: pointer;
    width: 100%;
    height: 32px;
    min-height: 32px;
    padding: 0.25rem 0.35rem;
    display: flex;
    flex-flow: row nowrap;
    justify-content: flex-start;
    text-decoration: none;
    position: relative;
    gap: 0.6rem;
    border-radius: var(--radius-m);
    transition: all 0.3s ease;
}

body header .wrapper nav .bottom-wrapper a i {
    padding-left: 0.1rem;
    width: 1rem;
    height: 1rem;
    font-size: 1rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text);
    margin: auto 0;
    flex-shrink: 0;
}

body header .wrapper nav .bottom-wrapper a span {
    max-width: 180px;
    overflow: hidden;
    font-size: 0.8rem;
    font-weight: var(--regular);
    color: var(--text-d);
    white-space: nowrap;
    opacity: 1;
    transition: max-width 0.2s ease-out, opacity 0.1s ease-out;
    margin: auto 0;
}

body header .wrapper nav .bottom-wrapper a:hover {
    opacity: 1;
    transition: all 0.3s ease;
}

body header .wrapper nav .bottom-wrapper a:hover i,
body header .wrapper nav .bottom-wrapper a:hover span {
    color: var(--black);
}

body header .wrapper nav .bottom-wrapper a.active {
    background: var(--color-1);
    border-radius: 9999px;
    box-shadow: 0 2px 8px rgba(43, 24, 124, 0.22);
    transition: all 0.3s ease;
}

body header .wrapper nav .bottom-wrapper a.active i,
body header .wrapper nav .bottom-wrapper a.active span {
    color: var(--white);
    transition: all 0.3s ease;
}

body header .wrapper nav .bottom-wrapper .toggle-menu {
    user-select: none;
    cursor: pointer;
    width: 100%;
    height: 32px;
    min-height: 32px;
    padding: 0.25rem 0.35rem;
    display: flex;
    flex-flow: row nowrap;
    justify-content: flex-start;
    text-decoration: none;
    position: relative;
    gap: 0.5rem;
    border-radius: var(--semiradius);
    transition: all 0.3s ease;
}

body header .wrapper nav .bottom-wrapper .toggle-menu i {
    padding-left: 0.1rem;
    width: 1rem;
    height: 1rem;
    font-size: 1rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--color-1);
    margin: auto 0;
    flex-shrink: 0;
}

body header .wrapper nav .bottom-wrapper .toggle-menu span {
    max-width: 180px;
    overflow: hidden;
    font-size: 0.8rem;
    font-weight: var(--regular);
    color: var(--color-1);
    white-space: nowrap;
    opacity: 1;
    transition: max-width 0.2s ease-out, opacity 0.1s ease-out;
    margin: auto 0;
}

/* HEADER - COLAPSADO */
body.menu-collapsed header {
    width: var(--header-collapsed);
    transition: width 0.3s;
    overflow: visible;
}

body.menu-collapsed header .wrapper nav {
    overflow: visible;
}

body.menu-collapsed header .wrapper {
    min-width: var(--header-collapsed);
    transition: width 0.3s;
}

body.menu-collapsed header .wrapper .logo span {
    max-width: 0;
    opacity: 0;
}

body.menu-collapsed header .wrapper .product-switcher-label,
body.menu-collapsed header .wrapper .product-switcher-chevron {
    max-width: 0;
    opacity: 0;
    overflow: hidden;
    margin: 0;
    padding: 0;
    border-width: 0;
}

body.menu-collapsed header .wrapper .product-switcher-menu {
    left: calc(100% + 0.5rem);
    top: 0;
}

body.menu-collapsed header .wrapper nav .nav-wrapper a,
body.menu-collapsed header .wrapper nav .bottom-wrapper a {
    width: 32px;
    min-width: 32px;
    max-width: 32px;
    gap: 0;
    /* visible: overflow:hidden recortaba los tooltips ::after (left:100%) */
    overflow: visible;
}

body.menu-collapsed header .wrapper nav .nav-wrapper a.active,
body.menu-collapsed header .wrapper nav .bottom-wrapper a.active {
    border-radius: 50%;
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
}

body.menu-collapsed header .wrapper nav .nav-wrapper a.active i,
body.menu-collapsed header .wrapper nav .nav-wrapper a.active .taurus-icon,
body.menu-collapsed header .wrapper nav .bottom-wrapper a.active i {
    padding-left: 0;
}

body.menu-collapsed header .wrapper nav .nav-wrapper a::after,
body.menu-collapsed header .wrapper nav .bottom-wrapper a::after,
body.menu-collapsed header .wrapper nav .bottom-wrapper .toggle-menu::after {
    pointer-events: none;
    padding: 0.25rem 0.75rem;
    content: attr(data-tooltip);
    position: absolute;
    left: 100%;
    top: 50%;
    z-index: 6;
    opacity: 0;
    visibility: hidden;
    font-size: 0.8rem;
    font-weight: var(--regular);
    color: var(--white);
    white-space: nowrap;
    background-color: var(--color-6);
    border-radius: var(--semiradius);
    box-shadow: var(--box-shadow);
    transform: translateY(-50%) translateX(10px);
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
}

body.menu-collapsed header .wrapper nav .nav-wrapper a span,
body.menu-collapsed header .wrapper nav .bottom-wrapper a span,
body.menu-collapsed header .wrapper nav .bottom-wrapper .toggle-menu span,
body.menu-collapsed header .wrapper nav .header-fake-link .header-fake-link-w span,
body.menu-collapsed header .wrapper nav .header-fake-link .header-link-wrapper a span {
    max-width: 0;
    min-width: 0;
    width: 0;
    opacity: 0;
    overflow: hidden;
    flex-shrink: 1;
    margin: 0;
    padding: 0;
    border: 0;
    pointer-events: none;
}

body.menu-collapsed header .wrapper nav .bottom-wrapper .toggle-menu {
    gap: 0;
    overflow: visible;
    min-width: 32px;
    max-width: 32px;
    width: 32px;
}

body.menu-collapsed header .wrapper nav .nav-wrapper a i,
body.menu-collapsed header .wrapper nav .nav-wrapper a .taurus-icon,
body.menu-collapsed header .wrapper nav .bottom-wrapper a i,
body.menu-collapsed header .wrapper nav .bottom-wrapper .toggle-menu i,
body.menu-collapsed header .wrapper nav .header-fake-link .header-fake-link-w i,
body.menu-collapsed header .wrapper nav .header-fake-link .header-link-wrapper a i {
    flex-shrink: 0;
}

body.menu-collapsed header .wrapper nav .nav-wrapper a:hover::after,
body.menu-collapsed header .wrapper nav .bottom-wrapper a:hover::after,
body.menu-collapsed header .wrapper nav .bottom-wrapper .toggle-menu:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(15px);
}

/* FAKE LINKS - EXPANDIDO */
body header .wrapper nav .header-fake-link {
    width: 100%;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    border-radius: var(--semiradius);
    gap: 0.25rem;
}

body header .wrapper nav .header-fake-link .header-fake-link-w {
    user-select: none;
    cursor: pointer;
    width: 100%;
    height: 32px;
    min-height: 32px;
    padding: 0.25rem 0 0.25rem 0.30rem;
    display: flex;
    flex-flow: row nowrap;
    justify-content: flex-start;
    text-decoration: none;
    position: relative;
    gap: 0.6rem;
    border-radius: var(--radius-m);
    transition: all 0.3s ease;
}

body header .wrapper nav .header-fake-link .header-fake-link-w:hover::after {
    display: block;
    content: '\EA4E';
    font-family: "remixicon";
    font-size: 1rem;
    line-height: 1;
    font-weight: normal;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: var(--black);
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.3s ease;
}

body header .wrapper nav .header-fake-link.active .header-fake-link-w::after {
    display: block;
    content: '\EA4E';
    font-family: "remixicon";
    font-size: 1rem;
    line-height: 1;
    font-weight: normal;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: var(--black);
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%) rotate(180deg);
    transition: transform 0.3s ease;
}

body header .wrapper nav .header-fake-link .header-fake-link-w i {
    padding-left: 0.1rem;
    width: 1rem;
    height: 1rem;
    font-size: 1rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text);
    margin: auto 0;
    flex-shrink: 0;
}

body header .wrapper nav .header-fake-link .header-fake-link-w span {
    max-width: 180px;
    overflow: hidden;
    font-size: 0.8rem;
    font-weight: var(--regular);
    color: var(--text-d);
    white-space: nowrap;
    opacity: 1;
    transition: max-width 0.2s ease-out, opacity 0.1s ease-out;
    margin: auto 0;
}

body header .wrapper nav .header-fake-link .header-fake-link-w:hover i,
body header .wrapper nav .header-fake-link .header-fake-link-w:hover span {
    color: var(--black);
    transition: all 0.3s;
}

body header .wrapper nav .header-fake-link.active .header-fake-link-w i,
body header .wrapper nav .header-fake-link.active .header-fake-link-w span {
    color: var(--black);
}

body header .wrapper nav .header-fake-link.active .header-fake-link-w:hover {
    background: transparent;
    transition: all 0.3s ease;
}

body header .wrapper nav .header-fake-link .header-link-wrapper {
    width: 100%;
    padding: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0.5rem;
}

body header .wrapper nav .header-fake-link.active .header-link-wrapper {
    display: flex;
}

/* Fondo del submenú abierto: pozo suave (inset limpio) + contraste con botones elevados.
   El color vive en ::before para poder agrandarlo sin desplazar ítems. */
body header .wrapper nav .header-fake-link.active {
    position: relative;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0.35rem 0;
    isolation: isolate;
}

body header .wrapper nav .header-fake-link.active::before {
    content: '';
    position: absolute;
    z-index: -1;
    inset: -0.2rem -0.4rem;
    background: var(--color-6-light);
    border-radius: var(--semiradius);
    border: 1px solid rgba(43, 24, 124, 0.06);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05), inset 0 6px 12px rgba(43, 24, 124, 0.04);
    pointer-events: none;
    transition: inset 0.25s ease, background 0.25s ease, border-radius 0.25s ease, box-shadow 0.25s ease;
}

body header .wrapper nav .header-fake-link .header-link-wrapper a {
    user-select: none;
    cursor: pointer;
    width: 100%;
    max-width: 100%;
    align-self: stretch;
    height: 32px;
    min-height: 32px;
    padding: 0 8px 0 9px;
    display: flex;
    flex-flow: row nowrap;
    justify-content: flex-start;
    text-decoration: none;
    position: relative;
    gap: 0.45rem;
    border-radius: var(--radius-m);
    transition: all 0.3s ease;
}

body header .wrapper nav .header-fake-link .header-link-wrapper a i {
    width: 1rem;
    height: 1rem;
    font-size: 1rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text);
    margin: auto 0;
    flex-shrink: 0;
}

body header .wrapper nav .header-fake-link .header-link-wrapper a span {
    max-width: 150px;
    overflow: hidden;
    font-size: 0.78rem;
    font-weight: var(--regular);
    color: var(--text-d);
    white-space: nowrap;
    opacity: 1;
    transition: max-width 0.2s ease-out, opacity 0.1s ease-out;
    margin: auto 0;
}

body header .wrapper nav .header-fake-link .header-link-wrapper a:hover i,
body header .wrapper nav .header-fake-link .header-link-wrapper a:hover span {
    color: var(--black);
    transition: all 0.3s ease;
}

body header .wrapper nav .header-fake-link .header-link-wrapper a.active {
    background: var(--color-1);
    border-radius: 9999px;
    box-shadow: 0 2px 8px rgba(43, 24, 124, 0.22);
    padding-left: 10px;
    padding-right: 10px;
    transition: all 0.3s ease;
}

body header .wrapper nav .header-fake-link .header-link-wrapper a.active i,
body header .wrapper nav .header-fake-link .header-link-wrapper a.active span {
    color: var(--white);
    transition: all 0.3s ease;
}

/* Submenú colapsado: sin padding extra del wrapper (ancho fijo 32px) */
body.menu-collapsed header .wrapper nav .header-fake-link .header-link-wrapper {
    padding: 0;
}

/* FAKE LINKS - COLAPSADO */
body.menu-collapsed header .wrapper nav .header-fake-link .header-fake-link-w::before {
    pointer-events: none;
    padding: 0.25rem 0.75rem;
    content: attr(data-tooltip);
    position: absolute;
    left: 100%;
    top: 39%;
    z-index: 6;
    opacity: 0;
    visibility: hidden;
    font-size: 0.8rem;
    font-weight: var(--regular);
    color: var(--white);
    white-space: nowrap;
    background-color: var(--color-6);
    border-radius: var(--semiradius);
    box-shadow: var(--box-shadow);
    transform: translateY(-50%) translateX(10px);
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
}

body.menu-collapsed header .wrapper nav .header-fake-link .header-fake-link-w:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(15px);
}

body.menu-collapsed header .wrapper nav .header-fake-link.active .header-fake-link-w {
    height: 35px;
}

body.menu-collapsed header .wrapper nav .header-fake-link .header-fake-link-w::after {
    display: none;
}

body.menu-collapsed header .wrapper nav .header-fake-link.active .header-fake-link-w::after {
    display: block;
    top: unset;
    right: 9px;
    bottom: -14px;
    transform: translateY(-50%) rotate(180deg);
}

body.menu-collapsed header .wrapper nav .header-fake-link .header-link-wrapper a {
    width: 30px;
    max-width: 30px;
    height: 30px;
    max-height: 30px;
    padding: 0px 0px 0px 5px;
    position: relative;
    gap: 0;
    overflow: visible;
}

body.menu-collapsed header .wrapper nav .header-fake-link .header-fake-link-w {
    width: 32px;
    min-width: 32px;
    max-width: 32px;
    gap: 0;
    overflow: visible;
}

body.menu-collapsed header .wrapper nav .header-fake-link .header-link-wrapper a.active {
    border-radius: 50%;
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
}

body.menu-collapsed header .wrapper nav .header-fake-link .header-link-wrapper a::after {
    pointer-events: none;
    padding: 0.25rem 0.75rem;
    content: attr(data-tooltip);
    position: absolute;
    left: 100%;
    top: 50%;
    z-index: 6;
    opacity: 0;
    visibility: hidden;
    font-size: 0.8rem;
    font-weight: var(--regular);
    color: var(--white);
    white-space: nowrap;
    background-color: var(--color-6);
    border-radius: var(--semiradius);
    box-shadow: var(--box-shadow);
    transform: translateY(-50%) translateX(10px);
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
}

body.menu-collapsed header .wrapper nav .header-fake-link .header-link-wrapper a:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(15px);
}

/* TOP BAR */
.top-bar {
    width: stretch;
    padding: 1rem;
    display: flex;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 5;
    background: var(--white-d);
    border-bottom: 1px solid var(--color-9);
    margin-left: var(--header-regular);
    transition: margin-left 0.3s;
}

body.menu-collapsed .top-bar {
    margin-left: var(--header-collapsed);
    transition: margin-left 0.3s;
}

.top-bar .top-bar-content {
    width: 100%;
    display: flex;
    flex-flow: row nowrap;
    justify-content: space-between;
}

.top-bar .top-bar-content .page-title {
    width: auto;
    display: block;
    font-size: 1.25rem;
    font-weight: var(--thin);
    text-align: left;
    color: var(--color-1);
    margin: auto 0;
}

.top-bar .top-bar-content .top-actions {
    width: auto;
    display: flex;
    flex-flow: row nowrap;
    justify-content: flex-end;
    align-items: center;
    gap: 1rem;
}

.top-bar .top-bar-content .top-actions .societies,
.top-bar .top-bar-content .top-actions .notification-btn-wrapper,
.top-bar .top-bar-content .top-actions .news-btn-wrapper,
.top-bar .top-bar-content .top-actions .profile-dropdown {
    position: relative;
}

.top-bar .top-bar-content .top-actions .societies {
    width: auto;
    height: 36px;
    display: flex;
    flex-flow: row nowrap;
    justify-content: flex-start;
    align-items: center;
    gap: 0.5rem;
    border-radius: var(--radius);
}

.top-bar .top-bar-content .top-actions .societies span {
    width: auto;
    display: block;
    font-size: 1rem;
    font-weight: var(--bold);
    text-align: left;
    color: #7c7c8a;
}

.top-bar .top-bar-content .top-actions .societies select {
    cursor: pointer;
    min-width: 110px;
    padding: 0.25rem 0.5rem;
    font-size: 1rem;
    font-weight: var(--regular);
    color: var(--text-d);
    background: var(--white-d);
    border: 1px solid var(--color-9);
    border-radius: var(--radius-m);
    appearance: base-select;
}

.top-bar .top-bar-content .top-actions .societies select:focus,
.top-bar .top-bar-content .top-actions .societies select:hover {
    border: 1px solid var(--text-d);
    transition: border 0.3s;
}

.top-bar .top-bar-content .top-actions .societies select::picker-icon {
    display: flex;
    flex-direction: column;
    justify-content: center;
    font-family: "remixicon";
    content: "\EA4E";
    font-size: 1rem;
    color: var(--black);
    transition: all 0.3s ease;
}

.top-bar .top-bar-content .top-actions .societies select:open::picker-icon {
    transform: rotate(180deg);
    transition: all 0.3s ease;
}

.top-bar .top-bar-content .top-actions .societies select:open {
    border-radius: var(--radius-m) var(--radius-m) 0 0;
}

.top-bar .top-bar-content .top-actions .societies select::picker(select) {
    appearance: base-select;
    padding: 0.25rem;
    background: var(--white-d);
    border: 1px solid var(--color-9);
    border-radius: 0 0 var(--radius-m) var(--radius-m);
    box-shadow: var(--box-shadow);
}

.top-bar .top-bar-content .top-actions .societies select:open::picker(select) {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 0.25rem;
}

.top-bar .top-bar-content .top-actions .societies select option {
    padding: 0.25rem 1rem 0.25rem 0.5rem;
    display: flex;
    flex-flow: row nowrap;
    justify-content: flex-start;
    gap: 0.5rem;
    position: relative;
    border-radius: 4px;
}

.top-bar .top-bar-content .top-actions .societies select option::checkmark {
    order: 2;
}

.top-bar .top-bar-content .top-actions .societies select option:hover {
    background: var(--color-1);
    color: var(--white-d);
}

.top-bar .top-bar-content .top-actions .societies select option:checked {
    background: var(--color-6);
    color: var(--white-d);
}

.top-bar .top-bar-content .top-actions .societies select option:checked::checkmark {
    display: block;
    font-family: "remixicon";
    position: absolute;
    top: 8px;
    right: 8px;
    content: "\EB7B";
    font-size: 0.8rem;
    color: var(--white);
}

.top-bar .top-bar-content .top-actions .notification-btn-wrapper,
.top-bar .top-bar-content .top-actions .news-btn-wrapper,
.top-bar .top-bar-content .top-actions .chat-dropdown {
    position: relative;
}

.top-bar .top-bar-content .top-actions .notification-btn-wrapper .notification-btn,
.top-bar .top-bar-content .top-actions .news-btn-wrapper .news-btn,
.top-bar .top-bar-content .top-actions .chat-dropdown .chat-btn,
.top-bar .top-bar-content .top-actions .profile-dropdown .profile-btn {
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: var(--white);
    color: var(--text);
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid var(--color-9);
    border-radius: var(--fullradius);
    transition: border 0.3s;
}

.top-bar .top-bar-content .top-actions .notification-btn-wrapper .notification-btn:hover,
.top-bar .top-bar-content .top-actions .news-btn-wrapper .news-btn:hover,
.top-bar .top-bar-content .top-actions .chat-dropdown .chat-btn:hover,
.top-bar .top-bar-content .top-actions .profile-dropdown .profile-btn:hover {
    border: 1px solid var(--text);
    transition: border 0.3s;
}

.top-bar .top-bar-content .top-actions .notification-btn-wrapper .notification-btn i.new,
.top-bar .top-bar-content .top-actions .news-btn-wrapper .news-btn i.new {
    color: var(--color-1);
    animation-name: shake-bell;
    animation-delay: 0s;
    animation-direction: normal;
    animation-duration: 1s;
    animation-iteration-count: infinite;
    animation-timing-function: ease-in-out;
    transform-origin: top center;
    margin-left: 2px;
}

/* Alerta persistente de credenciales: campana azul → rojo */
.top-bar .top-bar-content .top-actions .notification-btn-wrapper .notification-btn.has-credentials-alert i,
.top-bar .top-bar-content .top-actions .notification-btn-wrapper .notification-btn i.new.credentials-alert {
    color: var(--notification-error);
}

.top-bar .top-bar-content .top-actions .notification-btn-wrapper .notification-btn i,
.top-bar .top-bar-content .top-actions .news-btn-wrapper .news-btn i,
.top-bar .top-bar-content .top-actions .chat-dropdown .chat-btn i,
.top-bar .top-bar-content .top-actions .profile-dropdown .profile-btn i {
    font-size: 1.25rem;
    margin-left: 0;
}

.top-bar .top-bar-content .top-actions .notification-btn-wrapper .notification-badge,
.top-bar .top-bar-content .top-actions .news-btn-wrapper .news-badge,
.top-bar .top-bar-content .top-actions .chat-dropdown .chat-badge {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: -5px;
    right: -8px;
    font-family: var(--font);
    font-size: 0.7rem;
    font-weight: var(--bold);
    color: var(--white);
    background: var(--notification-error);
    border: 2px solid var(--white-d);
    border-radius: var(--fullradius);
}

.top-bar .top-bar-content .top-actions .news-btn-wrapper .news-badge {
    background: var(--color-1);
}

.top-bar .top-bar-content .top-actions .chat-dropdown .chat-badge {
    background: var(--color-1);
}

.top-bar .top-bar-content .top-actions .notification-btn-wrapper .notification-badge.hidden,
.top-bar .top-bar-content .top-actions .news-btn-wrapper .news-badge.hidden,
.top-bar .top-bar-content .top-actions .chat-dropdown .chat-badge.hidden {
    display: none;
}

/* Chat Dropdown */
.top-bar .top-bar-content .top-actions .chat-dropdown {
    position: relative;
}

.top-bar .top-bar-content .top-actions .chat-dropdown .chat-dropdown-menu {
    width: 320px;
    max-height: 500px;
    position: absolute;
    top: 100%;
    right: 0;
    opacity: 0;
    visibility: hidden;
    background: var(--white-d);
    box-shadow: var(--box-shadow);
    border: 1px solid var(--color-9);
    border-radius: var(--radius-m);
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 6;
    margin-top: 8px;
    display: flex;
    flex-direction: column;
}

.top-bar .top-bar-content .top-actions .chat-dropdown .chat-dropdown-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.top-bar .top-bar-content .top-actions .chat-dropdown .chat-header {
    padding: 1rem;
    border-bottom: 1px solid var(--color-9);
}

.top-bar .top-bar-content .top-actions .chat-dropdown .chat-header h3 {
    font-size: 1rem;
    font-weight: var(--bold);
    color: var(--text);
    margin: 0 0 0.75rem 0;
}

.top-bar .top-bar-content .top-actions .chat-dropdown .chat-header .chat-search {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--color-9);
    border-radius: var(--semiradius);
    font-size: 0.875rem;
    color: var(--text);
    background: var(--white);
    transition: border 0.3s;
}

.top-bar .top-bar-content .top-actions .chat-dropdown .chat-header .chat-search:focus {
    outline: none;
    border: 1px solid var(--text);
}

.top-bar .top-bar-content .top-actions .chat-dropdown .chat-users-list {
    flex: 1;
    overflow-y: auto;
    max-height: 400px;
    padding: 0.5rem 0;
}

.top-bar .top-bar-content .top-actions .chat-dropdown .chat-users-list .chat-loading {
    padding: 1rem;
    text-align: center;
    color: var(--text-d);
    font-size: 0.875rem;
}

.top-bar .top-bar-content .top-actions .chat-dropdown .chat-users-list .chat-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background 0.3s;
    border-bottom: 1px solid var(--color-9);
}

.top-bar .top-bar-content .top-actions .chat-dropdown .chat-users-list .chat-user:last-child {
    border-bottom: none;
}

.top-bar .top-bar-content .top-actions .chat-dropdown .chat-users-list .chat-user:hover {
    background: var(--color-7);
}

.top-bar .top-bar-content .top-actions .chat-dropdown .chat-users-list .chat-user .chat-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--color-1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: var(--bold);
    font-size: 1rem;
    flex-shrink: 0;
    position: relative;
}

.top-bar .top-bar-content .top-actions .chat-dropdown .chat-users-list .chat-user .chat-user-avatar .chat-user-status {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--white-d);
    position: absolute;
    bottom: 0;
    right: 0;
    background-color: #9e9e9e;
}

.top-bar .top-bar-content .top-actions .chat-dropdown .chat-users-list .chat-user .chat-user-avatar .chat-user-status.online {
    background-color: #4CAF50;
}

.top-bar .top-bar-content .top-actions .chat-dropdown .chat-users-list .chat-user .chat-user-avatar .chat-user-status.away {
    background-color: #FFC107;
}

.top-bar .top-bar-content .top-actions .chat-dropdown .chat-users-list .chat-user .chat-user-avatar .chat-user-status.offline {
    background-color: #9e9e9e;
}

.top-bar .top-bar-content .top-actions .chat-dropdown .chat-users-list .chat-user .chat-user-info {
    flex: 1;
    min-width: 0;
}

.top-bar .top-bar-content .top-actions .chat-dropdown .chat-users-list .chat-user .chat-user-info .chat-user-name {
    font-size: 0.875rem;
    font-weight: var(--regular);
    color: var(--text);
    margin: 0 0 0.25rem 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.top-bar .top-bar-content .top-actions .chat-dropdown .chat-users-list .chat-user .chat-user-info .chat-user-email {
    font-size: 0.75rem;
    color: var(--text-d);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.top-bar .top-bar-content .top-actions .chat-dropdown .chat-users-list .chat-user .chat-user-badge {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-1);
    color: var(--white);
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: var(--bold);
    flex-shrink: 0;
}

.top-bar .top-bar-content .top-actions .chat-dropdown .chat-users-list .chat-user .chat-user-badge.hidden {
    display: none;
}

.top-bar .top-bar-content .top-actions .chat-dropdown .chat-users-list .chat-empty {
    padding: 2rem 1rem;
    text-align: center;
    color: var(--text-d);
    font-size: 0.875rem;
}

.top-bar .top-bar-content .top-actions .profile-dropdown {
    position: relative;
}

.top-bar .top-bar-content .top-actions .profile-dropdown .profile-btn {
    position: relative;
}

.top-bar .top-bar-content .top-actions .profile-dropdown .profile-status-badge {
    width: 12px;
    height: 12px;
    position: absolute;
    top: -2px;
    right: -2px;
    border-radius: 50%;
    border: 2px solid var(--white-d);
    background-color: #4CAF50;
    display: inline-block;
    animation: pulse-online-badge 2s ease-in-out infinite;
    z-index: 6;
}

.top-bar .top-bar-content .top-actions .profile-dropdown .profile-status-badge.offline {
    background-color: #9e9e9e;
    animation: none;
}

.top-bar .top-bar-content .top-actions .profile-dropdown .profile-status-badge.away {
    background-color: #FFC107;
    animation: pulse-away-badge 2s ease-in-out infinite;
}

.top-bar .top-bar-content .top-actions .profile-dropdown .profile-status-badge.connecting {
    background-color: #FF9800;
    animation: pulse-connecting-badge 1.5s ease-in-out infinite;
}

.top-bar .top-bar-content .top-actions .profile-dropdown .profile-status-badge.hidden {
    display: none;
}

@keyframes pulse-online-badge {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

@keyframes pulse-connecting-badge {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.6;
        transform: scale(1.2);
    }
}

@keyframes pulse-away-badge {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

.top-bar .top-bar-content .top-actions .profile-dropdown .profile-dropdown-menu {
    width: auto;
    min-width: 230px;
    position: absolute;
    top: 100%;
    right: 0;
    opacity: 0;
    visibility: hidden;
    background: var(--white-d);
    box-shadow: var(--box-shadow);
    border: 1px solid var(--color-9);
    border-radius: var(--radius-m);
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 6;
    margin-top: 8px;
}

.top-bar .top-bar-content .top-actions .profile-dropdown .profile-dropdown-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.top-bar .top-bar-content .top-actions .profile-dropdown .profile-dropdown-menu .profile-heading {
    width: 100%;
    padding: 0.5rem;
    display: flex;
    flex-flow: row nowrap;
    justify-content: flex-start;
    gap: 0.5rem;
    border-bottom: 1px solid var(--color-9);
}

.top-bar .top-bar-content .top-actions .profile-dropdown .profile-dropdown-menu .profile-heading .user-avatar {
    width: 40px;
    min-width: 40px;
    height: 40px;
    min-height: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: var(--color-1);
    border-radius: var(--fullradius);
    position: relative;
    margin: auto 0;
}

.top-bar .top-bar-content .top-actions .profile-dropdown .profile-dropdown-menu .profile-heading .user-avatar .words-avatar {
    font-size: 1rem;
    font-weight: var(--bold);
    text-align: center;
    color: var(--white);
    margin: auto;
}

.top-bar .top-bar-content .top-actions .profile-dropdown .profile-dropdown-menu .profile-heading .user-avatar .profile-status {
    width: 12px;
    height: 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: var(--white);
    position: absolute;
    bottom: 0;
    right: 0;
    border-radius: var(--fullradius);
}

.top-bar .top-bar-content .top-actions .profile-dropdown .profile-dropdown-menu .profile-heading .user-avatar .profile-status .user-status {
    width: 8px;
    height: 8px;
    display: block;
    border-radius: var(--fullradius);
    margin: auto;
}

.top-bar .top-bar-content .top-actions .profile-dropdown .profile-dropdown-menu .profile-heading .user-avatar .profile-status .user-status.hidden {
    display: none;
}

.top-bar .top-bar-content .top-actions .profile-dropdown .profile-dropdown-menu .profile-heading .user-avatar .profile-status .user-status.online {
    background-color: #4CAF50;
}

.top-bar .top-bar-content .top-actions .profile-dropdown .profile-dropdown-menu .profile-heading .user-avatar .profile-status .user-status.offline {
    background-color: #9e9e9e;
}

.top-bar .top-bar-content .top-actions .profile-dropdown .profile-dropdown-menu .profile-heading .user-avatar .profile-status .user-status.away {
    background-color: #FFC107;
}

.top-bar .top-bar-content .top-actions .profile-dropdown .profile-dropdown-menu .profile-heading .profile-info {
    width: auto;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 0.25rem;
    margin: auto 0;
}

.top-bar .top-bar-content .top-actions .profile-dropdown .profile-dropdown-menu .profile-heading .profile-info .user-fullname {
    font-size: 0.8rem;
    font-weight: var(--bold);
    text-align: left;
    color: var(--black);
}

.top-bar .top-bar-content .top-actions .profile-dropdown .profile-dropdown-menu .profile-heading .profile-info .user-email {
    font-size: 0.7rem;
    font-weight: var(--regular);
    text-align: left;
    color: var(--text);
}

.top-bar .top-bar-content .top-actions .profile-dropdown .profile-dropdown-menu .profile-manual-status {
    width: 100%;
    display: block;
    border-bottom: 1px solid var(--color-9);
}

.top-bar .top-bar-content .top-actions .profile-dropdown .profile-dropdown-menu .profile-manual-status .connection-status {
    width: 100%;
    padding: 0.5rem;
    display: flex;
    flex-flow: row nowrap;
    justify-content: flex-start;
    gap: 0.25rem;
}

.top-bar .top-bar-content .top-actions .profile-dropdown .profile-dropdown-menu .profile-manual-status .connection-status .status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #4CAF50;
    display: inline-block;
    flex-shrink: 0;
    animation: pulse-online 2s ease-in-out infinite;
    margin: auto 0;
}

.top-bar .top-bar-content .top-actions .profile-dropdown .profile-dropdown-menu .profile-manual-status .connection-status .status-indicator.offline {
    background-color: #9e9e9e;
    animation: none;
}

.top-bar .top-bar-content .top-actions .profile-dropdown .profile-dropdown-menu .profile-manual-status .connection-status .status-indicator.away {
    background-color: #FFC107;
    animation: pulse-away 2s ease-in-out infinite;
}

.top-bar .top-bar-content .top-actions .profile-dropdown .profile-dropdown-menu .profile-manual-statuso .connection-status .status-indicator.connecting {
    background-color: #FF9800;
    animation: pulse-connecting 1.5s ease-in-out infinite;
}

.top-bar .top-bar-content .top-actions .profile-dropdown .profile-dropdown-menu .profile-manual-status .connection-status .status-text {
    font-size: 0.8rem;
    color: var(--text-d);
    font-weight: var(--regular);
    text-align: left;
    flex: 1;
    margin: auto 0;
}

.top-bar .top-bar-content .top-actions .profile-dropdown .profile-dropdown-menu .profile-manual-status .connection-status .status-change-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-d);
    transition: all 0.3s ease;
    border-radius: var(--semiradius);
}

.top-bar .top-bar-content .top-actions .profile-dropdown .profile-dropdown-menu .profile-manual-status .connection-status .status-change-btn:hover {
    background: var(--color-7);
    color: var(--text);
}

.top-bar .top-bar-content .top-actions .profile-dropdown .profile-dropdown-menu .profile-manual-status .connection-status .status-change-btn i {
    font-size: 1rem;
}

.top-bar .top-bar-content .top-actions .profile-dropdown .profile-dropdown-menu .profile-manual-status .connection-status .legend {
    width: auto;
    display: block;
    font-size: 0.8rem;
    font-weight: var(--bold);
    text-align: left;
    color: var(--text);
    margin: auto 0;
}

.top-bar .top-bar-content .top-actions .profile-dropdown .profile-dropdown-menu .profile-manual-status .status-menu {
    width: 100%;
    display: none;
    flex-direction: column;
    gap: 0.25rem;
    border-top: 1px solid var(--color-9);
}

.top-bar .top-bar-content .top-actions .profile-dropdown .profile-dropdown-menu .profile-manual-status .status-menu.active {
    padding: 0.5rem;
    display: flex;
}

.top-bar .top-bar-content .top-actions .profile-dropdown .profile-dropdown-menu .profile-manual-status .status-menu .status-option {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
    border-radius: var(--radius-m);
    transition: all 0.3s ease;
    text-align: left;
    width: 100%;
}

.top-bar .top-bar-content .top-actions .profile-dropdown .profile-dropdown-menu .profile-manual-status .status-menu .status-option:hover {
    background: var(--color-7);
}

.top-bar .top-bar-content .top-actions .profile-dropdown .profile-dropdown-menu .profile-manual-status .status-menu .status-option span:last-child {
    font-size: 0.8rem;
    color: var(--text-d);
    font-weight: var(--regular);
}

.top-bar .top-bar-content .top-actions .profile-dropdown .profile-dropdown-menu .profile-manual-status .status-menu .status-option .status-option-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    background-color: #4CAF50;
    flex-shrink: 0;
}

.top-bar .top-bar-content .top-actions .profile-dropdown .profile-dropdown-menu .profile-manual-status .status-menu .status-option .status-option-indicator.connecting {
    background-color: #FF9800;
}

.top-bar .top-bar-content .top-actions .profile-dropdown .profile-dropdown-menu .profile-manual-status .status-menu .status-option .status-option-indicator.online {
    background-color: #4CAF50;
}

.top-bar .top-bar-content .top-actions .profile-dropdown .profile-dropdown-menu .profile-manual-status .status-menu .status-option .status-option-indicator.away {
    background-color: #FFC107;
}

.top-bar .top-bar-content .top-actions .profile-dropdown .profile-dropdown-menu .profile-manual-status .status-menu .status-option .status-option-indicator.offline {
    background-color: #9e9e9e;
}

@keyframes pulse-online {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

@keyframes pulse-connecting {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

@keyframes pulse-away {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

.top-bar .top-bar-content .top-actions .profile-dropdown .profile-dropdown-menu .profile-nav {
    width: 100%;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 0.25rem;
}

.top-bar .top-bar-content .top-actions .profile-dropdown .profile-dropdown-menu .profile-nav .dropdown-item {
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    flex-flow: row nowrap;
    justify-content: flex-start;
    gap: 0.25rem;
    border-radius: var(--radius-m);
    transition: all 0.3s ease;
}

.top-bar .top-bar-content .top-actions .profile-dropdown .profile-dropdown-menu .profile-nav .dropdown-item:hover {
    background: var(--color-7);
    transition: all 0.3s ease;
}

.top-bar .top-bar-content .top-actions .profile-dropdown .profile-dropdown-menu .profile-nav .dropdown-item i {
    width: 16px;
    font-size: 1rem;
    text-align: center;
    color: var(--text);
    margin: auto 0;
}

.top-bar .top-bar-content .top-actions .profile-dropdown .profile-dropdown-menu .profile-nav .dropdown-item span {
    flex: 1;
    font-size: 0.8rem;
    font-weight: var(--regular);
    text-align: left;
    color: var(--text-d);
}

/* NOTIFICACIONES */
.notifications-container {
    position: fixed;
    top: calc(var(--top-bar) + 4px);
    right: 20px;
    width: 400px;
    max-height: calc(100vh - 100px);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.notification {
    pointer-events: auto;
    width: auto;
    padding: 1.5rem;
    position: relative;
    opacity: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 0.5rem;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: 0px 8px 10px rgba(0, 0, 0, 0.1);
    transform: translateX(100%);
    transition: transform 0.5s ease, opacity 0.5s ease;
    z-index: 6;
    margin: 0;
    overflow: hidden;
}

.notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification.hide {
    transform: translateX(100%);
    opacity: 0;
}

.notification .notification-header {
    width: 100%;
    display: flex;
    flex-flow: row nowrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.notification .notification-header .notification-header-w {
    min-width: 0;
    display: flex;
    flex-flow: row nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: 0.75rem;
}

.notification .notification-header .notification-header-w .notification-icon {
    width: 40px !important;
    min-width: 40px !important;
    height: 40px !important;
    min-height: 40px !important;
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--notification-info);
    border-radius: var(--radius-m) !important;
    margin: 0 !important;
}

.notification .notification-header .notification-header-w .notification-icon i {
    font-size: 1.5rem;
    font-weight: var(--regular);
    text-align: center;
    color: var(--white);
}

.notification .notification-header .notification-header-w .notification-icon.success {
    background: var(--notification-success);
}

.notification .notification-header .notification-header-w .notification-icon.warning {
    background: var(--notification-warning);
}

.notification .notification-header .notification-header-w .notification-icon.error,
.notification .notification-header .notification-header-w .notification-icon.critical,
.notification .notification-header .notification-header-w .notification-icon.critica {
    background: var(--notification-error);
}

.notification .notification-header .notification-header-w .notification-icon.info {
    background: var(--notification-info);
}

.notification .notification-header .notification-header-w .notification-title {
    width: auto;
    display: block;
    font-size: 1rem;
    font-weight: var(--bold);
    text-align: left;
    color: var(--black);
    margin: auto 0;
}

.notification .notification-header .notification-close {
    user-select: none;
    cursor: pointer;
    width: 20px;
    height: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    font-size: 1.75rem;
    font-weight: var(--regular);
    text-align: right;
    color: var(--color-5);
    background: transparent;
    border: none;
    margin: auto 0;
}

.notification .notification-header .notification-close:hover {
    color: var(--text-d);
}

.notification .notification-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 0.25rem;
    margin: auto 0;
}

.notification .notification-content .notification-message {
    width: 100%;
    display: block;
    font-size: 0.8rem;
    font-weight: var(--regular);
    text-align: left;
    color: var(--text-d);
}

.notification .notification-content .notification-time {
    width: 100%;
    display: block;
    font-size: 0.7rem;
    font-weight: var(--regular);
    text-align: left;
    color: var(--text-d);
    margin-top: 0.25rem;
}

.notification .notification-content .notification-actions {
    width: 100%;
    display: flex;
    flex-flow: row nowrap;
    justify-content: flex-start;
    margin-top: 0.5rem;
}

.notification .notification-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background: var(--notification-success);
    transition: width linear;
}

.notification .notification-progress.warning {
    background: var(--notification-warning);
}

.notification .notification-progress.error,
.notification .notification-progress.critical,
.notification .notification-progress.critica {
    background: var(--notification-error);
}

.notification .notification-progress.info {
    background: var(--notification-info);
}

.notifications-panel {
    width: 450px;
    max-height: calc(100vh - 80px);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 60px;
    right: 17px;
    z-index: 10001;
    background: var(--white-d);
    border: 1px solid var(--color-9);
    border-radius: var(--radius-m);
    opacity: 0;
    box-shadow: var(--box-shadow);
    transform: translateX(110%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.notifications-panel.show {
    transform: translateX(0);
    opacity: 1;
}

.notifications-panel .notifications-header {
    width: 100%;
    padding: 1rem;
    display: flex;
    flex-flow: row nowrap;
    justify-content: space-between;
    border-bottom: 1px solid var(--color-9);
}

.notifications-panel .notifications-header .notifications-title {
    width: auto;
    display: block;
    font-size: 1.25rem;
    font-weight: var(--bold);
    color: var(--notification-text);
    margin: auto 0;
}

.notifications-panel .notifications-header .notifications-filters {
    width: auto;
    display: flex;
    flex-flow: row nowrap;
    justify-content: flex-end;
    gap: 0.5rem;
}

.notifications-panel .notifications-header .notifications-filters .filter-btn {
    cursor: pointer;
    width: 36px;
    min-width: 36px;
    height: 36px;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white-d);
    border: 1px solid var(--color-9);
    border-radius: var(--semiradius);
    transition: border 0.3s;
}

.notifications-panel .notifications-header .notifications-filters .filter-btn i {
    display: flex;
    flex-direction: column;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--text);
}

.notifications-panel .notifications-header .notifications-filters .filter-btn:hover {
    border: 1px solid var(--text-d);
    transition: border 0.3s;
}

.notifications-panel .notifications-header .notifications-filters .filter-btn.active {
    background: var(--color-1);
    color: var(--white-d);
    border-color: var(--color-1);
}

.notifications-panel .notifications-header .notifications-filters .filter-btn.active i {
    color: var(--white);
}

.notifications-panel .notifications-list {
    flex: 1;
    overflow-y: auto;
    max-height: 400px;
}

.notifications-panel .notifications-list .notifications-empty {
    padding: 2rem;
    text-align: center;
    color: var(--notification-text-light);
}

.notifications-panel .notifications-list .notifications-empty i {
    font-size: 3rem;
    opacity: 0.5;
}

.notifications-panel .notifications-list .notifications-empty p {
    font-size: 0.9rem;
    margin: 0.5rem auto 0 auto;
}

.notifications-panel .notifications-list .notification-item {
    cursor: pointer;
    padding: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    border-bottom: 1px solid var(--header-border);
    transition: background-color 0.2s ease;
}

.notifications-panel .notifications-list .notification-item:last-child {
    border-bottom: none;
}

.notifications-panel .notifications-list .notification-item:hover {
    background: rgb(0 0 0 / 3%);
}

/* No leídas normales: tono marca (violeta), no rojo de error */
.notifications-panel .notifications-list .notification-item.unread {
    background: rgb(43 24 124 / 4%);
}

.notifications-panel .notifications-list .notification-item.unread:hover {
    background: rgb(43 24 124 / 7%);
}

.notifications-panel .notifications-list .notification-item .notification-item-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.25rem;
    font-weight: var(--regular);
    color: var(--white-d);
    border-radius: var(--fullradius);
}

.notifications-panel .notifications-list .notification-item .notification-item-icon.success {
    background: var(--notification-success);
}

.notifications-panel .notifications-list .notification-item .notification-item-icon.warning {
    background: var(--notification-warning);
}

.notifications-panel .notifications-list .notification-item .notification-item-icon.error,
.notifications-panel .notifications-list .notification-item .notification-item-icon.critical,
.notifications-panel .notifications-list .notification-item .notification-item-icon.critica {
    background: var(--notification-error);
}

.notifications-panel .notifications-list .notification-item .notification-item-icon.info {
    background: var(--notification-info);
}

.notifications-panel .notifications-list .notification-item .notification-item-content {
    flex: 1;
    min-width: 0;
}

.notifications-panel .notifications-list .notification-item .notification-item-content .notification-item-title {
    font-size: 1rem;
    font-weight: var(--bold);
    color: var(--notification-text);
    margin-bottom: 0.25rem;
    line-height: 1.4;
}

.notifications-panel .notifications-list .notification-item .notification-item-content .notification-item-message {
    display: block;
    font-size: 0.8rem;
    font-weight: var(--regular);
    line-height: 1.4;
    color: var(--notification-text-light);
    text-align: left;
    line-clamp: 2;
    overflow: hidden;
    margin-bottom: 0.25rem;
}

.notifications-panel .notifications-list .notification-item .notification-item-content .notification-item-time {
    font-size: 0.7rem;
    font-weight: var(--regular);
    color: var(--notification-text-light);
    text-align: left;
}

.notifications-panel .notifications-list .notification-item.credentials-alert {
    border-left: 3px solid var(--notification-error);
    background: rgb(207 10 10 / 5%);
}

.notifications-panel .notifications-list .notification-item.credentials-alert.unread,
.notifications-panel .notifications-list .notification-item.credentials-alert:hover {
    background: rgb(207 10 10 / 8%);
}

.notifications-panel .notifications-list .notification-item .notification-item-content .notification-item-status {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin: 0 0 0.35rem;
    padding: 0;
    font-size: 0.72rem;
    font-weight: var(--bold);
    letter-spacing: 0.01em;
    color: var(--notification-error);
    background: transparent;
    border: none;
}

.notifications-panel .notifications-list .notification-item .notification-item-content .notification-item-status i {
    font-size: 0.85rem;
    line-height: 1;
}

.notifications-panel .notifications-list .notification-item .notification-item-content .notification-item-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.5rem;
    margin-bottom: 0.15rem;
    padding: 0.4rem 0.75rem;
    border: 1px solid var(--notification-error);
    border-radius: var(--radius-m);
    background: var(--notification-error);
    color: var(--white);
    font-family: var(--font);
    font-size: 0.75rem;
    font-weight: var(--bold);
    line-height: 1.2;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.notifications-panel .notifications-list .notification-item .notification-item-content .notification-item-cta i {
    font-size: 0.95rem;
    line-height: 1;
}

.notifications-panel .notifications-list .notification-item .notification-item-content .notification-item-cta:hover {
    background: #a80808;
    border-color: #a80808;
}

.notifications-panel .notifications-list .notification-item .notification-item-content .notification-item-cta:active {
    transform: translateY(1px);
}

/* Progress bar para notificaciones de actualización */
.notifications-panel .notifications-list .notification-item .notification-item-content .notification-item-progress-container {
    width: 100%;
    height: 6px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
    margin-top: 6px;
    margin-bottom: 6px;
    overflow: visible;
    display: block;
}

.notifications-panel .notifications-list .notification-item .notification-item-content .notification-item-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.notification .notification-content .notification-actions .notification-download-btn,
.notifications-panel .notifications-list .notification-item .notification-item-content .notification-item-download-btn {
    user-select: none;
    cursor: pointer;
    width: 100%;
    padding: 0.5rem;
    display: grid;
    grid-template-columns: 35px 2fr 20px;
    gap: 0.5rem;
    background: var(--white-d);
    border: 1px solid var(--color-9);
    border-radius: var(--radius-m);
    overflow: hidden;
    margin-top: 0.5rem;
}

.notification .notification-content .notification-actions .notification-download-btn .icon,
.notifications-panel .notifications-list .notification-item .notification-item-content .notification-item-download-btn .icon {
    min-height: 28px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--notification-success);
    border-radius: var(--radius-m);
    margin: auto 0;
}

.notification .notification-content .notification-actions .notification-download-btn .icon i,
.notifications-panel .notifications-list .notification-item .notification-item-content .notification-item-download-btn .icon i {
    font-size: 1.2rem;
    font-weight: var(--regular);
    text-align: center;
    color: var(--white);
    margin: auto;
}

.notification .notification-content .notification-actions .notification-download-btn .fileinfo,
.notifications-panel .notifications-list .notification-item .notification-item-content .notification-item-download-btn .fileinfo {
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notification .notification-content .notification-actions .notification-download-btn .fileinfo .filename,
.notifications-panel .notifications-list .notification-item .notification-item-content .notification-item-download-btn .fileinfo .filename {
    font-size: 0.75rem;
    font-weight: var(--bold);
    text-align: left;
    color: var(--black);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notification .notification-content .notification-actions .notification-download-btn .fileinfo .fileweight,
.notifications-panel .notifications-list .notification-item .notification-item-content .notification-item-download-btn .fileinfo .fileweight {
    display: none;
}

.notification .notification-content .notification-actions .notification-download-btn .ri-download-line,
.notifications-panel .notifications-list .notification-item .notification-item-content .notification-item-download-btn .ri-download-line {
    display: flex;
    flex-direction: column;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: var(--regular);
    color: var(--text);
    text-align: right;
    margin: auto 0;
    transition: all 0.3s ease;
}

.notification .notification-content .notification-actions .notification-download-btn:hover,
.notifications-panel .notifications-list .notification-item .notification-item-content .notification-item-download-btn:hover {
    border: 1px solid var(--notification-success);
    transition: all 0.3s ease;
}

.notification .notification-content .notification-actions .notification-download-btn:hover .ri-download-line,
.notifications-panel .notifications-list .notification-item .notification-item-content .notification-item-download-btn:hover .ri-download-line {
    color: var(--notification-success);
    transition: all 0.3s ease;
}

.notifications-panel .notifications-list .notification-item .notification-item-unread {
    width: 8px;
    height: 8px;
    flex-shrink: 0;
    border-radius: var(--fullradius);
    background: var(--color-1);
    margin-top: 9px;
}

.notifications-panel .notifications-list .notification-item .notification-item-unread.credentials {
    background: var(--notification-error);
}

.notifications-panel .notifications-footer {
    width: 100%;
    padding: 1rem;
    border-top: 1px solid var(--color-9);
    display: flex;
    justify-content: space-between;
}

.notifications-panel .notifications-footer .notifications-clear {
    cursor: pointer;
    display: block;
    padding: 0.5rem;
    font-family: var(--font);
    font-size: 0.8rem;
    font-weight: var(--bold);
    color: var(--text-d);
    background: var(--white-d);
    border: 1px solid var(--color-9);
    border-radius: var(--radius-m);
    transition: border 0.3s;
}

.notifications-panel .notifications-footer .notifications-clear:hover {
    border: 1px solid var(--text-d);
    transition: border 0.3s;
}

.notifications-panel .notifications-footer .notifications-view-all {
    cursor: pointer;
    display: block;
    padding: 0.5rem;
    font-family: var(--font);
    font-size: 0.8rem;
    font-weight: var(--bold);
    color: var(--white-d);
    background: var(--color-1);
    border: none;
    border-radius: var(--radius-m);
    transition: all 0.2s ease;
}

.notifications-panel .notifications-footer .notifications-view-all:hover {
    color: var(--white);
    background: var(--color-6);
}

/* Modal de notificaciones - Estructura moderna y compacta */
.notification-modal {
    width: 100%;
    height: 100%;
    display: none;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 7;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.notification-modal.show {
    display: flex;
    opacity: 1;
    visibility: visible;
}

.notification-modal .notification-modal-overlay {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.notification-modal .notification-modal-content {
    width: fit-content;
    min-width: 220px;
    max-width: min(380px, 90vw);
    max-height: 70vh;
    position: relative;
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    transform: scale(0.95) translateY(10px);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.notification-modal.show .notification-modal-content {
    transform: scale(1) translateY(0);
}

/* Header del modal - en fila con icono, título y botón cerrar */
.notification-modal .notification-modal-header {
    width: 100%;
    padding: 0.6rem 0.75rem;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
}

.notification-modal .notification-modal-header.error,
.notification-modal .notification-modal-header.critical,
.notification-modal .notification-modal-header.critica {
    background: rgba(207, 10, 10, 0.1);
}

.notification-modal .notification-modal-header.warning {
    background: rgba(245, 158, 11, 0.1);
}

.notification-modal .notification-modal-header.success {
    background: rgba(16, 185, 129, 0.1);
}

.notification-modal .notification-modal-header.info {
    background: rgba(59, 130, 246, 0.1);
}

.notification-modal .notification-modal-header .icon {
    width: 28px;
    height: 28px;
    min-width: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--fullradius);
    flex-shrink: 0;
}

.notification-modal .notification-modal-header.error .icon,
.notification-modal .notification-modal-header.critical .icon,
.notification-modal .notification-modal-header.critica .icon {
    background: var(--notification-error);
}

.notification-modal .notification-modal-header.warning .icon {
    background: var(--notification-warning);
}

.notification-modal .notification-modal-header.success .icon {
    background: var(--notification-success);
}

.notification-modal .notification-modal-header.info .icon {
    background: var(--notification-info);
}

.notification-modal .notification-modal-header .icon i {
    font-size: 1rem;
    color: var(--white);
}

.notification-modal .notification-modal-title {
    flex: 1;
    font-size: 0.85rem;
    font-weight: var(--bold);
    color: var(--black);
}

.notification-modal .notification-modal-close {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: var(--radius-m);
    cursor: pointer;
    color: var(--text-d);
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.notification-modal .notification-modal-close:hover {
    background: rgba(0, 0, 0, 0.08);
    color: var(--black);
}

.notification-modal .notification-modal-close i {
    font-size: 1rem;
}

/* Body del modal */
.notification-modal .notification-modal-body {
    padding: 0.75rem;
    background: var(--white);
    overflow-y: auto;
    max-height: calc(70vh - 80px);
}

.notification-modal .notification-modal-message {
    font-size: 0.8rem;
    font-weight: var(--regular);
    line-height: 1.5;
    color: var(--text);
    margin: 0 0 0.75rem 0;
    word-wrap: break-word;
}

/* Botón de descarga compacto */
.notification-modal .notification-modal-download-btn {
    width: 100%;
    padding: 0.5rem 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--white-d);
    border: 1px solid var(--color-9);
    border-radius: var(--radius-m);
    cursor: pointer;
    transition: all 0.15s ease;
    margin-bottom: 0.75rem;
}

.notification-modal .notification-modal-download-btn:hover {
    border-color: var(--notification-success);
    background: rgba(16, 185, 129, 0.05);
}

.notification-modal .notification-modal-download-btn i:first-child {
    font-size: 1.1rem;
    color: var(--notification-success);
    flex-shrink: 0;
}

.notification-modal .notification-modal-download-btn span {
    flex: 1;
    font-size: 0.75rem;
    font-weight: var(--medium);
    color: var(--text);
    text-align: left;
    word-break: break-word;
}

.notification-modal .notification-modal-download-btn i:last-child {
    font-size: 0.9rem;
    color: var(--text-d);
    flex-shrink: 0;
    transition: color 0.15s ease;
}

.notification-modal .notification-modal-download-btn:hover i:last-child {
    color: var(--notification-success);
}

/* Metadatos inline al final */
.notification-modal .notification-modal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--color-9);
}

.notification-modal .notification-modal-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.65rem;
    color: var(--text-d);
}

.notification-modal .notification-modal-meta span i {
    font-size: 0.75rem;
}

/* MAIN */
body main {
    width: auto;
    padding: 1rem;
    display: block;
    position: relative;
    margin-top: var(--top-bar);
    margin-left: var(--header-regular);
    transition: margin-left 0.3s;
}

body.menu-collapsed main {
    margin-left: var(--header-collapsed);
    transition: margin-left 0.3s;
}

body main .wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

/* Asegurar layout de tablas por defecto en todos los navegadores */
table {
    display: table;
    border-collapse: separate;
    border-spacing: 0;
}

thead {
    display: table-header-group;
}

tbody {
    display: table-row-group;
}

tfoot {
    display: table-footer-group;
}

tr {
    display: table-row;
}

th,
td {
    display: table-cell;
    vertical-align: middle;
}

/* ESTILOS DE USO GLOBAL */
.positive {
    color: var(--positive);
}

.negative {
    color: var(--negative);
}

.error {
    width: 100%;
    padding: 0.5rem;
    display: none;
    flex-flow: row nowrap;
    justify-content: flex-start;
    gap: 0.5rem;
    border-radius: var(--radius-m);
    background: var(--negative);
    color: var(--white);
    margin-bottom: 1rem;
    display: none;
}

.error.active {
    display: flex;
}

.error i {
    font-size: 1rem;
    color: var(--white);
    margin: auto 0;
}

.error p {
    margin: 0;
    font-size: 0.8rem;
    font-weight: var(--regular);
}

.error.success {
    background: var(--positive);
}

.button {
    width: 100%;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius);
    background: var(--color-1);
    color: var(--white);
    font-family: var(--font);
    font-size: 1rem;
    font-weight: var(--bold);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.button:hover,
.button:active {
    background: var(--color-6);
}

.button.disabled,
.button.disabled:hover {
    background: var(--white-d);
    color: var(--text);
    cursor: not-allowed;
}

.button.disabled::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid var(--text);
    border-radius: 50%;
    animation: button-loading 1s linear infinite;
}

@keyframes button-loading {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.button_two {
    width: 100%;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius);
    background: var(--color-1);
    color: var(--white);
    font-family: var(--font);
    font-size: 1rem;
    font-weight: var(--bold);
    cursor: pointer;
    transition: all 0.3s ease;
}

.button_two:hover,
.button_two:active {
    background: var(--color-6);
}

.alert {
    width: auto;
    padding: 1rem;
    position: fixed;
    right: 1rem;
    top: var(--top-bar);
    opacity: 0;
    display: flex;
    flex-flow: row nowrap;
    justify-content: space-between;
    gap: 1rem;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.3);
    transform: translateX(100%);
    transition: transform 0.5s ease, opacity 0.5s ease;
    z-index: 99999;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    overflow: hidden;
}

.alert .alert-icon {
    width: 40px;
    height: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--color-9);
    border-radius: var(--radius-m);
    margin: auto 0;
}

.alert .alert-icon i {
    font-size: 1.5rem;
    font-weight: var(--regular);
    text-align: center;
    color: var(--white);
}

.alert.alert-info {
    box-shadow: 0px 10px 5px rgba(88, 62, 206, 0.3);
}

.alert-info .alert-icon {
    background: var(--color-2);
}

.alert.alert-warning {
    box-shadow: 0px 10px 5px rgba(206, 144, 62, 0.3);
}

.alert-warning .alert-icon {
    background: var(--color-9);
}

.alert.alert-success {
    box-shadow: 0px 10px 5px rgba(19, 116, 75, 0.3);
}

.alert-success .alert-icon {
    background: var(--positive);
}

.alert.alert-error {
    box-shadow: 0px 10px 5px rgba(136, 31, 31, 0.3);
}

.alert-error .alert-icon {
    background: var(--negative);
}

.alert .alert-info {
    width: auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    margin: auto 0;
}

.alert .alert-info h2 {
    width: auto;
    display: block;
    font-size: 1rem;
    font-weight: var(--bold);
    text-align: left;
    color: var(--black);
}

.alert .alert-info p {
    width: auto;
    display: block;
    font-size: 0.8rem;
    font-weight: var(--regular);
    text-align: left;
    color: var(--text-d);
}

.alert .alert-close {
    user-select: none;
    cursor: pointer;
    width: 20px;
    height: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    font-size: 1.75rem;
    font-weight: var(--regular);
    text-align: right;
    color: var(--text);
    margin: auto 0;
}

.alert .alert-close:hover,
.alert .alert-close:active {
    color: var(--color-1);
}

.alert.show {
    transform: translateX(0);
    opacity: 1;
}

.alert-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.2);
}

.alert.alert-info .alert-progress {
    background-color: rgba(88, 62, 206, 0.5);
}

.alert.alert-warning .alert-progress {
    background-color: rgba(206, 144, 62, 0.5);
}

.alert.alert-success .alert-progress {
    background-color: rgba(19, 116, 75, 0.5);
}

.alert.alert-error .alert-progress {
    background-color: rgba(136, 31, 31, 0.5);
}

.modal-shadow,
.informative-shadow {
    width: 100%;
    height: 100%;
    position: fixed;
    top: 0px;
    left: 0px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 7;
    opacity: 0;
    visibility: hidden;
}

.modal-shadow.active,
.informative-shadow.active {
    opacity: 1;
    visibility: visible;
}

.modal-shadow .modal,
.informative-shadow .modal {
    width: auto;
    min-width: 400px;
    max-width: 90%;
    background: var(--white-d);
    border-radius: var(--radius);
    overflow: hidden;
    overflow-y: auto;
    margin: auto;
}

.modal-shadow .modal .modal-header,
.informative-shadow .modal .modal-header {
    width: auto;
    display: flex;
    flex-flow: row nowrap;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    padding: 1rem;
    border-bottom: 1px solid var(--color-9);
}

.modal-shadow .modal .modal-header h2,
.informative-shadow .modal .modal-header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: var(--bold);
    color: var(--black);
}

.modal-shadow .modal .modal-header i,
.informative-shadow .modal .modal-header i {
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--text);
}

.modal-shadow .modal .modal-header i:hover,
.informative-shadow .modal .modal-header i:hover {
    color: var(--text-d);
}

.modal-shadow .modal form,
.informative-shadow .modal form {
    padding: 1.5rem;
}

.modal-shadow .modal form .field,
.informative-shadow .modal form .field {
    margin-bottom: 1.5rem;
}

.modal-shadow .modal form .field .title,
.informative-shadow .modal form .field .title {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: var(--bold);
    color: var(--text-d);
}

.modal-shadow .modal form .field input,
.informative-shadow .modal form .field input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--header-border);
    border-radius: var(--radius);
    background: var(--white-d);
    font-family: var(--font);
    font-size: 1rem;
}

.modal-shadow .modal form .error,
.informative-shadow .modal form .error {
    color: var(--negative);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.modal-shadow .modal form .button,
.informative-shadow .modal form .button {
    margin-top: 1rem;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 1rem 0;
}

.pagination .prev-page,
.pagination .next-page {
    user-select: none;
    cursor: pointer;
    width: 35px;
    min-width: 35px;
    height: 35px;
    min-height: 35px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: var(--white-d);
    border: 1px solid var(--color-9);
    font-size: 1.25rem;
    color: var(--text);
    text-decoration: none;
    border-radius: var(--fullradius);
    transition: all 0.3s ease;
}

.pagination .prev-page:hover,
.pagination .next-page:hover {
    border-color: var(--text-d);
}

.pagination .prev-page.disabled,
.pagination .next-page.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination .page-number {
    width: auto;
    padding: 0.5rem;
    display: flex;
    flex-flow: row nowrap;
    justify-content: center;
    font-size: 1rem;
    font-weight: var(--bold);
    text-align: center;
    color: var(--text-d);
    background: var(--white-d);
    border: 1px solid var(--color-9);
    border-radius: var(--semiradius);
}

@keyframes loadingText {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

@keyframes notificationSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes notificationSlideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Rotación global para íconos de carga */
.rotating {
    animation: rotation360 1s linear infinite;
}

@keyframes rotation360 {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Compatibilidad: animación global 'spin' y clase utilitaria 'ri-spin' */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.ri-spin {
    animation: spin 1s linear infinite;
}

@keyframes shake-bell {
    0% {
        transform: rotate(0);
    }

    15% {
        transform: rotate(15deg);
    }

    30% {
        transform: rotate(-10deg);
    }

    45% {
        transform: rotate(7deg);
    }

    60% {
        transform: rotate(-5deg);
    }

    75% {
        transform: rotate(3deg);
    }

    100% {
        transform: rotate(0);
    }
}

/* Estilos para modal informativo de servicios premium */
#service-info-modal .modal {
    max-width: 1000px;
    max-height: 90vh;
}

#service-info-modal .modal-content {
    padding: 2rem;
    overflow-y: auto;
    max-height: calc(90vh - 80px);
}

.service-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.service-intro {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--color-9);
}

.service-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-1);
    border-radius: var(--radius);
    font-size: 2.5rem;
    color: var(--white);
    margin-bottom: 0.5rem;
    box-shadow: 0 4px 12px rgba(43, 24, 124, 0.3);
}

.service-description {
    font-size: 1.1rem;
    color: var(--text-d);
    line-height: 1.6;
    margin: 0;
    max-width: 600px;
    font-weight: var(--regular);
}

.service-benefits {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.service-benefits h3 {
    font-size: 1.5rem;
    font-weight: var(--bold);
    color: var(--text-d);
    margin: 0 0 1rem 0;
}

.benefits-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.benefits-list li {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1rem;
    background: var(--white-d);
    border-radius: var(--radius-m);
    border-left: 4px solid var(--color-1);
    transition: all 0.3s ease;
}

.benefits-list li:hover {
    background: var(--color-6-light);
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.benefits-list li i {
    color: var(--color-1);
    font-size: 1.5rem;
    margin-top: 0.25rem;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.benefits-list li div {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.benefits-list li strong {
    font-size: 1.1rem;
    font-weight: var(--bold);
    color: var(--text-d);
}

.benefits-list li p {
    font-size: 0.95rem;
    color: var(--text);
    line-height: 1.6;
    margin: 0;
}

.service-footer {
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-9);
}

.service-cta {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--color-6-light);
    border-radius: var(--radius);
    border-left: 4px solid var(--color-1);
}

.service-cta i {
    font-size: 1.5rem;
    color: var(--color-1);
    flex-shrink: 0;
}

.service-cta p {
    font-size: 1rem;
    color: var(--text-d);
    margin: 0;
    line-height: 1.5;
    font-weight: var(--regular);
}

/* Configuración global de Flatpickr */
.flatpickr-calendar {
    background: var(--white-d);
    border-radius: var(--radius);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    margin-top: 8px;
    width: 307px;
    font-family: var(--font);
    z-index: 9999 !important;
}

.flatpickr-months {
    display: flex !important;
    flex-flow: row nowrap;
    justify-content: space-between;
    background: var(--color-1);
    border-radius: var(--radius-m) var(--radius-m) 0 0;
    padding: 0.5rem;
    position: relative;
}

.flatpickr-months .flatpickr-month {
    height: 40px;
    color: var(--white);
    fill: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
}

.flatpickr-current-month {
    font-size: 1rem !important;
    font-weight: var(--regular) !important;
    padding: 0 !important;
    display: flex !important;
    flex-flow: row nowrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 0.5rem !important;
    color: var(--white) !important;
    margin: auto 0 !important;
}

.flatpickr-current-month .flatpickr-monthDropdown-months {
    appearance: none;
    background: transparent;
    border: none;
    color: var(--white) !important;
    font-family: var(--font);
    font-size: 1.1rem;
    font-weight: var(--bold);
    padding: 0 0.5rem;
    cursor: pointer;
    text-align: center;
    min-width: 100px;
}

.flatpickr-current-month .flatpickr-monthDropdown-months:hover {
    color: rgba(255, 255, 255, 0.9) !important;
}

.flatpickr-current-month .flatpickr-monthDropdown-months option {
    font-weight: var(--regular) !important;
}

.flatpickr-current-month .numInputWrapper {
    width: 70px;
    position: relative;
}

.flatpickr-current-month .numInputWrapper input {
    color: var(--white) !important;
    font-family: var(--font);
    font-weight: var(--bold);
    font-size: 1.1rem;
    background: transparent;
    border: none;
    padding: 0;
    text-align: center;
    cursor: pointer;
}

.flatpickr-current-month .numInputWrapper input:hover {
    color: rgba(255, 255, 255, 0.9) !important;
}

.flatpickr-current-month .numInputWrapper input:focus {
    outline: none;
    box-shadow: none;
    color: var(--white) !important;
}

.flatpickr-current-month .numInputWrapper .arrowUp,
.flatpickr-current-month .numInputWrapper .arrowDown {
    display: none;
}

.flatpickr-weekdays {
    background: var(--white-d);
    height: 40px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.flatpickr-weekday {
    color: var(--text-d);
    font-weight: var(--bold);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.flatpickr-day {
    color: var(--text-d);
    border-radius: var(--radius);
    margin: 2px;
    height: 35px;
    line-height: 35px;
    font-weight: var(--bold);
    font-size: 0.9rem;
    transition: all 0.3s ease;
    background: var(--white);
}

.flatpickr-day:hover {
    background: rgba(var(--text-active-rgb), 0.1);
    color: var(--color-1);
    border-color: transparent;
}

.flatpickr-day.selected {
    background: var(--color-1) !important;
    border-color: var(--color-1) !important;
    color: var(--white) !important;
}

.flatpickr-day.selected:hover {
    background: var(--color-6);
    border-color: var(--color-6);
    color: var(--white) !important;
}

.flatpickr-day.inRange {
    background: rgba(var(--text-active-rgb), 0.1);
    border-color: transparent;
    color: var(--color-1);
    box-shadow: -5px 0 0 rgba(var(--text-active-rgb), 0.1),
        5px 0 0 rgba(var(--text-active-rgb), 0.1);
}

.flatpickr-day.selected.startRange,
.flatpickr-day.selected.endRange {
    background: var(--color-1) !important;
    border-color: var(--color-1) !important;
    color: var(--white) !important;
}

.flatpickr-day.selected.startRange:hover,
.flatpickr-day.selected.endRange:hover {
    background: var(--color-6) !important;
    border-color: var(--color-6) !important;
    color: var(--white) !important;
}

.flatpickr-day.startRange,
.flatpickr-day.endRange {
    background: var(--color-1) !important;
    border-color: var(--color-1) !important;
    color: var(--white) !important;
    border-radius: var(--radius);
}

.flatpickr-day.startRange {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.flatpickr-day.endRange {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.flatpickr-day.today {
    border: 2px solid var(--color-1);
    color: var(--color-1);
    background: var(--white);
}

.flatpickr-day.today:hover {
    background: rgba(var(--text-active-rgb), 0.1);
}

.flatpickr-day.disabled {
    color: rgba(var(--text-d-rgb), 0.3);
    cursor: not-allowed;
    background: var(--white-d);
}

.flatpickr-day.disabled:hover {
    background: var(--white-d);
    color: rgba(var(--text-d-rgb), 0.3);
}

.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month {
    position: relative !important;
    padding: 8px;
    fill: var(--white) !important;
    height: 32px;
    width: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.flatpickr-months .flatpickr-prev-month:hover,
.flatpickr-months .flatpickr-next-month:hover {
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--radius);
}

.flatpickr-months .flatpickr-prev-month:hover svg,
.flatpickr-months .flatpickr-next-month:hover svg {
    fill: var(--white) !important;
    transform: scale(1.2);
    transition: all 0.3s ease;
}

.flatpickr-months .flatpickr-prev-month svg,
.flatpickr-months .flatpickr-next-month svg {
    width: 24px;
    height: 24px;
    transition: all 0.3s ease;
    fill: var(--white) !important;
}

.flatpickr-months .flatpickr-prev-month.disabled,
.flatpickr-months .flatpickr-next-month.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.flatpickr-months .flatpickr-prev-month.disabled svg,
.flatpickr-months .flatpickr-next-month.disabled svg {
    fill: var(--white) !important;
    opacity: 0.5;
}

.flatpickr-input {
    padding: 0.5rem;
    font-family: var(--font);
    font-size: 0.9rem;
    font-weight: var(--bold);
    color: var(--text-d);
    background: var(--white);
    border: 1px solid #e5e7eb;
    border-radius: var(--radius);
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
}

.flatpickr-input:hover {
    border-color: var(--color-1);
    color: var(--color-1);
    background: rgba(var(--text-active-rgb), 0.05);
}

.flatpickr-input:focus {
    border: 1.5px solid var(--color-1);
    box-shadow: 0 0 0 2px rgba(var(--text-active-rgb), 0.15);
    color: var(--color-1);
    outline: none;
}

.flatpickr-calendar.open {
    display: inline-block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.flatpickr-current-month .flatpickr-monthDropdown-months {
    padding: 0 0.5rem;
}

.flatpickr-current-month .flatpickr-monthDropdown-months .flatpickr-monthDropdown-month {
    background: var(--color-1);
    font-family: var(--font);
    font-weight: var(--regular) !important;
    color: var(--white) !important;
}

.flatpickr-tooltip {
    background: var(--white-d);
    border-radius: var(--radius);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: var(--text-d);
    font-family: var(--font);
    font-size: 0.9rem;
    font-weight: var(--bold);
    padding: 0.5rem;
}

.flatpickr-tooltip:before {
    border-bottom-color: var(--white-d);
}

.flatpickr-tooltip:after {
    border-bottom-color: var(--white-d);
}

.flatpickr-monthDropdown-months {
    background: var(--color-1) !important;
    color: var(--white) !important;
}

.flatpickr-monthDropdown-month {
    background: var(--color-1) !important;
    color: var(--white) !important;
    font-family: var(--font);
    font-weight: var(--bold);
    padding: 0.5rem;
}

.flatpickr-monthDropdown-month:hover {
    background: var(--color-6) !important;
    color: var(--white) !important;
}

/* Asegurar que el texto del mes seleccionado sea visible */
.flatpickr-current-month .flatpickr-monthDropdown-months option {
    background: var(--color-1);
    color: var(--white);
    font-family: var(--font);
    font-weight: var(--bold);
    padding: 0.5rem;
}

.flatpickr-current-month .flatpickr-monthDropdown-months option:hover {
    background: var(--color-6);
    color: var(--white);
}

.flatpickr-current-month input.cur-year {
    width: 70px !important;
    padding: 0.25rem 0.5rem !important;
    color: var(--white) !important;
    background: transparent !important;
    border: 1px solid var(--white) !important;
    border-radius: var(--radius) !important;
}

.flatpickr-current-month .numInputWrapper .arrowUp,
.flatpickr-current-month .numInputWrapper .arrowDown {
    display: flex !important;
}

.flatpickr-current-month .numInputWrapper span.arrowUp:after {
    border-bottom-color: rgba(255, 255, 255, 1) !important;
}

.flatpickr-current-month .numInputWrapper span.arrowDown:after {
    border-top-color: rgba(255, 255, 255, 1) !important;
}

/* Suscripción — banner trial in-app */
.subscription-banner {
    width: auto;
    margin-left: var(--header-regular);
    margin-top: var(--top-bar);
    padding: 0.65rem 1rem;
    background: linear-gradient(90deg, rgba(43, 24, 124, 0.08), rgba(43, 24, 124, 0.03));
    border-bottom: 1px solid rgba(43, 24, 124, 0.12);
    transition: margin-left 0.3s;
}

body.menu-collapsed .subscription-banner {
    margin-left: var(--header-collapsed);
}

body.has-subscription-banner main {
    margin-top: calc(var(--top-bar) - 4rem);
}

.subscription-banner-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1rem;
}

.subscription-banner-text {
    font-size: 0.88rem;
    color: var(--text-d);
    line-height: 1.4;
}

.subscription-banner-text strong {
    color: var(--color-1);
}

.subscription-banner-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.subscription-banner-link {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius);
    background: var(--color-1);
    color: var(--white);
    font-size: 0.82rem;
    font-weight: var(--bold);
    text-decoration: none;
}

.subscription-banner-link:hover {
    background: var(--color-6);
    color: var(--white);
}

.subscription-banner-dismiss {
    border: none;
    background: transparent;
    color: var(--text);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.15rem 0.35rem;
    border-radius: var(--radius);
}

.subscription-banner-dismiss:hover {
    background: rgba(0, 0, 0, 0.06);
}

.subscription-banner--urgent {
    background: linear-gradient(90deg, rgba(220, 53, 69, 0.12), rgba(220, 53, 69, 0.04));
    border-bottom-color: rgba(220, 53, 69, 0.2);
}

.subscription-banner--urgent .subscription-banner-link {
    background: #c82333;
}

/* Validación de fechas en popups de Excel */
.excel-date-error {
    color: var(--red);
    font-size: 0.8rem;
    margin: 0.25rem 0 0.5rem;
    display: none;
}

.excel-date-error.visible {
    display: block;
}

.excel-body .dates .field.is-invalid input,
.excel-body .dates .field.is-invalid .flatpickr-input,
#excel .excel-body .dates .field.is-invalid input,
#excel .excel-body .dates .field.is-invalid .flatpickr-input,
#excel-generation .dates .field.is-invalid input,
#excel-generation .dates .field.is-invalid .flatpickr-input {
    border-color: var(--red) !important;
    background-color: var(--red-light);
    transition: border 0.3s;
}

/* Banner de perfil progresivo (completar CUIT/teléfono in-app) */
.profile-complete-banner {
    width: auto;
    margin-left: var(--header-regular);
    margin-top: var(--top-bar);
    padding: 0.65rem 1rem;
    background: var(--color-6-light);
    color: var(--color-2);
    border-bottom: 1px solid var(--color-10);
    transition: margin-left 0.3s;
}

body.menu-collapsed .profile-complete-banner {
    margin-left: var(--header-collapsed);
}

body.has-profile-complete-banner main {
    margin-top: calc(var(--top-bar) - 4rem);
}

.profile-complete-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1rem;
}

.profile-complete-text {
    min-width: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.profile-complete-text strong {
    color: var(--color-1);
    font-weight: var(--bold);
}

.profile-complete-form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.5rem 0.75rem;
    min-width: 0;
    max-width: 100%;
}

.profile-complete-field {
    display: flex;
    flex: 1 1 11rem;
    min-width: 0;
    flex-direction: column;
    gap: 0.25rem;
    color: var(--color-2);
    font-size: 0.8rem;
    font-weight: var(--bold);
}

.profile-complete-field input {
    width: 100%;
    min-width: 0;
    min-height: 2.5rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--color-9);
    border-radius: var(--radius-m);
    background: var(--white-d);
    color: var(--color-2);
    font-size: 0.9rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.profile-complete-field input::placeholder {
    color: var(--text-d);
}

.profile-complete-field input:focus {
    border-color: var(--color-1);
    box-shadow: 0 0 0 3px var(--color-10);
}

.profile-complete-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.profile-complete-actions button {
    min-height: 2.5rem;
    border-radius: var(--radius-m);
    font-size: 0.9rem;
    font-weight: var(--bold);
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
}

.profile-complete-save {
    padding: 0.5rem 1rem;
    border: 0;
    background: var(--color-1);
    color: var(--white-d);
}

.profile-complete-save:hover {
    background: var(--color-6);
}

.profile-complete-save:focus-visible {
    box-shadow: 0 0 0 3px var(--color-10);
}

.profile-complete-save:disabled {
    opacity: 0.6;
    cursor: default;
}

.profile-complete-later {
    padding: 0.5rem 0.75rem;
    border: 0;
    background: none;
    color: var(--color-2);
}

.profile-complete-later:hover {
    color: var(--color-1);
    text-decoration: underline;
}

.profile-complete-later:focus-visible {
    box-shadow: 0 0 0 3px var(--color-10);
    border-radius: var(--radius-m);
}

.profile-complete-error {
    flex-basis: 100%;
    color: var(--negative);
    font-size: 0.82rem;
}

@media (max-width: 768px) {
    .profile-complete-banner {
        padding: 0.75rem;
    }

    .profile-complete-inner {
        flex-direction: column;
        align-items: stretch;
    }

    .profile-complete-form {
        width: 100%;
    }

    .profile-complete-actions {
        justify-content: flex-end;
    }
}
