/* ==================================================
   VARIÁVEIS GERAIS (caso queira usar tema futuramente)
   ================================================== */
:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
    --background: #ffffff;
    --splash: #f5f5f5;
    --text: #333;
}

/* ==================================================
   BASE GLOBAL
   ================================================== */
body {
    font-family: Arial, sans-serif;
    background-color: #f9f9f9;
    margin: 20px;
    color: var(--text);
}

h1, h2 {
    color: var(--primary-dark);
}

/* ==================================================
   FORMULÁRIOS GERAIS
   ================================================== */
.field,
input[type="text"],
input[type="email"],
textarea,
select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    background-color: var(--background);
    color: var(--text);
    margin-bottom: 16px;
    transition: border-color .2s, box-shadow .2s;
}

.field:focus,
input:focus,
textarea:focus,
select:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 4px var(--primary);
}

/* Botões padrão */
button,
.btn-primary,
.btn-secondary,
.btn,
.btn-submit,
.btn-cancel {
    padding: 10px 16px;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 16px;
    border: none;
}

/* Botão principal */
.btn-primary,
.btn-submit {
    background-color: var(--primary);
    color: #fff;
}

.btn-primary:hover,
.btn-submit:hover {
    background-color: var(--primary-dark);
}

/* Botão secundário */
.btn-secondary,
.btn-cancel {
    background-color: #777;
    color: #fff;
}

.btn-secondary:hover,
.btn-cancel:hover {
    background-color: #555;
}

.btn-buscar {
    background-color: var(--primary);
    color: #fff;
    height: 38px; /* altura exata */
    padding: 0 10px; /* só lateral */
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
}
.btn-buscar:hover {
    background-color: var(--primary-dark);
}

.btn-limpar {
    background-color: #6b7280; /* cinza elegante */
    color: #fff;
    padding: 10px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    display: inline-block;
    margin-left: 10px;
}

.btn-limpar:hover {
    background-color: #4b5563;
}

.filtros-row {
    display: flex;
    justify-content: center; /* centraliza tudo */
    align-items: center;
    gap: 10px;
    margin: 20px 0;
}



/* ==================================================
   GRID DE FORMULÁRIO
   ================================================== */
.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* ==================================================
   FORMULÁRIO DE CONTATO / EDIÇÃO
   ================================================== */
.contact-form {
    max-width: 800px;
    margin: 40px auto;
    padding: 24px;
    background-color: var(--background);
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.contact-form h1 {
    margin-bottom: 24px;
    font-size: 24px;
    text-align: center;
}

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

.tag-item {
    display: flex;
    align-items: center;
}

.tag-item label {
    margin-left: 6px;
}

/* ==================================================
   LOGIN
   ================================================== */
.login-form {
    max-width: 400px;
    margin: 60px auto;
    padding: 24px;
    background-color: var(--background);
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.login-form h1 {
    text-align: center;
    margin-bottom: 24px;
}

.login-form .error {
    background-color: #ffe5e5;
    color: #a00;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 16px;
    text-align: center;
}

/* ==================================================
   DASHBOARD / ESTATÍSTICAS
   ================================================== */
.dashboard {
    max-width: 1000px;
    margin: 40px auto;
}

.stats {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    flex: 1;
    background: var(--background);
    padding: 20px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.stat-card h2 {
    margin-bottom: 12px;
    font-size: 18px;
}

.stat-card p,
.stat-card ul {
    margin: 0;
    font-size: 16px;
}

/* ==================================================
   TABELA DE CONTATOS
   ================================================== */
.table-contacts {
    width: 100%;
    border-collapse: collapse;
    background: var(--background);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.table-contacts th,
.table-contacts td {
    padding: 12px 15px;
    border-bottom: 1px solid #ececec;
}

.table-contacts th {
    background: #f5f5f5;
    font-weight: 600;
}

.table-contacts tbody tr:hover {
    background: #fafafa;
}

/* ======================================================
    TABELA AGENDAMENTOS
   ====================================================== */
.table-agendamentos {
    width: 100%;
    border-collapse: collapse;
    background: var(--background);
    box-shadow: 0 2px 8px rgba(0,0,0
,0.05);
}
.table-agendamentos th,
.table-agendamentos td {
    padding: 12px 15px;
    border-bottom: 1px solid #ececec;
}
.table-agendamentos th {
    background: #f5f5f5;
    font-weight: 600;
}
.table-agendamentos tbody tr:hover {
    background: #fafafa;
}



/* Botões ícones */
.icon-btn {
    display: inline-flex;          /* garante lado a lado */
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: none;
    background: #f3f4f6;
    color: #374151;
    margin-right: 6px;             /* espaço entre eles */
    text-decoration: none !important; /* remove underline de vez */
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
}

/* Garante que NENHUM estado de link sublinhe */
.icon-btn:link,
.icon-btn:visited,
.icon-btn:hover,
.icon-btn:active,
.icon-btn:focus {
    text-decoration: none !important;
    outline: none;
}


.icon-btn:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-1px);
}

/* ==================================================
   PAGINAÇÃO
   ================================================== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.pagination a {
    padding: 8px 14px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #f9f9f9;
    text-decoration: none;
    color: #333;
    transition: .2s;
}

.pagination a:hover {
    background: #e0e0e0;
}

.pagination a.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    pointer-events: none;
}

/* ==================================================
   BOTÃO DE EXPORTAÇÃO
   ================================================== */
.btn-xls {
    display: block;
    margin: 30px auto;
    padding: 10px 16px;
    background: var(--success);
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
    transition: .2s;
}

.btn-xls:hover {
    background: #218838;
}

/* ==================================================
   FORMULÁRIO DE ENVIO DE MENSAGEM
   ================================================== */
.form-card {
    max-width: 650px;
    margin: 30px auto;
    padding: 25px;
    background: var(--background);
    border-radius: 10px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.1);
}

.contact-badge {
    background: #e8f0ff;
    color: var(--primary);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 1.3em;
    font-weight: 700;
}

/* Mídia + lupa */
.media-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-preview,
.btn-hide-preview {
    padding: 8px 12px;
    background: var(--primary);
    text-decoration: none;
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
}

.btn-preview:hover,
.btn-hide-preview:hover {
    background: var(--primary-dark);
    text-decoration: none;
}

/* Pré-visualização */
.preview-area {
    margin-top: 10px;
    display: none;
    padding: 10px;
    background: #f8f9ff;
    border: 1px solid #d0d7ff;
    border-radius: 6px;
}

.preview-area img,
.preview-area video {
    max-width: 100%;
    border-radius: 6px;
}

/* Pop-up */
.preview-popup-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.preview-popup {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    max-width: 90%;
    max-height: 90%;
}

.preview-popup img,
.preview-popup video {
    max-width: 100%;
    max-height: 80vh;
}

/* Alerta */
.alert-info {
    background: #e8f4ff;
    border-left: 4px solid var(--primary);
    padding: 10px 15px;
    border-radius: 6px;
    margin-bottom: 15px;
}

/* ==================================================
   DASHBOARD HEADER / TOPO
   ================================================== */

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

.dashboard-header .user-company span {
    margin-right: 16px;
    font-weight: 500;
}

.btn-logout {
    padding: 6px 12px;
    background: var(--danger);
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
}

.btn-logout:hover {
    background: #c82333;
}

/* Formulário de busca no topo */
.search-form {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
}


/* Header principal */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

/* Agrupa título + navegação */
.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Navegação ao lado do título */
.header-nav a {
    text-decoration: none;
    color: var(--primary-dark);
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 6px;
    transition: 0.2s;
}

.header-nav a:hover {
    background: var(--primary);
    color: #fff;
}

