/* ==========================================================================
   Design System & Variáveis Globais (Premium Church Look)
   ========================================================================== */
:root {
    /* Cores Premium e Harmoniosas (Baseadas na Logo) */
    --color-bg: #F7F8F9; /* Very soft, airy off-white */
    --color-surface: #FFFFFF;
    --color-primary: #2D82B7; /* Calm, modern blue */
    --color-primary-light: #5299C6;
    --color-primary-dark: #1C618A;
    --color-secondary: #34495E; /* Slate Grey for softer contrast */
    --color-accent: #E67E22; /* Soft amber/orange */
    
    --text-main: #2C3E50; /* Softer dark blue/grey text */
    --text-muted: #7F8C8D;
    --text-light: #FFFFFF;
    
    --border-color: #E2E8F0;
    
    /* Tipografia (Mix de Inter e Outfit) */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Sombras Elevadas (Airy/Floating respiro longo) */
    --shadow-sm: 0 4px 12px rgba(45, 130, 183, 0.02);
    --shadow-md: 0 8px 24px rgba(45, 130, 183, 0.03);
    --shadow-lg: 0 16px 40px rgba(45, 130, 183, 0.04);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.02);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 12px 36px rgba(0, 0, 0, 0.05);
    
    /* Transições Suaves */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Margens e Cantos Arredondados (Super Suaves) */
    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --radius-full: 9999px;
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-family: var(--font-body);
    color: var(--text-main);
    background-color: var(--color-bg);
}

body {
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--color-secondary);
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

ul {
    list-style: none;
}

/* ==========================================================================
   Componentes Utilitários & Botões
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: var(--radius-md);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-normal);
    border: none;
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--text-light);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background-color: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline {
    background-color: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.btn-outline:hover {
    background-color: var(--color-primary);
    color: var(--text-light);
}

.btn-outline-nav {
    border: 2px solid var(--text-main);
    padding: 8px 16px;
    border-radius: var(--radius-md);
}

.btn-outline-nav:hover {
    background-color: var(--text-main);
    color: var(--color-bg);
}

.section {
    padding: 120px 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 40px;
    text-align: center;
    position: relative;
    padding-bottom: 12px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: var(--color-primary);
    border-radius: 2px;
}

/* ==========================================================================
   Navegação (Glassmorphism)
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

.dashboard-mode .navbar {
    display: none !important;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-primary);
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-links a:hover {
    color: var(--color-primary);
}

.schedules-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.live-link {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--color-accent) !important;
    font-weight: 600 !important;
}

.menu-toggle {
    display: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--color-secondary);
}

/* ==========================================================================
   Hero Section / Home
   ========================================================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 5% 80px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0) 0%, rgba(79, 70, 229, 0.05) 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
    z-index: -1;
}

.hero-container {
    max-width: 1200px;
    width: 100%;
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    animation: fadeUp 1s ease-out forwards;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 24px;
    letter-spacing: -1px;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 40px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
}

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

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

/* ==========================================================================
   Secções (Geral)
   ========================================================================== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
}

.card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.02);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

/* Horários / Sobre */
.schedule-item {
    display: flex;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
}
.schedule-item:last-child {
    border-bottom: none;
}
.schedule-day-time {
    font-weight: 600;
    color: var(--color-primary);
}

/* Cultos Ao Vivo */
.live-stream-container {
    background: var(--color-secondary);
    border-radius: var(--radius-xl);
    padding: 40px;
    text-align: center;
    color: var(--text-light);
    box-shadow: var(--shadow-xl);
}
.live-stream-container h2 {
    color: var(--text-light);
}
.video-placeholder {
    width: 100%;
    aspect-ratio: 16/9;
    background: rgba(0, 0, 0, 0.5);
    border-radius: var(--radius-md);
    margin-top: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed rgba(255, 255, 255, 0.2);
}
.live-pulse {
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

/* Blog / Pregações */
.post-content {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin: 16px 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ==========================================================================
   Rodapé
   ========================================================================== */
.footer {
    background-color: var(--color-secondary);
    color: var(--text-light);
    padding: 80px 5% 24px;
    font-size: 0.95rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 48px;
    margin-bottom: 48px;
}

.footer-brand h3 {
    color: var(--text-light);
    font-size: 2rem;
    margin-bottom: 16px;
}

.social-links {
    display: flex;
    gap: 16px;
    margin-top: 24px;
}

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: background var(--transition-fast);
}

.social-links a:hover {
    background: var(--color-primary);
}

.footer-links h4, .footer-contact h4 {
    color: var(--text-light);
    margin-bottom: 24px;
}

.footer-links ul li {
    margin-bottom: 12px;
}

.footer-links a:hover {
    color: var(--color-primary-light);
}

.footer-contact p {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    color: rgba(255, 255, 255, 0.7);
}

.footer-bottom {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
}

/* ==========================================================================
   Responsividade
   ========================================================================== */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--color-surface);
        flex-direction: column;
        justify-content: center;
        transition: left var(--transition-normal);
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .hero h1 {
        font-size: 3rem;
    }
    
    .hero-container {
        text-align: center;
    }

    .hero-content {
        max-width: 100% !important;
        text-align: center !important;
    }

    .hero-actions {
        flex-direction: column;
        justify-content: center !important;
    }
    
    .section {
        padding: 60px 5%;
    }

    /* Grid Stacking */
    .grid, .grid-2, .grid-3, .card-grid, .form-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    /* Mobile Table to Cards Transformation */
    .data-table {
        display: none; /* Hide standard table on mobile */
    }

    .mobile-card-list {
        display: flex !important;
        flex-direction: column;
        gap: 16px;
    }

    .mobile-card {
        background: var(--color-surface);
        padding: 20px;
        border-radius: var(--radius-md);
        box-shadow: var(--shadow-sm);
        border: 1px solid var(--border-color);
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .mobile-card-header {
        border-bottom: 1px solid var(--border-color);
        padding-bottom: 10px;
        margin-bottom: 5px;
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
    }

    .mobile-card-body {
        font-size: 0.9rem;
        color: var(--text-main);
    }

    .mobile-card-row {
        display: flex;
        justify-content: space-between;
        margin-bottom: 8px;
    }

    .mobile-card-label {
        color: var(--text-muted);
        font-weight: 600;
        font-size: 0.8rem;
        text-transform: uppercase;
    }

    .mobile-card-footer {
        padding-top: 12px;
        border-top: 1px dashed var(--border-color);
        display: flex;
        gap: 10px;
        justify-content: flex-end;
    }

    /* Dashboard Sidebar Mobile */
    .dashboard-layout {
        display: block;
        height: auto;
        min-height: auto;
    }

    .dashboard-sidebar {
        width: 100%;
        height: auto;
        position: relative;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }

    .dashboard-nav {
        display: flex;
        overflow-x: auto;
        padding: 10px;
        gap: 5px;
    }

    .dashboard-nav li {
        margin-bottom: 0;
        flex-shrink: 0;
    }

    .dashboard-nav a {
        padding: 10px 16px;
        border-right: none;
        border-radius: var(--radius-full);
        background: rgba(0,0,0,0.03);
    }

    .dashboard-nav li.active a {
        border-right: none;
        background: var(--color-primary);
        color: white;
    }

    .dashboard-nav .menu-label {
        display: none;
    }

    .dashboard-main {
        padding: 20px !important;
        overflow-y: visible;
        height: auto;
    }

    .profile-grid {
        grid-template-columns: 1fr !important;
    }
}

.mobile-card-list {
    display: none;
}

/* ==========================================================================
   Área de Membros & Dashboard
   ========================================================================== */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
    background: var(--color-bg);
    position: relative;
    max-width: 100vw;
    overflow-x: hidden;
}

.dashboard-sidebar {
    width: 260px;
    background: var(--color-surface);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    box-shadow: var(--shadow-sm);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    position: relative;
    overflow: visible !important;
}

.dashboard-sidebar.collapsed {
    width: 80px;
}

.dashboard-sidebar.collapsed .dashboard-brand h3,
.dashboard-sidebar.collapsed .user-info strong,
.dashboard-sidebar.collapsed .user-info small,
.dashboard-sidebar.collapsed .menu-label,
.dashboard-sidebar.collapsed a span,
.dashboard-sidebar.collapsed .dashboard-footer span,
.dashboard-sidebar.collapsed .btn-sidebar {
    display: none !important;
}

.dashboard-sidebar.collapsed .dashboard-user {
    padding: 16px 0;
    justify-content: center;
}

.dashboard-sidebar.collapsed .dashboard-nav a {
    justify-content: center;
    padding: 12px 0;
}

.dashboard-sidebar.collapsed .dashboard-nav a i {
    font-size: 1.5rem;
    margin: 0;
}

.sidebar-toggle {
    position: absolute;
    right: -12px;
    top: 24px;
    width: 24px;
    height: 24px;
    background: var(--color-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: var(--shadow-md);
    z-index: 1001;
    transition: transform 0.3s ease, background 0.3s ease;
}

.dashboard-sidebar.collapsed .sidebar-toggle {
    transform: rotate(180deg);
}

.sidebar-toggle:hover {
    background: var(--color-primary-dark);
}

/* Estilos de Botão Premium para Projeção */
.btn-proj-upload {
    background: white !important;
    color: var(--color-primary) !important;
    border: none !important;
    font-weight: 700 !important;
    transition: transform 0.2s, box-shadow 0.2s !important;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.btn-proj-upload:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.btn-proj-link {
    background: rgba(255,255,255,0.15) !important;
    color: white !important;
    border: 1px solid rgba(255,255,255,0.3) !important;
    backdrop-filter: blur(4px);
}

.btn-proj-link:hover {
    background: rgba(255,255,255,0.25) !important;
}

/* Projection Interface Refined */
.projection-grid {
    display: grid;
    grid-template-columns: 240px 1fr 240px;
    gap: 15px;
    height: calc(100vh - 100px);
    overflow: hidden;
    margin: -24px; /* Compensar o padding do dashboard-content */
    padding: 15px;
    transition: background-color 0.3s;
}

/* Modo Escuro Global ativado via Body */
body.projection-dark-active {
    background-color: #050505 !important;
    color: #e0e0e0 !important;
}
body.projection-dark-active .dashboard-main {
    background-color: #050505 !important;
}
body.projection-dark-active .dashboard-sidebar {
    background-color: #111 !important;
    border-right: 1px solid #333 !important;
}
body.projection-dark-active .dashboard-sidebar .dashboard-brand h3,
body.projection-dark-active .dashboard-sidebar .dashboard-user strong,
body.projection-dark-active .dashboard-sidebar .dashboard-nav a {
    color: #fff !important;
}
body.projection-dark-active .dashboard-sidebar .menu-label {
    color: #888 !important;
}
body.projection-dark-active .dashboard-sidebar .dashboard-nav a:hover,
body.projection-dark-active .dashboard-sidebar .dashboard-nav li.active a {
    background-color: #222 !important;
}
body.projection-dark-active .dashboard-header h1,
body.projection-dark-active .dashboard-header p {
    color: #fff !important;
}
body.projection-dark-active .projection-grid {
    background-color: #050505; 
}
body.projection-dark-active .projection-grid .card {
    background: #111111;
    border: 1px solid #222;
    color: #eaeaea;
}
body.projection-dark-active .projection-grid .card-header-mini {
    background: #1a1a1a;
    border-bottom: 1px solid #333;
    color: #fff;
}
body.projection-dark-active .projection-grid input, 
body.projection-dark-active .projection-grid select {
    background: #222;
    color: #fff;
    border: 1px solid #444;
}
body.projection-dark-active .projection-grid .list-item,
body.projection-dark-active .projection-queue-item {
    border-bottom: 1px solid #222;
    color: #eaeaea;
}

/* Item da fila ativo */
.projection-queue-item.active-item {
    background: rgba(var(--color-primary-rgb), 0.2) !important;
    border-left: 4px solid var(--color-primary) !important;
}

.projection-col {
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow: hidden;
}

.projection-col-scroll {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-right: 8px;
}

.projection-col-main {
    display: flex;
    flex-direction: column;
    gap: 15px;
    height: 100%;
    overflow-y: auto; /* Permite scroll se os ecrãs 16:9 ficarem muito grandes */
    align-items: center; /* Centrar os ecrãs */
    padding-bottom: 20px;
}

.card-accent-primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark)) !important;
    color: white;
    border: none;
}

.card-compact {
    padding: 0;
    overflow: hidden;
    border-radius: 12px;
}

.card-header-mini {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    background: var(--color-surface);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header-mini h3 {
    font-size: 0.9rem;
    margin: 0;
    font-weight: 600;
}

.btn-icon-sm {
    background: transparent;
    border: 1px solid var(--border-color);
    padding: 2px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.btn-icon-sm:hover {
    background: var(--color-bg);
    border-color: var(--color-danger);
    color: var(--color-danger);
}

.scroll-mini {
    overflow-y: auto;
    padding: 12px;
}

.projection-preview-card {
    width: 100%;
    flex: 1; /* Preenche todo o espaço vertical disponível */
    display: flex;
    flex-direction: column;
    background: #000 !important;
    color: white;
    position: relative;
    overflow: hidden;
    border: 1px solid #444 !important;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    min-height: 300px;
}

.projection-live-card {
    width: 100%;
    height: 35%;
    min-height: 220px; /* Ainda maior para mais visão */
    display: flex;
    flex-direction: column;
    background: #000 !important;
    color: white;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--color-danger) !important;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(220, 53, 69, 0.2);
    flex-shrink: 0;
}

.projection-panel-label {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    z-index: 20;
    text-transform: uppercase;
}

.label-preview {
    background: var(--color-primary);
}

.label-live {
    background: var(--color-danger);
    box-shadow: 0 0 10px rgba(220, 53, 69, 0.4);
}

.projection-display-area {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow-y: auto;
    padding: 10px;
    font-size: 1.8rem;
    line-height: 1.4;
    line-height: 1.4;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--color-primary) transparent;
    white-space: pre-line;
    background-size: cover;
    background-position: center;
    position: relative;
    transition: all 0.3s ease;
}

.area-live {
    padding: 20px;
    font-size: 1.2rem;
}

.placeholder-text {
    opacity: 0.2;
    font-weight: 300;
    font-style: italic;
}

.projection-controls-overlay {
    display: none;
    position: absolute;
    bottom: 0; left: 0; right: 0;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 15px;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 20%, transparent);
    z-index: 15;
}

.btn-nav {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.2s;
}

.btn-nav:hover {
    background: rgba(255,255,255,0.2);
}

.slide-info {
    text-align: center;
}

.btn-restore {
    display: none;
    margin-top: 8px;
    background: transparent;
    border: 1px solid #ffeb3b;
    color: #ffeb3b;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.7rem;
    cursor: pointer;
}

.projection-action-bar {
    position: absolute;
    top: 10px; right: 10px; /* Move GO LIVE para o canto do preview para não roubar altura */
    background: transparent;
    display: flex;
    justify-content: flex-end;
    z-index: 20;
    border: none;
}

.btn-go-live {
    background: var(--color-accent) !important;
    border: none !important;
    padding: 8px 20px !important;
    font-weight: 800 !important;
    font-size: 0.8rem !important;
    letter-spacing: 0.05em !important;
    box-shadow: 0 4px 15px rgba(var(--color-accent-rgb), 0.5) !important;
    text-transform: uppercase;
    border-radius: 6px;
}

.btn-proj-sm {
    padding: 8px 16px !important;
    font-size: 0.8rem !important;
    border-radius: 20px; /* Bordas muito arredondadas conforme pedido */
}

.projection-live-footer {
    padding: 10px 20px;
    background: rgba(0,0,0,0.9);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 20;
    border-top: 1px solid #333;
}

.status-indicator {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.6);
}

.status-offline {
    color: var(--color-danger);
}

.btn-clear {
    background: transparent;
    border: 1px solid white;
    color: white;
    padding: 4px 12px;
    font-size: 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.8;
}

.btn-clear:hover {
    opacity: 1;
    background: var(--color-danger);
    border-color: var(--color-danger);
}

.section-subtitle {
    margin-bottom: 15px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-primary);
}

.search-box-mini {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
}

.search-box-mini input {
    flex: 1;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9rem;
}

.history-section label {
    color: var(--text-muted);
    font-size: 0.8rem;
    display: block;
    margin-bottom: 8px;
}

.bg-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.bg-preset {
    aspect-ratio: 16/9;
    background-size: cover;
    background-position: center;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.2s;
}

.bg-preset:hover {
    transform: scale(1.05);
    border-color: var(--color-primary);
}

.bg-black {
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    color: white;
    border: 1px solid #333;
}

.btn-full-width {
    width: 100%;
    margin-bottom: 20px;
}

.control-group {
    margin-bottom: 15px;
}

.control-label {
    font-size: 0.85rem;
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.color-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.color-controls input[type="color"] {
    width: 100%;
    height: 35px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.dashboard-brand {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
}

.dashboard-brand h3 {
    font-size: 1.5rem;
    color: var(--color-primary);
}

.dashboard-user {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    border-bottom: 1px solid var(--border-color);
}

.dashboard-user .avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--color-primary-light);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.dashboard-user .user-info {
    display: flex;
    flex-direction: column;
}

.dashboard-user .user-info strong {
    font-size: 1rem;
    color: var(--text-main);
}

.dashboard-user .user-info small {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.dashboard-nav {
    flex: 1;
    padding: 16px 0;
    overflow-y: auto;
}

.dashboard-nav li {
    margin-bottom: 2px;
}

.dashboard-nav .menu-label {
    padding: 24px 24px 8px 24px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    opacity: 0.6;
    margin-bottom: 4px;
}

.dashboard-nav a {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 24px;
    color: var(--text-main);
    font-weight: 500;
    font-size: 0.95rem;
    transition: all var(--transition-fast);
    border-radius: 0 24px 24px 0;
    margin-right: 24px;
}

.dashboard-nav a i {
    font-size: 1.25rem;
    color: var(--text-muted);
    transition: all var(--transition-fast);
}

.dashboard-nav a:hover {
    background: rgba(0, 0, 0, 0.02);
    color: var(--color-primary);
}

.dashboard-nav a:hover i {
    color: var(--color-primary);
}

.dashboard-nav li.active a {
    background: rgba(45, 130, 183, 0.08);
    color: var(--color-primary);
    font-weight: 600;
}

.dashboard-nav li.active a i {
    color: var(--color-primary);
}

.dashboard-footer {
    padding: 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-sidebar {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.btn-sidebar:hover {
    color: var(--color-primary);
}

.dashboard-main {
    flex: 1;
    padding: 30px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    width: 0; /* Fix para flexbox não transbordar */
    min-width: 0;
}

.dashboard-header {
    margin-bottom: 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    width: 100%;
    padding-right: 20px;
}

.dashboard-header h1 {
    font-size: 2rem;
    color: var(--text-main);
}

/* Forms e Controlos da Dashboard */
.profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

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

.form-group label {
    font-weight: 500;
    color: var(--text-main);
    font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 1rem;
    background: var(--color-surface);
    transition: border-color var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--color-surface);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.data-table th,
.data-table td {
    padding: 16px 24px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    background: rgba(0,0,0,0.02);
    font-weight: 600;
    color: var(--text-secondary);
}

.data-table tr:last-child td {
    border-bottom: none;
}

.badge {
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
}

.badge.active {
    background: #E6F4EA;
    color: #137333;
}

.badge.inactive {
    background: #FCE8E6;
    color: #C5221F;
}

@media (max-width: 900px) {
    .dashboard-layout {
        flex-direction: column;
    }
    .dashboard-sidebar {
        width: 100%;
        height: auto;
        position: static;
    }
    .dashboard-nav {
        display: flex;
        overflow-x: auto;
        padding: 16px 24px;
    }
    .dashboard-nav li {
        margin-bottom: 0;
        margin-right: 16px;
        white-space: nowrap;
    }
    .dashboard-nav a {
        border-right: none;
        border-bottom: 3px solid transparent;
        padding: 8px 12px;
    }
    .dashboard-nav a:hover,
    .dashboard-nav li.active a {
        border-right: none;
        border-bottom: 3px solid var(--color-primary);
    }
    .dashboard-main {
        width: 100%;
        box-sizing: border-box;
        padding: 24px;
    }
}

/* Fix para Modais e Sobreposições */
#view-member-modal, #new-member-modal, #view-subs-modal {
    z-index: 99999 !important;
}

#sub-intent-modal, #sub-form-modal {
    z-index: 99999 !important;
}


/* ==========================================================================
   Módulo de Projeção Digital
   ========================================================================== */
.projection-grid {
    display: grid;
    grid-template-columns: 250px 1fr 280px;
    gap: 20px;
    height: calc(100vh - 120px);
}

@media (max-width: 1200px) {
    .projection-grid {
        grid-template-columns: 1fr;
        height: auto;
    }
}

.projection-queue-item {
    padding: 12px;
    background: var(--color-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    gap: 12px;
    align-items: center;
}

.projection-queue-item:hover {
    border-color: var(--color-primary);
    background: rgba(45, 130, 183, 0.05);
    transform: translateX(4px);
}

.projection-queue-item i {
    font-size: 1.25rem;
    color: var(--color-primary);
}

.projection-history-item {
    cursor: pointer;
    padding: 8px 12px;
    background: rgba(0,0,0,0.03);
    border-radius: 8px;
    font-size: 0.85rem;
    margin-bottom: 6px;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 8px;
}

.projection-history-item:hover {
    background: rgba(45, 130, 183, 0.1);
    color: var(--color-primary);
}

#projection-preview-area, #projection-live-area {
    transition: all 0.3s ease;
    user-select: none;
}

#projection-preview-area:hover {
    filter: brightness(1.2);
}

.badge-live {
    background: var(--color-danger);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: bold;
    text-transform: uppercase;
    animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
    0% { box-shadow: 0 0 0 0 rgba(217, 48, 37, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(217, 48, 37, 0); }
    100% { box-shadow: 0 0 0 0 rgba(217, 48, 37, 0); }
}

/* ==========================================================================
   Barra de Alerta Deslizante (Top Ticker)
   ========================================================================== */
.top-alert-banner {
    background: linear-gradient(90deg, #111827 0%, #1f2937 100%);
    color: #f3f4f6;
    overflow: hidden;
    padding: 0;
    height: 42px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    border-bottom: 2px solid #d97706; /* Warm gold/amber bottom border */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10001;
    position: relative;
    font-family: 'Inter', 'Outfit', sans-serif;
}

.top-alert-badge {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 1px;
    padding: 0 16px;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.3);
    z-index: 2;
    flex-shrink: 0;
}

.top-alert-ticker-container {
    flex-grow: 1;
    overflow: hidden;
    display: flex;
    align-items: center;
    height: 100%;
    position: relative;
}

.top-alert-ticker {
    display: inline-block;
    padding-left: 100%;
    white-space: nowrap;
    font-size: 0.88rem;
    font-weight: 500;
    color: #f3f4f6;
    letter-spacing: 0.3px;
    animation: top-alert-marquee 25s linear infinite;
}

.top-alert-ticker:hover {
    animation-play-state: paused;
    color: #fbbf24; /* Turns gold on hover */
    cursor: pointer;
}

@keyframes top-alert-marquee {
    0% {
        transform: translate3d(0, 0, 0);
    }
    100% {
        transform: translate3d(-100%, 0, 0);
    }
}


/* === Responsive Hotfixes === */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}
@media(min-width: 768px) {
    .dashboard-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px; /* Force tables to scroll on small screens instead of squashing */
}

/* Fix "O meu perfil" alignment */
.profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
@media(min-width: 768px) {
    .profile-header {
        flex-direction: row;
        text-align: left;
    }
}

/* Fix forms squashing */
.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}
@media(min-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Fix main content width on mobile */
.dashboard-main-content {
    max-width: 100vw;
    overflow-x: hidden;
}

/* Responsive Enhancements */
.dashboard-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
}
@media(min-width: 768px) {
    .dashboard-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.dashboard-main-content * {
    max-width: 100%;
}

.dashboard-main-content {
    box-sizing: border-box;
    padding: 15px !important;
}

@media(min-width: 768px) {
    .dashboard-main-content {
        padding: 30px !important;
    }
}
/* MOBILE HOTFIXES */
.responsive-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}
@media(min-width: 768px) {
    .responsive-grid-2 { grid-template-columns: 1fr 1fr; }
    .responsive-grid-3 { grid-template-columns: 1fr 1fr 1fr; }
    .responsive-grid-auto { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
}
/* Fix Table Alignment */
.table th, .table td {
    text-align: left;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
}
.table th {
    font-weight: 600;
    color: var(--text-secondary);
    background: rgba(0,0,0,0.02);
}
