.coffee-demo .inori-nav .mud-nav-link { max-width: 100%; margin-right: 8px; }
.coffee-demo .inori-nav .mud-nav-link-text { min-width: 0; white-space: normal; overflow-wrap: anywhere; letter-spacing: 0; }
.coffee-demo .mud-drawer-content { overflow-x: hidden; }
.coffee-demo .inori-nav .mud-nav-group .mud-nav-link { padding-right: 14px; }
.coffee-workspace { --coffee-green: #7165e8; --coffee-ink: #172033; --coffee-line: #e8ebf1; color: var(--coffee-ink); letter-spacing: 0; min-width: 0; }
.coffee-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 20px; }
.coffee-heading h1 { margin: 5px 0 0; font-size: 25px; font-weight: 650; letter-spacing: 0; line-height: 1.3; }
.coffee-site { color: #687386; font-size: 10px; font-weight: 700; letter-spacing: 0; }
.coffee-clock { display: flex; align-items: center; gap: 7px; white-space: nowrap; color: #687386; font-size: 12px; font-variant-numeric: tabular-nums; }
.coffee-clock i { width: 7px; height: 7px; border-radius: 50%; background: #7165e8; }
.coffee-toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; padding: 12px 0 18px; border-top: 1px solid var(--coffee-line); }
.coffee-workspace label { display: flex; flex-direction: column; gap: 5px; color: #687386; font-size: 11px; font-weight: 600; }
.coffee-workspace input, .coffee-workspace select { max-width: 100%; height: 36px; padding: 6px 10px; border: 1px solid #d8dde6; border-radius: 4px; color: #172033; background: #fff; font: inherit; font-size: 13px; }
.coffee-workspace input:focus, .coffee-workspace select:focus { outline: 2px solid #7165e8; outline-offset: 2px; }
.coffee-records { margin-left: auto; padding-bottom: 10px; color: #718079; font-size: 11px; }
.coffee-tabs { display: flex; flex-wrap: wrap; gap: 22px; border-bottom: 1px solid var(--coffee-line); margin-bottom: 20px; }
.coffee-tabs a { padding: 10px 0; font-size: 13px; font-weight: 600; color: #6e7c76; text-decoration: none; border-bottom: 2px solid transparent; }
.coffee-tabs a.active { color: #7165e8; border-color: #7165e8; }
.coffee-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--coffee-line); border-radius: 6px; background: #fff; margin-bottom: 20px; }
.coffee-metric { min-width: 0; padding: 20px; border-right: 1px solid var(--coffee-line); }
.coffee-metric:last-child { border: 0; }
.coffee-metric > span { font-size: 12px; color: #52675d; }
.coffee-metric strong { display: block; margin: 6px 0; font-size: 28px; line-height: 1.4; font-weight: 650; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.coffee-metric em { font-size: 12px; font-weight: 500; font-style: normal; color: #72837a; white-space: nowrap; }
.coffee-metric small { color: #7b8981; font-size: 10px; }
.coffee-plant { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 22px; }
.coffee-asset { display: flex; align-items: flex-start; gap: 8px; padding: 14px 10px; border: 1px solid var(--coffee-line); border-top: 3px solid #7165e8; border-radius: 4px; background: #fff; text-decoration: none; min-width: 0; }
.coffee-asset.warning { border-top-color: #d5a331; }
.coffee-asset.critical { border-top-color: #cc5151; }
.coffee-asset.muted { border-top-color: #9ea8a3; }
.coffee-asset > svg { width: 22px; height: 22px; color: #526e61; flex-shrink: 0; }
.coffee-asset > div { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.coffee-asset strong { font-size: 12px; line-height: 1.3; overflow-wrap: anywhere; }
.coffee-asset div > span:first-child { font-size: 10px; font-weight: 700; color: #78877f; }
.coffee-asset small { font-size: 11px; color: #60746a; }
.coffee-status { display: inline-flex; align-items: center; gap: 5px; padding: 3px 7px; border-radius: 3px; background: #e5f4ed; color: #22785a; font-size: 10px; font-weight: 600; width: fit-content; white-space: nowrap; }
.coffee-status::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.coffee-status.warning { background: #fff2cc; color: #946b11; }
.coffee-status.working { background: #e6eefb; color: #3c67a7; }
.coffee-status.critical { background: #fbe4e4; color: #b14343; }
.coffee-status.muted { background: #ecf0ee; color: #718079; }
.coffee-chart-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); border-top: 1px solid var(--coffee-line); border-bottom: 1px solid var(--coffee-line); background: #fff; margin-bottom: 32px; }
.coffee-chart-section { min-width: 0; padding: 18px 14px 24px; border-right: 1px solid var(--coffee-line); }
.coffee-workspace section header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.coffee-workspace h2 { margin: 0; font-size: 14px; font-weight: 650; letter-spacing: 0; overflow-wrap: anywhere; }
.coffee-chart-section header > span { font-size: 11px; color: #73847a; }
.coffee-chart { min-height: 400px; width: 100%; min-width: 0; padding-bottom: 32px; }
.coffee-detail .coffee-chart { min-height: 380px; }
.coffee-chart .mud-chart { width: 100%; max-width: 100%; height: auto; }
.coffee-chart .mud-chart-legend { flex-wrap: wrap; row-gap: 8px; padding-top: 16px; }
.coffee-donut { height: 190px; width: 100%; }
.coffee-donut .mud-chart { max-width: 100%; }
.coffee-energy-flow { display: grid; grid-template-columns: minmax(0, 1fr) 46px minmax(0, 1.5fr); align-items: center; gap: 22px; border-top: 1px solid var(--coffee-line); padding: 20px 0; margin-bottom: 8px; }
.coffee-vector-sources { display: grid; gap: 12px; }
.coffee-vector { display: flex; align-items: center; gap: 14px; padding: 16px; border-left: 3px solid #3d8cda; background: #eaf2fc; }
.coffee-vector.gas { border-color: #e39b24; background: #fcf3e5; }
.coffee-vector > svg { width: 28px; height: 28px; color: #3d8cda; }
.coffee-vector.gas > svg { color: #d58d1d; }
.coffee-vector span { display: block; color: #687386; font-size: 11px; }
.coffee-vector strong { display: block; margin-top: 4px; font-size: 23px; font-weight: 650; }
.coffee-vector small { font-size: 12px; color: #687386; font-weight: 500; }
.coffee-flow-arrow { color: #aeb8c9; }
.coffee-flow-consumers h2 { margin-bottom: 12px; }
.coffee-flow-consumers > div { display: flex; justify-content: space-between; gap: 14px; padding: 10px 0; font-size: 12px; border-bottom: 1px solid var(--coffee-line); }
.coffee-flow-consumers strong { font-variant-numeric: tabular-nums; white-space: nowrap; }
.coffee-integration-table { border: 0; border-radius: 0; }
.coffee-breakdown { min-width: 0; padding: 18px 22px; }
.coffee-bar-row { margin: 20px 0; }
.coffee-bar-row > div:first-child { display: flex; align-items: start; justify-content: space-between; gap: 10px; font-size: 11px; margin-bottom: 7px; }
.coffee-bar-row strong { font-weight: 500; }
.coffee-bar-row span { white-space: nowrap; color: #5c6e62; font-variant-numeric: tabular-nums; }
.coffee-bar-track { height: 6px; background: #eeecfa; }
.coffee-bar-track i { display: block; height: 100%; background: #7165e8; }
.coffee-bar-row:nth-child(3n) i { background: #2c7bd1; }
.coffee-bar-row:nth-child(3n + 1) i { background: #dca033; }
.coffee-breakdown-total { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; border-top: 1px solid var(--coffee-line); padding-top: 15px; font-size: 11px; }
.coffee-table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--coffee-line); border-radius: 4px; background: #fff; }
.coffee-table { width: 100%; border-collapse: collapse; font-size: 12px; text-align: left; }
.coffee-table th { background: #f5f6fa; color: #687386; font-size: 10px; font-weight: 650; padding: 12px 14px; white-space: nowrap; }
.coffee-table td { padding: 13px 14px; border-top: 1px solid #e6ece8; white-space: nowrap; font-variant-numeric: tabular-nums; }
.coffee-table td strong { font-weight: 550; }
.coffee-table td small { display: block; color: #7b897f; font-size: 10px; margin-top: 4px; }
.coffee-table tr.selected, .coffee-table tbody tr:hover { background: #f1effb; }
.coffee-table td svg { vertical-align: middle; }
.coffee-link { display: inline-flex; align-items: center; gap: 7px; color: #7165e8; text-decoration: none; font: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.coffee-alerts { padding-top: 24px; }
.coffee-alerts header a { display: flex; align-items: center; gap: 6px; font-size: 11px; color: #7165e8; text-decoration: none; }
.coffee-alert { display: flex; align-items: center; gap: 14px; border-top: 1px solid #e0e7e2; padding: 13px 0; font-size: 12px; text-decoration: none; }
.coffee-alert > svg { color: #c49625; flex-shrink: 0; }
.coffee-alert > span:nth-last-child(1) { margin-left: auto; }
.coffee-ticket-tools, .coffee-device-controls { display: flex; align-items: end; flex-wrap: wrap; gap: 16px; padding-bottom: 18px; }
.coffee-ticket-tools input { width: 290px; }
.coffee-detail { padding: 24px 0; margin-top: 18px; border-top: 2px solid #7165e8; }
.coffee-detail header > div > span { color: #75867c; font-size: 11px; display: block; margin-bottom: 5px; }
.coffee-ticket-timeline p { border-left: 2px solid #b9d8c9; padding: 9px 18px; margin: 0; font-size: 12px; }
.coffee-ticket-timeline b { margin-right: 12px; color: #637b6b; }
.coffee-ticket-timeline { margin-bottom: 20px; }
.coffee-device-controls > span { font-size: 11px; color: #7b8981; padding-bottom: 10px; }
.coffee-module-links { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--coffee-line); margin-top: 20px; gap: 10px; }
.coffee-module-links a { display: flex; align-items: center; gap: 8px; text-decoration: none; font-size: 12px; padding: 20px 0; color: #7165e8; }
.coffee-integration-summary { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; margin-bottom: 20px; font-size: 12px; }
.coffee-integration-summary .mud-button-root { margin-left: auto; }
.coffee-empty { padding: 50px 15px; color: #74847a; text-align: center; }
.coffee-muted { color: #718479; font-size: 12px; }
.coffee-export { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 20px; }
.iems-chart-stack { background: #fff; border-top: 1px solid #e8ebf1; margin-bottom: 32px; }
.iems-chart-section { min-width: 0; padding: 18px 16px 24px; border-bottom: 1px solid #e8ebf1; background: #fff; }
.iems-chart-section .coffee-chart { min-height: 285px; padding-bottom: 24px; }
.iems-chart-stack .iems-chart-section:nth-child(-n+2) .coffee-chart { min-height: 270px; }
.iems-bms-charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin-bottom: 32px; }
.iems-bms-charts .iems-chart-section:first-child { border-right: 1px solid #e8ebf1; }
.iems-bms-charts .coffee-chart { min-height: 320px; }
.iems-balance { border-top: 1px solid #e8ebf1; border-bottom: 1px solid #e8ebf1; padding: 18px 0; margin-bottom: 24px; }
.iems-balance header span, .iems-billing header span, .iems-hourly header span { font-size: 11px; color: #687386; }
.iems-balance-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.iems-balance-grid span { display: block; color: #687386; font-size: 11px; }
.iems-balance-grid strong { display: block; margin-top: 6px; font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
.iems-billing, .iems-hourly { padding-bottom: 26px; }
.iems-total td { font-weight: 650; background: #f5f6fa; }
.iems-tariffs { display: flex; flex-wrap: wrap; gap: 18px; padding-top: 12px; font-size: 11px; color: #687386; }
@media (max-width: 900px) {
    .iems-bms-charts { grid-template-columns: minmax(0, 1fr); }
    .iems-bms-charts .iems-chart-section:first-child { border-right: 0; }
    .iems-balance-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .iems-chart-section { padding: 16px 8px 24px; }
}
.coffee-login { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: #f5f6fa; }
.coffee-login-form { width: min(420px, 100%); display: flex; flex-direction: column; gap: 10px; padding: 36px; border: 1px solid #e8ebf1; border-radius: 8px; background: #fff; box-shadow: 0 12px 40px rgba(16, 24, 38, .06); }
.coffee-login-form img { object-fit: contain; align-self: center; }
.coffee-login-form h1 { font-size: 28px; margin: 8px 0 0; color: #172033; text-align: center; letter-spacing: 0; }
.coffee-login-form > p { font-size: 13px; color: #687386; margin: 0 0 18px; text-align: center; }
.coffee-login-form label { font-size: 12px; color: #687386; margin-top: 4px; }
.coffee-login-form input { width: 100%; min-width: 0; height: 44px; padding: 10px 12px; border: 1px solid #d8dde6; border-radius: 4px; background: #fff; color: #172033; font: inherit; font-size: 14px; }
.coffee-login-form input:focus { outline: 2px solid #7165e8; outline-offset: 2px; }
.coffee-login-form button { margin-top: 14px; min-height: 44px; padding: 12px; background: #7165e8; color: #fff; border: 0; border-radius: 4px; cursor: pointer; font: inherit; font-size: 14px; font-weight: 600; }
.coffee-login-form p[role=alert] { color: #a63939; margin: 0; }
@media (max-width: 959px) {
    .coffee-demo .app-drawer.mud-drawer-responsive { top: 64px; height: calc(100dvh - 64px); }
    .coffee-demo .app-drawer.mud-drawer-responsive.mud-drawer--open { display: flex; }
    .coffee-demo .mud-drawer-overlay { inset: 64px 0 0; height: calc(100dvh - 64px); }
    .coffee-demo .app-bar { z-index: 1301; }
}
@media (max-width: 1200px) { .coffee-plant { grid-template-columns: repeat(3, minmax(0, 1fr)); } .coffee-metric { padding: 15px 12px; } .coffee-metric strong { font-size: 23px; } }
@media (max-width: 700px) {
    .coffee-bar-chart .mud-charts-xaxis text:not(:nth-child(4n + 1)) { display: none; }
    .coffee-chart:not(.coffee-bar-chart) .mud-charts-xaxis text:nth-child(even) { display: none; }
    .coffee-heading { flex-direction: column; align-items: start; gap: 10px; }
    .coffee-heading h1 { font-size: 22px; }
    .coffee-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .coffee-metric { border-bottom: 1px solid var(--coffee-line); }
    .coffee-metric:nth-child(2) { border-right: 0; }
    .coffee-metric:nth-child(3), .coffee-metric:nth-child(4) { border-bottom: 0; }
    .coffee-plant { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .coffee-asset { padding: 12px 9px; }
    .coffee-chart-grid { grid-template-columns: minmax(0, 1fr); }
    .coffee-energy-flow { grid-template-columns: minmax(0, 1fr); gap: 14px; }
    .coffee-vector-sources { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .coffee-vector { padding: 12px 8px; gap: 6px; }
    .coffee-vector > svg { width: 22px; height: 22px; }
    .coffee-vector strong { font-size: 20px; }
    .coffee-flow-arrow { display: none; }
    .coffee-chart-section { border-right: 0; border-bottom: 1px solid var(--coffee-line); padding: 16px 0; }
    .coffee-tabs { gap: 15px; }
    .coffee-tabs a { font-size: 12px; }
    .coffee-records { margin-left: 0; }
    .coffee-toolbar { gap: 10px; }
    .coffee-toolbar label:first-child { width: 100%; }
    .coffee-toolbar label:nth-child(2), .coffee-toolbar label:nth-child(3) { width: calc(50% - 5px); }
    .coffee-alert { flex-wrap: wrap; gap: 8px; }
    .coffee-alert > span:nth-last-child(1) { margin-left: 0; }
    .coffee-module-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .coffee-ticket-tools label, .coffee-ticket-tools input { width: 100%; }
}