:root {
    --bg-void: #050508;
    --bg-crt: #09090f;
    --bg-glass: rgba(16, 16, 24, 0.78);
    --border-subtle: rgba(255, 255, 255, 0.07);
    --border-bright: rgba(255, 255, 255, 0.15);
    --text-primary: #f2f2f7;
    --text-secondary: #8e8e9e;
    --text-muted: #525262;
    --accent: #dfdfe6;
    --neon-lime: #ccf500;
    --neon-cyan: #00f0ff;
    --danger: #ff4757;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Space Grotesk', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
    -webkit-font-smoothing: antialiased;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

*::-webkit-scrollbar {
    width: 0 !important;
    height: 0 !important;
    display: none !important;
}

html, body {
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background: var(--bg-void);
    color: var(--text-primary);
    font-family: var(--font-sans);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hidden {
    display: none !important;
}

/* =========================================================
   BARRA SUPERIOR AMBIENTAL ULTRAMINIMALISTA
   ========================================================= */
.ambient-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 68px;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 30;
    pointer-events: none;
}

.topbar-left,
.topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
    pointer-events: auto;
}

.topbar-left {
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(12, 12, 18, 0.55);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.topbar-nav-group {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border-radius: 999px;
    background: rgba(12, 12, 18, 0.68);
    backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.075);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--neon-lime);
    box-shadow: 0 0 10px var(--neon-lime);
    transition: all 0.3s ease;
}

.status-dot.listening {
    background: var(--danger);
    box-shadow: 0 0 14px var(--danger);
    transform: scale(1.2);
}

.status-dot.thinking {
    background: var(--neon-cyan);
    box-shadow: 0 0 14px var(--neon-cyan);
}

.brand-name {
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.24em;
    color: rgba(242, 242, 247, 0.92);
}

.ambient-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(14, 14, 20, 0.78);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-size: 11.5px;
    font-weight: 500;
}

.ghost-pill,
.icon-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 30px;
    padding: 0 13px;
    border-radius: 999px;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: -0.01em;
    cursor: pointer;
    transition: all 0.18s ease;
}

.ghost-pill:hover,
.icon-pill:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.065);
    border-color: rgba(255, 255, 255, 0.08);
}

.icon-pill {
    width: 30px;
    padding: 0;
    justify-content: center;
}

.color-dot-preview {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #dfdfe6;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.pill-count {
    font-family: var(--font-mono);
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

.timer-pill {
    border-color: rgba(204, 245, 0, 0.28);
    color: var(--neon-lime);
    font-family: var(--font-mono);
}

.pill-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--neon-lime);
    box-shadow: 0 0 8px var(--neon-lime);
}

.pill-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 15px;
    cursor: pointer;
    margin-left: 2px;
}

/* =========================================================
   ESCENARIO PRINCIPAL: EL ROSTRO DE EXIMIR
   ========================================================= */
.companion-stage {
    flex: 1;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 72px 28px 94px;
}

.crt-screen {
    position: relative;
    width: min(1080px, 94vw);
    height: min(650px, 77vh);
    border-radius: 32px;
    background: radial-gradient(circle at 50% 44%, #101018 0%, #07070c 68%, #040407 100%);
    border: 1px solid rgba(255, 255, 255, 0.065);
    box-shadow:
        0 32px 100px rgba(0, 0, 0, 0.88),
        inset 0 0 90px rgba(0, 0, 0, 0.78),
        inset 0 1px 0 rgba(255, 255, 255, 0.07);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.crt-scanlines {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        to bottom,
        transparent 0px,
        transparent 3px,
        rgba(0, 0, 0, 0.2) 3px,
        rgba(0, 0, 0, 0.2) 4px
    );
    pointer-events: none;
    z-index: 2;
}

.crt-vignette {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, transparent 60%, rgba(0, 0, 0, 0.62) 100%);
    pointer-events: none;
    z-index: 3;
}

.face-wrapper {
    position: relative;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 760px;
}

#eximirFaceCanvas {
    width: 100%;
    max-width: 680px;
    height: auto;
    aspect-ratio: 19 / 10;
    filter: drop-shadow(0 0 22px rgba(255, 255, 255, 0.07));
}

/* Subtítulo minimalista bajo el rostro */
.subtitle-container {
    position: absolute;
    bottom: 28px;
    left: 48px;
    right: 48px;
    z-index: 5;
    text-align: center;
    display: flex;
    justify-content: center;
    pointer-events: none;
}

.ai-subtitle {
    max-width: 680px;
    padding: 8px 18px;
    border-radius: 16px;
    background: rgba(10, 10, 16, 0.56);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.055);
    font-size: 14.5px;
    line-height: 1.55;
    font-weight: 400;
    color: rgba(242, 242, 247, 0.92);
    letter-spacing: -0.005em;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1), transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.ai-subtitle.subtitle-faded,
.ai-subtitle:empty {
    opacity: 0 !important;
    transform: translateY(8px);
    pointer-events: none;
}

/* Notificación sutil de Memoria Actualizada */
.memory-toast {
    position: absolute;
    top: 22px;
    z-index: 6;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(14, 14, 22, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
    font-size: 11.5px;
    font-weight: 500;
    letter-spacing: 0.01em;
    backdrop-filter: blur(16px);
    animation: fadeSlideDown 0.28s ease forwards;
}

.toast-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--neon-lime);
    box-shadow: 0 0 8px var(--neon-lime);
}

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

/* =========================================================
   HOLOGRAMAS Y EJEMPLOS VISUALES A LOS LADOS DEL ROSTRO CRT
   ========================================================= */
.holo-stage-left {
    position: absolute;
    left: 26px;
    top: 44%;
    transform: translateY(-50%);
    width: 196px;
    z-index: 6;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    animation: holoPopIn 0.35s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.holo-symbol-frame {
    position: relative;
    width: 174px;
    height: 174px;
    border-radius: 24px;
    background: rgba(12, 12, 18, 0.52);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.07);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
    transition: transform 0.22s ease, border-color 0.22s ease;
}

.holo-stage-left:hover .holo-symbol-frame {
    transform: scale(1.02);
    border-color: rgba(255, 255, 255, 0.18);
}

#holoSymbolCanvas {
    width: 174px;
    height: 174px;
    display: block;
}

.holo-symbol-caption {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(242, 242, 247, 0.86);
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(14, 14, 20, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
}

.holo-formula-pill {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.08em;
    color: rgba(242, 242, 247, 0.75);
    padding: 3px 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
}

/* HOLOGRAMA DERECHO: TARJETAS DE EJEMPLOS VISUALES INTERACTIVOS */
.holo-stage-right {
    position: absolute;
    right: 24px;
    top: 44%;
    transform: translateY(-50%);
    width: min(296px, 31vw);
    max-height: 74%;
    z-index: 7;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: rgba(10, 10, 16, 0.76);
    backdrop-filter: blur(26px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 14px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7);
    animation: holoPopIn 0.35s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.holo-right-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.holo-right-title {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.14em;
    color: rgba(242, 242, 247, 0.72);
    text-transform: uppercase;
}

.holo-right-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.holo-mini-btn {
    font-size: 10.5px;
    padding: 2px 9px;
    border-radius: 99px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.18s ease;
}

.holo-mini-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.22);
}

.holo-close-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    padding: 0 3px;
}

.holo-close-btn:hover {
    color: var(--text-primary);
}

.holo-cards-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    max-height: 330px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.holo-cards-list::-webkit-scrollbar {
    width: 0 !important;
    height: 0 !important;
    display: none !important;
}

.holo-card {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 11px;
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.065);
    cursor: pointer;
    transition: all 0.2s ease;
}

.holo-card:hover {
    background: rgba(255, 255, 255, 0.055);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateX(-2px);
}

.holo-card.active-speaking {
    background: rgba(255, 255, 255, 0.065);
    border-color: rgba(255, 255, 255, 0.22);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
    transform: translateX(-3px);
}

.holo-card-icon {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: #f4f4f8;
}

.holo-card.active-speaking .holo-card-icon {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.28);
    color: #ffffff;
}

.holo-card-body {
    flex: 1;
    min-width: 0;
}

.holo-card-title {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: rgba(244, 244, 248, 0.72);
    margin-bottom: 3px;
    line-height: 1.25;
}

.holo-card-detail {
    font-size: 12px;
    color: #f2f2f7;
    line-height: 1.4;
}

@keyframes holoPopIn {
    from { opacity: 0; transform: translateY(-46%) scale(0.95); }
    to { opacity: 1; transform: translateY(-50%) scale(1); }
}

@media (max-width: 960px) {
    .holo-stage-left {
        left: 14px;
        top: 22%;
        width: 120px;
    }
    .holo-symbol-frame, #holoSymbolCanvas {
        width: 110px;
        height: 110px;
    }
    .holo-stage-right {
        right: 14px;
        top: 24%;
        width: 220px;
    }
}

/* =========================================================
   BARRA INFERIOR FLOTANTE (COMANDO Y VOZ)
   ========================================================= */
.floating-dock-wrap {
    position: fixed;
    bottom: 22px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    padding: 0 20px;
    z-index: 30;
    pointer-events: none;
}

.floating-dock {
    pointer-events: auto;
    width: min(640px, 94vw);
    height: 54px;
    padding: 6px 8px 6px 8px;
    border-radius: 999px;
    background: rgba(14, 14, 22, 0.82);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.09);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.floating-dock:focus-within {
    border-color: rgba(255, 255, 255, 0.2);
}

.mic-trigger {
    position: relative;
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.mic-trigger:hover {
    background: rgba(255, 255, 255, 0.1);
}

.mic-trigger.active {
    background: rgba(255, 71, 87, 0.18);
    border-color: var(--danger);
    color: #ff6b81;
    box-shadow: 0 0 22px rgba(255, 71, 87, 0.35);
}

.dock-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 14px;
    user-select: text;
}

.dock-input::placeholder {
    color: var(--text-muted);
}

.dock-action-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.dock-action-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
}

.dock-action-btn.muted {
    color: var(--danger);
}

/* =========================================================
   DRAWERS LATERALES (MEMORIA Y DIÁLOGO - OCULTOS POR DEFECTO)
   ========================================================= */
.drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    z-index: 40;
}

.side-drawer {
    position: fixed;
    top: 16px;
    bottom: 16px;
    right: 16px;
    width: min(420px, calc(100vw - 32px));
    background: rgba(12, 12, 18, 0.95);
    backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 26px;
    z-index: 50;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: -20px 0 60px rgba(0, 0, 0, 0.8);
}

.drawer-header {
    padding: 20px 22px 16px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.drawer-kicker {
    display: block;
    font-family: var(--font-mono);
    font-size: 9.5px;
    letter-spacing: 0.16em;
    color: var(--text-muted);
    margin-bottom: 3px;
}

.drawer-header h3 {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 600;
}

.drawer-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border-subtle);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
}

.drawer-tabs {
    display: flex;
    gap: 6px;
    padding: 12px 22px 0;
}

.d-tab {
    flex: 1;
    padding: 7px 10px;
    border-radius: 10px;
    border: 1px solid var(--border-subtle);
    background: transparent;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.d-tab.active {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border-color: var(--border-bright);
}

.drawer-search {
    padding: 12px 22px;
}

.drawer-search input {
    width: 100%;
    height: 36px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid var(--border-subtle);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    font-size: 12.5px;
    outline: none;
    user-select: text;
}

.drawer-content {
    flex: 1;
    overflow-y: auto;
    padding: 8px 22px 22px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.drawer-content::-webkit-scrollbar {
    width: 0 !important;
    height: 0 !important;
    display: none !important;
}

/* Tarjetas de Memoria en el Drawer */
.mem-card {
    padding: 14px 15px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: border-color 0.18s ease, background 0.18s ease;
}

.mem-card:hover {
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.038);
}

.mem-card.historico {
    opacity: 0.65;
    border-style: dashed;
}

.mem-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.mem-badges {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.badge-cat,
.badge-status {
    font-family: var(--font-mono);
    font-size: 9.5px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 2px 7px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.055);
    color: var(--text-secondary);
}

.badge-status.vigente {
    color: var(--neon-lime);
    background: rgba(204, 245, 0, 0.1);
}

.badge-status.historico {
    color: #ffa502;
    background: rgba(255, 165, 2, 0.1);
}

.mem-edit-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    font-size: 10.5px;
    padding: 2px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.18s ease;
}

.mem-edit-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.mem-del-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 16px;
    cursor: pointer;
    line-height: 1;
}

.mem-del-btn:hover {
    color: var(--danger);
}

.mem-text {
    font-size: 13px;
    line-height: 1.45;
    color: var(--text-primary);
    user-select: text;
}

.mem-evolution {
    margin-top: 4px;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 11.5px;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.empty-state {
    padding: 36px 16px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.5;
}

/* Burbujas en el Drawer de Conversación */
.chat-bubble {
    padding: 11px 14px;
    border-radius: 14px;
    font-size: 13px;
    line-height: 1.48;
    max-width: 88%;
    user-select: text;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.chat-bubble-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: 9.5px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.chat-bubble.user {
    align-self: flex-end;
    background: rgba(255, 255, 255, 0.09);
    color: var(--text-primary);
    border-bottom-right-radius: 4px;
}

.chat-bubble.assistant {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    border-bottom-left-radius: 4px;
}

/* Alarma Overlay */
.alarm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 5, 8, 0.9);
    backdrop-filter: blur(18px);
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: center;
}

.alarm-modal {
    padding: 36px 42px;
    border-radius: 28px;
    background: #0d0d15;
    border: 1px solid rgba(204, 245, 0, 0.35);
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.alarm-modal h2 {
    font-family: var(--font-display);
    font-size: 52px;
    color: var(--neon-lime);
}

.btn-stop-alarm {
    margin-top: 10px;
    padding: 12px 24px;
    border-radius: 999px;
    border: none;
    background: var(--neon-lime);
    color: #050508;
    font-weight: 600;
    cursor: pointer;
}

/* =========================================================
   ESTUDIO DE PERSONALIZACIÓN (#customDrawer)
   ========================================================= */
.custom-studio-body {
    gap: 16px;
    padding-top: 14px;
}

.custom-section {
    padding: 13px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.custom-label {
    font-family: var(--font-mono);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-secondary);
}

.custom-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.custom-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 7px;
}

.custom-option-btn {
    padding: 10px 10px;
    border-radius: 11px;
    border: 1px solid var(--border-subtle);
    background: rgba(255, 255, 255, 0.025);
    color: var(--text-secondary);
    text-align: center;
    cursor: pointer;
    transition: all 0.18s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-option-btn strong {
    font-size: 12.5px;
    font-weight: 500;
}

.custom-option-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.18);
}

.custom-option-btn.active {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.32);
}

.custom-option-btn.active strong {
    color: var(--text-primary);
    font-weight: 600;
}

.swatch-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 2px 0;
}

.color-swatch {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.15);
    background: var(--sw);
    box-shadow: 0 0 12px var(--sw);
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease;
}

.color-swatch:hover,
.color-swatch.active {
    transform: scale(1.16);
    border-color: #ffffff;
}

.custom-row-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.custom-row-gap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.custom-val-badge {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--neon-lime);
    background: rgba(204, 245, 0, 0.1);
    padding: 2px 8px;
    border-radius: 6px;
}

.custom-slider {
    width: 100%;
    accent-color: var(--neon-lime);
    cursor: pointer;
}

.custom-hint {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.4;
}

.custom-input {
    width: 100%;
    height: 36px;
    padding: 0 11px;
    border-radius: 10px;
    border: 1px solid var(--border-subtle);
    background: rgba(0, 0, 0, 0.35);
    color: var(--text-primary);
    font-size: 12px;
    outline: none;
    user-select: text;
}

.custom-input:focus {
    border-color: rgba(204, 245, 0, 0.4);
}

.custom-mini-btn,
.custom-save-btn {
    padding: 6px 12px;
    border-radius: 9px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    font-size: 11.5px;
    font-weight: 500;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.18s ease;
}

.custom-save-btn {
    height: 36px;
    background: rgba(204, 245, 0, 0.14);
    border-color: rgba(204, 245, 0, 0.4);
    color: var(--neon-lime);
}

.custom-mini-btn:hover,
.custom-save-btn:hover {
    background: rgba(204, 245, 0, 0.24);
}

.slider-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.custom-sublabel {
    font-size: 11.5px;
    color: var(--text-secondary);
}

.color-picker-wrap {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1.5px dashed rgba(255, 255, 255, 0.35);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    color: var(--text-primary);
    font-size: 15px;
    overflow: hidden;
}

.color-picker-wrap input[type="color"] {
    position: absolute;
    inset: -6px;
    opacity: 0;
    cursor: pointer;
}

.mic-trigger.continuous {
    background: rgba(204, 245, 0, 0.14);
    border-color: rgba(204, 245, 0, 0.45);
    color: var(--neon-lime);
}

.mic-trigger.continuous .shortcut-kbd {
    color: var(--neon-lime);
    border-color: rgba(204, 245, 0, 0.3);
}

@media (max-width: 680px) {
    .ambient-topbar {
        padding: 0 16px;
    }
    .ambient-clock,
    .shortcut-kbd {
        display: none;
    }
    .companion-stage {
        padding: 64px 14px 88px;
    }
    .subtitle-container {
        left: 20px;
        right: 20px;
        bottom: 22px;
    }
    .ai-subtitle {
        font-size: 13.5px;
    }
}

/* =========================================================
   ASISTENTE DE FLUJO DE TRABAJO Y PENDIENTES INTERACTIVOS
   ========================================================= */
.badge-time-set {
    background: rgba(204, 245, 0, 0.14) !important;
    color: var(--neon-lime) !important;
    border: 1px solid rgba(204, 245, 0, 0.35);
}

.badge-time-pending {
    background: rgba(255, 159, 28, 0.14) !important;
    color: #ff9f1c !important;
    border: 1px solid rgba(255, 159, 28, 0.35);
}

.item-workflow-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 9px;
}

.item-wf-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-secondary);
    border-radius: 7px;
    padding: 4px 9px;
    font-size: 11px;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: all 0.18s ease;
}

.item-wf-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.25);
}

.item-wf-btn.focus {
    color: var(--neon-cyan);
    border-color: rgba(0, 240, 255, 0.28);
    background: rgba(0, 240, 255, 0.08);
}

.item-wf-btn.focus:hover {
    background: rgba(0, 240, 255, 0.16);
}

.item-wf-btn.done {
    color: var(--neon-lime);
    border-color: rgba(204, 245, 0, 0.28);
    background: rgba(204, 245, 0, 0.08);
}

.item-wf-btn.done:hover {
    background: rgba(204, 245, 0, 0.18);
}

.holo-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 7px;
}

.holo-card-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-secondary);
    border-radius: 6px;
    padding: 2px 7px;
    font-size: 10px;
    font-family: var(--font-mono);
    cursor: pointer;
    transition: all 0.16s ease;
}

.holo-card-btn:hover {
    background: rgba(204, 245, 0, 0.16);
    color: var(--neon-lime);
    border-color: rgba(204, 245, 0, 0.4);
}

.holo-card-btn.done {
    color: var(--neon-lime);
    border-color: rgba(204, 245, 0, 0.28);
}

/* =========================================================
   v16.0: ALARMAS Y CONTROLES ESTILO iOS / iPHONE MINIMALISTA
   ========================================================= */
.ios-alarm-editor {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ios-time-picker-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px 12px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.ios-time-input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: 44px;
    font-weight: 600;
    letter-spacing: -0.02em;
    text-align: center;
    cursor: pointer;
    color-scheme: dark;
}

.ios-group-card {
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.07);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.ios-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.055);
}

.ios-row:last-child {
    border-bottom: none;
}

.ios-row.ios-row-stack {
    flex-direction: column;
    align-items: stretch;
    gap: 7px;
}

.ios-row-label {
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-primary);
    flex-shrink: 0;
}

.ios-row-select {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-size: 13px;
    text-align: right;
    cursor: pointer;
    max-width: 180px;
    text-overflow: ellipsis;
    color-scheme: dark;
}

.ios-row-select option {
    background: #12121a;
    color: var(--text-primary);
}

.ios-row-sound-controls {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.ios-icon-btn,
.ios-pill-btn {
    height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.18s ease;
    flex-shrink: 0;
}

.ios-icon-btn {
    width: 28px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ios-icon-btn:hover,
.ios-pill-btn:hover {
    background: rgba(255, 255, 255, 0.14);
}

.ios-phrase-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 8px 10px;
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-size: 12.5px;
    line-height: 1.4;
    resize: none;
    outline: none;
    user-select: text;
}

.ios-phrase-input:focus {
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.2);
}

.alarm-actions-row {
    display: flex;
    gap: 8px;
}

.btn-primary-alarm {
    flex: 1.3;
    height: 40px;
    border-radius: 12px;
    border: none;
    background: var(--text-primary);
    color: #050508;
    font-family: var(--font-sans);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s ease;
}

.btn-primary-alarm:hover {
    opacity: 0.9;
}

.btn-secondary-alarm {
    flex: 1;
    height: 40px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.18s ease;
}

.btn-secondary-alarm:hover {
    background: rgba(255, 255, 255, 0.12);
}

.alarms-list-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
}

.alarm-card-item {
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.07);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    transition: background 0.18s ease;
}

.alarm-card-item:hover {
    background: rgba(255, 255, 255, 0.055);
}

.alarm-card-item.inactive {
    opacity: 0.45;
}

.alarm-card-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.alarm-card-time {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    line-height: 1.1;
}

.alarm-card-sub {
    font-size: 11.5px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.alarm-card-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* Interruptor estilo iOS */
.ios-switch {
    position: relative;
    width: 44px;
    height: 26px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    border: none;
    cursor: pointer;
    transition: background 0.22s ease;
    padding: 0;
}

.ios-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.35);
    transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.ios-switch.on {
    background: #34c759;
}

.ios-switch.on::after {
    transform: translateX(18px);
}

.alarm-song-badge {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0 0 12px;
}

.music-eq-bars {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 5px;
    height: 28px;
    margin-bottom: 4px;
}

.music-eq-bars span {
    width: 4px;
    height: 10px;
    border-radius: 3px;
    background: var(--text-primary);
    animation: eqPulse 0.75s ease-in-out infinite alternate;
}

.music-eq-bars span:nth-child(2) { animation-delay: 0.12s; height: 20px; }
.music-eq-bars span:nth-child(3) { animation-delay: 0.24s; height: 26px; }
.music-eq-bars span:nth-child(4) { animation-delay: 0.06s; height: 14px; }
.music-eq-bars span:nth-child(5) { animation-delay: 0.30s; height: 24px; }
.music-eq-bars span:nth-child(6) { animation-delay: 0.18s; height: 16px; }
.music-eq-bars span:nth-child(7) { animation-delay: 0.36s; height: 10px; }

@keyframes eqPulse {
    0% { transform: scaleY(0.35); opacity: 0.5; }
    100% { transform: scaleY(1.1); opacity: 1; }
}

.btn-pause-alarm-music {
    width: 100%;
    height: 46px;
    border-radius: 999px;
    border: none;
    background: var(--text-primary);
    color: #050508;
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-pause-alarm-music:hover {
    opacity: 0.9;
    transform: scale(1.01);
}

/* Píldora Dynamic Island para Modo Despertar */
.wake-verify-banner {
    position: absolute;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 38;
    padding: 8px 10px 8px 16px;
    border-radius: 999px;
    background: rgba(14, 14, 20, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(20px);
    display: inline-flex;
    align-items: center;
    gap: 16px;
}

.wake-verify-left {
    display: flex;
    align-items: center;
    gap: 9px;
}

.wake-pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #34c759;
    box-shadow: 0 0 10px #34c759;
    flex-shrink: 0;
    animation: eqPulse 0.6s infinite alternate;
}

.wake-verify-title {
    font-size: 12.5px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
}

.wake-verify-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.wake-countdown-badge {
    font-family: var(--font-mono);
    font-size: 11.5px;
    color: #ff9f1c;
    background: rgba(255, 159, 28, 0.14);
    padding: 4px 9px;
    border-radius: 999px;
}

.wake-confirm-btn {
    padding: 5px 12px;
    border-radius: 999px;
    border: none;
    background: var(--text-primary);
    color: #050508;
    font-family: var(--font-sans);
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.18s ease;
}

.wake-confirm-btn:hover {
    opacity: 0.88;
}


