/* ==========================================================================
   CRIMX DEVELOPER CONSOLE - FIREBASE DASHBOARD STYLE
   Theme: Neutral Charcoal / Slate / Modern Developer Console (Monochrome Gray)
   ========================================================================== */

:root {
    --fb-bg: #101216;
    --fb-surface: #181b20;
    --fb-card: #1f232b;
    --fb-card-hover: #262b35;
    --fb-sidebar: #14161a;
    --fb-border: #2c323d;
    --fb-border-light: #373f4e;
    --fb-text-high: #f9fafb;
    --fb-text-mid: #9ca3af;
    --fb-text-low: #6b7280;
    --fb-accent: #e5e7eb;
    --fb-blue: #38bdf8;
    --fb-green: #34d399;
    --fb-yellow: #fbbf24;
    --fb-red: #f87171;
    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--fb-bg);
    color: var(--fb-text-high);
    font-family: var(--font-body);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* ─── FIREBASE TOP BAR ─── */
.fb-top-bar {
    height: 54px;
    background: var(--fb-surface);
    border-bottom: 1px solid var(--fb-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.fb-brand-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.fb-logo-img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5));
}

.fb-project-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--fb-card);
    border: 1px solid var(--fb-border);
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 0.84rem;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s;
}

.fb-project-badge:hover {
    background: var(--fb-card-hover);
    border-color: var(--fb-border-light);
}

.fb-search-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--fb-bg);
    border: 1px solid var(--fb-border);
    border-radius: 8px;
    padding: 6px 14px;
    width: 380px;
    color: var(--fb-text-mid);
    font-size: 0.82rem;
    transition: all 0.2s;
}

.fb-search-bar:focus-within {
    border-color: #fff;
    color: #fff;
}

.fb-search-input {
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-size: 0.82rem;
    width: 100%;
}

.fb-top-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.fb-icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: transparent;
    border: none;
    color: var(--fb-text-mid);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    transition: all 0.2s;
}

.fb-icon-btn:hover {
    background: var(--fb-card);
    color: #fff;
}

.fb-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1.5px solid var(--fb-border-light);
    object-fit: cover;
}

/* ─── FIREBASE 2-COLUMN APP LAYOUT ─── */
.fb-layout {
    display: flex;
    flex: 1;
    min-height: calc(100vh - 54px);
}

/* Sidebar */
.fb-sidebar {
    width: 240px;
    background: var(--fb-sidebar);
    border-right: 1px solid var(--fb-border);
    padding: 16px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex-shrink: 0;
}

.fb-nav-header {
    font-size: 0.68rem;
    font-weight: 800;
    color: var(--fb-text-low);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 12px 12px 6px;
}

.fb-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 6px;
    color: var(--fb-text-mid);
    background: transparent;
    border: none;
    font-size: 0.86rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    text-align: left;
    transition: all 0.16s ease;
}

.fb-nav-item:hover {
    color: #fff;
    background: var(--fb-card);
}

.fb-nav-item.active {
    color: #fff;
    background: var(--fb-card);
    font-weight: 700;
    border: 1px solid var(--fb-border);
}

.fb-nav-icon {
    font-size: 1rem;
    width: 20px;
    display: inline-flex;
    justify-content: center;
}

/* ─── MAIN VIEWPORT ─── */
.fb-viewport {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--fb-bg);
}

/* Project Header Banner */
.fb-project-header {
    background: var(--fb-surface);
    border-bottom: 1px solid var(--fb-border);
    padding: 18px 36px;
}

.fb-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0;
}

.fb-header-title-row {
    display: flex;
    align-items: center;
    gap: 14px;
}

.fb-header-logo {
    width: 44px;
    height: 44px;
    background: var(--fb-card);
    border: 1px solid var(--fb-border);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
}

.fb-header-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.fb-project-title {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
}

.fb-project-meta {
    font-size: 0.78rem;
    color: var(--fb-text-mid);
    display: flex;
    gap: 10px;
}

/* Firebase Tab Bar */
.fb-tab-bar {
    display: flex;
    gap: 4px;
}

.fb-tab-btn {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--fb-text-mid);
    font-size: 0.88rem;
    font-weight: 600;
    padding: 10px 18px;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: -1px;
}

.fb-tab-btn:hover {
    color: #fff;
}

.fb-tab-btn.active {
    color: #fff;
    border-bottom-color: #fff;
    font-weight: 700;
}

/* Content Body */
.fb-content-body {
    padding: 30px 36px 80px;
    max-width: 1160px;
    width: 100%;
}

/* ─── FIREBASE STATS & METRICS ─── */
.fb-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin-bottom: 26px;
}

.fb-stat-card {
    background: var(--fb-surface);
    border: 1px solid var(--fb-border);
    border-radius: 10px;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.fb-stat-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--fb-text-low);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fb-stat-val {
    font-family: var(--font-heading);
    font-size: 1.85rem;
    font-weight: 800;
    color: #fff;
}

.fb-stat-sub {
    font-size: 0.74rem;
    color: var(--fb-text-mid);
}

/* ─── CARDS ─── */
.fb-card {
    background: var(--fb-surface);
    border: 1px solid var(--fb-border);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.fb-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    gap: 16px;
    flex-wrap: wrap;
}

.fb-card-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 800;
    color: #fff;
}

.fb-card-desc {
    font-size: 0.85rem;
    color: var(--fb-text-mid);
    margin-top: 2px;
}

/* ─── FIREBASE DATA TABLE ─── */
.fb-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    margin-top: 8px;
}

.fb-table th {
    text-align: left;
    padding: 12px 14px;
    color: var(--fb-text-low);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    border-bottom: 1px solid var(--fb-border);
}

.fb-table td {
    padding: 14px;
    border-bottom: 1px solid var(--fb-border);
    color: var(--fb-text-high);
}

.fb-table tr:hover td {
    background: var(--fb-card);
}

/* ─── BUTTONS ─── */
.fb-btn-primary {
    background: #e5e7eb;
    color: #111418;
    border: none;
    font-weight: 700;
    font-size: 0.86rem;
    padding: 9px 18px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    flex-shrink: 0;
}

.fb-btn-primary:hover {
    background: #ffffff;
    transform: translateY(-1px);
}

.fb-btn-secondary {
    background: var(--fb-card);
    color: #fff;
    border: 1px solid var(--fb-border);
    font-weight: 600;
    font-size: 0.82rem;
    padding: 7px 14px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    flex-shrink: 0;
}

.fb-btn-secondary:hover {
    background: var(--fb-card-hover);
    border-color: var(--fb-border-light);
}

.fb-btn-danger {
    background: rgba(248, 113, 113, 0.12);
    color: var(--fb-red);
    border: 1px solid rgba(248, 113, 113, 0.3);
    font-weight: 600;
    font-size: 0.76rem;
    padding: 5px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.fb-btn-danger:hover {
    background: #ef4444;
    color: #fff;
}

/* ─── FORMS ─── */
.fb-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

@media (max-width: 768px) {
    .fb-form-grid {
        grid-template-columns: 1fr;
    }
}

.fb-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.fb-label {
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--fb-text-mid);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.fb-input, .fb-textarea, .fb-select {
    background: var(--fb-card);
    border: 1px solid var(--fb-border);
    color: #fff;
    padding: 9px 12px;
    border-radius: 6px;
    font-size: 0.86rem;
    outline: none;
    font-family: inherit;
    transition: border-color 0.2s;
}

.fb-input:focus, .fb-textarea:focus, .fb-select:focus {
    border-color: #fff;
}

.fb-textarea {
    resize: vertical;
    min-height: 70px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
}

/* ─── "SIGN IN WITH CRIMX" OFFICIAL BUTTON WIDGET ─── */
.button-studio-preview-box {
    background: #0b0d10;
    border: 1px dashed var(--fb-border);
    border-radius: 12px;
    padding: 44px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    position: relative;
}

/* Official "Sign in with CrimX" button */
.crimx-signin-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 10px 22px;
    font-family: var(--font-heading);
    font-size: 0.96rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.crimx-signin-btn img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    flex-shrink: 0;
}

.crimx-signin-dark {
    background: #15181e;
    border: 1px solid #363b46;
    color: #ffffff;
}

.crimx-signin-dark:hover {
    background: #1f232b;
    border-color: #505764;
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.6);
}

.crimx-signin-slate {
    background: #262932;
    border: 1px solid #3e4452;
    color: #ffffff;
}

.crimx-signin-slate:hover {
    background: #313642;
    transform: translateY(-2px);
}

.crimx-signin-outline {
    background: transparent;
    border: 1.5px solid #4a5263;
    color: #f3f4f6;
}

.crimx-signin-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: #ffffff;
    color: #fff;
    transform: translateY(-2px);
}

/* Code Snippet Box */
.fb-code-box {
    background: #0b0d10;
    border: 1px solid var(--fb-border);
    border-radius: 8px;
    padding: 16px;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: #93c5fd;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
    line-height: 1.5;
}

.fb-code-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

/* ─── FIREBASE AUTHENTICATION SUB-TABS ─── */
.fb-auth-subtabs {
    display: flex;
    gap: 6px;
    border-bottom: 1px solid var(--fb-border);
    margin-top: 14px;
}

.fb-auth-subtab-btn {
    background: transparent;
    border: none;
    color: var(--fb-text-mid);
    font-size: 0.88rem;
    font-weight: 600;
    padding: 10px 20px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    font-family: var(--font-body);
}

.fb-auth-subtab-btn:hover {
    color: #ffffff;
}

.fb-auth-subtab-btn.active {
    color: #ffffff;
    border-bottom-color: #38bdf8;
}

/* ─── CLASSIC GOOGLE-STYLE "SIGN IN WITH YOUR CRIMXID" MODAL & CARD ─── */
.crimxid-auth-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    font-family: var(--font-body);
}

.crimxid-header-title {
    font-size: 1.55rem;
    font-weight: 400;
    color: #e2e8f0;
    margin-bottom: 22px;
    text-align: center;
    letter-spacing: -0.3px;
}

.crimxid-header-title strong {
    font-weight: 800;
    color: #ffffff;
}

.crimxid-card {
    width: 100%;
    background: #46090e;
    background: linear-gradient(180deg, #4f0b11 0%, #360509 100%);
    border: 1px solid #680e16;
    border-radius: 6px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85);
    padding: 40px 34px 34px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
}

.crimxid-avatar-circle {
    width: 104px;
    height: 104px;
    border-radius: 50%;
    background: #0099ff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 22px;
    box-shadow: 0 6px 20px rgba(0, 153, 255, 0.4);
    overflow: hidden;
}

.crimxid-avatar-circle svg {
    width: 72px;
    height: 72px;
    fill: #ffffff;
}

.crimxid-greeting {
    font-size: 1.85rem;
    font-weight: 700;
    color: #ffffff;
    font-family: var(--font-heading);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.crimxid-app-prompt {
    font-size: 0.85rem;
    color: #fca5a5;
    margin-bottom: 26px;
    line-height: 1.45;
}

.crimxid-input-box {
    width: 100%;
    border: 2px solid #ef4444;
    background: #240406;
    color: #ffffff;
    border-radius: 4px;
    padding: 14px 18px;
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    margin-bottom: 20px;
    transition: all 0.2s ease;
    text-align: left;
}

.crimxid-input-box::placeholder {
    color: #ef4444;
    opacity: 0.9;
}

.crimxid-input-box:focus {
    border-color: #f87171;
    background: #2c0508;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.25);
}

.crimxid-actions {
    width: 100%;
    display: flex;
    gap: 12px;
}

.crimxid-btn-submit {
    flex: 1;
    background: #ef4444;
    color: #ffffff;
    border: none;
    padding: 13px;
    border-radius: 4px;
    font-size: 0.96rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    font-family: var(--font-heading);
}

.crimxid-btn-submit:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

.crimxid-btn-cancel {
    background: rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
    border: 1px solid rgba(255, 255, 255, 0.16);
    padding: 13px 20px;
    border-radius: 4px;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.crimxid-btn-cancel:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

.crimxid-footer {
    margin-top: 24px;
    text-align: center;
}

.crimxid-footer-tagline {
    font-size: 0.95rem;
    color: #94a3b8;
    margin-bottom: 4px;
    font-weight: 500;
}

.crimxid-footer-hashtag {
    font-size: 0.95rem;
    color: #00d2ff;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 0.3px;
}

