/* ==========================================================================
   1. ESTRUTURA GERAL DO PAINEL (DASHBOARD)
   ========================================================================== */
body {
    background-color: #f1f5f9;
}

.dashboard-header {
    background: #ffffff;
    padding: 15px 0;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.dash-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 14px;
}

.btn-exit {
    color: #ef4444;
    text-decoration: none;
    font-weight: bold;
}

/* O atalho para a administração. Era um link vermelho solto, da mesma
   cor do "Sair" — duas coisas muito diferentes vestidas igual, e o
   vermelho pedindo atenção para uma navegação corriqueira.

   Agora é um botão de contorno, no mesmo desenho do "Painel de
   Controle" que fica no cabeçalho da administração: os dois lados do
   caminho de ida e volta se parecem. Cinza parado, laranja quando o
   mouse chega, que é a cor da marca. */
.btn-admin {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #cbd5e1;
    color: #475569;
    background: none;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 6px;
    transition: all 0.2s;
}

.btn-admin:hover {
    border-color: #ff6600;
    color: #ff6600;
}

/* ==========================================================================
   2. VISÃO GERAL (DASHBOARD.HTML)
   ========================================================================== */
.dash-welcome {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.dash-welcome h2 {
    font-size: 26px;
    color: #1e293b;
}

.dash-welcome p {
    color: #64748b;
    font-size: 14px;
}

.btn-primary-dash {
    background: #2563eb;
    color: white;
    padding: 12px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.3s;
}

.btn-primary-dash:hover {
    background: #1d4ed8;
}

/* CARDS DE ESTATÍSTICAS */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 35px;
}

.stat-card {
    background: #ffffff;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.stat-icon.blue { background: #dbeafe; color: #2563eb; }
.stat-icon.green { background: #d1fae5; color: #10b981; }
.stat-icon.orange { background: #ffedd5; color: #f97316; }

.stat-info span {
    font-size: 12px;
    color: #64748b;
    display: block;
}

.stat-info h4 {
    font-size: 18px;
    color: #0f172a;
}

/* LISTA DE ANÚNCIOS CADASTRADOS */
.dash-content-box {
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    padding: 25px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.box-header {
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.box-header h3 {
    font-size: 18px;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 10px;
}

.listing-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 15px;
    border: 1px solid #f1f5f9;
    border-radius: 8px;
    background: #fafafa;
}

.listing-thumb img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
}

.listing-details {
    flex-grow: 1;
}

.listing-details h4 {
    font-size: 16px;
    color: #1e293b;
    margin-bottom: 4px;
}

.listing-details p {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 6px;
}

.status-badge {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: bold;
}

.status-badge.active {
    background: #d1fae5;
    color: #047857;
}

.listing-actions {
    display: flex;
    gap: 10px;
}

.btn-action {
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    text-decoration: none;
}

.btn-action.edit {
    background: #e2e8f0;
    color: #334155;
}

.btn-action.view {
    background: #1e293b;
    color: white;
}

/* ==========================================================================
   3. FORMULÁRIO DE CADASTRAR/EDITAR ANÚNCIO (CADASTRAR-ANUNCIO.HTML)
   ========================================================================== */
.form-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    padding: 40px;
    max-width: 900px;
    margin: 0 auto;
}

.form-header {
    margin-bottom: 35px;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 20px;
}

.form-header h2 {
    color: #1e293b;
    font-size: 24px;
}

.form-header p {
    color: #64748b;
    font-size: 14px;
}

.form-section {
    margin-bottom: 40px;
}

.form-section h3 {
    font-size: 18px;
    color: #334155;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-section h3 i {
    color: #2563eb;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.full-width {
    grid-column: span 2;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
}

.form-group input, 
.form-group select, 
.form-group textarea {
    padding: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    width: 100%;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #2563eb;
}

.margin-top-20 {
    margin-top: 20px;
}

.help-text {
    font-size: 11px;
    color: #64748b;
    margin-top: 2px;
}

/* CAIXAS DE UPLOAD DE FOTOS E LOGO */
.upload-box {
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.upload-box i {
    font-size: 32px;
    color: #2563eb;
}

.upload-box p {
    font-size: 12px;
    color: #64748b;
}

.btn-select-file {
    background: #e2e8f0;
    color: #1e293b;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
    display: inline-block;
}

.btn-select-file:hover {
    background: #cbd5e1;
}

.upload-area-multi {
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
    padding: 30px;
    text-align: center;
    border-radius: 8px;
}

.upload-area-multi i {
    font-size: 40px;
    color: #94a3b8;
    margin-bottom: 10px;
}

.upload-area-multi h4 {
    font-size: 15px;
    color: #1e293b;
    margin-bottom: 4px;
}

.upload-area-multi p {
    font-size: 12px;
    color: #64748b;
}

.btn-upload {
    display: inline-block;
    margin-top: 15px;
    background: #1e293b;
    color: white;
    padding: 10px 22px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.2s;
}

.btn-upload:hover {
    background: #0f172a;
}

/* BOTÕES DE AÇÃO DO FORMULÁRIO */
.form-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 15px;
    border-top: 2px solid #f1f5f9;
    padding-top: 30px;
}

.btn-cancel {
    padding: 12px 20px;
    color: #64748b;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    transition: color 0.2s;
}

.btn-cancel:hover {
    color: #ef4444;
}

.btn-publish {
    padding: 12px 30px;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
}

.btn-publish:hover {
    background: #059669;
}

/* ==========================================================================
   4. RESPONSIVIDADE (MOBILE & TABLET)
   ========================================================================== */
@media (max-width: 768px) {
    .form-card {
        padding: 20px;
    }
    .form-grid {
        grid-template-columns: 1fr;
    }
    .full-width {
        grid-column: span 1;
    }
    .dash-welcome {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    .listing-item {
        flex-direction: column;
        text-align: center;
    }
    .listing-actions {
        width: 100%;
        justify-content: center;
    }
    .dash-nav {
        flex-direction: column;
        gap: 10px;
    }
    .form-actions {
        flex-direction: column-reverse;
        width: 100%;
    }
    .btn-publish, .btn-cancel {
        width: 100%;
        justify-content: center;
    }
}