@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* =========================================================================
   GhostPost IG — tema "Aurora Neon" (redesign 2026, v2 colorido).
   CSS compartilhado: sobe TODAS as páginas. Mantém todas as classes/tokens.
   ========================================================================= */
:root {
    --bg-main: #08080c;
    --bg-dark: #08080c;
    --bg-card: #14141b;
    --card-bg: rgba(22, 22, 30, 0.72);
    --bg-card-hover: #1b1b24;
    --glass-bg: rgba(255, 255, 255, 0.04);
    --border: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.08);
    --text-main: #f4f4f7;
    --text: #f4f4f7;
    --text-muted: #a6a6b4;
    --text-dim: #8b8b99;
    --primary: #6d6af7;
    --primary-hover: #5b57f0;
    --accent-blue: #38bdf8;
    --accent-purple: #a78bfa;
    --accent-pink: #f472b6;
    --success: #34d399;
    --danger: #fb7185;
    --accent-red: #fb7185;
    --warning: #fbbf24;
    --radius: 15px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --ease-out: cubic-bezier(0.22, 0.7, 0.2, 1);
    --shadow-card: 0 1px 0 rgba(255,255,255,0.04) inset, 0 16px 40px -24px rgba(0,0,0,0.8);
    --grad-brand: linear-gradient(135deg, #8b8bff 0%, #6d6af7 42%, #c084fc 100%);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }
html { scroll-behavior: smooth; }

body {
    color: var(--text-main);
    display: flex;
    min-height: 100vh;
    background: var(--bg-main);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    font-feature-settings: "cv02","cv03","cv04","tnum";
}

/* ---- Aurora de fundo (blobs animados, atrás de tudo) ---- */
.aurora-bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.aurora-bg span {
    position: absolute; border-radius: 50%; filter: blur(72px);
    will-change: transform; animation: auroraFloat 17s ease-in-out infinite;
}
.aurora-bg span:nth-child(1) { width: 540px; height: 540px; background: #6d6af7; top: -170px; right: 4%; opacity: 0.40; }
.aurora-bg span:nth-child(2) { width: 460px; height: 460px; background: #d026c9; bottom: -190px; left: 6%; opacity: 0.26; animation-delay: -5s; }
.aurora-bg span:nth-child(3) { width: 420px; height: 420px; background: #22d3ee; top: 28%; right: 32%; opacity: 0.20; animation-delay: -10s; }

/* scrollbar */
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
*::-webkit-scrollbar-thumb:hover { background: rgba(109,106,247,0.55); background-clip: padding-box; }
::selection { background: rgba(109,106,247,0.35); color: #fff; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 6px; }

/* ============================ Sidebar ============================ */
.sidebar {
    width: 264px;
    background: linear-gradient(180deg, rgba(19,19,27,0.82), rgba(11,11,17,0.86));
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-right: 1px solid var(--border);
    display: flex; flex-direction: column;
    padding: 64px 0 20px; position: fixed; height: 100vh; z-index: 100; overflow-y: auto;
    transition: transform 0.35s var(--ease-out);
}
.sidebar-header {
    padding: 0 24px 22px; font-size: 22px; font-weight: 800; letter-spacing: -0.02em;
    display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--border); margin-bottom: 18px;
}
.sidebar-header i { color: var(--accent-purple); }
.sidebar-header span {
    background: var(--grad-brand); background-size: 200% auto;
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
    animation: brandShimmer 6s linear infinite;
}
.nav-links { list-style: none; flex: 1; padding: 0 14px; }
.nav-links li { margin-bottom: 4px; }
.nav-links a {
    position: relative; display: flex; align-items: center; gap: 12px;
    padding: 11px 14px; color: var(--text-dim); text-decoration: none; border-radius: 11px;
    font-weight: 500; font-size: 14.5px;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s var(--ease-out);
}
.nav-links a i { width: 20px; height: 20px; transition: transform 0.25s var(--ease-out); }
.nav-links a::before {
    content: ''; position: absolute; left: 2px; top: 50%; width: 3px; height: 62%; border-radius: 4px;
    background: linear-gradient(var(--accent-purple), var(--primary));
    transform: translateY(-50%) scaleY(0); transition: transform 0.28s var(--ease-out);
}
.nav-links a:hover { background: var(--glass-bg); color: var(--text-main); transform: translateX(3px); }
.nav-links a:hover i { transform: scale(1.1); }
.nav-links a.active { background: linear-gradient(90deg, rgba(109,106,247,0.2), rgba(109,106,247,0.04)); color: #cfceff; }
.nav-links a.active::before { transform: translateY(-50%) scaleY(1); }
.nav-links a.active i { color: var(--accent-purple); }

/* ============================ Main ============================ */
.main-content { flex: 1; margin-left: 264px; padding: 40px 44px; max-width: 1300px; position: relative; z-index: 1; transition: margin-left 0.35s var(--ease-out); }
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 34px; animation: fadeInUp 0.5s var(--ease-out) both; }
.page-header h1 {
    font-size: 28px; font-weight: 800; letter-spacing: -0.03em;
    background: linear-gradient(120deg, #ffffff, #cdccff 60%, #f0abfc);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

/* ============================ Grids ============================ */
.grid-3, .grid-4 { display: grid; gap: 18px; margin-bottom: 30px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

/* ============================ Stat cards (coloridos) ============================ */
.stat-card {
    --c: var(--primary);
    position: relative; overflow: hidden;
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 20px 22px; display: flex; flex-direction: column; gap: 6px;
    transition: transform 0.28s var(--ease-out), border-color 0.28s ease, box-shadow 0.28s ease, background 0.28s ease;
    animation: fadeInUp 0.5s var(--ease-out) both;
}
.stat-card::after { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, transparent, var(--c), transparent); opacity: 0.9; }
.stat-card::before { content: ''; position: absolute; width: 150px; height: 150px; right: -48px; top: -56px; border-radius: 50%; background: var(--c); opacity: 0.13; filter: blur(30px); transition: opacity 0.3s ease; }
.stat-card:hover { transform: translateY(-5px); border-color: var(--c); box-shadow: 0 24px 46px -22px var(--c); background: var(--bg-card-hover); }
.stat-card:hover::before { opacity: 0.22; }
.stat-card h3 { font-size: 13px; color: var(--text-dim); font-weight: 500; letter-spacing: 0.01em; }
.stat-card .value {
    font-size: 31px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.12; font-variant-numeric: tabular-nums;
    background: linear-gradient(180deg, #ffffff 22%, var(--c)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: var(--c);
}
.stat-card:nth-child(1){--c:#34d399}
.stat-card:nth-child(2){--c:#fb7185}
.stat-card:nth-child(3){--c:#fbbf24}
.stat-card:nth-child(4){--c:#c084fc}
.stat-card:nth-child(5){--c:#38bdf8}
.stat-card:nth-child(6){--c:#f472b6}
.stat-card:nth-child(7){--c:#22d3ee}
.stat-card:nth-child(8){--c:#60a5fa}
.stat-card:nth-child(9){--c:#34d399}
.stat-card:nth-child(1){animation-delay:.02s}.stat-card:nth-child(2){animation-delay:.06s}.stat-card:nth-child(3){animation-delay:.10s}.stat-card:nth-child(4){animation-delay:.14s}.stat-card:nth-child(5){animation-delay:.18s}.stat-card:nth-child(6){animation-delay:.22s}.stat-card:nth-child(7){animation-delay:.26s}.stat-card:nth-child(8){animation-delay:.30s}.stat-card:nth-child(9){animation-delay:.34s}

/* ============================ Panels / tables ============================ */
.card-panel {
    position: relative; background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px;
    padding: 24px 26px; margin-bottom: 22px; overflow-x: auto; box-shadow: var(--shadow-card);
    animation: fadeInUp 0.55s var(--ease-out) both;
}
.card-panel::before { content: ''; position: absolute; left: 24px; right: 24px; top: 0; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--primary), transparent 70%); opacity: 0.6; }
.card-panel h3 { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 4px; }

table { width: 100%; border-collapse: collapse; }
th, td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--border); }
th { color: var(--text-dim); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; }
tbody tr { transition: background 0.18s ease; }
tr:hover td { background: rgba(109,106,247,0.07); }
tbody tr:last-child td { border-bottom: none; }

/* ============================ Badges ============================ */
.badge { padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; border: 1px solid transparent; }
.badge.alive   { background: rgba(52,211,153,0.13);  color: var(--success); border-color: rgba(52,211,153,0.3); }
.badge.dead    { background: rgba(251,113,133,0.13); color: var(--danger);  border-color: rgba(251,113,133,0.3); }
.badge.pending { background: rgba(251,191,36,0.13);  color: var(--warning); border-color: rgba(251,191,36,0.3); }
.badge.success { background: rgba(52,211,153,0.13);  color: var(--success); border-color: rgba(52,211,153,0.3); }
.badge.danger  { background: rgba(251,113,133,0.13); color: var(--danger);  border-color: rgba(251,113,133,0.3); }

/* ============================ Buttons / inputs ============================ */
.btn {
    padding: 11px 22px; color: #fff; border: none; border-radius: 12px; cursor: pointer; font-weight: 700; font-size: 14px;
    background: linear-gradient(135deg, var(--primary), #a855f7);
    background-size: 160% auto;
    transition: transform 0.2s var(--ease-out), box-shadow 0.25s ease, background-position 0.4s ease;
    display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
    box-shadow: 0 10px 24px -10px rgba(139,92,246,0.8);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 16px 34px -10px rgba(139,92,246,0.85); background-position: right center; }
.btn:active { transform: translateY(0) scale(0.98); }

.form-group { margin-bottom: 18px; }
.form-group label { display: block; margin-bottom: 8px; color: var(--text-dim); font-size: 14px; font-weight: 500; }
.form-control { width: 100%; padding: 12px 15px; background: rgba(255,255,255,0.035); border: 1px solid var(--border); color: var(--text-main); border-radius: 12px; font-size: 14px; transition: var(--transition); }
.form-control:focus { outline: none; border-color: var(--primary); background: rgba(255,255,255,0.06); box-shadow: 0 0 0 3px rgba(109,106,247,0.2); }
.form-control::placeholder { color: #64646f; }

/* ============================ Componentes "modern.css" ============================ */
.modern-card { background: var(--card-bg); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid var(--glass-border); border-radius: 16px; padding: 26px; box-shadow: var(--shadow-card); transition: border-color 0.3s ease, transform 0.3s var(--ease-out); }
.modern-card:hover { border-color: rgba(167,139,250,0.4); transform: translateY(-2px); }
.upload-card { border: 2px dashed rgba(167,139,250,0.35); background: rgba(167,139,250,0.04); border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 180px; transition: all 0.3s ease; cursor: pointer; text-align: center; padding: 20px; }
.upload-card:hover { border-color: var(--accent-purple); background: rgba(167,139,250,0.1); transform: translateY(-2px); }
.terminal-window { background: #060608; border-radius: 12px; border: 1px solid var(--glass-border); padding: 16px; font-family: 'Fira Code','Courier New',monospace; font-size: 13px; color: #e2e8f0; max-height: 250px; overflow-y: auto; position: relative; box-shadow: inset 0 2px 12px rgba(0,0,0,0.55); }
.terminal-header { display: flex; gap: 8px; margin-bottom: 12px; border-bottom: 1px solid var(--glass-border); padding-bottom: 10px; align-items: center; }
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot-red { background: #ff5f56; } .dot-yellow { background: #ffbd2e; } .dot-green { background: #27c93f; }
.log-line { margin-bottom: 6px; display: flex; gap: 12px; line-height: 1.4; }
.log-time { color: #64748b; font-size: 12px; }
.log-tag { font-weight: 700; letter-spacing: 0.5px; }
.log-tag.info { color: var(--accent-blue); } .log-tag.success { color: var(--success); } .log-tag.error { color: var(--danger); }
.modern-btn { background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue)); border: none; border-radius: 12px; padding: 13px 26px; color: #fff; font-weight: 700; letter-spacing: 0.4px; cursor: pointer; transition: transform 0.2s var(--ease-out), box-shadow 0.25s ease; display: inline-flex; align-items: center; gap: 10px; font-size: 14px; box-shadow: 0 8px 22px -10px rgba(139,92,246,0.6); }
.modern-btn:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -8px rgba(139,92,246,0.6); }
.form-control-modern { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.1); border-radius: 12px; padding: 13px 15px; color: #fff; width: 100%; font-family: inherit; font-size: 14px; transition: all 0.2s ease; }
.form-control-modern:focus { border-color: var(--accent-purple); outline: none; background: rgba(255,255,255,0.06); box-shadow: 0 0 0 3px rgba(167,139,250,0.18); }
.form-control-modern::placeholder { color: #64646f; }
select.form-control-modern { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; padding-right: 40px; }
select.form-control-modern option { background: var(--bg-dark); color: #fff; }

/* ============================ Menu toggle + responsivo ============================ */
.menu-toggle { position: fixed; top: 16px; left: 16px; z-index: 200; width: 44px; height: 44px; border-radius: 12px; background: rgba(22,22,30,0.8); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid var(--border); color: var(--text-main); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: var(--transition); box-shadow: 0 6px 18px rgba(0,0,0,0.4); }
.menu-toggle:hover { background: var(--bg-card-hover); border-color: var(--primary); color: var(--accent-purple); transform: translateY(-1px); }
.menu-toggle svg { width: 22px; height: 22px; }
body.nav-closed .sidebar { transform: translateX(-100%); }
body.nav-closed .main-content { margin-left: 0; padding-left: 72px; }
.sidebar-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(2px); z-index: 90; opacity: 0; visibility: hidden; transition: opacity 0.3s ease; }

@media (max-width: 991px) {
    .main-content { margin-left: 0 !important; max-width: 100%; padding: 76px 16px 28px; }
    .sidebar { transform: translateX(-100%); box-shadow: 0 0 50px rgba(0,0,0,0.7); }
    body.nav-open .sidebar { transform: translateX(0); }
    body.nav-open .sidebar-backdrop { opacity: 1; visibility: visible; }
    body.nav-closed .main-content { padding-left: 16px; }
    .page-header { flex-direction: column; align-items: flex-start; gap: 14px; }
    .page-header h1 { font-size: 23px; }
    th, td { padding: 10px; font-size: 14px; }
    .grid-3, .grid-4 { gap: 14px; }
    .btn { padding: 10px 18px; }
}

/* ============================ Keyframes ============================ */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes brandShimmer { to { background-position: 200% center; } }
@keyframes auroraFloat { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(32px,-26px) scale(1.16); } }
@keyframes gpCount { from { opacity: 0.35; } to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
    .stat-card, .card-panel, .page-header { animation: none !important; opacity: 1 !important; transform: none !important; }
    .aurora-bg span { animation: none !important; }
}
