:root {
    --navy: #07162d;
    --navy-soft: #102540;
    --blue: #176bff;
    --cyan: #25c3ff;
    --surface: #ffffff;
    --background: #f4f7fb;
    --text: #14233a;
    --muted: #6d7d91;
    --line: #e3eaf2;
    --green: #12a66a;
    --yellow: #e7a50b;
    --red: #dc4154;
    --shadow: 0 12px 35px rgba(24, 53, 90, .08);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--text); background: var(--background); }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
code { font-family: "Cascadia Code", Consolas, monospace; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 250px 1fr; }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 28px 20px; color: #fff; background: linear-gradient(165deg, var(--navy), #0c2342); display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 750; font-size: 17px; margin-bottom: 42px; }
.brand-mark { width: 54px; height: 54px; border-radius: 17px; display: grid; place-items: center; color: #fff; font-weight: 900; letter-spacing: -2px; font-size: 23px; background: linear-gradient(135deg, var(--blue), var(--cyan)); box-shadow: 0 10px 28px rgba(37, 195, 255, .25); }
.small-mark { width: 38px; height: 38px; border-radius: 12px; font-size: 16px; }
.brand-mark img { width: 82%; height: 82%; display: block; }
.sidebar nav { display: grid; gap: 7px; }
.sidebar nav a, .logout { padding: 12px 14px; border-radius: 11px; color: #aebbd0; font-size: 14px; transition: .2s ease; }
.sidebar nav a:hover, .sidebar nav a.active { color: #fff; background: rgba(255, 255, 255, .09); }
.logout { margin-top: auto; }
.logout:hover { color: #fff; }
.sidebar-install { margin-top: auto; padding: 10px 12px; color: #90dcf4; border: 1px solid rgba(82, 211, 255, .2); border-radius: 10px; background: rgba(60, 194, 238, .07); cursor: pointer; font-size: 14px; font-weight: 750; }
.sidebar-install:hover { color: #fff; border-color: rgba(82, 211, 255, .4); background: rgba(60, 194, 238, .12); }
.sidebar-install + .logout { margin-top: 8px; }
.sidebar-install[hidden] + .logout { margin-top: auto; }

.content { width: min(1420px, 100%); padding: 34px 38px 60px; }
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 26px; }
.topbar h1 { margin: 2px 0 0; font-size: clamp(25px, 3vw, 34px); letter-spacing: -.8px; }
.eyebrow { color: var(--blue); font-size: 14px; font-weight: 850; letter-spacing: 1.5px; margin: 0; }
.mode-pill { background: #eaf2ff; color: #145bc8; border: 1px solid #cee0fc; border-radius: 99px; padding: 8px 13px; font-size: 14px; font-weight: 700; }
.mode-pill i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--green); margin-right: 7px; box-shadow: 0 0 0 4px rgba(18, 166, 106, .12); }

.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; margin-bottom: 22px; }
.stat-card { position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 17px; padding: 20px; box-shadow: var(--shadow); }
.stat-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--blue); }
.stat-card.green::before { background: var(--green); }
.stat-card.yellow::before { background: var(--yellow); }
.stat-card.red::before { background: var(--red); }
.stat-card span, .stat-card small { color: var(--muted); display: block; font-size: 14px; }
.stat-card strong { display: block; font-size: 31px; margin: 6px 0 2px; }
.stat-card .stat-breakdown { color: #92a9b9; line-height: 1.45; }
.stat-card .stat-note { width: fit-content; margin-top: 7px; padding: 3px 7px; border: 1px solid rgba(132, 162, 188, .14); border-radius: 999px; color: #7f95a5; background: rgba(255, 255, 255, .025); font-size: 12px; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 22px; box-shadow: var(--shadow); margin-bottom: 22px; }
.panel-intro { max-width: 780px; margin: -6px 0 20px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 17px; }
.section-head h2 { margin: 3px 0 0; font-size: 20px; }
.section-head > span { color: var(--muted); font-size: 14px; }
.empty { text-align: center; padding: 42px 20px; color: var(--muted); }
.empty strong { color: var(--text); }
.empty p { margin-bottom: 0; }

.device-list { display: grid; gap: 10px; }
.device-card { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; }
.device-card summary { cursor: pointer; list-style: none; display: grid; grid-template-columns: 12px minmax(190px, 1fr) auto minmax(170px, auto); align-items: center; gap: 14px; padding: 16px; }
.device-card summary::-webkit-details-marker { display: none; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; background: #9eabbc; box-shadow: 0 0 0 4px #edf0f4; }
.status-green .status-dot { background: var(--green); box-shadow: 0 0 0 4px #ddf7ec; }
.status-yellow .status-dot { background: var(--yellow); box-shadow: 0 0 0 4px #fff2cd; }
.status-red .status-dot { background: var(--red); box-shadow: 0 0 0 4px #ffe0e5; }
.device-main strong, .device-main small { display: block; }
.device-main small, .last-seen { color: var(--muted); font-size: 14px; margin-top: 3px; }
.status-badge { font-size: 14px; font-weight: 750; padding: 6px 10px; border-radius: 99px; background: #edf0f4; color: #647184; }
.status-green .status-badge { color: #087649; background: #ddf7ec; }
.status-yellow .status-badge { color: #8a6000; background: #fff2cd; }
.status-red .status-badge { color: #ad2638; background: #ffe0e5; }
.device-detail { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 16px; border-top: 1px solid var(--line); background: #f9fbfd; }
.metric { border: 1px solid var(--line); border-radius: 11px; padding: 12px; background: #fff; }
.metric span { display: block; color: var(--muted); font-size: 14px; }
.metric strong { display: block; margin-top: 5px; }
.detail-meta { grid-column: 1 / -1; display: flex; gap: 22px; flex-wrap: wrap; color: var(--muted); font-size: 14px; }
.device-detail form { grid-column: 1 / -1; }
.device-rename-form { display: grid; grid-template-columns: minmax(220px, 1fr) auto; align-items: end; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.device-rename-form label { display: grid; gap: 6px; margin: 0; }
.device-rename-form label > span { font-size: 14px; font-weight: 600; color: var(--text); }
.device-rename-form label > small { color: var(--muted); font-size: 14px; font-weight: 400; line-height: 1.4; }
.device-rename-form input, .device-rename-form select { width: 100%; }
.device-rename-form select { min-height: 42px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--text); font: inherit; }

.two-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.inline-form { display: grid; grid-template-columns: 1fr auto; gap: 9px; }
.company-list { list-style: none; padding: 0; margin: 16px 0 0; border-top: 1px solid var(--line); }
.company-list li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 3px; border-bottom: 1px solid var(--line); }
.company-list small { color: var(--muted); }

/* Clientes agrupam computadores e sites; cada ativo abre seu próprio painel. */
.company-add-form { margin-bottom: 18px; }
.section-head-actions { display: flex; align-items: center; justify-content: flex-end; gap: 14px; }
.section-head-actions > span { color: var(--muted); font-size: 14px; }
.client-assets { margin-top: 18px; }
.asset-tabs { display: flex; gap: 5px; overflow-x: auto; margin-bottom: 16px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: rgba(3, 10, 17, .38); }
.asset-tabs button { flex: 0 0 auto; min-height: 40px; padding: 9px 14px; border: 1px solid transparent; border-radius: 9px; color: #7e92a2; background: transparent; font: inherit; font-size: 14px; cursor: pointer; }
.asset-tabs button:hover { color: #cbeaf3; }
.asset-tabs button.active { color: #e6f8fc; border-color: rgba(66, 207, 240, .22); background: rgba(49, 185, 219, .1); }
.asset-tabs button span { margin-left: 5px; padding: 2px 6px; border-radius: 999px; color: #8ddff4; background: rgba(44, 179, 215, .1); font-size: 12px; }
.client-asset-panel[hidden], .installation-panel[hidden] { display: none !important; }
.client-sites-empty { display: grid; justify-items: center; padding: 60px 24px; border: 1px dashed rgba(123, 157, 182, .2); border-radius: 14px; background: rgba(255, 255, 255, .012); text-align: center; }
.client-sites-icon { display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 12px; border: 1px solid rgba(72, 207, 239, .22); border-radius: 50%; color: #65d8f2; background: rgba(50, 189, 224, .06); font-size: 24px; }
.client-sites-empty strong { color: #dceaf2; font-size: 16px; }
.client-sites-empty p { max-width: 570px; margin: 7px 0 16px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.has-modal-open { overflow: hidden; }
.client-modal { position: fixed; z-index: 1200; inset: 0; display: grid; place-items: center; padding: 22px; }
.client-modal[hidden] { display: none !important; }
.client-modal-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: rgba(2, 7, 12, .78); backdrop-filter: blur(5px); cursor: default; }
.client-modal-dialog { position: relative; z-index: 1; width: min(590px, 100%); overflow: hidden; border: 1px solid rgba(91, 191, 221, .22); border-radius: 18px; background: #0d1722; box-shadow: 0 30px 90px rgba(0, 0, 0, .55); }
.client-modal-dialog > header { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 19px 21px; border-bottom: 1px solid var(--line); }
.client-modal-dialog > header h3 { margin: 3px 0 0; font-size: 19px; }
.client-modal-dialog > header > button { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid rgba(126, 157, 181, .18); border-radius: 9px; color: #8fa4b4; background: rgba(255, 255, 255, .025); font-size: 23px; cursor: pointer; }
.client-modal-form { display: grid; gap: 19px; padding: 21px; }
.client-modal-form > label { display: grid; gap: 7px; }
.client-modal-form > label > span, .client-modal-form legend { color: #b8c8d4; font-size: 14px; font-weight: 600; }
.client-modal-form input[type="text"], .client-modal-form input[name="company_name"] { width: 100%; }
.client-modal-form fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.client-modal-form fieldset > p { margin: 5px 0 11px; color: #718698; font-size: 13px; line-height: 1.5; }
.client-asset-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.client-asset-choice { position: relative; cursor: pointer; }
.client-asset-choice input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.client-asset-choice > span { display: block; min-height: 88px; padding: 14px; border: 1px solid rgba(126, 157, 181, .18); border-radius: 12px; background: rgba(255, 255, 255, .016); transition: .16s ease; }
.client-asset-choice b, .client-asset-choice small { display: block; }
.client-asset-choice b { color: #d9e7ef; font-size: 14px; }
.client-asset-choice small { margin-top: 6px; color: #74899a; font-size: 13px; line-height: 1.45; }
.client-asset-choice input:checked + span { border-color: rgba(66, 207, 240, .42); background: rgba(49, 185, 219, .08); box-shadow: inset 0 0 0 1px rgba(66, 207, 240, .08); }
.client-asset-choice input:focus-visible + span { outline: 2px solid #4acff0; outline-offset: 2px; }
.client-modal-actions { display: flex; justify-content: flex-end; gap: 9px; padding-top: 3px; }
.company-accordion { display: grid; gap: 10px; }
.company-card { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: #0b151f; }
.company-card > summary { display: grid; grid-template-columns: minmax(220px, 1fr) auto 24px; align-items: center; gap: 16px; min-height: 66px; padding: 14px 16px; cursor: pointer; list-style: none; }
.company-card > summary::-webkit-details-marker { display: none; }
.company-card[open] > summary { border-bottom: 1px solid var(--line); background: rgba(48, 189, 225, .025); }
.company-main strong, .company-main small { display: block; }
.company-main strong { color: #e6f0f6; font-size: 15px; }
.company-main small { margin-top: 4px; color: var(--muted); font-size: 14px; }
.company-statuses { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 6px; }
.company-statuses i { padding: 3px 7px; border: 1px solid rgba(139, 160, 177, .14); border-radius: 999px; color: #91a4b3; background: rgba(139, 160, 177, .05); font-size: 13px; font-style: normal; white-space: nowrap; }
.company-statuses .is-green { color: #63dbb0; border-color: rgba(18, 166, 106, .2); background: rgba(18, 166, 106, .07); }
.company-statuses .is-yellow { color: #f0c35a; border-color: rgba(231, 165, 11, .2); background: rgba(231, 165, 11, .07); }
.company-statuses .is-red { color: #ff8292; border-color: rgba(220, 65, 84, .22); background: rgba(220, 65, 84, .07); }
.company-chevron { color: #7890a2; font-size: 18px; transition: transform .18s ease; }
.company-card[open] .company-chevron { transform: rotate(180deg); }
.company-computers { padding: 8px; }
.company-computer-row { display: grid; grid-template-columns: 10px minmax(210px, 1fr) auto 125px 18px; align-items: center; gap: 13px; min-height: 58px; padding: 10px 12px; border: 1px solid transparent; border-radius: 10px; transition: .16s ease; }
.company-computer-row:hover { border-color: rgba(64, 205, 241, .18); background: rgba(52, 185, 221, .045); }
.company-computer-row .status-badge { padding: 4px 8px; font-size: 13px; }
.company-computer-main strong, .company-computer-main small { display: block; }
.company-computer-main strong { color: #dce9f2; font-size: 14px; }
.company-computer-main small { margin-top: 3px; color: #74899a; font-size: 14px; }
.company-computer-row .last-seen { text-align: right; }
.row-arrow { color: #5fcfea; font-size: 20px; }
.company-empty { padding: 20px; color: #74899a; font-size: 14px; text-align: center; }

.installation-tabs { margin: 18px 0; }
.installation-panel { display: grid; gap: 16px; }
.installation-coming-soon { opacity: .78; }
.installation-coming-soon button:disabled { cursor: not-allowed; opacity: .62; }
.installation-site-placeholder { align-items: end; }
.installation-site-placeholder > span { color: #718698; font-size: 13px; line-height: 1.5; }
.site-workspace .computer-header h2 { overflow-wrap: anywhere; }
.site-row .company-computer-main small { overflow-wrap: anywhere; }
.site-workspace .technical-list article { grid-template-columns: minmax(240px, 1.2fr) minmax(100px, .45fr) minmax(150px, .55fr); }
.site-workspace .technical-list article > span { overflow-wrap: anywhere; }
.install-empty-note code { padding: 3px 6px; border: 1px solid rgba(80, 190, 220, .16); border-radius: 6px; color: #8ee2fa; background: rgba(36, 165, 207, .07); user-select: all; }
.luigi-enrollment-result { border-color: rgba(55, 219, 168, .24); background: rgba(55, 219, 168, .045); }
.site-availability.is-up { color: #63dbb0; }
.site-availability.is-degraded { color: #f0c35a; }
.site-availability.is-down { color: #ff8292; }
.site-external-summary { display: grid; grid-template-columns: minmax(150px, .35fr) minmax(260px, 1fr); gap: 8px 20px; margin-top: 12px; padding: 14px 16px; border: 1px solid rgba(132, 163, 190, .16); border-radius: 12px; background: rgba(255, 255, 255, .016); }
.site-external-summary div span, .site-external-summary div strong { display: block; }
.site-external-summary div span { color: #718697; font-size: 12px; letter-spacing: .08em; }
.site-external-summary div strong { margin-top: 5px; color: #9aabba; font-size: 15px; }
.site-external-summary p, .site-external-summary small { margin: 0; color: #9aabba; font-size: 13px; line-height: 1.5; }
.site-external-summary small { grid-column: 2; color: #6f8495; overflow-wrap: anywhere; }
.site-external-summary.is-up { border-color: rgba(18, 166, 106, .2); background: rgba(18, 166, 106, .04); }
.site-external-summary.is-up div strong { color: #63dbb0; }
.site-external-summary.is-degraded { border-color: rgba(231, 165, 11, .23); background: rgba(231, 165, 11, .04); }
.site-external-summary.is-degraded div strong { color: #f0c35a; }
.site-external-summary.is-down { border-color: rgba(220, 65, 84, .25); background: rgba(220, 65, 84, .04); }
.site-external-summary.is-down div strong { color: #ff8292; }
.site-history-sections { display: grid; gap: 14px; }
.site-history-sections > section { overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: #0a141e; }
.site-history-sections > section > header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 15px; border-bottom: 1px solid var(--line); }
.site-history-sections header span { color: #59d2f0; font-size: 12px; letter-spacing: .1em; }
.site-history-sections header h3 { margin: 3px 0 0; font-size: 15px; }
.site-history-sections header > strong { color: #dbe8f0; font-size: 14px; }
.site-history-sections .computer-history { padding: 12px; }
@media (max-width: 760px) {
    .site-external-summary { grid-template-columns: 1fr; }
    .site-external-summary small { grid-column: 1; }
}

.computer-workspace { padding: 0; overflow: hidden; }
.computer-back { display: inline-flex; margin: 18px 22px 0; color: #70d9f3; font-size: 14px; }
.computer-back:hover { color: #b9f2ff; }
.computer-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 22px 20px; }
.computer-header h2 { margin: 5px 0 5px; font-size: 24px; }
.computer-header > div:first-child > span { color: var(--muted); font-size: 14px; }
.computer-header-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 9px; }
.status-badge.status-green { color: #63dbb0; background: rgba(18, 166, 106, .1); }
.status-badge.status-yellow { color: #f0c35a; background: rgba(231, 165, 11, .1); }
.status-badge.status-red { color: #ff8292; background: rgba(220, 65, 84, .1); }
.computer-tabs { display: flex; gap: 4px; overflow-x: auto; overflow-y: hidden; padding: 0 22px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgba(5, 13, 21, .38); }
.computer-tabs button { position: relative; flex: 0 0 auto; padding: 13px 14px; border: 0; color: #75899a; background: transparent; cursor: pointer; font-size: 14px; }
.computer-tabs button::after { content: ""; position: absolute; right: 12px; bottom: -1px; left: 12px; height: 2px; background: transparent; }
.computer-tabs button.active { color: #dff6fd; }
.computer-tabs button.active::after { background: #41ccec; }
.preventive-monitoring-summary { display: grid; gap: 4px; padding: 11px 12px; border: 1px solid rgba(126, 157, 183, .13); border-radius: 10px; background: rgba(255, 255, 255, .018); }
.preventive-monitoring-summary strong { font-size: 14px; }
.preventive-monitoring-summary strong.is-online { color: #63dbb0; }
.preventive-monitoring-summary strong.is-offline { color: #ff9a70; }
.preventive-monitoring-summary span { color: var(--muted); font-size: 13px; }
.computer-tabs button span { margin-left: 4px; padding: 2px 5px; border-radius: 999px; color: #f0c35a; background: rgba(231, 165, 11, .1); font-size: 13px; }
.computer-tab-panel { padding: 20px 22px 26px; }
.computer-tab-panel[hidden] { display: none !important; }
.computer-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.computer-metrics article { min-width: 0; padding: 13px 14px; border: 1px solid var(--line); border-radius: 12px; background: #0b151f; }
.computer-metrics span, .computer-metrics strong { display: block; }
.computer-metrics span { color: #75899a; font-size: 14px; }
.computer-metrics strong { overflow-wrap: anywhere; margin-top: 6px; color: #e0ebf3; font-size: 16px; }
.computer-summary { margin-top: 12px; padding: 14px 16px; border: 1px solid rgba(132, 163, 190, .16); border-radius: 12px; background: rgba(255, 255, 255, .016); }
.computer-summary > span { display: block; margin-bottom: 7px; color: #9aabba; font-size: 14px; letter-spacing: .08em; }
.computer-summary ul { margin: 0; padding-left: 18px; }
.computer-summary li, .computer-summary p { margin: 0; color: #c9d5df; font-size: 14px; line-height: 1.6; }
.computer-summary li + li { margin-top: 3px; }
.computer-summary.is-yellow { border-color: rgba(231, 165, 11, .23); background: rgba(231, 165, 11, .04); }
.computer-summary.is-yellow > span { color: #f0c35a; }
.computer-summary.is-red { border-color: rgba(220, 65, 84, .25); background: rgba(220, 65, 84, .04); }
.computer-summary.is-red > span { color: #ff8292; }
.computer-summary.is-green { border-color: rgba(18, 166, 106, .2); background: rgba(18, 166, 106, .04); }
.computer-summary.is-green > span { color: #63dbb0; }
.computer-identity { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.computer-identity span { color: #9aabba; font-size: 14px; }
.computer-identity b { display: inline-block; margin-right: 6px; color: #64798b; }
.remote-access-card { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 16px; padding: 15px 16px; border: 1px solid var(--line); border-radius: 13px; background: #0a141e; }
.remote-access-card.is-ready { border-color: rgba(18, 166, 106, .25); background: rgba(18, 166, 106, .035); }
.remote-access-card > div > span { display: block; margin-bottom: 5px; color: #59d2f0; font-size: 11px; font-weight: 700; letter-spacing: .1em; }
.remote-access-card strong { color: #dce8f0; font-size: 15px; }
.remote-access-card p, .remote-access-card small { display: block; margin: 5px 0 0; color: #8fa2b1; font-size: 13px; line-height: 1.5; }
.remote-access-card small { color: #718697; }
.remote-access-card .button { flex: 0 0 auto; }
@media (max-width: 620px) {
    .remote-access-card { align-items: stretch; flex-direction: column; }
    .remote-access-card .button { width: 100%; }
}
.diagnostic-sections { display: grid; gap: 12px; }
.diagnostic-sections > section { overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: #0a141e; }
.diagnostic-sections > section > header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 15px; border-bottom: 1px solid var(--line); }
.diagnostic-sections header span { color: #59d2f0; font-size: 13px; letter-spacing: .1em; }
.diagnostic-sections header h3 { margin: 3px 0 0; font-size: 15px; }
.diagnostic-sections header > strong { color: #dbe8f0; font-size: 14px; }
.technical-list { display: grid; }
.technical-list article { display: grid; grid-template-columns: minmax(260px, 1.4fr) minmax(180px, .8fr) auto; align-items: center; gap: 14px; padding: 13px 15px; border-top: 1px solid rgba(123, 156, 180, .1); }
.technical-list article:first-child { border-top: 0; }
.technical-list strong, .technical-list small { display: block; }
.technical-list strong { color: #dce8f0; font-size: 14px; }
.technical-list small, .technical-list p, .technical-list article > span { color: #7f93a3; font-size: 14px; line-height: 1.5; }
.technical-list small { margin-top: 4px; }
.technical-list p { margin: 0; }
.technical-list article > span { text-align: right; }
.event-list article { grid-template-columns: minmax(190px, .55fr) minmax(300px, 1.45fr) auto; align-items: start; }
.diagnostic-note { margin: 0; padding: 15px; color: #8296a6; font-size: 14px; line-height: 1.6; }
.diagnostic-facts, .service-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; padding: 12px; }
.diagnostic-facts span, .service-grid span { padding: 10px 11px; border: 1px solid rgba(132, 163, 190, .13); border-radius: 9px; color: #b5c5d0; background: rgba(255, 255, 255, .015); font-size: 14px; }
.diagnostic-facts b, .service-grid b { display: block; margin-bottom: 4px; color: #718697; font-size: 13px; }
.service-grid .is-running { border-color: rgba(18, 166, 106, .18); }
.service-grid .is-stopped { border-color: rgba(231, 165, 11, .2); }
.computer-recommendations { display: grid; gap: 10px; }
.computer-recommendations article { display: grid; grid-template-columns: 155px minmax(260px, 1fr) minmax(210px, .65fr); align-items: start; gap: 16px; padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: #0a141e; }
.computer-recommendations strong { color: #dce8f0; font-size: 14px; }
.computer-recommendations p, .computer-recommendations small, .computer-recommendations aside { color: #8296a6; font-size: 14px; line-height: 1.55; }
.computer-recommendations p { margin: 5px 0; color: #c2d0da; }
.computer-recommendations aside { padding-left: 14px; border-left: 1px solid var(--line); }
.computer-recommendations aside > span { display: block; }
.computer-recommendations aside .button { margin-top: 12px; width: 100%; }
.guidance-badge { width: fit-content; padding: 6px 8px; border-radius: 999px; color: #87a0b2; background: rgba(135, 160, 178, .08); font-size: 11px; }
.guidance-badge.is-manual { color: #ff9cab; background: rgba(220, 65, 84, .09); }
.guidance-badge.is-confirm { color: #f0c35a; background: rgba(231, 165, 11, .09); }
.guidance-badge.is-observe { color: #67dcb3; background: rgba(18, 166, 106, .09); }
.luigi-fix-code { display: block; width: fit-content; max-width: 100%; margin-top: 10px; padding: 8px 10px; overflow-x: auto; border: 1px solid rgba(66, 207, 240, .18); border-radius: 8px; color: #8ee2fa; background: rgba(36, 165, 207, .07); font: 400 13px/1.4 ui-monospace, SFMono-Regular, Consolas, monospace; user-select: all; }
.luigi-update-analysis-list { display: grid; gap: 14px; padding: 0 14px 16px; }
.luigi-update-analysis-card { overflow: hidden; border: 1px solid rgba(132, 163, 190, .16); border-left: 4px solid #d9a72e; border-radius: 14px; background: linear-gradient(145deg, rgba(13, 28, 40, .98), rgba(8, 19, 29, .98)); }
.luigi-update-analysis-card.risk-low { border-left-color: #2ecb91; }
.luigi-update-analysis-card.risk-high, .luigi-update-analysis-card.risk-critical { border-left-color: #ec6574; }
.luigi-update-analysis-card > header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 17px 18px; border-bottom: 1px solid rgba(132, 163, 190, .13); }
.luigi-update-analysis-card > header span, .luigi-update-analysis-card footer span { color: #56d8f7; font-size: 11px; font-weight: 850; letter-spacing: 1.15px; }
.luigi-update-analysis-card > header h4 { margin: 4px 0 3px; color: #e5edf3; font-size: 18px; }
.luigi-update-analysis-card > header small { color: #8298a8; }
.luigi-update-analysis-card > header > b { flex: 0 0 auto; padding: 6px 9px; border: 1px solid rgba(217, 167, 46, .22); border-radius: 999px; color: #f0c65c; background: rgba(217, 167, 46, .08); font-size: 12px; }
.luigi-update-analysis-card.risk-low > header > b { border-color: rgba(46, 203, 145, .2); color: #67dfb1; background: rgba(46, 203, 145, .08); }
.luigi-update-analysis-card.risk-high > header > b, .luigi-update-analysis-card.risk-critical > header > b { border-color: rgba(236, 101, 116, .22); color: #ff9aa5; background: rgba(236, 101, 116, .08); }
.luigi-update-summary { margin: 0; padding: 15px 18px 8px; color: #c8d6df; line-height: 1.55; }
.luigi-research-state { display: flex; align-items: center; gap: 8px; margin: 4px 18px 14px; color: #8298a8; font-size: 12px; }
.luigi-research-state i { width: 7px; height: 7px; border-radius: 50%; background: #7890a2; }
.luigi-research-state.is-pending i { background: #e1ac32; box-shadow: 0 0 0 4px rgba(225, 172, 50, .08); }
.luigi-research-state.is-ready { color: #68cfa8; }
.luigi-research-state.is-ready i { background: #2ecb91; box-shadow: 0 0 0 4px rgba(46, 203, 145, .08); }
.luigi-update-analysis-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 0 18px 17px; }
.luigi-update-analysis-grid section { padding: 13px 14px; border: 1px solid rgba(132, 163, 190, .12); border-radius: 10px; background: rgba(255, 255, 255, .018); }
.luigi-update-analysis-grid h5 { margin: 0 0 8px; color: #aebfca; font-size: 13px; }
.luigi-update-analysis-grid ul { margin: 0; padding-left: 18px; color: #8499a8; font-size: 13px; line-height: 1.55; }
.luigi-update-analysis-grid li + li { margin-top: 5px; }
.luigi-update-analysis-card > footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 15px 18px; border-top: 1px solid rgba(132, 163, 190, .13); background: rgba(62, 198, 237, .025); }
.luigi-update-analysis-card > footer p { margin: 5px 0 0; color: #aebfca; font-size: 13px; line-height: 1.5; }
.luigi-update-analysis-card > footer .button { flex: 0 0 auto; }
.luigi-update-actions { flex: 0 0 min(330px, 42%); display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.luigi-update-actions form { display: block; }
.luigi-authorize-button { color: #062118; background: linear-gradient(135deg, #63e4b3, #2ecb91); }
.luigi-command-state, .luigi-command-hint { max-width: 320px; padding: 8px 10px; border: 1px solid rgba(132, 163, 190, .16); border-radius: 9px; color: #8ea4b3; background: rgba(255, 255, 255, .025); font-size: 12px; line-height: 1.35; }
.luigi-command-state.is-queued, .luigi-command-state.is-running { border-color: rgba(225, 172, 50, .24); color: #efc45d; background: rgba(225, 172, 50, .06); }
.luigi-command-state.is-completed { border-color: rgba(55, 211, 166, .25); color: #7be6bf; background: rgba(55, 211, 166, .07); }
.luigi-command-state.is-rolled_back, .luigi-command-state.is-failed, .luigi-command-state.is-expired { border-color: rgba(239, 83, 104, .27); color: #ff8ea0; background: rgba(239, 83, 104, .07); }
.luigi-agent-release { align-items: flex-start; }
.luigi-agent-release ul { margin: 10px 0 0; padding-left: 18px; color: #8ea4b3; font-size: 13px; line-height: 1.55; }
.luigi-command-history { margin-top: 14px; }
.computer-history { display: grid; gap: 8px; }
.computer-history article { display: grid; grid-template-columns: 10px 1fr auto; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 11px; background: #0a141e; }
.history-dot { width: 8px; height: 8px; border-radius: 50%; background: #718292; }
.history-dot.is-green { background: #20c58a; }
.history-dot.is-yellow { background: #e7a50b; }
.history-dot.is-red { background: #dc4154; }
.computer-history strong, .computer-history small { display: block; }
.computer-history strong { color: #dbe8f0; font-size: 14px; }
.computer-history small, .computer-history time { margin-top: 3px; color: #75899a; font-size: 14px; }
.computer-empty-state { padding: 42px 20px; color: #7f93a3; text-align: center; }
.computer-empty-state strong { color: #dbe8f0; }
.computer-empty-state p { margin: 6px 0 0; font-size: 13px; }
.computer-settings { display: grid; gap: 14px; }
.computer-security-zone { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 15px; border: 1px solid rgba(47, 207, 186, .18); border-radius: 12px; background: rgba(47, 207, 186, .025); }
.computer-security-zone strong { color: #e9f8f7; font-size: 14px; }
.computer-security-zone p { margin: 5px 0 0; color: #8296a6; font-size: 13px; }
.computer-security-zone dl { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin: 0; }
.computer-security-zone dl span { padding: 7px 9px; border: 1px solid rgba(132, 160, 179, .14); border-radius: 9px; color: #8296a6; font-size: 12px; white-space: nowrap; }
.computer-security-zone dl b { display: block; margin-top: 2px; color: #dcecf0; }
.computer-security-zone form { margin-top: 9px; text-align: right; }
.computer-security-zone.is-critical { border-color: rgba(220, 65, 84, .25); background: rgba(220, 65, 84, .035); }
.computer-security-zone.is-attention { border-color: rgba(242, 183, 5, .2); background: rgba(242, 183, 5, .025); }
.computer-danger-zone { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 15px; border: 1px solid rgba(220, 65, 84, .2); border-radius: 12px; background: rgba(220, 65, 84, .025); }
.computer-danger-zone strong { color: #f0dce1; font-size: 14px; }
.computer-danger-zone p { margin: 5px 0 0; color: #8296a6; font-size: 13px; }
.computer-danger-zone form { flex: 0 0 auto; }
.computer-delete-zone { display: grid; grid-template-columns: minmax(260px, .8fr) minmax(320px, 1.2fr); align-items: start; gap: 20px; padding: 16px; border: 1px solid rgba(220, 65, 84, .3); border-radius: 12px; background: rgba(105, 18, 32, .08); }
.computer-delete-zone strong { color: #ff9caa; font-size: 14px; }
.computer-delete-zone p { margin: 6px 0 0; color: #8d9fac; font-size: 13px; line-height: 1.55; }
.computer-delete-zone form { display: grid; grid-template-columns: minmax(190px, 1fr) auto; align-items: end; gap: 10px; }
.computer-delete-zone label { margin: 0; }
.computer-delete-zone label > span { color: #c48d96; font-size: 12px; }

.agents-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.agent-card { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; padding: 19px; background: linear-gradient(145deg, #fff, #f7faff); }
.agent-card.is-active { border-color: #cce8f6; box-shadow: inset 0 1px 0 #fff, 0 12px 30px rgba(26, 117, 177, .07); }
.agent-card.is-active::after { content: ""; position: absolute; width: 130px; height: 130px; right: -70px; top: -70px; border: 1px solid rgba(37, 195, 255, .25); border-radius: 50%; box-shadow: 0 0 45px rgba(37, 195, 255, .12); }
.agent-card-top { display: flex; align-items: center; gap: 13px; position: relative; z-index: 1; }
.agent-avatar { flex: 0 0 auto; width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: linear-gradient(145deg, #092242, #0d5080); border: 1px solid #2b76a5; box-shadow: 0 9px 22px rgba(8, 62, 100, .18); }
.agent-avatar > span { width: 20px; height: 20px; border-radius: 50%; border: 2px solid #59ddff; box-shadow: 0 0 0 5px rgba(89, 221, 255, .1), inset 0 0 8px #1ed1ff, 0 0 13px rgba(30, 209, 255, .8); animation: agent-core 2.8s ease-in-out infinite; }
.agent-avatar.future { background: #eef3f8; border-color: #dbe5ef; box-shadow: none; }
.agent-avatar.future > span { border: 0; box-shadow: none; color: #7a8ba0; display: grid; place-items: center; font-size: 22px; animation: none; }
.agent-card h3 { margin: 2px 0 1px; font-size: 18px; }
.agent-card-top small, .alias-help { color: var(--muted); font-size: 14px; }
.agent-card > p { color: var(--muted); font-size: 14px; line-height: 1.55; min-height: 40px; margin: 15px 0 17px; }
.agent-state { color: #087649; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 800; letter-spacing: .7px; text-transform: uppercase; }
.agent-state i { width: 6px; height: 6px; background: var(--green); border-radius: 50%; box-shadow: 0 0 8px rgba(18, 166, 106, .65); }
.agent-state.planned { color: #7b8a9e; }
.agent-alias-form { border-top: 1px solid var(--line); padding-top: 15px; position: relative; z-index: 1; }
.alias-input-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.alias-help { margin-top: -6px; }
.agent-coming-soon { border-style: dashed; background: #fbfcfe; }

.agent-banner { overflow: hidden; position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; color: #fff; padding: 22px; margin-bottom: 22px; border-radius: 18px; background: linear-gradient(120deg, #06182d, #0b3458); box-shadow: 0 15px 35px rgba(5, 28, 50, .18); }
.agent-banner::after { content: ""; position: absolute; right: 8%; top: -90px; width: 250px; height: 250px; border-radius: 50%; border: 1px solid rgba(73, 212, 255, .1); box-shadow: 0 0 50px rgba(37, 195, 255, .08); }
.agent-banner-core { width: 58px; height: 58px; border: 1px solid rgba(71, 211, 255, .35); border-radius: 50%; display: grid; place-items: center; box-shadow: inset 0 0 20px rgba(37, 195, 255, .12); }
.agent-banner-core span { width: 22px; height: 22px; border-radius: 50%; background: #29d3ff; box-shadow: 0 0 0 7px rgba(41, 211, 255, .1), 0 0 24px rgba(41, 211, 255, .8); animation: agent-core 2.8s ease-in-out infinite; }
.agent-banner h2 { margin: 3px 0 5px; font-size: 20px; }
.agent-banner p:not(.eyebrow) { color: #aabbd0; margin: 0; max-width: 760px; font-size: 14px; line-height: 1.55; }
.agent-banner-status { position: relative; z-index: 1; color: #8fffd0; border: 1px solid rgba(83, 223, 169, .35); background: rgba(18, 166, 106, .1); padding: 7px 12px; border-radius: 99px; font-size: 14px; font-weight: 800; }

@keyframes agent-core { 0%, 100% { transform: scale(.88); opacity: .72; } 50% { transform: scale(1); opacity: 1; } }

form { display: grid; gap: 13px; }
label { display: grid; gap: 7px; color: #33445c; font-size: 14px; font-weight: 650; }
input, select { width: 100%; border: 1px solid #cfdae7; border-radius: 10px; padding: 11px 12px; color: var(--text); background: #fff; outline: none; }
input:focus, select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(23, 107, 255, .11); }
.button { border: 0; border-radius: 10px; padding: 11px 15px; background: var(--blue); color: #fff; font-weight: 750; cursor: pointer; }
.button:hover { filter: brightness(.96); }
.button:disabled { opacity: .45; cursor: not-allowed; }
.button.secondary { background: #e9f1ff; color: #145bc8; }
.button.danger-outline { color: var(--red); border: 1px solid #f0bbc2; background: #fff; }
.button.full { width: 100%; display: block; text-align: center; margin-top: 5px; }

.alert { padding: 12px 15px; border-radius: 11px; font-size: 14px; margin-bottom: 16px; }
.alert.success { background: #ddf7ec; color: #087649; border: 1px solid #bfead8; }
.alert.error { background: #ffe7ea; color: #a82738; border: 1px solid #f5c7cd; }
.enrollment-result { display: flex; align-items: center; gap: 14px; background: var(--navy); color: #fff; border-radius: 14px; padding: 15px 17px; margin-bottom: 18px; }
.enrollment-result > div { display: grid; flex: 1; }
.enrollment-result span { color: #aebbd0; font-size: 14px; margin-top: 3px; }
.enrollment-result code { background: rgba(255,255,255,.1); border-radius: 8px; padding: 8px 11px; color: #7ee0ff; font-weight: 800; }

.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at top left, #173e70, var(--navy) 55%); }
.auth-card { width: min(440px, 100%); background: #fff; padding: 36px; border-radius: 22px; box-shadow: 0 25px 60px rgba(0,0,0,.25); }
.auth-card .brand-mark { margin: 0 auto 19px; }
.auth-card .eyebrow, .auth-card h1, .auth-card > p { text-align: center; }
.auth-card h1 { margin: 5px 0 8px; font-size: 27px; }
.auth-card > p { color: var(--muted); font-size: 14px; margin: 0 0 24px; }
.auth-card .small { margin-top: 18px; font-size: 14px; line-height: 1.5; }

/* Login principal do Jarvis */
.jarvis-login-page { min-height: 100vh; background: #050d19; color: #eaf6ff; overflow-x: hidden; }
.jarvis-login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.48fr) minmax(390px, .72fr); background: #050d19; }
.jarvis-login-visual { position: relative; min-height: 100vh; overflow: hidden; background: #06111f; isolation: isolate; }
.jarvis-login-visual::before { content: ""; position: absolute; inset: 0; z-index: 2; background: linear-gradient(90deg, rgba(3, 10, 20, .16), rgba(3, 10, 20, 0) 45%, rgba(3, 10, 20, .35)), linear-gradient(0deg, rgba(3, 10, 20, .78), transparent 48%); }
.jarvis-login-visual::after { content: ""; position: absolute; z-index: 3; inset: 0; opacity: .11; background-image: linear-gradient(rgba(87, 210, 255, .22) 1px, transparent 1px), linear-gradient(90deg, rgba(87, 210, 255, .22) 1px, transparent 1px); background-size: 52px 52px; mask-image: linear-gradient(to top, #000, transparent 58%); }
.jarvis-hero-stage { position: absolute; inset: -1.5%; transform-origin: 72% 48%; animation: jarvis-breathe 10s ease-in-out infinite; }
.jarvis-hero-image, .jarvis-eye-glow { position: absolute; inset: 0; background-position: center center; background-size: cover; background-repeat: no-repeat; }
.jarvis-hero-image { background-image: url('jarvis-login-hero-desktop.webp'); transition: opacity .65s ease; }
.jarvis-hero-video { position: absolute; inset: 0; z-index: .5; width: 100%; height: 100%; display: block; object-fit: cover; object-position: center center; opacity: 0; transition: opacity .65s ease; pointer-events: none; background: #06111f; }
.jarvis-login-visual.jarvis-video-ready .jarvis-hero-video { opacity: 1; }
.jarvis-login-visual.jarvis-video-ready .jarvis-hero-image { opacity: 0; }
.jarvis-login-visual.jarvis-video-ready .jarvis-eye-glow { opacity: 0; animation: none; }
.jarvis-eye-glow { display: none; z-index: 1; background-image: url('jarvis-eye-glow.svg'); opacity: .42; mix-blend-mode: screen; animation: jarvis-eye-blink 7.2s ease-in-out infinite; }
.jarvis-scan-line { position: absolute; z-index: 4; left: 0; right: 0; top: -14%; height: 13%; opacity: .22; background: linear-gradient(to bottom, transparent, rgba(63, 218, 255, .3), transparent); filter: blur(3px); animation: jarvis-scan 8s linear infinite; }
.jarvis-orbit { display: none; position: absolute; z-index: 4; border: 1px solid rgba(81, 219, 255, .18); border-radius: 50%; pointer-events: none; }
.jarvis-orbit::before { content: ""; position: absolute; width: 7px; height: 7px; top: 50%; left: -4px; border-radius: 50%; background: #49d9ff; box-shadow: 0 0 15px #49d9ff; }
.orbit-one { width: 350px; height: 350px; right: 8%; top: 15%; animation: jarvis-orbit 24s linear infinite; }
.orbit-two { width: 470px; height: 470px; right: 1%; top: 8%; border-style: dashed; opacity: .42; animation: jarvis-orbit 34s linear infinite reverse; }
.jarvis-particles { position: absolute; inset: 0; z-index: 5; }
.jarvis-particles span { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #55dcff; box-shadow: 0 0 9px #55dcff; animation: jarvis-particle 6s ease-in-out infinite; }
.jarvis-particles span:nth-child(1) { left: 8%; top: 20%; animation-delay: -1s; }
.jarvis-particles span:nth-child(2) { left: 18%; top: 62%; animation-delay: -4s; }
.jarvis-particles span:nth-child(3) { left: 32%; top: 40%; animation-delay: -2s; }
.jarvis-particles span:nth-child(4) { left: 46%; top: 76%; animation-delay: -5s; }
.jarvis-particles span:nth-child(5) { left: 63%; top: 17%; animation-delay: -3s; }
.jarvis-particles span:nth-child(6) { left: 75%; top: 66%; animation-delay: -1.5s; }
.jarvis-particles span:nth-child(7) { left: 89%; top: 35%; animation-delay: -4.5s; }
.jarvis-particles span:nth-child(8) { left: 12%; top: 82%; animation-delay: -2.4s; }
.jarvis-particles span:nth-child(9) { left: 39%; top: 14%; animation-delay: -.4s; }
.jarvis-particles span:nth-child(10) { left: 56%; top: 54%; animation-delay: -3.4s; }
.jarvis-particles span:nth-child(11) { left: 68%; top: 88%; animation-delay: -5.5s; }
.jarvis-particles span:nth-child(12) { left: 81%; top: 12%; animation-delay: -2.8s; }
.jarvis-particles span:nth-child(13) { left: 94%; top: 74%; animation-delay: -4.2s; }
.jarvis-particles span:nth-child(14) { left: 25%; top: 29%; animation-delay: -1.8s; }
.jarvis-visual-caption { position: absolute; z-index: 6; left: clamp(28px, 5vw, 76px); bottom: clamp(30px, 7vh, 72px); max-width: 600px; }
.live-indicator { display: inline-flex; align-items: center; gap: 8px; color: #8cddf4; border: 1px solid rgba(92, 217, 255, .25); background: rgba(4, 20, 34, .55); backdrop-filter: blur(10px); border-radius: 99px; padding: 7px 12px; font-size: 13px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; }
.live-indicator i { width: 7px; height: 7px; border-radius: 50%; background: #47ffb2; box-shadow: 0 0 10px #47ffb2; animation: jarvis-live 1.8s ease-in-out infinite; }
.jarvis-visual-caption strong { display: block; margin-top: 18px; max-width: 580px; color: #f4fbff; font-size: clamp(29px, 4vw, 53px); line-height: 1.04; letter-spacing: -2px; text-shadow: 0 10px 40px rgba(0, 0, 0, .38); }
.jarvis-visual-caption small { display: block; max-width: 500px; margin-top: 15px; color: #9db0c4; font-size: 14px; line-height: 1.65; }

.jarvis-login-panel { min-height: 100vh; display: grid; place-items: center; padding: 44px clamp(28px, 4vw, 68px); background: radial-gradient(circle at 0 50%, rgba(25, 132, 185, .12), transparent 38%), #07111e; border-left: 1px solid rgba(86, 196, 239, .12); }
.jarvis-login-card { width: min(430px, 100%); }
.jarvis-wordmark { display: flex; align-items: center; gap: 13px; margin-bottom: clamp(52px, 8vh, 88px); }
.jarvis-core { width: 47px; height: 47px; border-radius: 50%; display: grid; place-items: center; color: #e8fbff; font-weight: 900; font-size: 21px; border: 1px solid rgba(67, 214, 255, .65); background: radial-gradient(circle, rgba(40, 200, 255, .35), rgba(9, 51, 80, .45) 60%, rgba(5, 17, 30, .9)); box-shadow: inset 0 0 16px rgba(49, 204, 255, .35), 0 0 25px rgba(37, 195, 255, .2); animation: jarvis-live 2.8s ease-in-out infinite; }
.jarvis-core img { width: 42px; height: 42px; display: block; }
.jarvis-wordmark strong, .jarvis-wordmark small { display: block; }
.jarvis-wordmark strong { color: #f3fbff; font-size: 18px; letter-spacing: 5px; }
.jarvis-wordmark small { margin-top: 4px; color: #617b91; font-size: 11px; font-weight: 800; letter-spacing: 2px; }
.jarvis-welcome .eyebrow { color: #55d9ff; }
.jarvis-welcome h1 { margin: 9px 0 9px; color: #f4fbff; font-size: clamp(29px, 3vw, 39px); letter-spacing: -1.2px; }
.jarvis-welcome > p:last-child { color: #7890a5; margin: 0 0 30px; font-size: 14px; }
.jarvis-login-form { gap: 18px; }
.jarvis-login-form label { gap: 8px; color: #9eb2c4; font-size: 14px; font-weight: 600; letter-spacing: .25px; }
.jarvis-input-wrap { position: relative; display: block; }
.jarvis-input-wrap > svg { position: absolute; z-index: 1; width: 18px; height: 18px; left: 15px; top: 50%; transform: translateY(-50%); fill: none; stroke: #5d7e97; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.jarvis-input-wrap input { height: 52px; padding: 12px 47px; color: #eaf6ff; border: 1px solid #20384c; border-radius: 12px; background: rgba(4, 16, 28, .7); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025); font-weight: 400; letter-spacing: 0; }
.jarvis-input-wrap input::placeholder { color: #4b657b; font-weight: 400; }
.jarvis-input-wrap input:focus { border-color: #2faacf; box-shadow: 0 0 0 3px rgba(47, 170, 207, .11), inset 0 0 18px rgba(28, 144, 185, .06); }
.password-toggle { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; display: grid; place-items: center; border: 0; background: transparent; color: #638198; border-radius: 8px; cursor: pointer; }
.password-toggle:hover { background: rgba(74, 187, 225, .08); color: #8edfff; }
.password-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.jarvis-login-button { height: 53px; margin-top: 5px; display: flex; align-items: center; justify-content: center; gap: 10px; border: 1px solid rgba(101, 226, 255, .65); border-radius: 12px; color: #03111e; font-weight: 850; cursor: pointer; background: linear-gradient(110deg, #62e4ff, #20b8ec); box-shadow: 0 10px 30px rgba(28, 178, 226, .17), inset 0 1px 0 rgba(255, 255, 255, .55); transition: transform .2s ease, box-shadow .2s ease; }
.jarvis-login-button:hover { transform: translateY(-1px); box-shadow: 0 13px 34px rgba(28, 178, 226, .26), inset 0 1px 0 rgba(255, 255, 255, .55); }
.jarvis-login-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.jarvis-security-note { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 24px; color: #526d82; font-size: 13px; }
.jarvis-security-note svg { width: 15px; height: 15px; fill: none; stroke: #3ba6c9; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.jarvis-install-button { margin: 15px auto 0; padding: 7px 11px; display: flex; align-items: center; gap: 7px; color: #66869d; border: 1px solid rgba(64, 174, 211, .17); border-radius: 9px; background: rgba(22, 101, 132, .06); cursor: pointer; font-size: 13px; font-weight: 700; }
.jarvis-install-button:hover { color: #8edfff; border-color: rgba(72, 202, 244, .32); }
.jarvis-install-button svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.jarvis-login-card .alert { margin: 0 0 18px; }

@keyframes jarvis-breathe { 0%, 100% { transform: scale(1.015) translate3d(0, 0, 0); filter: brightness(.94); } 50% { transform: scale(1.035) translate3d(-.25%, -.2%, 0); filter: brightness(1.04); } }
@keyframes jarvis-eye-blink { 0%, 43%, 49%, 100% { opacity: .38; filter: brightness(1); } 45% { opacity: .08; filter: brightness(.65); } 46.2% { opacity: .76; filter: brightness(1.35); } 47.2% { opacity: .12; filter: brightness(.72); } 48% { opacity: .62; filter: brightness(1.22); } }
@keyframes jarvis-scan { from { transform: translateY(-25vh); } to { transform: translateY(125vh); } }
@keyframes jarvis-orbit { to { transform: rotate(360deg); } }
@keyframes jarvis-live { 0%, 100% { opacity: .6; } 50% { opacity: 1; box-shadow: 0 0 17px currentColor; } }
@keyframes jarvis-particle { 0%, 100% { opacity: .15; transform: translate3d(0, 6px, 0) scale(.7); } 50% { opacity: .9; transform: translate3d(3px, -7px, 0) scale(1); } }

@media (max-width: 1050px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .device-card summary { grid-template-columns: 12px 1fr auto; }
    .last-seen { grid-column: 2 / -1; }
    .two-columns { grid-template-columns: 1fr; }
    .jarvis-login-shell { grid-template-columns: 1fr minmax(370px, .85fr); }
    .jarvis-visual-caption strong { font-size: 34px; }
}

@media (max-width: 760px) {
    .app-shell { display: block; }
    .sidebar { position: static; height: auto; padding: 15px; flex-direction: row; align-items: center; gap: 10px; overflow-x: auto; }
    .brand { margin: 0 12px 0 0; white-space: nowrap; }
    .sidebar nav { display: flex; }
    .sidebar nav a { white-space: nowrap; }
    .logout { margin: 0 0 0 auto; }
    .content { padding: 24px 15px 45px; }
    .topbar { align-items: flex-start; gap: 14px; }
    .mode-pill { display: none; }
    .device-detail { grid-template-columns: repeat(2, 1fr); }
    .enrollment-result { align-items: stretch; flex-direction: column; }
    .agents-grid { grid-template-columns: 1fr; }
    .jarvis-login-shell { display: block; min-height: 100vh; }
    .jarvis-login-visual { position: fixed; inset: 0; min-height: 100vh; }
    .jarvis-login-visual::before { background: rgba(3, 10, 19, .73); backdrop-filter: blur(2px); }
    .jarvis-hero-video { display: none !important; }
    .jarvis-hero-image { opacity: 1 !important; background-image: url('jarvis-login-hero.webp'); }
    .jarvis-eye-glow { display: block; opacity: .42 !important; background-position: 68% center; }
    .jarvis-hero-image { background-position: 68% center; }
    .jarvis-visual-caption { display: none; }
    .jarvis-login-panel { position: relative; z-index: 10; min-height: 100vh; padding: 34px 24px; background: linear-gradient(180deg, rgba(4, 13, 24, .48), rgba(4, 13, 24, .86)); border: 0; }
    .jarvis-login-card { padding: 28px; border: 1px solid rgba(74, 190, 229, .16); border-radius: 20px; background: rgba(5, 17, 29, .84); backdrop-filter: blur(16px); box-shadow: 0 25px 65px rgba(0, 0, 0, .35); }
    .jarvis-wordmark { margin-bottom: 48px; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .device-card summary { grid-template-columns: 12px 1fr; }
    .status-badge, .last-seen { grid-column: 2; justify-self: start; }
    .device-detail { grid-template-columns: 1fr; }
    .device-rename-form { grid-template-columns: 1fr; }
    .inline-form { grid-template-columns: 1fr; }
    .auth-card { padding: 28px 21px; }
    .alias-input-row { grid-template-columns: 1fr; }
    .agent-banner { grid-template-columns: auto 1fr; }
    .agent-banner-status { grid-column: 2; justify-self: start; }
    .jarvis-login-panel { padding: 20px 14px; }
    .jarvis-login-card { padding: 24px 19px; }
    .jarvis-wordmark { margin-bottom: 38px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .jarvis-hero-video { display: none !important; }
    .jarvis-hero-image { opacity: 1 !important; background-image: url('jarvis-login-hero.webp'); }
    .jarvis-hero-stage, .jarvis-eye-glow, .jarvis-scan-line, .jarvis-orbit, .jarvis-particles span, .live-indicator i, .jarvis-core, .agent-avatar > span, .agent-banner-core span { animation: none !important; }
}

/* Centro de comando — interface escura */
.dashboard-page {
    --surface: #0d151f;
    --surface-soft: #101b27;
    --background: #070b11;
    --text: #edf5fc;
    --muted: #7f92a5;
    --line: rgba(137, 170, 198, .14);
    --shadow: 0 18px 45px rgba(0, 0, 0, .22);
    color: var(--text);
    background: var(--background);
}
.dashboard-page .app-shell { background: var(--background); }
.dashboard-page .content { width: 100%; max-width: none; padding: 30px 34px 170px; background: radial-gradient(circle at 50% 18%, rgba(17, 113, 155, .08), transparent 32%), var(--background); }
.dashboard-page .topbar { margin-bottom: 22px; }
.dashboard-page .topbar h1 { color: #f4f9fd; }
.dashboard-page .mode-pill { color: #8fe7ff; border-color: rgba(77, 210, 247, .2); background: rgba(26, 137, 180, .08); }
.dashboard-page .mode-pill i { box-shadow: 0 0 10px rgba(49, 218, 169, .72); }
.dashboard-page .eyebrow { color: #42d6ff; }
.dashboard-page .alert[data-auto-dismiss] { position: fixed; z-index: 190; top: 22px; left: calc(250px + (100vw - 250px) / 2); width: min(520px, calc(100vw - 290px)); margin: 0; color: #dceaf3; border-color: rgba(103, 200, 229, .22); background: rgba(11, 22, 32, .97); box-shadow: 0 18px 45px rgba(0, 0, 0, .42); backdrop-filter: blur(16px); transform: translateX(-50%); transition: opacity .28s ease, transform .28s ease; }
.dashboard-page .alert.success[data-auto-dismiss] { color: #8eedc9; border-color: rgba(55, 211, 166, .25); background: rgba(8, 35, 34, .97); }
.dashboard-page .alert.error[data-auto-dismiss] { color: #ff9aaa; border-color: rgba(239, 83, 104, .27); background: rgba(39, 17, 25, .97); }
.dashboard-page .alert[data-auto-dismiss].is-leaving { opacity: 0; transform: translate(-50%, -10px); pointer-events: none; }

.command-home { min-height: calc(100dvh - 250px); display: grid; grid-template-columns: minmax(0, 1fr) 300px; align-items: stretch; gap: 20px; margin-bottom: 24px; }
.command-workspace { min-width: 0; display: grid; grid-template-rows: auto 1fr; gap: 18px; }
.command-cards { margin: 0; }
.dashboard-page .stat-card { min-height: 116px; padding: 17px 18px; color: var(--text); border-color: var(--line); background: linear-gradient(150deg, rgba(18, 29, 41, .96), rgba(10, 17, 25, .96)); box-shadow: none; }
.dashboard-page .stat-card::before { width: 2px; box-shadow: 0 0 15px currentColor; }
.dashboard-page .stat-card strong { margin: 5px 0 1px; color: #f2f8fd; font-size: 27px; }
.dashboard-page .stat-card span, .dashboard-page .stat-card small { color: var(--muted); }

.jarvis-presence { position: relative; min-height: clamp(420px, 56vh, 620px); display: grid; place-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 22px; background: radial-gradient(circle at 50% 48%, rgba(17, 162, 207, .12), transparent 26%), linear-gradient(145deg, rgba(10, 16, 24, .98), rgba(6, 10, 16, .98)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025), var(--shadow); }
.jarvis-presence::before { content: ""; position: absolute; inset: 0; opacity: .19; background-image: linear-gradient(rgba(76, 205, 244, .08) 1px, transparent 1px), linear-gradient(90deg, rgba(76, 205, 244, .08) 1px, transparent 1px); background-size: 54px 54px; mask-image: radial-gradient(circle, #000, transparent 70%); }
.jarvis-presence::after { content: ""; position: absolute; left: 16%; right: 16%; bottom: 11%; height: 1px; background: linear-gradient(90deg, transparent, rgba(67, 216, 255, .45), transparent); box-shadow: 0 0 22px rgba(45, 199, 240, .34); }
.jarvis-presence-copy { position: absolute; z-index: 4; top: 26px; left: 28px; }
.jarvis-presence-copy h2 { margin: 5px 0 5px; color: #edf8ff; font-size: clamp(20px, 2vw, 27px); letter-spacing: -.45px; transition: opacity .2s ease, transform .2s ease; }
.jarvis-presence-copy span { color: var(--muted); font-size: 14px; transition: opacity .2s ease, transform .2s ease; }
.jarvis-presence-state { position: absolute; z-index: 5; bottom: 28px; display: inline-flex; align-items: center; gap: 8px; color: #83dff7; font-size: 14px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.jarvis-presence-state i { width: 7px; height: 7px; border-radius: 50%; background: #35dda9; box-shadow: 0 0 12px rgba(53, 221, 169, .8); animation: jarvis-state-pulse 2.2s ease-in-out infinite; }

.jarvis-conversation-slot { position: absolute; z-index: 6; inset: 116px clamp(24px, 7vw, 110px) 64px; display: grid; place-items: center; pointer-events: none; transition: inset .24s ease; }
.jarvis-conversation-slot > .jarvis-command-thread { pointer-events: auto; }
.jarvis-command-thread.is-overview { position: relative; z-index: 7; left: auto; right: auto; bottom: auto; width: 100%; height: 100%; max-width: 980px; max-height: 100%; display: grid; grid-template-rows: minmax(0, 1fr); overflow: hidden; border: 0; border-radius: 0; transform: none; background: transparent; box-shadow: none; backdrop-filter: none; }
.jarvis-command-thread.is-overview .command-thread-head { display: none; }
.jarvis-command-thread.is-overview .command-thread-messages { min-height: 0; max-height: none; padding: 18px clamp(8px, 2.5vw, 32px); background: transparent; }
.jarvis-command-thread.is-overview .command-message-content { box-shadow: 0 10px 28px rgba(0, 0, 0, .18); backdrop-filter: blur(10px); }
.jarvis-presence .jarvis-orb { transition: opacity .28s ease, filter .28s ease, transform .28s ease; }
.jarvis-presence.has-conversation .jarvis-orb { opacity: .07; filter: blur(2px) drop-shadow(0 0 26px rgba(31, 188, 227, .12)); transform: scale(.96); }
.jarvis-presence.has-conversation .jarvis-presence-copy h2,
.jarvis-presence.has-conversation .jarvis-presence-copy > span { opacity: 0; visibility: hidden; transform: translateY(-6px); }
.jarvis-presence.has-conversation .jarvis-conversation-slot { inset: 54px 22px 54px; }
.jarvis-presence.has-conversation .jarvis-command-thread.is-overview { max-width: none; }

.jarvis-orb { position: relative; z-index: 3; width: clamp(210px, 25vw, 310px); aspect-ratio: 1; display: grid; place-items: center; filter: drop-shadow(0 0 32px rgba(31, 188, 227, .18)); }
.orb-aura { position: absolute; inset: 3%; border-radius: 50%; background: radial-gradient(circle, rgba(28, 211, 239, .11), rgba(5, 38, 51, .05) 47%, transparent 70%); box-shadow: 0 0 85px rgba(25, 176, 219, .16); animation: orb-breathe 4.6s ease-in-out infinite; }
.orb-ring { position: absolute; border-radius: 50%; border: 1px solid rgba(74, 219, 246, .46); }
.ring-a { inset: 4%; border-style: dashed; box-shadow: inset 0 0 28px rgba(36, 195, 230, .09); animation: orb-rotate 18s linear infinite; }
.ring-b { inset: 15%; border-width: 2px; border-color: rgba(55, 215, 244, .72); box-shadow: 0 0 13px rgba(48, 211, 242, .25), inset 0 0 18px rgba(48, 211, 242, .12); animation: orb-rotate 11s linear infinite reverse; }
.ring-c { inset: 29%; border-color: rgba(255, 167, 63, .74); border-left-color: transparent; border-bottom-color: transparent; animation: orb-rotate 7.5s linear infinite; }
.orb-scan { position: absolute; width: 72%; height: 2px; background: linear-gradient(90deg, transparent, #42dcff, transparent); box-shadow: 0 0 16px rgba(66, 220, 255, .65); animation: orb-scan 3.4s ease-in-out infinite; }
.orb-core { position: relative; width: 29%; aspect-ratio: 1; display: grid; place-items: center; border: 1px solid rgba(73, 221, 248, .65); border-radius: 50%; background: radial-gradient(circle, rgba(26, 160, 194, .34), rgba(5, 28, 39, .94) 66%); box-shadow: inset 0 0 22px rgba(48, 213, 245, .2), 0 0 30px rgba(39, 197, 228, .28); animation: orb-core 3.2s ease-in-out infinite; }
.orb-core img { width: 68%; height: 68%; display: block; }

.agent-status-rail { min-width: 0; display: flex; flex-direction: column; gap: 14px; padding: 20px; border: 1px solid var(--line); border-radius: 22px; background: linear-gradient(160deg, rgba(15, 25, 36, .98), rgba(8, 14, 21, .98)); box-shadow: var(--shadow); }
.agent-status-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.agent-status-head h2 { margin: 4px 0 0; font-size: 18px; }
.rail-live-dot { width: 9px; height: 9px; border-radius: 50%; background: #36dba7; box-shadow: 0 0 0 5px rgba(54, 219, 167, .08), 0 0 13px rgba(54, 219, 167, .58); }
.agent-status-summary { padding: 13px 14px; border: 1px solid rgba(55, 211, 166, .18); border-radius: 13px; background: rgba(39, 178, 135, .06); }
.agent-status-summary span, .agent-status-summary strong { display: block; }
.agent-status-summary span { color: #72d9ba; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.agent-status-summary strong { margin-top: 4px; font-size: 14px; }
.agent-status-summary.has-error { border-color: rgba(239, 83, 104, .24); background: rgba(220, 65, 84, .07); }
.agent-status-summary.has-error span { color: #ff8292; }
.agent-status-summary.has-warning { border-color: rgba(231, 165, 11, .24); background: rgba(231, 165, 11, .065); }
.agent-status-summary.has-warning span { color: #f0c35a; }
.agent-status-summary.is-waiting { border-color: rgba(132, 162, 188, .18); background: rgba(132, 162, 188, .045); }
.agent-status-summary.is-waiting span { color: #9fb0bf; }
.agent-status-list { display: grid; gap: 9px; }
.agent-status-item { position: relative; overflow: hidden; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 11px; border: 1px solid rgba(66, 198, 232, .24); border-radius: 13px; background: radial-gradient(circle at 8% 50%, rgba(38, 187, 224, .15), transparent 36%), linear-gradient(135deg, rgba(18, 54, 75, .68), rgba(11, 24, 36, .88)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025), 0 8px 24px rgba(0, 0, 0, .16); }
.agent-status-item::after { content: ""; position: absolute; top: 0; right: 0; width: 62px; height: 62px; border: 1px solid rgba(66, 207, 240, .12); border-radius: 0 0 0 62px; pointer-events: none; }
.agent-status-item div { min-width: 0; }
.agent-status-item strong, .agent-status-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agent-status-item strong { color: #dce9f3; font-size: 14px; }
.agent-status-item small, .agent-status-item time { color: var(--muted); font-size: 13px; }
.agent-status-icon { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid rgba(57, 217, 174, .22); border-radius: 9px; background: rgba(40, 178, 136, .07); }
.agent-status-icon i { width: 8px; height: 8px; border-radius: 50%; background: #37dba8; box-shadow: 0 0 10px rgba(55, 219, 168, .68); }
.agent-status-item.status-planned .agent-status-icon, .agent-status-item.status-paused .agent-status-icon { border-color: rgba(142, 158, 176, .18); background: rgba(142, 158, 176, .05); }
.agent-status-item.status-planned .agent-status-icon i, .agent-status-item.status-paused .agent-status-icon i { background: #718195; box-shadow: none; }
.agent-status-item.is-preparing .agent-status-icon i { background: #f0c35a; box-shadow: 0 0 10px rgba(240, 195, 90, .62); }
.agent-status-item.is-running .agent-status-icon i { background: #55dcff; box-shadow: 0 0 12px rgba(85, 220, 255, .75); animation: jarvis-state-pulse 1s ease-in-out infinite; }
.agent-status-item.is-stopping .agent-status-icon i { background: #ff9a70; box-shadow: 0 0 12px rgba(255, 128, 95, .68); animation: jarvis-state-pulse .72s ease-in-out infinite; }
.agent-device-alert { display: grid; grid-template-columns: 9px minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 10px 11px; border: 1px solid rgba(132, 162, 188, .12); border-radius: 12px; color: inherit; background: rgba(255, 255, 255, .018); transition: .16s ease; }
.agent-device-alert:hover { border-color: rgba(69, 205, 239, .24); background: rgba(69, 205, 239, .045); transform: translateY(-1px); }
.agent-device-alert .status-dot { width: 8px; height: 8px; }
.agent-device-alert > span:nth-child(2) { min-width: 0; }
.agent-device-alert strong, .agent-device-alert small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agent-device-alert strong { color: #dce9f3; font-size: 13px; }
.agent-device-alert small { margin-top: 2px; color: var(--muted); font-size: 12px; }
.agent-device-alert b { color: #55d7f5; font-size: 18px; font-weight: 500; }
.agent-device-alert.is-red .status-dot { background: #ff657a; box-shadow: 0 0 9px rgba(255, 101, 122, .58); }
.agent-device-alert.is-yellow .status-dot { background: #efbd4f; box-shadow: 0 0 9px rgba(239, 189, 79, .5); }
.agent-device-alert.is-green .status-dot { background: #37dba8; box-shadow: 0 0 9px rgba(55, 219, 168, .52); }
.agent-device-alert.is-offline .status-dot { background: #8195a7; box-shadow: none; }
.agent-site-alert { margin-left: 0; border-left-color: rgba(72, 207, 241, .22); }
.agent-site-alert small::before { content: "SITE · "; color: #55d7f5; }
.agent-status-log { margin-top: auto; padding-top: 15px; border-top: 1px solid var(--line); }
.agent-status-log span { display: block; margin-top: 6px; color: var(--muted); font-size: 14px; }

/* No desktop, mantém o painel de atividades dentro da altura visível. */
@media (min-width: 1181px) {
    .command-home {
        height: max(600px, calc(100dvh - 230px));
        min-height: 0;
        align-items: stretch;
    }
    .command-workspace { min-height: 0; }
    .jarvis-presence { min-height: 0; }
    .agent-status-rail {
        height: 100%;
        max-height: none;
        overflow: hidden;
    }
    .agent-status-head, .agent-status-log { flex: 0 0 auto; }
    .agent-status-list {
        flex: 1 1 auto;
        min-height: 0;
        grid-auto-rows: max-content;
        align-content: start;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        scrollbar-width: thin;
        scrollbar-color: rgba(66, 207, 240, .48) rgba(5, 14, 22, .46);
    }
    .agent-status-list > .agent-status-item,
    .agent-status-list > .agent-device-alert { flex: none; min-height: max-content; }
    .agent-status-list::-webkit-scrollbar { width: 7px; }
    .agent-status-list::-webkit-scrollbar-track { border-radius: 999px; background: rgba(5, 14, 22, .46); }
    .agent-status-list::-webkit-scrollbar-thumb {
        border: 1px solid rgba(85, 215, 245, .16);
        border-radius: 999px;
        background: linear-gradient(180deg, rgba(85, 215, 245, .64), rgba(55, 219, 168, .44));
        box-shadow: 0 0 8px rgba(66, 207, 240, .16);
    }
    .agent-status-list::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, rgba(85, 215, 245, .82), rgba(55, 219, 168, .62)); }
}

.jarvis-command-thread { position: fixed; z-index: 79; left: calc(250px + (100vw - 250px - 300px) / 2); bottom: 151px; width: min(760px, calc(100vw - 250px - 300px - 76px)); max-height: min(390px, calc(100vh - 210px)); overflow: hidden; border: 1px solid rgba(82, 194, 225, .2); border-radius: 18px; background: rgba(8, 15, 23, .97); box-shadow: 0 22px 60px rgba(0, 0, 0, .48), inset 0 1px 0 rgba(255, 255, 255, .03); backdrop-filter: blur(18px); transform: translateX(-50%); }
.jarvis-command-thread[hidden] { display: none !important; }
.command-thread-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 15px; border-bottom: 1px solid rgba(119, 153, 181, .14); background: rgba(17, 28, 39, .72); }
.command-thread-head div { min-width: 0; }
.command-thread-head span, .command-thread-head strong { display: block; }
.command-thread-head span { color: #42d0f3; font-size: 12px; font-weight: 600; letter-spacing: .1em; }
.command-thread-head strong { margin-top: 3px; overflow: hidden; color: #dfeaf2; font-size: 14px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.command-thread-head button { width: 30px; height: 30px; flex: 0 0 auto; border: 1px solid rgba(133, 164, 188, .15); border-radius: 9px; color: #8ca1b3; background: rgba(255, 255, 255, .025); cursor: pointer; }
.command-thread-head button:hover { color: #d9f6ff; border-color: rgba(72, 207, 241, .28); background: rgba(72, 207, 241, .06); }
.command-thread-actions { display: flex; gap: 7px; }
.conversation-manager { position: absolute; z-index: 4; inset: 58px 0 0; display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; gap: 12px; overflow: hidden; padding: 16px; background: rgba(7, 15, 23, .985); backdrop-filter: blur(18px); }
.conversation-manager[hidden] { display: none !important; }
.jarvis-command-thread.is-overview .conversation-manager { inset: 0; border: 1px solid rgba(82, 194, 225, .18); border-radius: 18px; }
.conversation-manager > header { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.conversation-manager > header span, .conversation-manager > header strong { display: block; }
.conversation-manager > header span { color: #43d2f4; font-size: 12px; font-weight: 600; letter-spacing: .12em; }
.conversation-manager > header strong { margin-top: 4px; color: #dceaf2; font-size: 14px; font-weight: 500; }
.conversation-manager > header button { width: 32px; height: 32px; border: 1px solid #253b4c; border-radius: 9px; color: #91a8b8; background: transparent; cursor: pointer; }
.conversation-new-button { width: 100%; border: 1px solid rgba(52, 213, 255, .22); border-radius: 11px; padding: 11px 14px; color: #75e2fb; background: rgba(32, 176, 215, .08); text-align: left; cursor: pointer; font: inherit; font-size: 14px; }
.conversation-list { min-height: 0; display: grid; align-content: start; gap: 8px; overflow-y: auto; }
.conversation-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 11px 12px; border: 1px solid #1d3344; border-radius: 12px; background: #0b1722; }
.conversation-item.is-active { border-color: rgba(56, 209, 246, .42); background: rgba(24, 121, 151, .1); }
.conversation-item.has-project { border-left: 3px solid rgba(62, 213, 239, .55); }
.conversation-item-main { min-width: 0; border: 0; padding: 0; color: inherit; background: transparent; text-align: left; cursor: pointer; }
.conversation-project-label { display: block; margin-bottom: 3px; color: #43d5ec; font-size: 9px; font-weight: 700; letter-spacing: .11em; }
.conversation-item-main strong, .conversation-item-main small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conversation-item-main strong { color: #dbe8ef; font-size: 14px; font-weight: 500; }
.conversation-item-main small { margin-top: 4px; color: #73899b; font-size: 13px; }
.conversation-item-actions { display: flex; align-items: center; gap: 5px; }
.conversation-item-actions button { min-width: 28px; height: 28px; border: 1px solid #263c4e; border-radius: 8px; color: #839aaa; background: transparent; cursor: pointer; }
.conversation-item-actions button:hover { color: #dff8ff; border-color: rgba(52, 213, 255, .3); }
.conversation-item-actions .is-danger:hover { color: #ff899a; border-color: rgba(255, 88, 112, .35); }
.conversation-manager > p { margin: 0; color: #728899; font-size: 14px; text-align: center; }
.conversation-list-button { border: 0; padding: 2px 6px; color: #6f899c; background: transparent; cursor: pointer; font: inherit; font-size: 13px; }
.conversation-list-button:hover { color: #7fe5fb; }
.command-thread-messages { max-height: min(320px, calc(100vh - 280px)); display: flex; flex-direction: column; gap: 10px; overflow-y: auto; padding: 15px; scrollbar-width: thin; scrollbar-color: rgba(70, 188, 220, .28) transparent; }
.command-thread-empty { display: grid; gap: 4px; padding: 18px; border: 1px dashed rgba(112, 149, 178, .15); border-radius: 13px; text-align: center; }
.command-thread-empty strong { color: #bed0dc; font-size: 14px; font-weight: 500; }
.command-thread-empty span { color: #718496; font-size: 14px; }
.command-message { max-width: 84%; display: grid; gap: 4px; }
.command-message > span { padding: 0 4px; color: #6f8293; font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: .06em; }
.command-message-content { padding: 10px 12px; border: 1px solid rgba(120, 153, 180, .13); border-radius: 13px; color: #c9d7e1; background: rgba(255, 255, 255, .025); font-size: 14px; font-weight: 400; line-height: 1.58; overflow-wrap: anywhere; }
.command-message-content p { margin: 0 0 9px; }
.command-message-content p:last-child { margin-bottom: 0; }
.command-message-content h3, .command-message-content h4 { margin: 12px 0 6px; color: #e7f3f8; font-weight: 600; line-height: 1.35; }
.command-message-content h3:first-child, .command-message-content h4:first-child { margin-top: 0; }
.command-message-content h3 { font-size: 14px; }
.command-message-content h4 { font-size: 14px; }
.command-message-content ul, .command-message-content ol { display: grid; gap: 4px; margin: 5px 0 10px; padding-left: 20px; }
.command-message-content ul:last-child, .command-message-content ol:last-child { margin-bottom: 0; }
.command-message-content strong { color: #e5f4fa; font-weight: 600; }
.command-message-content em { color: #b9d2df; }
.command-message-content code { padding: 1px 4px; border-radius: 4px; color: #82ddf4; background: rgba(64, 198, 232, .08); font: 400 .95em/1.4 ui-monospace, SFMono-Regular, Consolas, monospace; }
.command-message-content pre { max-width: 100%; overflow-x: auto; margin: 7px 0 10px; padding: 9px 10px; border: 1px solid rgba(115, 160, 187, .12); border-radius: 9px; background: rgba(0, 0, 0, .2); white-space: pre-wrap; }
.command-message-content pre code { padding: 0; color: #bcd9e5; background: transparent; }
.command-message-user { align-self: flex-end; }
.command-message-user > span { text-align: right; }
.command-message-user .command-message-content { color: #d9f4fb; border-color: rgba(59, 193, 227, .18); background: rgba(40, 166, 201, .08); }
.command-message-assistant { align-self: flex-start; }
.command-message.is-history { opacity: .86; }
.command-artifact-list { display: grid; gap: 8px; margin-top: 4px; }
.command-artifact-card { min-width: min(520px, 76vw); display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px; border: 1px solid rgba(65, 205, 239, .2); border-radius: 12px; background: rgba(36, 167, 201, .07); }
.command-artifact-card > div { min-width: 0; display: grid; gap: 3px; }
.command-artifact-card strong { overflow-wrap: anywhere; color: #e6f8fc; font-size: 14px; font-weight: 600; }
.command-artifact-card span { color: #8eaaba; font-size: 12px; }
.command-artifact-download { flex: 0 0 auto; text-decoration: none; }
.command-message-thinking .command-message-content { min-width: 108px; border-color: rgba(67, 210, 244, .18); background: rgba(39, 174, 208, .055); }
@media (max-width: 640px) {
    .command-artifact-card { min-width: 0; align-items: stretch; flex-direction: column; }
    .command-artifact-download { width: 100%; justify-content: center; }
}
.command-thinking-status { display: flex; align-items: center; gap: 7px; color: #9fc6d6; }
.command-thinking-dots { display: inline-flex; align-items: center; gap: 3px; }
.command-thinking-dots i { width: 4px; height: 4px; border-radius: 50%; background: #43d2f4; box-shadow: 0 0 7px rgba(67, 210, 244, .34); animation: jarvis-thinking-dot 1.15s ease-in-out infinite; }
.command-thinking-dots i:nth-child(2) { animation-delay: .14s; }
.command-thinking-dots i:nth-child(3) { animation-delay: .28s; }
@keyframes jarvis-thinking-dot {
    0%, 60%, 100% { opacity: .28; transform: translateY(0) scale(.86); }
    30% { opacity: 1; transform: translateY(-2px) scale(1); }
}
.command-task-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 4px; }
.command-task-actions .button { min-height: 32px; padding: 7px 10px; font-size: 13px; }

.jarvis-command-dock { position: fixed; z-index: 80; left: calc(250px + (100vw - 250px - 300px) / 2); bottom: 18px; width: min(760px, calc(100vw - 250px - 300px - 76px)); display: block; padding: 13px 15px 11px; border: 1px solid rgba(116, 153, 183, .2); border-radius: 18px; background: rgba(16, 22, 30, .94); box-shadow: 0 20px 55px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .035); backdrop-filter: blur(18px); transform: translateX(-50%); }
.command-dock-top, .command-dock-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.command-dock-top { margin: 0 2px 7px; }
.command-dock-top label { color: #9badbd; font-size: 13px; font-weight: 650; }
.command-dock-top span { color: #52d8fb; font-size: 12px; font-weight: 750; text-transform: uppercase; letter-spacing: .08em; }
.command-dock-input { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto auto; align-items: end; gap: 7px; }
.command-dock-input textarea { width: 100%; max-height: 132px; min-height: 42px; padding: 11px 8px; resize: none; overflow-y: auto; scrollbar-width: none; -ms-overflow-style: none; border: 0; outline: 0; color: #edf5fb; background: transparent; font: inherit; font-size: 14px; line-height: 1.45; }
.command-dock-input textarea::-webkit-scrollbar { width: 0; height: 0; }
.command-dock-input textarea::placeholder { color: #607184; }
.command-tool-button, .command-attachment-button, .command-voice-button, .command-send-button { width: 39px; height: 39px; display: grid; place-items: center; border: 1px solid transparent; border-radius: 11px; cursor: pointer; }
.command-tool-button, .command-attachment-button, .command-voice-button { color: #8295a7; background: transparent; }
.command-tool-button { font-size: 22px; font-weight: 300; }
.command-tool-button:hover, .command-attachment-button:hover, .command-voice-button:hover { color: #bdefff; border-color: rgba(75, 209, 242, .15); background: rgba(55, 183, 218, .06); }
.command-attachment-button.is-active { color: #56dcf4; border-color: rgba(75, 209, 242, .24); background: rgba(55, 183, 218, .1); }
.command-voice-button.is-listening { color: #ff8292; border-color: rgba(255, 90, 113, .28); background: rgba(255, 74, 100, .08); box-shadow: 0 0 15px rgba(255, 74, 100, .1); }
.command-send-button { color: #04141e; border-color: rgba(114, 231, 255, .66); background: linear-gradient(135deg, #6be4f7, #29bce8); }
.command-send-button:disabled, .command-attachment-button:disabled, .command-dock-input textarea:disabled { opacity: .55; cursor: wait; }
.command-attachment-button svg, .command-voice-button svg, .command-send-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.command-attachment-list { display: flex; flex-wrap: wrap; gap: 6px; padding: 3px 47px 0; }
.command-attachment-list[hidden] { display: none; }
.command-attachment-chip { display: inline-flex; align-items: center; gap: 6px; min-width: 0; max-width: 100%; padding: 5px 8px; border: 1px solid rgba(74, 207, 239, .18); border-radius: 9px; color: #9eb8c7; background: rgba(38, 155, 187, .07); font-size: 11px; }
.command-attachment-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.command-attachment-chip button { flex: 0 0 auto; border: 0; padding: 0; color: #89a4b3; background: transparent; cursor: pointer; }
.command-message-attachments { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.command-message-attachment { padding: 5px 8px; border-radius: 8px; color: #b7d3df; background: rgba(255,255,255,.055); font-size: 11px; }
.command-dock-foot { margin: 7px 2px 0; color: #5f7182; font-size: 12px; }
.command-dock-foot span { display: inline-flex; align-items: center; gap: 6px; }
.command-dock-foot i { width: 5px; height: 5px; border-radius: 50%; background: #37dba8; box-shadow: 0 0 8px rgba(55, 219, 168, .6); }
.command-dock-foot-actions { display: inline-flex; align-items: center; justify-content: flex-end; gap: 10px; }
.wake-word-toggle { display: inline-flex; align-items: center; gap: 6px; min-height: 24px; padding: 3px 8px; border: 1px solid rgba(116, 153, 183, .2); border-radius: 999px; color: #7f91a2; background: rgba(255, 255, 255, .025); font: inherit; font-size: 12px; font-weight: 700; letter-spacing: .03em; cursor: pointer; transition: .18s ease; }
.wake-word-toggle:hover { color: #bdefff; border-color: rgba(75, 209, 242, .25); }
.wake-word-toggle b { width: 6px; height: 6px; border-radius: 50%; background: #566676; box-shadow: none; transition: .18s ease; }
.wake-word-toggle.is-active { color: #87eaff; border-color: rgba(75, 209, 242, .3); background: rgba(55, 183, 218, .07); }
.wake-word-toggle.is-active b { background: #42d9f5; box-shadow: 0 0 9px rgba(66, 217, 245, .72); }
.wake-word-toggle.is-awake { color: #bff7d9; border-color: rgba(55, 219, 168, .35); background: rgba(55, 219, 168, .08); }
.wake-word-toggle.is-awake b { background: #37dba8; box-shadow: 0 0 10px rgba(55, 219, 168, .78); }

.dashboard-page .panel { color: var(--text); border-color: var(--line); background: var(--surface); box-shadow: var(--shadow); }
.dashboard-page .panel h2, .dashboard-page .panel h3 { color: #edf5fb; }
.dashboard-page .panel-intro, .dashboard-page .section-head > span, .dashboard-page .empty, .dashboard-page .company-list small, .dashboard-page .agent-card-top small, .dashboard-page .alias-help, .dashboard-page .agent-card > p, .dashboard-page .device-main small, .dashboard-page .last-seen, .dashboard-page .detail-meta { color: var(--muted); }
.dashboard-page .empty strong { color: var(--text); }
.dashboard-page .device-card, .dashboard-page .metric, .dashboard-page .agent-card { color: var(--text); border-color: var(--line); background: #0d1722; }
.dashboard-page .device-detail { border-color: var(--line); background: #0a1119; }
.dashboard-page .device-rename-form { border-color: var(--line); background: #0d1722; }
.dashboard-page .agent-card { background: linear-gradient(145deg, #101b27, #0b131d); }
.dashboard-page .agent-card.is-active { border-color: rgba(61, 198, 231, .2); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025); }
.dashboard-page .agent-coming-soon, .dashboard-page .agent-avatar.future { background: #0a121b; }
.dashboard-page .agent-alias-form, .dashboard-page .company-list, .dashboard-page .company-list li { border-color: var(--line); }
.dashboard-page label { color: #9bb0c1; }
.dashboard-page input, .dashboard-page select { color: var(--text); border-color: rgba(132, 163, 190, .22); background: #09121c; }
.dashboard-page input:focus, .dashboard-page select:focus { border-color: #2baed5; box-shadow: 0 0 0 3px rgba(43, 174, 213, .09); }
.dashboard-page .button.secondary { color: #8ee2fa; background: rgba(36, 165, 207, .12); }
.dashboard-page .button.danger-outline { color: #ff8292; border-color: rgba(239, 83, 104, .3); background: transparent; }
.dashboard-page .status-dot { box-shadow: 0 0 0 4px rgba(158, 171, 188, .09); }
.dashboard-page .status-green .status-dot { box-shadow: 0 0 0 4px rgba(18, 166, 106, .1); }
.dashboard-page .status-yellow .status-dot { box-shadow: 0 0 0 4px rgba(231, 165, 11, .1); }
.dashboard-page .status-red .status-dot { box-shadow: 0 0 0 4px rgba(220, 65, 84, .1); }
.dashboard-page .status-badge { color: #91a1b2; background: rgba(145, 161, 178, .09); }
.dashboard-page .status-green .status-badge { color: #63dbb0; background: rgba(18, 166, 106, .1); }
.dashboard-page .status-yellow .status-badge { color: #f0c35a; background: rgba(231, 165, 11, .1); }
.dashboard-page .status-red .status-badge { color: #ff8292; background: rgba(220, 65, 84, .1); }
.device-diagnosis { grid-column: 1 / -1; padding: 13px 15px; border: 1px solid rgba(132, 163, 190, .16); border-radius: 12px; background: rgba(255, 255, 255, .018); }
.device-diagnosis > span { display: block; margin-bottom: 6px; color: #9eb0bf; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.device-diagnosis ul { margin: 0; padding-left: 18px; }
.device-diagnosis li, .device-diagnosis p { margin: 0; color: #c9d5df; font-size: 14px; font-weight: 400; line-height: 1.55; }
.device-diagnosis li + li { margin-top: 3px; }
.device-diagnosis.is-yellow { border-color: rgba(231, 165, 11, .23); background: rgba(231, 165, 11, .045); }
.device-diagnosis.is-yellow > span { color: #e8bd5a; }
.device-diagnosis.is-red { border-color: rgba(220, 65, 84, .25); background: rgba(220, 65, 84, .045); }
.device-diagnosis.is-red > span { color: #ff8292; }
.device-diagnosis.is-green { border-color: rgba(18, 166, 106, .2); background: rgba(18, 166, 106, .04); }
.device-diagnosis.is-green > span { color: #63dbb0; }
.agent-update-notice { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 15px; border: 1px solid rgba(238, 179, 48, .24); border-radius: 13px; background: rgba(238, 179, 48, .045); }
.agent-update-notice span, .agent-update-notice strong, .agent-update-notice small { display: block; }
.agent-update-notice span { color: #efb83d; font-size: 12px; font-weight: 600; letter-spacing: .08em; }
.agent-update-notice strong { margin-top: 4px; color: #dce9f2; font-size: 14px; font-weight: 600; }
.agent-update-notice small { margin-top: 4px; color: #8da2b2; font-size: 13px; line-height: 1.45; }
.agent-update-notice .button { flex: 0 0 auto; }

.learning-panel { display: grid; align-content: start; gap: 20px; }
.learning-guide, .learning-layout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.learning-guide article, .learning-card, .learning-list article { border: 1px solid var(--line); border-radius: 15px; background: rgba(255, 255, 255, .018); }
.learning-guide article { padding: 15px; }
.learning-guide span, .learning-list article span { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 600; letter-spacing: .09em; }
.learning-guide strong { display: block; color: #dce8f1; font-size: 14px; }
.learning-guide p { margin: 6px 0 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.learning-guide .can-learn { border-color: rgba(55, 211, 166, .19); background: rgba(39, 178, 135, .04); }
.learning-guide .can-learn span { color: #64dbb4; }
.learning-guide .needs-code { border-color: rgba(231, 165, 11, .19); background: rgba(231, 165, 11, .035); }
.learning-guide .needs-code span { color: #e8bd5a; }
.learning-card { align-content: start; padding: 18px; }
.learning-card h3, .learning-list-head h3 { margin: 4px 0 0; color: #e4eef5; font-size: 16px; }
.learning-card label { color: #a9bac7; font-size: 14px; }
.learning-card label small { color: #718495; font-size: 12px; font-weight: 400; line-height: 1.45; }
.learning-card input, .learning-card textarea { width: 100%; border: 1px solid rgba(132, 163, 190, .22); border-radius: 10px; padding: 11px 12px; color: var(--text); background: #09121c; outline: none; font: inherit; font-size: 14px; font-weight: 400; }
.learning-card textarea { resize: vertical; min-height: 90px; line-height: 1.5; }
.learning-card input:focus, .learning-card textarea:focus { border-color: #2baed5; box-shadow: 0 0 0 3px rgba(43, 174, 213, .09); }
.learning-list-head { padding-top: 4px; border-top: 1px solid var(--line); }
.learning-list { display: grid; gap: 10px; }
.learning-list article { display: grid; grid-template-columns: minmax(190px, .65fr) minmax(260px, 1.35fr) auto; align-items: center; gap: 16px; padding: 14px 15px; }
.learning-list article span { color: #718495; }
.learning-list article strong, .learning-list article p { margin: 0; color: #cddae4; font-size: 14px; font-weight: 400; line-height: 1.5; }
.learning-delete { border: 1px solid rgba(239, 83, 104, .22); border-radius: 9px; padding: 8px 10px; color: #ff8292; background: rgba(220, 65, 84, .045); cursor: pointer; }
.learning-delete:hover { background: rgba(220, 65, 84, .09); }
.learning-empty { min-height: 130px; }
.learning-unavailable { padding: 15px; border: 1px solid rgba(239, 83, 104, .22); border-radius: 13px; color: #ff9baa; background: rgba(220, 65, 84, .05); font-size: 14px; }

.task-panel { display: grid; align-content: start; gap: 18px; }
.task-flow-guide { display: flex; align-items: center; gap: 9px; overflow-x: auto; padding: 12px 14px; border: 1px solid var(--line); border-radius: 13px; color: #8ba1b2; background: rgba(255, 255, 255, .016); font-size: 13px; white-space: nowrap; }
.task-flow-guide span { flex: 0 0 auto; }
.task-flow-guide i { width: 22px; height: 1px; flex: 0 0 auto; background: linear-gradient(90deg, rgba(67, 210, 245, .15), rgba(67, 210, 245, .7)); }
.task-start-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.task-start-card { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 17px; border: 1px solid rgba(62, 205, 240, .19); border-radius: 15px; background: linear-gradient(120deg, rgba(34, 159, 194, .075), rgba(255, 255, 255, .012)); }
.task-start-card > div { min-width: 0; }
.task-start-card strong, .task-start-card span { display: block; }
.task-start-card strong { color: #dbedf6; font-size: 14px; font-weight: 600; }
.task-start-card span { margin-top: 5px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.task-start-card .button { flex: 0 0 auto; }
.task-list { display: grid; gap: 10px; }
.task-item { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 15px 16px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 255, 255, .018); }
.task-item-main { min-width: 0; }
.task-item-main > strong, .task-item-main > small { display: block; }
.task-item-main > strong { margin-top: 5px; color: #dce9f2; font-size: 14px; font-weight: 600; }
.task-item-main > small { margin-top: 4px; color: var(--muted); font-size: 13px; }
.task-item-main > p { margin: 8px 0 0; color: #b8c8d4; font-size: 14px; line-height: 1.5; }
.task-status { display: inline-flex; padding: 5px 8px; border: 1px solid rgba(117, 153, 180, .18); border-radius: 99px; color: #9fb0bf; background: rgba(117, 153, 180, .06); font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.task-item.status-awaiting_confirmation .task-status, .task-item.status-queued .task-status { color: #efc562; border-color: rgba(231, 165, 11, .22); background: rgba(231, 165, 11, .06); }
.task-item.status-running .task-status { color: #65dcfa; border-color: rgba(72, 205, 239, .24); background: rgba(72, 205, 239, .07); }
.task-item.status-cancellation_requested .task-status { color: #ffad82; border-color: rgba(255, 139, 89, .25); background: rgba(255, 139, 89, .065); }
.task-item.status-completed .task-status { color: #6cdeb7; border-color: rgba(55, 211, 166, .22); background: rgba(55, 211, 166, .06); }
.task-item.status-failed .task-status, .task-item.status-cancelled .task-status { color: #ff8c9b; border-color: rgba(239, 83, 104, .22); background: rgba(239, 83, 104, .055); }
.task-actions { display: flex; flex: 0 0 auto; gap: 8px; }
.task-actions .button { min-height: 34px; padding: 8px 11px; font-size: 13px; }
.task-empty { min-height: 160px; }

.maintenance-panel { display: grid; align-content: start; gap: 18px; }
.maintenance-hero { position: relative; overflow: hidden; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 17px; padding: 19px; border: 1px solid rgba(62, 205, 240, .18); border-radius: 16px; background: radial-gradient(circle at 78% 25%, rgba(31, 179, 216, .12), transparent 32%), linear-gradient(120deg, rgba(15, 40, 58, .78), rgba(8, 17, 25, .88)); }
.maintenance-hero h2 { margin: 4px 0 5px; color: #e8f6fd; font-size: 20px; }
.maintenance-hero p:not(.eyebrow) { max-width: 820px; margin: 0; color: #8fa4b5; font-size: 14px; line-height: 1.55; }
.maintenance-hero small { display: block; margin-top: 6px; color: #61cae8; font-size: 13px; }
.maintenance-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 11px; }
.maintenance-stats article { padding: 15px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 255, 255, .018); }
.maintenance-stats span, .maintenance-stats small { display: block; color: var(--muted); font-size: 13px; }
.maintenance-stats strong { display: block; margin: 6px 0 3px; color: #e6f3fa; font-size: 23px; font-weight: 500; }
.maintenance-section-head { display: flex; align-items: end; justify-content: space-between; gap: 14px; padding-top: 3px; }
.maintenance-section-head h3 { margin: 4px 0 0; color: #e4eef5; font-size: 17px; }
.maintenance-section-head a { color: #65d9f5; font-size: 13px; }
.maintenance-recommendations { display: grid; gap: 10px; }
.maintenance-recommendation { display: grid; grid-template-columns: 110px minmax(260px, 1fr) minmax(130px, auto) auto; align-items: center; gap: 16px; padding: 15px; border: 1px solid rgba(231, 165, 11, .18); border-radius: 14px; background: rgba(231, 165, 11, .03); }
.maintenance-recommendation.is-red { border-color: rgba(239, 83, 104, .22); background: rgba(220, 65, 84, .035); }
.maintenance-severity { color: #eac05b; font-size: 12px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; }
.maintenance-recommendation.is-red .maintenance-severity { color: #ff8998; }
.maintenance-recommendation strong, .maintenance-recommendation p, .maintenance-recommendation small { display: block; }
.maintenance-recommendation strong { color: #dceaf3; font-size: 14px; font-weight: 600; }
.maintenance-recommendation p { margin: 4px 0; color: #b4c5d1; font-size: 14px; line-height: 1.45; }
.maintenance-recommendation small { color: #74899b; font-size: 12px; line-height: 1.45; }
.maintenance-device { min-width: 0; }
.maintenance-device span, .maintenance-device small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.maintenance-device span { color: #cfe0ea; font-size: 13px; }
.maintenance-device small { margin-top: 3px; color: var(--muted); font-size: 12px; }
.maintenance-recommendation .button { min-height: 34px; padding: 8px 11px; font-size: 13px; white-space: nowrap; }
.maintenance-safety { padding: 14px 15px; border: 1px solid rgba(91, 132, 160, .13); border-radius: 13px; background: rgba(255, 255, 255, .012); }
.maintenance-safety span { color: #7890a2; font-size: 12px; font-weight: 600; letter-spacing: .08em; }
.maintenance-safety p { margin: 5px 0 0; color: #8498a8; font-size: 13px; line-height: 1.55; }

.extensions-panel { display: grid; align-content: start; gap: 18px; }
.extensions-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr); gap: 14px; }
.extension-card, .extension-note { border: 1px solid var(--line); border-radius: 16px; padding: 18px; background: rgba(255, 255, 255, .018); }
.extension-card { display: grid; align-content: start; gap: 16px; }
.extension-card-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.extension-icon { display: grid; width: 44px; height: 44px; place-items: center; border: 1px solid rgba(61, 211, 246, .35); border-radius: 13px; color: #66dcf7; background: rgba(31, 164, 201, .09); font-size: 18px; font-weight: 600; box-shadow: inset 0 0 22px rgba(36, 194, 231, .07); }
.extension-card-head strong, .extension-card-head small { display: block; }
.extension-card-head strong { color: #e0edf5; font-size: 15px; font-weight: 600; }
.extension-card-head small { margin-top: 3px; color: var(--muted); font-size: 13px; font-weight: 400; }
.extension-status { padding: 6px 9px; border: 1px solid rgba(86, 153, 185, .24); border-radius: 99px; color: #9ab2c3; background: rgba(56, 115, 143, .08); font-size: 12px; font-weight: 500; white-space: nowrap; }
.extension-status.is-preparing { border-color: rgba(237, 174, 49, .25); color: #efbb52; background: rgba(237, 174, 49, .07); }
.extension-card > p, .extension-note > p, .extension-note > span { margin: 0; color: #91a5b5; font-size: 14px; font-weight: 400; line-height: 1.6; }
.extension-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin: 0; }
.extension-meta div { padding: 11px; border: 1px solid rgba(102, 145, 174, .13); border-radius: 11px; background: rgba(4, 13, 22, .35); }
.extension-meta dt { color: #71899b; font-size: 12px; }
.extension-meta dd { margin: 4px 0 0; color: #bfd0dc; font-size: 13px; line-height: 1.45; }
.extension-card .button:disabled { opacity: .58; cursor: not-allowed; }
.extension-note { display: grid; align-content: start; gap: 10px; background: linear-gradient(145deg, rgba(33, 162, 198, .06), rgba(255, 255, 255, .012)); }
.extension-note h3 { margin: 0; color: #dae8f1; font-size: 16px; font-weight: 600; }
.extension-note > span { margin-top: 4px; padding-top: 12px; border-top: 1px solid rgba(102, 145, 174, .12); color: #68cfe9; }
.maintenance-empty { min-height: 145px; border: 1px dashed var(--line); border-radius: 14px; }

.install-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 20px 0; }
.install-steps article { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 11px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 255, 255, .018); }
.install-steps article > span { width: 28px; height: 28px; display: grid; place-items: center; color: #65defd; border: 1px solid rgba(73, 210, 245, .24); border-radius: 9px; background: rgba(38, 169, 204, .08); font-size: 14px; font-weight: 600; }
.install-steps strong, .install-steps small { display: block; }
.install-steps strong { color: #dfeaf2; font-size: 14px; font-weight: 600; }
.install-steps small { margin-top: 4px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.agent-download-card { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 0 0 20px; padding: 16px 17px; border: 1px solid rgba(64, 205, 241, .18); border-radius: 15px; background: linear-gradient(120deg, rgba(30, 152, 187, .08), rgba(255, 255, 255, .015)); }
.agent-download-card > div { min-width: 0; }
.agent-download-card strong, .agent-download-card span { display: block; }
.agent-download-card strong { color: #dff7ff; font-size: 14px; font-weight: 600; }
.agent-download-card span { margin-top: 4px; color: var(--muted); font-size: 13px; }
.agent-download-button { flex: 0 0 auto; text-decoration: none; text-align: center; }
.installation-code-form { max-width: 620px; padding-top: 19px; border-top: 1px solid var(--line); }
.install-empty-note { margin: 10px 0 0; color: #e1b75b; font-size: 14px; }

/* Navegação por telas: a visão geral não acumula os módulos abaixo dela. */
.dashboard-view[hidden] { display: none !important; }
.dashboard-view:not(.command-home) { min-height: calc(100vh - 235px); }
.dashboard-page:not([data-active-view="overview"]) .jarvis-command-dock,
.dashboard-page:not([data-active-view="overview"]) .jarvis-command-thread { left: calc(250px + (100vw - 250px) / 2); width: min(760px, calc(100vw - 250px - 70px)); }

/* Tipografia interna mais leve para leitura prolongada. */
.dashboard-page { font-weight: 400; }
.dashboard-page h1,
.dashboard-page h2,
.dashboard-page h3,
.dashboard-page strong,
.dashboard-page b { font-weight: 600; }
.dashboard-page .eyebrow,
.dashboard-page .mode-pill,
.dashboard-page .brand,
.dashboard-page .button,
.dashboard-page .status-badge,
.dashboard-page .agent-state,
.dashboard-page .agent-banner-status,
.dashboard-page .agent-status-summary span,
.dashboard-page .jarvis-presence-state,
.dashboard-page .command-dock-top label,
.dashboard-page .command-dock-top span { font-weight: 600; }
.dashboard-page label { font-weight: 500; }
.dashboard-page .topbar h1,
.dashboard-page .jarvis-presence-copy h2 { letter-spacing: -.35px; }

@keyframes orb-rotate { to { transform: rotate(360deg); } }
@keyframes orb-breathe { 0%, 100% { transform: scale(.94); opacity: .72; } 50% { transform: scale(1.04); opacity: 1; } }
@keyframes orb-core { 0%, 100% { transform: scale(.95); filter: brightness(.92); } 50% { transform: scale(1.04); filter: brightness(1.16); } }
@keyframes orb-scan { 0%, 100% { transform: translateY(-66px) scaleX(.72); opacity: .12; } 50% { transform: translateY(66px) scaleX(1); opacity: .84; } }
@keyframes jarvis-state-pulse { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }

@media (max-width: 1180px) {
    .command-home { min-height: 0; grid-template-columns: 1fr; }
    .agent-status-rail { display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
    .agent-status-head, .agent-status-list, .agent-status-log { grid-column: 1 / -1; }
    .agent-status-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .jarvis-command-dock, .jarvis-command-thread { left: calc(250px + (100vw - 250px) / 2); width: min(760px, calc(100vw - 250px - 70px)); }
    .jarvis-command-thread.is-overview { left: auto; right: auto; bottom: auto; width: 100%; max-width: 880px; transform: none; }
    .maintenance-recommendation { grid-template-columns: 100px minmax(220px, 1fr) auto; }
    .maintenance-recommendation .maintenance-device { grid-column: 2; }
    .maintenance-recommendation .button { grid-column: 3; grid-row: 1 / span 2; }
}

@media (max-width: 760px) {
    .dashboard-page .content { padding: 24px 15px 160px; }
    .command-home { gap: 14px; }
    .command-home .command-cards, .command-home .agent-status-rail { display: none; }
    .command-workspace { grid-template-rows: 1fr; }
    .jarvis-presence { min-height: 430px; }
    .jarvis-presence-copy { top: 20px; left: 20px; right: 20px; }
    .jarvis-orb { width: min(65vw, 270px); }
    .agent-status-rail { display: flex; }
    .agent-status-list { grid-template-columns: 1fr; }
    .jarvis-command-dock { left: 14px; right: 14px; bottom: 12px; width: auto; transform: none; }
    .jarvis-command-thread { left: 14px; right: 14px; bottom: 145px; width: auto; max-height: min(420px, calc(100vh - 210px)); transform: none; }
    .dashboard-page:not([data-active-view="overview"]) .jarvis-command-dock { left: 14px; right: 14px; width: auto; max-width: none; box-sizing: border-box; transform: none; }
    .dashboard-page:not([data-active-view="overview"]) .jarvis-command-thread { left: 14px; right: 14px; width: auto; max-width: none; box-sizing: border-box; transform: none; }
    .command-dock-input { min-width: 0; }
    .command-dock-input textarea { min-width: 0; }
    .jarvis-conversation-slot { inset: 112px 14px 52px; }
    .jarvis-command-thread.is-overview { left: auto; right: auto; bottom: auto; width: 100%; max-height: 100%; transform: none; }
    .jarvis-command-thread.is-overview .command-thread-messages { max-height: none; }
    .command-dock-foot small { display: none; }
    .install-steps { grid-template-columns: 1fr; }
    .agent-download-card { align-items: stretch; flex-direction: column; }
    .learning-guide, .learning-layout { grid-template-columns: 1fr; }
    .learning-list article { grid-template-columns: 1fr; }
    .learning-list article form { justify-self: start; }
    .dashboard-page .alert[data-auto-dismiss] { left: 14px; right: 14px; width: auto; transform: none; }
    .dashboard-page .alert[data-auto-dismiss].is-leaving { transform: translateY(-10px); }
    .task-start-card, .task-item { align-items: stretch; flex-direction: column; }
    .task-start-grid, .extensions-grid, .extension-meta { grid-template-columns: 1fr; }
    .task-start-card .button, .task-actions { align-self: flex-start; }
    .extension-card-head { grid-template-columns: auto minmax(0, 1fr); }
    .extension-status { grid-column: 2; justify-self: start; }
    .maintenance-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .maintenance-recommendation { grid-template-columns: 1fr; }
    .maintenance-recommendation .maintenance-device, .maintenance-recommendation .button { grid-column: auto; grid-row: auto; }
    .maintenance-recommendation .button { justify-self: start; }
    .maintenance-hero { grid-template-columns: auto 1fr; }
    .maintenance-hero .agent-banner-status { grid-column: 2; justify-self: start; }
    .agent-update-notice { align-items: stretch; flex-direction: column; }
    .agent-update-notice .button { align-self: flex-start; }
}

@media (max-width: 480px) {
    .jarvis-presence { min-height: 390px; }
    .jarvis-presence-copy h2 { font-size: 19px; }
    .jarvis-command-dock { padding: 11px 10px 9px; }
    .command-dock-input { grid-template-columns: 32px minmax(0, 1fr) 32px 32px 32px; gap: 3px; }
    .command-tool-button, .command-attachment-button, .command-voice-button, .command-send-button { width: 32px; height: 38px; }
    .command-dock-input textarea { padding-right: 4px; padding-left: 4px; font-size: 13px; }
    .command-attachment-list { padding-right: 35px; padding-left: 35px; }
}

@media (prefers-reduced-motion: reduce) {
    .jarvis-orb *, .jarvis-presence-state i { animation: none !important; }
    .command-thinking-dots i { animation: none; opacity: .72; transform: none; }
}

/* Home Assistant extension */
.extension-status.is-connected { border-color: rgba(83, 214, 148, .28); color: #7de5ab; background: rgba(61, 186, 122, .08); }
.extension-status.is-testing, .extension-status.is-configured { border-color: rgba(237, 174, 49, .25); color: #efbb52; background: rgba(237, 174, 49, .07); }
.extension-status.is-error { border-color: rgba(237, 91, 91, .28); color: #ff9d9d; background: rgba(212, 65, 65, .07); }
.extension-status.is-disconnected { border-color: rgba(102, 145, 174, .18); color: #8ca2b2; background: rgba(56, 115, 143, .05); }
.extension-form { display: grid; gap: 12px; }
.extension-form label { display: grid; gap: 6px; color: #91a5b5; font-size: 13px; font-weight: 500; }
.extension-form input, .extension-form select { width: 100%; min-height: 40px; padding: 9px 11px; border: 1px solid rgba(102, 145, 174, .18); border-radius: 10px; color: #dbe8f0; background: rgba(4, 13, 22, .58); outline: none; }
.extension-form input:focus, .extension-form select:focus { border-color: rgba(61, 211, 246, .42); box-shadow: 0 0 0 3px rgba(61, 211, 246, .06); }
.extension-form small { color: #6f8799; font-size: 12px; font-weight: 400; line-height: 1.45; }
.extension-actions { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; }
.extension-actions form { margin: 0; }
.extension-alert { padding: 10px 12px; border: 1px solid rgba(237, 174, 49, .18); border-radius: 10px; color: #d7b76f; background: rgba(237, 174, 49, .05); font-size: 13px; line-height: 1.5; }
.extension-alert.is-error { border-color: rgba(237, 91, 91, .2); color: #f2a0a0; background: rgba(212, 65, 65, .05); }
.home-assistant-extension .extension-icon { font-size: 14px; letter-spacing: -.02em; }

/* Home Assistant dashboard */
.home-assistant-panel { position: relative; overflow: hidden; }
.ha-section-head { align-items: center; gap: 18px; }
.ha-head-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.ha-live-status { display: inline-flex; align-items: center; gap: 7px; min-height: 30px; padding: 6px 10px; border: 1px solid rgba(102,145,174,.2); border-radius: 999px; color: #9fb4c4; background: rgba(7,22,45,.52); font-size: 13px; font-weight: 600; }
.ha-live-status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #718596; box-shadow: 0 0 0 4px rgba(113,133,150,.08); }
.ha-live-status.is-connected::before { background: #55d696; box-shadow: 0 0 0 4px rgba(85,214,150,.09); }
.ha-live-status.is-testing::before, .ha-live-status.is-configured::before { background: #efbb52; box-shadow: 0 0 0 4px rgba(239,187,82,.08); }
.ha-live-status.is-error::before { background: #ff8585; box-shadow: 0 0 0 4px rgba(255,133,133,.08); }
.ha-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 20px 0 18px; }
.ha-summary-grid article { min-height: 105px; padding: 16px; border: 1px solid rgba(102,145,174,.13); border-radius: 15px; background: linear-gradient(180deg, rgba(12,34,56,.64), rgba(5,17,31,.6)); box-shadow: inset 0 1px 0 rgba(255,255,255,.02); }
.ha-summary-grid span, .ha-summary-grid small { display: block; color: #72899a; font-size: 12px; }
.ha-summary-grid strong { display: block; margin: 9px 0 6px; color: #e9f5fb; font-size: 27px; font-weight: 600; line-height: 1; }
.ha-summary-grid .ha-summary-time { font-size: 15px; line-height: 1.15; }
.ha-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.ha-search { display: grid; gap: 6px; min-width: min(360px, 100%); color: #8398a8; font-size: 12px; }
.ha-search input { min-height: 40px; padding: 9px 12px; border: 1px solid rgba(102,145,174,.16); border-radius: 11px; color: #e3eef5; background: rgba(3,14,26,.62); outline: none; }
.ha-search input:focus { border-color: rgba(61,211,246,.38); box-shadow: 0 0 0 3px rgba(61,211,246,.05); }
.ha-filters { display: flex; justify-content: flex-end; gap: 7px; flex-wrap: wrap; }
.ha-filters button { min-height: 34px; padding: 7px 10px; border: 1px solid rgba(102,145,174,.13); border-radius: 9px; color: #8da2b1; background: rgba(5,19,33,.55); cursor: pointer; font: inherit; font-size: 12px; }
.ha-filters button:hover, .ha-filters button.is-active { border-color: rgba(61,211,246,.32); color: #d8f6ff; background: rgba(28,134,171,.11); }
.ha-sync-note { margin: 6px 0 14px; color: #738b9d; font-size: 12px; }
.ha-sync-note.is-error { color: #ef9b9b; }
.ha-area-list { display: grid; gap: 14px; }
.ha-area-card { border: 1px solid rgba(102,145,174,.13); border-radius: 16px; background: rgba(5,18,32,.52); overflow: hidden; }
.ha-area-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid rgba(102,145,174,.09); background: rgba(15,39,61,.28); }
.ha-area-head strong { color: #dfeef6; font-size: 14px; font-weight: 600; }
.ha-area-head span { color: #718899; font-size: 12px; }
.ha-entity-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 12px; }
.ha-entity-card { min-height: 112px; padding: 13px; border: 1px solid rgba(102,145,174,.1); border-radius: 12px; background: rgba(5,19,33,.54); display: grid; gap: 10px; align-content: space-between; }
.ha-entity-card.is-unavailable { opacity: .58; }
.ha-entity-top { display: grid; grid-template-columns: 34px minmax(0,1fr) auto; gap: 9px; align-items: center; }
.ha-entity-icon { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid rgba(61,211,246,.13); border-radius: 10px; color: #7edcf2; background: rgba(25,123,153,.08); font-size: 14px; font-weight: 700; }
.ha-entity-name { min-width: 0; }
.ha-entity-name strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #dcebf3; font-size: 14px; font-weight: 600; }
.ha-entity-name small { display: block; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #647c8d; font-size: 11px; }
.ha-entity-state { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #a8bdca; font-size: 12px; text-align: right; }
.ha-entity-state.is-on { color: #72dfaa; }
.ha-entity-actions { display: flex; gap: 7px; justify-content: flex-end; }
.ha-entity-actions button { min-height: 30px; padding: 6px 9px; border: 1px solid rgba(102,145,174,.14); border-radius: 8px; color: #90a6b5; background: rgba(4,14,25,.62); cursor: pointer; font: inherit; font-size: 11px; }
.ha-entity-actions button:hover { border-color: rgba(61,211,246,.3); color: #d7f4fc; }
.ha-entity-actions button:disabled { cursor: wait; opacity: .45; }
.ha-empty { padding: 34px 18px; border: 1px dashed rgba(102,145,174,.16); border-radius: 14px; color: #73899a; text-align: center; font-size: 13px; }

@media (max-width: 1180px) {
    .ha-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ha-entity-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ha-toolbar { align-items: stretch; flex-direction: column; }
    .ha-filters { justify-content: flex-start; }
}
@media (max-width: 760px) {
    .ha-section-head { align-items: flex-start; flex-direction: column; }
    .ha-head-actions { justify-content: flex-start; }
    .ha-summary-grid, .ha-entity-grid { grid-template-columns: 1fr; }
    .ha-search { min-width: 100%; }
}
/* Projetos JDINFO — preparação, prévia e confirmação isoladas. */
.projects-panel {
    min-height: calc(100vh - 150px);
}

.project-workspace-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, .75fr);
    gap: 20px;
    margin-top: 26px;
}

.project-form-card,
.project-safety-card,
.project-preview-card {
    border: 1px solid var(--line, #203548);
    border-radius: 22px;
    background: rgba(10, 24, 37, .76);
}

.project-form-card,
.project-safety-card {
    padding: 24px;
}

.project-form-card {
    min-width: 0;
}

.project-card-heading {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
}

.project-card-heading > span {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(52, 213, 255, .42);
    border-radius: 12px;
    color: #52dcff;
    background: rgba(26, 183, 226, .1);
}

.project-card-heading div,
.project-card-heading strong,
.project-card-heading small {
    display: block;
}

.project-card-heading small,
.project-form-card label small {
    margin-top: 5px;
    color: var(--muted, #7890a7);
    font-weight: 400;
}

.project-form-card label,
.project-reference-card label {
    display: grid;
    gap: 8px;
    margin-bottom: 18px;
    color: #b8c9d8;
    font-weight: 500;
}

.project-form-card input,
.project-form-card select,
.project-form-card textarea,
.project-reference-card input,
.project-reference-card textarea {
    width: 100%;
    border: 1px solid #20384d;
    border-radius: 14px;
    padding: 14px 16px;
    color: #e7f3fb;
    background: #07131f;
    font: inherit;
    font-weight: 400;
    resize: vertical;
}

.project-form-card input:focus,
.project-form-card select:focus,
.project-form-card textarea:focus,
.project-reference-card input:focus,
.project-reference-card textarea:focus {
    outline: 2px solid rgba(52, 213, 255, .22);
    border-color: #2e9fbd;
}

.project-safety-card h3 {
    margin: 6px 0 18px;
    font-size: 1.35rem;
}

.project-reference-card {
    align-self: start;
}

.project-reference-card .project-reference-intro {
    margin: -8px 0 20px;
    color: var(--muted, #7890a7);
    line-height: 1.55;
}

.project-reference-card label > small {
    color: var(--muted, #7890a7);
    font-weight: 400;
}

.project-reference-card textarea {
    min-height: 112px;
}

.project-safety-card ol {
    display: grid;
    gap: 12px;
    padding-left: 22px;
    color: #b9c9d7;
    line-height: 1.55;
}

.project-safety-card > p:last-child {
    margin: 22px 0 0;
    color: var(--muted, #7890a7);
    line-height: 1.55;
}

.project-safety-card code,
.project-path code {
    color: #75dff8;
    font-weight: 400;
}

.project-preview-card {
    margin-top: 26px;
    padding: 20px;
}

.project-preview-card > header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    padding: 4px 4px 18px;
}

.project-preview-card h3 {
    margin: 5px 0 8px;
    font-size: 1.5rem;
}

.project-preview-card header p:last-child {
    margin: 0;
    color: #9fb2c2;
}

.project-draft-badge {
    border: 1px solid rgba(246, 183, 57, .38);
    border-radius: 999px;
    padding: 8px 12px;
    color: #f6c75a;
    background: rgba(246, 183, 57, .08);
    font-size: .78rem;
}

.project-path {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-bottom: 16px;
    border: 1px solid #1b3042;
    border-radius: 13px;
    padding: 12px 14px;
    background: #07131f;
    color: #849aad;
}

.project-preview-frame {
    display: block;
    width: 100%;
    min-height: 620px;
    border: 1px solid #263e51;
    border-radius: 16px;
    background: #fff;
}
.project-text-preview { overflow: hidden; border: 1px solid #263e51; border-radius: 16px; background: #06101a; }
.project-text-preview > strong { display: block; padding: 12px 16px; border-bottom: 1px solid #1b3042; color: #75dff8; font-weight: 500; }
.project-text-preview pre { min-height: 420px; max-height: 650px; overflow: auto; margin: 0; padding: 20px; color: #cfdee7; font: 400 .85rem/1.6 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre-wrap; word-break: break-word; }
.project-artifact-ready { display: flex; align-items: center; gap: 16px; min-height: 150px; padding: 24px; border: 1px solid rgba(47, 211, 164, .3); border-radius: 16px; background: rgba(20, 111, 88, .1); }
.project-artifact-ready-icon { display: grid; flex: 0 0 54px; height: 54px; place-items: center; border: 1px solid rgba(72, 226, 185, .4); border-radius: 14px; color: #6ee7c2; background: rgba(25, 151, 117, .12); font: 500 1rem/1 ui-monospace, SFMono-Regular, Consolas, monospace; }
.project-artifact-ready > div { display: grid; gap: 7px; min-width: 0; }
.project-artifact-ready strong { color: #d9f8ee; font-weight: 550; }
.project-artifact-ready p { margin: 0; color: #95afa7; line-height: 1.55; }
.project-artifact-ready code { width: fit-content; max-width: 100%; overflow-wrap: anywhere; color: #72e7c4; }

.project-preview-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
}
.project-changes { display: grid; gap: 6px; margin: 0 0 16px; padding: 13px 15px; border: 1px solid rgba(52, 213, 255, .2); border-radius: 13px; background: rgba(22, 160, 199, .06); }
.project-changes strong { color: #6fdbf7; font-size: .82rem; font-weight: 550; }
.project-changes span { color: #9fb2c2; font-size: .82rem; overflow-wrap: anywhere; }

.saved-projects { margin-top: 26px; border-top: 1px solid rgba(92, 135, 163, .14); padding-top: 24px; }
.saved-projects-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
.saved-projects-head h3 { margin: 4px 0 5px; font-size: 1.25rem; }
.saved-projects-head small, .saved-project-message { color: #7890a7; font-weight: 400; }
.saved-project-message { padding: 18px; border: 1px dashed rgba(95, 151, 180, .18); border-radius: 14px; text-align: center; }
.saved-project-list { display: grid; gap: 10px; }
.saved-project-card { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 18px; border: 1px solid #1d3345; border-radius: 15px; background: rgba(7, 19, 31, .72); }
.saved-project-card strong, .saved-project-card small { display: block; }
.saved-project-card strong { color: #dcebf4; font-weight: 550; }
.saved-project-card small { margin-top: 5px; color: #71899b; font-weight: 400; }
.saved-project-card > div:last-child { display: flex; flex-wrap: wrap; gap: 9px; }
.saved-project-card form { margin: 0; }
.saved-project-card .button.danger { color: #ff8393; border-color: rgba(255, 86, 111, .25); background: rgba(101, 20, 35, .12); }
.saved-project-card .button.danger:hover { border-color: rgba(255, 86, 111, .48); background: rgba(133, 26, 45, .2); }
.project-edit-card { display: grid; gap: 16px; margin-top: 18px; padding: 20px; border: 1px solid rgba(52, 213, 255, .28); border-radius: 18px; background: rgba(7, 25, 38, .94); }
.project-edit-card[hidden] { display: none; }
.project-edit-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.project-edit-card h3 { margin: 4px 0 0; font-size: 1.2rem; }
.project-edit-card label { display: grid; gap: 8px; color: #b8c9d8; font-weight: 500; }
.project-edit-card textarea { width: 100%; resize: vertical; border: 1px solid #20384d; border-radius: 14px; padding: 14px 16px; color: #e7f3fb; background: #07131f; font: inherit; font-weight: 400; }
.project-edit-card textarea:focus { outline: 2px solid rgba(52, 213, 255, .22); border-color: #2e9fbd; }
.project-edit-card > p { margin: 0; color: #7890a7; font-size: .85rem; }
.project-image-upload { padding: 15px 16px; border: 1px dashed rgba(52, 213, 255, .28); border-radius: 14px; background: rgba(4, 17, 28, .54); }
.project-image-upload input { width: 100%; color: #9db2c2; font: inherit; font-size: .86rem; }
.project-image-upload input::file-selector-button { margin-right: 12px; border: 1px solid rgba(52, 213, 255, .26); border-radius: 9px; padding: 9px 12px; color: #7be5ff; background: rgba(24, 83, 105, .26); cursor: pointer; }
.project-image-upload span, .project-image-upload small { color: #7890a7; font-size: .79rem; font-weight: 400; }
.project-image-upload small { color: #9bc8d8; overflow-wrap: anywhere; }
.project-image-previews { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 150px)); gap: 10px; margin-top: 4px; }
.project-image-previews[hidden] { display: none; }
.project-image-preview { overflow: hidden; border: 1px solid rgba(52, 213, 255, .22); border-radius: 11px; background: #07131f; }
.project-image-preview img { display: block; width: 100%; height: 92px; object-fit: cover; background: #04101a; }
.project-image-preview span { display: block; overflow: hidden; padding: 7px 8px; color: #9bc8d8; font-size: .7rem; text-overflow: ellipsis; white-space: nowrap; }
.project-handoff-note { display: flex; flex-wrap: wrap; gap: 5px 9px; padding: 12px 14px; border: 1px solid rgba(52, 213, 255, .24); border-radius: 12px; color: #9bc8d8; background: rgba(24, 83, 105, .14); font-size: .82rem; }
.project-handoff-note[hidden] { display: none; }
.project-handoff-note strong { color: #73e1fb; font-weight: 550; }
.project-edit-processing { display: flex; align-items: center; gap: 12px; padding: 13px 15px; border: 1px solid rgba(52, 213, 255, .22); border-radius: 13px; color: #a9c4d2; background: rgba(20, 75, 95, .13); font-size: .86rem; }
.project-edit-processing[hidden] { display: none; }
.project-edit-processing strong { color: #73e1fb; font-weight: 550; }
.project-edit-spinner { width: 19px; height: 19px; flex: 0 0 auto; border: 2px solid rgba(84, 218, 250, .22); border-top-color: #54dafa; border-radius: 50%; animation: project-edit-spin .8s linear infinite; }
.project-edit-card[aria-busy="true"] textarea, .project-edit-card[aria-busy="true"] input { opacity: .68; }
.project-form-card[aria-busy="true"] textarea, .project-form-card[aria-busy="true"] input, .project-form-card[aria-busy="true"] select { opacity: .68; }
.project-form-card button:disabled { opacity: .64; cursor: wait; }
.project-edit-card button:disabled { opacity: .64; cursor: wait; }
@keyframes project-edit-spin { to { transform: rotate(360deg); } }
.project-file-browser { margin-top: 18px; overflow: hidden; border: 1px solid #244153; border-radius: 18px; background: #07131f; }
.project-file-browser > header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 18px; border-bottom: 1px solid #1b3042; }
.project-file-browser h3 { margin: 4px 0 0; font-size: 1.1rem; }
.project-file-browser > header button { width: 34px; height: 34px; border: 1px solid #294357; border-radius: 10px; color: #9bb0c0; background: transparent; cursor: pointer; }
.project-browser-grid { display: grid; grid-template-columns: minmax(190px, 280px) minmax(0, 1fr); min-height: 520px; }
.project-browser-grid nav { overflow: auto; padding: 12px; border-right: 1px solid #1b3042; }
.project-browser-grid nav button { display: block; width: 100%; margin-bottom: 6px; border: 0; border-radius: 9px; padding: 10px; color: #a9bdcb; background: transparent; text-align: left; cursor: pointer; font: inherit; font-size: .82rem; }
.project-browser-grid nav button:hover { color: #dff8ff; background: rgba(42, 186, 224, .09); }
.project-reader { min-width: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); }
.project-reader-head { padding: 12px 16px; border-bottom: 1px solid #1b3042; color: #76d9f1; font-size: .8rem; }
.project-reader pre { min-height: 450px; max-height: 680px; overflow: auto; margin: 0; padding: 18px; color: #c9d8e1; background: #06101a; font: 400 .8rem/1.55 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre-wrap; word-break: break-word; }
.project-reader iframe { width: 100%; min-height: 600px; border: 0; background: #fff; }

.extension-icon {
    min-width: 54px;
}

@media (max-width: 900px) {
    .company-card > summary { grid-template-columns: minmax(180px, 1fr) 22px; }
    .company-statuses { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; }
    .company-chevron { grid-column: 2; grid-row: 1; }
    .company-computer-row { grid-template-columns: 10px minmax(180px, 1fr) auto 18px; }
    .company-computer-row .last-seen { display: none; }
    .computer-header { align-items: flex-start; flex-direction: column; }
    .computer-header-actions { justify-content: flex-start; }
    .computer-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .technical-list article, .event-list article { grid-template-columns: 1fr; }
    .technical-list article > span { text-align: left; }
    .computer-recommendations article { grid-template-columns: 1fr; }
    .computer-recommendations aside { padding: 10px 0 0; border-top: 1px solid var(--line); border-left: 0; }
    .project-workspace-grid {
        grid-template-columns: 1fr;
    }

    .project-preview-frame {
        min-height: 500px;
    }
}

@media (max-width: 620px) {
    .section-head { align-items: flex-start; }
    .section-head-actions { align-items: flex-end; flex-direction: column; }
    .section-head-actions .button { white-space: nowrap; }
    .client-modal { padding: 10px; }
    .client-modal-dialog { max-height: calc(100vh - 20px); overflow-y: auto; border-radius: 14px; }
    .client-asset-choices { grid-template-columns: 1fr; }
    .client-modal-actions { align-items: stretch; flex-direction: column-reverse; }
    .client-modal-actions .button { width: 100%; }
    .asset-tabs { width: 100%; }
    .company-computer-row { grid-template-columns: 10px minmax(0, 1fr) 18px; }
    .company-computer-row .status-badge { grid-column: 2; width: fit-content; }
    .computer-header-actions { width: 100%; }
    .computer-header-actions .button { flex: 1 1 150px; }
    .computer-metrics { grid-template-columns: 1fr; }
    .luigi-update-analysis-grid { grid-template-columns: 1fr; }
    .luigi-update-analysis-card > header, .luigi-update-analysis-card > footer { align-items: flex-start; flex-direction: column; }
    .luigi-update-analysis-card > footer .button, .luigi-update-actions, .luigi-update-actions form { width: 100%; }
    .computer-security-zone, .computer-danger-zone { align-items: stretch; flex-direction: column; }
    .computer-security-zone dl { justify-content: flex-start; }
    .computer-danger-zone form, .computer-danger-zone button { width: 100%; }
    .computer-delete-zone, .computer-delete-zone form { grid-template-columns: 1fr; }
    .project-form-card,
    .project-safety-card,
    .project-preview-card {
        padding: 16px;
        border-radius: 17px;
    }

    .project-preview-card > header {
        display: grid;
    }

    .project-preview-frame {
        min-height: 430px;
    }
    .saved-projects-head, .saved-project-card { align-items: stretch; flex-direction: column; }
    .project-browser-grid { grid-template-columns: 1fr; }
    .project-browser-grid nav { max-height: 180px; border-right: 0; border-bottom: 1px solid #1b3042; }
}
