/* ========== 3D AVATAR CONTAINERS ========== */

.avatar-3d-container {
    width: 150px;
    height: 150px;
    margin: 0 auto 20px;
    position: relative;
    z-index: 10;
}

.avatar-mini-3d {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--hologram);
    position: relative;
}

.avatar-3d-large {
    width: 200px;
    height: 200px;
    margin: 0 auto 30px;
    position: relative;
}

/* ========== CAPABILITIES GRID ========== */

.capabilities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-top: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.capability-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s;
}

.capability-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 8px 25px var(--primary-glow);
}

.capability-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.capability-card h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text);
}

.capability-card p {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 0;
}

/* ========== HEADER ACTIONS ========== */

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

/* ========== INPUT ACTIONS ========== */

.input-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.btn-attachment {
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-attachment:hover {
    background: var(--surface);
    border-color: var(--primary);
    color: var(--primary);
    transform: scale(1.1);
}

/* ========== MODAL ========== */

.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 0;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    animation: slideInRight 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    margin: 0;
    font-size: 20px;
}

.btn-close {
    background: none;
    border: none;
    font-size: 32px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
}

.btn-close:hover {
    color: var(--text);
    transform: rotate(90deg);
}

.modal-body {
    padding: 24px;
}

#image-prompt {
    width: 100%;
    min-height: 120px;
    background: var(--surface-light);
    border: 2px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    padding: 16px;
    font-size: 15px;
    font-family: inherit;
    resize: vertical;
    margin-bottom: 16px;
}

#image-prompt:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--glow);
}

#image-result {
    margin-top: 20px;
    text-align: center;
}

#image-result img {
    max-width: 100%;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* ========== VOICE INDICATOR ========== */

.voice-indicator {
    position: fixed;
    bottom: 120px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--primary);
    border-radius: 24px;
    padding: 20px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    box-shadow: 0 8px 30px var(--primary-glow);
    z-index: 9999;
}

.voice-wave {
    width: 8px;
    height: 30px;
    background: var(--primary);
    border-radius: 4px;
    display: inline-block;
    margin: 0 4px;
    animation: voiceWave 1.2s ease-in-out infinite;
}

.voice-wave:nth-child(2) {
    animation-delay: 0.2s;
}

.voice-wave:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes voiceWave {
    0%, 100% { height: 10px; }
    50% { height: 40px; }
}

.voice-indicator p {
    margin: 0;
    color: var(--primary);
    font-weight: 600;
    font-size: 14px;
}

/* ========== MESSAGE IMAGES ========== */

.message-image {
    max-width: 300px;
    border-radius: 12px;
    margin-top: 8px;
    cursor: pointer;
    transition: transform 0.3s;
}

.message-image:hover {
    transform: scale(1.05);
}

/* ========== CODE BLOCKS ========== */

.message-text pre {
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    overflow-x: auto;
    margin: 8px 0;
}

.message-text code {
    font-family: 'Courier New', monospace;
    font-size: 13px;
}

/* ========== RESPONSIVE ========== */

@media (max-width: 768px) {
    .capabilities-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .capability-card {
        padding: 16px;
    }
    
    .capability-icon {
        font-size: 24px;
    }
}
/* ========== FIX CHAT AVATAR ========== */

#chat-avatar-3d {
    width: 200px;
    height: 200px;
    margin: 0 auto 30px;
    background: radial-gradient(circle, rgba(74, 144, 226, 0.9) 0%, rgba(106, 183, 255, 0.7) 40%, rgba(141, 208, 255, 0.4) 70%, transparent 100%);
    border-radius: 50%;
    position: relative;
    animation: avatarPulse 3s ease-in-out infinite;
    box-shadow: 
        0 0 60px rgba(74, 144, 226, 0.8),
        0 0 100px rgba(106, 183, 255, 0.5),
        inset 0 0 40px rgba(255, 255, 255, 0.2);
}

#chat-avatar-3d::before {
    content: '✨';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 100px;
    animation: float 4s ease-in-out infinite, rotate 10s linear infinite;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
}

/* Orbital rings */
#chat-avatar-3d::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 220px;
    height: 220px;
    border: 2px solid rgba(74, 144, 226, 0.3);
    border-radius: 50%;
    animation: orbitRing 8s linear infinite;
}

/* Multiple orbital rings effect */
.avatar-3d-large {
    position: relative;
}

.avatar-3d-large::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 180px;
    height: 180px;
    border: 2px dashed rgba(106, 183, 255, 0.4);
    border-radius: 50%;
    animation: orbitRing 6s linear infinite reverse;
}

@keyframes orbitRing {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Holographic particles around avatar */
#chat-avatar-3d {
    overflow: visible;
}

/* Scan lines for hologram effect */
.welcome-message::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 250px;
    height: 250px;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(74, 144, 226, 0.1) 2px,
        rgba(74, 144, 226, 0.1) 4px
    );
    pointer-events: none;
    border-radius: 50%;
    animation: scanLines 2s linear infinite;
}

@keyframes scanLines {
    0% { opacity: 0.3; }
    50% { opacity: 0.6; }
    100% { opacity: 0.3; }
}

/* Improve login avatar too */
#login-avatar-3d {
    background: radial-gradient(circle, rgba(74, 144, 226, 0.9) 0%, rgba(106, 183, 255, 0.7) 40%, rgba(141, 208, 255, 0.4) 70%, transparent 100%);
    box-shadow: 
        0 0 50px rgba(74, 144, 226, 0.8),
        0 0 80px rgba(106, 183, 255, 0.5),
        inset 0 0 30px rgba(255, 255, 255, 0.2);
}

#login-avatar-3d::before {
    content: '✨';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 70px;
    animation: float 4s ease-in-out infinite, rotate 10s linear infinite;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
}

/* Breathing glow effect */
@keyframes breathingGlow {
    0%, 100% { 
        box-shadow: 
            0 0 40px rgba(74, 144, 226, 0.6),
            0 0 60px rgba(106, 183, 255, 0.4),
            inset 0 0 20px rgba(255, 255, 255, 0.1);
    }
    50% { 
        box-shadow: 
            0 0 60px rgba(74, 144, 226, 0.9),
            0 0 100px rgba(106, 183, 255, 0.6),
            inset 0 0 40px rgba(255, 255, 255, 0.3);
    }
}

.avatar-3d-container,
#chat-avatar-3d,
#login-avatar-3d {
    animation: avatarPulse 3s ease-in-out infinite, breathingGlow 4s ease-in-out infinite;
}

/* Make welcome message position relative for pseudo-element */
.welcome-message {
    position: relative;
}
/* ========== HOLOGRAPHIC FEMALE AVATAR CSS ========== */

.avatar-container-hologram {
    position: relative;
    width: 300px;
    height: 400px;
    margin: 0 auto 30px;
    perspective: 1000px;
}

/* Main holographic figure */
.hologram-figure {
    position: absolute;
    width: 120px;
    height: 280px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    animation: figureFloat 4s ease-in-out infinite;
}

/* Head */
.hologram-head {
    position: absolute;
    width: 60px;
    height: 80px;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(180deg, 
        rgba(106, 183, 255, 0.9) 0%,
        rgba(74, 144, 226, 0.8) 50%,
        rgba(106, 183, 255, 0.7) 100%
    );
    border-radius: 50% 50% 45% 45%;
    box-shadow: 
        0 0 30px rgba(106, 183, 255, 0.8),
        inset 0 0 20px rgba(255, 255, 255, 0.3);
    animation: headTilt 6s ease-in-out infinite;
}

/* Head glow */
.hologram-glow {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50% 50% 45% 45%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    animation: glowPulse 2s ease-in-out infinite;
}

/* Eyes */
.hologram-eye {
    position: absolute;
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    top: 35px;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.9);
    animation: eyeBlink 4s infinite;
}

.hologram-eye.left {
    left: 15px;
}

.hologram-eye.right {
    right: 15px;
}

/* Body */
.hologram-body {
    position: absolute;
    width: 80px;
    height: 140px;
    top: 75px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(180deg,
        rgba(74, 144, 226, 0.8) 0%,
        rgba(106, 183, 255, 0.6) 40%,
        rgba(141, 208, 255, 0.5) 70%,
        rgba(74, 144, 226, 0.3) 100%
    );
    border-radius: 45% 45% 40% 40% / 30% 30% 50% 50%;
    box-shadow: 
        0 0 40px rgba(74, 144, 226, 0.6),
        inset 0 0 30px rgba(255, 255, 255, 0.2);
    clip-path: polygon(
        20% 0%, 80% 0%,
        100% 30%, 100% 100%,
        0% 100%, 0% 30%
    );
}

/* Core light */
.hologram-core {
    position: absolute;
    width: 20px;
    height: 20px;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    background: radial-gradient(circle, 
        rgba(255, 255, 255, 0.9) 0%,
        rgba(106, 183, 255, 0.6) 50%,
        transparent 100%
    );
    border-radius: 50%;
    animation: corePulse 2s ease-in-out infinite;
}

/* Energy rings around body */
.energy-ring {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    border: 2px solid rgba(74, 144, 226, 0.4);
    border-radius: 50%;
    animation: ringRotate 8s linear infinite;
}

.ring-1 {
    width: 140px;
    height: 200px;
    top: 90px;
}

.ring-2 {
    width: 160px;
    height: 220px;
    top: 80px;
    animation-duration: 10s;
    animation-direction: reverse;
}

.ring-3 {
    width: 180px;
    height: 240px;
    top: 70px;
    animation-duration: 12s;
}

/* Holographic overlay effects */
.hologram-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(74, 144, 226, 0.05) 2px,
        rgba(74, 144, 226, 0.05) 4px
    );
    pointer-events: none;
    animation: scanlines 3s linear infinite;
}

.hologram-overlay::before {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        180deg,
        transparent,
        rgba(106, 183, 255, 0.2),
        transparent
    );
    animation: verticalSweep 4s ease-in-out infinite;
}

/* Glitch effect */
.hologram-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    animation: glitchEffect 8s infinite;
}

/* Particles */
.hologram-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20% 30%, rgba(74, 144, 226, 0.6), transparent),
        radial-gradient(2px 2px at 60% 70%, rgba(106, 183, 255, 0.6), transparent),
        radial-gradient(1px 1px at 50% 50%, rgba(141, 208, 255, 0.6), transparent),
        radial-gradient(2px 2px at 80% 10%, rgba(74, 144, 226, 0.6), transparent),
        radial-gradient(1px 1px at 90% 60%, rgba(106, 183, 255, 0.6), transparent),
        radial-gradient(1px 1px at 10% 90%, rgba(141, 208, 255, 0.6), transparent);
    background-size: 200px 200px;
    background-position: 0 0, 40px 60px, 80px 30px, 120px 90px, 160px 20px, 50px 120px;
    animation: particlesFloat 15s linear infinite;
    pointer-events: none;
}

/* Platform */
.hologram-platform {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 200px;
    background: radial-gradient(
        ellipse at center,
        rgba(74, 144, 226, 0.5) 0%,
        rgba(106, 183, 255, 0.3) 30%,
        rgba(141, 208, 255, 0.2) 50%,
        transparent 70%
    );
    border-radius: 50%;
    filter: blur(15px);
    animation: platformPulse 3s ease-in-out infinite;
}

.hologram-platform::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 150px;
    height: 150px;
    border: 2px solid rgba(74, 144, 226, 0.4);
    border-radius: 50%;
    animation: platformRing 4s linear infinite;
}

/* ========== ANIMATIONS ========== */

@keyframes figureFloat {
    0%, 100% { transform: translate(-50%, -50%) translateY(0); }
    50% { transform: translate(-50%, -50%) translateY(-15px); }
}

@keyframes headTilt {
    0%, 100% { transform: translateX(-50%) rotate(0deg); }
    25% { transform: translateX(-50%) rotate(-3deg); }
    75% { transform: translateX(-50%) rotate(3deg); }
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

@keyframes eyeBlink {
    0%, 96%, 100% { transform: scaleY(1); }
    98% { transform: scaleY(0.1); }
}

@keyframes corePulse {
    0%, 100% { 
        transform: translateX(-50%) scale(1);
        opacity: 0.8;
    }
    50% { 
        transform: translateX(-50%) scale(1.3);
        opacity: 1;
    }
}

@keyframes ringRotate {
    0% { transform: translateX(-50%) rotate(0deg); }
    100% { transform: translateX(-50%) rotate(360deg); }
}

@keyframes scanlines {
    0% { transform: translateY(0); }
    100% { transform: translateY(20px); }
}

@keyframes verticalSweep {
    0% { top: -100%; }
    100% { top: 100%; }
}

@keyframes glitchEffect {
    0%, 90%, 100% { 
        transform: translateX(0);
        opacity: 0;
    }
    91% { 
        transform: translateX(-3px);
        opacity: 0.8;
    }
    92% { 
        transform: translateX(3px);
        opacity: 0.8;
    }
    93% { 
        transform: translateX(0);
        opacity: 0;
    }
}

@keyframes particlesFloat {
    0% { 
        background-position: 0 0, 40px 60px, 80px 30px, 120px 90px, 160px 20px, 50px 120px;
    }
    100% { 
        background-position: 0 -400px, 40px -340px, 80px -370px, 120px -310px, 160px -380px, 50px -280px;
    }
}

@keyframes platformPulse {
    0%, 100% { 
        transform: translateX(-50%) scale(1);
        opacity: 0.5;
    }
    50% { 
        transform: translateX(-50%) scale(1.1);
        opacity: 0.7;
    }
}

@keyframes platformRing {
    0% { 
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.6;
    }
    100% { 
        transform: translate(-50%, -50%) scale(1.3);
        opacity: 0;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .avatar-container-hologram {
        width: 250px;
        height: 350px;
    }
    
    .hologram-figure {
        transform: translate(-50%, -50%) scale(0.85);
    }
}

/* ════════════════════════════════════════════════════════════════════════ */
/* Agente 7 — Rich Message styles (Solara conversational flows)             */
/* ════════════════════════════════════════════════════════════════════════ */

.message.rich-msg {
    margin-right: auto;
    margin-left: 0;
    max-width: 88%;
}

.rich-card {
    background: linear-gradient(135deg,
        rgba(255, 215, 0, 0.06) 0%,
        rgba(74, 144, 226, 0.06) 100%);
    border: 1px solid rgba(255, 215, 0, 0.18);
    border-radius: 16px;
    padding: 14px 16px;
    color: var(--text);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: fadeIn 0.4s ease-out;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rich-content {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text);
}

.rich-content strong {
    color: #ffd700;
    font-weight: 600;
}

.rich-divider {
    height: 1px;
    background: rgba(255, 215, 0, 0.15);
    margin: 2px 0;
}

/* Buttons row */
.rich-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
    justify-content: flex-start;
}

.rich-btn {
    border: 1px solid rgba(255, 215, 0, 0.4);
    background: linear-gradient(135deg,
        rgba(255, 215, 0, 0.15) 0%,
        rgba(255, 165, 0, 0.10) 100%);
    color: #fff;
    padding: 10px 16px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    line-height: 1.2;
    min-height: 44px;
    box-shadow: 0 1px 4px rgba(255, 200, 0, 0.10);
    font-family: inherit;
}

.rich-btn:hover:not(:disabled) {
    background: linear-gradient(135deg,
        rgba(255, 215, 0, 0.28) 0%,
        rgba(255, 165, 0, 0.18) 100%);
    border-color: rgba(255, 215, 0, 0.7);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

.rich-btn:active:not(:disabled) {
    transform: translateY(0);
    background: linear-gradient(135deg,
        rgba(255, 215, 0, 0.10) 0%,
        rgba(255, 165, 0, 0.06) 100%);
    box-shadow: 0 1px 3px rgba(255, 200, 0, 0.18);
}

.rich-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.rich-btn-primary {
    background: linear-gradient(135deg, #ffd700 0%, #ffb000 100%);
    color: #1a1a2e;
    border-color: rgba(255, 215, 0, 0.85);
    font-weight: 700;
    font-size: 15px;
    padding: 12px 24px;
    letter-spacing: 0.2px;
    box-shadow:
        0 2px 8px rgba(255, 200, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.rich-btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #ffe340 0%, #ffc220 100%);
    border-color: rgba(255, 220, 80, 1);
    box-shadow:
        0 6px 18px rgba(255, 215, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.rich-btn-primary:active:not(:disabled) {
    background: linear-gradient(135deg, #e6c000 0%, #cc9500 100%);
    box-shadow:
        0 1px 4px rgba(255, 200, 0, 0.4),
        inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

.rich-btn-secondary {
    /* inherits default .rich-btn gold-tinted style */
}

.rich-btn-danger {
    border-color: rgba(231, 76, 60, 0.55);
    background: linear-gradient(135deg,
        rgba(231, 76, 60, 0.18) 0%,
        rgba(192, 57, 43, 0.10) 100%);
    color: #ffb3a8;
    box-shadow: 0 1px 4px rgba(231, 76, 60, 0.18);
}

.rich-btn-danger:hover:not(:disabled) {
    background: linear-gradient(135deg,
        rgba(231, 76, 60, 0.32) 0%,
        rgba(192, 57, 43, 0.20) 100%);
    border-color: rgba(231, 76, 60, 0.85);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.32);
}

.rich-btn-ghost {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.68);
    box-shadow: none;
    font-weight: 400;
}

.rich-btn-ghost:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 215, 0, 0.28);
    color: #fff;
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.08);
}

.rich-btn-sm {
    min-height: 36px;
    padding: 7px 12px;
    font-size: 13px;
}

/* Forms */
.rich-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: rgba(0, 0, 0, 0.18);
    border-radius: 12px;
    padding: 12px;
}

.rich-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rich-field-label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.rich-field-input {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 215, 0, 0.22);
    border-radius: 8px;
    color: #fff;
    padding: 12px 14px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    width: 100%;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.25);
}

.rich-field-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.rich-field-input:hover {
    border-color: rgba(255, 215, 0, 0.4);
}

.rich-field-input:focus {
    border-color: rgba(255, 215, 0, 0.75);
    background: rgba(0, 0, 0, 0.5);
    box-shadow:
        inset 0 1px 2px rgba(0, 0, 0, 0.25),
        0 0 0 3px rgba(255, 215, 0, 0.12);
}

.rich-field-input:invalid:not(:placeholder-shown) {
    border-color: rgba(231, 76, 60, 0.5);
}

.rich-form-actions {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

/* Info cards */
.rich-info {
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 12px 14px;
}

.rich-info-success {
    border-color: rgba(46, 204, 113, 0.35);
    background: rgba(46, 204, 113, 0.06);
}

.rich-info-warning {
    border-color: rgba(243, 156, 18, 0.4);
    background: rgba(243, 156, 18, 0.06);
}

.rich-info-danger {
    border-color: rgba(231, 76, 60, 0.45);
    background: rgba(231, 76, 60, 0.06);
}

.rich-info-title {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #ffd700;
    margin-bottom: 8px;
    font-weight: 600;
}

.rich-info-rows {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.rich-info-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    font-size: 13px;
}

.rich-info-key {
    color: var(--text-secondary);
    flex: 0 0 auto;
}

.rich-info-val {
    color: var(--text);
    font-weight: 500;
    text-align: right;
    word-break: break-word;
}

/* Share buttons row */
.rich-shares {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.rich-share {
    border: 1px solid rgba(74, 144, 226, 0.4);
    background: rgba(74, 144, 226, 0.08);
    color: var(--text);
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s;
}

.rich-share:hover {
    background: rgba(74, 144, 226, 0.2);
    border-color: rgba(74, 144, 226, 0.8);
}

/* List items (admin SPEI pending) */
.rich-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rich-list-item {
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.rich-list-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
}

.rich-list-title {
    font-size: 14px;
    font-weight: 600;
    color: #ffd700;
}

.rich-list-meta {
    font-size: 11px;
    color: var(--text-secondary);
}

.rich-list-sub {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.rich-list-actions {
    display: flex;
    gap: 6px;
    margin-top: 4px;
}

/* Spent state — once an action fires, fade the card slightly */
.rich-msg-spent .rich-card {
    opacity: 0.72;
}

/* Mobile tweaks */
@media (max-width: 600px) {
    .message.rich-msg { max-width: 96%; }
    .rich-btn {
        font-size: 13px;
        padding: 10px 14px;
        min-height: 44px;
        flex: 1 1 calc(50% - 10px);
    }
    .rich-btn-primary {
        font-size: 14px;
        padding: 12px 18px;
    }
    .rich-buttons { gap: 8px; }
    .rich-info-row { font-size: 12px; }
    .rich-field-input { padding: 11px 13px; font-size: 15px; }
}

