body{font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}.header-button,.btn-primary,.btn-secondary{display:inline-flex;align-items:center;gap:.5rem;border-radius:.75rem;padding:.62rem .9rem;font-size:.875rem;font-weight:700;border:1px solid #e2e8f0}.header-button svg,.btn-primary svg{width:1rem;height:1rem}.btn-primary{color:#fff;background:linear-gradient(90deg,#0284c7,#1d4ed8);border-color:#0284c7;box-shadow:0 10px 24px rgba(3,105,161,.18)}.btn-primary:hover{background:linear-gradient(90deg,#0ea5e9,#2563eb)}.btn-secondary{background:#f8fafc;color:#475569}.input{width:100%;border:1px solid #e2e8f0;border-radius:.75rem;background:#f8fafc;padding:.65rem .75rem;font-size:.875rem;outline:none}.input:focus{border-color:#0ea5e9;box-shadow:0 0 0 3px rgba(14,165,233,.12)}label{display:block;font-size:.75rem;text-transform:uppercase;font-weight:700;letter-spacing:.04em;color:#64748b;margin-bottom:.45rem}th,td{padding:1rem}thead{background:#f8fafc;color:#64748b}tbody tr{border-top:1px solid #f1f5f9}tbody tr:hover{background:#f8fafc}.content-card,.form-card,.login-card{background:#fff;border-color:#f1f5f9}.login-card{border-color:#e2e8f0}.progress-wrap,.progress-track{background:#e2e8f0}.progress-track{color:#1e293b}.metric-card{border:1px solid}.metric-indigo{background:#eef2ff;border-color:#e0e7ff;color:#4338ca}.metric-rose{background:#fff1f2;border-color:#ffe4e6;color:#be123c}.metric-amber{background:#fffbeb;border-color:#fef3c7;color:#b45309}.metric-emerald{background:#ecfdf5;border-color:#d1fae5;color:#047857}.metric-card div:last-child{color:#64748b}.department-card,.info-card{background:#f8fafc;border:1px solid #e2e8f0}.info-card p{display:flex;justify-content:space-between;gap:1rem;font-size:.875rem;margin:.35rem 0}.info-card p span{color:#64748b}.xml-result.ok,.tag-card.ok{background:#ecfdf5;border:1px solid #a7f3d0;color:#065f46}.xml-result.pending,.tag-card.pending{background:#fff1f2;border:1px solid #fecdd3;color:#9f1239}.dept{display:inline-block;background:#f1f5f9;border-radius:.45rem;padding:.3rem .5rem;font-size:.7rem;font-weight:800;text-transform:uppercase}.status{display:inline-block;padding:.32rem .55rem;border-radius:999px;font-size:.72rem;font-weight:700}.pendente{background:#fff1f2;color:#be123c}.em-andamento{background:#fffbeb;color:#b45309}.concluído{background:#ecfdf5;color:#047857}.icon-button{padding:.48rem;border-radius:.55rem;background:#f8fafc;border:1px solid #e2e8f0}.icon-button svg{width:1rem;height:1rem}.flash.success{background:#ecfdf5;border:1px solid #a7f3d0;color:#047857}.flash.error{background:#fff1f2;border:1px solid #fecdd3;color:#be123c}.progress-striped{background-image:linear-gradient(45deg,rgba(255,255,255,.18) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.18) 50%,rgba(255,255,255,.18) 75%,transparent 75%);background-size:1rem 1rem;animation:stripe 1s linear infinite}@keyframes stripe{to{background-position:-1rem 0}}
html.dark body{background:#0f172a;color:#e2e8f0}html.dark header,html.dark .content-card,html.dark .form-card,html.dark .login-card{background:#172033;border-color:#334155}html.dark h1,html.dark h2,html.dark h3,html.dark h4,html.dark strong,html.dark .font-bold,html.dark .font-black,html.dark .font-semibold{color:#f8fafc}html.dark .text-slate-900,html.dark .text-slate-800{color:#f8fafc!important}html.dark .text-slate-500,html.dark .text-slate-400{color:#94a3b8!important}html.dark .header-button,html.dark .btn-secondary,html.dark .icon-button{background:#1e293b;color:#e2e8f0;border-color:#475569}html.dark .text-indigo-700{color:#c7d2fe!important}html.dark .bg-indigo-50{background:#1e1b4b!important}html.dark .text-emerald-700{color:#86efac!important}html.dark .bg-emerald-50{background:#052e16!important}html.dark .input{background:#0f172a;color:#e2e8f0;border-color:#475569}html.dark label{color:#94a3b8}html.dark thead,html.dark tbody tr:hover{background:#1e293b;color:#cbd5e1}html.dark tbody tr{border-color:#334155}html.dark .progress-wrap,html.dark .progress-track{background:#334155;color:#f8fafc}html.dark .department-card,html.dark .info-card{background:#1e293b;border-color:#334155}html.dark .dept{background:#334155;color:#e2e8f0}html.dark .metric-indigo{background:#1e1b4b;border-color:#3730a3}html.dark .metric-rose{background:#4c0519;border-color:#9f1239}html.dark .metric-amber{background:#451a03;border-color:#92400e}html.dark .metric-emerald{background:#022c22;border-color:#065f46}html.dark .metric-card div:last-child{color:#cbd5e1}html.dark .xml-result.ok,html.dark .tag-card.ok{background:#022c22;border-color:#065f46;color:#a7f3d0}html.dark .xml-result.pending,html.dark .tag-card.pending{background:#4c0519;border-color:#9f1239;color:#fecdd3}html.dark .flash.success{background:#022c22;color:#a7f3d0;border-color:#065f46}html.dark .flash.error{background:#4c0519;color:#fecdd3;border-color:#9f1239}

.xml-tag-table{min-width:1280px}
.xml-tag-grid{display:grid;grid-template-columns:140px 150px minmax(280px,1fr) 220px 90px 96px 120px 130px;align-items:center}
.xml-tag-header>div{padding:.9rem 1rem;min-width:0;grid-column:auto!important}
.xml-tag-row{min-height:76px}
.xml-tag-cell{padding:.85rem 1rem;min-width:0}
.xml-tag-cell input[readonly]{overflow:hidden;text-overflow:ellipsis}
.xml-tag-cell select{white-space:nowrap}
.xml-flag-cell{display:flex;align-items:center;justify-content:center}
.xml-flag-control{display:inline-flex;align-items:center;justify-content:center;gap:.45rem;margin:0;padding:.45rem .6rem;border:1px solid #e2e8f0;border-radius:.75rem;background:#f8fafc;color:#64748b;font-size:.68rem;font-weight:800;letter-spacing:.02em;text-transform:uppercase;cursor:pointer;min-width:82px}
.xml-flag-control input{width:1rem;height:1rem}
.xml-row-actions{display:flex;justify-content:flex-end;align-items:center;gap:.5rem;white-space:nowrap}
html.dark .xml-flag-control{background:#0f172a;border-color:#334155;color:#94a3b8}

.user-directory{display:flex;flex-direction:column;gap:1rem;padding:1rem;background:#f8fafc}
.user-card-row{display:grid;grid-template-columns:minmax(240px,1.4fr) minmax(135px,.75fr) minmax(140px,.75fr) minmax(165px,1fr) minmax(135px,.75fr) minmax(125px,.65fr) minmax(220px,auto);gap:1rem;align-items:center;padding:1.1rem 1.25rem;border:1px solid #e2e8f0;border-radius:1rem;background:#fff;box-shadow:0 1px 2px rgba(15,23,42,.04)}
.user-identity{display:flex;align-items:center;gap:.9rem;min-width:0}
.user-avatar{width:2.75rem;height:2.75rem;border-radius:1rem;display:flex;align-items:center;justify-content:center;flex-shrink:0;background:#eef2ff;color:#4f46e5;border:1px solid #e0e7ff;font-weight:900;font-size:.8rem}
.user-meta-field{min-width:0}
.user-meta-field select,.user-meta-field input{width:100%}
.user-meta-grid{display:grid;grid-template-columns:minmax(120px,.7fr) minmax(150px,1fr) minmax(120px,.7fr);gap:.85rem;align-items:end}
.user-field-label{display:block;margin:0 0 .3rem;font-size:.62rem;font-weight:900;letter-spacing:.08em;text-transform:uppercase;color:#94a3b8}
.user-status-cell{display:flex;justify-content:center}
.user-status-toggle{display:inline-flex;align-items:center;gap:.5rem;padding:.45rem .65rem;border:1px solid #e2e8f0;border-radius:999px;background:#f8fafc;font-size:.7rem;font-weight:900;text-transform:uppercase;color:#64748b;margin:0;cursor:pointer}
.user-status-toggle input{width:1rem;height:1rem}
.user-actions{display:flex;align-items:center;justify-content:flex-end;gap:.45rem;flex-wrap:wrap}
html.dark .user-directory{background:#0f172a}
html.dark .user-card-row{background:#172033;border-color:#334155}
html.dark .user-avatar{background:#1e1b4b;border-color:#3730a3;color:#c7d2fe}
html.dark .user-status-toggle{background:#0f172a;border-color:#334155;color:#94a3b8}

.ui-readable,
.status,
.dept,
.xml-result,
.tag-card,
.xml-flag-control,
.user-status-toggle,
button,
.btn-primary,
.btn-secondary,
.header-button{word-break:normal;overflow-wrap:normal;hyphens:none;line-height:1.25}
.status,
.dept,
.xml-result,
.tag-card,
.xml-flag-control,
.user-status-toggle{display:inline-flex;align-items:center;justify-content:center;gap:.35rem;white-space:normal;text-align:center;min-width:max-content}
.ui-chip{display:inline-flex;align-items:center;justify-content:center;gap:.35rem;min-width:max-content;padding:.35rem .6rem;border-radius:.65rem;line-height:1.2;white-space:normal;word-break:normal;overflow-wrap:normal;hyphens:none;text-align:center}
.ui-status-pill{display:inline-flex;align-items:center;justify-content:center;align-self:flex-start;gap:.35rem;min-width:6.75rem;padding:.35rem .7rem;border-radius:999px;line-height:1.15;white-space:normal;word-break:normal;overflow-wrap:normal;hyphens:none;text-align:center}
.ui-table-text{word-break:normal;overflow-wrap:break-word;line-height:1.35}
.ui-truncate{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.flow-card{min-height:5.5rem;line-height:1.25;word-break:normal;overflow-wrap:normal;hyphens:none}
.flow-card span:first-child{word-break:normal;overflow-wrap:normal;hyphens:none}
.xml-tag-cell,
.user-meta-field,
td,
th{word-break:normal}
.xml-tag-cell input,
.xml-tag-cell select,
.user-meta-field input,
.user-meta-field select{min-width:0}

@media (max-width:1180px){.user-card-row{grid-template-columns:1fr 1fr}.user-identity,.user-actions{grid-column:1 / -1}.user-status-cell{justify-content:flex-start}.user-actions{justify-content:flex-start}}
@media (max-width:760px){.user-card-row{grid-template-columns:1fr}.user-meta-grid{grid-template-columns:1fr 1fr}.user-status-cell{justify-content:flex-start}.user-actions{justify-content:flex-start}}
@media (max-width:640px){.user-meta-grid{grid-template-columns:1fr}.user-card-row{padding:1rem}.user-actions>*{flex:1;justify-content:center}.xml-tag-table{min-width:1180px}.ui-status-pill{min-width:5.75rem}.flow-card{min-height:auto}}

*{scrollbar-width:thin;scrollbar-color:#cbd5e1 transparent}
*::-webkit-scrollbar{width:.55rem;height:.55rem}
*::-webkit-scrollbar-track{background:transparent}
*::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:999px;border:2px solid transparent;background-clip:content-box}
*::-webkit-scrollbar-thumb:hover{background:#94a3b8;background-clip:content-box}
html.dark *{scrollbar-color:#475569 transparent}
html.dark *::-webkit-scrollbar-thumb{background:#475569;background-clip:content-box}
.smooth-transition{transition:all .2s cubic-bezier(.4,0,.2,1)}
.saas-card{background:#fff;border:1px solid rgba(226,232,240,.9);border-radius:.75rem;box-shadow:0 1px 2px rgba(15,23,42,.05)}
html.dark .saas-card{background:#0f172a;border-color:rgba(30,41,59,.9);box-shadow:none}
#app-sidebar{isolation:isolate;height:100vh}
#app-sidebar .sidebar-nav{min-height:0}
#app-sidebar .sidebar-link svg{flex-shrink:0}
#app-sidebar .sidebar-link:focus-visible,.sidebar-collapse-floating:focus-visible{outline:2px solid #6366f1;outline-offset:2px}
body.sidebar-collapsed #app-sidebar .sidebar-user-card form{display:flex;justify-content:center;width:100%}
body.sidebar-collapsed #app-sidebar .sidebar-user-card form button{display:flex;height:2.25rem;width:2.25rem;align-items:center;justify-content:center}
@media (min-width:1024px){#app-sidebar{position:sticky;top:0;height:100vh;align-self:flex-start}}

html:not(.dark) body{background:#fff;color:#1e293b}
html:not(.dark) main{background:#fff}
.af-page{background:#fff;color:#1e293b}
.af-shell{background:#fff;color:#1e293b}
.af-content{min-width:0;flex:1 1 auto}
.af-section{width:100%}
.af-card{background:#fff;border:1px solid #e2e8f0;border-radius:.75rem;box-shadow:0 1px 2px rgba(15,23,42,.05)}
.af-panel{background:#fff;border:1px solid #e2e8f0;border-radius:.75rem;box-shadow:0 1px 2px rgba(15,23,42,.05)}
.af-progress-card{background:#020617;border:1px solid #1e293b;border-radius:.75rem;color:#fff;box-shadow:0 1px 2px rgba(15,23,42,.05)}
.af-stat-card{min-height:7rem;border:1px solid #e2e8f0;border-radius:.75rem;background:#fff;color:#0f172a;padding:1rem;box-shadow:0 1px 2px rgba(15,23,42,.05)}
.af-stat-card-danger{border-color:#fecdd3}
.af-stat-label{color:#64748b;font-size:.6875rem;font-weight:800}
.af-stat-value{display:block;margin-top:.75rem;color:#020617;font-size:1.875rem;line-height:2.25rem;font-weight:900}
.af-stat-subtext{margin-top:.5rem;color:#64748b;font-size:.6875rem;font-weight:700}
.af-table-wrapper{overflow-x:auto;background:#fff}
.af-table{width:100%;background:#fff;color:#1e293b;border-color:#e2e8f0}
.af-table-header{background:#fff;color:#64748b;border-color:#e2e8f0}
.af-table-row{background:#fff;border-color:#f1f5f9;color:#1e293b}
.af-table-row:hover{background:#f8fafc}
.af-table-cell{padding:1rem;color:inherit;border-color:inherit}
.af-muted{color:#64748b}
.af-title{color:#0f172a;font-weight:900;letter-spacing:0}
.af-page-title{color:#0f172a;font-weight:900;letter-spacing:0}
.af-section-title{color:#0f172a;font-weight:900;letter-spacing:0}
.af-subtitle{color:#475569}
.af-label{color:#64748b;font-weight:800;text-transform:uppercase;letter-spacing:.04em}
.af-form-card{background:#fff;border:1px solid #e2e8f0;border-radius:.75rem;box-shadow:0 1px 2px rgba(15,23,42,.05)}
.af-form-grid{display:grid;gap:.75rem}
.af-sidebar{background:#fff;border-color:#e2e8f0;color:#1e293b}
.af-sidebar-header{background:#fff;border-color:#f1f5f9}
.af-sidebar-item{color:#475569}
.af-sidebar-item-active{background:#f0f9ff;color:#0284c7;box-shadow:inset 3px 0 0 #0ea5e9}
.af-sidebar-logout{color:#be123c}
.af-sidebar-logout:hover{background:#fff1f2;color:#9f1239}
.af-sidebar-group-label{color:#94a3b8}
.af-submenu,.af-sidebar-submenu{border-left:1px solid #e2e8f0}
.af-submenu-item,.af-sidebar-subitem{color:#475569}
.af-btn{display:inline-flex;align-items:center;justify-content:center;gap:.45rem;border-radius:.5rem;padding:.5rem .85rem;font-size:.75rem;font-weight:800;line-height:1.25}
.af-btn-primary{display:inline-flex;align-items:center;justify-content:center;gap:.45rem;border-radius:.5rem;background:linear-gradient(90deg,#0284c7,#1d4ed8);color:#fff;font-weight:800}
.af-btn-primary:hover{background:linear-gradient(90deg,#0ea5e9,#2563eb)}
.af-btn-secondary{display:inline-flex;align-items:center;justify-content:center;gap:.45rem;border-radius:.5rem;background:#fff;border:1px solid #e2e8f0;color:#334155;font-weight:800}
.af-btn-danger{display:inline-flex;align-items:center;justify-content:center;gap:.45rem;border-radius:.5rem;background:#e11d48;color:#fff;font-weight:800}
.af-btn-danger:hover{background:#f43f5e}
.af-btn-ghost,.af-btn-icon{display:inline-flex;align-items:center;justify-content:center;gap:.45rem;border-radius:.5rem;color:#475569;font-weight:800}
.af-btn-icon{width:2rem;height:2rem;padding:0}
.af-badge{display:inline-flex;align-items:center;justify-content:center;gap:.35rem;border-radius:999px;background:#f1f5f9;color:#475569;border:1px solid #e2e8f0;font-weight:800}
.af-badge-success{background:#ecfdf5;color:#047857;border-color:#a7f3d0}
.af-badge-warning{background:#fffbeb;color:#b45309;border-color:#fde68a}
.af-badge-danger{background:#fff1f2;color:#be123c;border-color:#fecdd3}
.af-badge-info{background:#eff6ff;color:#1d4ed8;border-color:#bfdbfe}
.af-badge-neutral{background:#f1f5f9;color:#475569;border-color:#e2e8f0}
.af-input{background:#fff;border:1px solid #e2e8f0;color:#0f172a;border-radius:.5rem}
.af-select{background:#fff;border:1px solid #e2e8f0;color:#0f172a;border-radius:.5rem}
.af-textarea{background:#fff;border:1px solid #e2e8f0;color:#0f172a;border-radius:.5rem}
.af-checkbox{border:1px solid #cbd5e1;border-radius:.25rem;background:#fff;color:#0284c7}
.af-empty-state{border:1px dashed #cbd5e1;border-radius:.75rem;background:#f8fafc;color:#64748b}
.af-divider{border-color:#e2e8f0}
.af-tooltip{border-radius:.5rem;background:#0f172a;color:#fff;padding:.4rem .55rem;font-size:.7rem;font-weight:800}
.af-scrollbar{scrollbar-width:thin;scrollbar-color:#cbd5e1 transparent}
.af-focus-ring:focus-visible,.af-focus:focus-visible{outline:2px solid #0ea5e9;outline-offset:2px}
html.dark .af-page{background:#020617;color:#f1f5f9}
html.dark .af-shell{background:#020617;color:#f1f5f9}
html.dark .af-card,html.dark .af-panel{background:#0f172a;border-color:#1e293b;color:#f1f5f9;box-shadow:none}
html.dark .af-progress-card{background:#020617;border-color:#1e293b;color:#fff;box-shadow:none}
html.dark .af-stat-card{background:#0f172a;border-color:#1e293b;color:#f8fafc;box-shadow:none}
html.dark .af-stat-card-danger{border-color:rgba(244,63,94,.45)}
html.dark .af-stat-label{color:#cbd5e1}
html.dark .af-stat-value{color:#fff}
html.dark .af-stat-subtext{color:#cbd5e1}
html.dark .af-table-wrapper{background:#0f172a}
html.dark .af-table{background:#0f172a;color:#f1f5f9;border-color:#1e293b}
html.dark .af-table-header{background:#020617;color:#cbd5e1;border-color:#1e293b}
html.dark .af-table-row{background:#0f172a;border-color:#1e293b;color:#f1f5f9}
html.dark .af-table-row:hover{background:#1e293b}
html.dark .af-muted{color:#cbd5e1}
html.dark .af-title{color:#f8fafc}
html.dark .af-page-title{color:#f8fafc}
html.dark .af-section-title{color:#f8fafc}
html.dark .af-subtitle{color:#cbd5e1}
html.dark .af-label{color:#cbd5e1}
html.dark .af-form-card{background:#0f172a;border-color:#1e293b;color:#f1f5f9;box-shadow:none}
html.dark .af-sidebar{background:#020617;border-color:#1e293b;color:#f1f5f9}
html.dark .af-sidebar-header{background:#020617;border-color:#1e293b}
html.dark .af-sidebar-item{color:#cbd5e1}
html.dark .af-sidebar-item-active{background:rgba(14,165,233,.1);color:#7dd3fc}
html.dark .af-sidebar-logout{color:#fb7185}
html.dark .af-sidebar-logout:hover{background:rgba(244,63,94,.12);color:#fecdd3}
html.dark .af-sidebar-group-label{color:#94a3b8}
html.dark .af-submenu,html.dark .af-sidebar-submenu{border-left-color:#334155}
html.dark .af-submenu-item,html.dark .af-sidebar-subitem{color:#cbd5e1}
html.dark .af-btn-secondary{background:#0f172a;border-color:#334155;color:#e2e8f0}
html.dark .af-btn-secondary:hover{background:#1e293b;color:#fff}
html.dark .af-btn-ghost,html.dark .af-btn-icon{color:#cbd5e1}
html.dark .af-btn-ghost:hover,html.dark .af-btn-icon:hover{background:#1e293b;color:#fff}
html.dark .af-badge{background:#1e293b;border-color:#334155;color:#cbd5e1}
html.dark .af-badge-success{background:rgba(16,185,129,.1);border-color:rgba(16,185,129,.35);color:#86efac}
html.dark .af-badge-warning{background:rgba(245,158,11,.1);border-color:rgba(245,158,11,.35);color:#fcd34d}
html.dark .af-badge-danger{background:rgba(244,63,94,.1);border-color:rgba(244,63,94,.35);color:#fb7185}
html.dark .af-badge-info{background:rgba(14,165,233,.1);border-color:rgba(14,165,233,.35);color:#7dd3fc}
html.dark .af-badge-neutral{background:#1e293b;border-color:#334155;color:#cbd5e1}
html.dark .af-input,html.dark .af-select,html.dark .af-textarea{background:#020617;border-color:#334155;color:#f1f5f9}
html.dark .af-checkbox{background:#020617;border-color:#475569;color:#38bdf8}
html.dark .af-empty-state{background:#020617;border-color:#334155;color:#cbd5e1}
html.dark .af-divider{border-color:#1e293b}
html.dark .af-scrollbar{scrollbar-color:#475569 transparent}
html.dark :where(div,section,article,form,main,aside,header,footer,nav,table,thead,tbody,tr,td,th,dialog)[class*="bg-white"],
html.dark :where(div,section,article,form,main,aside,header,footer,nav,table,thead,tbody,tr,td,th,dialog)[class*="bg-gray-50"]{background-color:#0f172a}
html.dark :where(div,section,article,form,main,aside,header,footer,nav,table,thead,tbody,tr,td,th,dialog)[class*="bg-slate-50"]{background-color:#020617}
html.dark :where(div,section,article,form,main,aside,header,footer,nav,table,thead,tbody,tr,td,th,dialog)[class*="border-slate-100"],
html.dark :where(div,section,article,form,main,aside,header,footer,nav,table,thead,tbody,tr,td,th,dialog)[class*="border-slate-200"]{border-color:#1e293b}
html.dark :where(table,thead,tbody,tr,td,th){background-color:transparent;color:#f1f5f9;border-color:#1e293b}
html.dark thead,html.dark :where(thead,tr)[class*="bg-slate-50"]{background:#020617;color:#cbd5e1}
html.dark tbody{background:#0f172a;color:#f1f5f9}
html.dark tbody tr:hover{background:#1e293b}
html.dark :where(input:not([type="checkbox"]):not([type="radio"]),select,textarea){background:#020617;color:#f1f5f9;border-color:#334155}
html.dark :where(input:not([type="checkbox"]):not([type="radio"]),select,textarea)::placeholder{color:#64748b}
html.dark :where(label,.af-label){color:#cbd5e1}
html.dark :where(.text-slate-500,.text-gray-500,.text-zinc-500){color:#cbd5e1}
html.dark :where(.text-slate-400,.text-gray-400,.text-zinc-400){color:#94a3b8}
html.dark :where(.text-slate-900,.text-slate-800,.text-gray-900,.text-gray-800,.text-zinc-900,.text-zinc-800){color:#f8fafc}
html.dark :where(.hover\:bg-slate-50:hover,.hover\:bg-gray-50:hover,.hover\:bg-white:hover){background-color:#1e293b}
#app-sidebar.af-sidebar{background:#fff!important;color:#0f172a!important;border-color:#e2e8f0!important}
#app-sidebar .af-sidebar-header,#app-sidebar .sidebar-footer{background:#fff!important;border-color:#e2e8f0!important;color:#0f172a!important}
#app-sidebar .af-sidebar-item,.sidebar-link.af-sidebar-item{background:transparent!important;color:#334155!important}
#app-sidebar .af-sidebar-item:hover,.sidebar-link.af-sidebar-item:hover{background:#f1f5f9!important;color:#0f172a!important}
#app-sidebar .af-sidebar-item-active,.sidebar-link.af-sidebar-item.is-active{background:#e0f2fe!important;color:#0369a1!important;box-shadow:inset 3px 0 0 #0ea5e9}
#app-sidebar .af-sidebar-logout{color:#be123c!important}
#app-sidebar .af-sidebar-logout:hover{background:#fff1f2!important;color:#9f1239!important}
#app-sidebar .af-sidebar-group-label{color:#64748b!important}
#app-sidebar .af-submenu-item,#app-sidebar .af-sidebar-subitem{color:#475569!important}
.af-card,.af-panel,.af-form-card{background:#fff!important;color:#0f172a!important;border-color:#e2e8f0!important}
.af-stat-card{background:#fff!important;color:#0f172a!important;border-color:#e2e8f0!important}
.af-stat-card-danger{border-color:#fecdd3!important}
.af-input,.af-select,.af-textarea{background:#fff!important;color:#0f172a!important;border-color:#cbd5e1!important}
.af-table-wrapper{background:#fff!important;color:#0f172a!important}
.af-table{background:#fff!important;color:#0f172a!important;border-color:#e2e8f0!important}
.af-table thead,.af-table-header{background:#f1f5f9!important;color:#334155!important;border-color:#e2e8f0!important}
.af-table tbody{background:#fff!important;color:#0f172a!important}
.af-table-row,.af-table tbody tr.af-table-row{background:#fff!important;color:#1e293b!important;border-color:#e2e8f0!important}
.af-table-row td,.af-table-row th{background:inherit!important;color:inherit;border-color:inherit}
.af-table-row:hover,.af-table tbody tr.af-table-row:hover{background:#f1f5f9!important;color:#0f172a!important}
.af-table-muted{color:#475569!important}
.af-view-toggle{display:flex;align-items:center;border:1px solid #cbd5e1;border-radius:.5rem;background:#f1f5f9;color:#334155;padding:.125rem}
.af-view-toggle-button{display:inline-flex;align-items:center;gap:.25rem;border-radius:.375rem;padding:.25rem .625rem;font-size:.75rem;font-weight:800;color:#475569}
.af-view-toggle-button:hover{background:#e2e8f0;color:#0f172a}
.af-view-toggle-button.is-active{background:#fff;color:#0284c7;box-shadow:0 1px 2px rgba(15,23,42,.08)}
html.dark #app-sidebar.af-sidebar{background:#020617!important;color:#f8fafc!important;border-color:#1e293b!important}
html.dark #app-sidebar .af-sidebar-header,html.dark #app-sidebar .sidebar-footer{background:#020617!important;border-color:#1e293b!important;color:#f8fafc!important}
html.dark #app-sidebar .af-sidebar-item,html.dark .sidebar-link.af-sidebar-item{background:transparent!important;color:#e2e8f0!important}
html.dark #app-sidebar .af-sidebar-item:hover,html.dark .sidebar-link.af-sidebar-item:hover{background:rgba(30,41,59,.7)!important;color:#fff!important}
html.dark #app-sidebar .af-sidebar-item-active,html.dark .sidebar-link.af-sidebar-item.is-active{background:rgba(14,165,233,.16)!important;color:#7dd3fc!important;box-shadow:inset 3px 0 0 #38bdf8}
html.dark #app-sidebar .af-sidebar-logout{color:#fb7185!important}
html.dark #app-sidebar .af-sidebar-logout:hover{background:rgba(244,63,94,.12)!important;color:#fecdd3!important}
html.dark #app-sidebar .af-sidebar-group-label{color:#cbd5e1!important}
html.dark #app-sidebar .af-submenu-item,html.dark #app-sidebar .af-sidebar-subitem{color:#cbd5e1!important}
html.dark .af-card,html.dark .af-panel,html.dark .af-form-card{background:#0f172a!important;color:#f8fafc!important;border-color:#1e293b!important}
html.dark .af-stat-card{background:#0f172a!important;color:#f8fafc!important;border-color:#1e293b!important}
html.dark .af-stat-card-danger{border-color:rgba(244,63,94,.45)!important}
html.dark .af-input,html.dark .af-select,html.dark .af-textarea{background:#020617!important;color:#f8fafc!important;border-color:#334155!important}
html.dark .af-table-wrapper{background:#0f172a!important;color:#f8fafc!important}
html.dark .af-table{background:#0f172a!important;color:#f8fafc!important;border-color:#1e293b!important}
html.dark .af-table thead,html.dark .af-table-header{background:#020617!important;color:#e2e8f0!important;border-color:#1e293b!important}
html.dark .af-table tbody{background:#0f172a!important;color:#f1f5f9!important}
html.dark .af-table-row,html.dark .af-table tbody tr.af-table-row{background:#0f172a!important;color:#f1f5f9!important;border-color:#1e293b!important}
html.dark .af-table-row td,html.dark .af-table-row th{background:inherit!important;color:inherit;border-color:inherit}
html.dark .af-table-row:hover,html.dark .af-table tbody tr.af-table-row:hover{background:rgba(30,41,59,.7)!important;color:#fff!important}
html.dark .af-table-row .text-slate-500,html.dark .af-table-row .text-slate-400{color:#cbd5e1!important}
html.dark .af-card .text-slate-400,html.dark .af-card .text-slate-500{color:#cbd5e1!important}
html.dark .af-table-muted{color:#cbd5e1!important}
html.dark .af-view-toggle{background:#020617;border-color:#1e293b;color:#e2e8f0}
html.dark .af-view-toggle-button{color:#cbd5e1}
html.dark .af-view-toggle-button:hover{background:rgba(30,41,59,.7);color:#fff}
html.dark .af-view-toggle-button.is-active{background:#0f172a;color:#7dd3fc;box-shadow:none}
body.sidebar-collapsed .menu-label{display:none}
body.sidebar-collapsed .submenu-wrapper{display:none}
body.sidebar-collapsed .sidebar-group-label{display:none}
body.sidebar-collapsed .sidebar-item{justify-content:center}
body.sidebar-collapsed .sidebar-chevron{display:none}

.login-header-shell{background-color:#f8fafc}
html.dark .login-header-shell{
  background-color:#020617!important;
  background-image:radial-gradient(rgba(255,255,255,.08) 1px,transparent 1px)!important;
  background-size:24px 24px!important;
  color:#f1f5f9!important;
}

/* AlphaFlow global design system: definitive light/dark surfaces */
:root{
  --af-bg:#ffffff;
  --af-bg-soft:#f8fafc;
  --af-surface:#ffffff;
  --af-surface-2:#f8fafc;
  --af-surface-3:#f1f5f9;
  --af-border:#e2e8f0;
  --af-border-strong:#cbd5e1;
  --af-text:#0f172a;
  --af-text-soft:#334155;
  --af-muted:#475569;
  --af-muted-2:#64748b;
  --af-input:#ffffff;
  --af-ring:rgba(14,165,233,.28);
  --af-shadow:0 1px 2px rgba(15,23,42,.05),0 12px 28px rgba(15,23,42,.06);
  --af-shadow-hover:0 10px 24px rgba(15,23,42,.10);
  --af-primary:#0284c7;
  --af-primary-strong:#1d4ed8;
  --af-danger:#e11d48;
}
html.dark{
  --af-bg:#020617;
  --af-bg-soft:#020617;
  --af-surface:#0f172a;
  --af-surface-2:#111827;
  --af-surface-3:#1e293b;
  --af-border:#1e293b;
  --af-border-strong:#334155;
  --af-text:#f8fafc;
  --af-text-soft:#e2e8f0;
  --af-muted:#cbd5e1;
  --af-muted-2:#94a3b8;
  --af-input:#020617;
  --af-ring:rgba(56,189,248,.30);
  --af-shadow:none;
  --af-shadow-hover:0 0 0 1px rgba(56,189,248,.18);
  --af-primary:#38bdf8;
  --af-primary-strong:#2563eb;
  --af-danger:#fb7185;
}

html:not(.dark) body,
html:not(.dark) main,
body{
  background:var(--af-bg)!important;
  color:var(--af-text)!important;
}
html.dark body,
html.dark main{
  background:var(--af-bg)!important;
  color:var(--af-text)!important;
}

.af-page,.af-shell{background:var(--af-bg)!important;color:var(--af-text)!important}
.af-content{min-width:0;flex:1 1 auto}
.af-section{width:100%}
.af-card,.af-panel,.af-form-card,.saas-card{
  background:var(--af-surface)!important;
  color:var(--af-text)!important;
  border:1px solid var(--af-border)!important;
  border-radius:.75rem;
  box-shadow:var(--af-shadow);
}
.af-card:hover,.af-panel:hover,.af-form-card:hover,.saas-card:hover{
  border-color:var(--af-border-strong)!important;
  box-shadow:var(--af-shadow-hover);
}
.af-progress-card{
  background:#020617!important;
  color:#fff!important;
  border:1px solid #1e293b!important;
  border-radius:.75rem;
  box-shadow:var(--af-shadow);
}
.af-stat-card{
  min-height:7rem;
  background:var(--af-surface)!important;
  color:var(--af-text)!important;
  border:1px solid var(--af-border)!important;
  border-radius:.75rem;
  padding:1rem;
  box-shadow:var(--af-shadow);
  transition:transform .15s ease,border-color .15s ease,box-shadow .15s ease;
}
.af-stat-card:hover{transform:scale(1.01);border-color:var(--af-border-strong)!important;box-shadow:var(--af-shadow-hover)}
.af-stat-card-danger{border-color:rgba(225,29,72,.35)!important}
html.dark .af-stat-card-danger{border-color:rgba(251,113,133,.45)!important}
.af-stat-label{color:var(--af-muted)!important;font-size:.6875rem;font-weight:800;text-transform:uppercase;letter-spacing:.04em}
.af-stat-value{display:block;margin-top:.75rem;color:var(--af-text)!important;font-size:1.875rem;line-height:2.25rem;font-weight:900}
.af-stat-subtext,.af-muted,.af-table-muted{color:var(--af-muted)!important}
.af-title,.af-page-title,.af-section-title{color:var(--af-text)!important;font-weight:900;letter-spacing:0}
.af-subtitle{color:var(--af-muted)!important}
.af-label{color:var(--af-muted)!important;font-weight:800;text-transform:uppercase;letter-spacing:.04em}

.af-input,.af-select,.af-textarea,
:where(input:not([type="checkbox"]):not([type="radio"]),select,textarea).af-input,
:where(input:not([type="checkbox"]):not([type="radio"]),select,textarea).af-select,
:where(input:not([type="checkbox"]):not([type="radio"]),select,textarea).af-textarea{
  background:var(--af-input)!important;
  color:var(--af-text)!important;
  border:1px solid var(--af-border-strong)!important;
  border-radius:.5rem;
}
.af-input::placeholder,.af-textarea::placeholder{color:var(--af-muted-2)!important}
.af-input:focus,.af-select:focus,.af-textarea:focus,
:where(input:not([type="checkbox"]):not([type="radio"]),select,textarea):focus{
  outline:0;
  border-color:var(--af-primary)!important;
  box-shadow:0 0 0 3px var(--af-ring)!important;
}
.af-checkbox{background:var(--af-input)!important;border:1px solid var(--af-border-strong)!important;border-radius:.25rem;color:var(--af-primary)!important}

.af-btn,.af-btn-primary,.af-btn-secondary,.af-btn-danger,.af-btn-ghost,.af-btn-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:.45rem;
  border-radius:.5rem;
  font-weight:800;
  line-height:1.25;
  transition:transform .15s ease,border-color .15s ease,box-shadow .15s ease,opacity .15s ease;
}
.af-btn{padding:.5rem .85rem;font-size:.75rem}
.af-btn:hover,.af-btn-primary:hover,.af-btn-secondary:hover,.af-btn-danger:hover,.af-btn-ghost:hover,.af-btn-icon:hover{
  transform:translateY(-1px);
  box-shadow:0 0 0 3px var(--af-ring);
}
.af-btn-primary{background:linear-gradient(90deg,#0284c7,#1d4ed8)!important;border:1px solid rgba(2,132,199,.35)!important;color:#fff!important}
.af-btn-secondary{background:var(--af-surface)!important;border:1px solid var(--af-border)!important;color:var(--af-text-soft)!important}
.af-btn-danger{background:var(--af-danger)!important;border:1px solid rgba(225,29,72,.35)!important;color:#fff!important}
.af-btn-ghost,.af-btn-icon{background:transparent!important;border:1px solid transparent!important;color:var(--af-muted)!important}
.af-btn-icon{width:2rem;height:2rem;padding:0}

.af-table-wrapper{overflow-x:auto;background:var(--af-surface)!important;color:var(--af-text)!important}
.af-table{width:100%;background:var(--af-surface)!important;color:var(--af-text)!important;border-color:var(--af-border)!important}
.af-table thead,.af-table-header{background:var(--af-surface-3)!important;color:var(--af-muted)!important;border-color:var(--af-border)!important}
.af-table tbody{background:var(--af-surface)!important;color:var(--af-text)!important}
.af-table-row,.af-table tbody tr.af-table-row{background:var(--af-surface)!important;color:var(--af-text-soft)!important;border-color:var(--af-border)!important}
.af-table-row td,.af-table-row th{background:inherit!important;color:inherit;border-color:inherit}
.af-table-row:hover,.af-table tbody tr.af-table-row:hover{
  background:var(--af-surface)!important;
  color:var(--af-text)!important;
  box-shadow:inset 3px 0 0 var(--af-primary);
}
.af-table-cell{padding:1rem;color:inherit;border-color:inherit}

.af-badge{display:inline-flex;align-items:center;justify-content:center;gap:.35rem;border-radius:999px;background:var(--af-surface-3)!important;color:var(--af-muted)!important;border:1px solid var(--af-border)!important;font-weight:800}
.af-badge-success{background:rgba(16,185,129,.12)!important;color:#047857!important;border-color:rgba(16,185,129,.35)!important}
.af-badge-warning{background:rgba(245,158,11,.14)!important;color:#b45309!important;border-color:rgba(245,158,11,.35)!important}
.af-badge-danger{background:rgba(244,63,94,.12)!important;color:#be123c!important;border-color:rgba(244,63,94,.35)!important}
.af-badge-info{background:rgba(14,165,233,.12)!important;color:#0369a1!important;border-color:rgba(14,165,233,.35)!important}
.af-badge-neutral{background:var(--af-surface-3)!important;color:var(--af-muted)!important;border-color:var(--af-border)!important}
html.dark .af-badge-success{color:#86efac!important}
html.dark .af-badge-warning{color:#fcd34d!important}
html.dark .af-badge-danger{color:#fb7185!important}
html.dark .af-badge-info{color:#7dd3fc!important}

.af-empty-state{background:var(--af-bg-soft)!important;color:var(--af-muted)!important;border:1px dashed var(--af-border-strong)!important;border-radius:.75rem}
.af-divider{border-color:var(--af-border)!important}
.af-tooltip{border-radius:.5rem;background:#0f172a;color:#fff;padding:.4rem .55rem;font-size:.7rem;font-weight:800}
.af-scrollbar{scrollbar-width:thin;scrollbar-color:var(--af-border-strong) transparent}
.af-focus-ring:focus-visible,.af-focus:focus-visible{outline:2px solid var(--af-primary);outline-offset:2px}

.af-topbar{
  background:color-mix(in srgb,var(--af-surface) 95%,transparent)!important;
  color:var(--af-text)!important;
  border-color:var(--af-border)!important;
}
.af-sidebar,#app-sidebar.af-sidebar{
  background:var(--af-bg)!important;
  color:var(--af-text)!important;
  border-color:var(--af-border)!important;
}
.af-sidebar-header,#app-sidebar .af-sidebar-header,#app-sidebar .sidebar-footer{
  background:var(--af-bg)!important;
  color:var(--af-text)!important;
  border-color:var(--af-border)!important;
}
.af-sidebar-item,.sidebar-link.af-sidebar-item{
  background:transparent!important;
  color:var(--af-muted)!important;
  border:1px solid transparent;
  transition:transform .15s ease,border-color .15s ease,box-shadow .15s ease,color .15s ease;
}
.af-sidebar-item:hover,.sidebar-link.af-sidebar-item:hover{
  background:transparent!important;
  color:var(--af-text)!important;
  border-color:var(--af-border)!important;
  transform:translateX(2px);
  box-shadow:0 0 0 3px var(--af-ring);
}
.af-sidebar-item-active,.sidebar-link.af-sidebar-item.is-active{
  background:rgba(14,165,233,.12)!important;
  color:var(--af-primary)!important;
  border-color:rgba(14,165,233,.25)!important;
  box-shadow:inset 3px 0 0 var(--af-primary)!important;
}
.af-sidebar-logout{color:var(--af-danger)!important}
.af-sidebar-logout:hover{background:transparent!important;color:var(--af-danger)!important;border-color:rgba(244,63,94,.35)!important}
.af-sidebar-group-label{color:var(--af-muted-2)!important}
.af-submenu,.af-sidebar-submenu,.sidebar-submenu{border-left:1px solid var(--af-border)!important}
.af-submenu-item,.af-sidebar-subitem,.sidebar-sublink{color:var(--af-muted)!important}
.af-submenu-item:hover,.af-sidebar-subitem:hover,.sidebar-sublink:hover{background:transparent!important;color:var(--af-text)!important;box-shadow:0 0 0 3px var(--af-ring)}
.sidebar-sublink.is-active{background:var(--af-surface-3)!important;color:var(--af-text)!important;font-weight:900}

.sidebar-collapse-floating{
  background:var(--af-surface)!important;
  color:var(--af-muted)!important;
  border-color:var(--af-border)!important;
}
.sidebar-collapse-floating:hover{
  background:var(--af-surface)!important;
  color:var(--af-primary)!important;
  box-shadow:0 0 0 3px var(--af-ring);
}

html.dark :where(div,section,article,form,main,aside,header,footer,nav,table,thead,tbody,tr,td,th,dialog)[class*="bg-white"],
html.dark :where(div,section,article,form,main,aside,header,footer,nav,table,thead,tbody,tr,td,th,dialog)[class*="bg-gray-50"],
html.dark :where(div,section,article,form,main,aside,header,footer,nav,table,thead,tbody,tr,td,th,dialog)[class*="bg-slate-50"]{
  background-color:var(--af-surface)!important;
  color:var(--af-text)!important;
}
html.dark :where(input:not([type="checkbox"]):not([type="radio"]),select,textarea){
  background:var(--af-input)!important;
  color:var(--af-text)!important;
  border-color:var(--af-border-strong)!important;
}
html.dark :where(.text-slate-500,.text-gray-500,.text-zinc-500){color:var(--af-muted)!important}
html.dark :where(.text-slate-400,.text-gray-400,.text-zinc-400){color:var(--af-muted-2)!important}
html.dark :where(.text-slate-900,.text-slate-800,.text-gray-900,.text-gray-800,.zinc-900,.text-zinc-800){color:var(--af-text)!important}
