/* =========================================================================
   Exibidor de Fiscais — estilo institucional teal/petróleo
   Inspirado no Exibidor de Editais
   ========================================================================= */

.ef-wrapper {
    --ef-primary: #007b7f;
    --ef-primary-dark: #00666a;
    --ef-light-bg: #eefafa;
    --ef-border: #b7dfe2;
    --ef-text: #24364b;
    --ef-muted: #6b7280;
    --ef-button: #173763;
    --ef-row-alt: #f7fbfc;
    --ef-radius: 10px;

    color: var(--ef-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 14px;
    line-height: 1.5;
    width: 100%;
    box-sizing: border-box;
}

.ef-wrapper *,
.ef-wrapper *::before,
.ef-wrapper *::after {
    box-sizing: border-box;
}

.ef-card {
    background: #fff;
    border: 1px solid var(--ef-border);
    border-radius: var(--ef-radius);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    width: 100%;
}

/* ---------- Cabeçalho ---------- */
.ef-header {
    background: var(--ef-primary);
    color: #fff;
    padding: 18px 22px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.ef-header-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    width: 28px;
    height: 28px;
}

.ef-header-title {
    margin: 0;
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.2px;
}

/* ---------- Toolbar / Filtros ---------- */
.ef-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
    padding: 14px 18px;
    background: var(--ef-light-bg);
    border-bottom: 1px solid var(--ef-border);
}

.ef-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.ef-field-search {
    flex: 1 1 300px;
    min-width: 220px;
}

.ef-field-ano,
.ef-field-tipo {
    flex: 0 1 200px;
}

.ef-field-clear {
    margin-left: auto;
    align-self: flex-end;
}

.ef-label {
    color: var(--ef-primary-dark);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

.ef-search-ic {
    margin-right: 4px;
}

.ef-input {
    width: 100%;
    height: 38px;
    padding: 6px 12px;
    background: #fff;
    border: 1px solid var(--ef-border);
    border-radius: 8px;
    color: var(--ef-text);
    font-size: 14px;
    line-height: 1.3;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.ef-input:focus {
    outline: none;
    border-color: var(--ef-primary);
    box-shadow: 0 0 0 3px rgba(0, 123, 127, 0.18);
}

select.ef-input {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%23007b7f' d='M6 8 0 0h12z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

.ef-btn {
    height: 38px;
    padding: 0 18px;
    border: 0;
    border-radius: 8px;
    background: var(--ef-primary);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s ease, transform .05s ease;
}

.ef-btn:hover { background: var(--ef-primary-dark); }
.ef-btn:active { transform: translateY(1px); }

.ef-btn-clear { min-width: 90px; }

/* ---------- Tabela ---------- */
.ef-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.ef-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    font-size: 13.5px;
}

.ef-table thead th {
    background: var(--ef-light-bg);
    color: var(--ef-primary-dark);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    font-size: 11.5px;
    font-weight: 700;
    text-align: left;
    padding: 12px 14px;
    border-bottom: 1px solid var(--ef-border);
    white-space: nowrap;
}

.ef-table tbody td {
    padding: 12px 14px;
    border-bottom: 1px solid #e6eef0;
    vertical-align: top;
    color: var(--ef-text);
}

.ef-table tbody tr:nth-child(even) td {
    background: var(--ef-row-alt);
}

.ef-table tbody tr:hover td {
    background: #eaf6f7;
}

.ef-td-fiscal {
    font-weight: 600;
    color: var(--ef-text);
    min-width: 200px;
}

.ef-table td:nth-child(4),
.ef-table td:nth-child(5),
.ef-table td:nth-child(6),
.ef-table td:nth-child(7) {
    white-space: nowrap;
}

/* ---------- Badges (cargo) ---------- */
.ef-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
}

.ef-badge-admin {
    background: #e6f4ff;
    color: #114e7a;
    border: 1px solid #c5e2f7;
}

.ef-badge-tec {
    background: #e6faf2;
    color: #0e6b46;
    border: 1px solid #bfeed8;
}

/* ---------- Situação ---------- */
.ef-sit {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 600;
    border: 1px solid transparent;
}

.ef-sit-ok {
    background: #e6faf2;
    color: #0e6b46;
    border-color: #bfeed8;
}

.ef-sit-end {
    background: #fdecec;
    color: #9a1f1f;
    border-color: #f5c2c2;
}

.ef-sit-neutro {
    background: #f1f5f9;
    color: #334155;
    border-color: #dbe2ea;
}

/* ---------- Estado vazio ---------- */
.ef-empty {
    text-align: center;
    padding: 28px 14px;
    color: var(--ef-muted);
    font-style: italic;
}

/* ---------- Footer / Paginação ---------- */
.ef-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 18px;
    background: var(--ef-light-bg);
    border-top: 1px solid var(--ef-border);
}

.ef-info {
    color: var(--ef-muted);
    font-size: 13px;
}

.ef-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ef-page,
.ef-page-nav {
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border-radius: 8px;
    border: 1px solid var(--ef-border);
    background: #fff;
    color: var(--ef-text);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.ef-page:hover:not(.is-active):not(:disabled),
.ef-page-nav:hover:not(:disabled) {
    border-color: var(--ef-primary);
    color: var(--ef-primary);
}

.ef-page.is-active {
    background: var(--ef-primary);
    color: #fff;
    border-color: var(--ef-primary);
    cursor: default;
}

.ef-page:disabled,
.ef-page-nav:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.ef-page-ellipsis {
    align-self: center;
    padding: 0 4px;
    color: var(--ef-muted);
}

/* ---------- Responsivo ---------- */
@media (max-width: 720px) {
    .ef-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    .ef-field-clear {
        margin-left: 0;
    }
    .ef-btn-clear { width: 100%; }
    .ef-header { padding: 16px 16px; }
    .ef-header-title { font-size: 16px; }
    .ef-footer { justify-content: center; }
    .ef-info { width: 100%; text-align: center; }
}
