/* =========================================================
   KL WEB / WORKSPACE CORPORATIVO - DESIGN SYSTEM MODERNO
   ========================================================= */

/* Font Awesome: o all.min.css usa font-display:block (icones invisiveis ate a fonte chegar).
   Esta regra vem depois dele e troca para swap; a fonte tambem e pre-carregada no <head>. */
@font-face {
    font-family: "Font Awesome 6 Free";
    font-style: normal;
    font-weight: 900;
    font-display: swap;
    src: url("assets/webfonts/fa-solid-900.woff2") format("woff2");
}

:root {
    font-size: 16px;
    /* Base para controle de Zoom */

    --bg-main: #f8fafc;
    --bg-surface: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;
    --bg-sidebar: #ffffff;
    --bg-input: #f1f5f9;

    /* Cores mais naturais e humanas */
    --primary: #3b82f6;
    /* Azul natural como céu */
    --primary-hover: #2563eb;
    --primary-gradient: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
    --accent: #6366f1;
    /* Índigo natural */
    --accent-glow: rgba(99, 102, 241, 0.16);

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;

    --border: #cbd5e1;
    --border-highlight: #3b82f6;

    /* Cores de status mais naturais */
    --todo-color: #3b82f6;
    /* Azul céu */
    --progress-color: #f97316;
    /* Laranja pôr do sol */
    --urgent-color: #dc2626;
    /* Vermelho terra */
    --done-color: #16a34a;
    /* Verde folha */

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --shadow-glow: 0 4px 20px rgba(99, 102, 241, 0.12);
    --backdrop-blur: blur(14px);
    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: 'Outfit', 'Plus Jakarta Sans', sans-serif;
}

/* Regra para esconder botões de download quando estiver dentro do App (APK/EXE) */
body.is-app .btn-download-app,
body.is-app .download-card .btn,
body.is-app .download-cta .btn-white {
    display: none !important;
}

/* ================= CORREÇÃO DE TEMAS CLARO, ESCURO & DALTÔNICO ================= */

/* Sem transicoes durante o carregamento: a troca de tema inicial nao deve animar a pagina toda */
.no-transitions *,
.no-transitions *::before,
.no-transitions *::after {
    transition: none !important;
}

/* BODY BASE */
body {
    background-color: var(--bg-main) !important;
    color: var(--text-primary) !important;
    transition: background-color 0.25s ease, color 0.25s ease;
    height: 100vh;
    overflow: hidden;
    display: flex;
}

/* TEMA CLARO (LIGHT MODE) */
body,
body.light-theme {
    --bg-main: #f8fafc !important;
    --bg-surface: #ffffff !important;
    --bg-card: #ffffff !important;
    --bg-card-hover: #f1f5f9 !important;
    --bg-sidebar: #ffffff !important;
    --bg-input: #f1f5f9 !important;

    --text-primary: #0f172a !important;
    --text-secondary: #475569 !important;
    --text-muted: #64748b !important;

    --border: #e2e8f0 !important;
    --border-highlight: #3b82f6 !important;
}

/* TEMA ESCURO (DARK MODE - FUNDO 100% PRETO) */
body.dark-mode,
body.dark-theme {
    --bg-main: #000000 !important;
    /* Fundo Totalmente Preto */
    --bg-surface: #0a0a0a !important;
    /* Painéis e Modais */
    --bg-card: #121212 !important;
    /* Cards */
    --bg-card-hover: #1c1c1c !important;
    /* Hover nos Cards */
    --bg-sidebar: #080808 !important;
    /* Sidebar */
    --bg-input: #171717 !important;
    /* Inputs e caixas de busca */

    /* Cores mais naturais no dark mode */
    --primary: #6366f1 !important;
    /* Índigo suave */
    --primary-hover: #4f46e5 !important;
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%) !important;
    --accent: #8b5cf6 !important;
    /* Roxo violeta */
    --accent-glow: rgba(139, 92, 246, 0.2) !important;

    --text-primary: #ffffff !important;
    --text-secondary: #a3a3a3 !important;
    --text-muted: #8f8f8f !important;

    --border: #262626 !important;
    --border-highlight: #00e5ff !important;

    --shadow-glow: 0 4px 20px rgba(0, 229, 255, 0.15) !important;
}

/* MODALIDADE ACESSIBILIDADE DALTÔNICA - TEMA CLARO */
body.daltonic-mode,
body.colorblind-mode {
    --bg-main: #f5f5f5 !important;
    --bg-surface: #ffffff !important;
    --bg-card: #ffffff !important;
    --bg-card-hover: #f8f8f8 !important;
    --bg-sidebar: #ffffff !important;
    --bg-input: #f0f0f0 !important;

    /* Cores daltônicas mais naturais */
    --primary: #f59e0b !important;
    /* Laranja pôr do sol */
    --primary-hover: #d97706 !important;
    --primary-gradient: linear-gradient(135deg, #f59e0b 0%, #f97316 100%) !important;
    --accent: #059669 !important;
    /* Verde folha */
    --text-primary: #1f2937 !important;
    --text-secondary: #4b5563 !important;
    --text-muted: #6b7280 !important;

    --border: #d1d5db !important;
    --border-highlight: #f59e0b !important;

    --todo-color: #3b82f6 !important;
    /* Azul céu */
    --progress-color: #f59e0b !important;
    /* Laranja */
    --urgent-color: #dc2626 !important;
    /* Vermelho terra */
    --done-color: #059669 !important;
    /* Verde */
}

/* MODALIDADE ACESSIBILIDADE DALTÔNICA - TEMA ESCURO PRETO */
body.dark-mode.daltonic-mode,
body.dark-mode.colorblind-mode,
body.dark-theme.colorblind-mode {
    --bg-main: #000000 !important;
    --bg-surface: #111111 !important;
    --bg-card: #1a1a1a !important;
    --bg-card-hover: #262626 !important;
    --bg-sidebar: #0a0a0a !important;
    --bg-input: #222222 !important;

    /* Cores daltônicas mais naturais no dark mode */
    --primary: #f59e0b !important;
    /* Laranja pôr do sol */
    --primary-hover: #d97706 !important;
    --primary-gradient: linear-gradient(135deg, #f59e0b 0%, #f97316 100%) !important;
    --accent: #10b981 !important;
    /* Verde folha */
    --text-primary: #ffffff !important;
    --text-secondary: #d1d5db !important;
    --text-muted: #9ca3af !important;

    --border: #404040 !important;
    --border-highlight: #f59e0b !important;

    --todo-color: #3b82f6 !important;
    /* Azul céu */
    --progress-color: #f59e0b !important;
    /* Laranja */
    --urgent-color: #dc2626 !important;
    /* Vermelho terra */
    --done-color: #10b981 !important;
    /* Verde */
}

body.daltonic-mode .col-header,
body.daltonic-mode .counter-card,
body.daltonic-mode .kanban-card,
body.daltonic-mode .calendar-day-cell,
body.dark-mode.daltonic-mode .col-header,
body.dark-mode.daltonic-mode .counter-card,
body.dark-mode.daltonic-mode .kanban-card,
body.dark-mode.daltonic-mode .calendar-day-cell {
    border-width: 2px !important;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: var(--font-sans);
}

/* ================= TOAST NOTIFICATIONS ================= */
.toast-container {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    background: var(--bg-surface);
    color: var(--text-primary);
    border: 1px solid var(--border-highlight);
    border-radius: var(--radius-md);
    padding: 1rem 1.4rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    gap: 0.8rem;
    min-width: 320px;
    max-width: 450px;
    animation: slideInRight 0.3s ease-out;
}

.toast.success {
    border-left: 4px solid var(--done-color);
}

.toast.error {
    border-left: 4px solid var(--urgent-color);
}

.toast.info {
    border-left: 4px solid var(--accent);
}

.toast i {
    font-size: 1.2rem;
}

.toast.success i {
    color: var(--done-color);
}

.toast.error i {
    color: var(--urgent-color);
}

.toast.info i {
    color: var(--accent);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ================= AUTHENTICATION SCREEN ================= */
.welcome-screen {
    min-height: 100vh;
    background:
        radial-gradient(circle at 85% 8%, rgba(8, 145, 178, 0.16), transparent 28rem),
        radial-gradient(circle at 8% 35%, rgba(13, 148, 136, 0.16), transparent 30rem),
        var(--bg-main);
    color: var(--text-primary);
    overflow: hidden;
}

.welcome-nav,
.welcome-hero,
.welcome-features,
.welcome-steps,
.welcome-final-cta {
    width: min(1180px, calc(100% - 3rem));
    margin-inline: auto;
}

.welcome-nav {
    height: 82px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.welcome-brand {
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.25rem;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
}

.welcome-brand-icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--primary-gradient);
    color: #fff;
    box-shadow: 0 6px 18px rgba(13, 148, 136, 0.4);
}

.welcome-brand-logo {
    width: auto;
    height: 1.4rem;
    border-radius: 8px;
    object-fit: contain;
    margin-right: 0.5rem;
}

.theme-toggle {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.65rem 1rem;
    cursor: pointer;
    transition: all 0.2s;
    display: grid;
    place-items: center;
    font-size: 0.85rem;
    font-weight: 600;
}

.theme-toggle:hover {
    background: var(--primary-hover);
}

/* No modo escuro, botão fica branco */
body.dark-mode .theme-toggle,
body.dark-theme .theme-toggle {
    background: #fff;
    color: #000;
}

body.dark-mode .theme-toggle:hover,
body.dark-theme .theme-toggle:hover {
    background: #e5e5e5;
}

/* No modo claro, botão fica preto */
body:not(.dark-mode):not(.dark-theme) .theme-toggle {
    background: #000;
    color: #fff;
}

body:not(.dark-mode):not(.dark-theme) .theme-toggle:hover {
    background: #333;
}

.theme-toggle i {
    font-size: 1rem;
}

.welcome-nav-links {
    display: flex;
    gap: 1.6rem;
}

.welcome-nav-links a,
.welcome-login {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}

.welcome-nav-links a.highlight {
    color: var(--accent);
}

.welcome-nav-links a.highlight:hover {
    color: var(--text-primary);
}

.welcome-login {
    background: transparent;
    border: 0;
    cursor: pointer;
    padding: 0.7rem;
}

.welcome-nav-links a:hover,
.welcome-login:hover {
    color: var(--text-primary);
}

.welcome-nav-actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.welcome-signup {
    padding: 0.65rem 1rem;
    font-size: 0.85rem;
}

/* Botão daltônico na página inicial */
.colorblind-toggle {
    background: transparent;
    border: 2px solid var(--accent);
    color: var(--accent);
    padding: 0.7rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.3s ease;
}

.colorblind-toggle:hover {
    background: var(--accent);
    color: white;
}

body.dark-mode .colorblind-toggle {
    border-color: var(--accent);
    color: var(--accent);
}

body.dark-mode .colorblind-toggle:hover {
    background: var(--accent);
    color: white;
}

body.daltonic-mode .colorblind-toggle {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

/* Página de Download */
.download-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
}

.download-header {
    text-align: center;
    margin-bottom: 60px;
}

.download-header h1 {
    font-size: 3rem;
    color: var(--accent);
    margin-bottom: 20px;
}

.download-header p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.download-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.download-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease;
}

.download-card:hover {
    transform: translateY(-5px);
}

.download-card h3 {
    font-size: 1.8rem;
    color: var(--accent);
    margin-bottom: 20px;
}

.download-card .icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.download-card p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.download-card .size {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.download-card .btn {
    display: inline-block;
    padding: 12px 30px;
    background: var(--primary-gradient);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: opacity 0.3s ease;
}

.download-card .btn:hover {
    opacity: 0.9;
}

.download-card .btn.disabled {
    background: #ccc;
    cursor: not-allowed;
}

.download-features {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 60px;
}

.download-features h2 {
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 30px;
    text-align: center;
}

.download-features ul {
    list-style: none;
    padding: 0;
}

.download-features li {
    padding: 15px 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
}

.download-features li:last-child {
    border-bottom: none;
}

.download-features li .check {
    color: var(--accent);
    font-size: 1.5rem;
    margin-right: 15px;
}

.download-cta {
    text-align: center;
    background: var(--primary-gradient);
    color: white;
    padding: 60px;
    border-radius: var(--radius-lg);
}

.download-cta h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.download-cta p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

.download-cta .btn-white {
    display: inline-block;
    padding: 15px 40px;
    background: white;
    color: var(--accent);
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: opacity 0.3s ease;
}

.download-cta .btn-white:hover {
    opacity: 0.9;
}

.download-instructions {
    background: var(--bg-input);
    border-radius: var(--radius-lg);
    padding: 40px;
    margin-top: 60px;
}

.download-instructions h2 {
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 30px;
    text-align: center;
}

.download-instructions ol {
    padding-left: 20px;
}

.download-instructions li {
    margin-bottom: 15px;
    line-height: 1.6;
}

.tutorial-section {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.tutorial-section h3 {
    font-size: 1.5rem;
    color: var(--accent);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent);
}

.tutorial-section ol {
    padding-left: 20px;
}

.tutorial-section li {
    margin-bottom: 12px;
    line-height: 1.6;
    color: var(--text-primary);
}

.tutorial-section code {
    background: var(--bg-input);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.tutorial-tip {
    background: rgba(99, 102, 241, 0.1);
    border-left: 4px solid var(--accent);
    padding: 15px;
    margin-top: 20px;
    border-radius: 4px;
}

.tutorial-tip strong {
    color: var(--accent);
}

.troubleshooting {
    margin-top: 20px;
}

.troubleshooting-item {
    background: rgba(220, 38, 38, 0.1);
    border-left: 4px solid var(--urgent-color);
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 4px;
}

.troubleshooting-item h4 {
    color: var(--urgent-color);
    margin-bottom: 8px;
    font-size: 1rem;
}

.troubleshooting-item p {
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .download-header h1 {
        font-size: 2rem;
    }

    .download-cards {
        grid-template-columns: 1fr;
    }

    .download-cta h2 {
        font-size: 1.8rem;
    }
}

.welcome-hero {
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    align-items: center;
    gap: 4rem;
    padding: 5.5rem 0 5rem;
}

.welcome-eyebrow {
    color: var(--accent);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 800;
    margin-bottom: 1rem;
}

.welcome-hero h1,
.welcome-steps h2,
.welcome-final-cta h2 {
    font-family: var(--font-heading);
    font-size: clamp(2.45rem, 5vw, 4.5rem);
    line-height: 1.05;
    letter-spacing: -0.04em;
    margin: 0;
}

.welcome-hero h1 span {
    color: var(--accent);
}

.welcome-lead {
    max-width: 570px;
    color: var(--text-secondary);
    font-size: 1.08rem;
    line-height: 1.65;
    margin: 1.4rem 0 2rem;
}

.welcome-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.welcome-hero-primary {
    padding: 1rem 1.35rem;
}

.btn-download-app {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex: 1 1 100%;
    max-width: 380px;
    padding: 0.7rem 1.1rem 0.7rem 0.7rem;
    background: rgba(14, 165, 233, 0.08);
    border: 1px solid var(--border);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: var(--radius-md);
    text-align: left;
    transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.btn-download-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--accent);
    color: #fff;
    font-size: 1.1rem;
}

.btn-download-text {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    flex: 1;
    min-width: 0;
}

.btn-download-text strong {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.2;
}

.btn-download-text small {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.2;
}

.btn-download-arrow {
    color: var(--accent);
    transition: transform 0.25s ease;
}

.btn-download-app:hover {
    border-color: var(--accent);
    background: rgba(14, 165, 233, 0.14);
    transform: translateY(-1px);
}

.btn-download-app:hover .btn-download-arrow {
    transform: translateX(4px);
}

.welcome-trust-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 1.3rem;
}

.welcome-trust-row i {
    color: var(--done-color);
    margin-right: 0.3rem;
}

.welcome-preview {
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--bg-surface);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.2);
    transform: rotate(1.5deg);
}

.preview-topbar {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--text-muted);
    font-size: 0.76rem;
    border-bottom: 1px solid var(--border);
    padding: 0.1rem 0.25rem 0.85rem;
}

.preview-topbar strong {
    margin-left: 0.45rem;
    color: var(--text-primary);
    font-size: 0.82rem;
    flex: 1;
}

.preview-dot {
    width: 7px;
    height: 7px;
    background: #475569;
    border-radius: 50%;
}

.preview-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.65rem;
    padding-top: 0.9rem;
}

.preview-column {
    min-height: 250px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.65rem;
}

.preview-active-column {
    background: rgba(14, 165, 233, 0.1);
}

.preview-column-title {
    display: flex;
    gap: 0.35rem;
    align-items: center;
    color: var(--text-secondary);
    font-weight: 700;
    font-size: 0.67rem;
    margin-bottom: 0.65rem;
}

.preview-column-title i {
    color: var(--accent);
}

.preview-column-title b {
    margin-left: auto;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    padding: 0.08rem 0.33rem;
    font-size: 0.6rem;
}

.preview-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding: 0.65rem;
    margin-bottom: 0.55rem;
    border-radius: 8px;
    background: var(--bg-card);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    color: var(--text-primary);
    font-size: 0.66rem;
    line-height: 1.35;
}

.preview-card em {
    height: 4px;
    border-radius: 999px;
    width: 35%;
}

.priority-high {
    background: #f97316;
}

.priority-medium {
    background: #eab308;
}

.priority-low {
    background: #22c55e;
}

.preview-card small {
    color: var(--text-muted);
    font-size: 0.58rem;
}

.preview-done {
    flex-direction: row;
    align-items: center;
    color: #10b981;
}

.preview-done i {
    color: var(--done-color);
}

.welcome-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    padding: 2rem 0 6.5rem;
}

.welcome-features article {
    padding: 1.5rem;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--bg-card);
}

.welcome-features article>i {
    color: var(--accent);
    font-size: 1.25rem;
}

.welcome-features h2 {
    font-size: 1.05rem;
    margin: 1rem 0 0.45rem;
}

.welcome-features p {
    color: var(--text-secondary);
    font-size: 0.86rem;
    line-height: 1.55;
    margin: 0;
}

.welcome-steps {
    padding: 5rem 0;
    border-top: 1px solid var(--border);
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 4rem;
}

.welcome-steps h2,
.welcome-final-cta h2 {
    font-size: clamp(1.85rem, 3vw, 2.75rem);
}

.welcome-steps ol {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 1.3rem;
}

.welcome-steps li {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.welcome-steps li>span {
    display: grid;
    place-items: center;
    flex: 0 0 30px;
    height: 30px;
    background: rgba(13, 148, 136, 0.16);
    color: var(--accent);
    border: 1px solid rgba(13, 148, 136, 0.4);
    border-radius: 50%;
    font-weight: 800;
    font-size: 0.8rem;
}

.welcome-steps strong {
    display: block;
    margin: 0.1rem 0 0.25rem;
}

.welcome-steps p {
    color: var(--text-secondary);
    margin: 0;
    font-size: 0.87rem;
}

.welcome-plans-section {
    padding: 5rem 0;
    border-top: 1px solid var(--border);
}

.welcome-section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.welcome-section-header .welcome-eyebrow {
    color: var(--accent);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 800;
    margin-bottom: 1rem;
}

.welcome-section-header h2 {
    font-family: var(--font-heading);
    font-size: clamp(1.85rem, 3vw, 2.75rem);
    color: var(--text-primary);
    margin: 0;
}

.welcome-section-header p {
    color: var(--text-secondary);
    font-size: 1.08rem;
    margin-top: 0.5rem;
}

.welcome-final-cta {
    margin-bottom: 4rem;
    padding: 2.2rem;
    border-radius: 18px;
    background: linear-gradient(110deg, rgba(13, 148, 136, 0.92), rgba(8, 145, 178, 0.82));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.welcome-final-cta .welcome-eyebrow {
    color: rgba(255, 255, 255, 0.76);
}

.welcome-final-cta h2 {
    color: white;
}

.welcome-final-cta .btn-primary {
    background: #fff;
    color: #0f766e;
    box-shadow: none;
    white-space: nowrap;
}

@media (max-width: 1024px) {
    .welcome-nav-links {
        display: none;
    }

    .welcome-hero,
    .welcome-steps {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .welcome-hero {
        padding-top: 3rem;
    }

    .welcome-preview {
        max-width: 630px;
        width: 100%;
        margin: auto;
    }

    .welcome-features {
        grid-template-columns: 1fr;
        padding-bottom: 4rem;
    }

    .plans-grid {
        grid-template-columns: 1fr;
    }

    .welcome-final-cta {
        align-items: flex-start;
        flex-direction: column;
    }

    .preview-columns {
        gap: 0.4rem;
    }

    .preview-column {
        padding: 0.45rem;
    }
}

@media (max-width: 480px) {

    .welcome-nav,
    .welcome-hero,
    .welcome-features,
    .welcome-steps,
    .welcome-final-cta,
    .welcome-plans-section {
        width: min(100% - 2rem, 1180px);
    }

    .welcome-nav {
        height: 70px;
    }

    .welcome-signup {
        padding: 0.55rem 0.7rem;
    }

    .welcome-login {
        padding: 0.5rem;
    }

    .welcome-hero h1 {
        font-size: 2.4rem;
    }

    .welcome-preview {
        transform: none;
        padding: 0.65rem;
    }

    .preview-column {
        min-height: 190px;
    }

    .preview-card {
        padding: 0.45rem;
        font-size: 0.57rem;
    }

    .preview-column-title {
        font-size: 0.56rem;
    }

    .welcome-final-cta {
        padding: 1.5rem;
    }
}

/* ===== Menu hambúrguer da página inicial (celular) ===== */
.welcome-nav {
    position: relative;
    z-index: 40;
}

.welcome-menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 0;
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 1.15rem;
    cursor: pointer;
}

.welcome-menu-toggle:hover {
    background: var(--bg-card-hover);
}

@media (max-width: 1024px) {
    .welcome-menu-toggle {
        display: inline-flex;
    }

    .welcome-nav-links {
        display: none;
        position: absolute;
        top: calc(100% + 4px);
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0;
        padding: 0.5rem;
        background: var(--bg-surface);
        border: 1px solid var(--border);
        border-radius: 14px;
        box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
    }

    .welcome-nav.menu-open .welcome-nav-links {
        display: flex;
    }

    .welcome-nav-links a {
        padding: 0.95rem 1rem;
        border-radius: 10px;
        font-size: 1rem;
    }

    .welcome-nav-links a:hover {
        background: var(--bg-card-hover);
    }
}

.welcome-menu-extra {
    display: none;
}

@media (max-width: 1024px) {

    /* No celular o cabeçalho fica só com a logo, "Cadastre-se" e o menu; o resto vai para dentro do menu */
    .welcome-nav .welcome-nav-actions .theme-toggle,
    .welcome-nav .welcome-nav-actions .colorblind-toggle,
    .welcome-nav .welcome-nav-actions .welcome-login {
        display: none;
    }

    .welcome-nav-links a.highlight {
        margin-top: 0.35rem;
        background: var(--accent);
        color: #fff;
        text-align: center;
        font-weight: 700;
    }

    .welcome-nav-links a.highlight:hover {
        background: var(--accent);
        color: #fff;
        filter: brightness(1.08);
    }

    .welcome-nav-links a.highlight i {
        margin-right: 0.45rem;
    }

    .welcome-menu-extra {
        display: flex;
        flex-direction: column;
        gap: 0.15rem;
        margin-top: 0.5rem;
        padding-top: 0.5rem;
        border-top: 1px solid var(--border);
    }

    .welcome-menu-item {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        padding: 0.85rem 1rem;
        background: transparent;
        border: 0;
        border-radius: 10px;
        color: var(--text-secondary);
        font: inherit;
        font-size: 0.95rem;
        font-weight: 600;
        text-align: left;
        cursor: pointer;
    }

    .welcome-menu-item i {
        width: 1.2rem;
        text-align: center;
        color: var(--accent);
    }

    .welcome-menu-item:hover {
        background: var(--bg-card-hover);
        color: var(--text-primary);
    }
}

@media (max-width: 480px) {
    .welcome-nav {
        gap: 0.5rem;
    }

    .welcome-nav-actions {
        gap: 0.25rem;
    }

    .welcome-hero-actions .btn-primary,
    .welcome-hero-actions .btn-secondary {
        flex: 1 1 100%;
        justify-content: center;
    }

    .btn-download-app {
        max-width: none;
    }
}

#auth-screen {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 80% 20%, rgba(13, 148, 136, 0.16), transparent 50%),
        radial-gradient(circle at 20% 80%, rgba(8, 145, 178, 0.14), transparent 50%),
        var(--bg-main);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.auth-card {
    background: var(--bg-card);
    backdrop-filter: var(--backdrop-blur);
    border: 1px solid var(--border-highlight);
    border-radius: var(--radius-xl);
    padding: 2.8rem 2.5rem;
    width: 100%;
    max-width: 460px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6), var(--shadow-glow);
    animation: fadeIn 0.4s ease-out;
}

.brand-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(13, 148, 136, 0.15);
    color: var(--primary);
    border: 1px solid rgba(13, 148, 136, 0.3);
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.auth-header {
    text-align: center;
    margin-bottom: 1.8rem;
}

.auth-header h2 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 0.3rem;
}

.auth-sublink {
    font-size: 0.78rem;
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s;
}

.auth-sublink:hover {
    text-decoration: underline;
}

.auth-error-box {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid var(--urgent-color);
    color: #fca5a5;
    border-radius: var(--radius-sm);
    padding: 0.85rem 1rem;
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    animation: shake 0.3s ease-in-out;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.45rem;
}

.form-group label i {
    margin-right: 0.35rem;
    color: var(--primary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.22);
}

.btn-primary {
    background: var(--primary-gradient);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 0.85rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(13, 148, 136, 0.3);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(13, 148, 136, 0.45);
}

.btn-submit {
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.95rem;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.85rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
}

.auth-toggle {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.auth-toggle span {
    color: var(--accent);
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
}

/* ================= APP LAYOUT ================= */
#app-screen {
    width: 100vw;
    height: 100vh;
    display: flex;
    overflow: hidden;
    background-color: var(--bg-main) !important;
}

/* ================= SIDEBAR RETRÁTIL LARGA ================= */
.sidebar {
    width: 80px !important;
    padding: 1.25rem 0.75rem !important;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s ease, box-shadow 0.3s ease !important;
    overflow: hidden !important;
    overflow-x: hidden !important;
    white-space: nowrap !important;
    z-index: 100 !important;
    display: flex !important;
    flex-direction: column !important;
    position: fixed !important;
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    background: var(--bg-sidebar) !important;
    border-right: 1px solid var(--border) !important;
}

.sidebar::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
}

.sidebar .nav-item {
    padding: 0.85rem 0.95rem !important;
    justify-content: flex-start !important;
    gap: 1.25rem !important;
    border-radius: var(--radius-md) !important;
}

.sidebar .nav-item i {
    font-size: 1.2rem !important;
    min-width: 24px !important;
    text-align: center !important;
    flex-shrink: 0 !important;
}

.sidebar .logo-text,
.sidebar .nav-item span,
.sidebar-company-sub,
.sidebar .user-mini-info,
.sidebar [class*="plan"],
.sidebar [class*="badge"] {
    opacity: 0 !important;
    visibility: hidden !important;
    transition: opacity 0.2s ease, visibility 0.2s ease !important;
    pointer-events: none !important;
}

.sidebar-plan-card,
.sidebar-footer-card,
.sidebar .card-box {
    display: none !important;
}

.sidebar:hover {
    width: 320px !important;
    padding: 1.25rem 1rem !important;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.8) !important;
    z-index: 100 !important;
}

.sidebar:hover .logo-text,
.sidebar:hover .nav-item span,
.sidebar:hover .sidebar-company-sub,
.sidebar:hover .user-mini-info,
.sidebar:hover [class*="plan"],
.sidebar:hover [class*="badge"] {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

.sidebar:hover .sidebar-plan-card,
.sidebar:hover .sidebar-footer-card,
.sidebar:hover .card-box {
    display: flex !important;
}

.logo {
    display: flex !important;
    align-items: center !important;
    gap: 0.85rem !important;
    padding: 0.25rem 0.5rem !important;
    margin-bottom: 1.25rem !important;
}

.logo-icon-box {
    width: 42px !important;
    height: 42px !important;
    border-radius: var(--radius-md) !important;
    background: var(--bg-surface) !important;
    border: 1px solid var(--border) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    flex-shrink: 0 !important;
}

.logo-icon-box img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

.logo-text {
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
}

.logo-text h2 {
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    color: var(--text-primary) !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.logo-text span {
    font-size: 0.75rem !important;
    color: var(--text-muted) !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.nav-menu {
    flex: 1;
    overflow-y: auto;
}

.nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.92rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-item i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.nav-item.active {
    background: rgba(13, 148, 136, 0.12);
    color: var(--primary);
    font-weight: 600;
    border: 1px solid rgba(13, 148, 136, 0.28);
}

.sidebar-plan-card {
    background: rgba(13, 148, 136, 0.08);
    border: 1px solid var(--border-highlight);
    border-radius: var(--radius-md);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.plan-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.plan-pill {
    background: var(--primary-gradient);
    color: #fff;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.plan-card-header i {
    color: var(--primary);
}

.plan-card-body p {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.3rem;
}

.progress-bar-wrap {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--primary-gradient);
    border-radius: 999px;
}

.btn-upgrade-mini {
    background: transparent;
    color: var(--accent);
    border: 1px solid rgba(56, 189, 248, 0.4);
    border-radius: var(--radius-sm);
    padding: 0.4rem;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-upgrade-mini:hover {
    background: rgba(56, 189, 248, 0.15);
}

.sidebar-footer {
    display: flex !important;
    align-items: center !important;
    gap: 0.75rem !important;
    padding-top: 1rem !important;
    border-top: 1px solid var(--border) !important;
    width: 100% !important;
}

.user-avatar-mini {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
    max-width: 38px !important;
    max-height: 38px !important;
    border-radius: 50% !important;
    background: var(--primary-gradient) !important;
    color: #fff !important;
    font-weight: 700 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.95rem !important;
    flex-shrink: 0 !important;
    aspect-ratio: 1 / 1 !important;
}

.user-mini-info {
    overflow: hidden;
}

.user-mini-info strong {
    display: block;
    font-size: 0.85rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-mini-info small {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ================= MAIN CONTENT ================= */
.main-content {
    margin-left: 80px !important;
    width: calc(100% - 80px) !important;
    position: relative !important;
    z-index: 10 !important;
    background-color: var(--bg-main) !important;
}

.top-header {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    padding: 1.2rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-shrink: 0;
    position: relative !important;
    z-index: 20 !important;
}

.header-greeting h2 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
}

.header-sub {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.2rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-action-header {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.65rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.btn-action-header:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.15);
    color: var(--urgent-color);
    border-color: rgba(239, 68, 68, 0.3);
}

/* ================= CONTENT BODY & TABS ================= */
.content-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.8rem 2rem;
    background-color: var(--bg-main) !important;
}

.tab-pane {
    display: none;
    animation: fadeIn 0.25s ease-out;
}

.tab-pane.active {
    display: block;
}

.pane-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.pane-header.text-center {
    justify-content: center;
    text-align: center;
}

.pane-header h2 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.pane-header p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.pane-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* ================= KANBAN FILTER BAR ================= */
.kanban-filter-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.filter-search-box {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.filter-search-box i {
    position: absolute;
    left: 1rem;
    color: var(--text-muted);
}

.filter-search-box input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.6rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.9rem;
}

.filter-search-box input:focus {
    outline: none;
    border-color: var(--primary);
}

.filter-select-box {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 220px;
}

.filter-select-box i {
    position: absolute;
    left: 1rem;
    color: var(--text-muted);
}

.filter-select-box select {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.88rem;
}

/* ================= DASHBOARD COUNTERS ================= */
.dashboard-counters {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    margin-bottom: 1.8rem;
}

.counter-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s, border-color 0.2s;
}

.counter-card:hover {
    transform: translateY(-2px);
}

.counter-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.card-todo .counter-icon {
    background: rgba(59, 130, 246, 0.15);
    color: var(--todo-color);
}

.card-todo {
    border-left: 4px solid var(--todo-color);
}

.card-progress .counter-icon {
    background: rgba(245, 158, 11, 0.15);
    color: var(--progress-color);
}

.card-progress {
    border-left: 4px solid var(--progress-color);
}

.card-urgent .counter-icon {
    background: rgba(239, 68, 68, 0.15);
    color: var(--urgent-color);
}

.card-urgent {
    border-left: 4px solid var(--urgent-color);
}

.card-done .counter-icon {
    background: rgba(16, 185, 129, 0.15);
    color: var(--done-color);
}

.card-done {
    border-left: 4px solid var(--done-color);
}

.counter-label {
    font-size: 0.78rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.counter-info h3 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-top: 0.1rem;
}

/* ================= KANBAN BOARD ================= */
.kanban-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    align-items: start;
    min-height: 520px;
}

.kanban-col {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    min-height: 480px;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.col-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 0.85rem;
    margin-bottom: 0.85rem;
    border-bottom: 1px solid var(--border);
}

.col-title-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-primary);
}

.header-todo i {
    color: var(--todo-color);
}

.header-progress i {
    color: var(--progress-color);
}

.header-urgent i {
    color: var(--urgent-color);
}

.header-done i {
    color: var(--done-color);
}

.col-badge {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
}

.card-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    flex: 1;
}

.kanban-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1rem;
    cursor: grab;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
    position: relative;
}

.kanban-card:active {
    cursor: grabbing;
}

.kanban-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-highlight);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

/* Estados do SortableJS durante o arraste de um card do board (ver initKanbanSortable em app.js) */
.kanban-card-ghost {
    /* Placeholder que marca onde o card vai cair; o card real vira .kanban-card-dragging.
       Usa var(--bg-card-hover)/var(--primary) (não um rgba fixo) pra acompanhar o tema
       escuro/daltônico igual ao resto do card. */
    opacity: 0.5;
    background: var(--bg-card-hover);
    border: 1px dashed var(--primary);
}

.kanban-card-chosen {
    /* Card selecionado, antes de soltar — leve destaque, sem exagerar */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.kanban-card-dragging {
    /* Card efetivamente sendo arrastado, seguindo o dedo/cursor */
    cursor: grabbing;
    opacity: 0.9;
    transform: rotate(1.5deg);
}

.card-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.4rem;
}

.priority-tag {
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.priority-tag.priority-URGENTE {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.4);
}

.priority-tag.priority-ALTA {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.4);
}

.priority-tag.priority-MEDIA {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.4);
}

.priority-tag.priority-BAIXA {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.assignee-tag {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: rgba(56, 189, 248, 0.12);
    color: var(--accent);
    border: 1px solid rgba(56, 189, 248, 0.25);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.btn-card-assign {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.8rem;
    padding: 0.25rem 0.4rem;
    border-radius: 4px;
    transition: all 0.2s;
}

.btn-card-assign:hover {
    color: var(--accent);
    background: rgba(56, 189, 248, 0.15);
}

.btn-card-del {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.8rem;
    padding: 0.25rem 0.4rem;
    border-radius: 4px;
    transition: all 0.2s;
}

.btn-card-del:hover {
    color: var(--urgent-color);
    background: rgba(239, 68, 68, 0.15);
}

.kanban-card h4 {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
    line-height: 1.35;
}

.kanban-card p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.85rem;
    padding-top: 0.6rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* Badges de checklist/comentários no card (Fase 3: cartão mais rico) */
.card-badges-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.4rem 0;
}

.card-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.72rem;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
}

.card-badge-complete {
    /* var(--done-color) já existe no sistema de tema (ver toasts) e é ajustada no modo
       daltônico — cor fixa (#4ade80) ficaria "errada" pra quem ativa esse modo. */
    color: var(--done-color);
    background: var(--bg-card-hover);
    border: 1px solid var(--done-color);
}

/* ================= ANALYTICS & GRÁFICOS ================= */
.analytics-grid {
    display: grid;
    grid-template-columns: 2fr 1.1fr;
    gap: 1.5rem;
}

.chart-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.chart-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.chart-card-header h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chart-card-header p {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-top: 0.2rem;
}

.chart-wrapper {
    position: relative;
    width: 100%;
    min-height: 320px;
    flex: 1;
}

.donut-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 280px;
}

/* ================= CALENDÁRIO EMPRESARIAL ================= */
.calendar-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

.calendar-main-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
}

.calendar-nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.calendar-nav-bar h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.btn-cal-nav {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-cal-nav:hover {
    background: var(--primary-gradient);
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-weight: 700;
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
}

.calendar-days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

.calendar-day-cell {
    min-height: 80px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.calendar-day-cell:hover {
    background: rgba(13, 148, 136, 0.12);
    border-color: var(--border-highlight);
}

.calendar-day-cell.other-month {
    opacity: 0.3;
}

.calendar-day-cell.is-today {
    border-color: var(--accent);
    background: rgba(56, 189, 248, 0.08);
}

.calendar-day-cell.is-selected {
    border-color: var(--primary);
    background: rgba(13, 148, 136, 0.2);
}

.day-number {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-primary);
}

.day-events-dots {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    margin-top: 4px;
}

.event-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.dot-REUNIAO {
    background: var(--primary);
}

.dot-PRAZO {
    background: var(--urgent-color);
}

.dot-LEMBRETE {
    background: var(--progress-color);
}

.dot-ATENDIMENTO {
    background: var(--done-color);
}

.calendar-sidebar-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.calendar-side-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.calendar-side-header h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.selected-day-tag {
    background: rgba(13, 148, 136, 0.15);
    color: var(--accent);
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
}

.calendar-events-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    overflow-y: auto;
    max-height: 480px;
}

.event-item-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.85rem 1rem;
    position: relative;
}

.event-item-card.event-REUNIAO {
    border-left: 3px solid var(--primary);
}

.event-item-card.event-PRAZO {
    border-left: 3px solid var(--urgent-color);
}

.event-item-card.event-LEMBRETE {
    border-left: 3px solid var(--progress-color);
}

.event-item-card.event-ATENDIMENTO {
    border-left: 3px solid var(--done-color);
}

.event-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.3rem;
}

.event-time-badge {
    font-size: 0.75rem;
    color: var(--accent);
    font-weight: 600;
}

.event-item-card h4 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.event-item-card p {
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.35;
}

.btn-del-event {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.8rem;
    padding: 0.2rem;
}

.btn-del-event:hover {
    color: var(--urgent-color);
}

/* ================= AI CHAT SECTION ================= */
.ai-chat-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    height: calc(100vh - 240px);
    overflow: hidden;
}

.quick-prompts-bar {
    background: var(--bg-input);
    border-bottom: 1px solid var(--border);
    padding: 0.85rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    overflow-x: auto;
}

.quick-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.btn-quick {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.4rem 0.85rem;
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.btn-quick:hover {
    background: rgba(13, 148, 136, 0.15);
    color: var(--primary);
    border-color: rgba(13, 148, 136, 0.4);
}

.chat-messages-box {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.chat-bubble {
    display: flex;
    gap: 0.85rem;
    max-width: 80%;
    text-align: left;
    align-items: flex-start;
    animation: fadeIn 0.2s ease-out;
}

.chat-bubble.user-bubble {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.bubble-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.95rem;
}

.ai-bubble .bubble-avatar {
    background: var(--primary-gradient);
    color: #fff;
}

.user-bubble .bubble-avatar {
    background: var(--accent);
    color: #000;
    font-weight: 700;
}

.bubble-content {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.95rem 1.25rem;
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--text-primary);
    max-width: 100%;
    word-break: break-word;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.user-bubble .bubble-content {
    background: rgba(13, 148, 136, 0.2);
    border-color: rgba(13, 148, 136, 0.35);
}

.bubble-sender {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: #38bdf8;
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 0.45rem;
    letter-spacing: 0.02em;
}

.ai-bubble .bubble-sender {
    color: #a78bfa;
}

.user-bubble .bubble-sender {
    color: #38bdf8;
}

.bubble-text {
    line-height: 1.6;
}

.bubble-content p {
    margin: 0;
    line-height: 1.6;
}

.bubble-content strong,
.bubble-content b {
    color: #38bdf8;
    font-weight: 600;
    display: inline;
}

.ai-bubble .bubble-content strong,
.ai-bubble .bubble-content b {
    color: #c4b5fd;
}

.bubble-content code {
    background: rgba(0, 0, 0, 0.25);
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.85rem;
    color: #38bdf8;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.chat-input-wrapper {
    background: var(--bg-surface);
    border-top: 1px solid var(--border);
    padding: 1.2rem;
}

.chat-input-inner {
    display: flex;
    gap: 0.75rem;
    align-items: flex-end;
}

.chat-input-inner textarea {
    flex: 1;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.85rem 1rem;
    color: var(--text-primary);
    font-size: 0.92rem;
    resize: none;
    font-family: inherit;
    line-height: 1.4;
}

.chat-input-inner textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.22);
}

.btn-chat-send {
    padding: 0.85rem 1.4rem;
    height: 52px;
}

/* ================= CRM & CONTATOS ================= */
.automation-card {
    background: var(--bg-card);
    border: 1px solid var(--border-highlight);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 1.8rem;
}

.automation-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.automation-header p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
    margin-bottom: 1rem;
}

.automation-form-grid {
    display: grid;
    grid-template-columns: 200px 1fr 2fr;
    gap: 1rem;
}

.table-container {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.crm-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.crm-table th {
    background: var(--bg-input);
    padding: 1rem 1.25rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border);
}

.crm-table td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.88rem;
    color: var(--text-primary);
}

.crm-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.btn-wa-direct {
    background: #25d366;
    color: #fff;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: all 0.2s;
}

.btn-wa-direct:hover {
    background: #1ebc59;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.35);
}

.btn-email-direct {
    background: rgba(13, 148, 136, 0.2);
    color: var(--primary);
    border: 1px solid rgba(13, 148, 136, 0.35);
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-left: 0.35rem;
    transition: all 0.2s;
}

.btn-email-direct:hover {
    background: var(--primary-gradient);
    color: #fff;
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.35);
}

.btn-del-contact {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0.4rem 0.6rem;
    margin-left: 0.4rem;
    border-radius: 4px;
}

.btn-del-contact:hover {
    color: var(--urgent-color);
    background: rgba(239, 68, 68, 0.15);
}

.btn-del-member {
    background: rgba(239, 68, 68, 0.12);
    color: var(--urgent-color);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: var(--radius-sm);
    padding: 0.35rem 0.65rem;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-del-member:hover {
    background: var(--urgent-color);
    color: #fff;
}

/* ================= EMPRESA & EQUIPE ================= */
.company-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 1.5rem;
}

.company-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.6rem;
}

.company-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.company-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.3rem;
}

.members-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.2rem;
}

.member-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.85rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.member-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: #fff;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.member-info {
    flex: 1;
    margin-left: 0.85rem;
}

.member-info strong {
    font-size: 0.88rem;
    color: var(--text-primary);
    display: block;
}

.member-info span {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* ================= TUTORIAIS & PLAYBOOKS ================= */
.section-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tutorials-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}

.tutorial-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s;
}

.tutorial-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-highlight);
}

.tutorial-visual {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.8rem;
}

.visual-kanban {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    color: #fff;
}

.visual-ai {
    background: linear-gradient(135deg, #115e59 0%, #2dd4bf 100%);
    color: #fff;
}

.visual-crm {
    background: linear-gradient(135deg, #065f46 0%, #10b981 100%);
    color: #fff;
}

.visual-team {
    background: linear-gradient(135deg, #7c2d12 0%, #f97316 100%);
    color: #fff;
}

.tutorial-body {
    padding: 1.25rem;
    flex: 1;
}

.step-tag {
    background: rgba(13, 148, 136, 0.15);
    color: var(--accent);
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
}

.tutorial-body h4 {
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0.5rem 0 0.4rem 0;
}

.tutorial-body p {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.45;
}

.playbooks-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.playbook-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.25rem;
}

.playbook-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.playbook-header h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-copy-prompt {
    background: rgba(13, 148, 136, 0.15);
    color: var(--primary);
    border: 1px solid rgba(13, 148, 136, 0.3);
    border-radius: var(--radius-sm);
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-copy-prompt:hover {
    background: var(--primary-gradient);
    color: #fff;
}

.playbook-desc {
    font-size: 0.84rem;
    color: var(--text-secondary);
    margin-bottom: 0.6rem;
}

.playbook-item code {
    display: block;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    font-size: 0.82rem;
    color: var(--accent);
}

/* ================= PLANOS DE ASSINATURA ================= */
.plans-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 1050px;
    margin: 0 auto;
}

.plan-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.2rem 1.8rem;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s, border-color 0.2s;
}

.plan-card:hover {
    transform: translateY(-4px);
}

.plan-card.highlight {
    border-color: var(--primary);
    background: linear-gradient(180deg, rgba(13, 148, 136, 0.12) 0%, var(--bg-card) 55%);
    box-shadow: 0 15px 35px rgba(13, 148, 136, 0.16);
}

.plan-card.pro-card {
    border-color: #eab308;
    background: linear-gradient(180deg, rgba(234, 179, 8, 0.12) 0%, var(--bg-card) 55%);
}

.plan-popular-tag {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-gradient);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.85rem;
    border-radius: 999px;
    box-shadow: 0 4px 10px rgba(13, 148, 136, 0.4);
}

.plan-tier-name {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.plan-price {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.plan-price span {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
}

.plan-summary {
    font-size: 0.82rem;
    color: var(--text-secondary);
    min-height: 40px;
    line-height: 1.4;
    margin-bottom: 1.25rem;
}

.plan-features-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2rem;
    flex: 1;
}

.plan-features-list li {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.plan-features-list li i {
    color: var(--done-color);
    font-size: 0.85rem;
}

.plan-features-list li.disabled {
    color: var(--text-muted);
    opacity: 0.6;
}

.plan-features-list li.disabled i {
    color: var(--urgent-color);
}

.btn-plan {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.85rem;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
}

.btn-plan:hover {
    background: rgba(255, 255, 255, 0.15);
}

.btn-plan-primary {
    background: var(--primary-gradient);
    color: #fff;
    border: none;
    box-shadow: 0 4px 15px rgba(13, 148, 136, 0.35);
}

.btn-plan-pro {
    background: linear-gradient(135deg, #eab308 0%, #ca8a04 100%);
    color: #000;
    border: none;
    box-shadow: 0 4px 15px rgba(234, 179, 8, 0.35);
}

.btn-plan.active-plan-btn {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid var(--done-color);
    color: #34d399;
    cursor: default;
}

.plan-checkout-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
}

/* ================= CONFIGURAÇÕES ================= */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.settings-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.8rem;
}

.settings-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.settings-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.3rem;
}

/* ESTILIZAÇÃO DO SLIDER RANGE DE ZOOM */
input[type=range] {
    accent-color: var(--primary);
}

#zoom-range {
    height: 8px;
    border-radius: 5px;
    background: var(--bg-input);
    outline: none;
}

/* ================= MODAIS ================= */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 1rem;
    animation: fadeIn 0.2s ease-out;
}

.modal-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-highlight);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 520px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.6);
    overflow: hidden;
}

.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.4rem;
    cursor: pointer;
    line-height: 1;
}

.btn-modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
}

.modal-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* ================= ANIMAÇÕES ================= */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        transform: translateY(0);
    }
}

/* ================= RESPONSIVIDADE ================= */
@media (max-width: 1200px) {
    .kanban-board {
        grid-template-columns: repeat(2, 1fr);
    }

    .tutorials-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .plans-grid {
        grid-template-columns: 1fr;
        max-width: 500px;
    }

    .calendar-layout,
    .analytics-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .dashboard-counters {
        grid-template-columns: repeat(2, 1fr);
    }

    .company-grid,
    .settings-grid {
        grid-template-columns: 1fr;
    }

    .automation-form-grid {
        grid-template-columns: 1fr;
    }

    .sidebar {
        width: 240px;
    }
}

/* ================= CELULAR: MENU LATERAL POR TOQUE + BOARD COM SCROLL ================= */
/* A barra lateral só expandia com :hover (linha ~572), que não existe em touchscreen — no
   celular ela ficava travada mostrando só ícones, sem nenhum jeito de ver os rótulos dos
   itens do menu, o card do plano ou o rodapé. Abaixo de 640px ela vira um menu off-canvas
   (escondido por padrão, abre por cima do conteúdo ao tocar no botão hambúrguer). */
@media (max-width: 640px) {
    .sidebar {
        width: 0 !important;
        padding: 0 !important;
        border-right: none !important;
        box-shadow: none !important;
    }

    .sidebar.sidebar-open {
        width: 78vw !important;
        max-width: 300px !important;
        padding: 1.25rem 1rem !important;
        box-shadow: 10px 0 40px rgba(0, 0, 0, 0.6) !important;
    }

    .sidebar.sidebar-open .logo-text,
    .sidebar.sidebar-open .nav-item span,
    .sidebar.sidebar-open .sidebar-company-sub,
    .sidebar.sidebar-open .user-mini-info,
    .sidebar.sidebar-open [class*="plan"],
    .sidebar.sidebar-open [class*="badge"] {
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }

    .sidebar.sidebar-open .sidebar-plan-card,
    .sidebar.sidebar-open .sidebar-footer-card,
    .sidebar.sidebar-open .card-box {
        display: flex !important;
    }

    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
    }

    .mobile-nav-toggle {
        display: flex !important;
    }

    .sidebar-backdrop.active {
        display: block;
    }

    /* Board vira um carrossel horizontal com uma coluna por "tela": no grid de 2 colunas
       (herdado da regra de 1200px) cada card ficava espremido demais num celular. */
    .kanban-board {
        grid-template-columns: none;
        grid-auto-flow: column;
        grid-auto-columns: 86vw;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding-bottom: 0.5rem;
        -webkit-overflow-scrolling: touch;
    }

    .kanban-col {
        scroll-snap-align: start;
        min-height: 60vh;
    }

    .modal-card-wide {
        max-width: 94vw;
        max-height: 92vh;
    }
}

.mobile-nav-toggle {
    display: none;
    position: fixed;
    top: 0.9rem;
    left: 0.9rem;
    z-index: 150;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1.1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
    cursor: pointer;
}

.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 99;
}

/* ================= CHAT IA LAYOUT ================= */
.ai-chat-layout {
    display: flex !important;
    flex-direction: column !important;
    height: calc(100vh - 220px) !important;
    min-height: 500px !important;
    gap: 1rem !important;
}

.chat-messages-box {
    flex: 1 !important;
    overflow-y: auto !important;
    padding: 1.25rem !important;
}

.chat-input-wrapper {
    display: flex !important;
    align-items: center !important;
    gap: 0.75rem !important;
    width: 100% !important;
}

.chat-input-wrapper input[type="text"],
#ai-input {
    flex: 1 !important;
    width: 100% !important;
    height: 52px !important;
    padding: 0 1.25rem !important;
    font-size: 0.95rem !important;
    border-radius: 10px !important;
}

#ai-send-btn {
    height: 52px !important;
    padding: 0 1.75rem !important;
    font-size: 0.95rem !important;
    border-radius: 10px !important;
    white-space: nowrap !important;
}

/* ==================== DROPDOWN DE NOTIFICAÇÕES ==================== */
.notification-wrapper {
    position: relative !important;
    display: inline-block !important;
    z-index: 1000 !important;
}

.notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #ef4444;
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.15rem 0.4rem;
    border-radius: 10px;
    line-height: 1;
}

.notification-dropdown {
    position: fixed !important;
    top: 70px !important;
    right: 20px !important;
    left: auto !important;
    width: 320px !important;
    background: var(--bg-surface) !important;
    border: 1px solid var(--border-highlight) !important;
    border-radius: var(--radius-md) !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.8) !important;
    z-index: 999999 !important;
    overflow: hidden !important;
}

.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1rem;
    background: var(--bg-input);
    border-bottom: 1px solid var(--border);
}

.notification-header h3 {
    font-size: 0.88rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
}

.btn-clear-notifications {
    background: transparent;
    border: none;
    color: var(--accent);
    font-size: 0.75rem;
    cursor: pointer;
}

.btn-clear-notifications:hover {
    text-decoration: underline;
}

.notification-list {
    max-height: 300px;
    overflow-y: auto;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.notification-item {
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    border-left: 3px solid var(--accent);
}

.notification-item.assignment {
    border-left-color: var(--primary);
}

.notification-item strong {
    display: block;
    font-size: 0.8rem;
    margin-bottom: 0.2rem;
    color: var(--text-primary);
}

.notification-empty {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
    padding: 1.5rem 0;
}

/* ================= SCROLLBAR SIDEBAR ================= */
.sidebar,
.sidebar * {
    overflow-x: hidden !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

.sidebar::-webkit-scrollbar,
.sidebar *::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

.sidebar .nav-item.active {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 1.25rem !important;
}

.sidebar .nav-item.active i {
    font-size: 1.2rem !important;
    min-width: 24px !important;
    text-align: center !important;
    flex-shrink: 0 !important;
    color: #ffd700 !important;
}

/* ESTRUTURA RÍGIDA DE ABAS E ROLAGEM */
body,
#app-screen,
.main-content,
.content-body {
    overflow-y: auto !important;
    height: auto !important;
    min-height: 100vh !important;
}

.content-body {
    padding-bottom: 8rem !important;
}

.tab-pane {
    display: none !important;
}

.tab-pane.active {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

#tab-kanban.active .kanban-board {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 1.25rem !important;
}

/* ================= BADGES DE MÉTODOS DE PAGAMENTO MENSAL ================= */
.plan-payment-methods {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0.6rem 0 0.8rem 0;
}

.badge-pay {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-highlight);
    color: var(--text-primary);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    letter-spacing: 0.02em;
}

.badge-pay i {
    color: var(--accent);
    font-size: 0.8rem;
}

/* ================= MODAL DO PAINEL MASTER OCULTO ================= */
.master-modal-card {
    max-width: 580px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden !important;
    border: 1px solid rgba(255, 215, 0, 0.35) !important;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.8), 0 0 25px rgba(255, 215, 0, 0.15) !important;
}

.master-modal-card .modal-header {
    flex-shrink: 0;
}

.master-modal-card .modal-body {
    flex: 1;
    overflow-y: auto !important;
    padding-right: 12px;
}

.master-modal-card .modal-footer {
    flex-shrink: 0;
}

.master-modal-card .modal-body::-webkit-scrollbar {
    width: 8px;
}

.master-modal-card .modal-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.master-modal-card .modal-body::-webkit-scrollbar-thumb {
    background: #008080;
    border-radius: 4px;
}

.master-modal-card .modal-body::-webkit-scrollbar-thumb:hover {
    background: #0f766e;
}

.master-user-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.55rem 0.75rem;
    border-bottom: 1px solid var(--border);
    transition: background 0.2s ease;
}

.master-user-row:hover {
    background: rgba(255, 255, 255, 0.04);
}

.master-user-row:last-child {
    border-bottom: none;
}

.master-user-badge {
    padding: 0.2rem 0.45rem;
    border-radius: 4px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
}

.master-user-badge.PRO_IA,
.master-user-badge.CORPORATE {
    background: rgba(13, 148, 136, 0.2);
    color: #5eead4;
    border: 1px solid rgba(13, 148, 136, 0.4);
}

.master-user-badge.STARTER,
.master-user-badge.PRO_PME {
    background: rgba(13, 148, 136, 0.16);
    color: #0f766e;
    border: 1px solid rgba(13, 148, 136, 0.35);
}

.storage-lock-card {
    background: var(--bg-card);
    border: 1px dashed var(--border-highlight);
    border-radius: var(--radius-lg);
    padding: 2.2rem;
    text-align: center;
}

.files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
}

.file-tile {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1rem;
    background: var(--bg-card);
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.file-tile img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    background: var(--bg-input);
}

.file-tile-actions {
    display: flex;
    gap: 0.4rem;
}

.dropzone {
    border: 2px dashed var(--border-highlight);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    text-align: center;
    background: rgba(13, 148, 136, 0.06);
    cursor: pointer;
}

.master-user-badge.BASICO {
    background: rgba(148, 163, 184, 0.15);
    color: #94a3b8;
    border: 1px solid rgba(148, 163, 184, 0.3);
}

/* ================= SUPPORT BUTTON ================= */
.support-button {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(13, 148, 136, 0.4);
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    z-index: 99999 !important;
    transition: all 0.3s ease;
}

.support-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(13, 148, 136, 0.5);
}

.support-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
    border: 2px solid white;
}

/* ================= SUPPORT CHAT MODAL ================= */
.support-chat-modal {
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.support-subject-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.support-subjects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.support-subject-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.support-subject-btn:hover {
    border-color: var(--primary);
    background: var(--accent-glow);
    transform: translateY(-2px);
}

.support-subject-btn i {
    font-size: 1.5rem;
    color: var(--primary);
}

.support-chat-area {
    display: flex;
    flex-direction: column;
    height: 400px;
}

.support-chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1rem;
}

.support-subject-tag {
    background: var(--accent-glow);
    color: var(--primary);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
}

.support-messages {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 1rem;
    max-height: 400px;
    overflow-y: auto;
    background: var(--bg-input);
    border-radius: var(--radius-md);
}

.support-message {
    display: flex;
    flex-direction: column;
    max-width: 75%;
    padding: 0.75rem 1rem;
    border-radius: 14px;
    font-size: 0.9rem;
    line-height: 1.4;
    word-break: break-word;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.support-message.outgoing,
.support-message.user-chat-message:not(.incoming) {
    align-self: flex-end;
    background: var(--primary-gradient);
    color: #ffffff;
    border-bottom-right-radius: 2px;
}

.support-message.outgoing .message-content,
.support-message.outgoing .message-content strong,
.support-message.outgoing .message-content p {
    color: #ffffff;
}

.support-message.outgoing .message-time {
    color: rgba(255, 255, 255, 0.85);
}

.support-message.incoming,
.support-message.admin-support-message:not(.outgoing) {
    align-self: flex-start;
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-bottom-left-radius: 2px;
}

.support-message.incoming .message-content strong {
    color: var(--primary);
}

.support-message.incoming .message-content p {
    color: var(--text-primary);
}

.support-message.incoming .message-time {
    color: var(--text-secondary);
}

.support-message.system,
.support-message.system-message {
    align-self: center;
    background: var(--bg-input);
    color: var(--text-secondary);
    border: 1px dashed var(--border);
    font-size: 0.82rem;
    padding: 0.45rem 0.9rem;
    border-radius: 10px;
    max-width: 85%;
    text-align: center;
    box-shadow: none;
}

.support-message.system .message-content strong,
.support-message.system .message-content p {
    color: var(--text-secondary);
    font-size: 0.82rem;
}

.message-time {
    font-size: 0.68rem;
    opacity: 0.8;
    margin-top: 0.35rem;
    align-self: flex-end;
}

.typing-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    align-self: flex-start;
    max-width: fit-content;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin: 0.25rem 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04);
}

.typing-text {
    font-size: 0.78rem;
    font-style: italic;
    margin-right: 0.25rem;
    color: var(--text-secondary);
}

.typing-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #8abab5;
    animation: typing 1.2s infinite;
}

.typing-dot:nth-child(1) {
    animation-delay: 0s;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

.chat-message.msg-right {
    align-self: flex-end;
    background: #0d9488;
    color: #fff;
    border-bottom-right-radius: 4px;
}

.chat-message.msg-left {
    align-self: flex-start;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-bottom-left-radius: 4px;
}

@keyframes typingAnimation {

    0%,
    60%,
    100% {
        transform: translateY(0);
        opacity: 0.4;
    }

    30% {
        transform: translateY(-4px);
        opacity: 1;
    }
}

.support-input-area {
    display: flex;
    gap: 0.5rem;
}

.support-input-area input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-input);
    color: var(--text-primary);
}

.support-input-area input:focus {
    outline: none;
    border-color: var(--primary);
}

/* ================= FEEDBACKS LIST ================= */
.feedbacks-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.feedback-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.feedback-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.feedback-type {
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
}

.feedback-type.MELHORIA {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.feedback-type.CRITICA {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.feedback-type.DUVIDA {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.feedback-type.ELOGIO {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.feedback-content {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

.feedback-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.feedback-sender {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.feedback-sender i {
    color: var(--primary);
}

/* ================= SUPPORT CHATS LIST ================= */
.support-chats-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.support-chat-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.support-chat-item:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.support-chat-item.unread {
    border-left: 4px solid var(--urgent-color);
    background: rgba(239, 68, 68, 0.05);
}

.support-chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.support-chat-user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.support-chat-user-name {
    font-weight: 600;
    color: var(--text-primary);
}

.support-chat-user-email {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.support-chat-subject {
    background: var(--accent-glow);
    color: var(--primary);
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
}

.support-chat-preview {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.support-chat-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.unread-badge {
    background: var(--urgent-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    font-weight: 600;
}

/* ================= USER CHATS HISTORY ================= */
.user-chats-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 300px;
    overflow-y: auto;
    padding: 0.75rem;
    background: var(--bg-input);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.user-chat-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-chat-item:hover {
    border-color: var(--primary);
    background: var(--accent-glow);
}

.user-chat-item.unread {
    border-left: 3px solid var(--urgent-color);
}

.user-chat-info {
    flex: 1;
}

.user-chat-subject {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.user-chat-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.user-chat-status {
    background: var(--accent-glow);
    color: var(--primary);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    font-weight: 600;
}

/* Container do Painel Administrativo de Suporte com Scroll */
.admin-support-container {
    background: var(--bg-card);
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    max-height: 80vh;
    overflow-y: auto;
    padding-right: 12px;
}

.admin-support-container::-webkit-scrollbar {
    width: 8px;
}

.admin-support-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

.admin-support-container::-webkit-scrollbar-thumb {
    background: #008080;
    border-radius: 4px;
}

.admin-support-container::-webkit-scrollbar-thumb:hover {
    background: #0f766e;
}

.chat-queue-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
}

.chat-queue-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-input);
    border-left: 4px solid #008080;
    border-radius: 6px;
}

.chat-queue-item button {
    background: #008080;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
}

/* ================= MODAL: DETALHE DO CARTÃO (Fase 3 — checklist + comentários) ================= */
.modal-card-wide {
    max-width: 620px;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-card-wide .modal-header {
    flex-shrink: 0;
}

.modal-card-wide .modal-body {
    flex: 1;
    overflow-y: auto;
    padding-right: 1.1rem;
}

.detail-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.85rem;
}

.detail-meta-row span {
    font-size: 0.78rem;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.detail-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1.25rem;
}

.detail-section {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}

.detail-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.detail-section-header h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.detail-progress-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 600;
}

.checklist-progress-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 0.85rem;
}

.checklist-progress-fill {
    height: 100%;
    background: var(--primary);
    transition: width 0.25s ease;
}

.checklist-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 0.85rem;
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.6rem;
    border-radius: 6px;
    background: var(--bg-input);
}

.checklist-item input[type="checkbox"] {
    width: 17px;
    height: 17px;
    flex-shrink: 0;
    cursor: pointer;
    accent-color: var(--primary);
}

.checklist-item span {
    flex: 1;
    font-size: 0.85rem;
    color: var(--text-primary);
    word-break: break-word;
}

.checklist-item.checklist-item-done span {
    color: var(--text-muted);
    text-decoration: line-through;
}

.checklist-item .btn-checklist-del {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0.2rem;
    flex-shrink: 0;
}

.checklist-item .btn-checklist-del:hover {
    color: #f87171;
}

.checklist-add-row {
    display: flex;
    gap: 0.5rem;
}

.checklist-add-row input {
    flex: 1;
    padding: 0.55rem 0.75rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.85rem;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
    max-height: 260px;
    overflow-y: auto;
}

.comment-item {
    background: var(--bg-input);
    border-radius: 8px;
    padding: 0.65rem 0.85rem;
}

.comment-item-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.25rem;
}

.comment-item-author {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-primary);
}

.comment-item-time {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.comment-item-message {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-word;
}

.comment-item-message .mention-tag {
    color: var(--primary);
    font-weight: 600;
}

.comment-add-row {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.comment-add-row textarea {
    padding: 0.6rem 0.75rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.85rem;
    resize: vertical;
    font-family: inherit;
}

.comment-add-row .btn-primary {
    align-self: flex-end;
}

.detail-empty-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
    padding: 0.4rem 0;
}

.dot-HORARIO_MARCADO {
    background: #ec4899;
}

.event-item-card.event-HORARIO_MARCADO {
    border-left: 3px solid #ec4899;
}

/* Aviso de Manutenção */
.maintenance-notice {
    background: var(--urgent-color);
    color: white;
    padding: 12px 20px;
    text-align: center;
    position: relative;
    z-index: 1000;
}

.maintenance-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    max-width: 1180px;
    margin: 0 auto;
}

.maintenance-icon {
    font-size: 1.2rem;
}

.maintenance-text {
    font-weight: 600;
    font-size: 0.95rem;
}

.maintenance-close {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.maintenance-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.maintenance-notice.hidden {
    display: none;
}