/* ======== CERTMAR PREMIUM CSS (Não altera PHP nem BD) ======== */

/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: #f8fafc;
    color: #1e293b;
    -webkit-font-smoothing: antialiased;
}

/* Scrollbar estilizada */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #e2e8f0;
}
::-webkit-scrollbar-thumb {
    background: #1e40af;
    border-radius: 10px;
}

/* Header fixo no topo */
header {
    position: sticky;
    top: 0;
    z-index: 50;
    width: 100%;
}

/* Container layout */
.main-content, main {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 16px;
}

/* Cards */
.card {
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(30,41,59,0.05);
    padding: 18px;
    transition: transform .1s ease;
}
.card:hover {
    transform: translateY(-1px);
}

/* Grid responsiva de cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
}

/* Tabelas modernas */
table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    font-size: 14px;
}

thead {
    background: #1e3a8a;
    color: #fff;
}

th {
    padding: 12px 14px;
    font-weight: 600;
}
td {
    padding: 12px 14px;
    border-bottom: 1px solid #f1f5f9;
}

tbody tr:last-child td {
    border-bottom: none;
}

tbody tr:hover {
    background: #f1f5f9;
}

/* Badges */
.badge {
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 40px;
    display: inline-block;
}
.badge-success {
    background: #22c55e;
    color: white;
}
.badge-warning {
    background: #eab308;
    color: #713f12;
}
.badge-danger {
    background: #ef4444;
    color: white;
}

/* Botões premium */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all .1s ease;
}
.btn-primary {
    background: #1e3a8a;
    color: white;
}
.btn-primary:hover {
    opacity: .92;
}
.btn-danger {
    background: #b91c1c;
    color: white;
}
.btn-danger:hover {
    opacity: .9;
}
.btn-outline {
    border: 2px solid #1e3a8a;
    background: white;
    color: #1e3a8a;
}
.btn-outline:hover {
    background: #f1f5f9;
}

/* Inputs premium */
input, select, textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    transition: border .1s ease, box-shadow .1s ease;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border: 1px solid #1e3a8a;
    box-shadow: 0 0 0 2px rgba(30,58,138,.12);
}

/* Sidebar responsiva para mobile */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        inset: 0;
        transform: translateX(-100%);
        transition: transform .2s ease;
        z-index: 40;
        width: 70%;
        max-width: 300px;
        background: #1e3a8a;
        padding: 20px;
        color: white;
    }
    .sidebar.show {
        transform: translateX(0);
    }

    .sidebar .nav a {
        display: block;
        padding: 10px;
        border-radius: 8px;
        font-weight: 500;
        font-size: 14px;
        margin-bottom: 6px;
        background: rgba(255,255,255,0.08);
        color: white;
    }
    .sidebar .nav a:hover {
        background: rgba(255,255,255,0.2);
        text-decoration: none;
    }

    .main-content {
        padding: 14px;
    }
}

/* Responsividade geral */
@media (max-width: 480px) {
    .page-title {
        font-size: 18px;
    }
    .card {
        padding: 14px;
    }
    th, td {
        padding: 10px;
        font-size: 13px;
    }
    .btn {
        width: 100%;
        padding: 10px;
    }
}
