/* Classes utility para substituir style="..." inline e permitir dropar
   style-src 'unsafe-inline' do CSP. */

/* Text alignment */
.u-text-center  { text-align: center !important; }
.u-text-right   { text-align: right !important; }
.u-text-justify { text-align: justify !important; }

/* Display + flex */
.u-d-inline           { display: inline !important; }
.u-d-flex-center      { display: flex; align-items: center; gap: 8px; }
.u-d-flex-wrap-10     { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.u-d-contents         { display: contents; }
.u-overflow-x-auto    { overflow-x: auto; }

/* Sizes / cells */
.u-cell-trunc-130 { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.u-cell-trunc-120 { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.u-max-w-760      { max-width: 760px; }
.u-grid-full      { grid-column: 1 / -1; }
.u-empty-pad      { padding: 32px; text-align: center; }
.u-pad-20-center  { text-align: center; color: #9ca3af; padding: 20px; }
.u-pad-24-center  { text-align: center; color: #6b7280; padding: 24px; font-size: .83rem; }

/* Font weights */
.u-fw-500 { font-weight: 500 !important; }
.u-fw-600 { font-weight: 600 !important; }
.u-fw-700 { font-weight: 700 !important; }

/* Font sizes */
.u-fs-60 { font-size: .6rem !important; }
.u-fs-65 { font-size: .65rem !important; }
.u-fs-70 { font-size: .7rem !important; }
.u-fs-72 { font-size: .72rem !important; }
.u-fs-75 { font-size: .75rem !important; }
.u-fs-78 { font-size: .78rem !important; }
.u-fs-83 { font-size: .83rem !important; }
.u-fs-88 { font-size: .88rem !important; }
.u-fs-90 { font-size: .9rem !important; }
.u-fs-95 { font-size: .95rem !important; }

/* Colors */
.u-c-muted    { color: #9ca3af !important; }
.u-c-muted-2  { color: #6b7280 !important; }
.u-c-text     { color: #374151 !important; }
.u-c-brand    { color: #1a237e !important; }
.u-c-brand-2  { color: #1565c0 !important; }
.u-c-brand-3  { color: #4a6fa5 !important; }
.u-c-success  { color: #2e7d32 !important; }
.u-c-danger   { color: #b71c1c !important; }
.u-c-warn     { color: #f57f17 !important; }
.u-c-var-brand   { color: var(--brand, #0d6efd) !important; }
.u-c-var-success { color: var(--success-c, #198754) !important; }
.u-c-var-muted   { color: var(--muted, #6b7280) !important; }

/* Backgrounds */
.u-bg-info-soft    { background: #e3f2fd; color: #1565c0; }
.u-bg-brand-soft   { background: #e8eaf6; color: #1a237e; }
.u-bg-dashed-soft  { border: 1.5px dashed #e9ecef; background: #fafbfc; }
.u-bg-f8f9fa       { background-color: #f8f9fa; }

/* Spacing / wraps */
.u-no-wrap   { white-space: nowrap; }
.u-no-deco   { text-decoration: none; }
.u-mr-8      { margin-right: 8px; }
.u-mt-1      { margin-top: 4px; }
.u-rad-8     { border-radius: 8px; }
.u-rad-14    { border-radius: 14px; }
.u-rad-14-top{ border-radius: 14px 14px 0 0; }

/* Stick top */
.u-sticky-14 { position: sticky; top: 14px; z-index: 100; }

/* Italic variant for unassigned */
.u-italic-muted { font-style: italic; color: var(--muted, #6b7280); }

/* Card panel head */
.u-panel-head-row {
    padding: 14px 18px;
    border-bottom: 1px solid #f0f2f4;
    background: #fafbfc;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.u-panel-body-grid2 {
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 16px;
}

/* Empty-state visual (icon + text) — usada como wrapper */
.u-empty-icon-block {
    font-size: 2rem;
    color: #d1d5db;
    display: block;
    margin-bottom: 10px;
}

/* Composite: text-center + color #2e7d32 + bold */
.u-success-bold-center {
    text-align: center;
    color: #2e7d32;
    font-weight: 600;
}

/* Composite combo small muted nowrap */
.u-cell-meta {
    font-size: .75rem;
    color: #9ca3af;
    white-space: nowrap;
}

/* Progress bars - allow dynamic width via CSS variable set by JS */
.u-progress[data-style-width] { width: 0; }
.u-progress { transition: width .3s; }

/* Additional utility classes — round 2 */
.u-fs-45 { font-size: .45rem !important; }
.u-fs-50 { font-size: .5rem !important; }
.u-fs-68 { font-size: .68rem !important; }
.u-fs-82 { font-size: .82rem !important; }

.u-bg-danger    { background: #b71c1c !important; color: #fff; }
.u-bg-success   { background: #2e7d32 !important; color: #fff; }
.u-bg-success-soft-left {
    border-left: 3px solid #2e7d32;
    background: #f1f8e9;
}
.u-border-left-success-2 { border-left: 2px solid #2e7d32; }
.u-c-success-22 { color: #22c55e !important; }

.u-brand-bold { color: #1a237e !important; font-weight: 800 !important; }
.u-fs-82-fade { font-size: .82rem !important; opacity: .7 !important; }

.u-callout-soft {
    background: #f8f9fc;
    border-radius: 8px;
    padding: 12px;
    border: 1px solid #eef0f7;
    line-height: 1.7;
}
.u-brand-chip {
    background: #e8eaf6;
    color: #1a237e;
    font-size: .75rem;
}

.u-detail-actions {
    border-top: 1px solid var(--border, #e5e7eb);
    padding: 14px 20px;
    gap: 8px;
}
.u-meta-line {
    font-size: .83rem;
    color: var(--muted, #6b7280);
    margin-bottom: 12px;
}
.u-mt-14 { margin-top: 14px !important; }
.u-mb-6  { margin-bottom: 6px !important; }

.u-section-divider {
    border-bottom: 1px solid var(--border, #e5e7eb);
    padding: 16px 20px;
}
.u-title-95 {
    font-size: .95rem;
    font-weight: 700;
    color: var(--text, #1f2937);
}
.u-meta-tiny {
    font-size: .7rem;
    color: var(--muted, #6b7280);
}
.u-jakarta-base {
    border: none;
    border-radius: var(--radius, 12px);
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.u-thumb-photo {
    max-width: 100%;
    max-height: 300px;
    cursor: pointer;
}

/* Index.html cards: avatares coloridos */
.u-icon-circle-48 {
    min-width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: 800;
}
.u-icon-circle-48.red    { background: #fce4ec; color: #b71c1c; }
.u-icon-circle-48.green  { background: #e8f5e9; color: #2e7d32; }
.u-icon-circle-48.brand  { background: #e8eaf6; color: #1a237e; }
.u-icon-circle-48.amber  { background: #fff3e0; color: #e65100; }
.u-icon-circle-48.purple { background: #f3e5f5; color: #6a1b9a; }
.u-icon-circle-48.warn   { background: #fff8e1; color: #f57f17; }

/* Backgrounds soft */
.u-bg-info-soft-no-text  { background: #e3f2fd; }
.u-bg-success-soft-no-text { background: #e8f5e9; }
.u-bg-amber-soft         { background: #fff3e0; }
.u-bg-warn-soft          { background: #fff8e1; }
.u-bg-purple-soft        { background: #f3e5f5; }
.u-bg-pink-soft          { background: #fce4ec; }
.u-bg-brand-soft-no-text { background: #e8eaf6; }
.u-bg-info-text-blue     { background: #e3f2fd; color: #0d47a1; }
.u-bg-amber-text-orange  { background: #fff3e0; color: #e65100; }
.u-bg-warn-text-amber    { background: #fff8e1; color: #f57f17; }
.u-bg-success-text       { background: #e8f5e9; color: #2e7d32; }
.u-bg-pink-text          { background: #fce4ec; color: #b71c1c; }
.u-bg-purple-text        { background: #f3e5f5; color: #6a1b9a; }

.u-c-orange  { color: #e65100 !important; }
.u-c-amber   { color: #f57f17 !important; }
.u-c-purple  { color: #6a1b9a !important; }
.u-c-blue-dark { color: #0d47a1 !important; }

/* lista_chamados specific combos */
.u-active-chip {
    background: var(--accent, #dc3545);
    color: #fff;
    font-size: .62rem;
    padding: 1px 7px;
    border-radius: 10px;
    margin-left: 4px;
}
.u-af-chip-remove {
    background: var(--accent-lit, #ffebee);
    color: var(--accent, #dc3545);
}
.u-cell-date {
    font-size: .76rem;
    color: var(--muted, #6b7280);
    white-space: nowrap;
}
.u-tecnico-cell { font-size: .78rem; }
.u-tecnico-cell.unassigned { color: var(--muted, #6b7280); font-style: italic; }
.u-meta-cat {
    font-size: .75rem;
    color: var(--muted, #6b7280);
}

/* Relatorio mensal */
.u-card-title-row {
    font-size: .83rem;
    font-weight: 700;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 8px;
}
.u-meta-78 { font-size: .78rem; color: #6b7280; }

/* Relatorio funcionario */
.u-flex-between { display: flex; align-items: center; justify-content: space-between; }
.u-nowrap-75    { font-size: .75rem; white-space: nowrap; }

/* Tecnico dashboard */
.u-opacity-80   { opacity: .8 !important; }
.u-link-meta {
    font-size: .75rem;
    color: var(--muted, #6b7280);
    text-decoration: none;
}
.u-link-action {
    margin-left: auto;
    font-size: .78rem;
    font-weight: 600;
    color: var(--brand, #0d6efd);
    text-decoration: none;
}

/* Admin/relatorio mensal */
.u-mt-30 { margin-top: 30px !important; }


/* === DARK THEME — utility classes (override text colors) === */
[data-theme="dark"] .u-c-text{color:#e5e7eb !important}
[data-theme="dark"] .u-c-muted-2{color:#9ca3af !important}
[data-theme="dark"] .u-c-brand{color:#60a5fa !important}
[data-theme="dark"] .u-c-brand-3{color:#93c5fd !important}
[data-theme="dark"] .u-c-success{color:#86efac !important}
[data-theme="dark"] .u-c-var-success{color:#86efac !important}
[data-theme="dark"] .u-c-var-brand{color:#60a5fa !important}
[data-theme="dark"] .u-brand-bold{color:#93c5fd !important}
[data-theme="dark"] .u-bg-brand-soft{background:rgba(96,165,250,0.15) !important;color:#93c5fd !important}
[data-theme="dark"] .u-pad-24-center{color:#9ca3af !important}
