:root {
    --background: #f6f7fb;
    --background-soft: #fafafe;
    --surface: #ffffff;
    --surface-soft: #f8f7fc;
    --surface-hover: #f5f2fb;

    --text: #1d1a24;
    --text-soft: #5f596a;
    --text-muted: #8b8496;

    --accent: #8657dd;
    --accent-light: #a775ee;
    --accent-soft: #eee7fb;
    --accent-extra-soft: #f7f3fd;
    --accent-dark: #6240af;

    --success: #25865f;
    --success-bg: #edf9f4;

    --warning: #a46a12;
    --warning-bg: #fff8e8;

    --danger: #bf4557;
    --danger-bg: #fff1f3;

    --info: #4568b8;
    --info-bg: #eef4ff;

    --border: #e8e5ed;
    --border-strong: #dcd6e5;

    --sidebar-width: 275px;
    --banner-height: 42px;
    --topbar-height: 88px;

    --shadow-small:
        0 5px 18px rgba(40, 31, 55, 0.05);

    --shadow:
        0 18px 50px rgba(40, 31, 55, 0.08);

    --shadow-large:
        0 35px 90px rgba(40, 31, 55, 0.16);
}

/* Reset */

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

html {
    scroll-behavior: smooth;
    background: var(--background);
}

body {
    min-height: 100vh;
    padding-top: var(--banner-height);
    overflow-x: hidden;
    background:
        radial-gradient(
            circle at 90% 8%,
            rgba(134, 87, 221, 0.055),
            transparent 24%
        ),
        radial-gradient(
            circle at 15% 88%,
            rgba(167, 117, 238, 0.035),
            transparent 24%
        ),
        var(--background);
    color: var(--text);
    font-family: "Inter", Arial, sans-serif;
    line-height: 1.5;
}

body.sidebar-open,
body.modal-open {
    overflow: hidden;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    color: inherit;
}

a {
    color: inherit;
    text-decoration: none;
}

svg {
    display: block;
}

[hidden] {
    display: none !important;
}

::selection {
    color: #ffffff;
    background: var(--accent);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Aviso superior */

.demo-banner {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 3000;
    width: 100%;
    height: var(--banner-height);
    border-bottom: 1px solid #e4dcf2;
    background:
        linear-gradient(
            90deg,
            #f0e9fb,
            #faf8fd 28%,
            #faf8fd 72%,
            #f0e9fb
        );
}

.demo-banner-content {
    width: min(calc(100% - 32px), 1700px);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin: 0 auto;
}

.demo-banner-message {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-soft);
    font-size: 0.64rem;
}

.demo-banner-message strong {
    color: var(--accent-dark);
    font-size: 0.61rem;
    font-weight: 600;
    letter-spacing: 0.14em;
}

.demo-indicator,
.update-indicator {
    width: 7px;
    height: 7px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--accent);
    box-shadow:
        0 0 0 4px rgba(134, 87, 221, 0.1),
        0 0 12px rgba(134, 87, 221, 0.28);
    animation: indicatorPulse 2.2s ease-in-out infinite;
}

.back-to-ylume {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-soft);
    font-size: 0.66rem;
    transition: color 0.25s ease;
}

.back-to-ylume:hover {
    color: var(--accent);
}

/* Estrutura */

.app-shell {
    min-height: calc(100vh - var(--banner-height));
}

.app-content {
    min-height: calc(100vh - var(--banner-height));
    margin-left: var(--sidebar-width);
}

/* Sidebar */

.sidebar {
    position: fixed;
    top: var(--banner-height);
    left: 0;
    bottom: 0;
    z-index: 1300;
    width: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border);
    background:
        radial-gradient(
            circle at 15% 0%,
            rgba(134, 87, 221, 0.055),
            transparent 25%
        ),
        rgba(255, 255, 255, 0.98);
    box-shadow:
        8px 0 35px rgba(40, 31, 55, 0.025);
}

.sidebar-header {
    min-height: 88px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 19px 21px;
    border-bottom: 1px solid var(--border);
}
.orion-brand {
    display: flex;
    align-items: center;
    gap: 13px;
}

.orion-symbol {
    position: relative;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    overflow: hidden;
    border: 1px solid #d9cbed;
    border-radius: 15px;
    background:
        radial-gradient(
            circle at 50% 42%,
            rgba(167, 117, 238, 0.18),
            transparent 44%
        ),
        linear-gradient(
            145deg,
            #ffffff,
            #f3ecfb
        );
    box-shadow:
        inset 0 0 18px rgba(134, 87, 221, 0.06),
        0 7px 20px rgba(75, 50, 110, 0.1);
    transition:
        transform 0.3s ease,
        border-color 0.3s ease,
        box-shadow 0.3s ease;
}

.orion-symbol::after {
    content: "";
    position: absolute;
    inset: -45%;
    background:
        linear-gradient(
            115deg,
            transparent 38%,
            rgba(255, 255, 255, 0.6) 49%,
            transparent 60%
        );
    transform: translateX(-70%) rotate(12deg);
    transition: transform 0.65s ease;
    pointer-events: none;
}

.orion-brand:hover .orion-symbol {
    transform: translateY(-2px) rotate(-2deg);
    border-color: #bfa5e2;
    box-shadow:
        inset 0 0 22px rgba(134, 87, 221, 0.1),
        0 10px 26px rgba(75, 50, 110, 0.15);
}

.orion-brand:hover .orion-symbol::after {
    transform: translateX(75%) rotate(12deg);
}

.orion-symbol svg {
    position: relative;
    z-index: 1;
    width: 34px;
    height: 34px;
    overflow: visible;
}

.orion-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.orion-brand-text strong {
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.2em;
}

.orion-brand-text span {
    margin-top: 7px;
    color: var(--accent);
    font-size: 0.48rem;
    letter-spacing: 0.3em;
}

.hawk-brand-text strong {
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.22em;
}

.hawk-brand-text span {
    margin-top: 7px;
    color: var(--accent);
    font-size: 0.48rem;
    letter-spacing: 0.3em;
}

.sidebar-close {
    position: relative;
    width: 38px;
    height: 38px;
    display: none;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--surface-soft);
    cursor: pointer;
}

.sidebar-close span {
    position: absolute;
    left: 11px;
    top: 18px;
    width: 15px;
    height: 1px;
    background: var(--text);
}

.sidebar-close span:first-child {
    transform: rotate(45deg);
}

.sidebar-close span:last-child {
    transform: rotate(-45deg);
}

/* Base ativa */

.base-card {
    margin: 18px 17px 8px;
    padding: 17px;
    border: 1px solid #e4dcef;
    border-radius: 15px;
    background:
        radial-gradient(
            circle at 100% 0%,
            rgba(134, 87, 221, 0.1),
            transparent 44%
        ),
        linear-gradient(
            145deg,
            #fbf9fe,
            #f7f3fc
        );
}

.base-card-label {
    display: block;
    color: var(--accent);
    font-size: 0.52rem;
    font-weight: 600;
    letter-spacing: 0.16em;
}

.base-card strong {
    display: block;
    margin-top: 8px;
    color: var(--text);
    font-size: 0.88rem;
    font-weight: 600;
}

.base-card small {
    display: block;
    margin-top: 5px;
    color: var(--text-muted);
    font-size: 0.67rem;
}

/* Navegação lateral */

.sidebar-nav {
    flex: 1;
    padding: 16px 12px 20px;
    overflow-y: auto;
}

.sidebar-section-label {
    display: block;
    padding: 17px 12px 9px;
    color: #9b94a5;
    font-size: 0.5rem;
    font-weight: 500;
    letter-spacing: 0.18em;
}

.nav-button {
    position: relative;
    width: 100%;
    min-height: 48px;
    display: grid;
    grid-template-columns: 22px 1fr auto;
    align-items: center;
    gap: 12px;
    margin: 4px 0;
    padding: 0 13px;
    overflow: hidden;
    border: 1px solid transparent;
    border-radius: 12px;
    background: transparent;
    color: #756e80;
    text-align: left;
    cursor: pointer;
    transition:
        color 0.25s ease,
        border-color 0.25s ease,
        background 0.25s ease,
        transform 0.25s ease;
}

.nav-button::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 3px;
    height: 0;
    transform: translateY(-50%);
    border-radius: 0 999px 999px 0;
    background:
        linear-gradient(
            to bottom,
            var(--accent-light),
            var(--accent),
            var(--accent-dark)
        );
    transition: height 0.25s ease;
}

.nav-button svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.nav-button > span:not(.nav-count) {
    font-size: 0.77rem;
}

.nav-button:hover {
    color: var(--accent-dark);
    background: #f8f5fc;
}

.nav-button.active {
    color: var(--accent-dark);
    border-color: #e4d9f3;
    background:
        linear-gradient(
            90deg,
            #f0e9fb,
            #f8f5fc
        );
}

.nav-button.active::before {
    height: 25px;
}

.nav-button.active svg {
    color: var(--accent);
}

.nav-count {
    min-width: 24px;
    height: 20px;
    display: grid;
    place-items: center;
    padding: 0 6px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text-muted);
    font-size: 0.55rem;
    background: var(--surface);
}

.nav-button.active .nav-count {
    color: var(--accent-dark);
    border-color: #dcd0ed;
    background: #ffffff;
}

/* Rodapé lateral */

.sidebar-footer {
    padding: 17px 18px 19px;
    border-top: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.86);
}

.demo-profile {
    display: flex;
    align-items: center;
    gap: 11px;
}

.demo-avatar {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    border: 1px solid #dcd0ed;
    border-radius: 50%;
    color: var(--accent-dark);
    font-size: 0.72rem;
    background: var(--accent-soft);
}

.demo-profile div:last-child {
    display: flex;
    flex-direction: column;
}

.demo-profile strong {
    color: var(--text);
    font-size: 0.72rem;
    font-weight: 600;
}

.demo-profile span {
    margin-top: 3px;
    color: var(--text-muted);
    font-size: 0.58rem;
}

.sidebar-version {
    display: block;
    margin-top: 16px;
    color: #aaa3b1;
    font-size: 0.47rem;
    letter-spacing: 0.14em;
}

/* Overlay mobile */

.sidebar-overlay {
    position: fixed;
    inset: var(--banner-height) 0 0;
    z-index: 1200;
    border: 0;
    background: rgba(32, 25, 42, 0.3);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* Cabeçalho */

.topbar {
    position: sticky;
    top: var(--banner-height);
    z-index: 900;
    min-height: var(--topbar-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    padding: 17px 34px;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.93);
    box-shadow:
        0 5px 25px rgba(42, 33, 55, 0.025);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.topbar-left,
.topbar-right {
    display: flex;
    align-items: center;
}

.topbar-left {
    min-width: 0;
    gap: 16px;
}

.topbar-right {
    gap: 22px;
}

.sidebar-toggle {
    width: 42px;
    height: 42px;
    display: none;
    flex-shrink: 0;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    cursor: pointer;
}

.sidebar-toggle span {
    display: block;
    width: 16px;
    height: 1px;
    margin: 4px auto;
    background: var(--text);
}

.page-heading {
    min-width: 0;
}

.page-breadcrumb {
    display: block;
    color: var(--text-muted);
    font-size: 0.5rem;
    font-weight: 500;
    letter-spacing: 0.16em;
}

.page-heading h1 {
    margin-top: 6px;
    overflow: hidden;
    color: var(--text);
    font-size: 1.35rem;
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: -0.025em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Pesquisa */

.global-search,
.search-field {
    position: relative;
    display: flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fbfbfd;
    transition:
        border-color 0.25s ease,
        background 0.25s ease,
        box-shadow 0.25s ease;
}

.global-search {
    width: 240px;
    min-height: 42px;
}

.global-search:focus-within,
.search-field:focus-within {
    border-color: #c8b5e6;
    background: #ffffff;
    box-shadow:
        0 0 0 3px rgba(134, 87, 221, 0.08);
}

.global-search svg,
.search-field svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-left: 14px;
    fill: none;
    stroke: var(--text-muted);
    stroke-width: 1.7;
    stroke-linecap: round;
}

.global-search input,
.search-field input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
}

.global-search input {
    min-height: 40px;
    padding: 0 13px 0 10px;
    font-size: 0.73rem;
}

.global-search input::placeholder,
.search-field input::placeholder {
    color: #aaa4b1;
}

.topbar-update {
    display: flex;
    align-items: center;
    gap: 11px;
    padding-left: 21px;
    border-left: 1px solid var(--border);
}

.topbar-update div {
    display: flex;
    flex-direction: column;
}

.topbar-update small {
    color: var(--text-muted);
    font-size: 0.46rem;
    letter-spacing: 0.13em;
}

.topbar-update strong {
    margin-top: 4px;
    color: var(--text);
    font-size: 0.63rem;
    font-weight: 500;
    white-space: nowrap;
}

/* Conteúdo */

.main-content {
    width: min(calc(100% - 60px), 1480px);
    margin: 0 auto;
    padding: 48px 0 80px;
}

.app-view {
    animation: viewEntrance 0.42s ease both;
}

.view-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 36px;
    margin-bottom: 34px;
}

.view-eyebrow,
.panel-eyebrow,
.modal-eyebrow {
    display: block;
    color: var(--accent);
    font-size: 0.54rem;
    font-weight: 600;
    letter-spacing: 0.17em;
}

.view-header h2 {
    margin-top: 11px;
    color: var(--text);
    font-size: clamp(2rem, 4vw, 3.3rem);
    font-weight: 400;
    line-height: 1;
    letter-spacing: -0.045em;
}

.view-header p {
    max-width: 660px;
    margin-top: 16px;
    color: var(--text-soft);
    font-size: 0.84rem;
}

/* Dropdown de ações */

.action-control {
    min-width: 360px;
}

.action-control > label {
    display: block;
    margin-bottom: 7px;
    color: var(--text-muted);
    font-size: 0.57rem;
    font-weight: 500;
    letter-spacing: 0.08em;
}

.action-control-row {
    display: flex;
    align-items: stretch;
    gap: 9px;
}

.action-control select {
    min-width: 250px;
    min-height: 44px;
    padding: 0 38px 0 13px;
    border: 1px solid var(--border);
    border-radius: 11px;
    outline: 0;
    background: #ffffff;
    color: var(--text-soft);
    font-size: 0.69rem;
    cursor: pointer;
    transition:
        border-color 0.22s ease,
        box-shadow 0.22s ease;
}

.action-control select:focus {
    border-color: #c6b2e3;
    box-shadow:
        0 0 0 3px rgba(134, 87, 221, 0.08);
}

/* Botões */

.primary-button,
.secondary-button,
.text-button,
.table-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    cursor: pointer;
    transition:
        transform 0.22s ease,
        border-color 0.22s ease,
        color 0.22s ease,
        background 0.22s ease,
        box-shadow 0.22s ease;
}

.primary-button {
    min-height: 44px;
    gap: 9px;
    padding: 0 17px;
    border: 1px solid rgba(99, 63, 173, 0.22);
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 500;
    background:
        linear-gradient(
            135deg,
            var(--accent-light),
            var(--accent),
            var(--accent-dark)
        );
    box-shadow:
        0 8px 22px rgba(98, 64, 175, 0.18);
}

.primary-button:hover {
    transform: translateY(-2px);
    box-shadow:
        0 12px 28px rgba(98, 64, 175, 0.25);
}

.secondary-button {
    min-height: 40px;
    padding: 0 15px;
    border: 1px solid var(--border-strong);
    color: var(--text-soft);
    font-size: 0.69rem;
    background: #ffffff;
}

.secondary-button:hover {
    color: var(--accent-dark);
    border-color: #cbb9e5;
    background: var(--accent-extra-soft);
}

.text-button {
    gap: 8px;
    border: 0;
    color: var(--text-muted);
    font-size: 0.68rem;
    background: transparent;
}

.text-button:hover {
    color: var(--accent);
}

/* Métricas */

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.metric-card {
    position: relative;
    min-height: 172px;
    padding: 22px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 17px;
    background:
        radial-gradient(
            circle at 100% 0%,
            rgba(134, 87, 221, 0.035),
            transparent 42%
        ),
        #ffffff;
    box-shadow: var(--shadow-small);
    transition:
        transform 0.3s ease,
        border-color 0.3s ease,
        box-shadow 0.3s ease;
}

.metric-card::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0;
    background:
        radial-gradient(
            300px circle at 50% 0%,
            rgba(134, 87, 221, 0.08),
            transparent 58%
        );
    transition: opacity 0.3s ease;
}

.metric-card:hover {
    transform: translateY(-4px);
    border-color: #d7cae9;
    box-shadow: var(--shadow);
}

.metric-card:hover::before {
    opacity: 1;
}

.metric-card-accent {
    border-color: #d6c5ec;
    background:
        radial-gradient(
            circle at 100% 0%,
            rgba(134, 87, 221, 0.13),
            transparent 50%
        ),
        linear-gradient(
            145deg,
            #ffffff,
            #fbf8fe
        );
}

.metric-card-header {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.metric-card-header > span {
    color: var(--text-muted);
    font-size: 0.52rem;
    font-weight: 500;
    letter-spacing: 0.15em;
}

.metric-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 1px solid #dfd4ef;
    border-radius: 10px;
    background: var(--accent-extra-soft);
}

.metric-icon svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: var(--accent-dark);
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.metric-value {
    position: relative;
    z-index: 2;
    display: block;
    margin-top: 25px;
    color: var(--text);
    font-size: 2.45rem;
    font-weight: 400;
    line-height: 1;
    letter-spacing: -0.05em;
}

.metric-card > small {
    position: relative;
    z-index: 2;
    display: block;
    margin-top: 10px;
    color: var(--text-muted);
    font-size: 0.67rem;
}

/* Resumo */

.summary-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    margin-top: 16px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: #ffffff;
    box-shadow: var(--shadow-small);
}

.summary-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 21px;
}

.summary-item:not(:last-child) {
    border-right: 1px solid var(--border);
}

.summary-item span {
    color: var(--text-muted);
    font-size: 0.66rem;
}

.summary-item strong {
    color: var(--text);
    font-size: 0.84rem;
    font-weight: 600;
}

.summary-status {
    color: var(--accent-dark) !important;
    font-size: 0.6rem !important;
    letter-spacing: 0.08em;
}

/* Painéis */

.dashboard-grid {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 16px;
    margin-top: 16px;
}

.dashboard-grid-bottom {
    grid-template-columns: 1.35fr 0.65fr;
}

.panel,
.data-panel {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 17px;
    background: #ffffff;
    box-shadow: var(--shadow-small);
}

.panel {
    min-height: 370px;
    padding: 24px;
}

.panel-header,
.data-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

.panel-header h3,
.data-panel-header h3 {
    margin-top: 7px;
    color: var(--text);
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: -0.02em;
}

.panel-tag,
.live-label,
.readonly-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 9px;
    border: 1px solid #dfd5ed;
    border-radius: 999px;
    color: var(--accent-dark);
    font-size: 0.48rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    background: var(--accent-extra-soft);
}

.live-label span {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--success);
    box-shadow:
        0 0 0 3px rgba(37, 134, 95, 0.1);
    animation: indicatorPulse 2s ease-in-out infinite;
}

/* Gráfico de status */

.status-chart {
    margin-top: 30px;
}

.status-chart-item {
    margin-top: 21px;
}

.status-chart-item:first-child {
    margin-top: 0;
}

.status-chart-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 9px;
}

.status-chart-label {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--text-soft);
    font-size: 0.72rem;
}

.status-chart-dot {
    width: 7px;
    height: 7px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--accent);
    box-shadow:
        0 0 0 3px rgba(134, 87, 221, 0.1);
}

.status-chart-value {
    color: var(--text-muted);
    font-size: 0.66rem;
}

.status-chart-track {
    height: 7px;
    overflow: hidden;
    border-radius: 999px;
    background: #eeeaf2;
}

.status-chart-fill {
    height: 100%;
    width: var(--chart-width, 0%);
    border-radius: inherit;
    background:
        linear-gradient(
            90deg,
            var(--accent-dark),
            var(--accent),
            var(--accent-light)
        );
    animation: chartGrow 0.8s ease both;
}

/* Gráfico de manutenção */

.maintenance-chart {
    min-height: 270px;
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    gap: 14px;
    padding: 35px 6px 0;
    border-bottom: 1px solid var(--border);
}

.chart-column {
    height: 230px;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.chart-value {
    color: var(--text-muted);
    font-size: 0.62rem;
}

.chart-bar {
    position: relative;
    width: min(36px, 70%);
    height: var(--bar-height, 30%);
    min-height: 12px;
    overflow: hidden;
    border-radius: 8px 8px 2px 2px;
    background:
        linear-gradient(
            to top,
            var(--accent-dark),
            var(--accent),
            #bd91f1
        );
    animation: barGrow 0.75s ease both;
    transform-origin: bottom;
}

.chart-bar::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            to right,
            rgba(255, 255, 255, 0.34),
            transparent 38%
        );
}

.chart-label {
    color: var(--text-muted);
    font-size: 0.58rem;
}

/* Filtros */

.filters-bar {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) 190px 190px;
    gap: 12px;
    margin-bottom: 16px;
}

.search-field {
    min-height: 46px;
}

.search-field input {
    min-height: 44px;
    padding: 0 14px 0 10px;
    font-size: 0.72rem;
}

.filter-field {
    min-height: 46px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 13px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #ffffff;
}

.filter-field > span {
    color: var(--text-muted);
    font-size: 0.58rem;
    white-space: nowrap;
}

.filter-field select {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text-soft);
    font-size: 0.67rem;
    cursor: pointer;
}

.filter-field option,
.action-control option,
.form-field option {
    background: #ffffff;
    color: var(--text);
}

/* Tabelas */

.panel-table {
    padding-bottom: 10px;
}

.table-wrapper {
    width: 100%;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: #cdbce3 transparent;
}

.panel-table .table-wrapper {
    margin-top: 24px;
}

table {
    width: 100%;
    border-collapse: collapse;
    white-space: nowrap;
}

th {
    padding: 13px 15px;
    border-bottom: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.5rem;
    font-weight: 600;
    letter-spacing: 0.13em;
    text-align: left;
    background: #fbfafc;
}

td {
    padding: 15px;
    border-bottom: 1px solid #eeebf1;
    color: var(--text-soft);
    font-size: 0.69rem;
}

tbody tr {
    transition: background 0.22s ease;
}

tbody tr:hover {
    background: #faf7fd;
}

tbody tr:last-child td {
    border-bottom: 0;
}

.table-primary {
    color: var(--text);
    font-weight: 600;
}

.table-secondary {
    display: block;
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 0.57rem;
}

/* Atividade */

.activity-list {
    margin-top: 23px;
}

.activity-item {
    display: grid;
    grid-template-columns: 34px 1fr auto;
    gap: 12px;
    padding: 15px 0;
    border-bottom: 1px solid var(--border);
}

.activity-item:last-child {
    border-bottom: 0;
}

.activity-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 1px solid #e0d6ee;
    border-radius: 10px;
    color: var(--accent-dark);
    font-size: 0.68rem;
    background: var(--accent-extra-soft);
}

.activity-content strong {
    display: block;
    color: var(--text);
    font-size: 0.69rem;
    font-weight: 600;
}

.activity-content p {
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 0.6rem;
    line-height: 1.55;
}

.activity-time {
    color: var(--text-muted);
    font-size: 0.57rem;
}

/* Painel de dados */

.data-panel {
    min-height: 410px;
}

.data-panel-header {
    padding: 21px 23px;
    border-bottom: 1px solid var(--border);
}

.data-panel-header > div > span {
    display: block;
    margin-top: 5px;
    color: var(--text-muted);
    font-size: 0.62rem;
}

.data-panel-header > div > span strong {
    color: var(--accent-dark);
    font-weight: 600;
}

.data-panel table {
    min-width: 900px;
}

.data-panel th {
    padding: 14px 19px;
}

.data-panel td {
    padding: 17px 19px;
}

/* Status */

.status-badge,
.priority-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 9px;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 0.56rem;
    font-weight: 500;
    line-height: 1;
}

.status-badge::before,
.priority-badge::before {
    content: "";
    width: 5px;
    height: 5px;
    flex-shrink: 0;
    border-radius: 50%;
    background: currentColor;
}

.status-disponivel,
.status-finalizada {
    color: var(--success);
    border-color: #cce9dc;
    background: var(--success-bg);
}

.status-em-operacao,
.status-em-andamento {
    color: var(--info);
    border-color: #d3def5;
    background: var(--info-bg);
}

.status-em-manutencao,
.status-aguardando-analise {
    color: var(--warning);
    border-color: #efdfb6;
    background: var(--warning-bg);
}

.status-inativo,
.status-ausente {
    color: var(--danger);
    border-color: #f0ccd2;
    background: var(--danger-bg);
}

.status-folga {
    color: #766f80;
    border-color: var(--border);
    background: #f5f3f7;
}

.priority-alta {
    color: var(--danger);
    border-color: #f0ccd2;
    background: var(--danger-bg);
}

.priority-media {
    color: var(--warning);
    border-color: #efdfb6;
    background: var(--warning-bg);
}

.priority-baixa {
    color: var(--success);
    border-color: #cce9dc;
    background: var(--success-bg);
}

/* Botão da tabela */

.table-action {
    min-height: 32px;
    padding: 0 11px;
    border: 1px solid var(--border-strong);
    color: var(--accent-dark);
    font-size: 0.59rem;
    background: #ffffff;
}

.table-action:hover {
    border-color: #c9b6e3;
    background: var(--accent-extra-soft);
}

/* Estado vazio */

.empty-state {
    padding: 75px 25px;
    text-align: center;
}

.empty-state strong {
    color: var(--text);
    font-size: 0.88rem;
    font-weight: 600;
}

.empty-state p {
    margin-top: 8px;
    color: var(--text-muted);
    font-size: 0.7rem;
}

/* Modal */

.modal {
    position: fixed;
    inset: 0;
    z-index: 4000;
    display: grid;
    place-items: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
        opacity 0.28s ease,
        visibility 0.28s ease;
}

.modal.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(30, 24, 38, 0.38);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
}

.modal-dialog {
    position: relative;
    z-index: 2;
    width: min(100%, 660px);
    max-height: min(86vh, 760px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border-strong);
    border-radius: 20px;
    background:
        radial-gradient(
            circle at 100% 0%,
            rgba(134, 87, 221, 0.075),
            transparent 33%
        ),
        #ffffff;
    box-shadow: var(--shadow-large);
    transform: translateY(18px) scale(0.98);
    transition: transform 0.28s ease;
}

.modal.active .modal-dialog {
    transform: translateY(0) scale(1);
}

.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding: 24px 25px;
    border-bottom: 1px solid var(--border);
}

.modal-header h2 {
    margin-top: 8px;
    color: var(--text);
    font-size: 1.5rem;
    font-weight: 500;
    letter-spacing: -0.035em;
}

.modal-close {
    width: 37px;
    height: 37px;
    flex-shrink: 0;
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text-muted);
    font-size: 1.2rem;
    background: #ffffff;
    cursor: pointer;
    transition:
        color 0.22s ease,
        border-color 0.22s ease,
        transform 0.22s ease;
}

.modal-close:hover {
    color: var(--accent-dark);
    border-color: #c8b5e2;
    transform: rotate(8deg);
}

.modal-content {
    padding: 25px;
    overflow-y: auto;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 18px 25px;
    border-top: 1px solid var(--border);
    background: #fbfafc;
}

/* Conteúdo do modal */

.demo-notice {
    padding: 15px 16px;
    border: 1px solid #ded1ee;
    border-radius: 12px;
    color: var(--text-soft);
    font-size: 0.7rem;
    line-height: 1.7;
    background:
        linear-gradient(
            145deg,
            var(--accent-extra-soft),
            #ffffff
        );
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 18px;
}

.detail-item {
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: #fbfafc;
}

.detail-item span {
    display: block;
    color: var(--text-muted);
    font-size: 0.53rem;
    letter-spacing: 0.08em;
}

.detail-item strong {
    display: block;
    margin-top: 7px;
    color: var(--text);
    font-size: 0.73rem;
    font-weight: 600;
}

.detail-item-full {
    grid-column: 1 / -1;
}

/* Formulários locais */

.demo-form {
    margin-top: 18px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 13px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.form-field-full {
    grid-column: 1 / -1;
}

.form-field > span {
    color: var(--text-muted);
    font-size: 0.6rem;
}

.form-field input,
.form-field select,
.form-field textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 10px;
    outline: 0;
    background: #ffffff;
    color: var(--text);
    font: inherit;
    font-size: 0.72rem;
    transition:
        border-color 0.22s ease,
        box-shadow 0.22s ease;
}

.form-field input,
.form-field select {
    min-height: 42px;
    padding: 0 12px;
}

.form-field textarea {
    min-height: 92px;
    resize: vertical;
    padding: 12px;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    border-color: #c6b2e3;
    box-shadow:
        0 0 0 3px rgba(134, 87, 221, 0.08);
}

/* Toast */

.toast-container {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 5000;
    width: min(calc(100% - 44px), 370px);
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    display: grid;
    grid-template-columns: 32px 1fr auto;
    align-items: center;
    gap: 11px;
    padding: 14px;
    border: 1px solid var(--border-strong);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    animation: toastEntrance 0.35s ease both;
    pointer-events: auto;
}

.toast-icon {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: var(--accent-dark);
    background: var(--accent-soft);
}

.toast-content strong {
    display: block;
    color: var(--text);
    font-size: 0.7rem;
    font-weight: 600;
}

.toast-content p {
    margin-top: 3px;
    color: var(--text-muted);
    font-size: 0.61rem;
    line-height: 1.5;
}

.toast-close {
    border: 0;
    color: var(--text-muted);
    background: transparent;
    cursor: pointer;
}

.toast.leaving {
    animation: toastExit 0.28s ease forwards;
}

/* Scrollbars */

.sidebar-nav::-webkit-scrollbar,
.table-wrapper::-webkit-scrollbar,
.modal-content::-webkit-scrollbar {
    width: 7px;
    height: 7px;
}

.sidebar-nav::-webkit-scrollbar-track,
.table-wrapper::-webkit-scrollbar-track,
.modal-content::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb,
.table-wrapper::-webkit-scrollbar-thumb,
.modal-content::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: #cab9df;
}

/* Animações */

@keyframes indicatorPulse {
    0%,
    100% {
        opacity: 0.55;
        transform: scale(0.86);
    }

    50% {
        opacity: 1;
        transform: scale(1.12);
    }
}

@keyframes viewEntrance {
    from {
        opacity: 0;
        transform: translateY(11px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes chartGrow {
    from {
        width: 0;
    }
}

@keyframes barGrow {
    from {
        transform: scaleY(0);
        opacity: 0;
    }

    to {
        transform: scaleY(1);
        opacity: 1;
    }
}

@keyframes toastEntrance {
    from {
        opacity: 0;
        transform: translateX(24px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toastExit {
    to {
        opacity: 0;
        transform: translateX(24px);
    }
}

/* Notebook */

@media (max-width: 1250px) {
    :root {
        --sidebar-width: 250px;
    }

    .main-content {
        width: min(calc(100% - 42px), 1480px);
    }

    .topbar {
        padding-left: 24px;
        padding-right: 24px;
    }

    .global-search {
        width: 205px;
    }

    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .dashboard-grid,
    .dashboard-grid-bottom {
        grid-template-columns: 1fr;
    }

    .view-header {
        align-items: flex-start;
    }
}

/* Tablet */

@media (max-width: 980px) {
    :root {
        --sidebar-width: 280px;
    }

    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.34s ease;
        box-shadow:
            25px 0 70px rgba(40, 31, 55, 0.18);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .sidebar-close,
    .sidebar-toggle {
        display: block;
    }

    .app-content {
        margin-left: 0;
    }

    .filters-bar {
        grid-template-columns: 1fr 170px 170px;
    }
}

/* Mobile */

@media (max-width: 760px) {
    :root {
        --banner-height: 54px;
        --topbar-height: auto;
    }

    body {
        padding-top: var(--banner-height);
    }

    .demo-banner-content {
        width: min(calc(100% - 22px), 1700px);
    }

    .demo-banner-message {
        gap: 7px;
    }

    .demo-banner-message > span:last-child {
        display: none;
    }

    .demo-banner-message strong {
        font-size: 0.53rem;
        letter-spacing: 0.1em;
    }

    .back-to-ylume {
        font-size: 0.59rem;
    }

    .sidebar {
        top: var(--banner-height);
        width: min(86vw, 300px);
    }

    .sidebar-overlay {
        inset: var(--banner-height) 0 0;
    }

    .topbar {
        min-height: auto;
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
        padding: 16px;
    }

    .topbar-left,
    .topbar-right {
        width: 100%;
    }

    .topbar-right {
        gap: 12px;
    }

    .global-search {
        width: 100%;
    }

    .topbar-update {
        display: none;
    }

    .page-heading h1 {
        font-size: 1.18rem;
    }

    .main-content {
        width: min(calc(100% - 28px), 1480px);
        padding: 35px 0 60px;
    }

    .view-header {
        align-items: stretch;
        flex-direction: column;
        gap: 24px;
    }

    .action-control {
        min-width: 0;
    }

    .action-control-row {
        flex-direction: column;
    }

    .action-control select,
    .action-control .primary-button {
        width: 100%;
        min-width: 0;
    }

    .metrics-grid {
        grid-template-columns: 1fr 1fr;
        gap: 11px;
    }

    .metric-card {
        min-height: 158px;
        padding: 17px;
    }

    .metric-card-header > span {
        font-size: 0.46rem;
    }

    .metric-icon {
        width: 30px;
        height: 30px;
    }

    .metric-value {
        margin-top: 21px;
        font-size: 2.05rem;
    }

    .summary-strip {
        grid-template-columns: repeat(2, 1fr);
    }

    .summary-item {
        padding: 16px;
    }

    .summary-item:nth-child(2) {
        border-right: 0;
    }

    .summary-item:nth-child(-n + 2) {
        border-bottom: 1px solid var(--border);
    }

    .panel {
        min-height: auto;
        padding: 19px;
    }

    .dashboard-grid {
        gap: 12px;
        margin-top: 12px;
    }

    .filters-bar {
        grid-template-columns: 1fr;
    }

    .filter-field {
        min-height: 44px;
    }

    .data-panel-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .maintenance-chart {
        min-height: 230px;
        gap: 7px;
    }

    .chart-column {
        height: 200px;
    }

    .chart-bar {
        width: min(28px, 75%);
    }

    .details-grid,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .detail-item-full,
    .form-field-full {
        grid-column: auto;
    }

    .modal {
        align-items: end;
        padding: 0;
    }

    .modal-dialog {
        width: 100%;
        max-height: 92vh;
        border-radius: 22px 22px 0 0;
    }

    .toast-container {
        right: 14px;
        bottom: 14px;
        width: calc(100% - 28px);
    }
}

/* Celulares menores */

@media (max-width: 480px) {
    .metrics-grid {
        grid-template-columns: 1fr;
    }

    .metric-card {
        min-height: 142px;
    }

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

    .summary-item {
        border-right: 0 !important;
        border-bottom: 1px solid var(--border);
    }

    .summary-item:last-child {
        border-bottom: 0;
    }

    .panel-header {
        align-items: flex-start;
    }

    .readonly-badge,
    .panel-tag {
        font-size: 0.42rem;
    }
}

/* Movimento reduzido */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}