/* ==============================
   EOMI HUB — COMPLETE STYLES
   Phase 112 — Full rebuild
   Hardcoded base — no theme
   variable dependency for core
   layout and cards
   ============================== */

.eomi-hub-main {
    padding: 2rem;
    min-height: 100vh;
    color: #E8E4FF;
}

.eomi-hub-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.eomi-hub-title {
    font-size: 2rem;
    font-weight: 700;
    color: #D4A843;
    margin: 0;
}

.eomi-hub-subtitle {
    color: #8A84AA;
    margin: 4px 0 0;
    font-size: 0.95rem;
}

/* GRID */
.eomi-hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* EOMI CARD */
.eomi-card {
    background: #0D1035;
    border: 2px solid #D4A843;
    border-radius: 20px;
    padding: 1.5rem;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    color: #E8E4FF;
}

.eomi-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 40px rgba(212,168,67,0.3);
}

.eomi-card.selected {
    border-color: #D4A843;
    box-shadow: 0 0 40px rgba(212,168,67,0.4);
}

/* AVATAR AREA */
.eomi-avatar-area {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 120px;
    margin-bottom: 1rem;
    position: relative;
}

.eomi-silhouette {
    width: 80px;
    height: 100px;
    position: relative;
    z-index: 2;
}

.eomi-aura-canvas {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 160px;
    height: 120px;
    pointer-events: none;
    z-index: 1;
}

/* CARD CONTENT */
.eomi-card-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #D4A843;
    margin: 0 0 4px;
    letter-spacing: 0.05em;
}

.eomi-card-title {
    font-size: 0.8rem;
    color: #8A84AA;
    margin: 0 0 12px;
    font-style: italic;
}

.eomi-card-purpose {
    font-size: 0.82rem;
    color: #C8C4E8;
    line-height: 1.5;
    margin: 0 0 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.eomi-fruit-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(212,168,67,0.12);
    border: 1px solid rgba(212,168,67,0.3);
    border-radius: 20px;
    padding: 3px 10px;
    font-size: 0.75rem;
    color: #D4A843;
    margin-bottom: 1rem;
}

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

.btn-chat-eomi {
    flex: 1;
    background: #D4A843;
    color: #05060F;
    border: none;
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.btn-chat-eomi:hover {
    opacity: 0.85;
}

.btn-personalize-eomi {
    background: transparent;
    color: #D4A843;
    border: 1px solid #D4A843;
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 0.82rem;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-personalize-eomi:hover {
    background: rgba(212,168,67,0.1);
}

/* ANIMATIONS */
@keyframes breathe-feminine {
    0%, 100% { transform: scaleY(1) scaleX(1); filter: brightness(1); }
    50% { transform: scaleY(1.03) scaleX(0.99); filter: brightness(1.15); }
}

@keyframes pulse-masculine {
    0%, 100% { filter: brightness(1) drop-shadow(0 0 8px var(--eomi-glow)); }
    50% { filter: brightness(1.2) drop-shadow(0 0 20px var(--eomi-glow)); }
}

@keyframes flow-nonbinary {
    0%, 100% { transform: rotate(-1deg) scaleX(1); }
    33% { transform: rotate(1deg) scaleX(1.02); }
    66% { transform: rotate(-0.5deg) scaleX(0.99); }
}

@keyframes radiate-divine {
    0%, 100% { filter: brightness(1) saturate(1); transform: scale(1); }
    50% { filter: brightness(1.4) saturate(1.3); transform: scale(1.05); }
}

@keyframes thinking-pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

@keyframes speaking-surge {
    0% { filter: brightness(1.2) saturate(1.2); }
    100% { filter: brightness(1.6) saturate(1.5); }
}

/* CREATOR MODE TOGGLE */
.btn-creator-mode {
    background: rgba(212,168,67,0.12);
    border: 1px solid #D4A843;
    color: #D4A843;
    border-radius: 10px;
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-creator-mode:hover,
.btn-creator-mode.active {
    background: rgba(212,168,67,0.2);
}

/* CREATOR STUDIO DRAWER */
.creator-studio {
    position: fixed;
    right: 0;
    top: 0;
    width: 400px;
    height: 100vh;
    background: #080A1C;
    border-left: 2px solid #D4A843;
    overflow-y: auto;
    z-index: 1000;
    padding: 1.5rem;
    transition: transform 0.3s ease;
}

.creator-studio.hidden {
    transform: translateX(100%);
}

.studio-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(212,168,67,0.3);
}

.studio-header h2 {
    color: #D4A843;
    margin: 0;
    font-size: 1.1rem;
}

.studio-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 1.5rem;
}

.studio-tab {
    background: transparent;
    border: 1px solid rgba(212,168,67,0.3);
    color: #8A84AA;
    border-radius: 8px;
    padding: 4px 10px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.studio-tab.active {
    background: rgba(212,168,67,0.15);
    border-color: #D4A843;
    color: #D4A843;
}

.studio-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.studio-section h3 {
    color: #D4A843;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin: 0 0 1rem;
}

.studio-section label {
    display: block;
    color: #8A84AA;
    font-size: 0.78rem;
    margin: 8px 0 4px;
}

.studio-section input[type="text"],
.studio-section input[type="color"],
.studio-section textarea,
.studio-section select {
    width: 100%;
    background: #0D1035;
    border: 1px solid rgba(212,168,67,0.2);
    color: #E8E4FF;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 0.85rem;
    box-sizing: border-box;
}

.studio-section input[type="color"] {
    height: 40px;
    padding: 2px;
    cursor: pointer;
}

.gender-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 4px;
}

.gender-options label {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #C8C4E8;
    margin: 0;
    cursor: pointer;
}

.variant-options {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

.variant-btn {
    width: 40px;
    height: 40px;
    background: #0D1035;
    border: 1px solid rgba(212,168,67,0.3);
    color: #8A84AA;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.variant-btn.active {
    border-color: #D4A843;
    color: #D4A843;
    background: rgba(212,168,67,0.1);
}

.studio-actions {
    display: flex;
    gap: 10px;
    padding-top: 1rem;
}

.btn-save {
    flex: 1;
    background: rgba(212,168,67,0.12);
    border: 1px solid #D4A843;
    color: #D4A843;
    border-radius: 10px;
    padding: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-save:hover {
    background: rgba(212,168,67,0.2);
}

.btn-publish {
    flex: 1;
    background: #D4A843;
    border: none;
    color: #05060F;
    border-radius: 10px;
    padding: 10px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s;
}

.btn-publish:hover {
    opacity: 0.85;
}

/* PERSONALIZE DRAWER */
.personalize-drawer {
    position: fixed;
    right: 0;
    top: 0;
    width: 340px;
    height: 100vh;
    background: #080A1C;
    border-left: 2px solid rgba(212,168,67,0.4);
    overflow-y: auto;
    z-index: 1000;
    padding: 1.5rem;
    transition: transform 0.3s ease;
}

.personalize-drawer.hidden {
    transform: translateX(100%);
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.drawer-header h3 {
    color: #D4A843;
    margin: 0;
}

.drawer-body label {
    display: block;
    color: #8A84AA;
    font-size: 0.8rem;
    margin: 12px 0 4px;
}

.drawer-body input,
.drawer-body select,
.drawer-body textarea {
    width: 100%;
    background: #0D1035;
    border: 1px solid rgba(212,168,67,0.2);
    color: #E8E4FF;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 0.85rem;
    box-sizing: border-box;
}

/* CHAT MODAL */
.eomi-chat-modal {
    position: fixed;
    inset: 0;
    background: #05060F;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    transition: opacity 0.2s;
}

.eomi-chat-modal.hidden {
    display: none;
}

.chat-modal-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

.chat-modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #D4A843;
    background: #080A1C;
    flex-shrink: 0;
}

.chat-eomi-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 2px solid #D4A843;
    background: #0D1035;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.chat-eomi-identity {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.chat-eomi-name {
    font-size: 1rem;
    font-weight: 700;
    color: #D4A843;
}

.chat-eomi-title {
    font-size: 0.78rem;
    color: #8A84AA;
    font-style: italic;
}

.chat-eomi-fruit {
    font-size: 0.72rem;
    color: #D4A843;
    margin-top: 2px;
}

.chat-eomi-status {
    color: #4CAF50;
    font-size: 0.78rem;
    margin-left: auto;
}

#chat-close {
    background: transparent;
    border: none;
    color: #8A84AA;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px 8px;
    transition: color 0.2s;
}

#chat-close:hover {
    color: #E8E4FF;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-msg {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 0.9rem;
    line-height: 1.6;
}

.chat-msg.user {
    background: #D4A843 !important;
    color: #05060F !important;
    border-bottom-right-radius: 4px;
    align-self: flex-end;
}

.chat-msg.user * {
    color: #05060F !important;
}

.chat-msg.eomi {
    background: #0D1035 !important;
    border: 1px solid #D4A843 !important;
    color: #E8E4FF !important;
    border-bottom-left-radius: 4px;
    align-self: flex-start;
}

.chat-msg.eomi * {
    color: #E8E4FF !important;
}

.chat-typing {
    display: flex;
    gap: 6px;
    padding: 0 1.5rem 1rem;
    align-items: center;
}

.chat-typing.hidden {
    display: none;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: #D4A843;
    border-radius: 50%;
    animation: thinking-pulse 1.2s ease-in-out infinite;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}
.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

.chat-input-bar {
    display: flex;
    gap: 10px;
    padding: 1rem 1.5rem;
    border-top: 1px solid #1A1A2E;
    background: #080A1C;
    flex-shrink: 0;
}

.chat-input {
    flex: 1;
    background: #0D1035 !important;
    border: 1px solid rgba(212,168,67,0.3);
    color: #E8E4FF !important;
    border-radius: 16px;
    padding: 10px 16px;
    font-size: 0.9rem;
    resize: none;
    max-height: 120px;
    line-height: 1.5;
}

.chat-input::placeholder {
    color: #4A4870 !important;
    opacity: 1 !important;
}

.btn-chat-send {
    width: 44px;
    height: 44px;
    background: #D4A843;
    border: none;
    border-radius: 50%;
    color: #05060F;
    font-size: 1rem;
    cursor: pointer;
    flex-shrink: 0;
    align-self: flex-end;
    transition: opacity 0.2s;
}

.btn-chat-send:hover {
    opacity: 0.85;
}

/* UTILITY */
.hidden { display: none !important; }

.eomi-loading {
    grid-column: 1 / -1;
    text-align: center;
    color: #4A4870;
    padding: 3rem;
    font-size: 0.9rem;
}

/* CLOSE BUTTONS */
#studio-close,
#personalize-close,
#staging-modal-close {
    background: transparent;
    border: none;
    color: #8A84AA;
    font-size: 1.2rem;
    cursor: pointer;
}

/* ==============================
   CREATOR DATA INGESTION STYLES
   ============================== */

.studio-hint {
    color: #5A5480;
    font-size: 0.75rem;
    margin: 0 0 1rem;
    line-height: 1.5;
}

.studio-loading {
    color: #4A4870;
    font-size: 0.82rem;
    padding: 1rem 0;
    text-align: center;
}

/* QUESTIONNAIRE */
.q-section-header {
    color: #D4A843;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin: 1.5rem 0 0.5rem;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(212,168,67,0.2);
}

.q-item {
    margin-bottom: 1.2rem;
}

.q-item label {
    display: block;
    color: #C8C4E8;
    font-size: 0.82rem;
    margin-bottom: 6px;
    line-height: 1.4;
}

.q-item input,
.q-item textarea,
.q-item select {
    width: 100%;
    background: #0D1035;
    border: 1px solid rgba(212,168,67,0.2);
    color: #E8E4FF;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 0.85rem;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.q-item input:focus,
.q-item textarea:focus,
.q-item select:focus {
    border-color: #D4A843;
    outline: none;
}

/* UPLOAD DROPZONE */
.upload-dropzone {
    border: 2px dashed rgba(212,168,67,0.3);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    margin-top: 0.5rem;
    transition: border-color 0.2s, background 0.2s;
    cursor: pointer;
}

.upload-dropzone.drag-over {
    border-color: #D4A843;
    background: rgba(212,168,67,0.05);
}

.upload-dropzone-inner p {
    color: #5A5480;
    font-size: 0.82rem;
    margin: 8px 0;
}

.upload-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 4px;
}

.btn-browse {
    background: transparent;
    border: 1px solid rgba(212,168,67,0.4);
    color: #D4A843;
    border-radius: 8px;
    padding: 6px 16px;
    font-size: 0.8rem;
    cursor: pointer;
    margin-top: 8px;
    transition: background 0.2s;
}

.btn-browse:hover {
    background: rgba(212,168,67,0.1);
}

.upload-progress-bar {
    height: 4px;
    background: rgba(212,168,67,0.15);
    border-radius: 2px;
    margin: 1rem 0 4px;
    overflow: hidden;
}

#upload-progress-fill {
    height: 100%;
    background: #D4A843;
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 2px;
}

#upload-progress-label {
    color: #8A84AA;
    font-size: 0.78rem;
}

/* CRYSTAL LIST */
.crystal-item {
    background: #0A0C20;
    border: 1px solid rgba(212,168,67,0.15);
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 8px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.crystal-item-body {
    flex: 1;
    min-width: 0;
}

.crystal-item-title {
    color: #D4A843;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.crystal-item-meta {
    color: #4A4870;
    font-size: 0.72rem;
}

.crystal-item-preview {
    color: #8A84AA;
    font-size: 0.75rem;
    margin-top: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.crystal-item-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.btn-crystal-delete,
.btn-crystal-edit {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 4px;
    border-radius: 4px;
    transition: background 0.2s;
    color: #5A5480;
}

.btn-crystal-delete:hover {
    background: rgba(255,80,80,0.1);
    color: #FF5050;
}

.btn-crystal-edit:hover {
    background: rgba(212,168,67,0.1);
    color: #D4A843;
}

.crystal-category-group {
    margin-bottom: 1rem;
}

.crystal-category-label {
    color: #5A5480;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.crystal-category-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(212,168,67,0.1);
}

/* STAGING LIST */
.staging-item {
    background: rgba(212,168,67,0.05);
    border: 1px solid rgba(212,168,67,0.2);
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.staging-item-body {
    flex: 1;
    min-width: 0;
}

.staging-item-name {
    color: #C8C4E8;
    font-size: 0.82rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.staging-item-meta {
    color: #4A4870;
    font-size: 0.72rem;
}

.btn-staging-review {
    background: rgba(212,168,67,0.12);
    border: 1px solid #D4A843;
    color: #D4A843;
    border-radius: 8px;
    padding: 4px 10px;
    font-size: 0.75rem;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}

.btn-staging-review:hover {
    background: rgba(212,168,67,0.2);
}

/* STAGING REVIEW MODAL */
.staging-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.staging-modal.hidden {
    display: none;
}

.staging-modal-inner {
    background: #080A1C;
    border: 2px solid #D4A843;
    border-radius: 20px;
    width: 100%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.staging-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid rgba(212,168,67,0.3);
    flex-shrink: 0;
}

.staging-modal-header h3 {
    color: #D4A843;
    margin: 0;
    font-size: 1rem;
}

.staging-modal-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.staging-modal-body label {
    color: #8A84AA;
    font-size: 0.8rem;
    margin-bottom: 2px;
    display: block;
}

.staging-modal-body input,
.staging-modal-body select,
.staging-modal-body textarea {
    width: 100%;
    background: #0D1035;
    border: 1px solid rgba(212,168,67,0.2);
    color: #E8E4FF;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 0.85rem;
    box-sizing: border-box;
}

#staging-content {
    font-family: monospace;
    font-size: 0.8rem;
    line-height: 1.6;
    resize: vertical;
}

.staging-modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 0.5rem;
}

.btn-reject {
    flex: 1;
    background: rgba(255,80,80,0.1);
    border: 1px solid rgba(255,80,80,0.4);
    color: #FF8080;
    border-radius: 10px;
    padding: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-reject:hover {
    background: rgba(255,80,80,0.2);
}

.toggle-label {
    display: flex !important;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: #8A84AA !important;
    font-size: 0.8rem;
}

.toggle-label input {
    width: auto !important;
    cursor: pointer;
}

.crystal-empty {
    color: #4A4870;
    font-size: 0.8rem;
    text-align: center;
    padding: 1rem 0;
}
