/* ============================================================
   BASE.CSS — Tokens de design, reset e tipografia global
   Importado por: dashboard.css, login.css, pages.css, public.css
   ============================================================ */

/* ---- TOKENS ---- */
:root {
    /* Marca */
    --brand:           #fe0000;
    --brand-hover:     #cc0000;
    --brand-subtle:    rgba(254, 0, 0, 0.1);

    /* Sidebar (dark, estilo Slack) */
    --sb-bg:           #1a1d21;
    --sb-bg-hover:     #27292d;
    --sb-bg-active:    #27292d;
    --sb-border:       rgba(255,255,255,0.07);
    --sb-text:         #c9cdd3;
    --sb-text-muted:   #7a7f87;
    --sb-text-active:  #ffffff;
    --sb-header-bg:    #111316;
    --sb-width:        256px;

    /* Conteudo principal (claro) */
    --bg-base:         #f8f8f8;
    --bg-surface:      #ffffff;
    --bg-elevated:     #f2f2f2;
    --border-light:    #e8e8e8;
    --text-primary:    #1a1a1a;
    --text-secondary:  #555;
    --text-muted:      #888;

    /* 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: #10b981; }
.badge-danger  { background: #ef4444; }
.badge-warning { background: #e8a020; }

/* ---- ALERTAS ---- */
.alert-info {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    color: #0c4a6e;
    border-radius: var(--radius-sm);
    padding: 14px 16px;
}
.alert-danger {
    background: #fee2e2;
    color: #991b1b;
    border-radius: var(--radius-sm);
    padding: 11px 14px;
}
.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border-radius: var(--radius-sm);
    padding: 14px 16px;
}
.alert-success {
    background: #d1fae5;
    color: #065f46;
    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: #e8e8e8; 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: #e0f2fe; color: #0369a1; }
.btn-icon.edit:hover   { background: #0369a1; color: white; }
.btn-icon.delete { background: #fee2e2; color: #991b1b; }
.btn-icon.delete:hover { background: #991b1b; 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: #fafafa; }
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 #f4f4f4;
    color: var(--text-primary);
    font-size: 14px;
}
tbody tr:hover { background: #fafafa; }

/* ---- STATUS BADGES ---- */
.status-badge { padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; display: inline-block; }
.status-ativo   { background: #d1fae5; color: #065f46; }
.status-inativo { background: #fee2e2; color: #991b1b; }

/* ---- MODAL ---- */
.modal-content {
    border-radius: var(--radius-lg);
    border: none;
    box-shadow: 0 12px 40px rgba(0,0,0,0.18);
}
.modal-header {
    border-bottom: 1px solid var(--border-light);
    padding: 20px 24px;
    background: #fafafa;
    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: #f4f4f4;
    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;
}
