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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f0f4f8 0%, #e8f0f5 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* HEADER */
header {
    background: linear-gradient(135deg, #1a7f8e 0%, #7eb854 100%);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    color: white;
    margin-bottom: 30px;
    box-shadow: 0 5px 20px rgba(26, 127, 142, 0.3);
}

.logo {
    height: 60px;
    margin-bottom: 15px;
    background: white;
    padding: 10px 20px;
    border-radius: 10px;
}

header h1 {
    font-size: 32px;
    margin-bottom: 10px;
}

header p {
    font-size: 16px;
    opacity: 0.95;
}

/* TABS */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tab {
    flex: 1;
    padding: 15px 20px;
    background: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: #555;
    transition: all 0.3s;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.tab:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.tab.active {
    background: linear-gradient(135deg, #1a7f8e 0%, #7eb854 100%);
    color: white;
}

.tab i {
    margin-right: 8px;
}

/* ABAS */
.aba {
    display: none;
}

.aba.active {
    display: block;
}

/* CARD */
.card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.card h2 {
    color: #1a7f8e;
    margin-bottom: 25px;
    font-size: 24px;
}

.card h2 i {
    margin-right: 10px;
}

/* FORMULÁRIO */
.campo {
    margin-bottom: 20px;
}

.campo label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
}

.campo label i {
    color: #1a7f8e;
    margin-right: 8px;
}

.campo input,
.campo textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s;
}

.campo input:focus,
.campo textarea:focus {
    outline: none;
    border-color: #1a7f8e;
    box-shadow: 0 0 0 3px rgba(26, 127, 142, 0.1);
}

textarea {
    resize: vertical;
    font-family: inherit;
}

/* MENSAGEM */
.msg {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: none;
    font-weight: 600;
}

.msg.sucesso {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.msg.erro {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

/* BOTÕES */
.botoes {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

button {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primario {
    background: linear-gradient(135deg, #1a7f8e 0%, #7eb854 100%);
    color: white;
}

.btn-primario:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(26, 127, 142, 0.3);
}

.btn-secundario {
    background: #6c757d;
    color: white;
}

.btn-secundario:hover {
    background: #5a6268;
}

.btn-pequeno,
.btn-pequeno-sec {
    padding: 8px 15px;
    font-size: 14px;
}

.btn-pequeno {
    background: #1a7f8e;
    color: white;
}

.btn-pequeno-sec {
    background: #6c757d;
    color: white;
}

.btn-export {
    background: #7eb854;
    color: white;
    padding: 10px 20px;
}

/* STATS */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.stat {
    background: linear-gradient(135deg, #1a7f8e 0%, #7eb854 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.stat i {
    font-size: 32px;
    opacity: 0.9;
}

.stat span {
    font-size: 16px;
}

.stat strong {
    font-size: 24px;
    display: block;
}

/* WEBHOOK */
.webhook-box {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 25px;
    border: 2px dashed #1a7f8e;
}

.webhook-box h3 {
    color: #1a7f8e;
    margin-bottom: 15px;
    font-size: 18px;
}

.webhook-input-box {
    display: flex;
    gap: 10px;
}

.webhook-input-box input {
    flex: 1;
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
}

/* BUSCA */
.busca {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
}

.busca i {
    color: #1a7f8e;
    font-size: 18px;
}

.busca input {
    flex: 1;
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
}

/* TABELA */
.tabela-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: linear-gradient(135deg, #1a7f8e 0%, #7eb854 100%);
    color: white;
}

th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

tbody tr {
    border-bottom: 1px solid #e0e0e0;
    transition: background 0.2s;
}

tbody tr:hover {
    background: #f8f9fa;
}

td {
    padding: 15px;
}

.vazio {
    text-align: center;
    padding: 40px !important;
    color: #999;
    font-style: italic;
}

/* BADGE STATUS */
.badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge.ativo {
    background: #d4edda;
    color: #155724;
}

.badge.enviado {
    background: #fff3cd;
    color: #856404;
}

.badge.processado {
    background: #d1ecf1;
    color: #0c5460;
}

/* AÇÕES */
.acoes {
    display: flex;
    gap: 5px;
}

.btn-acao {
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-ver {
    background: #17a2b8;
    color: white;
}

.btn-status {
    background: #ffc107;
    color: #333;
}

.btn-excluir {
    background: #dc3545;
    color: white;
}

.btn-acao:hover {
    transform: scale(1.1);
}

/* MODAL */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-conteudo {
    background: white;
    padding: 30px;
    border-radius: 15px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h3 {
    color: #1a7f8e;
    font-size: 22px;
}

.modal-header button {
    background: none;
    border: none;
    font-size: 32px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
}

#modal-body {
    margin-bottom: 20px;
}

.detalhe {
    margin-bottom: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.detalhe strong {
    color: #1a7f8e;
    display: block;
    margin-bottom: 5px;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .tabs {
        flex-direction: column;
    }
    
    .botoes,
    .webhook-input-box {
        flex-direction: column;
    }
    
    .stats {
        grid-template-columns: 1fr;
    }
    
    table {
        font-size: 14px;
    }
    
    th, td {
        padding: 10px 8px;
    }
}
