fluig/compras_digital/forms/Compras_digital/compras_design_system.css
Andrey Cunha a71f963e37 att
2026-05-11 21:54:49 -03:00

245 lines
9.5 KiB
CSS

/**
* compras_design_system.css
* Design system enterprise para o formulário Compras Digital — Ginseng
* Compatível com Fluig 1.8.x (Bootstrap 3 base)
*/
/* ═══════════════════════════════════════════
TOKENS
═══════════════════════════════════════════ */
:root {
--clr-primary: #04506b;
--clr-primary-dark: #033a50;
--clr-primary-light: #e8f4f8;
--clr-success: #0e9f6e;
--clr-warning: #d97706;
--clr-danger: #e02424;
--clr-info: #0694a2;
--clr-neutral: #6b7280;
--clr-bg: #f9fafb;
--clr-surface: #ffffff;
--clr-border: #e5e7eb;
--clr-text: #111827;
--clr-text-muted: #6b7280;
--radius-sm: 4px;
--radius-md: 8px;
--radius-lg: 12px;
--shadow-sm: 0 1px 3px rgba(0,0,0,.08);
--shadow-md: 0 4px 12px rgba(0,0,0,.12);
}
/* ═══════════════════════════════════════════
BADGES DE STATUS
═══════════════════════════════════════════ */
.badge-status {
display: inline-flex;
align-items: center;
gap: 4px;
padding: 3px 10px;
border-radius: 99px;
font-size: 11px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: .4px;
white-space: nowrap;
}
.badge-pending { background: #fef3c7; color: #92400e; }
.badge-approved { background: #d1fae5; color: #065f46; }
.badge-rejected { background: #fee2e2; color: #991b1b; }
.badge-processing { background: #dbeafe; color: #1e40af; }
.badge-blocked { background: #fce7f3; color: #9d174d; }
.badge-waiting { background: #f3f4f6; color: #374151; }
/* ═══════════════════════════════════════════
CARDS
═══════════════════════════════════════════ */
.card-compras {
background: var(--clr-surface);
border: 1px solid var(--clr-border);
border-radius: var(--radius-md);
padding: 16px 20px;
margin-bottom: 16px;
box-shadow: var(--shadow-sm);
}
.card-compras-header {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 12px;
padding-bottom: 12px;
border-bottom: 1px solid var(--clr-border);
}
.card-compras-title {
font-size: 13px;
font-weight: 600;
color: var(--clr-primary);
margin: 0;
text-transform: uppercase;
letter-spacing: .5px;
}
/* ═══════════════════════════════════════════
TABELA ENTERPRISE
═══════════════════════════════════════════ */
.table-compras {
width: 100%;
border-collapse: collapse;
font-size: 13px;
}
.table-compras th {
background: var(--clr-primary-light);
color: var(--clr-primary-dark);
font-weight: 600;
font-size: 12px;
text-transform: uppercase;
letter-spacing: .4px;
padding: 8px 12px;
border-bottom: 2px solid var(--clr-primary);
white-space: nowrap;
}
.table-compras td {
padding: 8px 12px;
border-bottom: 1px solid var(--clr-border);
vertical-align: middle;
color: var(--clr-text);
}
.table-compras tbody tr:hover {
background: var(--clr-primary-light);
transition: background .15s;
}
.table-compras tbody tr:last-child td { border-bottom: none; }
/* ═══════════════════════════════════════════
TIMELINE DE APROVAÇÃO
═══════════════════════════════════════════ */
.approval-timeline {
position: relative;
padding-left: 28px;
}
.approval-timeline::before {
content: "";
position: absolute;
left: 11px; top: 0; bottom: 0;
width: 2px;
background: var(--clr-border);
}
.timeline-step { position: relative; margin-bottom: 20px; }
.timeline-dot {
position: absolute;
left: -28px; top: 2px;
width: 22px; height: 22px;
border-radius: 50%;
border: 2px solid var(--clr-border);
background: var(--clr-surface);
display: flex;
align-items: center;
justify-content: center;
font-size: 10px;
font-weight: 700;
color: var(--clr-neutral);
}
.timeline-step.done .timeline-dot { background: var(--clr-success); border-color: var(--clr-success); color: #fff; }
.timeline-step.active .timeline-dot { background: var(--clr-primary); border-color: var(--clr-primary); color: #fff; }
.timeline-step.blocked .timeline-dot { background: var(--clr-danger); border-color: var(--clr-danger); color: #fff; }
.timeline-step.pending .timeline-dot { background: #fff; border-color: var(--clr-warning); color: var(--clr-warning); }
.timeline-label { font-size: 13px; font-weight: 600; color: var(--clr-text); line-height: 1.3; }
.timeline-meta { font-size: 11px; color: var(--clr-text-muted); margin-top: 2px; }
/* ═══════════════════════════════════════════
EMPTY STATE
═══════════════════════════════════════════ */
.empty-state {
text-align: center;
padding: 32px 16px;
color: var(--clr-text-muted);
}
.empty-state-icon { font-size: 40px; margin-bottom: 12px; opacity: .5; }
.empty-state-title { font-size: 15px; font-weight: 600; color: var(--clr-text); margin-bottom: 4px; }
.empty-state-desc { font-size: 13px; }
/* ═══════════════════════════════════════════
SKELETON LOADING
═══════════════════════════════════════════ */
.skeleton {
background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
background-size: 200% 100%;
animation: skeleton-shimmer 1.4s infinite;
border-radius: var(--radius-sm);
height: 14px;
margin-bottom: 8px;
}
.skeleton-wide { width: 80%; }
.skeleton-short { width: 40%; }
@keyframes skeleton-shimmer {
0% { background-position: 200% 0; }
100% { background-position: -200% 0; }
}
/* ═══════════════════════════════════════════
PAINEL DE STATUS DA SC (existente — melhorado)
═══════════════════════════════════════════ */
.sc-status-panel {
border-radius: var(--radius-lg) !important;
border-color: var(--clr-border) !important;
background: var(--clr-bg) !important;
box-shadow: var(--shadow-sm) !important;
}
.sc-status-panel .sc-field-label {
font-size: 10px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: .5px;
color: var(--clr-text-muted);
margin-bottom: 2px;
}
.sc-status-panel .sc-field-value {
font-size: 13px;
font-weight: 500;
color: var(--clr-text);
}
/* ═══════════════════════════════════════════
WIZARD STEPS (melhorado)
═══════════════════════════════════════════ */
#wizard-steps .step-item {
transition: opacity .2s, transform .2s;
}
#wizard-steps .step-item:not(.done):not(.active) {
opacity: .55;
}
#wizard-steps .step-item.done { color: var(--clr-success); }
#wizard-steps .step-item.active { color: var(--clr-primary); font-weight: 700; }
/* ═══════════════════════════════════════════
FORMULÁRIO — campos do Fluig aprimorados
═══════════════════════════════════════════ */
.has-error .form-control { border-color: var(--clr-danger) !important; }
.errorValidate { border-color: var(--clr-danger) !important; }
.form-control:focus {
border-color: var(--clr-primary) !important;
box-shadow: 0 0 0 2px rgba(4,80,107,.15) !important;
}
/* ═══════════════════════════════════════════
MODAL DE PRODUTOS — aprimorado
═══════════════════════════════════════════ */
#listaProdutos .table th { font-size: 11px; text-transform: uppercase; }
#listaProdutos .table td { font-size: 13px; }
#listaProdutos .btn-success { min-width: 80px; }
/* ═══════════════════════════════════════════
RESPONSIVIDADE
═══════════════════════════════════════════ */
@media (max-width: 768px) {
.sc-primary-grid,
.sc-secondary-grid { grid-template-columns: 1fr 1fr !important; }
.table-compras th,
.table-compras td { padding: 6px 8px; font-size: 12px; }
}
@media (max-width: 480px) {
.sc-primary-grid,
.sc-secondary-grid { grid-template-columns: 1fr !important; }
}