/**
 * Sistema WhatsApp API
 * Estilos CSS Completos
 * Bootstrap 5 + Customizações
 */

/* ========================================
   1. VARIÁVEIS E RESET
======================================== */

:root {
    --cor-primaria: #25D366;
    --cor-secundaria: #128C7E;
    --cor-terciaria: #075E54;
    --cor-sucesso: #22c55e;
    --cor-erro: #ef4444;
    --cor-aviso: #f59e0b;
    --cor-info: #3b82f6;
    --cor-texto: #1f2937;
    --cor-texto-claro: #6b7280;
    --cor-fundo: #f9fafb;
    --cor-fundo-card: #ffffff;
    --cor-borda: #e5e7eb;
    --sombra-padrao: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    --sombra-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --transicao-padrao: all 0.3s ease;
    --fonte-principal: 'Inter', system-ui, -apple-system, sans-serif;
    --raio-borda: 0.5rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--fonte-principal);
    font-size: 16px;
    line-height: 1.6;
    color: var(--cor-texto);
    background-color: var(--cor-fundo);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   2. TIPOGRAFIA
======================================== */

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--cor-texto);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
    color: var(--cor-texto-claro);
}

a {
    color: var(--cor-primaria);
    text-decoration: none;
    transition: var(--transicao-padrao);
}

a:hover {
    color: var(--cor-secundaria);
}

.texto-pequeno {
    font-size: 0.875rem;
}

.texto-grande {
    font-size: 1.125rem;
}

.texto-destaque {
    font-size: 1.25rem;
    font-weight: 500;
}

/* ========================================
   3. LAYOUT PRINCIPAL - SITE PÚBLICO
======================================== */

.site-header {
    background: linear-gradient(135deg, var(--cor-primaria), var(--cor-secundaria));
    box-shadow: var(--sombra-padrao);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: white !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-brand i {
    font-size: 2rem;
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: var(--raio-borda);
    transition: var(--transicao-padrao);
}

.navbar-nav .nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white !important;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--cor-primaria), var(--cor-secundaria));
    color: white;
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 100%;
    height: 200%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.1" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,112C672,96,768,96,864,112C960,128,1056,160,1152,160C1248,160,1344,128,1392,112L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat;
    background-size: cover;
    opacity: 0.3;
}

.hero-titulo {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.hero-subtitulo {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

/* Seção de Recursos */
.recursos-section {
    padding: 5rem 0;
    background: white;
}

.recurso-card {
    background: white;
    border-radius: var(--raio-borda);
    padding: 2rem;
    text-align: center;
    transition: var(--transicao-padrao);
    border: 1px solid var(--cor-borda);
    height: 100%;
}

.recurso-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--sombra-hover);
    border-color: var(--cor-primaria);
}

.recurso-icone {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--cor-primaria), var(--cor-secundaria));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.recurso-icone i {
    font-size: 2rem;
    color: white;
}

/* Seção de Planos */
.planos-section {
    padding: 5rem 0;
    background: var(--cor-fundo);
}

.plano-card {
    background: white;
    border-radius: var(--raio-borda);
    padding: 2rem;
    text-align: center;
    border: 2px solid var(--cor-borda);
    transition: var(--transicao-padrao);
    position: relative;
    height: 100%;
}

.plano-card.popular {
    border-color: var(--cor-primaria);
    transform: scale(1.05);
}

.plano-card.popular::before {
    content: 'POPULAR';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--cor-primaria);
    color: white;
    padding: 5px 20px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
}

.plano-card:hover {
    box-shadow: var(--sombra-hover);
}

.plano-preco {
    font-size: 3rem;
    font-weight: 700;
    color: var(--cor-primaria);
    margin: 1rem 0;
}

.plano-preco small {
    font-size: 1rem;
    color: var(--cor-texto-claro);
    font-weight: 400;
}

.plano-recursos {
    list-style: none;
    padding: 0;
    margin: 2rem 0;
}

.plano-recursos li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--cor-borda);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.plano-recursos i {
    color: var(--cor-sucesso);
}

/* ========================================
   4. PAINEL ADMINISTRATIVO / CLIENTE
======================================== */

.painel-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: linear-gradient(180deg, var(--cor-primaria), var(--cor-secundaria));
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 1000;
    transition: var(--transicao-padrao);
}

.sidebar-logo {
    padding: 1.5rem;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-logo h3 {
    color: white;
    font-size: 1.5rem;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.sidebar-menu {
    list-style: none;
    padding: 1rem 0;
    margin: 0;
}

.sidebar-menu li {
    margin-bottom: 0.25rem;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transicao-padrao);
}

.sidebar-menu a:hover,
.sidebar-menu a.ativo {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-left: 4px solid white;
}

.sidebar-menu i {
    width: 24px;
    margin-right: 0.75rem;
    font-size: 1.125rem;
}

.sidebar-menu-titulo {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
    text-transform: uppercase;
    padding: 0.5rem 1.5rem;
    margin-top: 1rem;
}

/* Conteúdo Principal */
.conteudo-principal {
    margin-left: 260px;
    width: calc(100% - 260px);
    min-height: 100vh;
    background: var(--cor-fundo);
}

.topbar {
    background: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--sombra-padrao);
    position: sticky;
    top: 0;
    z-index: 999;
}

.topbar-titulo {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.topbar-acoes {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.topbar-notificacoes {
    position: relative;
}

.notificacao-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--cor-erro);
    color: white;
    font-size: 0.625rem;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 700;
}

.topbar-usuario {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: var(--cor-fundo);
    border-radius: var(--raio-borda);
    cursor: pointer;
}

.usuario-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--cor-primaria);
}

/* Cards do Dashboard */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.dashboard-card {
    background: white;
    border-radius: var(--raio-borda);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--sombra-padrao);
    transition: var(--transicao-padrao);
}

.dashboard-card:hover {
    box-shadow: var(--sombra-hover);
    transform: translateY(-2px);
}

.dashboard-card-icone {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.dashboard-card-icone.primaria {
    background: linear-gradient(135deg, var(--cor-primaria), var(--cor-secundaria));
}

.dashboard-card-icone.sucesso {
    background: linear-gradient(135deg, var(--cor-sucesso), #16a34a);
}

.dashboard-card-icone.aviso {
    background: linear-gradient(135deg, var(--cor-aviso), #dc2626);
}

.dashboard-card-icone.info {
    background: linear-gradient(135deg, var(--cor-info), #1e40af);
}

.dashboard-card-info h3 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    color: var(--cor-texto);
}

.dashboard-card-info p {
    font-size: 0.875rem;
    color: var(--cor-texto-claro);
    margin: 0;
}

/* Tabelas */
.tabela-container {
    background: white;
    border-radius: var(--raio-borda);
    padding: 1.5rem;
    box-shadow: var(--sombra-padrao);
}

.tabela-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--cor-borda);
}

.tabela-titulo {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.tabela-responsiva {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead th {
    background: var(--cor-fundo);
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    color: var(--cor-texto);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

tbody td {
    padding: 0.75rem;
    border-top: 1px solid var(--cor-borda);
    color: var(--cor-texto-claro);
}

tbody tr:hover {
    background: var(--cor-fundo);
}

/* Sessões WhatsApp */
.sessao-card {
    background: white;
    border-radius: var(--raio-borda);
    padding: 1.5rem;
    box-shadow: var(--sombra-padrao);
    transition: var(--transicao-padrao);
    border: 2px solid var(--cor-borda);
}

.sessao-card:hover {
    box-shadow: var(--sombra-hover);
    border-color: var(--cor-primaria);
}

.sessao-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.sessao-nome {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--cor-texto);
}

.sessao-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.sessao-status.conectado {
    background: rgba(34, 197, 94, 0.1);
    color: var(--cor-sucesso);
}

.sessao-status.desconectado {
    background: rgba(239, 68, 68, 0.1);
    color: var(--cor-erro);
}

.sessao-status.conectando {
    background: rgba(245, 158, 11, 0.1);
    color: var(--cor-aviso);
}

.sessao-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin: 1rem 0;
}

.sessao-info-item {
    display: flex;
    flex-direction: column;
}

.sessao-info-label {
    font-size: 0.75rem;
    color: var(--cor-texto-claro);
    margin-bottom: 0.25rem;
}

.sessao-info-valor {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--cor-texto);
}

.sessao-acoes {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--cor-borda);
}

/* QR Code */
.qrcode-container {
    text-align: center;
    padding: 2rem;
}

.qrcode-imagem {
    max-width: 300px;
    margin: 0 auto 1rem;
    padding: 1rem;
    background: white;
    border-radius: var(--raio-borda);
    box-shadow: var(--sombra-padrao);
}

.qrcode-instrucoes {
    color: var(--cor-texto-claro);
    margin-top: 1rem;
}

/* Chat/Mensagens */
.chat-container {
    display: flex;
    height: 600px;
    background: white;
    border-radius: var(--raio-borda);
    box-shadow: var(--sombra-padrao);
    overflow: hidden;
}

.chat-lista-contatos {
    width: 300px;
    border-right: 1px solid var(--cor-borda);
    overflow-y: auto;
}

.chat-contato {
    padding: 1rem;
    border-bottom: 1px solid var(--cor-borda);
    cursor: pointer;
    transition: var(--transicao-padrao);
}

.chat-contato:hover,
.chat-contato.ativo {
    background: var(--cor-fundo);
}

.chat-contato-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--cor-primaria);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    float: left;
    margin-right: 1rem;
}

.chat-contato-info {
    overflow: hidden;
}

.chat-contato-nome {
    font-weight: 600;
    color: var(--cor-texto);
    margin-bottom: 0.25rem;
}

.chat-contato-ultima-msg {
    font-size: 0.875rem;
    color: var(--cor-texto-claro);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-conversa {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.chat-header {
    padding: 1rem;
    border-bottom: 1px solid var(--cor-borda);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.chat-mensagens {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    background: var(--cor-fundo);
}

.chat-mensagem {
    margin-bottom: 1rem;
    display: flex;
}

.chat-mensagem.enviada {
    justify-content: flex-end;
}

.chat-mensagem.recebida {
    justify-content: flex-start;
}

.chat-mensagem-conteudo {
    max-width: 70%;
    padding: 0.75rem 1rem;
    border-radius: var(--raio-borda);
    position: relative;
}

.chat-mensagem.enviada .chat-mensagem-conteudo {
    background: var(--cor-primaria);
    color: white;
    border-bottom-right-radius: 0;
}

.chat-mensagem.recebida .chat-mensagem-conteudo {
    background: white;
    color: var(--cor-texto);
    border-bottom-left-radius: 0;
}

.chat-mensagem-hora {
    font-size: 0.625rem;
    opacity: 0.7;
    margin-top: 0.25rem;
}

.chat-input {
    padding: 1rem;
    border-top: 1px solid var(--cor-borda);
    display: flex;
    gap: 0.5rem;
}

.chat-input-texto {
    flex: 1;
    border: 1px solid var(--cor-borda);
    border-radius: var(--raio-borda);
    padding: 0.75rem;
    resize: none;
    font-family: var(--fonte-principal);
}

/* ========================================
   5. FORMULÁRIOS
======================================== */

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--cor-texto);
}

.form-label-obrigatorio::after {
    content: ' *';
    color: var(--cor-erro);
}

.form-control,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--cor-borda);
    border-radius: var(--raio-borda);
    font-family: var(--fonte-principal);
    font-size: 1rem;
    transition: var(--transicao-padrao);
}

.form-control:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--cor-primaria);
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.form-helper {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--cor-texto-claro);
}

.form-erro {
    color: var(--cor-erro);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.form-checkbox,
.form-radio {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.form-checkbox input,
.form-radio input {
    margin-right: 0.5rem;
}

/* ========================================
   6. BOTÕES
======================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--raio-borda);
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transicao-padrao);
    text-decoration: none;
    gap: 0.5rem;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primario {
    background: linear-gradient(135deg, var(--cor-primaria), var(--cor-secundaria));
    color: white;
}

.btn-primario:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.3);
}

.btn-secundario {
    background: white;
    color: var(--cor-primaria);
    border: 2px solid var(--cor-primaria);
}

.btn-secundario:hover:not(:disabled) {
    background: var(--cor-primaria);
    color: white;
}

.btn-sucesso {
    background: var(--cor-sucesso);
    color: white;
}

.btn-erro {
    background: var(--cor-erro);
    color: white;
}

.btn-aviso {
    background: var(--cor-aviso);
    color: white;
}

.btn-info {
    background: var(--cor-info);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--cor-borda);
    color: var(--cor-texto);
}

.btn-outline:hover:not(:disabled) {
    border-color: var(--cor-primaria);
    color: var(--cor-primaria);
}

.btn-pequeno {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-grande {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-bloco {
    width: 100%;
}

.btn-icone {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
}

.btn-grupo {
    display: inline-flex;
    gap: 0.5rem;
}

/* ========================================
   7. MODAIS
======================================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transicao-padrao);
}

.modal-overlay.ativo {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: white;
    border-radius: var(--raio-borda);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow: auto;
    transform: scale(0.9);
    transition: var(--transicao-padrao);
}

.modal-overlay.ativo .modal {
    transform: scale(1);
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--cor-borda);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-titulo {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.modal-fechar {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--cor-texto-claro);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transicao-padrao);
}

.modal-fechar:hover {
    background: var(--cor-fundo);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--cor-borda);
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

/* ========================================
   8. ALERTAS E NOTIFICAÇÕES
======================================== */

.alerta {
    padding: 1rem 1.5rem;
    border-radius: var(--raio-borda);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alerta-sucesso {
    background: rgba(34, 197, 94, 0.1);
    color: var(--cor-sucesso);
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.alerta-erro {
    background: rgba(239, 68, 68, 0.1);
    color: var(--cor-erro);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.alerta-aviso {
    background: rgba(245, 158, 11, 0.1);
    color: var(--cor-aviso);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.alerta-info {
    background: rgba(59, 130, 246, 0.1);
    color: var(--cor-info);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
}

.toast {
    background: white;
    border-radius: var(--raio-borda);
    box-shadow: var(--sombra-hover);
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    min-width: 300px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ========================================
   9. BADGES E TAGS
======================================== */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-primario {
    background: var(--cor-primaria);
    color: white;
}

.badge-sucesso {
    background: rgba(34, 197, 94, 0.1);
    color: var(--cor-sucesso);
}

.badge-erro {
    background: rgba(239, 68, 68, 0.1);
    color: var(--cor-erro);
}

.badge-aviso {
    background: rgba(245, 158, 11, 0.1);
    color: var(--cor-aviso);
}

.badge-info {
    background: rgba(59, 130, 246, 0.1);
    color: var(--cor-info);
}

.tag {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    background: var(--cor-fundo);
    border-radius: 4px;
    font-size: 0.75rem;
    margin-right: 0.25rem;
    margin-bottom: 0.25rem;
}

/* ========================================
   10. LOADING E SPINNERS
======================================== */

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--cor-primaria);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ========================================
   11. UTILITÁRIOS
======================================== */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primario { color: var(--cor-primaria); }
.text-secundario { color: var(--cor-secundaria); }
.text-sucesso { color: var(--cor-sucesso); }
.text-erro { color: var(--cor-erro); }
.text-aviso { color: var(--cor-aviso); }
.text-info { color: var(--cor-info); }
.text-claro { color: var(--cor-texto-claro); }

.bg-primario { background: var(--cor-primaria); }
.bg-secundario { background: var(--cor-secundaria); }
.bg-sucesso { background: var(--cor-sucesso); }
.bg-erro { background: var(--cor-erro); }
.bg-aviso { background: var(--cor-aviso); }
.bg-info { background: var(--cor-info); }
.bg-fundo { background: var(--cor-fundo); }

.m-0 { margin: 0; }
.m-1 { margin: 0.5rem; }
.m-2 { margin: 1rem; }
.m-3 { margin: 1.5rem; }
.m-4 { margin: 2rem; }
.m-5 { margin: 3rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }

.p-0 { padding: 0; }
.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }
.p-5 { padding: 3rem; }

.pt-1 { padding-top: 0.5rem; }
.pt-2 { padding-top: 1rem; }
.pt-3 { padding-top: 1.5rem; }
.pt-4 { padding-top: 2rem; }
.pt-5 { padding-top: 3rem; }

.pb-1 { padding-bottom: 0.5rem; }
.pb-2 { padding-bottom: 1rem; }
.pb-3 { padding-bottom: 1.5rem; }
.pb-4 { padding-bottom: 2rem; }
.pb-5 { padding-bottom: 3rem; }

.d-none { display: none; }
.d-block { display: block; }
.d-inline { display: inline; }
.d-inline-block { display: inline-block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

.flex-row { flex-direction: row; }
.flex-column { flex-direction: column; }
.justify-start { justify-content: flex-start; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.justify-between { justify-content: space-between; }
.align-start { align-items: flex-start; }
.align-center { align-items: center; }
.align-end { align-items: flex-end; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }

.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

.w-100 { width: 100%; }
.h-100 { height: 100%; }

.rounded { border-radius: var(--raio-borda); }
.rounded-circle { border-radius: 50%; }

.shadow { box-shadow: var(--sombra-padrao); }
.shadow-lg { box-shadow: var(--sombra-hover); }

.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }

/* ========================================
   12. RESPONSIVIDADE
======================================== */

@media (max-width: 1024px) {
    .dashboard-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hero-titulo {
        font-size: 2rem;
    }
    
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.aberto {
        transform: translateX(0);
    }
    
    .conteudo-principal {
        margin-left: 0;
        width: 100%;
    }
    
    .dashboard-cards {
        grid-template-columns: 1fr;
    }
    
    .chat-container {
        flex-direction: column;
    }
    
    .chat-lista-contatos {
        width: 100%;
        max-height: 200px;
        border-right: none;
        border-bottom: 1px solid var(--cor-borda);
    }
    
    .modal {
        max-width: 95%;
    }
    
    .topbar {
        padding: 1rem;
    }
    
    .tabela-responsiva {
        font-size: 0.875rem;
    }
    
    .sessao-info {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-titulo {
        font-size: 1.75rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    .toast {
        min-width: 90vw;
    }
}

/* ========================================
   13. ANIMAÇÕES
======================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.animate-fadeIn {
    animation: fadeIn 0.5s ease;
}

.animate-fadeInUp {
    animation: fadeInUp 0.5s ease;
}

.animate-slideInLeft {
    animation: slideInLeft 0.3s ease;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

/* ========================================
   14. TEMA ESCURO (OPCIONAL)
======================================== */

@media (prefers-color-scheme: dark) {
    /* Adicione estilos para tema escuro aqui se necessário */
}

/* ========================================
   15. PRINT
======================================== */

@media print {
    .sidebar,
    .topbar,
    .btn,
    .modal,
    .toast-container {
        display: none;
    }
    
    .conteudo-principal {
        margin-left: 0;
        width: 100%;
    }
    
    body {
        background: white;
    }
    
    .shadow,
    .shadow-lg {
        box-shadow: none;
    }
}