/* --- SISTEMA DE DESIGN MOBILE-APP PREMIUM --- */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-dark: #090b0e;
    --sidebar-bg: #111418;
    --surface: #161a1f;
    --surface-light: #1e2329;
    --accent: #25d366;
    --danger: #ef4444;
    --warning: #f59e0b;
    --success: #10b981;
    --text-main: #ffffff;
    --text-muted: #8e959f;
    --border: rgba(255, 255, 255, 0.08);
    --radius-lg: 20px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --shadow: 0 10px 30px rgba(0,0,0,0.3);
}

* { 
    box-sizing: border-box; 
    -webkit-tap-highlight-color: transparent; 
    outline: none;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Plus Jakarta Sans', sans-serif;
    margin: 0;
    padding: 0;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

/* --- APP SHELL --- */
.app-container {
    display: flex;
    height: 100vh;
    width: 100vw;
}

.main-content {
    flex: 1;
    height: 100vh;
    overflow-y: auto;
    position: relative;
    background: var(--bg-dark);
    scroll-behavior: smooth;
    display: flex;
    flex-direction: column;
    align-items: center; /* Centraliza o container no notebook */
}

/* CONTAINER PADRÃO PARA PÁGINAS (NOTAS, CONFIGS, LISTAS) */
.container {
    width: 100%;
    max-width: 1100px; /* Largura máxima fixa para notebook */
    padding: 40px 20px 120px 20px;
    margin: 0 auto;
}

/* EXCEÇÕES: Chat e Funil devem ser Full Width */
.chat-layout, .funnel-container {
    width: 100% !important;
    max-width: none !important;
    padding: 0 !important;
}

/* --- BUTTONS & INPUTS (TOUCH FRIENDLY) --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 24px;
    border-radius: var(--radius-md);
    border: none;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
    font-size: 0.95rem;
    gap: 8px;
}

.btn-primary { background: var(--accent); color: #000; }
.btn-primary:active { transform: scale(0.96); opacity: 0.9; }

input[type="text"], input[type="password"], select, textarea {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 14px 18px;
    border-radius: var(--radius-md);
    color: #fff;
    font-size: 1rem;
    width: 100%;
}

input:focus { border-color: var(--accent); background: var(--surface-light); }

/* --- NAVIGATION & HEADER --- */
.bottom-nav {
    display: none !important;
}

.mobile-header {
    display: flex; /* Agora sempre visível pois unificamos o topo */
    height: 65px;
    background: var(--sidebar-bg);
    border-bottom: 1px solid var(--border);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2500;
    padding: 0 20px;
    align-items: center;
    justify-content: space-between;
}

/* --- SIDEBAR DRAWER --- */
.main-sidebar {
    position: fixed !important;
    top: 0;
    left: -280px !important;
    width: 280px;
    height: 100vh;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border);
    z-index: 9999 !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex !important;
    flex-direction: column;
}

.main-sidebar.active {
    transform: translateX(280px);
    box-shadow: 20px 0 50px rgba(0,0,0,0.5);
}

.sidebar-nav { padding: 20px; flex: 1; overflow-y: auto; }
.sidebar-nav a {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: var(--radius-md);
    margin-bottom: 4px;
    font-weight: 600;
    transition: 0.2s;
    gap: 12px;
}

.sidebar-nav a.active {
    background: rgba(37, 211, 102, 0.1);
    color: var(--accent);
}

/* --- AJUSTES MOBILE EXCLUSIVOS --- */
@media (max-width: 768px) {
    .main-content {
        padding: 80px 16px 40px 16px !important;
    }
    .container {
        padding: 0 !important;
    }
}

@media (min-width: 769px) {
    .main-content {
        padding-top: 80px;
    }
}

/* Utilitários */
.card { background: var(--surface); padding: 30px; border-radius: var(--radius-lg); border: 1px solid var(--border); }
.text-center { text-align: center; }
.mt-4 { margin-top: 1rem; }
.mb-4 { margin-bottom: 1rem; }
