/* ==========================================================================
   UAI DATA — APPLE SPACE BLACK & CYBER FINTECH DESIGN SYSTEM (DARK ONLY)
   Minimalist, Ultra-Clean, High Contrast & 100% Cohesive
   ========================================================================== */

:root,
html,
body {
    --bg-canvas: #050811;
    --bg-surface: #0a0f1d;
    --bg-card: rgba(15, 23, 42, 0.78);
    --bg-card-hover: rgba(22, 34, 60, 0.85);
    --bg-sidebar: #060913;
    --bg-topbar: rgba(6, 9, 19, 0.88);
    --bg-input: #080d1a;

    --border-subtle: rgba(255, 255, 255, 0.07);
    --border-card: rgba(255, 255, 255, 0.09);
    --border-focus: #00e599;

    --text-primary: #ffffff;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-dim: #64748b;

    --primary: #00e599;
    --primary-hover: #00ffac;
    --primary-glow: rgba(0, 229, 153, 0.32);
    --primary-dark: #00b377;
    --cyan: #38bdf8;
    --danger: #ef4444;
    --warning: #f59e0b;

    --card-shadow: 0 16px 48px rgba(0, 0, 0, 0.55), 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* -------------------------------------------------------------
   GLOBAL CANVAS & SMOOTH RENDERING
---------------------------------------------------------------- */
html {
    background-color: #050811 !important;
    color: #f8fafc !important;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Inter", "Segoe UI", Roboto, sans-serif !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
    text-rendering: optimizeLegibility !important;
    min-height: 100% !important;
}

body {
    background:
        radial-gradient(ellipse 900px 500px at 80% -5%, rgba(0, 229, 153, 0.07), transparent 60%),
        radial-gradient(ellipse 750px 400px at 15% 45%, rgba(56, 189, 248, 0.04), transparent 55%),
        #050811 !important;
    color: #f8fafc !important;
    font-family: inherit !important;
    margin: 0 !important;
    min-height: 100vh !important;
}

h1, h2, h3, h4, h5, h6 {
    color: #ffffff !important;
    font-weight: 700 !important;
    letter-spacing: -0.025em !important;
}

p, span, label, small {
    color: inherit;
}

/* -------------------------------------------------------------
   CLEAN TOPBAR (SPACE BLACK FROSTED GLASS)
---------------------------------------------------------------- */
.topbar {
    background: rgba(6, 9, 19, 0.88) !important;
    backdrop-filter: blur(25px) !important;
    -webkit-backdrop-filter: blur(25px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 25 !important;
    display: flex;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 12px 28px !important;
}

.topbar-title {
    color: #ffffff !important;
    font-size: 15px !important;
    font-weight: 700 !important;
}

.topbar-context {
    color: #00e599 !important;
    font-size: 11px !important;
    font-weight: 750 !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
}

.topbar-actions {
    display: flex;
    align-items: center !important;
    gap: 12px !important;
}

.avatar {
    background: linear-gradient(135deg, #00e599 0%, #00b377 100%) !important;
    color: #03140c !important;
    font-weight: 800 !important;
    border-radius: 50% !important;
    box-shadow: 0 0 12px rgba(0, 229, 153, 0.3) !important;
}

.icon-button {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #94a3b8 !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
}

.icon-button:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

/* -------------------------------------------------------------
   SIDEBAR (COMPACT, SLEEK OBSIDIAN)
---------------------------------------------------------------- */
.sidebar {
    background: #060913 !important;
    border-right: 1px solid rgba(255, 255, 255, 0.07) !important;
    color: #ffffff !important;
}

.sidebar-brand {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
}

.nav-button {
    color: #94a3b8 !important;
    font-size: 12.5px !important;
    font-weight: 550 !important;
    border-radius: 9px !important;
    padding: 7px 12px !important;
    margin: 1px 4px !important;
    transition: all 0.15s ease !important;
}

.nav-button:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.05) !important;
}

.nav-button.active {
    color: #00e599 !important;
    background: linear-gradient(90deg, rgba(0, 229, 153, 0.16), rgba(0, 229, 153, 0.03)) !important;
    border-left: 3px solid #00e599 !important;
    font-weight: 700 !important;
}

.sidebar-engine-pill {
    background: rgba(0, 229, 153, 0.08) !important;
    border: 1px solid rgba(0, 229, 153, 0.25) !important;
    color: #00e599 !important;
    border-radius: 7px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
}

.sidebar-logout-btn {
    background: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #94a3b8 !important;
    border-radius: 8px !important;
    padding: 7px 12px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    display: flex;
    align-items: center !important;
    gap: 8px !important;
    width: 100% !important;
}

.sidebar-logout-btn:hover {
    color: #f87171 !important;
    border-color: rgba(239, 68, 68, 0.3) !important;
    background: rgba(239, 68, 68, 0.08) !important;
}

/* -------------------------------------------------------------
   CARDS, PANELS & CLEAN DASHBOARD WIDGETS
---------------------------------------------------------------- */
.card,
.panel,
.dashboard-card,
.admin-card,
.metric-card,
.admin-kpi-card,
.plan-table-shell,
.compliance-panel,
.trust-admin-panel,
.table-wrap,
.results-table-wrap,
.data-table-container,
[class*="-panel"]:not(.page-view),
[class*="-card"] {
    background: rgba(15, 23, 42, 0.78) !important;
    backdrop-filter: blur(25px) !important;
    -webkit-backdrop-filter: blur(25px) !important;
    border: 1px solid rgba(255, 255, 255, 0.09) !important;
    border-radius: 16px !important;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45) !important;
    color: #f8fafc !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.card:hover,
.panel:hover {
    border-color: rgba(255, 255, 255, 0.14) !important;
}

/* Dashboard Hero Banner */
.dashboard-hero {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(6, 26, 18, 0.7) 100%) !important;
    border: 1px solid rgba(0, 229, 153, 0.2) !important;
    border-radius: 18px !important;
    padding: 24px 28px !important;
    margin-bottom: 20px !important;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45) !important;
}

.hero-kicker,
.eyebrow,
.panel-kicker {
    color: #00e599 !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
}

.dashboard-hero h2 {
    color: #ffffff !important;
    font-size: 1.6rem !important;
    font-weight: 750 !important;
    margin: 6px 0 6px !important;
    letter-spacing: -0.02em !important;
}

.dashboard-hero p {
    color: #94a3b8 !important;
    font-size: 13.5px !important;
    margin: 0 !important;
}

/* Clean Metric Cards */
.metric-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)) !important;
    gap: 16px !important;
    margin-bottom: 22px !important;
}

.metric-card {
    padding: 20px 22px !important;
    display: flex;
    flex-direction: column !important;
    gap: 6px !important;
    border-radius: 14px !important;
}

.metric-card small {
    color: #94a3b8 !important;
    font-size: 11.5px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
}

.metric-card strong {
    color: #ffffff !important;
    font-size: 1.85rem !important;
    font-weight: 800 !important;
    line-height: 1.1 !important;
    letter-spacing: -0.03em !important;
}

.metric-card span {
    color: #64748b !important;
    font-size: 12px !important;
    font-weight: 500 !important;
}

/* Detail Rows inside Data Source Panel */
.detail-list {
    display: flex;
    flex-direction: column !important;
    gap: 10px !important;
    margin-top: 14px !important;
}

.detail-row {
    display: flex;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 10px 14px !important;
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-radius: 9px !important;
}

.detail-row span {
    color: #94a3b8 !important;
    font-size: 13px !important;
}

.detail-row strong {
    color: #ffffff !important;
    font-size: 13px !important;
    font-weight: 700 !important;
}

/* Step List (Clean 3-step guide) */
.step-list {
    display: flex;
    flex-direction: column !important;
    gap: 12px !important;
    margin-top: 14px !important;
}

.step {
    display: flex;
    align-items: flex-start !important;
    gap: 14px !important;
    padding: 12px 14px !important;
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-radius: 10px !important;
}

.step > span {
    width: 28px !important;
    height: 28px !important;
    border-radius: 50% !important;
    background: rgba(0, 229, 153, 0.15) !important;
    border: 1px solid rgba(0, 229, 153, 0.35) !important;
    color: #00e599 !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    display: flex;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
}

.step strong {
    color: #ffffff !important;
    font-size: 13px !important;
    display: block !important;
    margin-bottom: 2px !important;
}

.step small {
    color: #94a3b8 !important;
    font-size: 12px !important;
    line-height: 1.4 !important;
}

/* -------------------------------------------------------------
   HIDE OBSOLETE WARNING BANNERS & DEVELOPER JARGON
---------------------------------------------------------------- */
.national-beta-notice,
[class*="beta-notice"] {
    display: none !important;
}

/* -------------------------------------------------------------
   UNIVERSAL DARK INPUTS & FORM CONTROLS
---------------------------------------------------------------- */
input,
select,
textarea,
input[type="text"],
input[type="search"],
input[type="number"],
input[type="email"],
input[type="password"],
.control,
.form-control,
.admin-input {
    background: #070b14 !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 9px !important;
    color: #ffffff !important;
    font-size: 13.5px !important;
    font-family: inherit !important;
    min-height: 40px !important;
    padding: 8px 14px !important;
    box-sizing: border-box !important;
    transition: all 0.18s ease !important;
}

input:focus,
select:focus,
textarea:focus {
    background: #0b111e !important;
    border-color: #00e599 !important;
    box-shadow: 0 0 0 3px rgba(0, 229, 153, 0.22) !important;
    outline: none !important;
}

input::placeholder,
textarea::placeholder {
    color: #64748b !important;
}

select {
    cursor: pointer !important;
    color: #ffffff !important;
}

select option {
    background: #0d1424 !important;
    color: #ffffff !important;
    padding: 10px !important;
}

/* -------------------------------------------------------------
   BUTTONS (GLOWING EMERALD CTA & FROSTED SECONDARY)
---------------------------------------------------------------- */
.button,
button:not(.nav-button) {
    font-family: inherit !important;
    border-radius: 9px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    padding: 9px 18px !important;
    cursor: pointer !important;
    transition: all 0.18s ease !important;
}

.button-primary,
button[type="submit"]:not(.button-secondary):not(.button-outline) {
    background: linear-gradient(135deg, #00e599 0%, #00b377 100%) !important;
    color: #03140c !important;
    font-weight: 800 !important;
    border: none !important;
    box-shadow: 0 4px 16px rgba(0, 229, 153, 0.35) !important;
}

.button-primary:hover:not(:disabled),
button[type="submit"]:not(.button-secondary):hover:not(:disabled) {
    background: linear-gradient(135deg, #05f8a7 0%, #00c784 100%) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 24px rgba(0, 229, 153, 0.5) !important;
}

.button-secondary,
.button-outline {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #cbd5e1 !important;
}

.button-secondary:hover:not(:disabled),
.button-outline:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.09) !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.22) !important;
}

/* -------------------------------------------------------------
   REFINED DARK LOGIN SCREEN (COHESIVE & CRISP - NO WHITE BOX)
---------------------------------------------------------------- */
.login-view {
    background:
        radial-gradient(ellipse 900px 500px at 50% 15%, rgba(0, 229, 153, 0.09), transparent 65%),
        #050811 !important;
    min-height: 100vh !important;
    display: flex;
    align-items: center !important;
    justify-content: center !important;
    padding: 20px !important;
}

.login-shell {
    background: #0d1424 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 22px !important;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.75), 0 0 40px rgba(0, 229, 153, 0.1) !important;
    overflow: hidden !important;
    max-width: 960px !important;
    width: 100% !important;
}

/* Left side of login */
.login-art {
    background: linear-gradient(155deg, #071f16 0%, #05130d 100%) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.06) !important;
    padding: 40px !important;
}

.login-art .brand strong {
    color: #ffffff !important;
    font-size: 18px !important;
}

.login-art .brand small {
    color: #00e599 !important;
}

.login-kicker {
    color: #00e599 !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    letter-spacing: 0.1em !important;
    text-transform: uppercase !important;
}

/* CRITICAL FIX: "Dados que viram oportunidades" MUST BE CRISP WHITE */
.login-message h1 {
    color: #ffffff !important;
    font-size: 2.2rem !important;
    font-weight: 800 !important;
    line-height: 1.15 !important;
    letter-spacing: -0.03em !important;
    margin: 10px 0 14px !important;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5) !important;
}

.login-message p {
    color: #94a3b8 !important;
    font-size: 14px !important;
    line-height: 1.55 !important;
}

.security-note {
    color: #a0b3a8 !important;
    font-size: 12px !important;
}

.security-dot {
    background: #00e599 !important;
    box-shadow: 0 0 8px #00e599 !important;
}

/* Right side of login (MUST BE DARK - NO WHITE BACKGROUND) */
.login-form-area {
    background: #0a0f1d !important;
    padding: 40px !important;
    color: #ffffff !important;
}

.login-form-content h2 {
    color: #ffffff !important;
    font-size: 1.65rem !important;
    font-weight: 750 !important;
    margin: 6px 0 8px !important;
}

.login-form-content p.muted {
    color: #94a3b8 !important;
    font-size: 13.5px !important;
}

.login-form-area .field-label {
    color: #cbd5e1 !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    margin-bottom: 6px !important;
    display: block !important;
}

.login-form-area input {
    background: #060912 !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    color: #ffffff !important;
    border-radius: 9px !important;
    min-height: 44px !important;
    font-size: 14px !important;
    margin-bottom: 14px !important;
}

.login-form-area input:focus {
    border-color: #00e599 !important;
    box-shadow: 0 0 0 3px rgba(0, 229, 153, 0.25) !important;
}

.login-form-area .button-primary {
    min-height: 44px !important;
    font-size: 14px !important;
    width: 100% !important;
    margin-top: 6px !important;
}

.login-form-area a,
.login-form-area button.button-outline {
    border-color: rgba(255, 255, 255, 0.14) !important;
    color: #cbd5e1 !important;
}

/* -------------------------------------------------------------
   STATUS PILLS
---------------------------------------------------------------- */
.status-pill {
    border-radius: 999px !important;
    font-size: 11px !important;
    font-weight: 750 !important;
    padding: 5px 12px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
}

.status-online {
    background: rgba(0, 229, 153, 0.14) !important;
    color: #00e599 !important;
    border: 1px solid rgba(0, 229, 153, 0.35) !important;
}

.status-offline {
    background: rgba(239, 68, 68, 0.14) !important;
    color: #f87171 !important;
    border: 1px solid rgba(239, 68, 68, 0.35) !important;
}

.status-loading {
    background: rgba(245, 158, 11, 0.14) !important;
    color: #fbbf24 !important;
    border: 1px solid rgba(245, 158, 11, 0.35) !important;
}

/* -------------------------------------------------------------
   GARANTIA TOTAL DE PÁGINA ATIVA
---------------------------------------------------------------- */
.page-view.active {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.page-view:not(.active) {
    display: none !important;
}

.restricted-page {
    display: none !important;
}


.login-view.hidden,
#loginView.hidden,
.app-shell.hidden,
#appView.hidden,
.hidden {
    display: none !important;
}
