.zr-panel-header {
    display: flex;
    align-items: center;
    height: var(--zr-header-h, 58px);
}

.zr-panel-header-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 18px;
    height: 100%;
    width: 100%;
}

.zr-sidebar-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid #dbe2f0;
    border-radius: 10px;
    background: #eef2f7;
    cursor: pointer;
    color: #475569;
    transition: background .15s, border-color .15s, color .15s;
}

.zr-sidebar-toggle:hover {
    background: #e8edf5;
    border-color: #cbd5e1;
}

.zr-panel-title-block {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 1px;
}

.zr-panel-kicker {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #64748b;
}

.zr-header-spacer {
    flex: 1;
}

.zr-panel-title {
    font-size: 17px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.zr-panel-subtitle {
    font-size: 11px;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.zr-notif-badge[hidden] {
    display: none !important;
}

.zr-header-tools {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 6px 4px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: rgba(255,255,255,.78);
    box-shadow: 0 1px 6px rgba(15, 23, 42, .04);
}

.zr-header-clock {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.2;
    min-width: 84px;
    padding-right: 2px;
    opacity: .82;
}

.zr-clock-kicker {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #94a3b8;
}

.zr-clock-fecha {
    font-size: 10px;
    color: #64748b;
    font-weight: 600;
}

.zr-clock-hora {
    font-size: 13px;
    font-weight: 700;
    color: #334155;
    letter-spacing: .2px;
    font-variant-numeric: tabular-nums;
}

.zr-header-notif { position: relative; }

.zr-notif-btn {
    position: relative;
    width: 38px;
    height: 38px;
    border: 1px solid #dbe2f0;
    border-radius: 10px;
    background: #eef2f7;
    color: var(--zr-color-primary, #1b2a6b);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
}

.zr-notif-btn:hover { background: #e2e8f4; }
.zr-notif-btn.has-notif { background: #eff6ff; border-color: #bfdbfe; }

.zr-notif-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
}

.zr-notif-panel {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 320px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0,0,0,.12);
    z-index: 2000;
    overflow: hidden;
}

.zr-notif-panel.is-open { display: block; }

.zr-notif-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 13px;
    font-weight: 800;
    color: #0f172a;
}

.zr-notif-subtitle {
    margin-top: 2px;
    font-size: 10px;
    font-weight: 600;
    color: #94a3b8;
}

.zr-notif-clear {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 11px;
    color: #64748b;
    font-weight: 600;
    padding: 0;
}

.zr-notif-clear:hover { color: #1b2a6b; }

.zr-notif-list {
    max-height: 340px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #e2e8f0 transparent;
}

.zr-notif-empty {
    padding: 24px 16px;
    text-align: center;
    font-size: 13px;
    color: #94a3b8;
}

.zr-notif-item {
    display: flex;
    gap: 10px;
    padding: 12px 14px;
    border-bottom: 1px solid #f8fafc;
    cursor: pointer;
    transition: background .12s;
}

.zr-notif-item:last-child { border-bottom: none; }
.zr-notif-item:hover { background: #f8fafc; }
.zr-notif-item.unread { background: #eff6ff; }
.zr-notif-item.unread:hover { background: #dbeafe; }

.zr-notif-item[data-tipo="danger"] { border-left: 3px solid #ef4444; }
.zr-notif-item[data-tipo="warning"] { border-left: 3px solid #f59e0b; }
.zr-notif-item[data-tipo="info"] { border-left: 3px solid #3b82f6; }

.zr-notif-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #eef2ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex: 0 0 32px;
}

.zr-notif-body { flex: 1; min-width: 0; }
.zr-notif-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.zr-notif-title { font-size: 12px; font-weight: 700; color: #0f172a; margin-bottom: 2px; }
.zr-notif-text { font-size: 11px; color: #64748b; line-height: 1.4; }
.zr-notif-time { font-size: 10px; color: #94a3b8; margin-top: 3px; }
.zr-notif-priority {
    display: inline-flex;
    align-items: center;
    min-height: 18px;
    padding: 0 6px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.zr-notif-priority--danger { background: #fee2e2; color: #b91c1c; }
.zr-notif-priority--warning { background: #fef3c7; color: #b45309; }
.zr-notif-priority--info { background: #dbeafe; color: #1d4ed8; }
.zr-notif-priority--neutral { background: #e5e7eb; color: #475569; }

.zr-toast-container {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 12000;
    display: grid;
    gap: 10px;
}

.zr-toast {
    min-width: 240px;
    max-width: 340px;
    padding: 12px 14px;
    border-radius: 14px;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 16px 34px rgba(15, 23, 42, .18);
    animation: zrToastIn .2s ease;
}

.zr-toast--success { background: #16a34a; }
.zr-toast--danger { background: #dc2626; }
.zr-toast--info { background: #1d4ed8; }
.zr-toast--dark { background: #0f172a; }

.zr-loading-dot {
    display: inline-flex;
    width: 14px;
    height: 14px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: zrSpin .7s linear infinite;
}

.zr-skeleton {
    position: relative;
    overflow: hidden;
    background: #e5e7eb;
    border-radius: 10px;
}

.zr-skeleton::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.55) 50%, rgba(255,255,255,0) 100%);
    animation: zrSkeleton 1.2s infinite;
}

@keyframes zrSpin {
    to { transform: rotate(360deg); }
}

@keyframes zrToastIn {
    from { transform: translateY(-4px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes zrSkeleton {
    100% { transform: translateX(100%); }
}

@media(max-width:640px) {
    .zr-panel-kicker { display: none; }
    .zr-panel-subtitle { display: none; }
    .zr-header-tools {
        gap: 8px;
        padding: 4px 4px 4px 8px;
        border-radius: 12px;
    }
    .zr-header-clock { display: none; }
    .zr-notif-panel { width: 280px; right: -10px; }
}

[data-theme="dark"] .zr-sidebar-toggle {
    background: #1e293b;
    border-color: #334155;
    color: #cbd5e1;
}

[data-theme="dark"] .zr-panel-title {
    color: #e2e8f0;
}

[data-theme="dark"] .zr-panel-subtitle,
[data-theme="dark"] .zr-clock-fecha,
[data-theme="dark"] .zr-clock-kicker,
[data-theme="dark"] .zr-notif-subtitle,
[data-theme="dark"] .zr-notif-time {
    color: #94a3b8;
}

[data-theme="dark"] .zr-clock-hora {
    color: #cbd5e1;
}

[data-theme="dark"] .zr-header-tools,
[data-theme="dark"] .zr-notif-panel {
    background: rgba(15,23,42,.85);
    border-color: #334155;
}

[data-theme="dark"] .zr-notif-header,
[data-theme="dark"] .zr-notif-title {
    color: #e2e8f0;
}

[data-theme="dark"] .zr-notif-text {
    color: #94a3b8;
}

[data-theme="dark"] .zr-notif-item:hover {
    background: #1e293b;
}

[data-theme="dark"] .zr-notif-item.unread {
    background: rgba(37,99,235,.14);
}

.zr-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid #e2e8f0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    z-index: 9990;
    box-shadow: 0 -2px 12px rgba(0,0,0,.06);
}

@media(max-width:991px) {
    .zr-bottom-nav { display: flex; }
    body { padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px)) !important; }
}

.zr-bn-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 6px 2px 4px;
    gap: 1px;
    text-decoration: none;
    color: #94a3b8;
    font-size: 10px;
    font-weight: 600;
    transition: color .15s;
    -webkit-tap-highlight-color: transparent;
    position: relative;
}

.zr-bn-item.active { color: #2563eb; }
.zr-bn-item.active .zr-bn-icon { color: #2563eb; }
.zr-bn-item.active .zr-bn-icon svg { stroke-width: 2.5; }

.zr-bn-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    transition: all .15s;
}

.zr-bn-item.active .zr-bn-icon { background: #eff6ff; }
.zr-bn-item:active .zr-bn-icon { transform: scale(.88); }
.zr-bn-label { line-height: 1; letter-spacing: .2px; }

.zr-bn-badge {
    position: absolute;
    top: 0;
    left: 50%;
    margin-left: 6px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    background: #ef4444;
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(239,68,68,.4);
}

.zr-theme-toggle {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid #dbe2f0;
    background: #eef2f7;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s;
    font-size: 16px;
    line-height: 1;
    -webkit-tap-highlight-color: transparent;
}

.zr-theme-toggle:hover { background: #e2e8f4; }

[data-theme="dark"] .zr-panel-header { background: #0f172a; border-color: #1e293b; }
[data-theme="dark"] .zr-panel-kicker { color: #64748b; }
[data-theme="dark"] .zr-header-tools { background: rgba(15, 23, 42, .88); border-color: #334155; box-shadow: none; }
[data-theme="dark"] .zr-clock-kicker { color: #64748b; }
[data-theme="dark"] .zr-clock-fecha { color: #64748b; }
[data-theme="dark"] .zr-clock-hora { color: #e2e8f0; }
[data-theme="dark"] .zr-theme-toggle { background: #334155; border-color: #475569; color: #e2e8f0; }
[data-theme="dark"] .zr-theme-toggle:hover { background: #475569; }
[data-theme="dark"] .zr-notif-btn { background: #1e293b; border-color: #334155; color: #94a3b8; }
[data-theme="dark"] .zr-notif-btn:hover { background: #334155; }
[data-theme="dark"] .zr-notif-panel { background: #1e293b; border-color: #334155; box-shadow: 0 10px 40px rgba(0,0,0,.4); }
[data-theme="dark"] .zr-notif-header { color: #e2e8f0; border-color: #334155; }
[data-theme="dark"] .zr-notif-item { border-color: #0f172a; }
[data-theme="dark"] .zr-notif-item:hover { background: #334155; }
[data-theme="dark"] .zr-notif-item.unread { background: #1e3a5f; }
[data-theme="dark"] .zr-notif-title { color: #e2e8f0; }
[data-theme="dark"] .zr-notif-text { color: #94a3b8; }
[data-theme="dark"] .zr-sidebar { background: #0b1120; border-color: #1e293b; }
[data-theme="dark"] .zr-sidebar__brand { border-color: #1e293b; }
[data-theme="dark"] .zr-sidebar__label { color: #475569; }
[data-theme="dark"] .zr-sidebar__name { color: #e2e8f0; }
[data-theme="dark"] .zr-sidebar__primary-label { color: #64748b; }
[data-theme="dark"] .zr-sidebar__primary-link { background: #0f172a; border-color: #334155; color: #cbd5e1; }
[data-theme="dark"] .zr-sidebar__primary-link:hover { background: #1e293b; border-color: #475569; color: #f8fafc; }
[data-theme="dark"] .zr-sidebar__primary-link.is-active { background: rgba(96,165,250,.12); border-color: #3b82f6; color: #60a5fa; }
[data-theme="dark"] .zr-sidebar__primary-icon { background: #1e293b; }
[data-theme="dark"] .zr-sidebar__link { color: #94a3b8; }
[data-theme="dark"] .zr-sidebar__link:hover { background: rgba(255,255,255,.05); color: #e2e8f0; }
[data-theme="dark"] .zr-sidebar__link.is-active { background: rgba(96,165,250,.12); color: #60a5fa; }
[data-theme="dark"] .zr-sidebar__accordion-toggle { color: #cbd5e1; }
[data-theme="dark"] .zr-sidebar__accordion-toggle:hover { background: rgba(255,255,255,.04); }
[data-theme="dark"] .zr-sidebar__bottom { border-color: #1e293b; }
[data-theme="dark"] .zr-bottom-nav { background: #0f172a; border-color: #1e293b; }
[data-theme="dark"] .zr-bn-item { color: #64748b; }
[data-theme="dark"] .zr-bn-item.active { color: #60a5fa; }
[data-theme="dark"] .zr-bn-item.active .zr-bn-icon { background: rgba(96,165,250,.12); }
