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

/* variables & design system */
:root {
    --bg-main: #0b0f19;
    --bg-card: rgba(22, 30, 49, 0.7);
    --bg-column: rgba(15, 23, 42, 0.55);
    --bg-sidebar: rgba(11, 15, 25, 0.85);
    
    --border-color: rgba(255, 255, 255, 0.06);
    --border-focus: rgba(59, 130, 246, 0.5);
    
    --color-text-main: #f1f5f9;
    --color-text-muted: #94a3b8;
    --color-text-dark: #64748b;
    
    /* Accent Colors */
    --accent-blue: #3b82f6;
    --accent-blue-gradient: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    --accent-cyan: #06b6d4;
    --accent-green: #10b981;
    --accent-red: #ef4444;
    --accent-amber: #f59e0b;
    --accent-purple: #8b5cf6;
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --transition-smooth: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --glass-blur: blur(16px);
    --shadow-premium: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-main);
    color: var(--color-text-main);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    background-image: 
        radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.08) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(6, 182, 212, 0.08) 0px, transparent 50%),
        radial-gradient(at 50% 50%, rgba(139, 92, 246, 0.03) 0px, transparent 60%);
}

button, input, select, textarea {
    font-family: inherit;
    color: inherit;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 4px;
    transition: var(--transition-smooth);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* SKELETON ANIMATION */
@keyframes skeleton-loading {
    0% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.skeleton {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.03) 25%, rgba(255, 255, 255, 0.08) 50%, rgba(255, 255, 255, 0.03) 75%);
    background-size: 400% 100%;
    animation: skeleton-loading 1.4s ease infinite;
    border-radius: 4px;
}

/* ==========================================================================
   TELA DE LOGIN
   ========================================================================== */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-card {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid var(--border-color);
    backdrop-filter: var(--glass-blur);
    width: 480px;
    border-radius: 24px;
    padding: 48px;
    box-shadow: var(--shadow-premium);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: var(--accent-blue-gradient);
}

.login-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
}

.login-logo svg {
    width: 42px;
    height: 42px;
    color: var(--accent-cyan);
    filter: drop-shadow(0 0 8px rgba(6, 182, 212, 0.5));
}

.login-logo h1 {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(to right, #ffffff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-tagline {
    color: var(--color-text-muted);
    font-size: 16px;
    margin-bottom: 36px;
    line-height: 1.5;
}

.login-instructions {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 32px;
    text-align: left;
}

.login-instructions h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--accent-cyan);
}

.login-instructions p {
    font-size: 13px;
    color: var(--color-text-muted);
    line-height: 1.5;
}

.login-google-btn-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.dev-bypass-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px dashed rgba(255, 255, 255, 0.15);
    color: var(--color-text-muted);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    transition: var(--transition-smooth);
    width: 100%;
}

.dev-bypass-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-text-main);
    border-color: var(--accent-blue);
}

.login-footer {
    font-size: 12px;
    color: var(--color-text-dark);
    margin-top: 36px;
}

/* ==========================================================================
   LAYOUT DO MONITOR (TWEETDECK DASHBOARD)
   ========================================================================== */
.app-layout {
    display: grid;
    grid-template-columns: auto 1fr; /* Sidebar automática, conteúdo expande */
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

/* Left Global Sidebar */
.app-sidebar {
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    backdrop-filter: var(--glass-blur);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 0;
    justify-content: space-between;
    width: 70px;
    flex-shrink: 0;
    z-index: 1200;
}

/* No desktop, apenas escondemos */
.app-sidebar.hidden {
    display: none;
}

.sidebar-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
    width: 100%;
}

.app-brand-icon {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-cyan);
    filter: drop-shadow(0 0 4px rgba(6, 182, 212, 0.3));
    cursor: pointer;
    transition: var(--transition-smooth);
}

.app-brand-icon:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: scale(1.05);
}

.sidebar-top .app-brand-icon {
    display: none;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    padding: 0 12px;
}

.menu-item {
    width: 100%;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: none;
    background: transparent;
    color: var(--color-text-muted);
    position: relative;
    text-decoration: none;
}

.menu-item span {
    display: none; /* Mantendo apenas ícones conforme o original */
}

.menu-item:hover, .menu-item.active {
    background: rgba(255, 255, 255, 0.05);
    color: var(--accent-blue);
}

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

    .app-sidebar {
        position: fixed;
        left: -80px;
        width: 80px;
        top: 0;
        bottom: 0;
        display: flex !important; /* Força exibir se estiver hidden no desktop */
        transition: left 0.3s ease;
    }

    .app-sidebar.open {
        left: 0;
        box-shadow: 20px 0 50px rgba(0,0,0,0.5);
    }

    .app-sidebar .menu-item {
        justify-content: center;
        padding: 0;
    }

    .app-sidebar .menu-item span {
        display: none;
    }

    .app-title-mobile-hide {
        display: none;
    }

    .mobile-column-selector-container {
        display: block;
        flex: 1;
        min-width: 100px;
    }

    .deck-select-container {
        display: flex;
        max-width: 120px;
    }

    .header-title-section {
        width: 100%;
        gap: 8px;
    }

    .app-header {
        padding: 0 12px;
        height: auto;
        min-height: 64px;
        flex-wrap: wrap;
        padding-bottom: 8px;
    }

    .header-actions {
        width: 100%;
        justify-content: space-between;
        border-top: 1px solid var(--border-color);
        padding-top: 8px;
        margin-top: 4px;
    }

    .stats-preview-pill {
        display: none;
    }

    .columns-viewport {
        overflow-x: hidden;
        padding: 10px;
    }

    .feed-column {
        display: none; 
        min-width: 100% !important;
        width: 100% !important;
        flex: 0 0 100%;
    }

    .feed-column.mobile-active {
        display: flex;
    }
}

.user-profile-btn {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    transition: var(--transition-smooth);
    background: #1e293b;
}

.user-profile-btn:hover {
    border-color: var(--accent-blue);
    transform: scale(1.05);
}

.user-profile-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* MAIN PANEL CONTENT */
.app-content {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

/* TOP STATUS & METRICS BAR */
.app-header {
    height: 64px;
    background: rgba(15, 23, 42, 0.85); /* Opacidade para não vazar conteúdo */
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    backdrop-filter: var(--glass-blur);
    z-index: 8;
    position: relative;
}

.header-title-section {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-title-section h2 {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
}

.deck-select-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.deck-dropdown {
    background-color: #0f172a;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 6px 14px;
    padding-right: 32px;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-main);
    outline: none;
    cursor: pointer;
    transition: var(--transition-smooth);
    -webkit-appearance: none;
    appearance: none;
}

.deck-dropdown option {
    background-color: #0f172a;
    color: var(--color-text-main);
}

.deck-dropdown:focus {
    border-color: var(--accent-blue);
    background-color: #131c31;
    color: var(--color-text-main);
}

.btn-icon-label {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--accent-blue-gradient);
    border: none;
    border-radius: 8px;
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
    transition: var(--transition-smooth);
}

.btn-icon-label:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--color-text-main);
    box-shadow: none;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.stats-preview-pill {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: var(--accent-green);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.stats-preview-pill span {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.9); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.5; }
}

/* COLS CONTAINER (TWEETDECK ROLAGEM HORIZONTAL) */
.columns-viewport {
    flex: 1;
    overflow-x: auto;
    overflow-y: hidden;
    background: rgba(0, 0, 0, 0.15);
    display: flex;
    padding: 16px 20px;
    gap: 16px;
    align-items: stretch;
}

.columns-viewport::after {
    content: '';
    flex: 0 0 10px; /* Margem extra no final para scroll lateral respirar */
}

/* INDIVIDUAL COLUMN */
.feed-column {
    flex: 0 0 360px;
    background-color: var(--bg-column);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    backdrop-filter: var(--glass-blur);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    transition: box-shadow 0.3s;
}

.feed-column:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

/* Column Header */
.column-header {
    padding: 16px;
    background: rgba(15, 23, 42, 0.4);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.column-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.column-title-container {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
}

.column-title-container svg {
    color: var(--accent-cyan);
    flex-shrink: 0;
}

/* Logo ND+ no lugar do ícone portal */
.icon-portal-nd-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border-radius: 4px;
    flex-shrink: 0;
    line-height: 0;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.icon-portal-nd-wrap--sm {
    width: 22px;
    height: 22px;
    padding: 2px;
}

.icon-portal-nd-wrap--md {
    width: 30px;
    height: 30px;
    padding: 3px;
}

.icon-portal-nd {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.post-source-badge .icon-portal-nd-wrap {
    vertical-align: middle;
}

.post-source-badge.source-portal {
    color: var(--color-text-main);
}

.column-title-container h3 {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.column-post-count {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
    color: var(--color-text-muted);
}

.column-last-update {
    font-size: 10px;
    color: var(--color-text-muted);
    font-weight: 500;
    margin-right: 4px;
    opacity: 0.7;
}

.column-last-update.updating {
    animation: pulse-update 1s infinite;
    color: var(--accent-cyan);
}

@keyframes pulse-update {
    0% { opacity: 0.4; }
    50% { opacity: 1; }
    100% { opacity: 0.4; }
}

.column-actions {
    display: flex;
    gap: 4px;
}

.btn-action-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: transparent;
    border: none;
    color: var(--color-text-dark);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.btn-action-icon:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--color-text-main);
}

.column-filters-tagline {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.03);
    font-size: 12px;
    border-bottom: 1px solid var(--border-color);
}

.column-filters-tagline select {
    background: #1e293b;
    color: var(--color-text-main);
    border: 1px solid var(--border-color);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
}

.category-filters-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.filter-badge {
    background: rgba(6, 182, 212, 0.15);
    color: var(--accent-cyan);
    padding: 2px 8px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    border: 1px solid rgba(6, 182, 212, 0.2);
}

.count-pill {
    background: var(--accent-cyan);
    color: white;
    padding: 0 5px;
    border-radius: 10px;
    font-size: 9px;
    font-weight: bold;
}

/* Scrollable Feed List */
.column-feed-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Post Cards inside Column */
.post-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 14px;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
}

.post-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.25);
    background: rgba(28, 38, 62, 0.7);
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.post-source-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
}

.source-portal { color: var(--accent-cyan); }
.source-twitter { color: #1da1f2; }
.source-instagram { color: #e1306c; }
.source-facebook { color: #1877f2; }

.post-time {
    font-size: 11px;
    color: var(--color-text-dark);
}

.post-author {
    font-size: 11px;
    color: var(--color-text-muted);
    font-weight: 500;
}

.post-title {
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--color-text-main);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card-image {
    width: 100%;
    height: 130px;
    border-radius: 8px;
    object-fit: cover;
    margin-top: 4px;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.post-excerpt {
    font-size: 12px;
    color: var(--color-text-muted);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}

.badge-tag {
    font-size: 10px;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.05);
    color: var(--color-text-muted);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.badge-category {
    background: rgba(6, 182, 212, 0.1);
    color: var(--accent-cyan);
    border: 1px solid rgba(6, 182, 212, 0.15);
}

.post-social-stats {
    display: flex;
    gap: 12px;
    margin-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    padding-top: 8px;
    font-size: 11px;
    color: var(--color-text-dark);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Empty or Add Column States */
.empty-column-placeholder {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
    color: var(--color-text-muted);
    gap: 16px;
}

.empty-column-placeholder svg {
    width: 48px;
    height: 48px;
    color: var(--color-text-dark);
}

.add-column-card {
    flex: 0 0 300px;
    border: 2px dashed rgba(255, 255, 255, 0.08);
    background: transparent;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.add-column-card:hover {
    border-color: var(--accent-blue);
    background: rgba(59, 130, 246, 0.02);
}

.add-column-btn-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--color-text-muted);
}

.add-column-btn-inner svg {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.04);
    padding: 8px;
    border-radius: 50%;
    color: var(--accent-blue);
    transition: var(--transition-smooth);
}

.add-column-card:hover .add-column-btn-inner svg {
    transform: scale(1.1);
    background: rgba(59, 130, 246, 0.15);
}

/* ==========================================================================
   MODAIS E ELEMENTOS FLUTUANTES (MODAL CONSTRUTOR DE COLUNAS)
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    width: 520px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    animation: slideUp 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
}

.modal-close-btn {
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close-btn:hover {
    color: var(--color-text-main);
}

.modal-body {
    padding: 24px;
    max-height: 70vh;
    overflow-y: auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--color-text-muted);
}

.form-input, .form-select {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-main);
    outline: none;
    transition: var(--transition-smooth);
}

.form-input {
    background: rgba(255, 255, 255, 0.03);
    cursor: text;
}

.form-select {
    background-color: #0f172a;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.form-select option {
    background-color: #0f172a;
    color: var(--color-text-main);
}

.form-input:focus {
    border-color: var(--accent-blue);
    background: rgba(255, 255, 255, 0.05);
}

.form-select:focus {
    border-color: var(--accent-blue);
    background-color: #131c31;
    color: var(--color-text-main);
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    background: rgba(255, 255, 255, 0.01);
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 8px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    cursor: pointer;
    user-select: none;
}

.checkbox-item input {
    accent-color: var(--accent-blue);
}

.form-help {
    font-size: 11px;
    color: var(--color-text-dark);
    margin-top: 4px;
}

/* Searchable multiselect (categorias / tags) */
.searchable-ms {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.searchable-ms .sms-control {
    position: relative;
}

.searchable-ms .sms-input {
    width: 100%;
}

.searchable-ms .sms-dropdown {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    z-index: 1100;
    max-height: min(360px, 50vh);
    overflow-y: auto;
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
    padding: 6px;
}

.searchable-ms .sms-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    user-select: none;
}

.searchable-ms .sms-option:hover {
    background: rgba(255, 255, 255, 0.05);
}

.searchable-ms .sms-option input {
    accent-color: var(--accent-blue);
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.searchable-ms .sms-empty {
    padding: 12px;
    font-size: 12px;
    color: var(--color-text-muted);
    text-align: center;
}

.searchable-ms .sms-create {
    display: block;
    width: 100%;
    text-align: left;
    padding: 10px;
    border: none;
    border-radius: 6px;
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-cyan);
    font-size: 13px;
    cursor: pointer;
}

.searchable-ms .sms-create:hover {
    background: rgba(59, 130, 246, 0.2);
}

.searchable-ms .sms-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 0;
}

.searchable-ms .sms-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-text-link {
    background: none;
    border: none;
    color: var(--accent-cyan);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
}

.btn-text-link:hover {
    text-decoration: underline;
}

.selected-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
    min-height: 4px;
}

.chip, .selected-chips .chip, .searchable-ms .chip {
    font-size: 11px;
    background: rgba(6, 182, 212, 0.12);
    border: 1px solid rgba(6, 182, 212, 0.25);
    color: var(--accent-cyan);
    padding: 3px 8px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.chip-removable button {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    padding: 0 2px;
    opacity: 0.8;
}

.chip-removable button:hover {
    opacity: 1;
}

.modal-footer {
    padding: 16px 24px;
    background: rgba(15, 23, 42, 0.5);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* ==========================================================================
   LATERAL DETALHE DRAWER (POST VIEWER)
   ========================================================================== */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 900;
    display: none;
}

.drawer-content {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 480px;
    background: #0f1626;
    border-left: 1px solid var(--border-color);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    z-index: 901;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.drawer-content.open {
    transform: translateX(0);
}

.drawer-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.drawer-header h3 {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
}

.drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.drawer-post-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--color-text-muted);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    padding-bottom: 12px;
}

.drawer-title {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.4;
    color: #ffffff;
}

.drawer-image {
    width: 100%;
    max-height: 240px;
    border-radius: 12px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.drawer-text {
    font-size: 14px;
    color: #cbd5e1;
    line-height: 1.7;
    white-space: pre-wrap;
}

.drawer-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.drawer-actions {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(11, 15, 25, 0.5);
    display: flex;
    gap: 12px;
}

.btn-block {
    flex: 1;
    text-align: center;
    justify-content: center;
    text-decoration: none;
    color: white;
}

/* ==========================================================================
   WIDGET DE ESTATÍSTICAS E RELATÓRIO DO PAINEL (DECK STATS)
   ========================================================================== */
.stats-panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
}

.stats-panel-content {
    background: #0d1220;
    border: 1px solid rgba(255, 255, 255, 0.08);
    width: 800px;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    max-height: 80vh;
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding: 24px;
    overflow-y: auto;
}

.stats-card-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 16px;
}

.stats-card-box h4 {
    font-family: var(--font-heading);
    font-size: 14px;
    color: var(--accent-cyan);
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    padding-bottom: 8px;
}

.stats-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stats-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.stats-row-label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.stats-row-count {
    font-weight: 700;
    color: var(--color-text-main);
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
}

.stats-bar-wrapper {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 3px;
    overflow: hidden;
    margin: 4px 0 8px 0;
}

.stats-bar {
    height: 100%;
    background: var(--accent-blue-gradient);
    border-radius: 3px;
}

/* Skeletons loader details inside list */
.skeleton-card {
    height: 140px;
    width: 100%;
    border-radius: 12px;
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid var(--border-color);
    padding: 12px 24px;
    border-radius: 40px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    z-index: 2000;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 600;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    color: white;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

.toast-error {
    border-color: rgba(239, 68, 68, 0.4);
    color: #f87171;
}

.toast-success {
    border-color: rgba(16, 185, 129, 0.4);
    color: #34d399;
}
.sidebar-overlay {
    display: none;
}
/* ==========================================================================
   MOBILE RESPONSIVENESS
   ========================================================================== */
.mobile-column-selector-container {
    display: none;
}

@media (max-width: 768px) {
    .sidebar-top .app-brand-icon {
        display: none;
    }
    .app-sidebar {
        position: fixed;
        left: -80px;
        top: 0;
        bottom: 0;
        z-index: 1000;
        transition: var(--transition-smooth);
        background: var(--bg-main);
        border-right: 1px solid var(--border-color);
    }

    .app-sidebar.open {
        left: 0;
        z-index: 9;
    }

    .app-layout {
        grid-template-columns: 1fr;
    }

    .app-title-mobile-hide {
        display: none;
    }

    .mobile-column-selector-container {
        display: block;
        flex: 1;
        max-width: 200px;
    }

    .columns-viewport {
        overflow-x: hidden;
        padding: 10px;
        margin-top: 80px;
    }

    .feed-column {
        display: none; /* Esconde todas por padrão no mobile */
        min-width: 100% !important;
        width: 100% !important;
        flex: 0 0 100%;
    }

    .feed-column.mobile-active {
        display: flex; /* Mostra apenas a ativa */
    }

    .column-header {
        padding: 12px;
    }

    /* Ajustar controles do deck no mobile */
    .deck-select-container {
        display: none; /* Esconde o seletor de deck padrão no header para dar espaço */
    }

    .header-actions {
        gap: 8px;
        padding-left: 10px;
        margin-top: 30px;
    }

    .stats-preview-pill {
        display: none;
    }
    .app-header {
        padding-top: 12px;
    }
}
