/* ==========================================================================
   SmartContábil — Componentes do design system
   Botões, formulários, alertas, badges, cards, KPIs, tabelas, modais,
   estados vazios, abas, filtros e indicadores.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Botões
   -------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 11px 20px;
    border: 1.5px solid transparent;
    border-radius: var(--radius-md);
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
    transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast);
}

.btn svg { flex: 0 0 auto; }

.btn.primary {
    background: var(--sc-green-700);
    border-color: var(--sc-green-700);
    color: var(--sc-white);
}

.btn.primary:hover {
    background: var(--sc-green-800);
    border-color: var(--sc-green-800);
}

.btn.secondary {
    background: var(--sc-white);
    border-color: var(--sc-border);
    color: var(--sc-text);
}

.btn.secondary:hover {
    border-color: var(--sc-green-700);
    color: var(--sc-green-700);
    background: var(--sc-mint-100);
}

.btn.tech {
    background: var(--sc-blue-600);
    border-color: var(--sc-blue-600);
    color: var(--sc-white);
}

.btn.tech:hover {
    background: var(--sc-blue-700);
    border-color: var(--sc-blue-700);
}

.btn.ghost {
    background: transparent;
    border-color: transparent;
    color: var(--sc-text-muted);
    padding: 10px 14px;
}

.btn.ghost:hover {
    background: var(--sc-graphite-100);
    color: var(--sc-text);
}

.btn.danger {
    background: var(--state-danger);
    border-color: var(--state-danger);
    color: var(--sc-white);
}

.btn.danger:hover { filter: brightness(.94); }

.btn.danger-outline {
    background: var(--sc-white);
    border-color: var(--state-danger-border);
    color: var(--state-danger);
}

.btn.danger-outline:hover { background: var(--state-danger-bg); }

.btn.full { width: 100%; }

.btn.tiny {
    min-height: 32px;
    padding: 6px 12px;
    font-size: 12px;
    border-radius: var(--radius-sm);
}

.btn.small {
    min-height: 38px;
    padding: 8px 14px;
    font-size: 13px;
}

.btn[disabled],
.btn.disabled {
    opacity: .55;
    cursor: not-allowed;
    pointer-events: none;
}

/* Ação textual / link de fluxo */
.text-action,
.link-action {
    border: 0;
    background: transparent;
    padding: 0;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 13px;
    color: var(--sc-blue-600);
    cursor: pointer;
}

.text-action:hover,
.link-action:hover { color: var(--sc-blue-700); text-decoration: underline; }

/* --------------------------------------------------------------------------
   Formulários
   -------------------------------------------------------------------------- */
.login-card label,
.install-panel label,
.modal-card label,
.signup-card label,
.legal-card label,
.wide-card label,
.panel label,
.form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    color: var(--sc-text);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="url"],
input[type="tel"],
input[type="date"],
input[type="month"],
input[type="number"],
select,
textarea,
.table-search {
    width: 100%;
    min-height: 44px;
    padding: 11px 13px;
    border: 1.5px solid var(--sc-border);
    border-radius: var(--radius-md);
    background: var(--sc-white);
    color: var(--sc-text);
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 400;
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

textarea { min-height: 96px; resize: vertical; line-height: 1.6; }

select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2369707A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    cursor: pointer;
}

input:hover,
select:hover,
textarea:hover { border-color: var(--sc-border-strong); }

input:focus,
select:focus,
textarea:focus,
.table-search:focus {
    border-color: var(--sc-green-700);
    box-shadow: 0 0 0 3px rgba(3, 118, 96, .12);
}

input::placeholder,
textarea::placeholder { color: var(--sc-text-soft); }

input[disabled],
select[disabled],
textarea[disabled] {
    background: var(--sc-surface-muted);
    color: var(--sc-text-muted);
    cursor: not-allowed;
}

input[aria-invalid="true"],
.field-error input,
.field-error select {
    border-color: var(--state-danger);
    box-shadow: 0 0 0 3px rgba(200, 74, 72, .12);
}

label small,
.help-text,
.field-hint {
    font-weight: 400;
    font-size: 12px;
    line-height: 1.5;
    color: var(--sc-text-muted);
}

.help-text { margin: 12px 0 0; }

.check {
    flex-direction: row !important;
    align-items: center;
    gap: 9px;
    margin: 0 0 12px !important;
    font-weight: 500 !important;
    cursor: pointer;
}

.check input {
    width: 18px;
    min-height: 18px;
    height: 18px;
    accent-color: var(--sc-green-700);
    flex: 0 0 18px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 20px;
}

.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 2px 0 20px;
    font-size: 13px;
}

.form-options a { color: var(--sc-blue-600); font-weight: 500; }
.form-options a:hover { color: var(--sc-blue-700); text-decoration: underline; }

.table-search {
    max-width: 300px;
    min-height: 40px;
    padding: 9px 12px 9px 34px;
    background-color: var(--sc-surface-muted);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23B5B8C0' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.6-3.6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 11px center;
    font-size: 13px;
}

/* Barra de filtros padrão */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 14px;
    padding: 16px 20px;
    background: var(--sc-white);
    border: 1px solid var(--sc-border);
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
}

.filter-bar label { margin-bottom: 0; font-size: 12px; }
.filter-bar .btn { min-height: 40px; }

.filter-chips { display: flex; flex-wrap: wrap; gap: 8px; }

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: var(--radius-pill);
    background: var(--sc-mint-100);
    border: 1px solid var(--sc-mint-300);
    color: var(--sc-green-700);
    font-size: 12px;
    font-weight: 600;
}

/* --------------------------------------------------------------------------
   Alertas e banners
   -------------------------------------------------------------------------- */
.alert {
    display: flex;
    gap: 10px;
    padding: 13px 16px;
    margin: 0 0 18px;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    font-size: 13.5px;
    line-height: 1.55;
}

.alert.error,
.alert.danger {
    background: var(--state-danger-bg);
    border-color: var(--state-danger-border);
    color: #90322F;
}

.alert.success {
    background: var(--state-success-bg);
    border-color: var(--state-success-border);
    color: #0F6B45;
}

.alert.warning {
    background: var(--state-warning-bg);
    border-color: var(--state-warning-border);
    color: #8A5A00;
}

.alert.info {
    background: var(--state-info-bg);
    border-color: var(--state-info-border);
    color: #0B4BB0;
}

.release-banner {
    margin: 0 0 18px;
    padding: 12px 16px;
    border: 1px solid var(--sc-border);
    border-radius: var(--radius-md);
    background: var(--sc-white);
    font-size: 13px;
    color: var(--sc-text);
}

.release-banner a {
    font-weight: 600;
    color: var(--sc-blue-600);
    text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Badges e indicadores de estado
   -------------------------------------------------------------------------- */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    font-family: var(--font-body);
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .01em;
    white-space: nowrap;
    background: var(--state-neutral-bg);
    color: var(--state-neutral);
}

.status-pill::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    flex: 0 0 6px;
}

.status-pill.success,
.status-pill.ok,
.status-pill.completed { background: var(--state-success-bg); color: #0F6B45; }

.status-pill.warning,
.status-pill.attention { background: var(--state-warning-bg); color: #8A5A00; }

.status-pill.danger,
.status-pill.critical,
.status-pill.overdue { background: var(--state-danger-bg); color: #99332F; }

.status-pill.info,
.status-pill.processing,
.status-pill.in-progress { background: var(--state-info-bg); color: #0B4BB0; }

.status-pill.neutral,
.status-pill.draft,
.status-pill.development,
.status-pill.pending { background: var(--state-neutral-bg); color: var(--state-neutral); }

.status-pill.brand { background: var(--sc-mint-100); color: var(--sc-green-700); }

.dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
    background: var(--sc-graphite-300);
}

.green-dot { background: var(--sc-green-700); }
.mint-dot { background: var(--sc-mint-500); }
.blue-dot { background: var(--sc-blue-600); }
.amber-dot { background: var(--state-warning); }
.red-dot { background: var(--state-danger); }

/* Progresso */
.progress {
    height: 8px;
    border-radius: var(--radius-pill);
    background: var(--sc-graphite-100);
    overflow: hidden;
}

.progress > i,
.bar > i {
    display: block;
    height: 100%;
    border-radius: var(--radius-pill);
    background: var(--sc-green-700);
    transition: width var(--transition-base);
}

.bar {
    height: 8px;
    border-radius: var(--radius-pill);
    background: var(--sc-graphite-100);
    overflow: hidden;
}

/* --------------------------------------------------------------------------
   Cabeçalho de página
   -------------------------------------------------------------------------- */
.page-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

.page-heading h1 {
    font-size: 28px;
    line-height: 1.15;
    margin: 6px 0 4px;
}

.page-heading p {
    margin: 0;
    font-size: 14px;
    color: var(--sc-text-muted);
    max-width: 70ch;
}

.page-heading-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   Cards e painéis
   -------------------------------------------------------------------------- */
.panel,
.card {
    position: relative;
    background: var(--sc-white);
    border: 1px solid var(--sc-border);
    border-radius: var(--radius-lg);
    padding: 22px;
    min-width: 0;
    box-shadow: var(--shadow-xs);
}

.panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.panel-head h2 {
    font-size: 17px;
    font-weight: 600;
    margin: 0;
}

.panel-head p {
    margin: 3px 0 0;
    font-size: 12.5px;
    color: var(--sc-text-muted);
}

.panel-head > a {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 600;
    color: var(--sc-blue-600);
    white-space: nowrap;
}

.panel-head > a:hover { color: var(--sc-blue-700); text-decoration: underline; }

.card-subtle {
    background: var(--sc-mint-100);
    border-color: var(--sc-mint-300);
}

.card-dark {
    position: relative;
    overflow: hidden;
    background: var(--sc-graphite-900);
    border-color: var(--sc-graphite-900);
    color: var(--sc-white);
}

.card-dark h2,
.card-dark h3 { color: var(--sc-white); }
.card-dark p { color: var(--sc-graphite-300); }

/* Hero de módulo (cabeçalho institucional das centrais) */
.module-hero {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 26px 28px;
    margin-bottom: 24px;
    border-radius: var(--radius-lg);
    background: linear-gradient(120deg, var(--sc-graphite-900), var(--sc-graphite-800));
    color: var(--sc-white);
}

.module-icon {
    width: 60px;
    height: 60px;
    flex: 0 0 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-lg);
    background: rgba(134, 210, 191, .14);
    color: var(--sc-mint-500);
    font-size: 24px;
}

.module-hero h2 { margin: 0; color: var(--sc-white); }
.module-hero p { margin: 5px 0 0; color: var(--sc-graphite-300); font-size: 13.5px; }

.module-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: none; }

/* --------------------------------------------------------------------------
   KPIs
   -------------------------------------------------------------------------- */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.kpi-grid article {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px;
    background: var(--sc-white);
    border: 1px solid var(--sc-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs);
    transition: box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.kpi-grid article:hover {
    box-shadow: var(--shadow-sm);
    border-color: var(--sc-border-strong);
}

.kpi-icon {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 600;
    background: var(--sc-graphite-100);
    color: var(--sc-graphite-700);
}

.kpi-icon.green { background: var(--sc-mint-100); color: var(--sc-green-700); }
.kpi-icon.mint { background: var(--sc-mint-100); color: var(--sc-green-600); }
.kpi-icon.blue { background: var(--sc-blue-100); color: var(--sc-blue-600); }
.kpi-icon.amber { background: var(--state-warning-bg); color: var(--state-warning); }
.kpi-icon.navy,
.kpi-icon.graphite { background: var(--sc-graphite-100); color: var(--sc-graphite-900); }
.kpi-icon.red-soft,
.kpi-icon.danger { background: var(--state-danger-bg); color: var(--state-danger); }

.kpi-grid article > div { min-width: 0; }

.kpi-grid span,
.kpi-grid small,
.kpi-grid strong { display: block; }

.kpi-grid span {
    font-size: 12.5px;
    color: var(--sc-text-muted);
}

.kpi-grid strong {
    font-family: var(--font-display);
    font-size: clamp(19px, 1.5vw, 25px);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -.02em;
    color: var(--sc-text);
    font-variant-numeric: tabular-nums;
    overflow-wrap: break-word;
}

.kpi-grid small {
    font-size: 11.5px;
    color: var(--sc-text-soft);
}

/* --------------------------------------------------------------------------
   Tabelas
   -------------------------------------------------------------------------- */
.table-wrap {
    overflow-x: auto;
    border-radius: var(--radius-md);
}

.table-wrap table {
    width: 100%;
    min-width: 700px;
    border-collapse: collapse;
}

.table-wrap th,
.table-wrap td {
    text-align: left;
    padding: 13px 12px;
    border-bottom: 1px solid var(--sc-line);
    font-size: 13px;
    vertical-align: middle;
}

.table-wrap thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--sc-surface-muted);
    border-bottom: 1px solid var(--sc-border);
    font-family: var(--font-body);
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--sc-graphite-500);
    white-space: nowrap;
}

.table-wrap tbody tr { transition: background var(--transition-fast); }
.table-wrap tbody tr:hover td { background: var(--sc-surface-muted); }
.table-wrap tbody tr:last-child td { border-bottom: 0; }

.table-wrap td strong,
.table-wrap td small { display: block; }

.table-wrap td strong {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--sc-text);
}

.table-wrap td small {
    font-size: 11.5px;
    color: var(--sc-text-muted);
}

.table-wrap td.num,
.table-wrap th.num { text-align: right; font-variant-numeric: tabular-nums; }

.row-actions { display: flex; gap: 6px; flex-wrap: nowrap; white-space: nowrap; }
.table-wrap td:first-child { min-width: 160px; }

.icon-action {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 10px;
    border: 1px solid var(--sc-border);
    border-radius: var(--radius-sm);
    font-size: 11.5px;
    font-weight: 600;
    color: var(--sc-text);
    background: var(--sc-white);
    transition: all var(--transition-fast);
}

.icon-action:hover {
    border-color: var(--sc-green-700);
    background: var(--sc-mint-100);
    color: var(--sc-green-700);
}

.empty {
    text-align: center !important;
    padding: 36px !important;
    color: var(--sc-text-muted);
}

/* --------------------------------------------------------------------------
   Estados vazios
   -------------------------------------------------------------------------- */
.empty-card,
.empty-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 32px 24px;
    text-align: center;
    border: 1px dashed var(--sc-border-strong);
    border-radius: var(--radius-lg);
    background: var(--sc-surface-muted);
    color: var(--sc-text-muted);
    font-size: 13px;
}

.empty .empty-state {
    border: 0;
    background: transparent;
    padding: 0;
}

.empty-state .btn { margin-top: 10px; }

.empty-state .brand-graphism-empty {
    position: static;
    width: 120px;
    height: 90px;
    opacity: .5;
    margin-bottom: 4px;
}

.empty-state strong {
    font-family: var(--font-display);
    font-size: 15px;
    color: var(--sc-text);
}

/* --------------------------------------------------------------------------
   Abas / segmented control
   -------------------------------------------------------------------------- */
.segmented {
    display: inline-flex;
    gap: 3px;
    padding: 3px;
    background: var(--sc-surface-muted);
    border: 1px solid var(--sc-border);
    border-radius: var(--radius-md);
}

.segmented a,
.segmented button {
    padding: 7px 14px;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    font-size: 13px;
    font-weight: 500;
    color: var(--sc-text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.segmented a.active,
.segmented button.active {
    background: var(--sc-white);
    color: var(--sc-text);
    font-weight: 600;
    box-shadow: var(--shadow-xs);
}

/* --------------------------------------------------------------------------
   Radar de compliance (donut) e listas de apoio
   -------------------------------------------------------------------------- */
.compliance-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    padding: 8px 0;
    flex-wrap: wrap;
}

.donut {
    position: relative;
    width: 168px;
    height: 168px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: conic-gradient(var(--sc-green-700) calc(var(--value) * 1%), var(--sc-graphite-100) 0);
}

.donut::before {
    content: "";
    position: absolute;
    width: 124px;
    height: 124px;
    border-radius: 50%;
    background: var(--sc-white);
}

.donut > div { position: relative; text-align: center; }

.donut strong,
.donut span { display: block; }

.donut strong {
    font-family: var(--font-display);
    font-size: 30px;
    font-weight: 700;
    color: var(--sc-text);
    font-variant-numeric: tabular-nums;
}

.donut span { font-size: 11px; color: var(--sc-text-muted); }

.compliance-list { min-width: 200px; }

.compliance-list div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 11px 0;
    border-bottom: 1px solid var(--sc-line);
    font-size: 13px;
}

.compliance-list div:last-child { border-bottom: 0; }
.compliance-list strong { font-family: var(--font-display); font-variant-numeric: tabular-nums; }

.action-list { display: flex; flex-direction: column; gap: 10px; }

.action-list a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px;
    border: 1px solid var(--sc-border);
    border-radius: var(--radius-md);
    background: var(--sc-white);
    transition: all var(--transition-fast);
}

.action-list a:hover {
    border-color: var(--sc-green-700);
    background: var(--sc-mint-100);
}

.action-list > a > span {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    background: var(--sc-mint-100);
    color: var(--sc-green-700);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 13px;
}

.action-list strong,
.action-list small { display: block; }
.action-list strong { font-size: 13px; }
.action-list small { font-size: 11.5px; color: var(--sc-text-muted); }

/* --------------------------------------------------------------------------
   Modais
   -------------------------------------------------------------------------- */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100;
}

.modal.open {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

body.modal-open { overflow: hidden; }

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(28, 30, 34, .55);
    backdrop-filter: blur(3px);
}

.modal-card {
    position: relative;
    width: min(760px, 100%);
    max-height: 90vh;
    overflow: auto;
    padding: 26px;
    background: var(--sc-white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}

.modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.modal-head h2 { margin: 0; font-size: 19px; }
.modal-head p { margin: 4px 0 0; font-size: 12.5px; color: var(--sc-text-muted); }

.modal-head button {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border: 1px solid var(--sc-border);
    border-radius: 50%;
    background: var(--sc-surface-muted);
    color: var(--sc-text-muted);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

.modal-head button:hover { background: var(--sc-graphite-100); color: var(--sc-text); }

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 12px;
}

/* --------------------------------------------------------------------------
   Componentes legados mantidos (assistentes e destaques)
   -------------------------------------------------------------------------- */
.ai-badge {
    display: inline-flex;
    padding: 4px 8px;
    border-radius: var(--radius-xs);
    background: var(--sc-mint-100);
    color: var(--sc-green-700);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .04em;
}

.ai-card { text-align: center; padding: 10px; }

.ai-orb {
    width: 66px;
    height: 66px;
    margin: 6px auto 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 35% 35%, var(--sc-mint-500), var(--sc-green-700));
    color: var(--sc-white);
    font-size: 26px;
}

.ai-card p { font-size: 12.5px; color: var(--sc-text-muted); }

/* --------------------------------------------------------------------------
   Responsivo
   -------------------------------------------------------------------------- */
@media (max-width: 1100px) {
    .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
    .page-heading { flex-direction: column; align-items: stretch; }
    .panel { padding: 18px; }
    .filter-bar { padding: 14px; }
    .compliance-wrap { flex-direction: column; gap: 20px; }
}

@media (max-width: 620px) {
    .kpi-grid,
    .module-grid,
    .form-grid { grid-template-columns: 1fr; }
    .page-heading h1 { font-size: 24px; }
    .page-heading .btn,
    .page-heading-actions .btn { width: 100%; }
    .panel { padding: 16px; }
    .table-search { max-width: none; }
    .modal.open { padding: 0; align-items: flex-end; }
    .modal-card {
        width: 100%;
        max-height: 92vh;
        border-radius: var(--radius-xl) var(--radius-xl) 0 0;
        padding: 20px;
    }
}
