/* --- SmartShare 4 Design Tokens (cdx-theme-cyan) -------------------------- */
:root {
    --primary:        #1ea0f3;
    --primary-dark:   #0c4263;
    --primary-hover:  #1880c2;
    --primary-light:  #4bb3f5;
    --primary-v50:    #e9f5fd;
    --primary-v100:   #d2ecfd;
    --primary-v200:   #a5d9fa;
    --primary-v700:   #13669b;
    --sidebar-width:  230px;
    --sidebar-bg:     #ffffff;
    --body-bg:        #f5f5f5;
    --border-color:   #e0e0e0;
    --text-color:     #333333;
    --text-muted:     #666666;
    --radius-sm:      4px;
    --radius-md:      6px;
    --radius-lg:      8px;
}

.database-console-editor {
    min-height: 320px;
    resize: vertical;
    line-height: 1.55;
    tab-size: 4;
    white-space: pre;
}

.database-console-grid {
    max-height: 520px;
    border: 1px solid var(--border-color);
    border-radius: .5rem;
}

.database-console-grid table {
    width: max-content;
    min-width: 100%;
    font-family: Consolas, "Courier New", monospace;
    font-size: .82rem;
}

.database-console-grid th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--primary-v50);
    color: var(--primary-dark);
    white-space: nowrap;
}

.database-console-grid td {
    max-width: 520px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.database-console-messages {
    max-height: 220px;
    overflow: auto;
    padding: 1rem;
    border-radius: .5rem;
    background: #101820;
    color: #d7f9e9;
    font-size: .82rem;
    white-space: pre-wrap;
}

/* Gerenciamento de Tema */
.theme-page { display:grid; gap:16px; }
.theme-header { display:flex; align-items:center; justify-content:space-between; gap:24px; padding:22px 24px; border:1px solid var(--primary-v100); border-left:4px solid var(--primary); background:#fff; }
.theme-header h1 { margin:4px 0; color:var(--primary-dark); font-size:1.7rem; font-weight:800; }
.theme-header p,.theme-section-title p { margin:0; color:var(--text-muted); }
.theme-eyebrow { color:var(--primary-v700); font-size:.76rem; font-weight:800; text-transform:uppercase; }
.theme-editor,.theme-list { padding:18px; border:1px solid var(--border-color); background:#fff; }
.theme-section-title { display:flex; align-items:flex-start; gap:10px; margin-bottom:16px; }
.theme-section-title>i { color:var(--primary-v700); font-size:1.15rem; }
.theme-section-title h2 { margin:0; color:var(--primary-dark); font-size:1rem; font-weight:800; }
.theme-section-title p { margin-top:2px; font-size:.82rem; }
.theme-identity-grid { display:grid; grid-template-columns:minmax(260px,1fr) minmax(260px,1fr) auto; gap:12px; align-items:end; }
.theme-logo-editor { display:grid; grid-template-columns:minmax(260px,1fr) 220px; gap:16px; align-items:end; margin-top:16px; padding:14px; border:1px solid var(--border-color); background:var(--primary-v50); }
.theme-logo-editor small { display:block; margin-top:5px; color:var(--text-muted); font-size:.76rem; }
.theme-logo-current>span { display:block; margin-bottom:5px; color:var(--text-color); font-size:.82rem; font-weight:700; }
.theme-logo-preview-frame { display:grid; min-height:76px; place-items:center; overflow:hidden; border:1px dashed var(--primary-v200); background:#fff; }
.theme-logo-preview-frame img { display:block; max-width:190px; max-height:68px; object-fit:contain; }
.theme-logo-preview-frame>i { color:var(--text-muted); font-size:1.8rem; }
.theme-logo-remove { display:flex!important; align-items:center; gap:7px; margin:7px 0 0!important; font-size:.78rem!important; font-weight:500!important; }
.theme-editor label { display:block; margin-bottom:5px; color:var(--text-color); font-size:.82rem; font-weight:700; }
.theme-workspace { display:grid; grid-template-columns:minmax(0,1.5fr) minmax(300px,.7fr); gap:20px; margin-top:18px; }
.theme-colors h3,.theme-preview h3 { margin:0 0 10px; color:var(--primary-dark); font-size:.86rem; font-weight:800; }
.theme-color-grid { display:grid; grid-template-columns:repeat(3,minmax(160px,1fr)); gap:10px; }
.theme-color-grid label>span { display:grid; grid-template-columns:38px minmax(0,1fr); min-height:38px; border:1px solid var(--border-color); }
.theme-color-grid input[type=color] { width:38px; height:36px; padding:3px; border:0; border-right:1px solid var(--border-color); background:#fff; }
.theme-color-grid input:not([type=color]) { min-width:0; padding:6px 8px; border:0; text-transform:uppercase; }
.theme-advanced { margin-top:12px; border-top:1px solid var(--border-color); padding-top:10px; }
.theme-advanced summary { margin-bottom:10px; color:var(--primary-v700); font-size:.82rem; font-weight:700; cursor:pointer; }
.theme-preview-app { --tp-primary:#1ea0f3; --tp-dark:#0c4263; --tp-light:#d2ecfd; --tp-sidebar:#fff; --tp-bg:#f5f5f5; --tp-border:#e0e0e0; --tp-text:#333; --tp-muted:#666; display:grid; grid-template-columns:82px 1fr; min-height:230px; overflow:hidden; border:1px solid var(--tp-border); background:var(--tp-bg); }
.theme-preview-side { display:flex; flex-direction:column; align-items:center; gap:14px; padding:16px 10px; border-right:1px solid var(--tp-border); background:var(--tp-sidebar); color:var(--tp-primary); }
.theme-preview-side i { font-size:1.35rem; }.theme-preview-side span { width:48px; height:7px; background:var(--tp-light); }
.theme-preview-logo { width:64px; height:34px; object-fit:contain; }
.theme-preview-content { padding:18px; color:var(--tp-text); }
.theme-preview-title { width:65%; height:12px; margin-bottom:8px; background:var(--tp-dark); }
.theme-preview-muted { width:90%; height:7px; margin-bottom:18px; background:var(--tp-muted); opacity:.45; }
.theme-preview-content button { padding:7px 16px; border:0; background:var(--tp-primary); color:#fff; font-size:.75rem; font-weight:700; }
.theme-preview-table { margin-top:18px; border:1px solid var(--tp-border); }.theme-preview-table>* { display:block; height:18px; border-bottom:1px solid var(--tp-border); }.theme-preview-table b { background:var(--tp-light); }
.theme-form-actions { display:flex; justify-content:flex-end; gap:8px; margin-top:18px; padding-top:14px; border-top:1px solid var(--border-color); }
.theme-table th { color:var(--text-muted); font-size:.72rem; text-transform:uppercase; white-space:nowrap; }
.theme-table td strong,.theme-table td small { display:block; }.theme-table td small { color:var(--text-muted); font-size:.74rem; }
.theme-table tr.is-archived { opacity:.68; }
.theme-swatches { display:inline-flex; overflow:hidden; border:1px solid var(--border-color); }.theme-swatches i { display:block; width:22px; height:24px; }
.theme-table-logo { width:58px; height:24px; margin-left:8px; object-fit:contain; vertical-align:middle; }
.theme-row-actions { display:flex; align-items:center; justify-content:flex-end; gap:6px; }
.theme-row-actions form { margin:0; }.theme-archive-form { display:flex; gap:6px; }.theme-archive-form input { width:190px; }
@media (max-width:1100px) { .theme-workspace { grid-template-columns:1fr; }.theme-color-grid { grid-template-columns:repeat(2,minmax(160px,1fr)); } }
@media (max-width:760px) { .theme-header { align-items:flex-start; flex-direction:column; }.theme-identity-grid,.theme-color-grid,.theme-logo-editor { grid-template-columns:1fr; }.theme-row-actions { align-items:stretch; flex-wrap:wrap; }.theme-archive-form input { width:150px; } }

/* Atendimento e Solicitacoes */
.support-new-link { margin: 0 8px 8px; border: 1px solid #168fd3; color: #0875b4 !important; font-weight: 700; }
.support-new-link.active { background: #168fd3 !important; color: #fff !important; }
.support-header { display:flex; align-items:center; justify-content:space-between; gap:24px; margin-bottom:16px; padding:24px 28px; border:1px solid #cfe0e9; border-left:4px solid #159fe5; background:#fff; }
.support-header h1 { margin:5px 0 4px; color:#073f60; font-size:1.8rem; font-weight:800; }
.support-header p,.support-section-title p,.support-panel-heading p { margin:0; color:#63717b; }
.support-eyebrow { color:#07577e; font-size:.78rem; font-weight:800; text-transform:uppercase; }
.support-eyebrow i { margin-right:6px; }
.support-header-action { white-space:nowrap; }
.support-panel { margin-bottom:16px; padding:18px; border:1px solid #d8dee2; background:#fff; }
.support-form-panel { max-width:1100px; }
.support-section-title { display:flex; align-items:flex-start; gap:10px; margin-bottom:18px; }
.support-section-title>i { color:#087aae; font-size:1.2rem; }
.support-section-title h2,.support-panel-heading h2 { margin:0; color:#073f60; font-size:1rem; font-weight:800; }
.support-section-title p,.support-panel-heading p { margin-top:3px; font-size:.85rem; }
.support-form-grid { display:grid; grid-template-columns:minmax(260px,1fr) 220px; gap:16px; }
.support-form label,.support-panel label,.support-actions label { display:block; margin-bottom:5px; color:#263943; font-size:.84rem; font-weight:700; }
.support-field-wide,.support-field-full { grid-column:1/-1; }
.support-form textarea { resize:vertical; }
.support-form small { display:block; margin-top:5px; color:#687780; }
.support-form-actions { display:flex; justify-content:flex-end; gap:8px; margin-top:18px; padding-top:14px; border-top:1px solid #e3e7e9; }
.support-metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin-bottom:16px; }
.support-metrics>div { min-height:82px; padding:14px 16px; border:1px solid #d8dee2; border-top:3px solid #149ddf; background:#fff; }
.support-metrics span { display:block; color:#66757e; font-size:.75rem; font-weight:800; text-transform:uppercase; }
.support-metrics strong { display:block; margin-top:4px; color:#073f60; font-size:1.55rem; }
.support-panel-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:20px; margin-bottom:14px; }
.support-filters { display:grid; grid-template-columns:minmax(210px,320px) 220px 42px; gap:8px; }
.support-table-wrap { border:1px solid #dce2e5; }
.support-table thead th { padding:10px 12px; border-bottom:1px solid #d2dadd; background:#f3f5f6; color:#52616a; font-size:.72rem; text-transform:uppercase; white-space:nowrap; }
.support-table td { padding:11px 12px; font-size:.85rem; }
.support-table td strong,.support-table td small { display:block; max-width:360px; }
.support-table td small { margin-top:3px; color:#7a868d; font-size:.73rem; }
.support-protocol { color:#0878b0; font-weight:800; text-decoration:none; white-space:nowrap; }
.support-status,.support-urgency { display:inline-flex; align-items:center; min-height:25px; padding:3px 8px; border:1px solid; font-size:.72rem; font-weight:800; white-space:nowrap; }
.support-status.is-open { border-color:#8dc9e7; background:#edf8fd; color:#086b9a; }.support-status.is-progress { border-color:#6fc4ba; background:#e9f7f5; color:#087166; }.support-status.is-pending { border-color:#e2c36c; background:#fff8df; color:#846200; }.support-status.is-resolved { border-color:#7ec58b; background:#edf9ef; color:#287437; }.support-status.is-closed { border-color:#c5ccd0; background:#f2f4f5; color:#5e686e; }
.support-urgency.is-high { border-color:#e89999; color:#b22626; }.support-urgency.is-medium { border-color:#e2c36c; color:#806000; }.support-urgency.is-low { border-color:#96c9df; color:#176987; }
.support-empty { display:flex; min-height:220px; align-items:center; justify-content:center; flex-direction:column; color:#6d7a82; }.support-empty i { margin-bottom:8px; font-size:2rem; }.support-empty strong { color:#324852; }.support-empty span { margin-top:3px; font-size:.85rem; }
.support-detail-layout { display:grid; grid-template-columns:minmax(0,1fr) 310px; gap:16px; align-items:start; }
.support-ticket-title { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; }
.support-ticket-title h2 { margin:5px 0 4px; color:#163f55; font-size:1.3rem; }.support-ticket-title p { margin:0; color:#69777f; font-size:.82rem; }
.support-description h3,.support-attachments h3,.support-facts h3,.support-actions h3,.support-resolution h3 { margin:0 0 10px; color:#17485f; font-size:.9rem; font-weight:800; }
.support-description p { margin:0; white-space:pre-wrap; }
.support-attachments { margin-top:18px; padding-top:14px; border-top:1px solid #e0e5e7; }.support-attachments>a { display:grid; grid-template-columns:20px minmax(0,1fr) auto; gap:7px; align-items:center; padding:8px 10px; border:1px solid #dae1e4; color:#245369; text-decoration:none; }.support-attachments>a+a { margin-top:6px; }.support-attachments small { color:#79868d; }
.support-timeline { margin-left:12px; border-left:2px solid #d6e2e8; }.support-timeline article { position:relative; display:grid; grid-template-columns:30px minmax(0,1fr); gap:10px; margin-left:-16px; padding:0 0 20px; }.support-timeline-icon { display:grid; width:30px; height:30px; place-items:center; border:1px solid #9ec8db; border-radius:50%; background:#fff; color:#097aa9; }.support-timeline article>div { padding:7px 11px; border:1px solid #dfe4e6; background:#fff; }.support-timeline article.is-system>div { background:#f6f9fa; }.support-timeline header { display:flex; justify-content:space-between; gap:12px; }.support-timeline time { color:#7b878e; font-size:.75rem; }.support-timeline p { margin:5px 0 0; white-space:pre-wrap; }.support-transition { color:#147294; font-size:.8rem; font-weight:700; }
.support-reply-actions { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:10px; margin-top:10px; }.support-facts dl { margin:0; }.support-facts dt { margin-top:11px; color:#758188; font-size:.72rem; text-transform:uppercase; }.support-facts dd { margin:2px 0 0; color:#263f4b; }.support-actions form { display:grid; gap:9px; }.support-resolution p { color:#65747c; font-size:.84rem; }.support-resolution>div { display:flex; gap:8px; }.support-resolution form { flex:1; }.support-resolution button { width:100%; }
@media(max-width:900px){.support-header,.support-panel-heading,.support-ticket-title{align-items:stretch;flex-direction:column}.support-form-grid,.support-detail-layout{grid-template-columns:1fr}.support-metrics{grid-template-columns:repeat(2,1fr)}.support-filters{grid-template-columns:1fr 1fr 42px}.support-field-wide,.support-field-full{grid-column:auto}}
@media(max-width:600px){.support-metrics,.support-filters,.support-reply-actions{grid-template-columns:1fr}.support-header{padding:18px}.support-header-action{width:100%}.support-filters button{width:100%}}

/* --- Reset ----------------------------------------------------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* --- Base ------------------------------------------------------------------ */
html,
body {
    max-width: 100%;
    overflow-x: auto;
}

body {
    font-family: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    font-size: 0.9375rem;
    font-weight: 400;
    line-height: 1.5;
    background-color: var(--body-bg);
    color: var(--text-color);
}

h1, h2, h3, h4, h5, h6 {
    color: var(--primary-dark);
    font-weight: 500;
    margin-bottom: 1rem;
}

/* --- Layout ---------------------------------------------------------------- */
.app-shell {
    display: block;
    min-height: 100vh;
    width: 100%;
    max-width: 100vw;
    overflow-x: clip;
}

/* --- Sidebar --------------------------------------------------------------- */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    padding: 16px;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 20;
    overflow-y: auto;
    box-shadow: 2px 0 6px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}

.sidebar-user-header {
    align-items: center;
    color: var(--primary-dark);
    display: flex;
    font-size: 0.95rem;
    font-weight: 700;
    gap: 8px;
    justify-content: center;
    min-height: 58px;
    overflow: hidden;
}

.sidebar-user-header .bi {
    color: var(--primary);
    flex: 0 0 auto;
    font-size: 1.2rem;
}

.sidebar-user-header span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-logo {
    width: 100%;
    max-width: 170px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.sidebar-theme-logo {
    display: grid;
    min-height: 72px;
    margin-bottom: 12px;
    place-items: center;
    padding: 8px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-theme-logo img {
    display: block;
    width: 100%;
    max-width: 170px;
    max-height: 58px;
    object-fit: contain;
}

/* Nav links */
.sidebar .nav { flex: 1; }

.sidebar .nav-link {
    color: var(--text-color);
    padding: 10px 14px;
    margin-bottom: 4px;
    border-radius: var(--radius-sm);
    transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
    text-decoration: none;
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    font-weight: 500;
}

.sidebar .nav-link:hover {
    background-color: var(--primary-v50);
    color: var(--primary);
}

.sidebar .nav-link.active {
    background-color: var(--primary-v100);
    color: var(--primary);
}

.sidebar-section-title {
    color: var(--primary-dark);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    list-style: none;
    margin: 12px 0 8px;
    padding: 0 14px;
    text-transform: uppercase;
}

.sidebar-filter {
    margin-top: 12px;
    padding: 0 0 4px;
    position: relative;
}

.sidebar-filter-label {
    color: var(--text-muted);
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 6px;
    padding: 0 2px;
}

.sidebar-filter .form-control {
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
}

.sidebar-filter-dropdown {
    background: #fff;
    border: 1px solid var(--primary-v100);
    border-radius: var(--radius-sm);
    box-shadow: 0 10px 22px rgba(0, 0, 0, .12);
    left: 0;
    max-height: 220px;
    overflow-y: auto;
    position: absolute;
    right: 0;
    top: calc(100% + 2px);
    z-index: 1200;
}

.sidebar-filter-option {
    background: #fff;
    border: 0;
    color: var(--text-color);
    display: block;
    font-size: .8125rem;
    padding: 8px 10px;
    text-align: left;
    width: 100%;
}

.sidebar-filter-option:hover,
.sidebar-filter-option:focus {
    background: var(--primary-v50);
    color: var(--primary-dark);
}

.sidebar-filter-option-empty {
    color: var(--text-muted);
    cursor: default;
}

.sidebar .nav-link,
.sidebar .btn {
    background-color: #fff;
    border-color: transparent;
    color: var(--text-color);
    font-weight: 500;
    text-transform: none;
}

.sidebar .nav-link:hover,
.sidebar .nav-link:focus,
.sidebar .btn:hover,
.sidebar .btn:focus,
.sidebar .nav-link.active {
    background-color: var(--primary-v100);
    border-color: var(--primary-v100);
    color: var(--primary);
}

.sidebar .btn:disabled {
    background-color: #fff;
    border-color: var(--border-color);
    color: var(--text-muted);
    opacity: .65;
    text-transform: none;
}

/* Botao de acesso restrito / sair */
.sidebar .nav-link.btn-admin {
    background-color: #fff;
    color: var(--text-color);
    font-weight: 500;
    justify-content: center;
    text-align: center;
    margin-top: 4px;
}

.sidebar .nav-link.btn-admin:hover {
    background-color: var(--primary-v100);
    color: var(--primary);
}

/* Nome do usuario logado no rodape */
.sidebar-user {
    padding: 12px 14px;
    border-top: 1px solid var(--border-color);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* --- Main Content ---------------------------------------------------------- */
.main-content {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    max-width: none;
    min-width: 0;
    overflow-x: clip;
    padding: 0;
    background-color: var(--body-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content.main-content-full {
    margin-left: 0;
    width: 100%;
}

/* Barra de titulo centralizada */
.page-title-bar {
    background-color: var(--primary-dark);
    color: #fff;
    text-align: center;
    padding: 13px 24px;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.3px;
    border-bottom: 2px solid var(--primary);
    flex-shrink: 0;
}

.main-content > .container-fluid {
    padding: 24px 24px 54px;
    flex: 1;
    min-width: 0;
    max-width: 100%;
    overflow-x: clip;
}

.dev-signature {
    align-items: center;
    background: rgba(255, 255, 255, .92);
    border: 1px solid var(--primary-v100);
    border-radius: var(--radius-md);
    bottom: 12px;
    box-shadow: 0 8px 22px rgba(12, 66, 99, .12);
    color: var(--primary-dark);
    display: inline-flex;
    gap: 8px;
    padding: 7px 10px;
    pointer-events: none;
    position: fixed;
    right: 12px;
    z-index: 1100;
}

.dev-signature-icon {
    align-items: center;
    background: var(--primary-v50);
    border-radius: var(--radius-sm);
    color: var(--primary);
    display: inline-flex;
    height: 28px;
    justify-content: center;
    width: 28px;
}

.dev-signature-copy {
    display: grid;
    gap: 1px;
    line-height: 1.05;
}

.dev-signature-copy span {
    color: var(--text-muted);
    font-size: .64rem;
    font-weight: 700;
    text-transform: uppercase;
}

.dev-signature-copy strong {
    color: var(--primary-dark);
    font-size: .76rem;
    font-weight: 800;
    white-space: nowrap;
}

/* --- Cards ----------------------------------------------------------------- */
.card {
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
    border-radius: var(--radius-lg);
    background: #fff;
    max-width: 100%;
    min-width: 0;
}

.card-header {
    background-color: #fff;
    color: var(--primary-dark);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
    font-weight: 700;
    font-size: 0.9375rem;
    padding: 14px 20px;
    border-bottom: 1px solid var(--primary-v100);
}

/* Badges/contadores que antes contrastavam com o header escuro (bg-white sobre
   fundo escuro) agora usam um tom claro para continuar visiveis sobre o header
   branco. */
.card-header .badge.bg-white {
    background-color: var(--primary-v50) !important;
    color: var(--primary-dark) !important;
}

/* Botoes outline-light idem: eram pensados para header escuro, agora precisam
   de contraste sobre o header branco. */
.card-header .btn-outline-light {
    color: var(--primary-dark);
    border-color: var(--primary-v200);
}
.card-header .btn-outline-light:hover,
.card-header .btn-outline-light:focus {
    background-color: var(--primary-v50);
    color: var(--primary-dark);
    border-color: var(--primary-v200);
}

.card-body {
    padding: 1.25rem 1.5rem !important;
}

.card-title {
    color: var(--primary-dark);
    font-weight: 500;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

/* Card hover (para cards clicaveis) */
.card.card-hover {
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    cursor: pointer;
}

.card.card-hover:hover {
    box-shadow: 0 4px 16px rgba(30, 160, 243, 0.18);
    transform: translateY(-2px);
}

/* --- Login / acesso seguro ------------------------------------------------ */
.login-security-page {
    align-items: center;
    display: flex;
    min-height: calc(100vh - 48px);
    padding: clamp(16px, 4vw, 48px);
}

.login-security-shell {
    display: grid;
    grid-template-columns: minmax(320px, 420px);
    justify-content: center;
    gap: 28px;
    margin: 0 auto;
    max-width: 920px;
    width: 100%;
}

.login-security-panel {
    background:
        linear-gradient(135deg, rgba(30, 160, 243, .12), rgba(255, 255, 255, .94)),
        #fff;
    border: 1px solid var(--primary-v100);
    border-radius: var(--radius-lg);
    box-shadow: 0 18px 45px rgba(12, 66, 99, .10);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 320px;
    padding: 28px;
}

.login-security-brand {
    align-items: center;
    display: flex;
    gap: 16px;
}

.login-security-icon {
    align-items: center;
    background: #fff;
    border: 1px solid var(--primary-v100);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 24px rgba(30, 160, 243, .16);
    color: var(--primary);
    display: inline-flex;
    flex: 0 0 62px;
    font-size: 2rem;
    height: 62px;
    justify-content: center;
    width: 62px;
}

.login-security-brand h1 {
    color: var(--primary-dark);
    font-size: 1.65rem;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.15;
    margin: 0;
}

.login-security-brand p {
    color: var(--text-muted);
    margin: 4px 0 0;
}

.login-security-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.login-security-meta span {
    align-items: center;
    background: rgba(255, 255, 255, .76);
    border: 1px solid var(--primary-v100);
    border-radius: var(--radius-sm);
    color: var(--primary-dark);
    display: inline-flex;
    font-size: .82rem;
    font-weight: 600;
    gap: 6px;
    padding: 7px 9px;
}

.login-security-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 18px 45px rgba(0, 0, 0, .08);
    padding: 28px;
}

.login-security-card-title {
    margin-bottom: 22px;
}

.login-security-card-title h2 {
    color: var(--primary-dark);
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0;
    margin: 0;
}

.login-security-card-title span {
    color: var(--text-muted);
    display: block;
    margin-top: 4px;
}

.login-input-wrap {
    position: relative;
}

.login-input-wrap > .bi {
    color: var(--primary);
    font-size: 1rem;
    left: 13px;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
}

.login-input-wrap .form-control {
    padding-left: 40px;
}

.login-submit-btn {
    font-weight: 700;
}

/* --- Buttons --------------------------------------------------------------- */
.btn {
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding: 0.5rem 1rem;
    transition: background-color 0.2s ease-in-out;
    line-height: 1.5;
}

.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: var(--primary-hover) !important;
    border-color: var(--primary-hover) !important;
    color: #fff !important;
}

.btn-primary:focus {
    box-shadow: 0 0 0 3px var(--primary-v100) !important;
}

.btn-outline-secondary {
    border-color: #b2b2b2;
    color: var(--text-color);
}

.btn-outline-secondary:hover {
    background-color: #f2f2f2;
    border-color: #b2b2b2;
    color: var(--text-color);
}

/* --- Forms ----------------------------------------------------------------- */
.form-label {
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--text-color);
    margin-bottom: 5px;
}

.form-control,
.form-select {
    border-radius: var(--radius-sm);
    border: 1px solid #c4c4c4;
    padding: 9px 12px;
    font-size: 0.9375rem;
    color: var(--text-color);
    background-color: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-v100);
    outline: none;
}

.form-control::placeholder {
    color: #aaa;
    font-size: 0.875rem;
}

/* --- Alerts ---------------------------------------------------------------- */
.alert {
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    border: none;
}

.alert-danger  { background-color: #fce8e8; color: #c62828; }
.alert-success { background-color: #e8f5e9; color: #2e7d32; }
.alert-info    { background-color: var(--primary-v50); color: var(--primary-dark); }

/* --- Responsive foundations ------------------------------------------------ */
.row {
    min-width: 0;
}

[class*="col-"] {
    min-width: 0;
}

.table-responsive,
.alcada-table-wrap,
.transfer-table-wrap,
.auditoria-table-wrap {
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    overflow-x: auto;
}

.table {
    max-width: 100%;
}

.table th,
.table td {
    overflow-wrap: anywhere;
}

.card-header,
.card-footer,
.page-actions,
.settings-actions,
.import-actions,
.admin-action-buttons {
    flex-wrap: wrap;
}

.card-header .btn,
.card-footer .btn,
.page-actions .btn,
.settings-actions .btn,
.import-actions .btn,
.admin-action-buttons .btn {
    max-width: 100%;
    white-space: normal;
}

/* --- Responsive ------------------------------------------------------------ */
@media (max-width: 1199.98px) {
    :root {
        --sidebar-width: 210px;
    }

    .sidebar {
        padding: 12px;
    }

    .sidebar-logo {
        max-width: 145px;
    }

    .sidebar .nav-link {
        padding: 9px 10px;
        font-size: 0.8125rem;
    }

    .main-content > .container-fluid {
        padding: 18px;
    }

    .card-body {
        padding: 1rem !important;
    }
}

@media (max-width: 991.98px) {
    .sidebar {
        width: 100%;
        height: auto;
        max-height: none;
        position: relative;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
        padding: 10px 12px;
    }

    .sidebar-header {
        margin-bottom: 10px;
        padding-bottom: 10px;
    }

    .sidebar-logo {
        max-width: 132px;
    }

    .sidebar .nav {
        display: flex;
        flex-direction: row !important;
        flex-wrap: nowrap;
        gap: 6px;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .sidebar .nav-item {
        flex: 0 0 auto;
    }

    .sidebar .nav-link,
    .sidebar .btn {
        margin-bottom: 0;
        min-height: 38px;
        white-space: nowrap;
    }

    .sidebar-section-title,
    .sidebar-user {
        display: none;
    }

    .sidebar-filter {
        flex: 0 0 220px;
        margin-top: 0;
        padding: 0;
    }

    .sidebar-filter-label {
        display: none;
    }

    .sidebar-filter .btn,
    .sidebar-filter .form-control {
        min-height: 38px;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
        max-width: 100%;
    }

    .page-title-bar {
        padding: 10px 14px;
    }
}

@media (max-width: 575.98px) {
    body {
        font-size: 0.875rem;
    }

    .main-content > .container-fluid {
        padding: 12px;
    }

    .card-header {
        padding: 10px 12px;
    }

    .card-body {
        padding: 0.875rem !important;
    }

    .btn {
        width: 100%;
        min-width: 0 !important;
        justify-content: center;
    }

    .page-title-bar {
        font-size: 0.9rem;
    }
}

/* --- Dashboard administrativo ---------------------------------------------- */
.admin-dashboard {
    min-height: calc(100vh - 64px - 48px);
    width: 100%;
    display: flex;
}

.admin-service-grid {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 18px;
    align-items: flex-start;
}

.admin-action-card {
    flex: 0 1 260px;
    display: flex;
    position: relative;
}

.admin-service-grid .admin-action-card {
    min-height: unset;
}

.admin-action-card .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px !important;
}

.admin-action-icon {
    font-size: 2rem;
    line-height: 1;
    margin-bottom: 10px;
}

.admin-action-card .card-title {
    font-size: 1rem;
    margin-bottom: 8px;
}

.admin-action-card .card-info-tooltip {
    position: absolute;
    top: 0;
    right: 0;
    line-height: 1;
    cursor: default;
    font-size: 1rem;
    opacity: 0.55;
    transition: opacity 0.15s;
}

.admin-action-card .card-info-tooltip:hover {
    opacity: 1;
}

.admin-action-card.active {
    border-color: var(--primary);
    box-shadow: inset 0 0 0 1px var(--primary), 0 10px 22px rgba(30, 160, 243, .14);
}

.admin-action-card.active .admin-action-icon {
    color: var(--primary-hover) !important;
}

.admin-action-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .admin-action-card .card-body { padding: 14px !important; }
}

/* --- Overlay de carregamento ao abrir um card ------------------------------ */
.card-loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.card-loading-box {
    background: #fff;
    border-radius: var(--radius-lg, 12px);
    padding: 32px 40px;
    text-align: center;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
    min-width: 220px;
}

.card-loading-spinner {
    width: 42px;
    height: 42px;
    margin: 0 auto 14px;
    border: 4px solid var(--border-color, #dde3ea);
    border-top-color: var(--primary, #1ea0f3);
    border-radius: 50%;
    animation: card-loading-spin 0.8s linear infinite;
}

@keyframes card-loading-spin {
    to { transform: rotate(360deg); }
}

.card-loading-percent {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary-dark, #0c4263);
    line-height: 1;
}

.card-loading-label {
    margin-top: 6px;
    font-size: 0.85rem;
    color: var(--text-muted, #6c7a89);
}

/* --- Home SmartDellys Servicos -------------------------------------------- */
.smartdellys-home {
    display: grid;
    gap: 22px;
    min-height: calc(100vh - 48px);
    padding: clamp(16px, 4vw, 42px);
}

.smartdellys-hero {
    align-items: stretch;
    display: grid;
    gap: 24px;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
    margin: auto auto 0;
    max-width: 1040px;
    width: 100%;
}

.smartdellys-hero-content {
    align-items: flex-start;
    background: #fff;
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius-lg);
    box-shadow: 0 18px 45px rgba(0, 0, 0, .06);
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 320px;
    padding: clamp(26px, 5vw, 54px);
}

.smartdellys-kicker {
    align-items: center;
    background: var(--primary-v50);
    border: 1px solid var(--primary-v100);
    border-radius: var(--radius-sm);
    color: var(--primary-dark);
    display: inline-flex;
    font-size: .8rem;
    font-weight: 700;
    gap: 7px;
    margin-bottom: 18px;
    padding: 7px 10px;
    text-transform: uppercase;
}

.smartdellys-hero h1 {
    color: var(--primary-dark);
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.05;
    margin: 0 0 14px;
}

.smartdellys-hero p {
    color: var(--text-muted);
    font-size: 1rem;
    margin: 0;
    max-width: 620px;
}

.smartdellys-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 26px;
}

.smartdellys-access-card {
    background:
        linear-gradient(135deg, rgba(30, 160, 243, .10), rgba(255,255,255,.96)),
        #fff;
    border: 1px solid var(--primary-v100);
    border-radius: var(--radius-lg);
    box-shadow: 0 18px 45px rgba(12, 66, 99, .08);
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 320px;
    padding: 28px;
}

.smartdellys-access-icon {
    align-items: center;
    background: #fff;
    border: 1px solid var(--primary-v100);
    border-radius: var(--radius-lg);
    color: var(--primary);
    display: inline-flex;
    font-size: 2rem;
    height: 60px;
    justify-content: center;
    margin-bottom: 18px;
    width: 60px;
}

.smartdellys-access-card h2 {
    color: var(--primary-dark);
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 0;
    margin: 0 0 8px;
}

.smartdellys-access-card span {
    align-items: center;
    color: var(--primary-dark);
    display: inline-flex;
    font-size: .86rem;
    font-weight: 700;
    gap: 7px;
    margin-top: 22px;
}

.smartdellys-service-strip {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 245px));
    justify-content: start;
    margin: 0 auto auto;
    max-width: 1040px;
    width: 100%;
}

.smartdellys-service-item {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    min-height: 138px;
    padding: 16px;
}

.smartdellys-service-item i {
    color: var(--primary);
    font-size: 1.25rem;
}

.smartdellys-service-item strong {
    color: var(--primary-dark);
    display: block;
    font-size: .95rem;
    margin-top: 8px;
}

.smartdellys-service-item span {
    color: var(--text-muted);
    display: block;
    font-size: .82rem;
    margin-top: 4px;
}

.home-login-overlay {
    align-items: center;
    display: flex;
    inset: 0;
    justify-content: center;
    padding: 18px;
    position: fixed;
    z-index: 1000;
}

.home-login-backdrop {
    background: rgba(12, 66, 99, .28);
    inset: 0;
    position: absolute;
}

.home-login-dialog {
    max-width: 420px;
    position: relative;
    width: 100%;
    z-index: 1;
}

.home-login-dialog .login-security-card {
    box-shadow: 0 22px 70px rgba(12, 66, 99, .22);
}

.home-login-close {
    position: absolute;
    right: 16px;
    top: 16px;
    z-index: 2;
}

/* --- Configuracoes LDAP ---------------------------------------------------- */
.ldap-settings-page {
    width: 100%;
    max-width: none;
    margin: 0 auto;
}

.page-actions {
    display: flex;
    justify-content: flex-end;
}

.page-intro {
    background: #fff;
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius-lg);
    padding: 16px 18px;
}

.ldap-settings-form .card-body { padding: 22px 24px !important; }

.ldap-help-card pre {
    font-size: 0.82rem;
    white-space: pre-wrap;
    margin: 0;
}

.settings-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    padding-bottom: 8px;
}

.settings-actions .btn {
    min-width: 160px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .page-actions,
    .settings-actions { justify-content: stretch; }

    .page-actions .btn,
    .settings-actions .btn { width: 100%; min-width: 0; }

    .ldap-settings-form .card-body { padding: 18px !important; }
}

/* --- Importacao de usuarios ------------------------------------------------ */
.import-page {
    width: 100%;
    max-width: none;
    margin: 0 auto;
}

.import-config-card .card-body { padding: 22px 24px !important; }

.import-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.import-actions .btn {
    min-width: 156px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.import-progress { height: 22px; }

.import-stat {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
    height: 100%;
    background: #fff;
}

.import-stat-primary   { border-left: 4px solid #0d6efd !important; }
.import-stat-success   { border-left: 4px solid #198754 !important; }
.import-stat-danger    { border-left: 4px solid #dc3545 !important; }
.import-stat-secondary { border-left: 4px solid #6c757d !important; }

.import-log-area {
    height: 220px;
    overflow-y: auto;
    font-size: 0.8rem;
}

@media (max-width: 768px) {
    .import-actions { justify-content: stretch; }
    .import-actions .btn { width: 100%; min-width: 0; }
    .import-config-card .card-body { padding: 18px !important; }
}

/* --- Gestao de usuarios / organizadores ------------------------------------ */
.management-page {
    width: 100%;
    max-width: none;
    margin: 0 auto;
}

.service-placeholder-page {
    width: 100%;
    max-width: 980px;
    margin: 0 auto;
}

.service-permission-box {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px;
    background: #fafafa;
}

.permission-check {
    min-height: 72px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: #fff;
    padding: 10px 12px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}

.permission-check input { margin-top: 4px; flex: 0 0 auto; }

.permission-check span {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.permission-check strong { color: var(--primary-dark); font-size: 0.9rem; }
.permission-check small  { color: var(--text-muted); font-size: 0.8rem; }

.organizer-row {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin-bottom: 16px;
}

.organizer-row:last-child { margin-bottom: 0; }

.organizer-row-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.point-import-page .form-select { min-height: 42px; }

.ad-search-results {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #fff;
}

.ad-search-results-title {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color);
    background: var(--surface-muted, #f7f9fb);
    color: var(--primary-dark);
    font-weight: 700;
}

.ad-search-results table {
    min-width: 760px;
}

.ad-search-results th,
.ad-search-results td {
    vertical-align: middle;
}

/* --- Gestao de Processos --------------------------------------------------- */
.process-management-page {
    width: 100%;
    max-width: none;
    margin: 0 auto;
}

.process-stat-card {
    height: 100%;
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius-md);
    background: #fff;
    padding: 16px 18px;
}

.process-stat-card span {
    display: block;
    color: var(--text-muted);
    font-size: .82rem;
    font-weight: 600;
    text-transform: uppercase;
}

.process-stat-card strong {
    display: block;
    color: var(--primary-dark);
    font-size: 1.75rem;
    line-height: 1.2;
    margin-top: 4px;
}

.robo-stat-card {
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.robo-stat-card:hover,
.robo-stat-card.active {
    border-color: var(--primary);
    box-shadow: 0 8px 18px rgba(30, 99, 156, .14);
    transform: translateY(-1px);
}

.robo-stat-icon {
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 46px;
    border-radius: 8px;
    color: var(--primary);
    background: #eaf4fb;
    font-size: 1.35rem;
}

.robo-stat-content {
    min-width: 0;
}

.robo-process-field {
    display: flex;
    flex-direction: column;
}

.robo-process-select {
    flex: 1 1 auto;
    min-height: 180px;
}

.robo-status-col {
    width: 1%;
    white-space: nowrap;
}

.robo-bar-chart {
    display: grid;
    gap: 10px;
}

.robo-bar-row {
    display: grid;
    grid-template-columns: minmax(180px, 280px) 1fr 42px;
    align-items: center;
    gap: 12px;
}

.robo-bar-label {
    color: var(--text-color);
    font-size: .9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.robo-bar-track {
    height: 18px;
    border-radius: 6px;
    background: #eef3f7;
    overflow: hidden;
}

.robo-bar-fill {
    height: 100%;
    border-radius: 6px;
    background: var(--primary);
}

.robo-bar-value {
    color: var(--primary-dark);
    font-weight: 700;
    text-align: right;
}

@media (max-width: 768px) {
    .robo-bar-row {
        grid-template-columns: 1fr 42px;
    }

    .robo-bar-label {
        grid-column: 1 / -1;
    }
}

.process-list-card .card-header {
    min-height: 58px;
}

.process-command-center {
    display: grid;
    gap: 18px;
}

.process-hero-panel {
    align-items: center;
    background: #fff;
    border: 1px solid var(--primary-v100);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius-lg);
    box-shadow: 0 12px 30px rgba(12, 66, 99, .06);
    display: flex;
    gap: 20px;
    justify-content: space-between;
    padding: 24px;
}

.process-hero-kicker {
    align-items: center;
    color: var(--primary-dark);
    display: inline-flex;
    font-size: .78rem;
    font-weight: 700;
    gap: 7px;
    letter-spacing: .04em;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.process-hero-panel h1 {
    color: var(--primary-dark);
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 0;
    margin: 0 0 6px;
}

.process-hero-panel p {
    color: var(--text-muted);
    margin: 0;
}

.process-hero-summary {
    align-items: center;
    background: var(--primary-v50);
    border: 1px solid var(--primary-v100);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 150px;
    padding: 18px;
}

.process-hero-summary strong {
    color: var(--primary-dark);
    font-size: 2rem;
    line-height: 1;
}

.process-hero-summary span {
    color: var(--text-muted);
    font-size: .78rem;
    font-weight: 700;
    margin-top: 6px;
    text-align: center;
    text-transform: uppercase;
}

.process-kpi-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.process-alert-panel {
    background: #fff;
    border: 1px solid var(--primary-v100);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 24px rgba(12, 66, 99, .05);
    padding: 16px;
}

.process-alert-heading {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-bottom: 12px;
}

.process-alert-heading span {
    align-items: center;
    color: var(--primary-dark);
    display: inline-flex;
    font-weight: 800;
    gap: 8px;
}

.process-alert-heading strong {
    color: var(--text-muted);
    font-size: .82rem;
}

.process-alert-list {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr));
}

.process-alert-item {
    align-items: center;
    background: var(--primary-v50);
    border: 1px solid var(--primary-v100);
    border-radius: var(--radius-md);
    display: flex;
    gap: 10px;
    justify-content: space-between;
    padding: 10px 12px;
    text-align: left;
}

.process-alert-item:hover,
.process-alert-item:focus {
    border-color: var(--primary);
    box-shadow: 0 8px 18px rgba(30, 99, 156, .12);
}

.process-alert-item strong {
    color: var(--primary-dark);
    display: block;
    font-size: .86rem;
}

.process-alert-item small,
.process-alert-empty {
    color: var(--text-muted);
    font-size: .78rem;
}

.process-score-pill {
    align-items: center;
    border-radius: 999px;
    display: inline-flex;
    font-size: .78rem;
    font-weight: 800;
    justify-content: center;
    min-width: 42px;
    padding: 4px 8px;
}

.process-score-high {
    background: #198754;
    color: #fff;
}

.process-score-medium {
    background: #ffc107;
    color: #1f1f1f;
}

.process-score-low {
    background: #dc3545;
    color: #fff;
}

.process-kpi-card {
    align-items: center;
    cursor: pointer;
    display: flex;
    gap: 12px;
    text-align: left;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.process-kpi-card:hover,
.process-kpi-card.active {
    border-color: var(--primary);
    box-shadow: 0 8px 18px rgba(30, 99, 156, .14);
    transform: translateY(-1px);
}

.process-kpi-card.active,
.process-kpi-card[aria-pressed="true"] {
    background: linear-gradient(180deg, #fff 0%, var(--primary-v50) 100%);
    border-color: var(--primary);
    box-shadow: inset 0 0 0 1px var(--primary), 0 10px 22px rgba(30, 99, 156, .14);
}

.process-kpi-card.active .process-kpi-icon,
.process-kpi-card[aria-pressed="true"] .process-kpi-icon {
    background: var(--primary);
    color: #fff;
}

.process-kpi-icon {
    align-items: center;
    background: var(--primary-v50);
    border-radius: var(--radius-md);
    color: var(--primary);
    display: inline-flex;
    flex: 0 0 42px;
    font-size: 1.2rem;
    height: 42px;
    justify-content: center;
    width: 42px;
}

.process-kpi-copy {
    min-width: 0;
}

.process-insight-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr);
}

.process-insight-card .card-body {
    padding: 16px !important;
}

.process-horizontal-chart {
    display: grid;
    gap: 10px;
}

.process-chart-row {
    align-items: center;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(160px, 260px) 1fr 42px;
}

.process-chart-label {
    color: var(--text-color);
    font-size: .85rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.process-chart-track,
.process-status-track {
    background: #eef3f7;
    border-radius: 6px;
    height: 16px;
    overflow: hidden;
}

.process-chart-fill,
.process-status-fill {
    background: var(--primary);
    border-radius: 6px;
    height: 100%;
}

.process-activity-chart .process-chart-fill {
    background: var(--primary-v700);
}

.process-chart-value {
    color: var(--primary-dark);
    font-weight: 700;
    text-align: right;
}

.process-ranking-list,
.process-status-list {
    display: grid;
    gap: 10px;
}

.process-ranking-item {
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    gap: 12px;
    justify-content: space-between;
    padding-bottom: 10px;
}

.process-ranking-item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.process-ranking-item strong {
    color: var(--primary-dark);
    display: block;
    font-size: .9rem;
}

.process-ranking-item span:not(.badge) {
    color: var(--text-muted);
    display: block;
    font-size: .78rem;
    margin-top: 2px;
}

.process-status-item strong {
    color: var(--primary-dark);
    font-size: .86rem;
}

.process-status-item span {
    color: var(--text-muted);
    font-weight: 700;
}

.process-name {
    color: var(--text-color);
    font-weight: 700;
    line-height: 1.25;
    overflow-wrap: normal;
    word-break: normal;
}

.process-description {
    color: var(--text-muted);
    font-size: .8rem;
    line-height: 1.35;
    margin-top: 2px;
    max-width: 760px;
    overflow-wrap: normal;
    word-break: normal;
}

.process-table {
    table-layout: fixed;
    min-width: 980px;
}

.process-table th,
.process-table td {
    overflow-wrap: normal;
    word-break: normal;
}

.process-table th:nth-child(1),
.process-table td:nth-child(1) {
    width: 36%;
}

.process-table th:nth-child(2),
.process-table td:nth-child(2),
.process-table th:nth-child(3),
.process-table td:nth-child(3),
.process-table th:nth-child(4),
.process-table td:nth-child(4),
.process-table th:nth-child(5),
.process-table td:nth-child(5),
.process-table th:nth-child(6),
.process-table td:nth-child(6) {
    width: 9%;
}

.process-table th:nth-child(7),
.process-table td:nth-child(7) {
    width: 19%;
}

.process-table th:nth-child(8),
.process-table td:nth-child(8) {
    width: 9%;
    white-space: nowrap;
}

.process-governance-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.process-detail-head {
    align-items: flex-start;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 16px;
}

.process-detail-code {
    color: var(--primary);
    display: block;
    font-size: .8rem;
    font-weight: 800;
    margin-bottom: 4px;
}

.process-detail-head h3 {
    color: var(--primary-dark);
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 0;
    margin: 0 0 6px;
}

.process-detail-head p {
    color: var(--text-muted);
    margin: 0;
}

.process-detail-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin-bottom: 18px;
}

.process-detail-grid div {
    background: var(--primary-v50);
    border: 1px solid var(--primary-v100);
    border-radius: var(--radius-md);
    padding: 10px;
}

.process-detail-grid span {
    color: var(--text-muted);
    display: block;
    font-size: .72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.process-detail-grid strong {
    color: var(--primary-dark);
    display: block;
    font-size: 1.05rem;
    margin-top: 2px;
}

.process-detail-section {
    margin-top: 16px;
}

.process-detail-section h4 {
    color: var(--primary-dark);
    font-size: .9rem;
    font-weight: 800;
    letter-spacing: 0;
    margin-bottom: 8px;
}

@media (max-width: 768px) {
    .process-table { min-width: 920px; }
}

/* Usuario validado no AD */
.validated-user {
    border: 1px solid var(--primary-v200);
    background: var(--primary-v50);
    border-radius: var(--radius-lg);
    padding: 16px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.validated-user-icon {
    color: var(--primary);
    font-size: 1.8rem;
    line-height: 1;
    flex: 0 0 auto;
}

.validated-user-body { min-width: 0; flex: 1; }

.validated-user-title {
    color: var(--primary-dark);
    font-weight: 700;
    margin-bottom: 8px;
}

.validated-user-grid {
    display: grid;
    grid-template-columns: minmax(90px, auto) 1fr;
    gap: 4px 12px;
    font-size: 0.875rem;
}

.validated-user-grid span   { color: var(--text-muted); }
.validated-user-grid strong { color: var(--text-color); font-weight: 600; word-break: break-word; }

@media (max-width: 768px) {
    .validated-user { flex-direction: column; }
    .validated-user-grid { grid-template-columns: 1fr; }
}

/* --- Gestao de Alcadas (BPM) ----------------------------------------------- */
.service-management-page {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
}

.service-management-page .card {
    max-width: 100%;
    min-width: 0;
}

.alcada-list-card { width: 100%; }

.alcada-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.alcada-table { min-width: 0; width: 100%; }

.alcada-header-action {
    font-size: 0.9375rem;
    font-weight: 500;
    letter-spacing: 0;
    line-height: 1.2;
    padding: 0.25rem 0.55rem;
    text-transform: none;
}

.alcada-edit-control      { width: 100%; min-width: 0; }
.alcada-condition-control { width: 100%; min-width: 0; }
.alcada-logic-control     { width: 100%; min-width: 0; }

/* Autocomplete de usuários */
.usuario-autocomplete-td { position: relative; }

.usuario-autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1050;
    background: #fff;
    border: 1px solid var(--primary-v200);
    border-top: none;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    box-shadow: 0 4px 12px rgba(0,0,0,.12);
    max-height: 220px;
    overflow-y: auto;
}

.usuario-autocomplete-item {
    width: 100%;
    border: 0;
    background: #fff;
    padding: 7px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: .8375rem;
    outline: none;
    text-align: left;
}

.usuario-autocomplete-item:hover,
.usuario-autocomplete-item:focus { background-color: var(--primary-v50); }

.usuario-autocomplete-item .uac-nome { font-weight: 600; color: var(--primary-dark); flex: 1 1 0; min-width: 0; }
.usuario-autocomplete-item .uac-login { font-size: .75rem; white-space: nowrap; }
.usuario-autocomplete-empty { color: var(--text-muted); font-style: italic; cursor: default; }
.usuario-autocomplete-empty:hover { background: none; }

#usuariosPapelSection .alcada-table-wrap {
    overflow-x: visible;
}

#usuariosPapelSection .usuario-autocomplete-dropdown {
    position: static;
    margin-top: 4px;
    border-top: 1px solid var(--primary-v200);
    border-radius: var(--radius-sm);
}

.organizador-smartshare-row .usuario-autocomplete-dropdown,
.gestor-smartshare-row .usuario-autocomplete-dropdown {
    position: static;
    margin-top: 4px;
    border-top: 1px solid var(--primary-v200);
    border-radius: var(--radius-sm);
}

.organizer-services-inline {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 220px;
    max-height: 180px;
    overflow-y: auto;
}

.permission-check-compact {
    min-height: unset;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    margin: 0;
    padding: 4px 6px;
}

.permission-check-compact:hover {
    background: var(--primary-v100, #eef6fd);
}

.permission-check-compact small {
    display: none;
}
.alcada-actions-cell      { white-space: nowrap; }

.alcada-select {
    width: 100%;
    min-width: 0;
    max-width: none;
}

.alcada-select-cell {
    width: 100%;
    min-width: 0;
    max-width: none;
}

.alcada-value { line-height: 1.45; }

.alcada-empty-row td {
    height: 120px;
    text-align: center;
    color: var(--text-muted);
}

.selected-cards-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 300px));
    gap: 12px;
    justify-content: start;
    margin-bottom: 18px;
    padding: 0 0 18px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    position: relative;
}

.selected-cards-bar::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0, var(--primary-v200) 8%, var(--primary-v200) 92%, transparent 100%);
}

.selected-cards-bar::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -5px;
    height: 5px;
    background: linear-gradient(180deg, rgba(30, 160, 243, .08), transparent);
    pointer-events: none;
}

.selected-cards-bar .selected-flow-card {
    height: 100%;
}

/* Cards de selecao de processo */
.process-filter-grid {
    display: grid;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 300px));
    gap: 12px;
    justify-content: start;
    overflow: hidden;
}

@media (min-width: 992px) and (max-width: 1199.98px) {
    .process-filter-grid { grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 280px)); }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .process-filter-grid { grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 280px)); }
}

@media (min-width: 576px) and (max-width: 767.98px) {
    .process-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 575.98px) {
    .process-filter-grid { grid-template-columns: 1fr; }
}

.process-filter-card {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: #fff;
    padding: 14px 16px;
    text-align: left;
    cursor: pointer;
    min-height: 64px;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.process-filter-card:hover,
.process-filter-card.active {
    border-color: var(--primary);
    box-shadow: 0 4px 14px rgba(30, 160, 243, .16);
    transform: translateY(-1px);
}

.process-filter-title {
    color: var(--primary-dark);
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
    flex: 1 1 0;
    min-width: 0;
}

.process-filter-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.process-filter-meta .badge { max-width: 100%; white-space: normal; }

/* Cards de selecao de atividade */
.activity-filter-grid {
    display: none;
    grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 300px));
    gap: 12px;
    justify-content: start;
    margin-bottom: 1.5rem;
}

.activity-filter-grid.on { display: grid; }

.activity-filter-card {
    display: block;
    width: 100%;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: #fff;
    padding: 14px 16px;
    text-align: left;
    cursor: pointer;
    min-height: 64px;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.activity-filter-card:hover,
.activity-filter-card.active {
    border-color: var(--primary);
    box-shadow: 0 4px 14px rgba(30, 160, 243, .16);
    transform: translateY(-1px);
}

.activity-filter-title {
    color: var(--primary-dark);
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
    flex: 1 1 0;
    min-width: 0;
}

/* Cards de selecao de papel */
.paper-filter-grid {
    display: none;
    grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 300px));
    gap: 12px;
    justify-content: start;
    margin-bottom: 1.5rem;
}

.paper-filter-grid.on { display: grid; }

.paper-filter-card {
    display: block;
    width: 100%;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: #fff;
    padding: 14px 16px;
    text-align: left;
    cursor: pointer;
    min-height: 64px;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.paper-filter-card:hover,
.paper-filter-card.active {
    border-color: var(--primary);
    box-shadow: 0 4px 14px rgba(30, 160, 243, .16);
    transform: translateY(-1px);
}

.paper-filter-title {
    color: var(--primary-dark);
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
    flex: 1 1 0;
    min-width: 0;
}

/* Rotulo de tipo dentro do card (Processo / Atividade / Papel) */
.card-type-label {
    font-size: .625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--text-muted);
    margin-top: 6px;
}

/* --- Card tematico compartilhado (Alcadas + Nova Alcada) --- */
.alcada-table-card,
.nova-alcada-card {
    border: 1px solid var(--primary-v200);
}
.alcada-table-card .card-header,
.nova-alcada-card .card-header {
    background-color: #fff;
    color: var(--primary-dark);
    border-bottom: 1px solid var(--primary-v100);
    padding: 10px 16px;
}
.alcada-table-card .card-header .bi,
.nova-alcada-card .card-header .bi { opacity: .85; }

.na-btn-voltar {
    background-color: var(--primary-v50);
    border: 1px solid var(--primary-v100);
    color: var(--primary-dark);
    font-size: .8125rem;
    padding: 3px 10px;
}
.na-btn-voltar:hover {
    background-color: var(--primary-v100);
    color: var(--primary-dark);
}
.nova-alcada-card .card-footer {
    background-color: var(--primary-v50);
    border-top: 1px solid var(--primary-v100);
    padding: 10px 16px;
}

/* --- Tabela tematica compartilhada --- */
.alcada-themed-table {
    width: 100%;
    min-width: 0;
    border-collapse: collapse;
}
.alcada-themed-table thead tr {
    background-color: var(--primary-v50);
    border-bottom: 2px solid var(--primary-v200);
}
.alcada-themed-table thead th {
    color: var(--primary-dark);
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .045em;
    padding: 9px 12px;
    white-space: nowrap;
    border-bottom: none;
}
.alcada-themed-table tbody tr {
    border-left: 4px solid transparent;
    border-bottom: 1px solid var(--border-color);
    transition: background-color .12s;
}
.alcada-themed-table tbody td {
    padding: 10px 12px;
    vertical-align: middle;
}

/* Linhas da tabela Alcadas existentes */
.alcada-themed-table tbody tr.alcada-base-row {
    border-left-color: var(--primary);
    background-color: #fff;
}
.alcada-themed-table tbody tr.alcada-cond-row {
    border-left-color: var(--primary-light);
    background-color: var(--primary-v50);
}
.alcada-themed-table tbody tr.alcada-empty-row {
    border-left-color: transparent;
}

/* Linhas da tabela Nova Alcada */
.alcada-themed-table tbody tr.na-primeira {
    border-left-color: var(--primary);
    background-color: #fff;
}
.alcada-themed-table tbody tr.na-condicao {
    border-left-color: var(--primary-light);
    background-color: var(--primary-v50);
}

/* Placeholder logica (linha base / primeira linha) */
.alcada-logica-placeholder,
.na-logica-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 5px 0;
    background: #f0f0f0;
    border: 1px dashed #ccc;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: .85rem;
    font-weight: 600;
    letter-spacing: .05em;
    user-select: none;
}

/* Select de logica (linhas de condicao) */
.na-logica-select {
    font-weight: 700;
    color: var(--primary-dark);
    background-color: var(--primary-v50);
    border-color: var(--primary-v200);
    text-align: center;
}
.na-logica-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 .2rem rgba(30,160,243,.2);
}

/* --- Nova Alcada: largura propria --- */
.nova-alcada-table { width: 100%; min-width: 0; }

/* --- Transferencia de tarefas --------------------------------------------- */
.transfer-page {
    max-width: 100%;
}

.transfer-page .card {
    border-color: var(--primary-v100);
    background: #fff;
    box-shadow: 0 12px 30px rgba(12, 66, 99, .06);
}

.transfer-page .card-header {
    border-bottom: 1px solid var(--primary-v100);
    background: #fff;
    color: var(--primary-dark);
    font-weight: 700;
}

.transfer-locator-grid {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(320px, 1.25fr) auto;
    gap: 16px;
    align-items: end;
}

.transfer-locator-step {
    display: grid;
    min-width: 0;
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 12px;
    align-items: end;
}

.transfer-locator-number {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    margin-bottom: 7px;
    border-radius: 50%;
    background: var(--primary-v50);
    color: var(--primary);
    font-weight: 700;
}

.transfer-locator-field {
    min-width: 0;
}

.transfer-locator-field > label {
    display: block;
    margin-bottom: 6px;
    color: var(--text-muted);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.transfer-locator-action {
    padding-bottom: 1px;
}

.transfer-locator-action .btn {
    min-height: 42px;
    white-space: nowrap;
}

.transfer-flow-summary {
    align-items: center;
    background: #fff;
    border: 1px solid var(--primary-v100);
    border-radius: var(--radius-md);
    display: flex;
    gap: 10px;
    padding: 10px 12px;
}

.transfer-flow-summary span {
    color: var(--text-muted);
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.transfer-flow-summary strong {
    color: var(--primary-dark);
    overflow-wrap: anywhere;
}

.transfer-card {
    border-color: var(--primary-v200);
}

.transfer-card .card-header {
    padding: 10px 16px;
}

.transfer-card .card-footer {
    background-color: var(--primary-v50);
    border-top: 1px solid var(--primary-v100);
    padding: 12px 16px;
}

.transfer-table-wrap {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    max-height: 420px;
    overflow: auto;
}

.transfer-table {
    margin-bottom: 0;
    min-width: 560px;
}

.transfer-table thead th {
    background-color: var(--primary-v50);
    color: var(--primary-dark);
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .045em;
    position: sticky;
    text-transform: uppercase;
    top: 0;
    z-index: 1;
}

.transfer-table tbody td {
    border-color: var(--border-color);
    vertical-align: middle;
}

.transfer-table tbody td small {
    max-width: 280px;
    overflow-wrap: anywhere;
}

.transfer-table .tarefa-transferencia-check {
    border: 2px solid #68798a;
    box-shadow: none;
}

.transfer-table .tarefa-transferencia-check:hover {
    border-color: var(--primary-dark);
}

.transfer-table .tarefa-transferencia-check:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 .2rem rgba(30, 160, 243, .2);
}

.transfer-table .tarefa-transferencia-check:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

.transfer-empty {
    align-items: center;
    background: #fff;
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-muted);
    display: flex;
    justify-content: center;
    min-height: 120px;
    padding: 18px;
    text-align: center;
}

/* --- Auditoria dos servicos ----------------------------------------------- */
.auditoria-page {
    max-width: 100%;
}

.auditoria-card .card-body {
    padding: 0;
}

.auditoria-table-wrap {
    border: 0;
    border-radius: 0;
    max-height: calc(100vh - 230px);
    min-height: 260px;
    overflow: auto;
}

.auditoria-table {
    table-layout: auto;
    width: 100%;
}

.auditoria-table.alcada-themed-table {
    min-width: 0;
}

.auditoria-id-col {
    width: 1%;
    white-space: nowrap;
}

.auditoria-detalhe-table {
    min-width: max-content;
}

.auditoria-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
}

.auditoria-table tbody td {
    overflow-wrap: anywhere;
    vertical-align: top;
}

/* --- Ajustes finais de responsividade -------------------------------------- */
@media (max-width: 1199.98px) {
    .alcada-themed-table {
        min-width: 760px;
    }
}

@media (max-width: 991.98px) {
    .admin-dashboard {
        min-height: auto;
    }

    .admin-action-card {
        flex-basis: 220px;
    }

    .process-stat-card,
    .robo-stat-card,
    .permission-check {
        min-width: 0;
    }

    .validated-user,
    .transfer-flow-summary,
    .robo-stat-card {
        flex-wrap: wrap;
    }

    .login-security-shell {
        grid-template-columns: 1fr;
    }

    .login-security-panel {
        min-height: 220px;
    }

    .process-hero-panel {
        align-items: stretch;
        flex-direction: column;
    }

    .transfer-locator-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .transfer-locator-action {
        grid-column: 1 / -1;
        padding-left: 44px;
    }

    .process-kpi-grid,
    .process-insight-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .smartdellys-hero {
        grid-template-columns: 1fr;
    }

    .smartdellys-service-strip {
        grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 245px));
    }
}

@media (max-width: 767.98px) {
    .ldap-settings-form .row,
    .import-config-card .row,
    .management-page .row,
    .process-management-page .row {
        --bs-gutter-x: 0.875rem;
        --bs-gutter-y: 0.875rem;
    }

    .settings-actions,
    .import-actions,
    .page-actions,
    .card-footer {
        align-items: stretch !important;
        justify-content: stretch !important;
    }

    .settings-actions > *,
    .import-actions > *,
    .page-actions > *,
    .card-footer > * {
        flex: 1 1 100%;
    }

    .transfer-table {
        min-width: 640px;
    }
}

@media (max-width: 575.98px) {
    .sidebar .nav-link,
    .sidebar .btn {
        font-size: 0.8rem;
        padding: 8px 10px;
    }

    .process-filter-grid,
    .activity-filter-grid,
    .paper-filter-grid,
    .selected-cards-bar,
    .organizer-services-inline {
        grid-template-columns: 1fr;
    }

    .admin-action-card {
        flex-basis: 100%;
        max-width: none;
    }

    .transfer-locator-grid {
        grid-template-columns: 1fr;
    }

    .transfer-locator-action {
        grid-column: auto;
        padding-left: 44px;
    }

    .transfer-locator-action .btn {
        width: 100%;
    }

    .auditoria-table-wrap,
    .transfer-table-wrap,
    .alcada-table-wrap {
        max-height: none;
    }

    .auditoria-card .card-body { padding: 0 !important; }

    .login-security-page {
        padding: 12px;
    }

    .login-security-card,
    .login-security-panel {
        padding: 20px;
    }

    .process-kpi-grid,
    .process-insight-grid {
        grid-template-columns: 1fr;
    }

    .process-detail-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .process-chart-row {
        grid-template-columns: 1fr 42px;
    }

    .process-chart-label {
        grid-column: 1 / -1;
    }

    .smartdellys-home {
        padding: 12px;
    }

    .smartdellys-hero-content,
    .smartdellys-access-card {
        min-height: auto;
        padding: 22px;
    }

    .smartdellys-service-strip {
        grid-template-columns: 1fr;
    }
}

/* --- Gestao de Riscos ------------------------------------------------------ */
.risk-config-page {
    width: 100%;
    max-width: none;
}

.risk-hero-panel {
    align-items: center;
    background: #fff;
    border: 1px solid var(--primary-v200);
    border-left: 5px solid var(--primary);
    border-radius: var(--radius-lg);
    display: flex;
    gap: 18px;
    justify-content: space-between;
    margin-bottom: 18px;
    padding: 20px 22px;
}

.risk-hero-panel h1 {
    margin-bottom: 6px;
}

.risk-hero-panel p {
    color: var(--text-muted);
    margin-bottom: 0;
}

.risk-table-wrap {
    max-width: 100%;
    overflow-x: auto;
}

.risk-config-table {
    table-layout: fixed;
    min-width: 1120px;
}

.risk-config-table input[type="number"] {
    min-width: 0;
    width: 100%;
}

.risk-config-table th:nth-child(1),
.risk-config-table td:nth-child(1) {
    width: 190px;
}

.risk-config-table th:nth-child(2),
.risk-config-table td:nth-child(2) {
    width: 330px;
}

.risk-config-table th:nth-child(3),
.risk-config-table td:nth-child(3),
.risk-config-table th:nth-child(4),
.risk-config-table td:nth-child(4),
.risk-config-table th:nth-child(5),
.risk-config-table td:nth-child(5),
.risk-config-table th:nth-child(6),
.risk-config-table td:nth-child(6) {
    width: 110px;
}

.risk-config-table th:nth-child(7),
.risk-config-table td:nth-child(7) {
    width: 80px;
}

.risk-config-table th:nth-child(8),
.risk-config-table td:nth-child(8) {
    width: 120px;
}

.risk-metric-name,
.risk-metric-description {
    overflow-wrap: normal;
    word-break: normal;
}

.risk-metric-name .small {
    overflow-wrap: anywhere;
}

.risk-actions-cell {
    white-space: nowrap;
}

.risk-save-button {
    align-items: center;
    display: inline-flex;
    justify-content: center;
    min-width: 42px;
    width: 42px;
    white-space: nowrap;
}

.process-permission-list {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    display: grid;
    gap: 8px;
    max-height: 280px;
    overflow: auto;
    padding: 10px;
}

.process-permission-list-compact {
    max-height: 220px;
    min-width: 320px;
}

.empresa-identificacao-wrap {
    align-items: center;
    display: flex;
    gap: 12px;
}

.empresa-identificacao-wrap .form-control {
    min-width: 0;
}

.empresa-principal-check {
    align-items: center;
    color: var(--primary-color);
    display: inline-flex;
    flex: 0 0 auto;
    font-weight: 700;
    gap: 6px;
    min-height: 38px;
    white-space: nowrap;
}

.empresa-principal-check input {
    height: 16px;
    width: 16px;
}

.empresa-principal-check-input {
    height: 18px;
    margin-top: 9px;
    width: 18px;
}

.empresa-principal-table-check,
.empresa-principal-table-edit input {
    height: 16px;
    width: 16px;
}

.empresa-principal-table-edit {
    align-items: center;
    display: inline-flex;
    min-height: 32px;
}

.icon-only-action {
    align-items: center;
    display: inline-flex;
    justify-content: center;
    min-width: 42px;
}

.settings-hub-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 300px));
    align-items: start;
    justify-content: start;
}

.settings-hub-card {
    width: 100%;
    max-width: 300px;
    min-height: 280px;
}

.settings-hub-card .card-body {
    align-items: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 28px 24px !important;
}

.settings-hub-card h2 {
    color: var(--primary);
    font-size: 1.1rem;
    font-weight: 800;
    margin: 12px 0 8px;
}

.settings-hub-card p {
    color: var(--text-muted);
    margin-bottom: 22px;
    max-width: 230px;
}

.settings-hub-icon {
    color: var(--primary);
    font-size: 2.7rem;
}

@media (max-width: 767.98px) {
    .empresa-identificacao-wrap {
        align-items: stretch;
        flex-direction: column;
        gap: 8px;
    }

    .risk-hero-panel {
        align-items: stretch;
        flex-direction: column;
    }

    .settings-hub-grid {
        grid-template-columns: 1fr;
    }

    .settings-hub-card {
        max-width: none;
    }
}

@media (min-width: 768px) and (max-width: 1199.98px) {
    .settings-hub-grid {
        grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 300px));
    }
}

.ops-dashboard {
    color: var(--text-color);
    padding-bottom: 36px;
}

.ops-header {
    align-items: center;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin-bottom: 18px;
}

.ops-header h1 {
    color: var(--primary);
    font-size: 1.65rem;
    font-weight: 800;
    margin: 0 0 4px;
}

.ops-header p {
    color: var(--text-muted);
    margin: 0;
}

.ops-kpi-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
    margin-bottom: 16px;
}

.ops-kpi {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-left: 4px solid #198754;
    border-radius: 8px;
    display: grid;
    gap: 4px;
    min-height: 132px;
    padding: 18px;
}

.ops-kpi i {
    color: var(--primary);
    font-size: 1.6rem;
}

.ops-kpi span,
.ops-detail-list span {
    color: var(--text-muted);
    font-size: .86rem;
    font-weight: 600;
}

.ops-kpi strong {
    color: var(--primary);
    font-size: 1.55rem;
    line-height: 1.1;
}

.ops-kpi small {
    color: var(--text-muted);
    overflow-wrap: anywhere;
}

.ops-kpi-alerta {
    border-left-color: #ffc107;
}

.ops-kpi-critico {
    border-left-color: #dc3545;
}

.ops-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr));
    margin-bottom: 16px;
}

.ops-grid-agent {
    align-items: start;
    margin-bottom: 0;
}

.ops-panel {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 16px;
    padding: 18px;
}

.ops-panel-title {
    align-items: center;
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
}

.ops-panel-title i {
    color: var(--primary);
    font-size: 1.25rem;
}

.ops-panel-title h2,
.ops-detail-list h3 {
    color: var(--primary);
    font-size: 1.02rem;
    font-weight: 800;
    margin: 0;
}

.ops-detail-list {
    display: grid;
    gap: 10px;
}

.ops-detail-list div {
    border-bottom: 1px solid var(--border-color);
    display: grid;
    gap: 3px;
    padding-bottom: 9px;
}

.ops-detail-list strong {
    color: var(--text-color);
    font-size: .94rem;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.ops-table {
    font-size: .9rem;
    margin-bottom: 0;
}

.ops-table th {
    color: var(--primary);
    font-size: .78rem;
    text-transform: uppercase;
}

.ops-sql {
    max-width: 520px;
    overflow-wrap: anywhere;
}

.ops-badge {
    border-radius: 999px;
    display: inline-flex;
    font-size: .75rem;
    font-weight: 800;
    padding: 4px 9px;
    text-transform: uppercase;
}

.ops-badge-ok {
    background: #d1e7dd;
    color: #0f5132;
}

.ops-badge-erro {
    background: #f8d7da;
    color: #842029;
}

.ops-badge-alerta {
    background: #fff3cd;
    color: #664d03;
}

@media (max-width: 767.98px) {
    .ops-header {
        align-items: stretch;
        flex-direction: column;
    }
}

/* ── Relatorio de Processos ──────────────────────────────────────────────── */
.relatorio-processos-page {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.relatorio-kpi-grid {
    grid-template-columns: repeat(5, 1fr);
}

/* Barra de concluidos (verde) */
.relatorio-chart-fill-success {
    background: linear-gradient(90deg, #198754 0%, #20c997 100%);
    height: 100%;
    border-radius: 4px;
    transition: width .4s ease;
}

/* Barra empilhada tarefas */
.relatorio-stacked-track {
    display: flex;
    height: 10px;
    border-radius: 4px;
    overflow: hidden;
    background: #e9ecef;
}

.relatorio-stacked-aberta {
    background: #ffc107;
    height: 100%;
    transition: width .4s ease;
}

.relatorio-stacked-concluida {
    background: #198754;
    height: 100%;
    transition: width .4s ease;
}

/* Legenda dos graficos empilhados */
.relatorio-legenda {
    display: flex;
    align-items: center;
    gap: .25rem;
    font-size: .78rem;
    color: #6c757d;
}

.relatorio-legenda-item {
    display: flex;
    align-items: center;
    gap: .35rem;
}

.relatorio-legenda-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 2px;
}

.relatorio-legenda-aberta {
    background: #ffc107;
}

.relatorio-legenda-concluida {
    background: #198754;
}

@media (max-width: 991.98px) {
    .relatorio-kpi-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 575.98px) {
    .relatorio-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}


/* ─── Arquivamento de Fluxos ────────────────────────────────────────────── */

.arquivamento-page {}

.arq-kpi-grid {
    grid-template-columns: repeat(5, 1fr);
}

.arq-faixas-card {
    grid-column: span 2;
}

.arq-criterio {
    max-width: 220px;
}

.arq-log-table th,
.arq-log-table td {
    padding: .35rem .6rem;
    font-size: .82rem;
}

.arq-log-row td:first-child {
    max-width: 200px;
}

/* barras de faixas */
.arq-bar-danger  { background: #dc3545; }
.arq-bar-warning { background: #ffc107; }
.arq-bar-info    { background: #0dcaf0; }
.arq-bar-success { background: #198754; }

.process-chart-label {
    min-width: 130px;
}

@media (max-width: 991.98px) {
    .arq-kpi-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .arq-faixas-card {
        grid-column: span 1;
    }
}

@media (max-width: 575.98px) {
    .arq-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ── Arquivamento: card de ação ────────────────────────────────────────── */
.arq-action-card { border-left: 3px solid var(--bs-warning); }
.arq-action-card .card-header { background: rgba(var(--bs-warning-rgb),.07); font-size:.9rem; }
.arq-action-body { padding: 1rem 1.25rem; }

/* ── Agendamento card ───────────────────────────────────────────────────── */
.arq-schedule-card { border-left: 3px solid var(--bs-info); }
.arq-schedule-card .card-header { background: rgba(var(--bs-info-rgb),.07); font-size:.9rem; }

/* ── SQL Agent card ─────────────────────────────────────────────────────── */
.arq-agent-card { border-left: 3px solid var(--bs-primary); }
.arq-agent-card .card-header { background: rgba(var(--bs-primary-rgb),.06); font-size:.9rem; }
.btn-xs { padding: .15rem .4rem; font-size: .75rem; line-height: 1.3; }


/* ── Performance dos Usuarios ────────────────────────────────────────────── */
.perf-usuarios-page {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.perf-kpi-grid {
    grid-template-columns: repeat(4, 1fr);
}

/* Cards campeões */
.perf-champion-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.perf-champion-card {
    display: flex;
    align-items: flex-start;
    gap: .85rem;
    padding: 1rem 1.1rem;
    border-radius: .5rem;
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    transition: box-shadow .2s;
}

.perf-champion-card:hover {
    box-shadow: 0 3px 10px rgba(0,0,0,.1);
}

.perf-award-icon {
    font-size: 1.8rem;
    line-height: 1;
    flex-shrink: 0;
}

.perf-champion-processo  .perf-award-icon { color: #f59e0b; }
.perf-champion-tarefa    .perf-award-icon { color: #22c55e; }
.perf-champion-solicitante .perf-award-icon { color: #3b82f6; }
.perf-champion-executor  .perf-award-icon { color: #f97316; }

.perf-champion-body {
    display: flex;
    flex-direction: column;
    gap: .25rem;
    min-width: 0;
}

.perf-champion-label {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--bs-secondary-color);
    font-weight: 600;
}

.perf-champion-name {
    font-size: .95rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.perf-champion-stat {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .25rem;
    font-size: .8rem;
}

/* Barras horizontais coloridas */
.perf-chart-fill-info {
    background: linear-gradient(90deg, #0dcaf0 0%, #0ea5e9 100%);
    height: 100%;
    border-radius: 4px;
    transition: width .4s ease;
}

.perf-chart-fill-warning {
    background: linear-gradient(90deg, #ffc107 0%, #f59e0b 100%);
    height: 100%;
    border-radius: 4px;
    transition: width .4s ease;
}

.perf-chart-fill-success {
    background: linear-gradient(90deg, #198754 0%, #20c997 100%);
    height: 100%;
    border-radius: 4px;
    transition: width .4s ease;
}

.perf-chart-fill-danger {
    background: linear-gradient(90deg, #dc3545 0%, #f97316 100%);
    height: 100%;
    border-radius: 4px;
    transition: width .4s ease;
}

/* Medalhas de ranking */
.perf-rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: .7rem;
    font-weight: 700;
    flex-shrink: 0;
}

.perf-medal-gold   { background: #f59e0b; color: #fff; }
.perf-medal-silver { background: #94a3b8; color: #fff; }
.perf-medal-bronze { background: #cd7f32; color: #fff; }

.perf-rank-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    font-size: .7rem;
    color: var(--bs-secondary-color);
    flex-shrink: 0;
}

@media (max-width: 1199.98px) {
    .perf-champion-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 991.98px) {
    .perf-kpi-grid     { grid-template-columns: repeat(2, 1fr); }
    .perf-champion-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 575.98px) {
    .perf-champion-grid { grid-template-columns: 1fr; }
}

/* ── Aprovações por Email ── */
.ae-kpi-grid { grid-template-columns: repeat(4, 1fr); }

.ae-detail-row > td { background: #f8f9fb; }

.ae-detail-box { padding: 12px; }

.ae-fields-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 8px 16px;
}

.ae-field {
    display: flex;
    flex-direction: column;
    padding: 8px 10px;
    background: #fff;
    border: 1px solid var(--primary-v100, #dbe3ef);
    border-radius: 6px;
}

.ae-field-label {
    font-size: .68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: var(--bs-secondary-color, #6c757d);
}

.ae-field-value {
    font-size: .85rem;
    word-break: break-word;
}

.ae-btn-opcao {
    font-size: .72rem;
    font-weight: 400;
    opacity: .85;
}

.ae-row-decidida > td { opacity: .55; }

@media (max-width: 991.98px) {
    .ae-kpi-grid { grid-template-columns: repeat(2, 1fr); }
}
.team-champion-atrasadas .perf-award-icon,
.master-metric-danger .perf-award-icon { color: #dc3545; }

/* Card mestre: novos indicadores devem ser renderizados com <metric-card>. */
.master-metric-tooltip {
    position: relative;
    cursor: help;
    outline: none;
}

.master-metric-tooltip::before,
.master-metric-tooltip::after {
    position: absolute;
    left: 50%;
    z-index: 1080;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
}

.master-metric-tooltip::after {
    content: attr(data-tooltip);
    bottom: calc(100% + 10px);
    width: max-content;
    max-width: 300px;
    padding: .6rem .75rem;
    border-radius: .4rem;
    background: #16384f;
    color: #fff;
    font-size: .78rem;
    font-weight: 400;
    line-height: 1.4;
    text-align: left;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .2);
    transform: translate(-50%, 5px);
}

.master-metric-tooltip::before {
    content: "";
    bottom: calc(100% + 3px);
    border: 7px solid transparent;
    border-top-color: #16384f;
    transform: translate(-50%, 5px);
}

.master-metric-tooltip:hover::before,
.master-metric-tooltip:hover::after,
.master-metric-tooltip:focus-visible::before,
.master-metric-tooltip:focus-visible::after {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

/* Consultar Arquivos de Log */
.log-file-card { overflow: visible; }
.log-problem-table { min-width: 1280px; }
.log-problem-table th { white-space: nowrap; }
.log-problem-table td { vertical-align: top; }
.log-problem-cell { min-width: 360px; max-width: 560px; }
.log-problem-summary {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.35;
}
.log-problem-cell details summary { cursor: pointer; user-select: none; }
.log-problem-cell details pre {
    margin: .6rem 0 0;
    padding: .75rem;
    max-width: 540px;
    max-height: 320px;
    overflow: auto;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    border-radius: 8px;
    background: #111827;
    color: #e5e7eb;
    font-size: .75rem;
}

.hero-metric-tooltip::after {
    top: calc(100% + 10px);
    bottom: auto;
    transform: translate(-50%, -5px);
}

.hero-metric-tooltip::before {
    top: calc(100% + 3px);
    bottom: auto;
    border-top-color: transparent;
    border-bottom-color: #16384f;
    transform: translate(-50%, -5px);
}

.hero-metric-tooltip:hover::before,
.hero-metric-tooltip:hover::after,
.hero-metric-tooltip:focus-visible::before,
.hero-metric-tooltip:focus-visible::after {
    transform: translate(-50%, 0);
}

.team-area-badge {
    background: #e7f5f3;
    color: #176b65;
    border: 1px solid #bfe4df;
    white-space: normal;
    text-align: left;
}

.team-task-table th {
    white-space: nowrap;
}

/* --- Acompanhar Fluxos (tela publica, sem login) ---------------------------- */
.acompanhar-fluxos-page {
    display: block;
    width: 100%;
    padding-bottom: 24px;
}

.acompanhar-fluxos-page .request-summary {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .07);
}

.acompanhar-fluxos-page .field {
    display: grid;
    gap: 6px;
    flex: 1 1 220px;
}

.avancar-fluxos-page,
.deadline-page {
    width: 100%;
}

.flow-query-card {
    width: 100%;
}

.flow-query-form {
    display: grid;
    grid-template-columns: minmax(220px, 360px) auto;
    align-items: end;
    justify-content: start;
    gap: 16px;
}

.flow-query-code {
    min-width: 0;
}

.flow-query-validation {
    grid-column: 1 / -1;
}

@media (max-width: 575.98px) {
    .process-hero-panel {
        align-items: flex-start;
        width: 100%;
        padding: 18px;
    }

    .process-hero-panel h1 {
        font-size: 1.55rem;
    }

    .flow-query-form {
        grid-template-columns: 1fr;
    }

    .flow-query-form button,
    .flow-query-form .primary-action {
        width: 100%;
    }
}

.acompanhar-fluxos-page .field label {
    color: var(--text-color);
    font-size: .875rem;
    font-weight: 500;
}

.acompanhar-fluxos-page .field input {
    width: 100%;
    min-height: 44px;
    border: 1px solid #c4c4c4;
    border-radius: var(--radius-sm);
    padding: 9px 12px;
    font-size: .9375rem;
}

.acompanhar-fluxos-page .field input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-v100);
    outline: none;
}

.acompanhar-fluxos-page .primary-action {
    min-height: 44px;
    min-width: 132px;
    border: 1px solid var(--primary);
    border-radius: var(--radius-sm);
    padding: 0 16px;
    background-color: var(--primary);
    color: #fff;
    font-size: .9375rem;
    font-weight: 600;
    white-space: nowrap;
}

.acompanhar-fluxos-page .primary-action:hover,
.acompanhar-fluxos-page .primary-action:focus {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    color: #fff;
}

.acompanhar-fluxos-page .secondary-action {
    display: inline-flex;
    min-height: 44px;
    min-width: 132px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0 16px;
    background-color: #fff;
    color: var(--text-color);
    font-size: .9375rem;
    font-weight: 600;
    text-decoration: none;
}

.acompanhar-fluxos-page .secondary-action:hover,
.acompanhar-fluxos-page .secondary-action:focus {
    border-color: #b9c3ca;
    background-color: #f3f5f7;
    color: var(--text-color);
}

.acompanhar-fluxos-page .notice {
    margin-top: 14px;
    border-radius: var(--radius-md);
    padding: 12px 13px;
    font-size: .9rem;
    font-weight: 600;
}

.acompanhar-fluxos-page .notice.success {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.acompanhar-fluxos-page .notice.error {
    background-color: #fce8e8;
    color: #c62828;
}

.acompanhar-fluxos-page .request-summary {
    margin-top: 18px;
    overflow: hidden;
}

.acompanhar-fluxos-page .request-hero {
    padding: 18px 24px 34px;
    background-color: var(--primary-dark);
    color: #fff;
}

.acompanhar-fluxos-page .request-hero h2 {
    margin: 0 0 4px;
    color: #fff;
    font-size: 1.25rem;
    line-height: 1.2;
    font-weight: 700;
}

.acompanhar-fluxos-page .request-hero p {
    margin: 0;
    color: #cfe3eb;
    font-size: .82rem;
    line-height: 1.32;
}

.acompanhar-fluxos-page .request-hero .flow-title {
    margin-top: 4px;
    color: #fff;
    font-weight: 600;
}

.acompanhar-fluxos-page .request-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 10px;
    padding: 0 24px 14px;
    margin-top: -18px;
}

.acompanhar-fluxos-page .request-info-card,
.acompanhar-fluxos-page .request-doc-card {
    min-width: 0;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 9px 10px;
    background: #fff;
}

.acompanhar-fluxos-page .request-info-card {
    display: grid;
    gap: 8px;
}

.acompanhar-fluxos-page .request-info-card p {
    margin: 0;
}

.acompanhar-fluxos-page .request-grid span,
.acompanhar-fluxos-page .request-doc-card span {
    display: block;
    color: var(--text-muted);
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.acompanhar-fluxos-page .request-grid strong {
    display: block;
    margin-top: 5px;
    color: var(--text-color);
    font-size: .86rem;
    font-weight: 700;
    line-height: 1.32;
}

.acompanhar-fluxos-page .request-grid ul {
    margin: 5px 0 0;
    padding-left: 18px;
}

.acompanhar-fluxos-page .request-grid li {
    color: var(--text-color);
    font-weight: 700;
    line-height: 1.35;
}

.acompanhar-fluxos-page .send-form {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding: 0 24px 18px;
}

.acompanhar-fluxos-page .flow-detail-section {
    padding: 4px 24px 18px;
}

.acompanhar-fluxos-page .flow-detail-section h3 {
    margin: 18px 0 8px;
    font-size: .98rem;
}

.acompanhar-fluxos-page .flow-steps {
    display: grid;
    gap: 8px;
}

.acompanhar-fluxos-page .flow-step {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px;
    background: #fff;
}

.acompanhar-fluxos-page .flow-step.current {
    border-color: var(--primary-v100);
    background: var(--primary-v50);
}

.acompanhar-fluxos-page .flow-step-order {
    display: inline-grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 50%;
    background: var(--primary-v50);
    color: var(--primary-dark);
    font-size: .86rem;
    font-weight: 700;
}

.acompanhar-fluxos-page .flow-step.current .flow-step-order {
    background: var(--primary);
    color: #fff;
}

.acompanhar-fluxos-page .flow-step.done {
    border-color: #bfe3c2;
    background: #f3faf4;
}

.acompanhar-fluxos-page .flow-step.done .flow-step-order {
    background: #2e7d32;
    color: #fff;
}

.acompanhar-fluxos-page .flow-step-prazo-vencido {
    color: #c62828 !important;
    font-weight: 700;
}

.acompanhar-fluxos-page .flow-step strong,
.acompanhar-fluxos-page .flow-step small {
    display: block;
}

.acompanhar-fluxos-page .flow-step strong {
    color: var(--text-color);
    font-size: .95rem;
    line-height: 1.25;
}

.acompanhar-fluxos-page .flow-step small {
    color: var(--text-muted);
    margin-top: 3px;
    font-size: .82rem;
}

.flow-task-summary .card-header {
    color: #fff;
}

.flow-task-title {
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
}

.flow-task-process {
    display: block;
    margin-top: 3px;
    color: rgba(255, 255, 255, .78);
    font-size: .82rem;
    font-weight: 600;
}

.avancar-fluxos-page .card,
.avancar-fluxos-page .flow-path-section {
    border-color: var(--primary-v100);
    background: #fff;
    box-shadow: 0 12px 30px rgba(12, 66, 99, .06);
}

.avancar-fluxos-page .card-header {
    border-bottom: 1px solid var(--primary-v100);
    background: #fff !important;
    color: var(--primary-dark) !important;
    font-weight: 700;
}

.avancar-fluxos-page .flow-task-title {
    color: var(--primary-dark);
}

.avancar-fluxos-page .flow-task-process {
    color: var(--text-muted);
}

.avancar-fluxos-page .card-header .badge:not(.bg-primary):not(.bg-danger) {
    background: var(--primary-v50) !important;
    color: var(--primary-dark) !important;
}

.gerador-relatorios-page .card {
    border-color: var(--primary-v100);
    background: #fff;
    box-shadow: 0 12px 30px rgba(12, 66, 99, .06);
}

.gerador-relatorios-page .card-header {
    border-bottom: 1px solid var(--primary-v100);
    background: #fff !important;
    color: var(--primary-dark) !important;
    font-weight: 700;
}

.acompanhar-fluxos-page .card,
.acompanhar-fluxos-page .request-summary {
    border-color: var(--primary-v100);
    background: #fff;
    box-shadow: 0 12px 30px rgba(12, 66, 99, .06);
}

.acompanhar-fluxos-page .card-header {
    border-bottom: 1px solid var(--primary-v100);
    background: #fff;
    color: var(--primary-dark);
    font-weight: 700;
}

.acompanhar-fluxos-page .request-hero {
    border-bottom: 1px solid var(--primary-v100);
    padding: 16px 24px;
    background: #fff;
    color: var(--primary-dark);
}

.acompanhar-fluxos-page .request-hero h2,
.acompanhar-fluxos-page .request-hero .flow-title {
    color: var(--primary-dark);
}

.acompanhar-fluxos-page .request-hero p {
    color: var(--text-muted);
}

.acompanhar-fluxos-page .request-grid {
    margin-top: 0;
    padding-top: 16px;
}

.acompanhar-fluxos-page .request-info-card,
.acompanhar-fluxos-page .request-doc-card {
    border-color: var(--primary-v100);
}

/* Conexoes Webservices segue a linguagem visual de Acompanhar Fluxos */
.webservice-settings-page {
    color: var(--text-color);
    font-family: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

.webservice-settings-page form.ldap-settings-form {
    display: flex;
    flex-direction: column;
}

.webservice-settings-page .webservice-request-wizard-card {
    order: 1;
}

.webservice-request-list {
    display: grid;
    gap: 12px;
}

.webservice-request-card {
    border: 1px solid var(--primary-v100);
    border-radius: var(--radius-sm);
    background: #fff;
    padding: 14px 16px;
}

.webservice-request-summary {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr) auto auto;
    gap: 12px;
    align-items: center;
}

.webservice-request-summary h3 {
    margin: 0 0 3px;
    color: var(--primary-v700);
    font-size: 1rem;
    font-weight: 700;
}

.request-method-badge {
    display: inline-flex;
    justify-content: center;
    border-radius: 6px;
    padding: 6px 8px;
    color: #fff;
    background: #64748b;
    font-family: monospace;
    font-weight: 700;
}

.request-method-get { background: #0f9f79; }
.request-method-post { background: #d88900; }
.request-method-put, .request-method-patch { background: #2563eb; }
.request-method-delete { background: #dc3545; }

.webservice-request-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin: 10px 0 0 86px;
    color: var(--text-muted);
    font-size: .8rem;
}

.webservice-request-meta strong {
    color: var(--primary-v700);
    font-weight: 700;
}

.webservice-request-meta code {
    color: var(--primary-v700);
    font-size: inherit;
}

.integration-hub-section {
    margin-top: 28px;
}

.integration-hub-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--primary-v100);
}

.integration-hub-heading > i {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    color: var(--primary-v700);
    background: var(--primary-v050);
    font-size: 1.2rem;
}

.integration-hub-heading h2 {
    margin: 0;
    color: var(--primary-v700);
    font-size: 1.1rem;
}

.integration-hub-heading p {
    margin: 2px 0 0;
    color: var(--text-muted);
    font-size: .88rem;
}

.integration-package-summary {
    display: flex;
    flex-wrap: wrap;
    gap: .65rem 1.25rem;
    padding: .8rem 1rem;
    border: 1px solid var(--primary-v100);
    border-radius: .65rem;
    background: var(--primary-v050);
    font-size: .88rem;
}

.integration-package-summary span {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
}

.integration-version-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding: .75rem 0;
    border-bottom: 1px solid var(--primary-v100);
}

.integration-version-row:last-child {
    border-bottom: 0;
}

.webservice-request-empty {
    display: grid;
    justify-items: center;
    gap: 6px;
    border: 1px dashed var(--primary-v200);
    border-radius: var(--radius-sm);
    padding: 40px 20px;
    color: var(--text-muted);
}

.webservice-request-empty i {
    color: var(--primary-v500);
    font-size: 2rem;
}

.request-wizard-progress {
    display: grid;
    grid-template-columns: repeat(6, minmax(110px, 1fr));
    gap: 6px;
    margin-bottom: 20px;
}

.request-wizard-progress button {
    border: 0;
    border-bottom: 3px solid var(--primary-v100);
    padding: 9px 6px;
    color: var(--text-muted);
    background: transparent;
    font-size: .78rem;
    font-weight: 700;
}

.request-wizard-progress button.active {
    border-color: var(--primary-v500);
    color: var(--primary-v700);
}

.request-wizard-progress button.completed {
    border-color: #17a673;
    color: #117a57;
}

.request-import-panel {
    border: 1px solid var(--primary-v100);
    border-radius: var(--radius-sm);
    padding: 14px;
    background: var(--primary-v50);
}

.wizard-header-list {
    display: grid;
    gap: 8px;
}

.wizard-header-row {
    display: grid;
    grid-template-columns: minmax(180px, .8fr) minmax(260px, 1.2fr) 38px;
    gap: 8px;
}

.request-review {
    border: 1px solid var(--primary-v100);
    border-radius: var(--radius-sm);
    padding: 18px;
}

.request-review-line {
    display: flex;
    gap: 12px;
    align-items: center;
    overflow-wrap: anywhere;
}

.request-review dl {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin: 18px 0 0;
}

.request-review dl div {
    border-top: 1px solid var(--primary-v100);
    padding-top: 10px;
}

.request-review dt { color: var(--text-muted); font-size: .75rem; text-transform: uppercase; }
.request-review dd { margin: 3px 0 0; font-weight: 600; }

.webservice-settings-page .webservice-connections-card {
    order: 1;
}

.webservice-settings-page .webservice-catalog-card {
    order: 2;
}

.webservice-settings-page .endpoint-catalog-card {
    order: 2;
}

.webservice-settings-page .authentication-profiles-card {
    order: 3;
}

.webservice-settings-page .settings-actions {
    order: 4;
}

.webservice-settings-page .webservice-connections-card {
    overflow: hidden;
}

.webservice-settings-page .webservice-connections-card > .card-body {
    padding: 22px 24px !important;
}

.webservice-settings-page .webservice-connections-card > .card-body > p {
    color: var(--text-muted);
    font-size: .9rem;
}

.webservice-settings-page .webservice-add-action {
    min-height: 36px;
    border: 1px solid var(--primary-v200);
    border-radius: var(--radius-sm);
    padding: 0 12px;
    background: var(--primary-v50);
    color: var(--primary-dark);
    font-size: .86rem;
    font-weight: 700;
}

.webservice-settings-page .webservice-add-action:hover,
.webservice-settings-page .webservice-add-action:focus {
    border-color: var(--primary);
    background: var(--primary-v100);
    color: var(--primary-dark);
}

.webservice-settings-page #tabelaWebservices {
    border-color: var(--primary-v100);
    color: var(--text-color);
    font-size: .875rem;
}

.webservice-settings-page #tabelaWebservices thead th {
    border-color: var(--primary-v100);
    background: var(--primary-v50);
    color: var(--primary-dark);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .035em;
    padding: 11px 12px;
    text-transform: uppercase;
    vertical-align: middle;
}

.webservice-settings-page #tabelaWebservices td {
    border-color: var(--primary-v100);
    background: #fff;
    padding: 12px;
}

.webservice-settings-page #tabelaWebservices [data-webservice-main]:hover td,
.webservice-settings-page #tabelaWebservices [data-webservice-main]:hover + .webservice-detail-row td {
    background: #fbfdff;
}

.webservice-settings-page #tabelaWebservices [data-webservice-main] td {
    border-bottom-width: 0;
    padding-bottom: 9px;
}

.webservice-settings-page #tabelaWebservices .webservice-detail-row td {
    border-top-width: 0;
    border-bottom-width: 2px;
    padding-top: 5px;
    padding-bottom: 14px;
}

.webservice-settings-page #tabelaWebservices [data-webservice-main].is-editing td,
.webservice-settings-page #tabelaWebservices .webservice-detail-row.is-editing td {
    background: var(--primary-v50);
}

.webservice-field-label {
    display: block;
    margin-bottom: 5px;
    color: var(--text-muted);
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .035em;
    text-transform: uppercase;
}

.webservice-detail-grid {
    display: grid;
    grid-template-columns:
        minmax(210px, 1.35fr)
        minmax(170px, 1fr)
        minmax(135px, .75fr)
        minmax(170px, 1fr)
        minmax(210px, 1.15fr)
        minmax(85px, .45fr);
    gap: 12px;
    align-items: start;
}

.webservice-detail-headers {
    grid-column: 1 / -1;
    order: 6;
}

.webservice-detail-auth-header {
    order: 1;
}

.webservice-detail-secret {
    order: 2;
}

.webservice-detail-user {
    order: 3;
}

.webservice-detail-user-secret {
    order: 4;
}

.webservice-detail-timeout {
    max-width: 150px;
    order: 5;
}

.webservice-header-rows {
    display: grid;
    gap: 8px;
}

.webservice-header-row {
    display: grid;
    grid-template-columns: minmax(180px, .8fr) minmax(180px, .8fr) minmax(240px, 1.4fr) 38px;
    gap: 8px;
    align-items: center;
}

.webservice-header-row [data-header-name] {
    grid-column: 1;
}

.webservice-header-row [data-custom-header-name] {
    grid-column: 2;
}

.webservice-header-row [data-header-value] {
    grid-column: 2 / 4;
}

.webservice-header-row.is-custom [data-header-value] {
    grid-column: 3;
}

.webservice-header-row [data-remove-header] {
    grid-column: 4;
}

.webservice-payload-rows {
    display: grid;
    gap: 8px;
}

.webservice-payload-row {
    display: grid;
    grid-template-columns: minmax(125px, .85fr) minmax(150px, 1.15fr) 34px;
    gap: 6px;
    align-items: center;
    border-bottom: 1px solid var(--primary-v100);
    padding-bottom: 8px;
}

.webservice-payload-row [data-payload-name],
.webservice-payload-row [data-custom-payload-name] {
    grid-column: 1;
}

.webservice-payload-row [data-payload-value] {
    grid-column: 2;
    grid-row: 1;
}

.webservice-payload-row [data-remove-payload-field] {
    grid-column: 3;
    grid-row: 1;
}

.webservice-settings-page #tabelaWebservices .form-control,
.webservice-settings-page #tabelaWebservices .form-select,
.webservice-settings-page #tabelaWebservices .input-group-text {
    border-color: #c4c4c4;
    border-radius: var(--radius-sm);
    font-size: .875rem;
}

.webservice-settings-page #tabelaWebservices .form-control:focus,
.webservice-settings-page #tabelaWebservices .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-v100);
}

.webservice-settings-page #tabelaWebservices .form-control:disabled,
.webservice-settings-page #tabelaWebservices .form-select:disabled {
    border-color: #d8e0e5;
    background: #f4f6f7;
    color: #53636c;
    cursor: not-allowed;
    opacity: 1;
}

.webservice-settings-page #tabelaWebservices .form-check-input:disabled {
    cursor: not-allowed;
    opacity: .65;
}

.webservice-settings-page #tabelaWebservices .input-group > :not(:first-child) {
    border-bottom-left-radius: 0;
    border-top-left-radius: 0;
}

.webservice-settings-page #tabelaWebservices .input-group > :not(:last-child) {
    border-bottom-right-radius: 0;
    border-top-right-radius: 0;
}

.webservice-settings-page #tabelaWebservices .btn {
    border-radius: var(--radius-sm);
}

.webservice-settings-page #tabelaWebservices [data-remove-webservice]:disabled {
    opacity: .35;
}

.webservice-settings-page #webservicesVazio {
    border-color: var(--primary-v100) !important;
    background: var(--primary-v50);
    color: var(--text-muted) !important;
}

.webservice-settings-page .settings-actions {
    border-top: 1px solid var(--primary-v100);
    padding-top: 16px;
}

@media (max-width: 575.98px) {
    .webservice-settings-page .webservice-connections-card > .card-body {
        padding: 16px !important;
    }

    .webservice-settings-page .settings-actions .primary-action,
    .webservice-settings-page .settings-actions .secondary-action {
        width: 100%;
    }
}

@media (max-width: 1399.98px) {
    .webservice-detail-grid {
        grid-template-columns: repeat(3, minmax(180px, 1fr));
    }
}

@media (max-width: 767.98px) {
    .webservice-detail-grid {
        grid-template-columns: minmax(210px, 1fr);
    }

    .webservice-detail-timeout {
        max-width: none;
    }

    .webservice-header-row {
        grid-template-columns: 1fr 42px;
    }

    .webservice-header-row [data-header-name],
    .webservice-header-row [data-custom-header-name],
    .webservice-header-row [data-header-value],
    .webservice-header-row.is-custom [data-header-value] {
        grid-column: 1;
    }

    .webservice-header-row [data-remove-header] {
        grid-column: 2;
        grid-row: 1;
    }

    .webservice-payload-row {
        grid-template-columns: 1fr 42px;
    }

    .webservice-payload-row [data-payload-name],
    .webservice-payload-row [data-custom-payload-name],
    .webservice-payload-row [data-payload-value] {
        grid-column: 1;
        grid-row: auto;
    }

    .webservice-payload-row [data-remove-payload-field] {
        grid-column: 2;
        grid-row: 1;
    }
}

.flow-path {
    display: grid;
    gap: 8px;
}

.flow-path .flow-step {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px;
    background: #fff;
}

.flow-path .flow-step.current {
    border-color: var(--primary-v100);
    background: var(--primary-v50);
}

.flow-path .flow-step.done {
    border-color: #bfe3c2;
    background: #f3faf4;
}

.flow-path .flow-step-order {
    display: inline-grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 50%;
    background: var(--primary-v50);
    color: var(--primary-dark);
    font-size: .86rem;
    font-weight: 700;
}

.flow-path .flow-step.current .flow-step-order {
    background: var(--primary);
    color: #fff;
}

.flow-path .flow-step.done .flow-step-order {
    background: #2e7d32;
    color: #fff;
}

.flow-path .flow-step strong,
.flow-path .flow-step small {
    display: block;
}

.flow-path .flow-step strong {
    color: var(--text-color);
    font-size: .95rem;
    line-height: 1.25;
}

.flow-path .flow-step small {
    margin-top: 3px;
    color: var(--text-muted);
    font-size: .82rem;
}

.flow-path-section {
    margin-top: 18px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 4px 24px 18px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .07);
}

.flow-path-section h3 {
    display: flex;
    align-items: center;
    margin: 18px 0 8px;
    color: var(--text-color);
    font-size: .98rem;
    font-weight: 700;
}

.flow-path-section h3 .badge {
    color: var(--text-color) !important;
    font-size: .7rem;
}

.flow-next-routes {
    margin-top: 18px;
    border-top: 1px solid var(--border-color);
    padding-top: 14px;
}

.flow-next-routes h4 {
    margin: 0 0 8px;
    color: var(--text-color);
    font-size: .86rem;
    font-weight: 700;
}

.flow-next-list {
    display: grid;
    gap: 8px;
}

.flow-next-route {
    display: grid;
    grid-template-columns: minmax(110px, auto) 20px minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    border: 1px dashed var(--primary-v200);
    border-radius: var(--radius-md);
    padding: 9px 10px;
    background: var(--primary-v50);
}

.flow-next-option {
    color: var(--primary-dark);
    font-size: .82rem;
    font-weight: 700;
}

.flow-next-arrow {
    color: var(--primary-v700);
    text-align: center;
}

.flow-next-destinations {
    display: flex;
    min-width: 0;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.flow-next-destination {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    gap: 6px;
    border-left: 3px solid var(--primary);
    padding: 5px 8px;
    background: #fff;
    color: var(--text-color);
    font-size: .82rem;
    font-weight: 700;
}

.flow-next-destinations small,
.flow-next-empty {
    color: var(--text-muted);
    font-size: .76rem;
}

@media (max-width: 699px) {
    .acompanhar-fluxos-page .request-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .acompanhar-fluxos-page .send-form {
        flex-direction: column;
    }

    .flow-path-section {
        padding-right: 14px;
        padding-left: 14px;
    }

    .flow-next-route {
        grid-template-columns: minmax(0, 1fr) 20px minmax(0, 1.5fr);
    }
}

/* Atualizacao de Prazos */
.deadline-page { max-width: 100%; }
.deadline-health {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 280px;
    border: 1px solid #f1c77d;
    border-radius: var(--radius-md);
    padding: 12px 14px;
    background: #fff8e8;
    color: #805500;
}
.deadline-health.is-ok { border-color: #a7dbc2; background: #edf9f3; color: #17633e; }
.deadline-health i { font-size: 1.35rem; }
.deadline-health strong, .deadline-health span { display: block; }
.deadline-health span { margin-top: 2px; font-size: .78rem; }
.deadline-filter-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(92px, 120px)) minmax(240px, 1fr) auto;
    align-items: end;
    gap: 12px;
}
.deadline-filter-grid .form-label,
.deadline-action-grid .form-label { margin-bottom: 5px; font-size: .82rem; font-weight: 600; }
.deadline-table th { white-space: nowrap; }
.deadline-table td { vertical-align: middle; }
.deadline-table td small { display: block; margin-top: 3px; color: var(--text-muted); }
.deadline-description { min-width: 250px; max-width: 420px; }
.deadline-row-blocked { background: #fafafa; color: #6b7280; }
.deadline-action-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 16px; }
.deadline-update-fields { display: grid; grid-template-columns: minmax(210px, .45fr) minmax(260px, 1fr); gap: 12px; }
.deadline-sla-fields { display: grid; grid-template-columns: minmax(150px, .55fr) 120px minmax(240px, 1fr); gap: 12px; }
.deadline-simulation { border: 1px solid #b9ddcf; border-radius: var(--radius-md); padding: 12px; background: #f1faf6; }
.deadline-simulation > strong { display: block; margin-bottom: 8px; color: #17633e; }
.deadline-simulation > div { display: grid; grid-template-columns: 110px 1fr 1fr; gap: 10px; padding: 6px 0; border-top: 1px solid #d9eee5; font-size: .84rem; }
@media (max-width: 1199.98px) {
    .deadline-filter-grid { grid-template-columns: repeat(4, minmax(90px, 1fr)); }
    .deadline-search-text { grid-column: span 3; }
    .deadline-action-grid { grid-template-columns: 1fr; }
}
@media (max-width: 767.98px) {
    .deadline-filter-grid, .deadline-update-fields, .deadline-sla-fields { grid-template-columns: 1fr; }
    .deadline-search-text { grid-column: auto; }
    .deadline-health { min-width: 0; }
    .deadline-simulation > div { grid-template-columns: 1fr; }
}
.conference-page {
    --conference-green: #16836c;
    --conference-red: #c53b4b;
    --conference-blue: #2673b8;
}

.conference-hero-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(92px, 1fr));
    gap: 1px;
    border: 1px solid #dfe5ea;
    background: #dfe5ea;
    min-width: 340px;
}

.conference-hero-metrics > div {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 72px;
    padding: 10px 14px;
    background: #fff;
}

.conference-hero-metrics strong {
    color: #06496c;
    font-size: 1.35rem;
    line-height: 1;
}

.conference-hero-metrics span {
    margin-top: 5px;
    color: #66727d;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
}

.conference-hero-metrics .is-danger strong,
.conference-hero-metrics .is-danger span {
    color: var(--conference-red);
}

.conference-search {
    display: grid;
    grid-template-columns: minmax(180px, 260px) max-content;
    align-items: end;
    gap: 12px;
}

.conference-flow-summary {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 100px;
    gap: 18px;
    padding: 12px 14px;
    border-left: 3px solid #1f9fe5;
    background: #f4f9fc;
}

.conference-flow-summary div,
.conference-task-meta span {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.conference-flow-summary span,
.conference-task-meta span {
    color: #6c7780;
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.conference-flow-summary strong,
.conference-task-meta strong {
    overflow: hidden;
    margin-top: 3px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.conference-task-grid {
    display: grid;
    grid-template-columns: minmax(280px, .8fr) minmax(0, 1.2fr);
    align-items: end;
    gap: 20px;
}

.conference-task-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    padding-bottom: 3px;
}

.conference-workspace {
    display: grid;
    grid-template-columns: minmax(250px, 320px) minmax(0, 1fr);
    align-items: start;
    gap: 16px;
}

.conference-documents {
    position: sticky;
    top: 12px;
    overflow: hidden;
}

.conference-document-list {
    display: flex;
    flex-direction: column;
}

.conference-document-item {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    width: 100%;
    min-height: 64px;
    padding: 10px 12px;
    border: 0;
    border-bottom: 1px solid #e6eaed;
    background: #fff;
    color: #243642;
    text-align: left;
}

.conference-document-item:not(:disabled):hover,
.conference-document-item.active {
    background: #edf7fd;
}

.conference-document-item.active {
    box-shadow: inset 3px 0 #1f9fe5;
}

.conference-document-item.is-missing {
    background: #fff7f7;
}

.conference-document-status {
    color: var(--conference-green);
    font-size: 1.2rem;
    text-align: center;
}

.conference-document-item.is-missing .conference-document-status {
    color: var(--conference-red);
}

.conference-document-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.conference-document-copy strong,
.conference-document-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.conference-document-copy small {
    margin-top: 3px;
    color: #73808a;
}

.conference-content {
    min-width: 0;
}

.conference-document-panel {
    overflow: hidden;
    border: 1px solid #dfe4e8;
    background: #fff;
}

.conference-document-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    border-bottom: 1px solid #dfe4e8;
}

.conference-document-heading span {
    color: #0c6089;
    font-size: .72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.conference-document-heading h2 {
    margin: 3px 0;
    font-size: 1rem;
}

.conference-document-heading p {
    margin: 0;
    color: #6f7a83;
    font-size: .8rem;
}

.conference-progress {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 16px;
    border-bottom: 1px solid #e5e9ec;
    background: #f7f9fa;
}

.conference-progress span {
    padding: 3px 7px;
    border: 1px solid #d9e0e4;
    background: #fff;
    color: #66727c;
    font-size: .72rem;
    font-weight: 700;
}

.conference-progress .is-approved { color: var(--conference-green); }
.conference-progress .is-rejected { color: var(--conference-red); }
.conference-progress .is-na { color: var(--conference-blue); }

.conference-criteria {
    display: flex;
    flex-direction: column;
}

.conference-criterion {
    border-bottom: 1px solid #e5e9ec;
}

.conference-criterion.has-error {
    box-shadow: inset 3px 0 var(--conference-red);
}

.conference-criterion-main {
    display: grid;
    grid-template-columns: 32px minmax(220px, 1fr) auto;
    align-items: start;
    gap: 12px;
    padding: 14px 16px;
}

.conference-criterion-order {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border: 1px solid #cfd8de;
    color: #315365;
    font-size: .8rem;
    font-weight: 800;
}

.conference-criterion-copy {
    min-width: 0;
}

.conference-criterion-copy p {
    margin: 4px 0;
    color: #5f6b74;
    font-size: .85rem;
}

.conference-criterion-copy small {
    color: #7b858c;
}

.conference-vote {
    display: grid;
    grid-template-columns: repeat(3, 42px);
    gap: 5px;
}

.conference-vote-button {
    display: grid;
    width: 42px;
    height: 38px;
    place-items: center;
    border: 1px solid #ccd5da;
    background: #fff;
    color: #65737c;
}

.conference-vote-button span {
    position: absolute;
    overflow: hidden;
    width: 1px;
    height: 1px;
    clip: rect(0 0 0 0);
}

.conference-vote-button:disabled {
    opacity: .55;
}

.conference-vote-button.is-approved.active {
    border-color: var(--conference-green);
    background: var(--conference-green);
    color: #fff;
}

.conference-vote-button.is-rejected.active {
    border-color: var(--conference-red);
    background: var(--conference-red);
    color: #fff;
}

.conference-vote-button.is-na.active {
    border-color: var(--conference-blue);
    background: var(--conference-blue);
    color: #fff;
}

.conference-observation {
    padding: 0 16px 14px 60px;
}

.conference-observation textarea {
    min-height: 86px;
    resize: vertical;
}

.conference-observation small {
    color: #75818a;
}

.conference-no-criteria {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 24px 16px;
    color: #5e6c75;
}

.conference-save-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid #cfe1da;
    background: #f1f9f6;
}

.conference-save-bar div {
    display: flex;
    flex-direction: column;
}

.conference-save-bar span {
    margin-top: 2px;
    color: #65756e;
    font-size: .8rem;
}

@media (max-width: 1100px) {
    .conference-workspace {
        grid-template-columns: 1fr;
    }

    .conference-documents {
        position: static;
    }

    .conference-document-list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .conference-hero-metrics,
    .conference-flow-summary,
    .conference-task-grid,
    .conference-task-meta,
    .conference-document-list {
        grid-template-columns: 1fr;
        min-width: 0;
    }

    .conference-search {
        grid-template-columns: 1fr;
    }

    .conference-criterion-main {
        grid-template-columns: 32px minmax(0, 1fr);
    }

    .conference-vote {
        grid-column: 2;
    }

    .conference-observation {
        padding-left: 60px;
    }

    .conference-save-bar {
        align-items: stretch;
        flex-direction: column;
    }
}

/* AcompanharFluxos — formulario somente leitura */
.acompanhar-fluxos-page .ff-root .ff-vazio { display: none; }
.acompanhar-fluxos-page .ff-root.ff-mostrar-vazios .ff-vazio { display: revert; }
.acompanhar-fluxos-page .ff-root.ff-mostrar-vazios li.ff-vazio { display: list-item; }
.acompanhar-fluxos-page .ff-box { border: 1px solid #dfe6ec; border-radius: 8px; padding: 12px 14px; margin: 10px 0; background: #fff; }
.acompanhar-fluxos-page .ff-box-titulo { font-weight: 700; color: var(--primary-dark, #0c4263); margin-bottom: 8px; }
.acompanhar-fluxos-page .ff-campo { margin-bottom: 10px; }
.acompanhar-fluxos-page .ff-campo label { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .03em; color: #5d6b78; margin-bottom: 2px; }
.acompanhar-fluxos-page .ff-valor { font-weight: 600; white-space: pre-wrap; word-break: break-word; }
.acompanhar-fluxos-page .ff-texto { color: #5d6b78; font-size: .9rem; margin: 6px 0; }
.acompanhar-fluxos-page .ff-separador { margin: 8px 0; color: var(--primary-dark, #0c4263); font-weight: 700; }
.acompanhar-fluxos-page .ff-separador hr { margin: 4px 0; }
.acompanhar-fluxos-page .ff-tab-content { border: 1px solid #dfe6ec; border-top: 0; padding: 10px 14px; background: #fff; border-radius: 0 0 8px 8px; }
.acompanhar-fluxos-page .ff-table th { background: #f3f6f8; font-size: .8rem; }
.acompanhar-fluxos-page .ff-tabela { margin: 10px 0; }

/* AcompanharFluxos — busca por processo (chips) e grade de resultados */
.processos-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.processos-chips:empty { margin-top: 0; }
.processo-chip {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--primary-v50, #e8f4fd); color: var(--primary-dark, #0c4263);
    border-radius: 999px; padding: 4px 10px; font-size: .8rem;
}
.processo-chip button {
    background: none; border: none; color: inherit; font-size: 1rem; line-height: 1;
    cursor: pointer; padding: 0; opacity: .7;
}
.processo-chip button:hover { opacity: 1; }
#gradeFluxosTabela td, #gradeFluxosTabela th { vertical-align: middle; }

/* AcompanharFluxos — Localizar Fluxo: campos em fileira (flex), alinhados a esquerda, cada
   um com sua largura propria — sem numero fixo de colunas, entao um novo campo no futuro so
   entra na fila sem precisar reajustar isto. Some (d-none) sem deixar vao vazio. */
.acompanhar-fluxos-page .transfer-locator-grid {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-end;
    justify-content: flex-start;
    gap: 16px 20px;
}
.acompanhar-fluxos-page .transfer-locator-step {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 12px;
    align-items: end;
    flex: 0 0 auto;
}
/* +3ch pra "Nome do Processo" nao ficar atras da setinha do select. */
.acompanhar-fluxos-page #GrupoOpcaoBusca { width: calc(210px + 3ch); }
.acompanhar-fluxos-page #GrupoStatusProcesso { width: 210px; }
.acompanhar-fluxos-page #GrupoBuscaFluxo { width: 320px; }
.acompanhar-fluxos-page #GrupoBuscaProcesso { width: 400px; } /* Processos: 320px + 25% */
.acompanhar-fluxos-page .transfer-locator-step-action { width: auto; }

/* Campos maiores (altura/fonte) neste localizador. */
.acompanhar-fluxos-page .transfer-locator-field .form-control,
.acompanhar-fluxos-page .transfer-locator-field .form-select {
    min-height: 46px;
    font-size: 1rem;
}
.acompanhar-fluxos-page .transfer-locator-action .primary-action {
    min-height: 46px;
}

@media (max-width: 900px) {
    .acompanhar-fluxos-page .transfer-locator-grid { flex-direction: column; align-items: stretch; }
    .acompanhar-fluxos-page #GrupoOpcaoBusca,
    .acompanhar-fluxos-page #GrupoStatusProcesso,
    .acompanhar-fluxos-page #GrupoBuscaFluxo,
    .acompanhar-fluxos-page #GrupoBuscaProcesso {
        width: 100%;
    }
}

/* Modal de detalhe do fluxo (Acompanhar Fluxos): 25% maior que o modal-lg padrao (800px -> 1000px) */
@media (min-width: 992px) {
    .modal-fluxo-detalhe { --bs-modal-width: 1000px; max-width: 1000px; }
}

/* Filtros de busca no menu lateral (sidebar de 230px): campos empilhados, sem numeracao */
.sidebar-filtros { margin-bottom: 14px; }
.sidebar-filtros-form .transfer-locator-grid { display: flex; flex-direction: column; gap: 10px; }
.sidebar-filtros-form .transfer-locator-step { display: block; width: 100%; }
.sidebar-filtros-form .transfer-locator-number { display: none; }
.sidebar-filtros-form label { display: block; font-size: .68rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 3px; }
.sidebar-filtros-form .form-control, .sidebar-filtros-form .form-select { font-size: .82rem; padding: .3rem .5rem; min-height: 0; }
.sidebar-filtros-form .primary-action, .sidebar-filtros-form .btn-primary { width: 100%; border: 0; border-radius: 6px; background: var(--primary); color: #fff; font-weight: 700; padding: .45rem .75rem; }
.sidebar-filtros-form .primary-action:hover, .sidebar-filtros-form .btn-primary:hover { background: var(--primary-dark); color: #fff; }
.sidebar-filtros-form .usuario-autocomplete-dropdown { max-width: 100%; }
.sidebar-filtros-form .processos-chips { margin-top: 6px; }
.sidebar-filtros-form .text-danger { font-size: .72rem; }

/* Aviso "defina os filtros" some quando ha grade ou resultado visivel */
.acompanhar-fluxos-page:has(#grade-fluxos-anexar:not(.d-none)) .hint-vazio,
.acompanhar-fluxos-page:has(#fluxoInfo:not(.d-none)) .hint-vazio,
.acompanhar-fluxos-page:has(#grade-fluxos-avancar:not(.d-none)) .hint-vazio,
.acompanhar-fluxos-page:has(#areaResultado:not(.d-none)) .hint-vazio,
.acompanhar-fluxos-page:has(#grade-fluxos-processo:not(.d-none)) .hint-vazio,
.acompanhar-fluxos-page:has(.request-summary) .hint-vazio { display: none; }
.sidebar-filtros-form .flow-query-form { display: block; grid-template-columns: none; }
.sidebar-filtros-form, .sidebar-filtros-form .transfer-locator-field { min-width: 0; }
.acompanhar-fluxos-page:has(#grade-fluxos-publicar:not(.d-none)) .hint-vazio { display: none; }


/* Cabecalho do menu lateral: usuario + empresa ativa */
.sidebar-user { align-items: center; color: var(--primary-dark); display: flex; font-weight: 700; gap: 8px; justify-content: center; margin-bottom: 12px; }
.sidebar-user .bi { color: var(--primary); font-size: 1.3rem; }
.sidebar-empresa { background: rgba(0, 0, 0, 0.035); border: 1px solid var(--border-color); border-radius: 10px; display: grid; gap: 8px 10px; grid-template-columns: auto 1fr; padding: 10px 12px; text-align: left; }
.sidebar-empresa-icone { color: var(--primary); font-size: 1.25rem; grid-row: 1; line-height: 1.2; }
.sidebar-empresa-texto { display: flex; flex-direction: column; min-width: 0; }
.sidebar-empresa-texto small { color: #6c757d; font-size: 0.68rem; letter-spacing: .06em; text-transform: uppercase; }
.sidebar-empresa-texto strong { color: var(--primary-dark); font-size: 0.85rem; line-height: 1.25; overflow-wrap: anywhere; }
.sidebar-empresa-trocar { border: 1px solid var(--primary); border-radius: 6px; color: var(--primary); font-size: 0.78rem; font-weight: 600; grid-column: 1 / -1; padding: 4px 8px; text-align: center; text-decoration: none; }
.sidebar-empresa-trocar:hover { background: var(--primary); color: #fff; }
