﻿html, body {
    height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #f8f9fa;
}

body.sidebar-open {
    overflow: hidden;
}

body.login-page {
    margin: 0;
    min-height: 100vh;
    display: block;
    --login-brand: #6f3d88;
    --login-brand-dark: #4f2b63;
    --login-brand-light: #9158b1;
    background-color: #d3d3d6;
    color: #1f2533;
}

.login-shell {
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.login-card {
    width: 100%;
    min-height: 100vh;
    display: grid;
    --login-brand-col: clamp(320px, 34vw, 520px);
    grid-template-columns: var(--login-brand-col) minmax(0, 1fr);
    border-radius: 0;
    overflow: hidden;
    background-color: #f6f7f9;
    border: 0;
    box-shadow: none;
    position: relative;
}

.login-brand-side {
    position: relative;
    background: linear-gradient(180deg, var(--login-brand-light) 0%, var(--login-brand) 56%, var(--login-brand-dark) 100%);
    color: #ffffff;
    padding: 2.6rem 1.6rem 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: stretch;
}



.login-brand-content {
    max-width: 340px;
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
}

.login-brand-kicker {
    margin: 0;
    font-size: clamp(1.1rem, 1.6vw, 1.45rem);
    font-weight: 500;
    opacity: 0.95;
}

.login-brand-icon {
    width: clamp(180px, 18vw, 280px);
    height: auto;
    max-width: 100%;
    max-height: 160px;
    margin-top: 1.2rem;
    margin-bottom: 1.1rem;
    object-fit: contain;
}

.login-brand-title {
    margin: 0;
    font-size: clamp(2.1rem, 4.1vw, 3.2rem);
    line-height: 1.1;
    font-weight: 700;
    text-align: center;
}

.login-brand-text {
    margin: 1.4rem auto 0;
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
    line-height: 1.45;
    max-width: 260px;
    opacity: 0.8;
}

.login-brand-meta {
    margin: 1.45rem 0 0;
    text-align: center;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    opacity: 0.66;
    text-transform: uppercase;
    position: relative;
    z-index: 1;
}

.login-form-side {
    padding: 2.8rem 4.5vw 2.3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.login-form-title {
    margin: 0;
    font-size: clamp(2rem, 3vw, 2.8rem);
    color: #1d2230;
    font-weight: 700;
    text-align: center;
}

.login-form-subtitle {
    margin: 0.55rem 0 1.65rem;
    color: #6e7583;
    font-size: clamp(0.98rem, 1.2vw, 1.2rem);
    text-align: center;
    width: min(720px, 92%);
}

.login-form {
    width: min(720px, 92%);
    margin: 0 auto;
}

.login-form .mb-3 {
    margin-bottom: 1.3rem !important;
}

.login-label {
    font-size: 1.08rem;
    font-weight: 600;
    color: #2d3240;
    margin-bottom: 0.38rem;
}

.login-control {
    border: none;
    border-bottom: 2px solid rgba(111, 61, 136, 0.35);
    border-radius: 0;
    background-color: transparent;
    color: #202633;
    min-height: 62px;
    font-size: 1.15rem;
    padding: 0.5rem 0;
}

.login-control::placeholder {
    color: #a0a6b4;
    font-size: 1rem;
}

.login-control:focus {
    border-color: var(--login-brand);
    box-shadow: none;
    background-color: transparent;
    color: #202633;
}

.login-form-actions {
    margin-top: 1.55rem;
    text-align: center;
}

.login-submit {
    --bs-btn-color: #ffffff;
    --bs-btn-bg: var(--login-brand);
    --bs-btn-border-color: var(--login-brand);
    --bs-btn-hover-color: #ffffff;
    --bs-btn-hover-bg: #603477;
    --bs-btn-hover-border-color: #603477;
    --bs-btn-active-color: #ffffff;
    --bs-btn-active-bg: var(--login-brand-dark);
    --bs-btn-active-border-color: var(--login-brand-dark);
    --bs-btn-focus-shadow-rgb: 111, 61, 136;
    border-radius: 999px;
    font-weight: 700;
    min-width: 230px;
    font-size: 1.12rem;
    padding: 0.72rem 1.9rem;
}

.login-forgot {
    font-size: 1.06rem;
    color: var(--login-brand);
    text-decoration: none;
}

.login-forgot:hover,
.login-forgot:focus {
    color: #432258;
    text-decoration: underline;
}

.login-alerts .alert {
    margin-bottom: 0.65rem;
    font-size: 1.06rem;
}

@media (min-width: 992px) {
    .login-brand-side {
        justify-content: center;
        align-items: center;
        padding-top: 2.2rem;
        padding-bottom: 3.4rem;
    }

    .login-brand-content {
        margin: 0 auto;
    }

    .login-brand-meta {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 1.15rem;
        margin: 0;
    }
}

@media (max-width: 991px) {
    .login-shell {
        padding: 0;
    }

    .login-card {
        grid-template-columns: 1fr;
        min-height: 100vh;
    }

    .login-brand-side {
        min-height: 34vh;
        padding: 1.3rem 1.1rem 1.8rem;
    }

    .login-brand-side::after {
        top: auto;
        right: 0;
        bottom: -32px;
        width: 100%;
        height: 72px;
        background:
            radial-gradient(circle at center top, #f6f7f9 0 36px, transparent 37px) 0 0 / 72px 72px repeat-x,
            radial-gradient(circle at center top, rgba(205, 221, 245, 0.72) 0 30px, transparent 31px) 8px 8px / 64px 72px repeat-x,
            radial-gradient(circle at center top, rgba(165, 194, 234, 0.5) 0 24px, transparent 25px) 14px 15px / 58px 72px repeat-x;
    }

    .login-brand-content {
        max-width: 330px;
    }

    .login-brand-icon {
        width: clamp(165px, 44vw, 240px);
        height: auto;
        max-height: 138px;
        margin-top: 0.9rem;
        margin-bottom: 0.75rem;
    }

    .login-brand-title {
        font-size: 2.05rem;
    }

    .login-form-side {
        min-height: 66vh;
        padding: 1.8rem 1.2rem 1.3rem;
    }

    .login-form-title {
        font-size: 1.9rem;
    }

    .login-form-subtitle {
        font-size: 1rem;
        margin-bottom: 1.15rem;
    }

    .login-form {
        width: min(520px, 95%);
    }

    .login-label {
        font-size: 1rem;
    }

    .login-control {
        min-height: 52px;
        font-size: 1.05rem;
    }

    .login-submit {
        min-width: 210px;
        font-size: 1.04rem;
        padding-top: 0.58rem;
        padding-bottom: 0.58rem;
    }
}

@media (max-width: 576px) {
    .login-card {
        border-radius: 0;
    }

    .login-brand-side {
        min-height: 30vh;
        padding: 1rem 0.9rem 1.55rem;
    }

    .login-brand-icon {
        width: clamp(150px, 56vw, 210px);
        max-height: 122px;
    }

    .login-brand-kicker {
        font-size: 1.02rem;
    }

    .login-brand-title {
        font-size: 1.9rem;
    }

    .login-brand-text {
        font-size: 0.9rem;
        margin-top: 0.7rem;
    }

    .login-brand-meta {
        font-size: 0.68rem;
    }

    .login-form-title {
        font-size: 1.62rem;
    }

    .login-form-subtitle {
        font-size: 0.95rem;
    }

    .login-submit {
        width: 100%;
        min-width: 0;
    }
}

.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.35);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
    z-index: 1040;
}

body.sidebar-open .sidebar-backdrop {
    opacity: 1;
    visibility: visible;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 260px;
    background-color: #212529;
    color: #f8f9fa;
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1.25rem;
    gap: 1.5rem;
    transform: translateX(-100%);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    z-index: 1050;
}

body.sidebar-open .sidebar {
    transform: translateX(0);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.4);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.sidebar-brand-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: #ffffff;
    font-weight: 600;
    font-size: 1.05rem;
}

.sidebar-brand-link i {
    font-size: 1.4rem;
}

@media (max-width: 991px) {
    .sidebar-brand-link {
        font-size: 0.92rem;
        gap: 0.5rem;
    }

    .sidebar-brand-link span {
        white-space: nowrap;
    }

    .sidebar-brand-link i {
        font-size: 1.2rem;
    }
}

.sidebar-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 1.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0.35rem;
}

.sidebar-menu {
    flex: 1;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.sidebar-theme {
    margin-bottom: 1rem;
}

.sidebar-switch {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    color: rgba(248, 249, 250, 0.75);
    font-size: 0.9rem;
}

.sidebar-switch span:first-child {
    line-height: 1.3;
}

.sidebar-switch input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.sidebar-switch-slider {
    position: relative;
    display: inline-block;
    width: 2.4rem;
    height: 1.3rem;
    background-color: rgba(248, 249, 250, 0.3);
    border-radius: 999px;
    transition: background-color 0.2s ease;
}

.sidebar-switch-slider::before {
    content: '';
    position: absolute;
    top: 0.16rem;
    left: 0.18rem;
    width: 0.98rem;
    height: 0.98rem;
    border-radius: 50%;
    background-color: #212529;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.sidebar-switch input:checked + .sidebar-switch-slider {
    background-color: #0d6efd;
}

.sidebar-switch input:checked + .sidebar-switch-slider::before {
    transform: translateX(1.05rem);
    background-color: #ffffff;
}

.sidebar-fab {
    position: fixed;
    top: 1rem;
    left: 1rem;
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 50%;
    border: none;
    background-color: #212529;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.65rem;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
    cursor: pointer;
    z-index: 1060;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.sidebar-desktop-toggle {
    position: fixed;
    top: 1rem;
    left: 1rem;
    width: 2.75rem;
    height: 2.75rem;
    border: none;
    border-radius: 0.65rem;
    background-color: #212529;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.28);
    cursor: pointer;
    z-index: 1030;
    transition: left 0.3s ease, background-color 0.2s ease, transform 0.2s ease;
}

.sidebar-desktop-toggle:hover {
    transform: translateY(-1px);
}

.sidebar-desktop-toggle:focus-visible {
    outline: 3px solid rgba(13, 110, 253, 0.45);
    outline-offset: 2px;
}

.sidebar-fab:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.35);
    outline-offset: 2px;
}

body.sidebar-open .sidebar-fab,
body.modal-open .sidebar-fab {
    opacity: 0;
    transform: scale(0.85);
    pointer-events: none;
}

.sidebar-section + .sidebar-section {
    margin-top: 1.5rem;
}

.sidebar-section-title {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    color: rgba(248, 249, 250, 0.6);
    margin-bottom: 0.5rem;
}

.sidebar-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-item + .sidebar-item {
    margin-top: 0.25rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.55rem 0.75rem;
    border-radius: 0.6rem;
    text-decoration: none;
    color: rgba(248, 249, 250, 0.75);
    transition: background-color 0.2s ease, color 0.2s ease;
}

.sidebar-link:hover,
.sidebar-link:focus {
    background-color: rgba(248, 249, 250, 0.12);
    color: #ffffff;
}

.sidebar-link i {
    font-size: 1.1rem;
}

.sidebar-link.is-active {
    background-color: rgba(255, 255, 255, 0.18);
    color: #ffffff;
}

.sidebar-sublist {
    list-style: none;
    margin: 0.25rem 0 0.25rem 2.05rem;
    padding: 0;
}

.sidebar-sublink {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.42rem 0.6rem;
    border-radius: 0.5rem;
    color: rgba(248, 249, 250, 0.68);
    font-size: 0.92rem;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.sidebar-sublink:hover,
.sidebar-sublink:focus,
.sidebar-sublink.is-active {
    background-color: rgba(248, 249, 250, 0.12);
    color: #ffffff;
}

.sidebar-sublink i {
    font-size: 0.95rem;
}

.sidebar-footer {
    border-top: 1px solid rgba(248, 249, 250, 0.12);
    padding-top: 1.25rem;
}

.sidebar-profile-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 0.75rem;
}

.sidebar-profile-title i {
    font-size: 1.3rem;
}

.sidebar-avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.45);
}

.avatar-view-button {
    border: 0;
    background: transparent;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.avatar-view-button:focus-visible {
    outline: 3px solid rgba(13, 110, 253, 0.45);
    outline-offset: 2px;
    border-radius: 50%;
}

.sidebar-avatar-button {
    flex: 0 0 auto;
}

.profile-avatar {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #d7dce2;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.avatar-viewer-img {
    width: min(100%, 420px);
    max-height: 70vh;
    object-fit: contain;
    border-radius: 0.75rem;
}

.sidebar-link.text-danger {
    color: #f07178;
}

.sidebar-link.text-danger:hover {
    color: #ffccd2;
}

.app-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-left: 0;
    background-color: #f8f9fa;
}

.app-footer {
    margin: 0;
    padding: 0;
    width: 100vw;
    height: 100px;
    margin-left: calc(50% - 50vw);
    background-color: #aa1a8d;
}

.app-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 3.5rem 1rem 2rem;
}

main {
    flex: 1;
}

.container {
    max-width: 85% !important;
}

.container.app-main-wide {
    max-width: 98% !important;
}

@media (max-width: 991px) {
    .app-main {
        padding: 3.25rem 0.4rem 1.25rem;
    }

    main {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .container {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 0.4rem !important;
        padding-right: 0.4rem !important;
    }
}

footer .bcanner {
    text-align: center;
    padding-top: 15px;
    width: 100%;
    height: 100%;
    background-color: transparent;
}

footer .bcanner img {
    display: inline-block;
    padding-bottom: 5px;
}

body.theme-dark {
    background-color: #12171f;
    color: #f1f3f5;
    --bs-body-bg: #12171f;
    --bs-body-color: #f1f3f5;
    --bs-heading-color: #ffffff;
    --bs-border-color: rgba(255, 255, 255, 0.12);
}

body.theme-dark .app-content {
    background-color: #12171f;
    color: inherit;
}

body.theme-dark .app-main {
    background-color: transparent;
    color: inherit;
}

body.theme-dark main,
body.theme-dark .container {
    color: inherit;
}

body.theme-dark .sidebar {
    background-color: #0f141c;
    color: #f1f3f5;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.45);
}

body.theme-dark .sidebar-section-title {
    color: rgba(241, 243, 245, 0.5);
}

body.theme-dark .sidebar-link {
    color: rgba(241, 243, 245, 0.7);
}

body.theme-dark .sidebar-link:hover,
body.theme-dark .sidebar-link:focus {
    background-color: rgba(13, 110, 253, 0.18);
    color: #ffffff;
}

body.theme-dark .sidebar-link.is-active {
    background-color: rgba(13, 110, 253, 0.35);
    color: #ffffff;
}

body.theme-dark .sidebar-profile-title {
    color: #ffffff;
}

body.theme-dark .sidebar-avatar {
    border-color: rgba(255, 255, 255, 0.35);
}

body.theme-dark .profile-avatar {
    border-color: #2f3a47;
}

body.theme-dark .sidebar-link.text-danger {
    color: #ff8a8a;
}

body.theme-dark .sidebar-link.text-danger:hover {
    color: #ffe7e7;
}

body.theme-dark .sidebar-switch {
    color: rgba(241, 243, 245, 0.75);
}

body.theme-dark .sidebar-switch-slider {
    background-color: rgba(13, 110, 253, 0.35);
}

body.theme-dark .sidebar-switch-slider::before {
    background-color: #0f141c;
}

body.theme-dark .sidebar-fab {
    background-color: #0f141c;
    color: #f1f3f5;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.55);
}

body.theme-dark .sidebar-desktop-toggle {
    background-color: #0f141c;
    color: #f1f3f5;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.45);
}

body.theme-dark .bcanner {
    background-color: #7a1370;
}

body.theme-dark .card,
body.theme-dark .modal-content,
body.theme-dark .dropdown-menu {
    background-color: #18202a;
    color: #f1f3f5;
    border-color: rgba(255, 255, 255, 0.08);
}

body.theme-dark .dropdown-item {
    color: #f1f3f5;
}

body.theme-dark .dropdown-item:hover,
body.theme-dark .dropdown-item:focus {
    color: #ffffff;
    background-color: rgba(13, 110, 253, 0.3);
}

body.theme-dark .form-control,
body.theme-dark .form-select {
    background-color: #121923;
    color: #f1f3f5;
    border-color: rgba(255, 255, 255, 0.16);
}

body.theme-dark .form-control::placeholder {
    color: rgba(241, 243, 245, 0.5);
}

body.theme-dark .form-control:focus,
body.theme-dark .form-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

body.theme-dark .btn-close {
    filter: invert(1);
}

body.theme-dark .alert {
    color: #f1f3f5;
}

body.theme-dark .table {
    --bs-table-bg: #161f2a;
    --bs-table-striped-bg: #1c2734;
    --bs-table-striped-color: #f1f3f5;
    --bs-table-hover-bg: #22303f;
    --bs-table-hover-color: #ffffff;
    --bs-table-color: #f1f3f5;
    --bs-table-border-color: rgba(255, 255, 255, 0.12);
    color: #f1f3f5;
    border-color: rgba(255, 255, 255, 0.08);
}

body.theme-dark .table thead {
    background-color: #1f2835;
    color: #ffffff;
}

body.theme-dark .table > :not(caption) > * > * {
    border-color: rgba(255, 255, 255, 0.08);
}

body.theme-dark .table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: var(--bs-table-striped-bg);
    color: var(--bs-table-striped-color);
}

body.theme-dark .table-hover > tbody > tr:hover > * {
    background-color: var(--bs-table-hover-bg);
    color: var(--bs-table-hover-color);
}

body.theme-dark .text-dark,
body.theme-dark .text-body,
body.theme-dark .text-black,
body.theme-dark .table .text-dark,
body.theme-dark .table .text-body,
body.theme-dark .table .text-black,
body.theme-dark .nav-link.text-dark {
    color: #f1f3f5 !important;
}

body.theme-dark .text-muted,
body.theme-dark .table .text-muted {
    color: rgba(241, 243, 245, 0.6) !important;
}

body.theme-dark .bg-white,
body.theme-dark .table .bg-white,
body.theme-dark .bg-light,
body.theme-dark .table .bg-light {
    background-color: #1f2835 !important;
    color: #f1f3f5 !important;
}

body.theme-dark .table .bg-secondary {
    background-color: #273344 !important;
    color: #ffffff !important;
}

body.theme-dark .table .badge.bg-light,
body.theme-dark .badge.bg-light {
    background-color: rgba(255, 255, 255, 0.18) !important;
    color: #f1f3f5 !important;
}

body.theme-dark .table .badge.bg-dark,
body.theme-dark .badge.bg-dark {
    background-color: #0f141c !important;
    color: #f1f3f5 !important;
}

body.theme-dark .table-secondary,
body.theme-dark .table .table-secondary {
    background-color: #273344 !important;
    color: #f1f3f5 !important;
}

body.theme-dark .table-secondary > th,
body.theme-dark .table-secondary > td,
body.theme-dark .table .table-secondary > th,
body.theme-dark .table .table-secondary > td {
    color: #f1f3f5 !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

body.theme-dark h1,
body.theme-dark h2,
body.theme-dark h3,
body.theme-dark h4,
body.theme-dark h5,
body.theme-dark h6 {
    color: #ffffff;
}

body.theme-dark a {
    color: #91b8ff;
}

body.theme-dark a:hover,
body.theme-dark a:focus {
    color: #c7dcff;
}

@media (max-width: 991px) {
    .bcanner {
        display: none !important;
    }
}

@media (min-width: 992px) {
    body.sidebar-open .sidebar-backdrop {
        opacity: 0;
        visibility: hidden;
    }

    .sidebar {
        transform: none;
        box-shadow: none;
    }

    .app-content {
        margin-left: 260px;
        width: calc(100% - 260px);
    }

    .app-main {
        padding: 2rem 2.5rem 2.5rem;
    }

    body:not(.sidebar-desktop-collapsed) .sidebar-desktop-toggle {
        left: calc(260px + 1rem);
    }

    body.sidebar-desktop-collapsed .sidebar {
        transform: translateX(-100%);
        box-shadow: none;
    }

    body.sidebar-desktop-collapsed .app-content {
        margin-left: 0;
        width: 100%;
    }

    .sidebar-fab {
        display: none;
    }
}







body.theme-dark .btn-success,
body.theme-dark .btn-success:focus,
body.theme-dark .btn-success:hover {
    color: #ffffff !important;
}

/* Calendarios */
.calendar-page .btn-primary,
.calendar-event-form .btn-primary {
    --bs-btn-bg: #771f68;
    --bs-btn-border-color: #771f68;
    --bs-btn-hover-bg: #5e1853;
    --bs-btn-hover-border-color: #5e1853;
    --bs-btn-active-bg: #4f1445;
    --bs-btn-active-border-color: #4f1445;
}

.calendar-page .btn-outline-primary,
.calendar-event-form .btn-outline-primary {
    --bs-btn-color: #771f68;
    --bs-btn-border-color: #771f68;
    --bs-btn-hover-bg: #771f68;
    --bs-btn-hover-border-color: #771f68;
    --bs-btn-hover-color: #ffffff;
    --bs-btn-active-bg: #5e1853;
    --bs-btn-active-border-color: #5e1853;
    --bs-btn-active-color: #ffffff;
}

.calendar-page .link-primary,
.calendar-event-form .link-primary {
    color: #771f68 !important;
}

.calendar-page .link-primary:hover,
.calendar-event-form .link-primary:hover {
    color: #5e1853 !important;
}

.calendar-page .badge.bg-primary,
.calendar-event-form .badge.text-bg-primary {
    background-color: #771f68 !important;
    color: #ffffff !important;
}

.calendar-page .calendar-kicker {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
    font-weight: 700;
    color: #771f68;
}

.calendar-page .calendar-hero {
    background-color: #ffffff;
    border: 1px solid #e7d5e2;
    border-left: 4px solid #771f68;
    border-radius: 0.95rem;
    box-shadow: 0 14px 34px rgba(19, 24, 33, 0.08);
    position: relative;
    overflow: hidden;
}

.calendar-page .calendar-hero::after {
    content: '';
    position: absolute;
    top: -72px;
    right: -42px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background-color: rgba(119, 31, 104, 0.08);
    pointer-events: none;
}

.calendar-page .calendar-hero .card-body {
    position: relative;
    z-index: 1;
}

.calendar-page .calendar-hero h2 {
    letter-spacing: -0.01em;
    font-weight: 700;
}

.parrilla-title-with-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.parrilla-title-logo {
    width: clamp(120px, 18vw, 220px);
    height: 72px;
    flex: 0 0 auto;
    object-fit: contain;
}

.parrilla-logo-current {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.parrilla-logo-current img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    border: 1px solid #e2e8f0;
    border-radius: 0.45rem;
    background-color: #ffffff;
    padding: 0.25rem;
}

.calendar-page .calendar-toolbar .btn,
.calendar-page .calendar-filter-card .btn {
    border-radius: 0.6rem;
}

.calendar-page .calendar-view-switch .btn {
    min-width: 82px;
}

.calendar-day-card {
    border: 1px solid #e7ebf0;
    overflow: hidden;
}

.calendar-day-card.has-events {
    border-left: 4px solid #771f68;
}

.calendar-day-card.no-events {
    border-left: 4px solid #adb5bd;
}

.calendar-day-header {
    background: linear-gradient(90deg, #f8fafc 0%, #ffffff 100%);
    border-bottom: 1px solid #edf1f5;
}

.calendar-day-count {
    background-color: #f4e8f1;
    color: #5e1853;
    border: 1px solid #d9bad1;
    font-weight: 600;
}

.calendar-day-table > :not(caption) > * > * {
    padding-top: 0.8rem;
    padding-bottom: 0.8rem;
}

.calendar-day-table tbody tr:hover {
    background-color: #fbf4f9;
}

.calendar-event-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    display: inline-block;
    box-shadow: 0 0 0 2px rgba(119, 31, 104, 0.2);
}

.calendar-page .calendar-participant-badge {
    background-color: #f4e7f1 !important;
    color: #5a154d !important;
    border: 1px solid #d6aecb !important;
    font-weight: 600;
    margin-right: 0.25rem;
    margin-bottom: 0.2rem;
}

.calendar-mobile-event {
    background-color: #ffffff;
}

.calendar-mobile-event .btn {
    border-radius: 0.5rem;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.65rem;
}

.calendar-year-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.calendar-year-month {
    border: 1px solid #dfe5ed;
    border-radius: 0.8rem;
    background-color: #ffffff;
    overflow: hidden;
    min-height: 220px;
}

.calendar-year-month-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.6rem;
    border-bottom: 1px solid #edf1f5;
    background-color: #f8fafc;
}

.calendar-year-month-link {
    color: #1f2f43;
    font-weight: 700;
    text-decoration: none;
}

.calendar-year-month-link:hover {
    color: #771f68;
}

.calendar-year-month-body {
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.calendar-grid-weekday {
    text-align: center;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #5f6b7a;
    font-weight: 700;
}

.calendar-grid-cell {
    min-height: 170px;
    border: 1px solid #dfe5ed;
    border-radius: 0.8rem;
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.calendar-grid-cell.is-empty {
    border-style: dashed;
    border-color: #aeb9c7;
    background:
        repeating-linear-gradient(
            -45deg,
            rgba(174, 185, 199, 0.2),
            rgba(174, 185, 199, 0.2) 8px,
            rgba(239, 242, 246, 0.95) 8px,
            rgba(239, 242, 246, 0.95) 16px
        );
    color: #647083;
}

.calendar-grid-cell.is-empty .calendar-grid-cell-head {
    background-color: #e6ebf1;
    color: #647083;
}

.calendar-grid-cell-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.45rem 0.55rem;
    border-bottom: 1px solid #edf1f5;
    background-color: #f8fafc;
}

.calendar-day-number {
    font-size: 0.9rem;
    font-weight: 700;
}

.calendar-day-total {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.45rem;
    height: 1.45rem;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 700;
    background-color: #f3e6f0;
    color: #5e1853;
    border: 1px solid #d7b4cd;
    padding: 0 0.35rem;
}

.calendar-grid-cell-body {
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    overflow-y: auto;
}

.calendar-event-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    border: 1px solid #dbe4ef;
    border-left: 4px solid var(--event-color, #771f68);
    border-radius: 0.55rem;
    background-color: color-mix(in srgb, var(--event-color, #771f68) 18%, #ffffff);
    text-align: left;
    padding: 0.35rem 0.45rem;
    cursor: pointer;
    transition: transform 0.14s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.calendar-event-row {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.calendar-event-row.is-overlap {
    display: grid;
    grid-template-columns: repeat(var(--event-row-count, 2), minmax(0, 1fr));
    gap: 0.35rem;
    align-items: start;
}

.calendar-event-row.is-overlap .calendar-event-item {
    min-width: 0;
    width: 100%;
}

.calendar-event-item:hover {
    transform: translateY(-1px);
    background-color: color-mix(in srgb, var(--event-color, #771f68) 26%, #ffffff);
    box-shadow: 0 6px 14px rgba(119, 31, 104, 0.18);
}

.calendar-event-time {
    font-size: 0.7rem;
    font-weight: 700;
    color: #651a58;
    white-space: nowrap;
}

.calendar-event-title {
    font-size: 0.8rem;
    color: #1f2f43;
    line-height: 1.2;
}

.parrilla-space-location {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.45rem;
    padding: 0.38rem 0.55rem;
    border: 1px solid #dfe5ed;
    border-radius: 0.5rem;
    background-color: #f8fafc;
    color: #425066;
    font-size: 0.84rem;
    line-height: 1.25;
}

.parrilla-space-location i {
    color: #771f68;
}

.parrilla-space-location a {
    color: inherit;
    text-decoration: none;
}

.parrilla-space-location a:hover,
.parrilla-space-location a:focus {
    color: #771f68;
    text-decoration: underline;
}

.btn.parrilla-pdf-export {
    --bs-btn-color: #c32026;
    --bs-btn-border-color: #c32026;
    --bs-btn-hover-color: #ffffff;
    --bs-btn-hover-bg: #c32026;
    --bs-btn-hover-border-color: #c32026;
    --bs-btn-active-color: #ffffff;
    --bs-btn-active-bg: #a51c21;
    --bs-btn-active-border-color: #a51c21;
    --bs-btn-focus-shadow-rgb: 195, 32, 38;
    border-width: 2px;
    font-weight: 700;
}

.btn.parrilla-pdf-export i {
    color: #c32026;
}

.btn.parrilla-pdf-export:hover i,
.btn.parrilla-pdf-export:focus i,
.btn.parrilla-pdf-export:active i {
    color: #ffffff;
}

.parrilla-print-summary {
    display: none;
}

.parrilla-config-block {
    margin-bottom: 1rem;
    padding: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.55rem;
    background-color: #ffffff;
}

.parrilla-config-block-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.parrilla-config-block-header h3 {
    margin: 0;
    color: #1f2f43;
    font-size: 1.05rem;
    font-weight: 800;
}

.parrilla-activity-block {
    border: 1px solid #e2e8f0;
    border-radius: 0.55rem;
    padding: 1rem;
    background-color: #ffffff;
}

.parrilla-activity-block-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.parrilla-activity-block-header h3,
.parrilla-permission-block h4 {
    margin: 0;
    color: #1f2f43;
    font-size: 1rem;
    font-weight: 800;
}

.parrilla-permission-block {
    border: 1px solid #e2e8f0;
    border-radius: 0.55rem;
    padding: 1rem;
    height: 100%;
    background-color: #f8fafc;
}

.parrilla-collapse-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
}

.parrilla-collapse-toggle i {
    transition: transform 0.18s ease;
}

.parrilla-collapse-toggle:not(.collapsed) i {
    transform: rotate(180deg);
}

.parrilla-permission-users {
    display: grid;
    gap: 0.35rem;
    margin-top: 0.75rem;
    max-height: 220px;
    overflow: auto;
    padding-right: 0.25rem;
}

.parrilla-config-actions {
    margin-top: 0.25rem;
}

.parrilla-excel-download {
    background-color: #217346;
    border-color: #217346;
}

.parrilla-excel-download:hover,
.parrilla-excel-download:focus {
    background-color: #185c37;
    border-color: #185c37;
}

.parrilla-activities-table-wrap {
    max-height: 70vh;
    overflow: auto;
    position: relative;
}

.parrilla-activities-table {
    min-width: 4200px;
    table-layout: fixed;
}

.parrilla-activities-table th,
.parrilla-activities-table td {
    min-width: 150px;
    max-width: 260px;
    vertical-align: top;
    white-space: normal;
    overflow-wrap: anywhere;
}

.parrilla-activities-table thead th {
    position: sticky;
    top: 0;
    z-index: 5;
    background-color: #f8fafc;
    color: #1f2f43;
    font-size: 0.78rem;
    text-transform: uppercase;
}

.parrilla-activities-table .is-sticky-col {
    position: sticky;
    background-color: #ffffff;
    z-index: 4;
    box-shadow: 1px 0 0 #dfe5ed;
}

.parrilla-activities-table thead .is-sticky-col {
    z-index: 8;
    background-color: #eef3f8;
}

.parrilla-activities-table .sticky-actions {
    left: 0;
    min-width: 150px;
    width: 150px;
}

.parrilla-activities-table .sticky-title {
    left: 150px;
    min-width: 230px;
    width: 230px;
}

.parrilla-activities-table .sticky-date {
    left: 380px;
    min-width: 118px;
    width: 118px;
}

.parrilla-activities-table .sticky-time {
    left: 498px;
    min-width: 132px;
    width: 132px;
}

.parrilla-table-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
}

.parrilla-event-card {
    display: block;
    border-radius: 0.55rem;
    padding: 0.5rem 0.55rem;
    background: color-mix(in srgb, var(--event-color, #771f68) 18%, #ffffff);
}

.parrilla-event-card.is-mobile {
    border: 1px solid #dbe4ef;
    border-left: 4px solid var(--event-color, #771f68);
    background: color-mix(in srgb, var(--event-color, #771f68) 18%, #ffffff);
}

.parrilla-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem 1rem;
    align-items: center;
    padding: 0.75rem 0;
}

.parrilla-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #334155;
    font-size: 0.9rem;
    font-weight: 600;
}

.parrilla-legend-swatch {
    width: 1rem;
    height: 1rem;
    border: 1px solid rgba(15, 23, 42, 0.18);
    border-radius: 0.2rem;
    background-color: var(--legend-color, #7dd3fc);
}

.parrilla-calendar-note {
    padding: 0.9rem 1rem;
    border: 1px solid #dbe4ef;
    border-left: 4px solid #7c3a6d;
    border-radius: 0.55rem;
    background-color: #ffffff;
    color: #172033;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.parrilla-calendar-note p:last-child,
.parrilla-calendar-note ul:last-child,
.parrilla-calendar-note ol:last-child {
    margin-bottom: 0;
}

.parrilla-richtext-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.5rem;
}

.parrilla-richtext-toolbar .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.1rem;
    height: 2rem;
    padding: 0;
}

.parrilla-richtext-editor {
    min-height: 140px;
    height: auto;
    overflow: auto;
}

.parrilla-richtext-editor:empty::before {
    content: attr(aria-label);
    color: #94a3b8;
}

.parrilla-event-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 0.25rem;
}

.parrilla-event-time {
    display: inline-flex;
    align-items: center;
    width: max-content;
    max-width: 100%;
    padding: 0.12rem 0.38rem;
    border-radius: 999px;
    background-color: rgba(119, 31, 104, 0.1);
    color: #651a58;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

.parrilla-modal-badge {
    display: block;
    width: auto;
    max-width: 100%;
    margin-bottom: 0.28rem;
    padding: 0;
    border-radius: 0;
    background-color: transparent !important;
    color: #64748b !important;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: 0;
    text-align: left;
    text-transform: uppercase;
}

.parrilla-activity-modal-body {
    background-color: #f8fafc;
}

.parrilla-modal-title-wrap {
    margin-bottom: 1rem;
    padding: 0.9rem 1rem;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #7c3a6d;
    border-radius: 0.55rem;
    background-color: #ffffff;
}

.parrilla-modal-title {
    margin: 0;
    color: #172033;
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.parrilla-modal-section {
    margin-bottom: 0.8rem;
    padding: 0.95rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.55rem;
    background-color: #ffffff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.parrilla-modal-section:last-child {
    margin-bottom: 0;
}

.parrilla-modal-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.parrilla-modal-section-title {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0;
    color: #1f2f43;
    font-size: 0.95rem;
    font-weight: 800;
}

.parrilla-modal-section-title::before {
    content: "";
    flex: 0 0 auto;
    width: 0.35rem;
    height: 0.95rem;
    border-radius: 999px;
    background-color: #7c3a6d;
}

.parrilla-modal-subtitle {
    margin: 0.85rem 0 0.55rem;
    color: #475569;
    font-size: 0.86rem;
    font-weight: 800;
}

.parrilla-modal-subtitle + .parrilla-modal-section-title {
    display: none;
}

.parrilla-modal-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

.parrilla-modal-field {
    min-width: 0;
    padding: 0.68rem 0.75rem;
    border: 1px solid #e8edf4;
    border-radius: 0.45rem;
    background-color: #f8fafc;
}

.parrilla-modal-field.is-wide,
.parrilla-modal-field.is-full {
    grid-column: 1 / -1;
}

.parrilla-modal-value {
    min-height: 1.35rem;
    color: #172033;
    font-size: 0.96rem;
    font-weight: 650;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.parrilla-modal-value--multiline {
    white-space: pre-line;
}

.parrilla-modal-value a {
    color: #365f91;
    font-weight: 700;
}

@media (max-width: 767.98px) {
    .parrilla-modal-grid {
        grid-template-columns: 1fr;
    }
}

.parrilla-event-title {
    display: block;
    color: #1f2f43;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.parrilla-event-space {
    display: block;
    margin-top: 0.18rem;
    color: #771f68;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.parrilla-event-type {
    color: #771f68;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.parrilla-event-note {
    display: block;
    margin-top: 0.18rem;
    color: #657386;
    font-size: 0.72rem;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.calendar-event-item.is-own .calendar-event-title {
    font-weight: 700;
}

.calendar-empty-note {
    color: #7a8796;
    font-size: 0.78rem;
    padding: 0.25rem 0.1rem;
}

.calendar-out-of-range-note {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: flex-start;
    min-height: 1.75rem;
    padding: 0.25rem 0.55rem;
    border: 1px dashed #93a0b1;
    border-radius: 999px;
    background-color: rgba(255, 255, 255, 0.72);
    color: #526071;
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
}

.calendar-linear-grid {
    display: grid;
    gap: 0.65rem;
}

.calendar-linear-grid:not(.is-day) {
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-linear-grid.is-day {
    grid-template-columns: minmax(0, 1fr);
}

.calendar-linear-day {
    border: 1px solid #dfe5ed;
    border-radius: 0.8rem;
    background-color: #ffffff;
    overflow: hidden;
    min-height: 180px;
}

.calendar-linear-day-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.45rem 0.55rem;
    border-bottom: 1px solid #edf1f5;
    background-color: #f8fafc;
    font-weight: 600;
    font-size: 0.85rem;
}

.calendar-linear-day-body {
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

@media (max-width: 1200px) {
    .calendar-year-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

body.theme-dark .calendar-grid-weekday {
    color: #a8b3c4;
}

body.theme-dark .calendar-grid-cell,
body.theme-dark .calendar-linear-day,
body.theme-dark .calendar-year-month {
    background-color: #1a2635;
    border-color: rgba(255, 255, 255, 0.12);
}

body.theme-dark .calendar-grid-cell.is-empty {
    background: repeating-linear-gradient(
        -45deg,
        #1c2a3a,
        #1c2a3a 8px,
        #1a2535 8px,
        #1a2535 16px
    );
}

body.theme-dark .calendar-grid-cell-head,
body.theme-dark .calendar-linear-day-head,
body.theme-dark .calendar-year-month-head {
    background-color: #1e2c3d;
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

body.theme-dark .calendar-year-month-link {
    color: #e6edf7;
}

body.theme-dark .calendar-year-month-link:hover {
    color: #e7bbdd;
}

body.theme-dark .calendar-day-total {
    background-color: rgba(176, 103, 159, 0.25);
    border-color: rgba(176, 103, 159, 0.5);
    color: #f8dff2;
}

body.theme-dark .calendar-event-item {
    background-color: color-mix(in srgb, var(--event-color, #771f68) 24%, #223347);
    border-color: rgba(255, 255, 255, 0.12);
}

body.theme-dark .calendar-event-item:hover {
    background-color: color-mix(in srgb, var(--event-color, #771f68) 32%, #273a51);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.35);
}

body.theme-dark .calendar-event-time {
    color: #e7bbdd;
}

body.theme-dark .calendar-event-title {
    color: #e6edf7;
}

body.theme-dark .parrilla-space-location {
    background-color: #1e2c3d;
    border-color: rgba(255, 255, 255, 0.12);
    color: #c3cfdf;
}

body.theme-dark .parrilla-space-location i {
    color: #e7bbdd;
}

body.theme-dark .parrilla-space-location a:hover,
body.theme-dark .parrilla-space-location a:focus {
    color: #f0cce8;
}

body.theme-dark .parrilla-event-card,
body.theme-dark .parrilla-event-card.is-mobile {
    background: color-mix(in srgb, var(--event-color, #771f68) 24%, #223347);
    border-color: rgba(255, 255, 255, 0.12);
}

body.theme-dark .parrilla-event-time {
    background-color: rgba(231, 187, 221, 0.14);
    color: #f4d2ed;
}

body.theme-dark .parrilla-event-title {
    color: #e6edf7;
}

body.theme-dark .parrilla-event-note {
    color: #a8b3c4;
}

body.theme-dark .parrilla-activities-table thead th,
body.theme-dark .parrilla-activities-table thead .is-sticky-col {
    background-color: #223046;
    color: #e6edf7;
}

body.theme-dark .parrilla-activities-table .is-sticky-col {
    background-color: #1b2635;
    box-shadow: 1px 0 0 rgba(255, 255, 255, 0.12);
}

body.theme-dark .parrilla-activity-modal-body {
    background-color: #121a26;
}

body.theme-dark .parrilla-modal-title-wrap,
body.theme-dark .parrilla-modal-section {
    background-color: #1b2635;
    border-color: rgba(255, 255, 255, 0.12);
}

body.theme-dark .parrilla-modal-title {
    color: #eef3f8;
}

body.theme-dark .parrilla-modal-badge,
body.theme-dark .parrilla-modal-subtitle {
    color: #a8b3c4 !important;
}

body.theme-dark .parrilla-modal-section-title {
    color: #e6edf7;
}

body.theme-dark .parrilla-modal-field {
    background-color: #162130;
    border-color: rgba(255, 255, 255, 0.1);
}

body.theme-dark .parrilla-modal-value {
    color: #eef3f8;
}

body.theme-dark .parrilla-modal-value a {
    color: #9fc3ef;
}

body.theme-dark .calendar-empty-note {
    color: #9facbf;
}

body.theme-dark .calendar-page .calendar-kicker {
    color: #d7a0cc;
}

body.theme-dark .calendar-page .calendar-hero {
    background-color: #1b2029;
    border-color: rgba(215, 160, 204, 0.3);
    border-left-color: #b0679f;
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.32);
}

body.theme-dark .calendar-page .calendar-hero::after {
    background-color: rgba(176, 103, 159, 0.18);
}

body.theme-dark .calendar-day-card {
    border-color: rgba(255, 255, 255, 0.1);
}

body.theme-dark .calendar-day-card.has-events {
    border-left-color: #b0679f;
}

body.theme-dark .calendar-day-card.no-events {
    border-left-color: #687180;
}

body.theme-dark .calendar-day-header {
    background: linear-gradient(90deg, #1a2432 0%, #182230 100%);
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

body.theme-dark .calendar-day-count {
    background-color: rgba(176, 103, 159, 0.25);
    border-color: rgba(176, 103, 159, 0.5);
    color: #f8dff2;
}

body.theme-dark .calendar-day-table tbody tr:hover {
    background-color: rgba(176, 103, 159, 0.18);
}

body.theme-dark .calendar-page .calendar-participant-badge {
    background-color: #4b2e44 !important;
    color: #f9e8f6 !important;
    border-color: #b884ad !important;
}

body.theme-dark .calendar-mobile-event {
    background-color: color-mix(in srgb, var(--event-color, #771f68) 24%, #1a2635);
    border-color: rgba(255, 255, 255, 0.1) !important;
    border-left-color: var(--event-color, #771f68) !important;
}

body.theme-dark .parrilla-legend-item {
    color: #dbeafe;
}

body.theme-dark .parrilla-legend-swatch {
    border-color: rgba(255, 255, 255, 0.28);
}

body.theme-dark .parrilla-calendar-note {
    background-color: #1b2635;
    border-color: rgba(255, 255, 255, 0.12);
    border-left-color: #b0679f;
    color: #e6edf7;
}

@media print {
    body.parrilla-printing {
        display: block;
        min-height: auto;
        background: #ffffff !important;
        color: #000000 !important;
    }

    body.parrilla-printing .sidebar,
    body.parrilla-printing .sidebar-backdrop,
    body.parrilla-printing .sidebar-fab,
    body.parrilla-printing .sidebar-desktop-toggle,
    body.parrilla-printing .app-footer,
    body.parrilla-printing .calendar-filter-card,
    body.parrilla-printing .modal,
    body.parrilla-printing .alert {
        display: none !important;
    }

    body.parrilla-printing .app-content,
    body.parrilla-printing .app-main,
    body.parrilla-printing main.container,
    body.parrilla-printing .calendar-page {
        display: block !important;
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    body.parrilla-printing .calendar-hero,
    body.parrilla-printing .calendar-grid-cell,
    body.parrilla-printing .parrilla-event-card,
    body.parrilla-printing .parrilla-event-card.is-mobile {
        box-shadow: none !important;
    }

    body.parrilla-printing .calendar-hero {
        margin-bottom: 0.35rem !important;
        border: 1px solid #d5dbe5 !important;
        border-left: 4px solid #771f68 !important;
        break-inside: avoid;
    }

    body.parrilla-printing .calendar-hero .card-body {
        padding: 0.55rem 0.7rem !important;
    }

    body.parrilla-printing .calendar-hero .d-flex.flex-wrap.gap-2 {
        display: none !important;
    }

    body.parrilla-printing .calendar-kicker {
        margin-bottom: 0.1rem !important;
        color: #4a5568 !important;
        font-size: 0.75rem !important;
    }

    body.parrilla-printing .calendar-hero h2 {
        margin-bottom: 0.15rem !important;
        font-size: 1.25rem !important;
        color: #111827 !important;
    }

    body.parrilla-printing .calendar-hero p,
    body.parrilla-printing .text-muted {
        color: #4b5563 !important;
    }

    body.parrilla-printing .parrilla-print-summary {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.45rem;
        margin: 0 0 0.55rem;
        padding: 0.45rem 0.55rem;
        border: 1px solid #d5dbe5;
        background: #f8fafc;
        color: #1f2937;
        font-size: 0.76rem;
        break-inside: avoid;
    }

    body.parrilla-printing .d-none.d-md-block {
        display: block !important;
    }

    body.parrilla-printing .d-md-none {
        display: none !important;
    }

    body.parrilla-printing .calendar-grid {
        display: grid !important;
        grid-template-columns: repeat(7, minmax(0, 1fr));
        gap: 0.28rem;
    }

    body.parrilla-printing .calendar-grid-weekday {
        color: #374151 !important;
        font-size: 0.58rem;
        letter-spacing: 0;
    }

    body.parrilla-printing .calendar-grid-cell {
        min-height: 90px;
        border-color: #cfd7e3 !important;
        border-radius: 0.25rem;
        background: #ffffff !important;
        break-inside: avoid;
    }

    body.parrilla-printing .calendar-grid-cell.is-empty {
        background: #f3f4f6 !important;
    }

    body.parrilla-printing .calendar-grid-cell-head {
        padding: 0.2rem 0.28rem;
        border-bottom-color: #e5e7eb !important;
        background: #f8fafc !important;
    }

    body.parrilla-printing .calendar-day-number {
        font-size: 0.68rem;
    }

    body.parrilla-printing .calendar-day-total {
        min-width: 1rem;
        height: 1rem;
        padding: 0 0.18rem;
        border-color: #d7b4cd !important;
        background: #f3e6f0 !important;
        color: #5e1853 !important;
        font-size: 0.55rem;
    }

    body.parrilla-printing .calendar-grid-cell-body {
        gap: 0.18rem;
        padding: 0.25rem;
        overflow: visible !important;
    }

    body.parrilla-printing .calendar-event-item,
    body.parrilla-printing .parrilla-event-card {
        transform: none !important;
        display: block !important;
        cursor: default;
        padding: 0.18rem 0.24rem;
        border-color: #dbe4ef !important;
        border-left-color: var(--event-color, #771f68) !important;
        border-radius: 0.22rem;
        background: color-mix(in srgb, var(--event-color, #771f68) 16%, #ffffff) !important;
        color: #111827 !important;
    }

    body.parrilla-printing .parrilla-event-header {
        margin-bottom: 0.08rem;
    }

    body.parrilla-printing .parrilla-event-time {
        padding: 0;
        border-radius: 0;
        background: transparent !important;
        color: #651a58 !important;
        font-size: 0.52rem;
    }

    body.parrilla-printing .parrilla-event-title {
        color: #111827 !important;
        font-size: 0.58rem;
        line-height: 1.12;
    }

    body.parrilla-printing .parrilla-event-space,
    body.parrilla-printing .parrilla-event-type,
    body.parrilla-printing .parrilla-event-note,
    body.parrilla-printing .calendar-empty-note {
        color: #4b5563 !important;
        font-size: 0.5rem;
        line-height: 1.12;
    }

    body.parrilla-printing .parrilla-legend {
        display: flex !important;
        margin-top: 0.45rem !important;
        padding: 0.35rem 0 0;
        gap: 0.35rem 0.65rem;
        break-inside: avoid;
    }

    body.parrilla-printing .parrilla-legend-item {
        color: #1f2937 !important;
        font-size: 0.68rem;
    }

    body.parrilla-printing .parrilla-legend-swatch {
        width: 0.7rem;
        height: 0.7rem;
        border-color: rgba(15, 23, 42, 0.3) !important;
        background-color: var(--legend-color, #7dd3fc) !important;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    body.parrilla-printing .parrilla-calendar-note {
        margin-top: 0.45rem !important;
        padding: 0.45rem 0.55rem;
        border-color: #d5dbe5 !important;
        border-left-color: #771f68 !important;
        background: #ffffff !important;
        color: #111827 !important;
        font-size: 0.72rem;
        break-inside: avoid;
    }

    body.parrilla-printing .text-muted.small.mt-3 {
        display: block !important;
        margin-top: 0.45rem !important;
        color: #374151 !important;
        font-size: 0.72rem;
        break-inside: avoid;
    }
}
