/* === Scope de tema claro (variables) === */
html[data-theme="light"],
html[data-theme-mode="light"] {
    --page-max-width: 100% !important;
}

/* === LOGIN PAGE STYLING === */
html[data-theme="light"] #page-login,
html[data-theme-mode="light"] #page-login {
    background: var(--login-bg-color, transparent);
    background-image: var(--login-bg-image, none) !important;
    background-size: cover;
    height: 100vh;
}

/* Botones login */
html[data-theme="light"] .btn-primary.btn-login,
html[data-theme-mode="light"] .btn-primary.btn-login,
html[data-theme="light"] .btn-primary.btn-forgot,
html[data-theme-mode="light"] .btn-primary.btn-forgot {
    background-color: var(--login-btn-bg, #171717);
    color: var(--login-btn-color, #fff);
}
html[data-theme="light"] .btn-primary.btn-login:hover,
html[data-theme-mode="light"] .btn-primary.btn-login:hover,
html[data-theme="light"] .btn-primary.btn-forgot:hover,
html[data-theme-mode="light"] .btn-primary.btn-forgot:hover {
    background-color: var(--login-btn-hover-bg, #171717);
    color: var(--login-btn-hover-color, #fff);
}

/* Inputs / labels */
html[data-theme="light"] .form-control,
html[data-theme-mode="light"] .form-control {
    background-color: var(--input-bg, #f3f3f3);
    color: var(--input-color, #383838);
    border: 2px solid var(--input-border, #f3f3f3);
}
html[data-theme="light"] label.control-label,
html[data-theme-mode="light"] label.control-label {
    color: var(--input-label-color, #383838);
}

/* Caja login */
html[data-theme="light"] .for-login,
html[data-theme-mode="light"] .for-login {
    position: var(--login-box-position, static);
    right: var(--login-box-right, auto);
    left: var(--login-box-left, auto);
    top: var(--login-box-top, 18%);
    background-color: var(--login-box-bg-override, transparent) !important;
    border-radius: var(--login-box-border-radius, 0) !important;
    opacity: 0;
    transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out;
    transform: translateY(20px);
    animation: showLoginFallback 0.2s ease-in-out 1s forwards;
}
html[data-theme="light"] .for-login.theme-ready,
html[data-theme-mode="light"] .for-login.theme-ready {
    opacity: 1;
    transform: translateY(0);
    animation: none;
}

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

html[data-theme="light"] .login-content.page-card,
html[data-theme-mode="light"] .login-content.page-card {
    background-color: var(--login-box-bg,#fff) !important;
    border: 2px solid var(--login-box-bg,#fff) !important;
    width: var(--login-box-width,400px);
    padding: var(--login-box-padding);
}
html[data-theme="light"] .login-content,
html[data-theme-mode="light"] .login-content {
    border: var(--login-content-border,none);
}

/* Títulos login */
html[data-theme="light"] .for-login .page-card-head h4,
html[data-theme-mode="light"] .for-login .page-card-head h4 {
    display: var(--login-title-display);
}
html[data-theme="light"] .for-login .page-card-head:after,
html[data-theme-mode="light"] .for-login .page-card-head:after {
    display: var(--login-title-after-display);
    justify-content: var(--login-title-after-justify);
    margin-top: var(--login-title-after-margin);
    content: var(--login-title-after-content);
    color: var(--login-title-after-color);
}
html[data-theme="light"] .page-card-head h4,
html[data-theme-mode="light"] .page-card-head h4 {
    color: var(--page-heading-color) !important;
}

/* === NAVBAR === */
html[data-theme="light"] .navbar,
html[data-theme-mode="light"] .navbar {
    background-color: -webkit-linear-gradient(315deg,#667eea 0,#764ba2 100%);
}
html[data-theme="light"] .navbar.container,
html[data-theme-mode="light"] .navbar.container,
html[data-theme="light"] .navbar-brand,
html[data-theme-mode="light"] .navbar-brand {
    color: var(--navbar-color, #555);
}
html[data-theme="light"] .navbar-toggler,
html[data-theme-mode="light"] .navbar-toggler,
html[data-theme="light"] .navbar-toggler span svg,
html[data-theme-mode="light"] .navbar-toggler span svg,
html[data-theme="light"] .navbar svg.es-icon.icon-sm use,
html[data-theme-mode="light"] .navbar svg.es-icon.icon-sm use,
html[data-theme="light"] .notifications-seen > .es-icon,
html[data-theme-mode="light"] .notifications-seen > .es-icon {
    fill: var(--navbar-color);
    stroke-width: 0;
}
html[data-theme="light"] button.navbar-toggler,
html[data-theme-mode="light"] button.navbar-toggler {
    border-color: var(--navbar-color) !important;
}
html[data-theme="light"] #navbar-breadcrumbs li a,
html[data-theme-mode="light"] #navbar-breadcrumbs li a {
    color: var(--navbar-color);
}
html[data-theme="light"] #navbar-breadcrumbs li a::before,
html[data-theme-mode="light"] #navbar-breadcrumbs li a::before {
    content: "›";
}
html[data-theme="light"] #navbar-breadcrumbs li.disabled a,
html[data-theme-mode="light"] #navbar-breadcrumbs li.disabled a {
    color: var(--navbar-color) !important;
}
html[data-theme="light"] .btn-reset.nav-link span,
html[data-theme-mode="light"] .btn-reset.nav-link span {
    color: var(--navbar-color) !important;
}
html[data-theme="light"] .btn-reset.nav-link span svg,
html[data-theme-mode="light"] .btn-reset.nav-link span svg,
html[data-theme="light"] .btn-reset.nav-link span svg use,
html[data-theme-mode="light"] .btn-reset.nav-link span svg use {
    stroke: var(--navbar-color) !important;
    fill: var(--navbar-color) !important;
}

/* === BUTTONS === */
html[data-theme="light"] .btn-primary,
html[data-theme-mode="light"] .btn-primary,
html[data-theme="light"] .btn-primary:active,
html[data-theme-mode="light"] .btn-primary:active {
    background-color: var(--btn-primary-bg,#171717) !important;
}
html[data-theme="light"] .btn-primary span,
html[data-theme-mode="light"] .btn-primary span,
html[data-theme="light"] .btn-primary:active span,
html[data-theme-mode="light"] .btn-primary:active span {
    color: var(--btn-primary-color) !important;
}
html[data-theme="light"] .btn-primary:hover,
html[data-theme-mode="light"] .btn-primary:hover {
    background-color: var(--btn-primary-hover-bg);
}
html[data-theme="light"] .btn-primary:hover span,
html[data-theme-mode="light"] .btn-primary:hover span {
    color: var(--btn-primary-hover-color);
}

html[data-theme="light"] .btn.btn-default.ellipsis,
html[data-theme-mode="light"] .btn.btn-default.ellipsis,
html[data-theme="light"] .btn-default,
html[data-theme-mode="light"] .btn-default,
html[data-theme="light"] .btn-default:active,
html[data-theme-mode="light"] .btn-default:active {
    background-color: var(--btn-secondary-bg,#f3f3f3);
    color: var(--btn-secondary-color);
}
html[data-theme="light"] .btn.btn-default.ellipsis:hover,
html[data-theme-mode="light"] .btn.btn-default.ellipsis:hover,
html[data-theme="light"] .btn-default:hover,
html[data-theme-mode="light"] .btn-default:hover {
    background-color: var(--btn-secondary-hover-bg,#f3f3f3);
    color: var(--btn-secondary-hover-color);
}

/* === MAIN CONTENT === */
html[data-theme="light"] body,
html[data-theme-mode="light"] body {
    background-color: var(--body-bg,#fff);
}
html[data-theme="light"] .content.page-container,
html[data-theme-mode="light"] .content.page-container,
html[data-theme="light"] .page-head,
html[data-theme-mode="light"] .page-head {
    background-color: var(--body-bg,#fff);
}
html[data-theme="light"] .layout-main-section,
html[data-theme-mode="light"] .layout-main-section,
html[data-theme="light"] .form-layout,
html[data-theme-mode="light"] .form-layout,
html[data-theme="light"] .layout-main,
html[data-theme-mode="light"] .layout-main,
html[data-theme="light"] .form-page,
html[data-theme-mode="light"] .form-page,
html[data-theme="light"] .nav.form-tabs,
html[data-theme-mode="light"] .nav.form-tabs,
html[data-theme="light"] .row.form-section.card-section.visible-section,
html[data-theme-mode="light"] .row.form-section.card-section.visible-section {
    background-color: var(--content-bg) !important;
    border-radius: 10px;
    color: var(--content-text-color) !important;
}

/* === SIDEBAR === */
html[data-theme="light"] .body-sidebar,
html[data-theme-mode="light"] .body-sidebar {
    background-color: var(--sidebar-bg,#f8f8f8) !important;
    color: var(--sidebar-text-color,#525252) !important;
}
html[data-theme="light"] .standard-sidebar-item,
html[data-theme-mode="light"] .standard-sidebar-item,
html[data-theme="light"] .item-anchor,
html[data-theme-mode="light"] .item-anchor,
html[data-theme="light"] .sidebar-item-label,
html[data-theme-mode="light"] .sidebar-item-label,
html[data-theme="light"] .sidebar-item-icon,
html[data-theme-mode="light"] .sidebar-item-icon,
html[data-theme="light"] .sidebar-item-icon svg,
html[data-theme-mode="light"] .sidebar-item-icon svg,
html[data-theme="light"] .sidebar-item-control button,
html[data-theme-mode="light"] .sidebar-item-control button {
    color: var(--sidebar-text-color,#525252) !important;
}
html[data-theme="light"] .sidebar-item-icon svg,
html[data-theme-mode="light"] .sidebar-item-icon svg {
    fill: var(--sidebar-bg,#f8f8f8) !important;
    stroke: var(--sidebar-text-color,#525252) !important;
}

/* === TABLES === */
html[data-theme="light"] .level.list-row-head.text-muted,
html[data-theme-mode="light"] .level.list-row-head.text-muted {
    background-color: var(--table-head-bg);
}
html[data-theme="light"] .level-left.list-header-subject,
html[data-theme-mode="light"] .level-left.list-header-subject,
html[data-theme="light"] span.level-item,
html[data-theme-mode="light"] span.level-item,
html[data-theme="light"] div.level-right,
html[data-theme-mode="light"] div.level-right {
    color: var(--table-head-color);
}
html[data-theme="light"] .level.list-row,
html[data-theme-mode="light"] .level.list-row,
html[data-theme="light"] .level-item.bold.ellipsis a,
html[data-theme-mode="light"] .level-item.bold.ellipsis a,
html[data-theme="light"] .filterable.ellipsis,
html[data-theme-mode="light"] .filterable.ellipsis {
    background-color: var(--table-body-bg);
    color: var(--table-body-color);
}

/* === CONDITIONAL VISIBILITY === */
html[data-theme="light"] .like-icon,
html[data-theme-mode="light"] .like-icon,
html[data-theme="light"] .comment-count,
html[data-theme-mode="light"] .comment-count,
html[data-theme="light"] .level-item.list-row-activity .mx-2,
html[data-theme-mode="light"] .level-item.list-row-activity .mx-2 {
    display: var(--hide-like-comment, block) !important;
}
html[data-theme="light"] .d-lg-block,
html[data-theme-mode="light"] .d-lg-block,
html[data-theme="light"] .d-sm-block,
html[data-theme-mode="light"] .d-sm-block {
    display: var(--hide-help, block) !important;
}
html[data-theme="light"] .sidebar-item-control,
html[data-theme-mode="light"] .sidebar-item-control {
    display: var(--hide-app-switcher, block) !important;
}
html[data-theme="light"] .app-switcher-dropdown,
html[data-theme-mode="light"] .app-switcher-dropdown {
    pointer-events: var(--app-switcher-pointer-events, auto) !important;
}

/* === WIDGETS === */
html[data-theme="light"] .widget.number-widget-box,
html[data-theme-mode="light"] .widget.number-widget-box {
    background-color: var(--widget-bg);
    border: 2px solid var(--widget-border);
}
html[data-theme="light"] .widget-head,
html[data-theme-mode="light"] .widget-head,
html[data-theme="light"] .widget-label,
html[data-theme-mode="light"] .widget-label,
html[data-theme="light"] .widget-title,
html[data-theme-mode="light"] .widget-title,
html[data-theme="light"] .widget-body,
html[data-theme-mode="light"] .widget-body,
html[data-theme="light"] .widget-content div.number,
html[data-theme-mode="light"] .widget-content div.number {
    color: var(--widget-color);
}
html[data-theme="light"].standard-sidebar .standard-sidebar-item.selected, .desk-sidebar .standard-sidebar-item.selected, .search-dialog .search-results .search-sidebar .standard-sidebar-item.selected
 {
    background-color: darkgray;
}
html[data-theme="light"] .notifications-icon use,
html[data-theme="light"] .notifications-icon svg {
    fill: #ffffff !important; /* Color de relleno */
    stroke: #ffffff !important; /* Color de borde si aplica */
}
.layout-side-section
 {
    font-size: var(--text-sm);
    font-weight: var(--weight-regular);
    letter-spacing: .02em;
    padding-right: 30px;
    box-shadow: 10px 0 6px -6px rgba(0, 0, 0, .22) !important;
    border-top-right-radius: 15px;
}
/* === RESPONSIVE === */
@media (max-width: 768px) {
    html[data-theme="light"] .for-login,
    html[data-theme-mode="light"] .for-login {
        position: static;
    }
    html[data-theme="light"] .login-content.page-card,
    html[data-theme-mode="light"] .login-content.page-card {
        width: auto;    }


}