@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --color-primary: #ff4f9d;
    --color-secondary: #6f57ff;
    --color-accent: #44d0ff;
    --bg-deep: #070913;
    --bg-board: #10162a;
    --bg-panel: #111827;
    --surface: #121a2f;
    --surface-soft: #19223a;
    --surface-elevated: #1d2843;
    --text-main: #eef4ff;
    --text-muted: #9eb0d2;
    --border-color: #273555;
    --border-strong: #3a4e78;
    --shadow-sm: 0 10px 18px rgba(1, 5, 18, 0.26);
    --shadow-lg: 0 24px 50px rgba(1, 6, 20, 0.45);
    --radius-lg: 1rem;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: linear-gradient(140deg, #05070f 0%, #171436 50%, #341449 100%);
    color: var(--text-main);
}

#app-view {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    background:
        radial-gradient(circle at 12% 14%, rgba(111, 87, 255, 0.22), transparent 42%),
        radial-gradient(circle at 82% 84%, rgba(255, 79, 157, 0.22), transparent 45%),
        linear-gradient(150deg, #070913 0%, #10162a 48%, #2d1740 100%);
}

#app-view::before {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        -45deg,
        transparent 0 22px,
        rgba(255, 255, 255, 0.014) 22px 23px
    );
    pointer-events: none;
    z-index: 0;
}

#app-view > * {
    position: relative;
    z-index: 1;
}

main {
    min-width: 0;
    overflow: hidden;
    background: transparent;
}

#section-container {
    flex: 1 1 auto;
    width: 100%;
    max-width: none;
    min-width: 0;
    margin: 0;
    padding: 1.1rem 1.4rem 1.8rem;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-gutter: stable both-edges;
    overscroll-behavior: contain;
    overflow-anchor: none;
    scroll-behavior: smooth;
}

#section-container > section {
    padding-top: 0.5rem !important;
    margin-top: 0 !important;
}

#section-container > section > :first-child {
    margin-top: 0 !important;
}

#app-view > main > header {
    background: rgba(9, 12, 22, 0.86) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color) !important;
    flex-shrink: 0;
}

#header-container {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0 1.4rem;
}

#app-view #current-section-title {
    color: #f1f5ff !important;
}

#app-view #date {
    color: #9eb0d2 !important;
}

section {
    min-width: 0;
}

aside {
    width: 274px !important;
    flex-shrink: 0;
    border-right: 1px solid rgba(102, 122, 178, 0.22) !important;
    background:
        radial-gradient(circle at 8% 8%, rgba(111, 87, 255, 0.25), transparent 44%),
        linear-gradient(180deg, rgba(4, 8, 22, 0.96) 0%, rgba(4, 10, 26, 0.98) 100%) !important;
}

.nav-link {
    color: #9caed2;
    font-weight: 600;
    font-size: 0.92rem;
    margin: 0.24rem 0.55rem;
    padding: 0.8rem 0.95rem !important;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

.nav-link:hover,
.active-nav {
    color: #f4f8ff;
    background: rgba(137, 170, 255, 0.09) !important;
}

.active-nav {
    border-left: 3px solid var(--color-primary) !important;
    box-shadow: inset 0 0 0 1px rgba(255, 79, 157, 0.2);
}

#app-view .bg-white {
    background: var(--surface) !important;
}

#app-view .bg-slate-50 {
    background: var(--surface-soft) !important;
}

#app-view .bg-slate-100 {
    background: rgba(60, 78, 119, 0.28) !important;
}

#app-view .bg-slate-200 {
    background: rgba(86, 107, 151, 0.35) !important;
}

#app-view .bg-blue-50 {
    background: rgba(64, 123, 255, 0.16) !important;
}

#app-view .bg-blue-100 {
    background: rgba(64, 123, 255, 0.24) !important;
}

#app-view .bg-green-50 {
    background: rgba(33, 170, 94, 0.17) !important;
}

#app-view .bg-green-100 {
    background: rgba(33, 170, 94, 0.24) !important;
}

#app-view .bg-purple-50,
#app-view .bg-purple-50\/50 {
    background: rgba(138, 84, 255, 0.15) !important;
}

#app-view .bg-purple-100 {
    background: rgba(138, 84, 255, 0.22) !important;
}

#app-view .border-slate-50,
#app-view .border-slate-100,
#app-view .border-slate-200,
#app-view .border-slate-300 {
    border-color: var(--border-color) !important;
}

#app-view .border-blue-100 {
    border-color: rgba(64, 123, 255, 0.35) !important;
}

#app-view .border-purple-200 {
    border-color: rgba(138, 84, 255, 0.36) !important;
}

#app-view .text-slate-900,
#app-view .text-slate-800,
#app-view .text-slate-700 {
    color: var(--text-main) !important;
}

#app-view .text-slate-600,
#app-view .text-slate-500,
#app-view .text-slate-400 {
    color: var(--text-muted) !important;
}

#app-view .text-blue-600 {
    color: #75b8ff !important;
}

#app-view .text-blue-700 {
    color: #8fc6ff !important;
}

#app-view .text-purple-600 {
    color: #bb9fff !important;
}

#app-view .text-purple-700 {
    color: #ceb8ff !important;
}

#app-view .text-green-600 {
    color: #76eaa4 !important;
}

#app-view .text-green-700 {
    color: #92f2b7 !important;
}
#app-view .text-red-500,
#app-view .text-red-600 {
    color: #ff8ea4 !important;
}

#app-view .shadow-sm,
#app-view .shadow,
#app-view .shadow-lg,
#app-view .shadow-xl,
#app-view .shadow-2xl {
    box-shadow: var(--shadow-sm) !important;
}

#app-view .rounded-2xl,
#app-view .rounded-3xl,
#app-view .rounded-xl {
    border-radius: 14px !important;
}

#app-view .divide-y > :not([hidden]) ~ :not([hidden]) {
    border-top-color: rgba(63, 83, 127, 0.45) !important;
}

.table-responsive {
    overflow-x: auto;
}

.table-responsive table {
    min-width: 760px;
}

#app-view .table-responsive,
#app-view .table-container {
    border-radius: 14px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    background: linear-gradient(180deg, #090d18 0%, #111827 100%);
    box-shadow: var(--shadow-sm);
}

#app-view table {
    width: 100%;
    border-spacing: 0;
}

#app-view thead th {
    background: #070b15 !important;
    padding: 0.95rem 1.2rem;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #b4c7ea !important;
    border-bottom: 1px solid var(--border-color);
}

#app-view tbody td {
    padding: 1rem 1.2rem;
    border-bottom: 1px solid rgba(42, 58, 92, 0.55);
    vertical-align: middle;
    word-break: break-word;
    color: #e5ecff;
    background: rgba(20, 28, 47, 0.95);
}

#app-view tbody tr:last-child td {
    border-bottom: none;
}

#app-view tbody tr:hover td {
    background: rgba(27, 38, 63, 0.96) !important;
}

.card-professional {
    background: linear-gradient(165deg, rgba(25, 34, 58, 0.98), rgba(16, 24, 43, 0.98)) !important;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color) !important;
    padding: 1.2rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.card-professional:hover {
    transform: translateY(-2px);
    border-color: rgba(120, 173, 255, 0.45) !important;
    box-shadow: var(--shadow-lg);
}

.card-hover {
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg) !important;
}

.dashboard-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.65rem;
}

.dashboard-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 2.6rem;
    padding: 0.58rem 1rem;
    border-radius: 0.8rem;
    border: 1px solid transparent;
    font-size: 0.74rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    transition: all 0.18s ease;
}

.dashboard-action-btn-secondary {
    background: rgba(18, 30, 54, 0.9);
    border-color: rgba(109, 136, 192, 0.45);
    color: #dfeaff;
    box-shadow: 0 8px 16px rgba(2, 8, 23, 0.3);
}

.dashboard-action-btn-secondary:hover {
    background: rgba(33, 50, 84, 0.94);
    border-color: rgba(136, 167, 231, 0.65);
    color: #ffffff;
}

.dashboard-action-btn-primary {
    background: linear-gradient(102deg, #2f6fed 0%, #4f82ff 100%);
    border-color: rgba(130, 170, 255, 0.58);
    color: #ffffff;
    box-shadow: 0 10px 22px rgba(46, 97, 209, 0.42);
}

.dashboard-action-btn-primary:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

.kpi-card {
    --kpi-accent: #76b4ff;
    --kpi-icon-bg: rgba(118, 180, 255, 0.16);
    --kpi-badge-bg: rgba(118, 180, 255, 0.2);
    --kpi-badge-color: #c6ddff;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    min-height: 164px;
    padding: 1rem 1.05rem;
    border-radius: 14px;
    border: 1px solid rgba(60, 85, 133, 0.72);
    background: linear-gradient(168deg, rgba(24, 36, 62, 0.98), rgba(14, 23, 43, 0.98));
    overflow: hidden;
    box-shadow: 0 12px 24px rgba(2, 8, 26, 0.34);
}

.kpi-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: linear-gradient(90deg, var(--kpi-accent), rgba(255, 255, 255, 0.08));
    opacity: 0.95;
}

.kpi-card::after {
    content: "";
    position: absolute;
    right: -22px;
    top: -28px;
    width: 88px;
    height: 88px;
    border-radius: 999px;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.11), transparent 68%);
    pointer-events: none;
}

.kpi-card:hover {
    border-color: rgba(119, 157, 230, 0.86);
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(2, 10, 31, 0.46);
}

.kpi-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.kpi-card-icon {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    color: var(--kpi-accent);
    background: var(--kpi-icon-bg);
    border: 1px solid rgba(142, 174, 233, 0.24);
}

.kpi-card-badge {
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.24rem 0.5rem;
    border-radius: 999px;
    color: var(--kpi-badge-color);
    background: var(--kpi-badge-bg);
    border: 1px solid rgba(143, 173, 228, 0.24);
}

.kpi-card-title {
    font-size: 0.74rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 800;
    color: #9fb4da;
    margin: 0;
}

.kpi-card-value {
    margin: 0;
    font-size: 2rem;
    line-height: 1.06;
    font-weight: 900;
    color: #f5f9ff;
    letter-spacing: 0.01em;
}

.kpi-card-sub {
    margin: 0.08rem 0 0;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #89a0ca;
}

.kpi-card--revenue {
    --kpi-accent: #46d8ac;
    --kpi-icon-bg: rgba(52, 211, 153, 0.16);
    --kpi-badge-bg: rgba(52, 211, 153, 0.2);
    --kpi-badge-color: #b8f6df;
}

.kpi-card--pending {
    --kpi-accent: #ab8dff;
    --kpi-icon-bg: rgba(168, 124, 255, 0.16);
    --kpi-badge-bg: rgba(168, 124, 255, 0.22);
    --kpi-badge-color: #e1d4ff;
}

.kpi-card--selection {
    --kpi-accent: #5ea9ff;
    --kpi-icon-bg: rgba(94, 169, 255, 0.16);
    --kpi-badge-bg: rgba(94, 169, 255, 0.2);
    --kpi-badge-color: #cce6ff;
}

.kpi-card--critical {
    --kpi-accent: #ffae67;
    --kpi-icon-bg: rgba(255, 174, 103, 0.16);
    --kpi-badge-bg: rgba(255, 174, 103, 0.22);
    --kpi-badge-color: #ffe0c0;
}

.kpi-card--expenses {
    --kpi-accent: #ff819d;
    --kpi-icon-bg: rgba(255, 129, 157, 0.17);
    --kpi-badge-bg: rgba(255, 129, 157, 0.22);
    --kpi-badge-color: #ffd2dc;
}

.gallery-card-preview {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
    border-radius: 0.75rem;
    background-color: #10172b;
}

.gallery-preview-frame {
    display: block;
    border: 0;
    pointer-events: none;
}

#det-galleries-list .gallery-preview-img {
    height: 172px;
    object-fit: contain;
    background: rgba(15, 23, 42, 0.28);
    display: block;
}

#det-galleries-list img {
    object-position: center;
}

.btn-lumira-primary {
    background: linear-gradient(95deg, #ff4f9d 0%, #ff6fae 100%);
    color: #fff;
    transition: all 0.2s ease;
}

.btn-lumira-primary:hover {
    filter: brightness(1.08);
    box-shadow: 0 10px 26px rgba(255, 79, 157, 0.34);
    transform: translateY(-1px);
}

#app-view input:not([type="checkbox"]):not([type="radio"]),
#app-view select,
#app-view textarea {
    background: #131b30 !important;
    border: 1px solid #33456c !important;
    color: #ebf3ff !important;
}

#app-view input[type="checkbox"],
#app-view input[type="radio"] {
    accent-color: #ff4f9d;
    background: #ffffff !important;
    border: 1px solid #8ea5cf !important;
}

#app-view input::placeholder,
#app-view textarea::placeholder {
    color: #8ea1c7 !important;
}

#app-view input:not([type="checkbox"]):not([type="radio"]):focus,
#app-view select:focus,
#app-view textarea:focus {
    border-color: #6f98ff !important;
    box-shadow: 0 0 0 2px rgba(111, 152, 255, 0.22) !important;
}

#modal-sesion .session-addon-card {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 64px;
    padding: 0.55rem 0.6rem;
    border: 1px solid #33456c;
    border-radius: 0.75rem;
    background: #18243f;
    color: #eef4ff;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

#modal-sesion .session-addon-card:hover {
    background: #1d2b4c;
    border-color: #6f98ff;
}

#modal-sesion .session-addon-card > input[type="checkbox"] {
    width: 15px;
    height: 15px;
    margin-top: 0.1rem;
    flex-shrink: 0;
}

#modal-sesion .session-addon-text {
    display: block;
    font-size: 0.64rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    line-height: 1.2;
    color: #eef4ff;
    flex: 1;
}

#modal-sesion .session-addon-price {
    font-size: 0.64rem;
    font-weight: 900;
    color: #8fc6ff;
    white-space: nowrap;
}

#modal-sesion .session-addon-card--other {
    display: block;
    cursor: default;
}

#modal-sesion .session-addon-card--other input[type="number"] {
    width: 100%;
    margin-top: 0.35rem;
    border-radius: 0.55rem;
    padding: 0.45rem 0.5rem;
    font-size: 0.84rem;
    font-weight: 700;
}

.calendar-cell {
    background-color: #10172c;
    min-height: 124px;
    transition: background-color 0.12s;
    border: 0.5px solid #28395f;
}

.calendar-cell:hover {
    background-color: #16213b;
}

.calendar-day-num {
    font-size: 0.75rem;
    font-weight: 700;
    color: #b6c7e8;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 4px auto 0;
    border-radius: 50%;
}

.calendar-day-num.is-today {
    background: linear-gradient(130deg, #ff4f9d 0%, #8f66ff 100%);
    color: #ffffff !important;
}

.calendar-event-chip {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 6px;
    border-radius: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 3px;
}

#calendar-context-menu {
    box-shadow: var(--shadow-lg);
}

.calendar-cell.drag-over {
    background-color: #1f2d4d !important;
    box-shadow: inset 0 0 0 2px #77a2ff;
}

.calendar-cell.is-unavailable {
    background-color: rgba(120, 38, 55, 0.45) !important;
}

.calendar-cell.is-unavailable .calendar-day-num {
    color: #ff9db0;
}

.day-availability-modal {
    background: linear-gradient(170deg, #0f162a 0%, #101a31 52%, #0f1a34 100%);
    border: 1px solid #2f436f;
    border-radius: 16px;
    box-shadow: 0 26px 58px rgba(1, 8, 26, 0.58);
    max-height: 86vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.day-availability-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    padding: 1rem 1.1rem;
    border-bottom: 1px solid rgba(58, 83, 133, 0.52);
    background: rgba(11, 18, 34, 0.72);
}

.day-availability-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.day-availability-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.85rem 1.1rem 0.5rem;
}

.day-availability-slots {
    padding: 0.35rem 1.1rem 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.day-slot-row {
    display: grid;
    grid-template-columns: 104px 1fr auto;
    align-items: center;
    gap: 0.75rem;
    border-radius: 12px;
    border: 1px solid #2f436f;
    background: rgba(22, 35, 61, 0.84);
    padding: 0.58rem 0.7rem;
}

.day-slot-row--free {
    border-color: rgba(65, 178, 132, 0.52);
    background: rgba(18, 45, 42, 0.48);
}

.day-slot-row--busy {
    border-color: rgba(86, 137, 227, 0.58);
    background: rgba(19, 35, 64, 0.58);
}

.day-slot-row--blocked {
    border-color: rgba(190, 95, 125, 0.52);
    background: rgba(60, 24, 38, 0.54);
}

.day-slot-time {
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #d4e3ff;
}

.day-slot-main {
    min-width: 0;
}

.day-slot-title {
    margin: 0;
    font-size: 0.81rem;
    font-weight: 800;
    color: #f1f6ff;
}

.day-slot-meta {
    margin: 0.1rem 0 0;
    font-size: 0.7rem;
    color: #a8bddf;
    line-height: 1.28;
}

.day-slot-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0.2rem 0.5rem;
    font-size: 0.61rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    border: 1px solid transparent;
}

.day-slot-tag--free {
    color: #c6f6df;
    background: rgba(48, 191, 136, 0.18);
    border-color: rgba(67, 191, 143, 0.38);
}

.day-slot-tag--busy {
    color: #cce1ff;
    background: rgba(96, 152, 255, 0.18);
    border-color: rgba(102, 156, 255, 0.38);
}

.day-slot-tag--blocked {
    color: #ffd0da;
    background: rgba(245, 114, 149, 0.2);
    border-color: rgba(245, 114, 149, 0.4);
}

.day-slot-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    border-radius: 9px;
    border: 1px solid transparent;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.42rem 0.62rem;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.day-slot-btn-primary {
    color: #ffffff;
    background: linear-gradient(102deg, #2f6fed 0%, #4f82ff 100%);
    border-color: rgba(130, 170, 255, 0.58);
}

.day-slot-btn-primary:hover {
    filter: brightness(1.08);
}

.day-slot-btn-view {
    color: #d4e3ff;
    background: rgba(32, 50, 83, 0.82);
    border-color: rgba(119, 149, 210, 0.52);
}

.day-slot-btn-view:hover {
    background: rgba(42, 64, 103, 0.92);
}

.day-slot-btn-ghost {
    color: #cfe0ff;
    background: rgba(24, 37, 64, 0.72);
    border-color: rgba(101, 127, 180, 0.45);
}

.day-slot-btn-ghost:hover {
    background: rgba(35, 52, 85, 0.85);
}

/* Agenda en modo claro (solicitado) */
#agenda-view .bg-white {
    background: #ffffff !important;
}

#agenda-view .bg-slate-50 {
    background: #f8fafc !important;
}

#agenda-view .bg-slate-50\/50 {
    background: #f8fafc !important;
}

#agenda-view .bg-slate-100 {
    background: #f1f5f9 !important;
}

#agenda-view .bg-slate-200 {
    background: #e2e8f0 !important;
}

#agenda-view .bg-blue-50 {
    background: #eff6ff !important;
}

#agenda-view .bg-blue-100 {
    background: #dbeafe !important;
}

#agenda-view .text-slate-900,
#agenda-view .text-slate-800,
#agenda-view .text-slate-700 {
    color: #0f172a !important;
}

#agenda-view .text-slate-600,
#agenda-view .text-slate-500,
#agenda-view .text-slate-400 {
    color: #64748b !important;
}

#agenda-view .text-blue-600,
#agenda-view .text-blue-700 {
    color: #2563eb !important;
}

#agenda-view .text-green-600,
#agenda-view .text-green-700 {
    color: #15803d !important;
}

#agenda-view .border-slate-100,
#agenda-view .border-slate-200,
#agenda-view .border-slate-300 {
    border-color: #e2e8f0 !important;
}

#agenda-view #calendar-grid {
    background: #e2e8f0 !important;
    border-color: #e2e8f0 !important;
}

#agenda-view .calendar-cell {
    background-color: #ffffff !important;
    border: 0.5px solid #e2e8f0 !important;
    min-height: 118px;
}

#agenda-view .calendar-cell:hover {
    background-color: #f8fafc !important;
}

#agenda-view .calendar-cell.drag-over {
    background-color: #eff6ff !important;
    box-shadow: inset 0 0 0 2px #3b82f6;
}

#agenda-view .calendar-cell.is-unavailable {
    background-color: #fef2f2 !important;
}

#agenda-view .calendar-day-num {
    color: #64748b !important;
}

#agenda-view .calendar-day-num.is-today {
    color: #ffffff !important;
}

#agenda-view .calendar-event-chip {
    border: 1px solid rgba(148, 163, 184, 0.35);
}

#agenda-view .table-responsive,
#agenda-view .table-container {
    background: #ffffff;
    border-color: #e2e8f0;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
}

/* Contraste extra en tarjetas del workflow */
.kanban-card .text-slate-900,
.kanban-card .text-slate-800,
.kanban-card .text-slate-700 {
    color: #f3f8ff !important;
}

.kanban-card .text-slate-600,
.kanban-card .text-slate-500,
.kanban-card .text-slate-400 {
    color: #c5d3ee !important;
}

.kanban-card .text-blue-600,
.kanban-card .text-blue-700 {
    color: #9ac6ff !important;
}

.kanban-card .text-green-600,
.kanban-card .text-green-700 {
    color: #93f2b6 !important;
}

.kanban-card .text-red-500,
.kanban-card .text-red-600 {
    color: #ff9bb0 !important;
}

.kanban-card .bg-slate-100\/60 {
    background: rgba(32, 44, 71, 0.9) !important;
    border-color: #39507d !important;
}

#workflow-editor {
    overflow-x: auto;
    padding-bottom: 1.25rem;
}

.workflow-toolbar {
    background: rgba(10, 15, 28, 0.72);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 0.95rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.9rem;
}

.workflow-board {
    display: flex;
    gap: 1rem;
    min-width: max-content;
    padding-bottom: 0.5rem;
}

.kanban-lane {
    width: 320px;
    min-width: 320px;
    border-radius: 14px;
    border: 1px solid var(--border-color);
    background: linear-gradient(180deg, rgba(7, 11, 23, 0.95), rgba(16, 23, 42, 0.95));
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 205px);
}

.kanban-lane-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.78rem 0.9rem;
    border-bottom: 1px solid rgba(44, 61, 99, 0.7);
    position: sticky;
    top: 0;
    background: rgba(9, 13, 24, 0.96);
    z-index: 2;
}

.kanban-lane-title {
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 800;
    color: #d4e1ff;
}

.kanban-lane-count {
    font-size: 0.72rem;
    font-weight: 800;
    color: #101728;
    background: #94b2ff;
    padding: 0.18rem 0.5rem;
    border-radius: 999px;
}

.kanban-lane-body {
    padding: 0.7rem 0.7rem 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    scrollbar-width: thin;
    scrollbar-color: #5372aa rgba(16, 24, 44, 0.65);
    scrollbar-gutter: stable;
}

.kanban-lane-body::-webkit-scrollbar {
    width: 8px;
}

.kanban-lane-body::-webkit-scrollbar-track {
    background: rgba(16, 24, 44, 0.65);
    border-radius: 999px;
}

.kanban-lane-body::-webkit-scrollbar-thumb {
    background: #5372aa;
    border-radius: 999px;
}

.kanban-card {
    position: relative;
    overflow: hidden;
    background: linear-gradient(165deg, #18233b 0%, #121a2f 100%);
    border: 1px solid #354c79;
    border-radius: 12px;
    padding: 0.78rem;
    color: #e9f0ff;
    box-shadow: 0 10px 22px rgba(1, 6, 20, 0.33);
    transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.kanban-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 2px;
    background: linear-gradient(90deg, rgba(138, 190, 255, 0.8), rgba(255, 126, 180, 0.8));
    opacity: 0.85;
}

.kanban-card:hover {
    border-color: #84adff;
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(2, 9, 27, 0.46);
}

.kanban-pill {
    font-size: 0.58rem;
    letter-spacing: 0.07em;
    font-weight: 800;
    text-transform: uppercase;
    padding: 0.18rem 0.44rem;
    border-radius: 999px;
}

.kanban-pill-blue {
    color: #b4d4ff;
    background: rgba(65, 124, 255, 0.24);
}

.kanban-pill-purple {
    color: #dec8ff;
    background: rgba(155, 94, 255, 0.24);
}

.kanban-pill-green {
    color: #bef9d1;
    background: rgba(41, 179, 109, 0.24);
}

.kanban-action {
    border: 1px solid rgba(89, 113, 166, 0.65);
    background: #1d2a49;
    color: #dce8ff;
    border-radius: 8px;
    font-size: 0.62rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.34rem 0.45rem;
    transition: 0.14s ease;
}

.kanban-action:hover {
    border-color: #7ea5ff;
    background: #274078;
}

.kanban-action-primary {
    border-color: rgba(255, 79, 157, 0.48);
    background: linear-gradient(96deg, rgba(255, 79, 157, 0.26), rgba(121, 90, 255, 0.28));
}

.kanban-action-primary:hover {
    background: linear-gradient(96deg, rgba(255, 79, 157, 0.4), rgba(121, 90, 255, 0.42));
}

.glass-card {
    background: #151f36 !important;
    border: 1px solid #2f436f !important;
    box-shadow: 0 8px 18px rgba(1, 6, 20, 0.3) !important;
    color: #e8f0ff;
}

.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(9, 13, 24, 0.52);
}

::-webkit-scrollbar-thumb {
    background: #3a4f7e;
    border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
    background: #4f6aa8;
}

.scrollbar-thin::-webkit-scrollbar {
    height: 8px;
}

.scrollbar-thin::-webkit-scrollbar-track {
    background: rgba(10, 14, 24, 0.58);
    border-radius: 10px;
}

.scrollbar-thin::-webkit-scrollbar-thumb {
    background: #3b4f7a;
    border-radius: 10px;
}

@media (max-width: 1280px) {
    #section-container {
        padding: 0.9rem 1rem 1.4rem;
    }

    #header-container {
        padding: 0 1rem;
    }

    .kanban-lane {
        width: 300px;
        min-width: 300px;
    }
}

@media (max-width: 900px) {
    .dashboard-actions {
        width: 100%;
        justify-content: flex-start;
        margin-top: 0.9rem;
    }

    .dashboard-action-btn {
        flex: 1 1 190px;
    }

    .kpi-card {
        min-height: 150px;
    }

    .day-slot-row {
        grid-template-columns: 1fr;
        gap: 0.45rem;
    }

    .day-slot-time {
        font-size: 0.76rem;
    }

    .day-availability-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .day-slot-btn-primary {
        flex: 1 1 auto;
    }
}

#modal-factura .invoice-modal-shell {
    background: #ffffff !important;
    border: 1px solid #dbe3ef !important;
    border-radius: 16px;
    box-shadow: 0 24px 56px rgba(2, 8, 22, 0.42);
}

#modal-factura .invoice-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    padding: 0.9rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc !important;
}

#modal-factura .invoice-modal-label {
    font-size: 0.66rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
}

#modal-factura .invoice-print-btn,
#modal-factura .invoice-wa-btn,
#modal-factura .invoice-close-btn {
    border-radius: 0.55rem;
    border: 1px solid transparent;
    font-size: 0.72rem;
    font-weight: 800;
    transition: 0.16s ease;
}

#modal-factura .invoice-print-btn {
    background: #0f172a;
    color: #ffffff;
    padding: 0.5rem 0.85rem;
}

#modal-factura .invoice-print-btn:hover {
    background: #1e293b;
}

#modal-factura .invoice-wa-btn {
    background: #0f9d58;
    color: #ffffff;
    padding: 0.5rem 0.85rem;
}

#modal-factura .invoice-wa-btn:hover {
    background: #15803d;
}

#modal-factura .invoice-close-btn {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    color: #64748b;
    border-color: #dbe3ef;
}

#modal-factura .invoice-close-btn:hover {
    color: #0f172a;
    border-color: #b8c5d9;
}

#modal-factura .invoice-modal-content {
    background: #ffffff !important;
}

#modal-factura .invoice-paper {
    width: 100%;
    max-width: 100%;
    background: #ffffff !important;
    color: #0f172a !important;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 1.4rem;
}

#modal-factura .invoice-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
    background: #ffffff !important;
}

#modal-factura .invoice-brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

#modal-factura .invoice-logo {
    width: 130px;
    height: auto;
    object-fit: contain;
}

#modal-factura .invoice-title {
    margin: 0;
    font-size: 1.42rem;
    font-weight: 900;
    color: #0f172a;
}

#modal-factura .invoice-subtitle {
    margin: 0.25rem 0 0;
    font-size: 0.75rem;
    color: #64748b;
}

#modal-factura .invoice-meta {
    text-align: right;
    min-width: 220px;
}

#modal-factura .invoice-meta p {
    margin: 0 0 0.24rem;
    display: flex;
    justify-content: space-between;
    gap: 0.7rem;
    font-size: 0.75rem;
    color: #64748b;
}

#modal-factura .invoice-meta strong {
    color: #0f172a;
    font-weight: 800;
}

#modal-factura .invoice-grid {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

#modal-factura .invoice-panel {
    border: 1px solid #dbe3ef;
    border-radius: 10px;
    padding: 0.72rem 0.8rem;
    background: #f8fafc;
}

#modal-factura .invoice-panel-label {
    margin: 0 0 0.3rem;
    font-size: 0.66rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    font-weight: 800;
    color: #64748b;
}

#modal-factura .invoice-panel-value {
    margin: 0 0 0.3rem;
    font-size: 0.93rem;
    font-weight: 800;
    color: #0f172a;
}

#modal-factura .invoice-panel-line {
    margin: 0;
    font-size: 0.75rem;
    color: #475569;
}

#modal-factura .invoice-summary-grid {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.72rem;
}

#modal-factura .invoice-summary-card {
    border: 1px solid #dbe3ef;
    border-radius: 10px;
    padding: 0.68rem 0.78rem;
    background: #f8fafc;
}

#modal-factura .invoice-summary-card--success {
    border-color: #a7f3d0;
    background: #f0fdf4;
}

#modal-factura .invoice-summary-card--danger {
    border-color: #fbcfe8;
    background: #fff1f2;
}

#modal-factura .invoice-summary-card--neutral {
    border-color: #bfdbfe;
    background: #eff6ff;
}

#modal-factura .invoice-summary-label {
    margin: 0;
    font-size: 0.66rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    font-weight: 800;
    color: #64748b;
}

#modal-factura .invoice-summary-value {
    margin: 0.24rem 0 0;
    font-size: 1.16rem;
    font-weight: 900;
    color: #0f172a;
}

#modal-factura .invoice-section {
    margin-top: 1rem;
}

#modal-factura .invoice-section-title {
    margin: 0 0 0.52rem;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 800;
    color: #334155;
}

#modal-factura .invoice-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}

#modal-factura .invoice-table thead th {
    background: #f8fafc;
    color: #334155 !important;
    border-bottom: 1px solid #e2e8f0;
    padding: 0.58rem 0.72rem;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    font-weight: 800;
}

#modal-factura .invoice-table tbody td {
    padding: 0.56rem 0.72rem;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.78rem;
    color: #0f172a !important;
    background: #ffffff !important;
}

#modal-factura .invoice-table tbody tr:last-child td {
    border-bottom: none;
}

#modal-factura .invoice-note {
    margin: 0.45rem 0 0;
    font-size: 0.74rem;
    color: #475569;
}

#modal-factura .invoice-empty {
    border: 1px dashed #cbd5e1;
    background: #f8fafc;
    border-radius: 10px;
    padding: 0.9rem;
    font-size: 0.75rem;
    color: #64748b;
}

#modal-factura .invoice-footer {
    margin-top: 1rem;
    padding-top: 0.8rem;
    border-top: 1px dashed #cbd5e1;
    text-align: center;
    font-size: 0.67rem;
    color: #64748b;
}

@media (max-width: 900px) {
    #modal-factura .invoice-top {
        flex-direction: column;
        align-items: flex-start;
    }

    #modal-factura .invoice-meta {
        width: 100%;
        min-width: 0;
        text-align: left;
    }

    #modal-factura .invoice-grid,
    #modal-factura .invoice-summary-grid {
        grid-template-columns: 1fr;
    }

    #modal-factura .invoice-logo {
        width: 110px;
    }
}

@media print {
    @page {
        size: A4;
        margin: 10mm;
    }

    body * {
        visibility: hidden;
    }

    #modal-factura,
    #modal-factura *,
    #factura-content,
    #factura-content * {
        visibility: visible;
    }

    #modal-factura {
        position: static !important;
        inset: auto !important;
        width: 100% !important;
        height: auto !important;
        padding: 0 !important;
        margin: 0 !important;
        background: #ffffff !important;
        box-shadow: none !important;
        overflow: visible !important;
        display: block !important;
    }

    .no-print {
        display: none !important;
    }

    #app-view {
        display: block !important;
    }

    aside,
    #app-view > main > header {
        display: none !important;
    }

    #modal-factura .invoice-modal-shell,
    #modal-factura .invoice-modal-content {
        max-height: none !important;
        height: auto !important;
        overflow: visible !important;
        border: 0 !important;
        box-shadow: none !important;
        border-radius: 0 !important;
    }

    #modal-factura .invoice-paper {
        border: 0 !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        padding: 0 !important;
    }

    #modal-factura .invoice-grid,
    #modal-factura .invoice-summary-grid,
    #modal-factura .invoice-section,
    #modal-factura .invoice-table,
    #modal-factura .invoice-table tr {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    #modal-factura table,
    #modal-factura th,
    #modal-factura td {
        background: #ffffff !important;
        color: #111111 !important;
        border-color: #dddddd !important;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fadeInUp {
    animation: fadeInUp 0.65s ease;
}
