/* ============================================================
   base.css — Complice Manager v2.0
   Variáveis globais, reset, modais, badges, toast, forms
   ============================================================ */

/* ── Variáveis ── */
:root {
    --nav-bg: #1a2332;
    --panel-bg: #f0f2f5;
    --accent: #3b82f6;
    --accent-soft: #eff6ff;
    --border: #e2e6ea;
    --text-primary: #1e293b;
    --text-muted: #64748b;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
}

/* ── Reset ── */
* { box-sizing: border-box; }

body {
    font-family: 'DM Sans', sans-serif;
    background: #f8fafc;
    margin: 0;
    display: flex;
    height: 100vh;
    overflow: hidden;
    color: var(--text-primary);
}

/* ── Status Badges ── */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
}

.status-badge.pendente      { background: #f1f5f9; color: #64748b; }
.status-badge.em_revisao    { background: #fef3c7; color: #d97706; }
.status-badge.aprovado      { background: #d1fae5; color: #065f46; }
.status-badge.rejeitado     { background: #fee2e2; color: #dc2626; }
.status-badge.rascunho      { background: #f1f5f9; color: #64748b; }
.status-badge.em_andamento  { background: #dbeafe; color: #1d4ed8; }
.status-badge.concluida     { background: #d1fae5; color: #065f46; }
.status-badge.respondida    { background: #d1fae5; color: #065f46; }
.status-badge.nao_aplicavel { background: #fef3c7; color: #d97706; }

/* ── Empty State ── */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}
.empty-state i { font-size: 32px; margin-bottom: 12px; display: block; opacity: 0.4; }
.empty-state p { margin: 0; font-size: 14px; }

/* ── Modais ── */
.modal-content {
    border: none;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}
.modal-header { border-bottom: 1px solid var(--border); padding: 20px 24px 16px; }
.modal-body   { padding: 20px 24px; }
.modal-footer { border-top: 1px solid var(--border); padding: 16px 24px; }

/* ── Forms ── */
.form-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.form-label-custom {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 6px;
    display: block;
}

.form-control {
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    border-radius: 8px;
    border-color: var(--border);
}
.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-control-custom {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    font-family: 'DM Sans', sans-serif;
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.2s;
    resize: vertical;
}
.form-control-custom:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-select-custom {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    font-family: 'DM Sans', sans-serif;
    color: var(--text-primary);
    outline: none;
    background: #fff;
    transition: border-color 0.2s;
}
.form-select-custom:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* ── Botões ── */
.btn-icon {
    width: 30px;
    height: 30px;
    border-radius: 7px;
    border: 1px solid var(--border);
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.15s;
    text-decoration: none;
}
.btn-icon:hover          { background: var(--accent); border-color: var(--accent); color: #fff !important; }
.btn-icon.success        { color: var(--success); border-color: var(--success); }
.btn-icon.success:hover  { background: var(--success); border-color: var(--success); color: #fff !important; }
.btn-icon.warning        { color: var(--warning); border-color: var(--warning); }
.btn-icon.warning:hover  { background: var(--warning); border-color: var(--warning); color: #fff !important; }
.btn-icon.danger         { color: var(--danger); border-color: var(--danger); }
.btn-icon.danger:hover   { background: var(--danger); border-color: var(--danger); color: #fff !important; }

.btn-primary-custom {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s;
}
.btn-primary-custom:hover { background: #2563eb; }

.btn-secondary-custom {
    background: #fff;
    color: var(--text-primary);
    border: 1px solid var(--border);
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}
.btn-secondary-custom:hover { border-color: var(--accent); color: var(--accent); }

/* ── Toast ── */
.toast-wrap {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.toast-item {
    background: #1e293b;
    color: #fff;
    padding: 12px 18px;
    border-radius: 10px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    animation: slideIn 0.25s ease;
}
.toast-item.success { border-left: 3px solid var(--success); }
.toast-item.error   { border-left: 3px solid var(--danger); }

@keyframes slideIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Timeline ── */
.timeline { position: relative; padding-left: 28px; }
.timeline::before {
    content: '';
    position: absolute;
    left: 9px; top: 0; bottom: 0;
    width: 2px;
    background: #e2e8f0;
}
.timeline-item { position: relative; margin-bottom: 20px; }
.timeline-item:last-child { margin-bottom: 0; }

.timeline-dot {
    position: absolute;
    left: -24px;
    top: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px #e2e8f0;
}
.timeline-dot.upload    { background: #3b82f6; color: #fff; }
.timeline-dot.revisao   { background: #f59e0b; color: #fff; }
.timeline-dot.aprovado  { background: #10b981; color: #fff; }
.timeline-dot.rejeitado { background: #ef4444; color: #fff; }
.timeline-dot.pendente  { background: #e2e8f0; color: #94a3b8; }

.timeline-label { font-size: 12px; font-weight: 600; color: var(--text-primary); }
.timeline-meta  { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.timeline-item.pending .timeline-label { color: #94a3b8; }

/* ── Upload Zone ── */
.upload-zone {
    border: 2px dashed var(--border);
    border-radius: 10px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #fafbfc;
}
.upload-zone:hover,
.upload-zone.dragover   { border-color: var(--accent); background: var(--accent-soft); }
.upload-zone i          { font-size: 28px; color: var(--text-muted); margin-bottom: 8px; display: block; }
.upload-zone p          { margin: 0; font-size: 13px; color: var(--text-muted); }
.upload-zone .file-selected { font-size: 13px; font-weight: 500; color: var(--accent); margin-top: 4px; }

/* ── Progress Bar Genérica ── */
.progress-bar-wrap {
    height: 6px;
    background: #f1f5f9;
    border-radius: 99px;
    overflow: hidden;
}
.progress-bar-fill {
    height: 100%;
    border-radius: 99px;
    transition: width 0.8s ease;
}
input[type="month"].form-control-custom {
    -webkit-appearance: auto;
    appearance: auto;
    resize: none;
    cursor: pointer;
    padding: 8px 12px;
}