/* Ramnil Workspace v2.35 · tema global profesional */
:root{--theme-bg:#f4f6f8;--theme-surface:#fff;--theme-surface-2:#f8fafc;--theme-surface-3:#f1f5f9;--theme-text:#111827;--theme-text-2:#334155;--theme-muted:#64748b;--theme-line:#e2e8f0;--theme-line-strong:#cbd5e1;--theme-input:#fff;--theme-hover:#f1f5f9;--theme-shadow:0 8px 26px rgba(15,23,42,.07)}
html[data-theme="dark"]{--bg:#0b1220;--card:#111827;--text:#eef2f7;--muted:#94a3b8;--line:#263244;--accent:#f8fafc;--sidebar:#070d18;--theme-bg:#0b1220;--theme-surface:#111827;--theme-surface-2:#172235;--theme-surface-3:#1d2a3d;--theme-text:#eef2f7;--theme-text-2:#dbe5f1;--theme-muted:#94a3b8;--theme-line:#29374b;--theme-line-strong:#3b4b61;--theme-input:#0f172a;--theme-hover:#1b2738;--theme-shadow:0 12px 34px rgba(0,0,0,.24);color-scheme:dark}
html[data-theme="dark"],html[data-theme="dark"] body,html[data-theme="dark"] .global-main,html[data-theme="dark"] .workspace,html[data-theme="dark"] .app-module,html[data-theme="dark"] main{background:var(--theme-bg)!important;color:var(--theme-text)!important}
html[data-theme="dark"] h1,html[data-theme="dark"] h2,html[data-theme="dark"] h3,html[data-theme="dark"] h4,html[data-theme="dark"] strong,html[data-theme="dark"] .task-title,html[data-theme="dark"] .access-name{color:var(--theme-text)!important}
html[data-theme="dark"] p,html[data-theme="dark"] small,html[data-theme="dark"] .muted,html[data-theme="dark"] .eyebrow,html[data-theme="dark"] .helper-text,html[data-theme="dark"] .task-meta,html[data-theme="dark"] .access-card-category,html[data-theme="dark"] .access-cat{color:var(--theme-muted)!important}
html[data-theme="dark"] .home-kpi,html[data-theme="dark"] .home-panel,html[data-theme="dark"] .summary-card,html[data-theme="dark"] .panel,html[data-theme="dark"] .module-placeholder,html[data-theme="dark"] .access-card,html[data-theme="dark"] .access-lock-card,html[data-theme="dark"] .access-locked-card,html[data-theme="dark"] .settings-content,html[data-theme="dark"] .modal-card,html[data-theme="dark"] dialog{background:var(--theme-surface)!important;color:var(--theme-text)!important;border-color:var(--theme-line)!important;box-shadow:var(--theme-shadow)!important}
html[data-theme="dark"] .home-coming,html[data-theme="dark"] .home-list-empty,html[data-theme="dark"] .empty-state,html[data-theme="dark"] .module-empty-state,html[data-theme="dark"] .agenda-preview,html[data-theme="dark"] .repeat-card,html[data-theme="dark"] .shared-card,html[data-theme="dark"] .legend-item,html[data-theme="dark"] .close-btn,html[data-theme="dark"] .icon-btn,html[data-theme="dark"] .access-card-row,html[data-theme="dark"] .access-row{background:var(--theme-surface-2)!important;color:var(--theme-text-2)!important;border-color:var(--theme-line)!important}
html[data-theme="dark"] .home-kpi-icon,html[data-theme="dark"] .home-panel-symbol,html[data-theme="dark"] .module-placeholder-icon,html[data-theme="dark"] .module-empty-icon,html[data-theme="dark"] .placeholder-icon,html[data-theme="dark"] .module-card-icon{background:#1c2a3d!important;color:#dbe7f4!important;border:1px solid #314158!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.035)!important}
html[data-theme="dark"] .home-kpi-icon svg,html[data-theme="dark"] .home-panel-symbol svg,html[data-theme="dark"] .module-placeholder-icon svg,html[data-theme="dark"] .module-empty-icon svg,html[data-theme="dark"] .placeholder-icon svg,html[data-theme="dark"] .module-card-icon svg{color:#dbe7f4!important;stroke:currentColor!important}
html[data-theme="dark"] input,html[data-theme="dark"] select,html[data-theme="dark"] textarea,html[data-theme="dark"] .agenda-picker-button,html[data-theme="dark"] .agenda-picker-menu,html[data-theme="dark"] .agenda-picker-option,html[data-theme="dark"] .mini,html[data-theme="dark"] .ghost,html[data-theme="dark"] .file-btn{background:var(--theme-input)!important;color:var(--theme-text)!important;border-color:var(--theme-line)!important}
html[data-theme="dark"] input::placeholder,html[data-theme="dark"] textarea::placeholder{color:#64748b!important}html[data-theme="dark"] .agenda-picker-option:hover,html[data-theme="dark"] .agenda-picker-option.selected,html[data-theme="dark"] .mini:hover,html[data-theme="dark"] .ghost:hover{background:var(--theme-hover)!important}
html[data-theme="dark"] .primary{background:#f8fafc!important;color:#0f172a!important}html[data-theme="dark"] .danger{background:#3a1719!important;color:#fecaca!important}
html[data-theme="dark"] .day{background:var(--theme-surface)!important;color:var(--theme-text)!important;border-color:var(--theme-line)!important}html[data-theme="dark"] .day.outside{background:#0d1625!important;color:#5f7087!important}html[data-theme="dark"] .day.selected{background:#172235!important}html[data-theme="dark"] .day.today{box-shadow:inset 0 0 0 2px #cbd5e1!important}html[data-theme="dark"] .day.today .day-num{background:#e2e8f0!important;color:#0f172a!important}html[data-theme="dark"] .weekdays{color:var(--theme-muted)!important}html[data-theme="dark"] .event-chip{color:#e5e7eb!important}
html[data-theme="dark"] .task,html[data-theme="dark"] .custom-color-row,html[data-theme="dark"] .invite-chip{background:var(--theme-surface)!important;color:var(--theme-text)!important;border-color:var(--theme-line)!important}html[data-theme="dark"] .check{background:#0f172a!important;border-color:#475569!important}html[data-theme="dark"] .task.done .check{background:#e2e8f0!important;color:#0f172a!important;border-color:#e2e8f0!important}
html[data-theme="dark"] #accesosModule .access-card{background:var(--theme-surface)!important;border-color:var(--theme-line)!important}html[data-theme="dark"] #accesosModule .access-logo-box{background:#172235!important;border-color:#314158!important}html[data-theme="dark"] #accesosModule .access-logo-box .access-logo{background:#fff!important;border-radius:8px}html[data-theme="dark"] #accesosModule .access-logo-fallback{background:#1e293b!important;color:#f8fafc!important}html[data-theme="dark"] #accesosModule .access-card-row strong{color:var(--theme-muted)!important}
html[data-theme="dark"] .settings-nav{background:#070d18!important;border-color:var(--theme-line)!important}html[data-theme="dark"] dialog::backdrop{background:rgba(2,6,23,.76)!important;backdrop-filter:blur(4px)}

/* Selector de tema: participa del layout real, nunca flota por encima */
.ramnil-global-theme-bar{position:static!important;inset:auto!important;z-index:auto!important;display:flex;align-items:center;justify-content:flex-end;height:auto;padding:0;margin:0;pointer-events:auto;flex:0 0 auto}
.ramnil-theme-inline{order:-1;margin-right:2px}
.ramnil-theme-fallback{display:flex;justify-content:flex-end;padding:18px 24px 0}
.ramnil-theme-switch{display:inline-flex;align-items:center;gap:3px;padding:4px;border:1px solid var(--theme-line);border-radius:12px;background:var(--theme-surface);box-shadow:0 2px 8px rgba(15,23,42,.08);height:42px}
.ramnil-theme-option{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:32px;padding:6px 10px;border:0;border-radius:8px;background:transparent;color:var(--theme-muted);font-size:11px;font-weight:800;cursor:pointer;transition:background .15s ease,color .15s ease,box-shadow .15s ease}
.ramnil-theme-option svg{width:14px;height:14px;display:block;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.ramnil-theme-option.active{background:#111827;color:#fff;box-shadow:0 1px 3px rgba(15,23,42,.16)}
html[data-theme="dark"] .ramnil-theme-switch{background:#111b2a!important;border-color:#314158!important;box-shadow:0 3px 12px rgba(0,0,0,.2)!important}html[data-theme="dark"] .ramnil-theme-option{color:#9eacbd!important}html[data-theme="dark"] .ramnil-theme-option.active{background:#26364b!important;color:#f8fafc!important;box-shadow:inset 0 0 0 1px #3a4b62!important}
@media(max-width:900px){.ramnil-theme-option span{display:none}.ramnil-theme-option{width:34px;padding:6px}.ramnil-theme-switch{height:40px}}
