/* ============================================================
   OVNI FLOW — Mini App Stylesheet v4.0
   Paleta: #000000 + #66FFFF + #FFFFFF
   Fonte: PP Neue Machina (forçada em todos os elementos)
   ============================================================ */

/* --- Fontes --- */
@font-face {
    font-family: 'PP Neue Machina';
    src: url('/static/fonts/PPNeueMachina-PlainRegular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'PP Neue Machina';
    src: url('/static/fonts/PPNeueMachina-PlainUltrabold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'PP Neue Machina';
    src: url('/static/fonts/PPNeueMachina-PlainUltrabold.otf') format('opentype');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

/* --- Reset & Base --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'PP Neue Machina', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

:root {
    --bg: #000000;
    --surface: #0a0a0a;
    --card: rgba(102, 255, 255, 0.04);
    --card-border: rgba(102, 255, 255, 0.10);
    --accent: #66FFFF;
    --accent-dim: rgba(102, 255, 255, 0.5);
    --accent-glow: rgba(102, 255, 255, 0.15);
    --text: #FFFFFF;
    --text-secondary: rgba(255, 255, 255, 0.6);
    --text-muted: rgba(255, 255, 255, 0.35);
    --success: #00E676;
    --warning: #FFD600;
    --danger: #FF5252;
    --gold: #FFD700;
    --radius: 10px;
    --radius-sm: 6px;
}

html, body {
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    min-height: 100vh;
}

#app {
    max-width: 100%;
    padding: 0 14px 28px;
}

/* --- Loading --- */
#loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    gap: 16px;
}
.loading-icon {
    width: 52px;
    height: 52px;
    animation: pulse 1.5s ease-in-out infinite;
}
.loading-text {
    color: var(--accent);
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
}
@keyframes pulse {
    0%, 100% { opacity: 0.4; transform: scale(0.95); }
    50% { opacity: 1; transform: scale(1); }
}

/* ============================================================
   HEADER — Logo grande com respiro
   ============================================================ */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0 14px;
    border-bottom: 1px solid var(--card-border);
    margin-bottom: 14px;
}
.header-logo-wrap {
    flex: 1;
    display: flex;
    align-items: center;
}
.header-logo {
    height: 40px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
}
.header-user {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    flex-shrink: 0;
}
.header-name {
    font-size: 15px;
    font-weight: 800;
    color: var(--text);
}
.header-level {
    font-size: 10px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 800;
}

/* ============================================================
   SUMMARY ROW
   ============================================================ */
.summary-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}
.summary-card {
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 10px 6px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.summary-value {
    font-size: 16px;
    font-weight: 800;
    color: var(--accent);
    line-height: 1.2;
}
.summary-label {
    font-size: 9px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-weight: 400;
}

/* ============================================================
   GEMATRIA CARD
   ============================================================ */
.gematria-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 12px;
    margin-bottom: 12px;
}
.gematria-left { flex-shrink: 0; padding-top: 2px; }
.gematria-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    font-size: 20px;
    font-weight: 800;
    color: var(--accent);
    background: rgba(102, 255, 255, 0.06);
}
.gematria-right {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.gematria-label {
    font-size: 8px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}
.gematria-title {
    font-size: 13px;
    font-weight: 800;
    color: var(--accent);
}
.gematria-desc {
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.3;
}
.gematria-insight {
    font-size: 10px;
    color: rgba(102, 255, 255, 0.65);
    line-height: 1.4;
    font-style: italic;
    margin-top: 3px;
    padding-top: 3px;
    border-top: 1px solid rgba(102, 255, 255, 0.06);
}
.gematria-date {
    font-size: 9px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ============================================================
   CTA CARDS & BUTTONS
   ============================================================ */
.cta-card {
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 14px;
    text-align: center;
}
.cta-text {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 12px;
}
.cta-btn {
    display: block;
    width: 100%;
    padding: 12px 16px;
    background: var(--accent);
    color: #000000;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-decoration: none;
    text-align: center;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: opacity 0.2s;
}
.cta-btn:hover, .cta-btn:active { opacity: 0.85; }
.cta-btn-sm {
    display: block;
    width: 100%;
    padding: 9px 12px;
    background: transparent;
    color: var(--accent);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    text-align: center;
    border-radius: var(--radius-sm);
    border: 1px solid var(--accent);
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 8px;
}
.cta-btn-sm:hover, .cta-btn-sm:active {
    background: rgba(102, 255, 255, 0.08);
}
.cta-inline {
    margin-top: 14px;
    padding-top: 10px;
}

/* ============================================================
   TAB NAVIGATION
   ============================================================ */
.tab-nav {
    display: flex;
    gap: 0;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--card-border);
}
.tab-btn {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 9px 4px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}
.tab-btn.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ============================================================
   SECTION TITLE / SUBTITLE / NOTE
   ============================================================ */
.section-title {
    font-size: 10px;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin: 16px 0 4px;
}
.section-subtitle {
    font-size: 10px;
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 8px;
    line-height: 1.3;
}
.section-note {
    font-size: 9px;
    color: var(--text-muted);
    font-style: italic;
    line-height: 1.4;
    margin-top: 8px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-sm);
    border-left: 2px solid rgba(102, 255, 255, 0.15);
}

/* ============================================================
   OPPORTUNITY CARDS (Staking)
   ============================================================ */
.opp-card {
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 12px;
    margin-bottom: 8px;
}
.opp-tesouro {
    border-color: rgba(255, 215, 0, 0.15);
    background: rgba(255, 215, 0, 0.03);
}
.opp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.opp-name {
    font-size: 14px;
    font-weight: 800;
    color: var(--text);
}
.opp-badge {
    font-size: 9px;
    font-weight: 800;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 2px 8px;
    border: 1px solid var(--accent);
    border-radius: 20px;
}
.badge-tesouro {
    color: var(--gold);
    border-color: var(--gold);
}
.opp-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.opp-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.opp-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.opp-value {
    font-size: 12px;
    color: var(--text-secondary);
}
.opp-value.accent {
    color: var(--accent);
    font-weight: 800;
}

/* ============================================================
   ITEMS LIST & CARDS
   ============================================================ */
.items-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.empty-state {
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
    padding: 20px 0;
}
.item-card {
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
}
.item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}
.item-title {
    font-size: 13px;
    font-weight: 800;
    color: var(--text);
}
.item-status {
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 8px;
    border-radius: 20px;
}
.status-confirmado { background: rgba(0, 230, 118, 0.12); color: var(--success); }
.status-pendente { background: rgba(255, 214, 0, 0.12); color: var(--warning); }
.status-enviado { background: rgba(102, 255, 255, 0.12); color: var(--accent); }
.status-cancelado { background: rgba(255, 82, 82, 0.10); color: var(--danger); }
.status-aguardando_pix { background: rgba(255, 214, 0, 0.12); color: var(--warning); }
.status-cadastrado_dash { background: rgba(102, 255, 255, 0.12); color: var(--accent); }

.item-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3px 12px;
}
.item-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.item-detail .label {
    font-size: 9px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.item-detail .value {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 400;
}

/* ============================================================
   CANCELLED TOGGLE
   ============================================================ */
.cancelled-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 8px 0;
    margin-top: 10px;
    background: none;
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
    font-size: 11px;
    cursor: pointer;
    transition: color 0.2s;
}
.cancelled-toggle:hover { color: var(--text-secondary); }
.toggle-arrow {
    font-size: 10px;
    transition: transform 0.2s;
}
.cancelled-toggle.open .toggle-arrow {
    transform: rotate(180deg);
}
.items-list.collapsed {
    display: none;
}
.items-list.collapsed.open {
    display: flex;
}

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--card-border); border-radius: 3px; }
