:root {
    --pulse-bg: #06100f;
    --pulse-panel: rgba(9, 24, 21, .88);
    --pulse-panel-soft: rgba(255, 255, 255, .055);
    --pulse-line: rgba(255, 255, 255, .12);
    --pulse-text: #eef8f3;
    --pulse-muted: #9fb1aa;
    --pulse-green: #24f2a5;
    --pulse-mint: #9ff8d5;
    --pulse-gold: #f5c86a;
    --pulse-blue: #76a9ff;
    --pulse-coral: #ff7a70;
}

html.fi,
.fi-body {
    color-scheme: dark;
}

.fi-body {
    background:
        radial-gradient(circle at 14% 8%, rgba(36, 242, 165, .16), transparent 28rem),
        radial-gradient(circle at 86% 0%, rgba(118, 169, 255, .14), transparent 30rem),
        linear-gradient(135deg, #06100f 0%, #0a1513 48%, #08100f 100%) !important;
    color: var(--pulse-text);
}

.fi-body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255,255,255,.028) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.028) 1px, transparent 1px);
    background-size: 58px 58px;
    mask-image: radial-gradient(circle at center, black, transparent 78%);
}

.fi-layout,
.fi-simple-layout {
    position: relative;
    z-index: 1;
}

.fi-simple-layout {
    min-height: 100vh;
    overflow: hidden;
}

.fi-simple-layout::before {
    content: "Pulse";
    position: fixed;
    left: max(32px, 6vw);
    bottom: max(26px, 5vw);
    color: rgba(238, 248, 243, .035);
    font-size: clamp(88px, 18vw, 260px);
    font-weight: 900;
    letter-spacing: 0;
    line-height: .8;
    pointer-events: none;
}

.fi-simple-main {
    border: 1px solid rgba(255,255,255,.14) !important;
    border-radius: 22px !important;
    background:
        linear-gradient(180deg, rgba(255,255,255,.105), rgba(255,255,255,.045)),
        rgba(7, 18, 16, .84) !important;
    box-shadow: 0 30px 95px rgba(0,0,0,.46), inset 0 1px 0 rgba(255,255,255,.16) !important;
    backdrop-filter: blur(26px);
}

.fi-logo {
    align-items: center;
    gap: 12px;
    color: var(--pulse-text) !important;
    font-size: 0 !important;
}

.fi-logo::before {
    content: "P";
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid rgba(36, 242, 165, .38);
    border-radius: 12px;
    background: linear-gradient(145deg, rgba(36,242,165,.20), rgba(118,169,255,.10));
    box-shadow: 0 0 34px rgba(36,242,165,.18), inset 0 1px 0 rgba(255,255,255,.18);
    color: var(--pulse-mint);
    font-size: 20px;
}

.fi-panel-admin .fi-logo::after {
    content: "Pulse Admin";
}

.fi-panel-app .fi-logo::after {
    content: "Pulse";
}

.fi-logo::after {
    color: var(--pulse-text);
    font-size: 20px;
    font-weight: 900;
    letter-spacing: 0;
}

.fi-simple-header-heading {
    color: var(--pulse-text) !important;
    font-size: 28px !important;
}

.fi-simple-header-heading::after {
    content: "Gestion centralizada de WhatsApp, citas y automatizaciones.";
    display: block;
    max-width: 360px;
    margin: 12px auto 0;
    color: var(--pulse-muted);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
}

.fi-sidebar {
    border-inline-end: 1px solid rgba(255,255,255,.10) !important;
    background:
        linear-gradient(180deg, rgba(255,255,255,.075), rgba(255,255,255,.025)),
        rgba(5, 14, 13, .92) !important;
    box-shadow: 22px 0 70px rgba(0,0,0,.24);
    backdrop-filter: blur(22px);
}

.fi-sidebar-header {
    border-bottom: 1px solid rgba(255,255,255,.08) !important;
    background: transparent !important;
    box-shadow: none !important;
}

.fi-sidebar-nav {
    padding: 14px !important;
}

.fi-sidebar-item a {
    border-radius: 12px !important;
    transition: background .18s ease, transform .18s ease, color .18s ease;
}

.fi-sidebar-item a:hover {
    transform: translateX(2px);
    background: rgba(255,255,255,.075) !important;
}

.fi-sidebar-item.fi-active a,
.fi-sidebar-item-active a {
    border: 1px solid rgba(36,242,165,.24);
    background: linear-gradient(135deg, rgba(36,242,165,.18), rgba(118,169,255,.08)) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.10);
}

.fi-topbar > nav {
    border-bottom: 1px solid rgba(255,255,255,.08) !important;
    background: rgba(6, 16, 15, .78) !important;
    box-shadow: 0 18px 55px rgba(0,0,0,.22) !important;
    backdrop-filter: blur(20px);
}

.fi-main {
    position: relative;
}

.fi-header-heading {
    color: var(--pulse-text) !important;
    letter-spacing: 0 !important;
}

.fi-header-subheading {
    color: var(--pulse-muted) !important;
}

.fi-section,
.fi-wi-widget,
.fi-ta-ctn,
.fi-fo-tabs,
.fi-in-section,
.fi-modal-window {
    border: 1px solid rgba(255,255,255,.11) !important;
    border-radius: 16px !important;
    background:
        linear-gradient(180deg, rgba(255,255,255,.075), rgba(255,255,255,.035)),
        rgba(8, 20, 18, .86) !important;
    box-shadow: 0 22px 70px rgba(0,0,0,.26), inset 0 1px 0 rgba(255,255,255,.10) !important;
    backdrop-filter: blur(18px);
}

.fi-section-header {
    border-bottom-color: rgba(255,255,255,.08) !important;
}

.fi-ta-header,
.fi-ta-content,
.fi-ta-table {
    background: transparent !important;
}

.fi-ta-row {
    transition: background .18s ease;
}

.fi-ta-row:hover {
    background: rgba(36,242,165,.055) !important;
}

.fi-ta-cell,
.fi-ta-header-cell {
    border-color: rgba(255,255,255,.075) !important;
}

.fi-input-wrp,
.fi-select-input,
.fi-fo-markdown-editor,
.fi-fo-file-upload,
.fi-fo-rich-editor {
    border-radius: 12px !important;
    background: rgba(0,0,0,.22) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.06) !important;
}

.fi-input,
.fi-select-input,
.fi-textarea {
    color: var(--pulse-text) !important;
}

.fi-input-wrp:focus-within {
    box-shadow: 0 0 0 4px rgba(36,242,165,.10), inset 0 1px 0 rgba(255,255,255,.10) !important;
}

.fi-btn {
    border-radius: 11px !important;
    font-weight: 800 !important;
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.fi-btn:hover {
    transform: translateY(-1px);
}

.fi-btn-color-primary {
    background: linear-gradient(135deg, #24f2a5, #a8ffd9 54%, #f5c86a) !important;
    color: #03110d !important;
    box-shadow: 0 16px 42px rgba(36,242,165,.18), inset 0 1px 0 rgba(255,255,255,.42) !important;
}

.fi-badge {
    border-radius: 999px !important;
    border: 1px solid rgba(255,255,255,.12);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.10);
}

.fi-dropdown-panel {
    border: 1px solid rgba(255,255,255,.12) !important;
    border-radius: 14px !important;
    background: rgba(8, 20, 18, .96) !important;
    box-shadow: 0 24px 70px rgba(0,0,0,.42) !important;
    backdrop-filter: blur(18px);
}

.fi-tabs {
    border-radius: 13px !important;
    background: rgba(255,255,255,.055) !important;
}

.fi-tabs-item-active {
    background: rgba(36,242,165,.14) !important;
}

.fi-panel-admin {
    --pulse-green: #34d399;
}

.fi-panel-admin .fi-topbar > nav,
.fi-panel-admin .fi-sidebar {
    background:
        linear-gradient(180deg, rgba(16,185,129,.075), rgba(255,255,255,.025)),
        rgba(5, 14, 13, .94) !important;
}

.fi-panel-app {
    --pulse-green: #24f2a5;
}

@media (max-width: 1023px) {
    .fi-sidebar {
        box-shadow: 18px 0 60px rgba(0,0,0,.34);
    }

    .fi-main {
        padding-inline: 14px !important;
    }
}

/* Login polish: keep Filament auth screens elegant and predictable. */
.fi-simple-layout::before {
    display: none !important;
}

.fi-simple-main-ctn {
    padding: 24px !important;
}

.fi-simple-main {
    width: min(100%, 460px) !important;
    margin-block: 32px !important;
    padding: 42px 38px !important;
}

.fi-simple-page {
    width: 100%;
}

.fi-simple-header {
    gap: 4px;
}

.fi-simple-header .fi-logo {
    display: flex !important;
    justify-content: center;
    font-size: 21px !important;
    line-height: 1.1 !important;
    text-align: center;
    white-space: normal;
}

.fi-simple-header .fi-logo::before,
.fi-simple-header .fi-logo::after {
    content: none !important;
}

.fi-simple-header-heading {
    margin-top: 4px !important;
    font-size: 25px !important;
}

.fi-simple-header-heading::after {
    max-width: 310px;
    margin-top: 10px;
    font-size: 13px;
}

.fi-simple-main .fi-form {
    gap: 20px !important;
}

.fi-simple-main .fi-btn {
    min-height: 46px;
}

.wa-calendar {
    display: grid;
    gap: 18px;
}

.wa-calendar-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    border: 1px solid rgba(255,255,255,.11);
    border-radius: 18px;
    padding: 22px;
    background:
        linear-gradient(135deg, rgba(36,242,165,.12), rgba(118,169,255,.07)),
        rgba(8, 20, 18, .86);
    box-shadow: 0 22px 70px rgba(0,0,0,.26), inset 0 1px 0 rgba(255,255,255,.10);
}

.wa-calendar-hero p,
.wa-calendar-hero span {
    margin: 0;
    color: var(--pulse-muted);
}

.wa-calendar-hero h2 {
    margin: 4px 0;
    color: var(--pulse-text);
    font-size: clamp(28px, 4vw, 46px);
    font-weight: 900;
    letter-spacing: 0;
}

.wa-calendar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.wa-calendar-actions a {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 10px;
    padding: 0 12px;
    color: var(--pulse-text);
    font-weight: 800;
    background: rgba(255,255,255,.06);
}

.wa-calendar-actions a.primary {
    color: #03110d;
    background: linear-gradient(135deg, #24f2a5, #a8ffd9 54%, #f5c86a);
}

.wa-calendar-weekdays,
.wa-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 10px;
}

.wa-calendar-weekdays div {
    color: var(--pulse-muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.wa-day {
    min-height: 170px;
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 14px;
    padding: 12px;
    background:
        linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.025)),
        rgba(8, 20, 18, .78);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}

.wa-day.is-muted {
    opacity: .45;
}

.wa-day.is-today {
    border-color: rgba(36,242,165,.55);
    box-shadow: 0 0 0 3px rgba(36,242,165,.08), inset 0 1px 0 rgba(255,255,255,.10);
}

.wa-day header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.wa-day header strong {
    color: var(--pulse-text);
}

.wa-day header span {
    display: grid;
    min-width: 24px;
    height: 24px;
    place-items: center;
    border-radius: 999px;
    color: #03110d;
    background: var(--pulse-green);
    font-size: 12px;
    font-weight: 900;
}

.wa-day-items {
    display: grid;
    gap: 7px;
}

.wa-appointment {
    display: grid;
    gap: 2px;
    border-left: 3px solid var(--pulse-green);
    border-radius: 10px;
    padding: 8px;
    background: rgba(36,242,165,.10);
}

.wa-appointment.cancelled {
    border-left-color: #ff7a70;
    background: rgba(255,122,112,.10);
}

.wa-appointment.completed {
    border-left-color: #76a9ff;
    background: rgba(118,169,255,.10);
}

.wa-appointment time {
    color: var(--pulse-mint);
    font-size: 12px;
    font-weight: 900;
}

.wa-appointment b {
    overflow: hidden;
    color: var(--pulse-text);
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wa-appointment small,
.wa-empty-slot,
.wa-more {
    color: var(--pulse-muted);
    font-size: 12px;
}

@media (max-width: 980px) {
    .wa-calendar-hero {
        align-items: stretch;
        flex-direction: column;
    }

    .wa-calendar-weekdays {
        display: none;
    }

    .wa-calendar-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

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