/* ============================================================
   COMPONENTES.CSS — Tokens de design, reset, tipografia e componentes globais
   Importado por: layout.css, login.css, views/*.css
   ============================================================ */

/* ---- TOKENS ---- */
/* Cores vem de marca.css — aqui ficam apenas aliases e tokens nao-cor */
:root {
    /* Aliases de marca (retrocompat) */
    --brand:           var(--marca-primaria);
    --brand-hover:     var(--marca-primaria-hover);
    --brand-subtle:    var(--marca-alpha-10);

    /* Sidebar width (unico token nao definido em marca.css) */
    --sb-width:        256px;

    /* Raios */
    --radius-sm:       6px;
    --radius:          10px;
    --radius-lg:       14px;
}

/* ---- RESET ---- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, sans-serif;
}

body {
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
}

/* ---- UTILITARIOS DE TEXTO ---- */
.text-muted, small.text-muted {
    color: var(--text-muted) !important;
    font-size: 13px;
}

/* ---- BADGES ---- */
.badge {
    background: var(--brand);
    color: white;
    padding: 3px 10px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 12px;
}
.badge-success { background: var(--sucesso); }
.badge-danger  { background: var(--erro); }
.badge-warning { background: var(--aviso-badge); }

/* ---- ALERTAS ---- */
.alert-info {
    background: var(--info-bg);
    border: 1px solid var(--info-border);
    color: var(--info-text);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
}
.alert-danger {
    background: var(--erro-bg);
    color: var(--erro-text);
    border-radius: var(--radius-sm);
    padding: 11px 14px;
}
.alert-warning {
    background: var(--aviso-bg);
    color: var(--aviso-text);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
}
.alert-success {
    background: var(--sucesso-bg);
    color: var(--sucesso-text);
    border-radius: var(--radius-sm);
    padding: 11px 14px;
}

/* ---- BOTOES GLOBAIS ---- */
.btn-primary {
    background: var(--brand);
    border: none;
    border-radius: var(--radius-sm);
    padding: 9px 18px;
    font-weight: 600;
    font-size: 13px;
    color: white !important;
    transition: background 0.15s;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: inherit;
}
.btn-primary:hover { background: var(--brand-hover); color: white !important; }

.btn-secondary {
    background: var(--bg-elevated);
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
    padding: 9px 18px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: inherit;
    transition: background 0.15s;
}
.btn-secondary:hover { background: var(--border-light); color: var(--text-primary); }

.btn-view {
    background: var(--brand);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 13px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.15s;
    cursor: pointer;
    font-family: inherit;
}
.btn-view:hover { background: var(--brand-hover); color: white; }

.btn-disabled {
    background: var(--bg-elevated);
    color: var(--text-muted);
    border: 1px solid var(--border-light);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 13px;
    cursor: not-allowed;
}

/* ---- ICONE-BOTOES (editar/excluir) ---- */
.action-btns { display: flex; gap: 6px; }

.btn-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
    font-size: 15px;
}
.btn-icon.edit   { background: var(--acao-editar-bg); color: var(--acao-editar-cor); }
.btn-icon.edit:hover   { background: var(--acao-editar-cor); color: white; }
.btn-icon.delete { background: var(--acao-excluir-bg); color: var(--acao-excluir-cor); }
.btn-icon.delete:hover { background: var(--acao-excluir-cor); color: white; }

/* ---- FORMULARIOS ---- */
.form-label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 13px;
    margin-bottom: 6px;
    display: block;
}

.form-control {
    border: 1px solid var(--border-light);
    background: var(--bg-surface);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 14px;
    transition: border-color 0.15s;
    width: 100%;
    color: var(--text-primary);
    font-family: inherit;
}
.form-control:focus { outline: none; border-color: var(--brand); }

/* ---- TABELA ---- */
table { width: 100%; border-collapse: collapse; }
thead { background: var(--bg-subtle); }
thead th {
    padding: 13px 18px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-light);
}
tbody td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-lighter);
    color: var(--text-primary);
    font-size: 14px;
}
tbody tr:hover { background: var(--bg-subtle); }

/* ---- STATUS BADGES ---- */
.status-badge { padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; display: inline-block; }
.status-ativo   { background: var(--status-ativo-bg); color: var(--status-ativo-text); }
.status-inativo { background: var(--status-inativo-bg); color: var(--status-inativo-text); }

/* ---- MODAL ---- */
.modal-content {
    border-radius: var(--radius-lg);
    border: none;
    box-shadow: 0 12px 40px var(--sombra-lg);
}
.modal-header {
    border-bottom: 1px solid var(--border-light);
    padding: 20px 24px;
    background: var(--bg-subtle);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.modal-title { font-weight: 700; color: var(--text-primary); font-size: 17px; }
.modal-body  { padding: 22px 24px; }
.modal-footer { border-top: 1px solid var(--border-light); padding: 14px 24px; }
.modal-xl-custom { max-width: 900px; }

/* ---- ANIMACAO ---- */
.content-section { animation: fadeIn 0.2s ease; }
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---- MISC ---- */
.url-box {
    background: var(--bg-url-box);
    border: 1px solid var(--border-light);
    padding: 9px 13px;
    border-radius: var(--radius-sm);
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 10px;
    word-break: break-all;
}
