*{box-sizing:border-box}

body{
    margin:0;
    font-family:Arial,Helvetica,sans-serif;
    background:#f4f6f8;
    color:#1f2937;
}

.topbar{
    background:#0f172a;
    color:#fff;
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:14px 24px;
}

.brand a{
    font-size:21px;
    font-weight:700;
    color:#fff;
    text-decoration:none;
}

.brand span{
    color:#38bdf8;
}

.topbar nav a{
    color:#e5e7eb;
    text-decoration:none;
    margin-left:16px;
    font-size:14px;
}

.topbar nav a:hover{
    color:#fff;
}

.container{
    max-width:1280px;
    margin:24px auto;
    padding:0 22px;
}

.footer{
    text-align:center;
    color:#6b7280;
    font-size:13px;
    padding:25px;
}

.card{
    background:#fff;
    border:1px solid #e5e7eb;
    border-radius:16px;
    padding:22px;
    margin-bottom:18px;
    box-shadow:0 8px 24px rgba(15,23,42,.05);
}

h1{
    margin:0 0 8px;
    font-size:30px;
    letter-spacing:-.03em;
}

h2{
    font-size:21px;
    margin:0 0 14px;
}

.muted{
    color:#6b7280;
}

.grid{
    display:grid;
    gap:16px;
}

.grid-2{
    grid-template-columns:repeat(2,minmax(0,1fr));
}

.grid-3{
    grid-template-columns:repeat(3,minmax(0,1fr));
}

.form-row{
    margin-bottom:14px;
}

.form-row label{
    display:block;
    font-weight:600;
    margin-bottom:6px;
}

input,
select,
textarea{
    width:100%;
    padding:10px 11px;
    border:1px solid #cbd5e1;
    border-radius:8px;
    font-size:14px;
    background:#fff;
}

textarea{
    min-height:120px;
    resize:vertical;
}

.btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    background:#2563eb;
    color:#fff;
    border:0;
    border-radius:10px;
    padding:10px 14px;
    text-decoration:none;
    font-weight:700;
    cursor:pointer;
    font-size:14px;
    line-height:1;
    white-space:nowrap;
}

.btn:hover{
    background:#1d4ed8;
}

.btn-secondary{
    background:#475569;
}

.btn-secondary:hover{
    background:#334155;
}

.btn-success{
    background:#16a34a;
}

.btn-success:hover{
    background:#15803d;
}

.btn-danger{
    background:#dc2626;
}

.btn-danger:hover{
    background:#b91c1c;
}

.btn-light{
    background:#e2e8f0;
    color:#0f172a;
}

.btn-light:hover{
    background:#cbd5e1;
}

.actions{
    display:flex;
    gap:8px;
    flex-wrap:wrap;
}

.alert{
    padding:12px 14px;
    border-radius:10px;
    margin-bottom:16px;
}

.alert-success{
    background:#dcfce7;
    color:#166534;
    border:1px solid #86efac;
}

.alert-error{
    background:#fee2e2;
    color:#991b1b;
    border:1px solid #fecaca;
}

.alert-info{
    background:#e0f2fe;
    color:#075985;
    border:1px solid #7dd3fc;
}

.table-wrap{
    overflow-x:auto;
}

table{
    width:100%;
    border-collapse:collapse;
    background:#fff;
}

th,
td{
    border-bottom:1px solid #e5e7eb;
    text-align:left;
    padding:11px 10px;
    font-size:14px;
}

th{
    background:#f8fafc;
    color:#334155;
}

.badge{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:5px 9px;
    border-radius:999px;
    font-size:12px;
    font-weight:800;
    line-height:1;
    text-transform:none;
}

.badge-gratis{
    background:#e5e7eb;
    color:#111827;
}

.badge-pagado{
    background:#dbeafe;
    color:#1d4ed8;
}

.badge-destacado{
    background:#fef3c7;
    color:#92400e;
}

.badge-publicado,
.badge-aprobado{
    background:#dcfce7;
    color:#166534;
}

.badge-borrador,
.badge-pendiente_pago,
.badge-pendiente_revision{
    background:#fef9c3;
    color:#854d0e;
}

.badge-rechazado{
    background:#fee2e2;
    color:#991b1b;
}

.badge-suspendido,
.badge-pausado,
.badge-vencido{
    background:#e5e7eb;
    color:#374151;
}

.stats{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:14px;
}

.stat{
    background:#fff;
    border:1px solid #e5e7eb;
    border-radius:16px;
    padding:18px;
    box-shadow:0 8px 24px rgba(15,23,42,.04);
}

.stat span{
    display:block;
    font-size:13px;
    color:#64748b;
    margin-bottom:6px;
}

.stat strong{
    display:block;
    font-size:28px;
    letter-spacing:-.04em;
}

.plan{
    border:1px solid #e5e7eb;
    border-radius:12px;
    padding:16px;
    background:#fff;
}

.plan h3{
    margin:0 0 8px;
}

.price{
    font-size:22px;
    font-weight:700;
    margin:10px 0;
}

/* =========================================================
   Mis avisos - vista empresa
   ========================================================= */

.page-head{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:18px;
    margin-bottom:18px;
}

.eyebrow{
    margin:0 0 6px;
    font-size:12px;
    text-transform:uppercase;
    font-weight:800;
    letter-spacing:.08em;
    color:#2563eb;
}

.page-subtitle{
    margin:0;
    color:#64748b;
    max-width:720px;
    line-height:1.45;
}

.page-actions{
    display:flex;
    align-items:center;
    gap:10px;
    flex-wrap:wrap;
}

.business-stats{
    margin-bottom:18px;
}

.avisos-grid{
    display:grid;
    grid-template-columns:1fr;
    gap:18px;
}

.aviso-card{
    display:grid;
    grid-template-columns:260px minmax(0,1fr);
    background:#fff;
    border:1px solid #e5e7eb;
    border-radius:18px;
    overflow:hidden;
    box-shadow:0 10px 28px rgba(15,23,42,.06);
}

.aviso-img{
    background:#e2e8f0;
    min-height:230px;
    height:100%;
    position:relative;
}

.aviso-img img{
    width:100%;
    height:100%;
    display:block;
    object-fit:cover;
}

.aviso-img-empty{
    width:100%;
    height:100%;
    min-height:230px;
    display:flex;
    align-items:center;
    justify-content:center;
    color:#64748b;
    font-weight:700;
    background:linear-gradient(135deg,#e2e8f0,#f8fafc);
}

.aviso-body{
    padding:20px;
    min-width:0;
}

.aviso-top{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:14px;
    margin-bottom:10px;
}

.aviso-top h2{
    margin:0;
    font-size:24px;
    letter-spacing:-.03em;
}

.aviso-id{
    display:block;
    margin-top:4px;
    font-size:13px;
}

.aviso-badges{
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap:8px;
    flex-wrap:wrap;
}

.aviso-meta{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    margin-bottom:12px;
}

.aviso-meta span{
    display:inline-flex;
    align-items:center;
    background:#f1f5f9;
    color:#334155;
    border:1px solid #e2e8f0;
    border-radius:999px;
    padding:6px 10px;
    font-size:13px;
    font-weight:700;
}

.aviso-desc{
    margin:0 0 12px;
    color:#475569;
    line-height:1.45;
}

.notice-mini{
    margin:10px 0 14px;
    padding:10px 12px;
    border-radius:12px;
    background:#f1f5f9;
    color:#334155;
    font-size:13px;
    font-weight:700;
}

.notice-warn{
    background:#fef9c3;
    color:#854d0e;
    border:1px solid #fde68a;
}

.notice-ok{
    background:#dcfce7;
    color:#166534;
    border:1px solid #86efac;
}

.aviso-kpis{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:10px;
    margin-top:14px;
}

.aviso-kpis div{
    background:#f8fafc;
    border:1px solid #e2e8f0;
    border-radius:14px;
    padding:12px;
}

.aviso-kpis span{
    display:block;
    color:#64748b;
    font-size:12px;
    font-weight:700;
    margin-bottom:5px;
}

.aviso-kpis strong{
    display:block;
    color:#0f172a;
    font-size:18px;
    letter-spacing:-.03em;
}

.aviso-kpis small{
    display:block;
    margin-top:3px;
    color:#94a3b8;
    font-size:12px;
}

.aviso-footer{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    margin-top:16px;
    padding-top:16px;
    border-top:1px solid #e5e7eb;
}

.aviso-expira span{
    display:block;
    color:#64748b;
    font-size:12px;
    font-weight:700;
    margin-bottom:3px;
}

.aviso-expira strong{
    display:block;
    color:#0f172a;
    font-size:15px;
}

.aviso-actions{
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap:8px;
    flex-wrap:wrap;
}

.empty-state{
    text-align:center;
    padding:42px 22px;
}

/* =========================================================
   Responsive
   ========================================================= */

@media(max-width:960px){
    .aviso-card{
        grid-template-columns:1fr;
    }

    .aviso-img{
        height:260px;
    }

    .aviso-kpis{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }

    .page-head{
        flex-direction:column;
    }
}

@media(max-width:760px){
    .topbar{
        display:block;
    }

    .topbar nav{
        margin-top:12px;
    }

    .topbar nav a{
        margin:0 12px 0 0;
    }

    .grid-2,
    .grid-3,
    .stats{
        grid-template-columns:1fr;
    }

    .container{
        padding:0 14px;
    }

    .aviso-body{
        padding:16px;
    }

    .aviso-top{
        flex-direction:column;
    }

    .aviso-badges{
        justify-content:flex-start;
    }

    .aviso-footer{
        flex-direction:column;
        align-items:flex-start;
    }

    .aviso-actions{
        width:100%;
        justify-content:flex-start;
    }

    .aviso-actions .btn{
        flex:1;
    }
}

@media(max-width:520px){
    h1{
        font-size:26px;
    }

    .aviso-img{
        height:210px;
    }

    .aviso-kpis{
        grid-template-columns:1fr;
    }

    .aviso-actions{
        flex-direction:column;
    }

    .aviso-actions .btn{
        width:100%;
    }
}