:root {
    color-scheme: light;
    --ink: #18263b;
    --muted: #7c899c;
    --line: #e9edf3;
    --surface: #ffffff;
    --canvas: #f6f8fb;
    --navy: #101b2d;
    --blue: #4278e8;
    --green: #1a9c6c;
    --amber: #d08b19;
    --violet: #8064dc;
    font-family: "DM Sans", "Segoe UI", sans-serif;
    font-synthesis: none;
    text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
body { min-width: 350px; margin: 0; background: var(--canvas); color: var(--ink); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 2; display: flex; width: 248px; flex-direction: column; padding: 27px 17px 18px; background: var(--navy); color: #d7dfec; }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 9px; color: #fff; text-decoration: none; }
.brand-mark { display: grid; width: 39px; height: 39px; place-items: center; border-radius: 12px; background: #274274; color: #86abff; }
.brand-mark svg { width: 25px; height: 25px; }
.brand strong { display: block; font-family: Manrope, sans-serif; font-size: 21px; letter-spacing: -.8px; }
.brand small { display: block; margin-top: 1px; color: #8694aa; font-size: 8px; font-weight: 700; letter-spacing: 1.25px; }
.nav-label { margin: 48px 10px 12px; color: #77849a; font-size: 9px; font-weight: 700; letter-spacing: 1.2px; }
.navigation { display: grid; gap: 6px; }
.nav-link { display: flex; height: 43px; align-items: center; gap: 12px; padding: 0 11px; border: 0; border-radius: 8px; background: transparent; color: #aeb9ca; text-align: left; font-size: 12px; font-weight: 500; transition: background .15s, color .15s; }
.nav-link:hover { background: #1b2b45; color: #fff; }
.nav-link.is-active { background: #25457b; color: #fff; }
.nav-icon { width: 19px; color: #98a9c3; text-align: center; font-size: 18px; line-height: 1; }
.is-active .nav-icon { color: #a8c2ff; }
.nav-count { margin-left: auto; color: #aeb9ca; font-size: 10px; }
.sidebar-bottom { margin-top: auto; }
.connection-card { display: flex; align-items: center; gap: 10px; margin: 0 3px 16px; padding: 12px 11px; border: 1px solid #26344a; border-radius: 9px; background: #162338; }
.connection-dot, .live-indicator span, .rest-tag span { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: #29c38a; box-shadow: 0 0 0 3px #29c38a20; }
.connection-card strong, .profile strong { display: block; color: #ecf1f8; font-size: 10px; font-weight: 600; }
.connection-card small, .profile small { display: block; margin-top: 3px; color: #8794a8; font-size: 9px; }
.profile { display: flex; align-items: center; gap: 9px; padding: 15px 4px 0; border-top: 1px solid #26344a; }
.profile-avatar { display: grid; width: 31px; height: 31px; flex: 0 0 auto; place-items: center; border-radius: 9px; background: #334f7d; color: #dce8ff; font-size: 10px; font-weight: 700; }
.profile-more { margin-left: auto; color: #8794a8; font-size: 10px; letter-spacing: 1px; }
.main-content { min-height: 100vh; margin-left: 248px; }
.topbar { display: flex; height: 65px; align-items: center; justify-content: space-between; padding: 0 42px; border-bottom: 1px solid var(--line); background: var(--surface); }
.breadcrumb { display: flex; align-items: center; gap: 10px; color: #9aa5b4; font-size: 11px; }
.breadcrumb strong { color: #39475c; font-weight: 600; }
.breadcrumb-separator { color: #c3cad5; }
.topbar-actions { display: flex; align-items: center; gap: 17px; }
.live-indicator { display: flex; align-items: center; gap: 8px; color: #5b6a7d; font-size: 10px; }
.live-indicator span { width: 6px; height: 6px; }
.icon-button { display: grid; width: 33px; height: 33px; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: white; color: #65748a; font-size: 17px; transition: background .15s, color .15s; }
.icon-button:hover { background: #f2f6fd; color: var(--blue); }
.page-content { width: min(1280px, 100%); margin: 0 auto; padding: 35px 42px 18px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.eyebrow, .panel-kicker { color: #8b98aa; font-size: 9px; font-weight: 700; letter-spacing: 1.2px; }
h1, h2, p { margin-top: 0; }
h1, h2 { font-family: Manrope, "Segoe UI", sans-serif; }
h1 { margin: 8px 0 5px; color: #1b2940; font-size: clamp(24px, 3vw, 31px); font-weight: 700; letter-spacing: -1.1px; }
.page-heading p, .panel-heading p { margin-bottom: 0; color: var(--muted); font-size: 11px; }
.button { display: inline-flex; min-height: 37px; align-items: center; justify-content: center; gap: 8px; padding: 0 14px; border: 1px solid transparent; border-radius: 7px; font-size: 10px; font-weight: 600; transition: background .15s, transform .15s; }
.button:active { transform: translateY(1px); }
.button-primary { background: var(--blue); color: white; box-shadow: 0 3px 8px #4278e826; }
.button-primary:hover { background: #3269dc; }
.button-primary > span:first-child { font-size: 17px; font-weight: 400; }
.button-secondary { border-color: #e2e7ef; background: white; color: #59677b; }
.button-secondary:hover { background: #f5f7fa; }
.notice { margin: -8px 0 17px; padding: 11px 14px; border: 1px solid #cfe8dd; border-radius: 8px; background: #eff9f4; color: #207452; font-size: 11px; }
.notice.is-error { border-color: #f1d4d2; background: #fff4f2; color: #ab413b; }
.metrics-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin-bottom: 20px; }
.metric-card { min-height: 120px; padding: 16px 17px 14px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); box-shadow: 0 2px 5px #1e344908; }
.metric-top { display: flex; align-items: center; justify-content: space-between; }
.metric-label { color: #65748a; font-size: 10px; font-weight: 500; }
.metric-icon { display: grid; width: 27px; height: 27px; place-items: center; border-radius: 8px; font-size: 13px; }
.icon-blue { background: #eef3ff; color: #507ee4; }
.icon-green { background: #eaf8f2; color: #1c9d70; }
.icon-amber { background: #fff6e6; color: #d29322; }
.icon-violet { background: #f3efff; color: #8166da; }
.metric-value { margin-top: 8px; color: #1b2940; font-family: Manrope, sans-serif; font-size: 26px; font-weight: 700; letter-spacing: -.8px; line-height: 1.2; }
.metric-note { margin-top: 3px; color: #9aa4b2; font-size: 9px; }
.panel { overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); box-shadow: 0 2px 5px #1e344908; }
.panel-heading { display: flex; min-height: 94px; align-items: center; justify-content: space-between; gap: 20px; padding: 17px 19px; }
.panel-heading h2 { margin: 5px 0 4px; color: #25344b; font-size: 15px; font-weight: 700; letter-spacing: -.25px; }
.panel-heading p { font-size: 10px; }
.table-tools { display: flex; align-items: center; gap: 8px; }
.search-box { display: flex; width: 178px; height: 33px; align-items: center; gap: 8px; padding: 0 9px; border: 1px solid #e7ebf1; border-radius: 6px; color: #8490a1; }
.search-box > span { font-size: 19px; line-height: 1; }
.search-box input { width: 100%; min-width: 0; border: 0; outline: 0; color: #39475c; font-size: 10px; }
.search-box input::placeholder { color: #a4adba; }
.filter-select-wrap select { height: 33px; max-width: 126px; padding: 0 24px 0 9px; border: 1px solid #e7ebf1; border-radius: 6px; background: #fff; color: #68778b; font-size: 9px; }
.table-scroll { overflow-x: auto; min-height: 167px; }
table { width: 100%; border-collapse: collapse; text-align: left; white-space: nowrap; }
thead { background: #fafbfd; }
th { height: 35px; padding: 0 14px; border-top: 1px solid #f0f2f6; border-bottom: 1px solid #edf0f4; color: #8d99a9; font-size: 8px; font-weight: 700; letter-spacing: .45px; text-transform: uppercase; }
th:first-child, td:first-child { padding-left: 19px; }
td { height: 48px; padding: 0 14px; border-bottom: 1px solid #f0f2f6; color: #55647a; font-size: 10px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fbfcfe; }
.record-name { display: flex; align-items: center; gap: 9px; color: #33435a; font-weight: 600; }
.record-avatar { display: grid; width: 27px; height: 27px; flex: 0 0 auto; place-items: center; border-radius: 7px; background: #eef3ff; color: #587fe0; font-size: 12px; }
.record-id { color: #a0aab8; font-variant-numeric: tabular-nums; }
.record-description { display: inline-block; max-width: 225px; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.status-badge { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 20px; background: #f1f3f6; color: #68778a; font-size: 9px; font-weight: 600; }
.status-badge::before { width: 5px; height: 5px; border-radius: 50%; background: currentColor; content: ""; }
.status-ativa, .status-concluida { background: #eaf8f1; color: #19885d; }
.status-andamento, .status-manutencao { background: #fff5e4; color: #bb7a0c; }
.status-pendente { background: #fff0e7; color: #cb6d2a; }
.status-inativa, .status-descartada { background: #f0f2f5; color: #7d8795; }
.row-actions { display: flex; align-items: center; gap: 5px; }
.action-button { padding: 5px 7px; border: 0; border-radius: 5px; background: transparent; color: #78879a; font-size: 9px; }
.action-button:hover { background: #eef3ff; color: #3b6ed3; }
.action-button.delete:hover { background: #fff0ef; color: #ca4c45; }
.empty-state { display: grid; min-height: 150px; align-content: center; justify-items: center; color: #8f9bac; text-align: center; }
.empty-state > span { font-size: 25px; }
.empty-state strong { margin-top: 6px; color: #536277; font-size: 11px; }
.empty-state p { margin: 4px 0 0; font-size: 10px; }
.panel-footer { display: flex; min-height: 40px; align-items: center; justify-content: space-between; padding: 0 19px; border-top: 1px solid #f0f2f6; color: #95a0af; font-size: 9px; }
.rest-tag { display: flex; align-items: center; gap: 7px; }
.rest-tag span { width: 6px; height: 6px; }
.page-footer { padding: 17px 0 5px; color: #a0aab7; font-size: 9px; }
.page-footer span { margin: 0 4px; }
.record-dialog { width: min(470px, calc(100% - 28px)); max-height: calc(100% - 28px); padding: 0; overflow: auto; border: 1px solid #e8ecf2; border-radius: 12px; background: white; color: var(--ink); box-shadow: 0 24px 80px #0e1c3440; }
.record-dialog::backdrop { background: #0d192b80; backdrop-filter: blur(2px); }
.record-dialog form { padding: 22px; }
.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; padding-bottom: 17px; border-bottom: 1px solid #eef1f5; }
.dialog-heading h2 { margin: 5px 0 0; color: #25344b; font-size: 18px; }
.dialog-close { width: 29px; height: 29px; font-size: 20px; }
.dialog-fields { display: grid; gap: 13px; padding: 18px 0; }
.form-field { display: grid; gap: 6px; color: #58677c; font-size: 10px; font-weight: 600; }
.form-field input, .form-field select, .form-field textarea { width: 100%; min-height: 37px; padding: 8px 10px; border: 1px solid #e3e8ef; border-radius: 6px; outline: 0; background: #fff; color: #344258; font-size: 11px; font-weight: 400; }
.form-field textarea { min-height: 74px; resize: vertical; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { border-color: #7fa1ed; box-shadow: 0 0 0 3px #4278e81a; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 14px; border-top: 1px solid #eef1f5; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; clip-path: inset(50%); }

@media (min-width: 1500px) { .page-content { padding-top: 44px; } .metrics-grid { gap: 17px; } .metric-card { min-height: 133px; padding: 19px; } }
@media (max-width: 1050px) { .sidebar { width: 215px; } .main-content { margin-left: 215px; } .topbar { padding: 0 26px; } .page-content { padding: 29px 26px 16px; } .metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .panel-heading { align-items: flex-start; flex-direction: column; } .table-tools { width: 100%; } .search-box { flex: 1; } }
@media (max-width: 700px) { .sidebar { position: static; width: auto; min-height: auto; padding: 12px 14px; } .brand { padding: 0 2px 11px; } .brand-mark { width: 33px; height: 33px; } .brand strong { font-size: 17px; } .brand small { font-size: 7px; } .nav-label, .sidebar-bottom { display: none; } .navigation { display: flex; gap: 5px; overflow-x: auto; } .nav-link { min-width: max-content; height: 37px; gap: 7px; padding: 0 10px; font-size: 10px; } .nav-icon { font-size: 15px; } .nav-count { margin-left: 0; } .main-content { margin-left: 0; } .topbar { height: 48px; padding: 0 16px; } .breadcrumb { font-size: 10px; } .topbar-actions { gap: 10px; } .page-content { padding: 24px 14px 14px; } .page-heading { align-items: flex-start; flex-direction: column; gap: 13px; margin-bottom: 18px; } .page-heading p { max-width: 360px; line-height: 1.5; } .metrics-grid { gap: 9px; margin-bottom: 14px; } .metric-card { min-height: 106px; padding: 12px; } .metric-label { font-size: 9px; } .metric-icon { width: 23px; height: 23px; font-size: 11px; } .metric-value { font-size: 23px; } .metric-note { font-size: 8px; } .panel-heading { gap: 13px; padding: 15px 13px; } .table-tools { align-items: stretch; } .filter-select-wrap select { max-width: 113px; font-size: 8px; } .search-box { width: auto; } .panel-footer { padding: 0 12px; font-size: 8px; } .rest-tag { gap: 5px; } .rest-tag span { display: none; } }
@media (max-width: 400px) { .live-indicator { font-size: 0; } .live-indicator span { width: 8px; height: 8px; } .table-tools { flex-direction: column; } .filter-select-wrap select { width: 100%; max-width: none; } .metric-card { padding: 10px; } }
