* {
    box-sizing: border-box;
}

:root {
    /* Kaynak/modul kimlik renkleri (Elektrik / Dogal Gaz / Su). Deger olarak
       AceXTheme.CustomColors.Status (Error/Warning/Info) ile birebir ayniysa
       da bu token'lar anlam olarak farkli: "hata/uyari/bilgi" degil "hangi
       kaynak" sorusuna cevap verir. Boylece MudStepper'in Color enum'uyla
       calisan current-step halkasi ile CSS degiskenleriyle boyanan buton/kart
       arka planlari ayni tonu kullanir. --acex-mod-* onceden sadece Home
       Dashboard'da (HomeDashboardWorkspace.razor.css) referans alinip hic
       tanimlanmamisti; asil tanimlar burada. */
    --acex-mod-electricity: #8E44AD;
    --acex-mod-electricity-hover: color-mix(in srgb, var(--acex-mod-electricity) 12%, transparent);
    --acex-mod-electricity-darken: color-mix(in srgb, var(--acex-mod-electricity) 85%, black);
    --acex-mod-electricity-lighten: color-mix(in srgb, var(--acex-mod-electricity) 85%, white);
    --acex-mod-electricity-text: #ffffff;
    --acex-mod-gas: #F3C200;
    --acex-mod-gas-hover: color-mix(in srgb, var(--acex-mod-gas) 12%, transparent);
    --acex-mod-gas-darken: color-mix(in srgb, var(--acex-mod-gas) 85%, black);
    --acex-mod-gas-lighten: color-mix(in srgb, var(--acex-mod-gas) 85%, white);
    --acex-mod-gas-text: #ffffff;
    --acex-mod-water: #418bca;
    --acex-mod-water-hover: color-mix(in srgb, var(--acex-mod-water) 12%, transparent);
    --acex-mod-water-darken: color-mix(in srgb, var(--acex-mod-water) 85%, black);
    --acex-mod-water-lighten: color-mix(in srgb, var(--acex-mod-water) 85%, white);
    --acex-mod-water-text: #ffffff;
}

html {
    /* Eskiden "light" idi: tarayıcı seviyesinde açık modu KİLİTLİYORDU. Form
       denetimleri, kaydırma çubukları ve otomatik doldurma koyu temada da açık
       kalıyordu — koyu temanın çalışmamasının bir sebebi buydu. */
    color-scheme: light dark;

    /* Eskiden "Segoe UI" yazılıydı. Tema Montserrat diyor, fonts-montserrat.css
       yükleniyor, ama bu satır MudBlazor tipografisinin DIŞINDA kalan her şeyi
       (düz div, span, tablo, eski EasyUI yüzeyleri) Segoe UI'ya zorluyordu.
       Uygulamada beş rakip font yığını olmasının asıl sebebi buydu.
       Artık jetondan geliyor → tek merkez CustomTypography.cs. */
    font-family: var(--acex-font);
}

/* Uygulama zemini TEK olmali.
   MudBlazor .mud-layout'a --mud-palette-background-grey veriyor; bu, temanin
   Background renginden bir tik koyu IKINCI bir gri. Sonuc: sayfa zemini
   tasarlanan tuval renginden farkli cikiyordu. Ana icerik alani artik temanin
   kendi zemin jetonunu kullaniyor (AceXTheme.PaletteLight.Background).

   Yalnizca .mud-main-content hedefleniyor; .mud-layout'a dokunulmuyor cunku
   giris ekrani (.auth-page) kendi arka plan gorselini o elemana veriyor. */
.mud-main-content {
    background-color: var(--acex-canvas);
}

body {
    margin: 0;
    /* Eskiden #17202a sabitiydi — temanın metin renginden (#0f172a) farklı bir
       tondu ve koyu temada dönmüyordu. */
    color: var(--acex-text);
}

.auth-page {
    min-height: 100vh;
    background:
        linear-gradient(rgba(255, 255, 255, .6), rgba(255, 255, 255, .6)),
        url("img/bg1.png") center / cover no-repeat;
}

.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.auth-paper {
    width: 100%;
    background-color: rgba(255, 255, 255, .6) !important;
}

.auth-inline-login {
    width: min(100%, 520px);
    margin: 0 auto;
    padding: 32px 0;
}

button:not(.mud-button-root):not(.mud-icon-button):disabled {
    cursor: progress;
    opacity: .72;
}

button.danger-button {
    min-height: 34px;
    border: 1px solid var(--acex-error);
    border-radius: 6px;
    background: var(--acex-error);
    color: var(--acex-text-on-brand);
    font-weight: var(--acex-weight-semibold);
    padding: 0 12px;
}

.text-link {
    color: var(--acex-brand);
    font-weight: var(--acex-weight-bold);
    text-decoration: none;
}

.app-shell {
    width: min(1120px, calc(100vw - 32px));
    margin: 0 auto;
    padding: 32px 0;
}

.shell-header,
.auth-layout,
.status-panel,
.session-summary {
    background: white;
    border: 1px solid var(--acex-line);
    border-radius: 8px;
}

.shell-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 24px;
}

.eyebrow {
    margin: 0 0 6px;
    color: var(--acex-text-muted);
    font-size: var(--acex-text-sm);
    font-weight: var(--acex-weight-bold);
    letter-spacing: .04em;
    text-transform: uppercase;
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 0;
    font-size: var(--acex-text-3xl);
}

.auth-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
    gap: 32px;
    margin-top: 16px;
    padding: 24px;
}

.login-panel,
.field {
    display: grid;
    gap: 10px;
}

.login-panel {
    gap: 18px;
}

.login-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 6px;
}

.login-logo img {
    width: auto;
    max-width: 100%;
    height: 200px;
    object-fit: contain;
}

.login-title {
    margin: 0;
}

.google-captcha-host {
    min-height: 78px;
}

.login-security-alert {
    border-radius: 6px;
}

.login-countdown {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--acex-text-muted);
    font-weight: var(--acex-weight-bold);
}

.field {
    margin-bottom: 16px;
}

label:not(.mud-input-label):not(.mud-checkbox-label) {
    color: var(--acex-text-muted);
    font-size: var(--acex-text-md);
    font-weight: var(--acex-weight-semibold);
}



.form-error {
    color: var(--acex-error);
    font-weight: var(--acex-weight-semibold);
}

.session-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 16px;
    padding: 18px 24px;
}

.session-summary span {
    display: block;
    color: var(--acex-text-muted);
    font-size: var(--acex-text-sm);
    font-weight: var(--acex-weight-bold);
    text-transform: uppercase;
}

.status-panel {
    margin-top: 16px;
    padding: 24px;
}

.panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.route-list,
.health-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.route-list span,
.route-list code,
.health {
    border-radius: 999px;
    background: var(--acex-sunken);
    padding: 7px 10px;
}

.health.healthy {
    background: var(--acex-success-soft);
    color: var(--acex-success);
}

.health.unreachable,
.health.unhealthy {
    background: var(--acex-error-soft);
    color: var(--acex-error);
}

.module-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin-top: 16px;
}

.module-card {
    display: grid;
    gap: 8px;
    min-height: 112px;
    border: 1px solid var(--acex-line);
    border-radius: 8px;
    background: white;
    color: inherit;
    padding: 18px;
    text-decoration: none;
}

.module-card span {
    font-size: var(--acex-text-lg);
    font-weight: var(--acex-weight-bold);
}

.module-card small {
    color: var(--acex-text-muted);
    line-height: 1.45;
}

.module-card.disabled {
    color: var(--acex-text-faint);
    pointer-events: none;
}

.data-table-wrap {
    margin-top: 16px;
    overflow-x: auto;
}

.tab-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 18px 0;
}

.tab-button {
    min-height: 36px;
    border: 1px solid var(--acex-line);
    border-radius: 6px;
    background: var(--acex-sunken);
    color: var(--acex-text);
    font-weight: var(--acex-weight-semibold);
    padding: 0 12px;
}

.tab-button.active {
    border-color: var(--acex-brand);
    background: var(--acex-brand);
    color: var(--mud-palette-primary-text, #ffffff);
}

.definition-grid {
    display: grid;
    grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.definition-form {
    display: grid;
    gap: 12px;
    border: 1px solid var(--acex-line);
    border-radius: 8px;
    padding: 16px;
}

.definition-form h3 {
    margin: 0;
    font-size: var(--acex-text-lg);
}

.definition-form label {
    display: grid;
    gap: 6px;
}

.definition-form .check-field {
    display: flex;
    align-items: center;
    gap: 8px;
}

.definition-form .check-field input {
    min-height: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
}

.data-table th,
.data-table td {
    border-bottom: 1px solid var(--acex-line);
    padding: 10px 8px;
    text-align: left;
}

.data-table th {
    color: var(--acex-text-muted);
    font-size: var(--acex-text-sm);
    text-transform: uppercase;
}

.legacy-layout {
    display: grid;
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
    gap: 18px;
    margin-top: 18px;
}

.legacy-nav {
    display: grid;
    gap: 6px;
    align-content: start;
}

.legacy-nav-link {
    border: 1px solid var(--acex-line);
    border-radius: 6px;
    color: var(--acex-text);
    padding: 10px 12px;
    text-decoration: none;
}

.legacy-nav-link.active {
    border-color: var(--acex-accent);
    background: var(--acex-accent);
    color: var(--mud-palette-drawer-text);
    font-weight: var(--acex-weight-bold);
}

.legacy-content {
    border: 1px solid var(--acex-line);
    border-radius: 8px;
    padding: 18px;
}

.legacy-content h3 {
    margin-top: 0;
}

.legacy-facts {
    display: grid;
    gap: 10px;
    margin: 16px 0 0;
}

.legacy-facts div {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 12px;
}

.legacy-facts dt {
    color: var(--acex-text-muted);
    font-weight: var(--acex-weight-bold);
}

.legacy-facts dd {
    margin: 0;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid var(--acex-success);
}

.invalid {
    outline: 1px solid var(--acex-error);
}

.validation-message {
    color: var(--acex-error);
}

.alarm-level-chip {
    border-radius: 999px;
    color: white;
    display: inline-flex;
    font-size: var(--acex-text-xs);
    font-weight: var(--acex-weight-bold);
    line-height: 1;
    min-width: 58px;
    padding: 7px 10px;
    text-align: center;
}

.alarm-level-1 {
    background: var(--acex-alarm-1);
}

.alarm-level-2 {
    background: var(--acex-alarm-2);
    color: var(--acex-alarm-2-text);
}

.alarm-level-3 {
    background: var(--acex-alarm-3);
}

.alarm-level-4,
.alarm-level-critical {
    background: var(--acex-alarm-4);
}

.alarm-recent {
    animation: alarm-blink 1s infinite;
}

@keyframes alarm-blink {
    0%,
    100% {
        filter: brightness(1);
    }

    50% {
        filter: brightness(1.32);
    }
}

.blazor-error-boundary {
    background: var(--acex-error);
    color: white;
    padding: 1rem;
}

#blazor-error-ui {
    display: none;
}

.acex-advanced-search.mud-expand-panel {
    border: 1px solid var(--acex-line) !important;
    border-radius: var(--mud-default-borderradius, 5px) !important;
    margin: 0 0 10px !important;
    padding: 0 !important;
}

.acex-advanced-search > .mud-expand-panel-header {
    min-height: 38px !important;
    padding: 4px 10px !important;
    font-size: var(--acex-text-md) !important;
    font-style: normal !important;
    font-weight: var(--acex-weight-semibold) !important;
    line-height: 1.35 !important;
}

.acex-advanced-search .mud-expand-panel-content {
    padding: 6px 10px 10px !important;
}

.acex-advanced-search-layout {
    margin: 0 !important;
}

.acex-advanced-search-layout > .mud-grid-item,
.acex-advanced-search-content > .mud-grid > .mud-grid-item,
.acex-advanced-search-content .acex-legacy-filter-grid > .mud-grid-item,
.acex-advanced-search-content .acex-indexlist-filter-grid > .mud-grid-item {
    padding: 6px !important;
}

.acex-advanced-search-query,
.acex-advanced-search-columns,
.acex-advanced-search-content {
    padding: 4px 6px !important;
}

.acex-advanced-search-content {
    padding-top: 2px !important;
}

.acex-advanced-search .mud-input-control {
    width: 100% !important;
    margin: 0 0 2px !important;
}

.acex-advanced-search .mud-input-control-input-container {
    min-height: 38px !important;
}

.acex-advanced-search .mud-input-control > .mud-input-control-input-container > .mud-input {
    min-height: 38px !important;
}

.acex-advanced-search .mud-input,
.acex-advanced-search .mud-input-root,
.acex-advanced-search .mud-input-slot,
.acex-advanced-search input,
.acex-advanced-search textarea,
.acex-advanced-search .mud-select-input {

    font-size: var(--acex-text-md) !important;
    font-style: normal !important;
    font-weight: var(--acex-weight-regular) !important;
    line-height: 1.35 !important;
}

.acex-advanced-search .mud-input-root-outlined,
.acex-advanced-search .mud-input-outlined,
.acex-advanced-search .mud-input-root-filled,
.acex-advanced-search .mud-input-filled {
    min-height: 38px !important;
}

.acex-advanced-search .mud-input-label,
.acex-advanced-search .mud-select .mud-input-label,
.acex-advanced-search .mud-picker .mud-input-label {
    font-size: var(--acex-text-sm) !important;
    font-style: normal !important;
    font-weight: var(--acex-weight-regular) !important;
}

.acex-advanced-search .mud-input-adornment {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.acex-advanced-search .mud-input-adornment .mud-icon-root,
.acex-advanced-search .mud-icon-button .mud-icon-root {
    font-size: 1.125rem !important;
}

.acex-advanced-search .mud-button-root {
    min-width: 34px !important;
    min-height: 34px !important;
    margin: 0 !important;
    padding: 4px 12px !important;
    font-size: var(--acex-text-sm) !important;
    font-style: normal !important;
    font-weight: var(--acex-weight-medium) !important;
    line-height: 1.2 !important;
    letter-spacing: 0 !important;
}

.acex-advanced-search .mud-icon-button {
    width: 34px !important;
    height: 34px !important;
    padding: 5px !important;
}

.acex-advanced-search .mud-checkbox {
    min-height: 30px !important;
    margin: 0 10px 0 0 !important;
}

.acex-advanced-search .mud-checkbox .mud-button-root {
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    min-height: 30px !important;
    padding: 4px !important;
}

.acex-advanced-search .mud-checkbox .mud-typography {
    margin-left: 3px !important;
    font-size: var(--acex-text-md) !important;
    font-style: normal !important;
    font-weight: var(--acex-weight-regular) !important;
    line-height: 1.2 !important;
}

.acex-advanced-search .mud-stack {
    gap: 6px !important;
}

.acex-advanced-search .mud-paper.pa-2 {
    padding: 8px !important;
}

.acex-advanced-search .mud-treeview {
    max-height: 160px !important;
    overflow: auto !important;
    font-size: var(--acex-text-sm) !important;
}

.acex-advanced-search .mud-treeview-item,
.acex-advanced-search .mud-treeview-item-content {
    min-height: 30px !important;
    padding-top: 2px !important;
    padding-bottom: 2px !important;
}

.acex-advanced-search .mud-treeview-item-label {
    font-size: var(--acex-text-sm) !important;
}

.acex-advanced-search .mud-chip {
    height: 28px !important;
    font-size: var(--acex-text-sm) !important;
}

body:has(.acex-advanced-search .mud-select-input[aria-expanded="true"])
    .mud-popover .mud-list-item[role="option"] {
    min-height: 36px !important;
    padding-top: 6px !important;
    padding-bottom: 6px !important;
    font-size: var(--acex-text-md) !important;
    font-style: normal !important;
    font-weight: var(--acex-weight-regular) !important;
}

.acex-advanced-search .gap-2 {
    gap: 8px !important;
}

.acex-column-filter.mud-expand-panel {
    border: 1px solid var(--acex-line) !important;
    border-radius: 6px !important;
    box-shadow: none !important;
    margin: 0 !important;
}

.acex-column-filter > .mud-expand-panel-header {
    min-height: 36px !important;
    padding: 4px 8px !important;
    font-size: var(--acex-text-md) !important;
    font-weight: var(--acex-weight-medium) !important;
}

.acex-column-filter .mud-expand-panel-content {
    padding: 6px 8px 8px !important;
}

.acex-column-filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 8px;
    margin-top: 4px;
}

.acex-table-view-tabs {
    display: flex;
    align-items: center;
    gap: 22px;
    min-height: 40px;
    margin: 0 0 0 !important;
    padding: 0 12px;
    border: 1px solid var(--acex-line);
    border-bottom: 0;
    border-radius: 6px 6px 0 0;
    background: var(--acex-surface);
}

.acex-table-view-tab.mud-button-root {
    min-width: 112px !important;
    min-height: 40px !important;
    border-radius: 0 !important;
    border-bottom: 3px solid transparent !important;
    color: var(--acex-text-muted) !important;
    font-size: var(--acex-text-sm) !important;
    font-weight: var(--acex-weight-medium) !important;
    letter-spacing: 0 !important;
}

.acex-table-view-tab.active.mud-button-root {
    border-bottom-color: var(--acex-brand) !important;
    color: var(--acex-brand) !important;
}

.acex-table-view-tab .mud-icon-root {
    font-size: 1.25rem !important;
}

.acex-legacy-filter-grid .mud-grid-item {
    padding-top: 6px !important;
}

.acex-legacy-filter-grid .mud-input-control {
    margin-top: 0 !important;
}

.acex-advanced-search-content > .mud-grid,
.acex-advanced-search-content .acex-legacy-filter-grid {
    margin: 0 !important;
}

.acex-advanced-search-content > .mud-grid > .mud-grid-item,
.acex-advanced-search-content .acex-legacy-filter-grid > .mud-grid-item {
    padding-top: 5px !important;
    padding-bottom: 5px !important;
}

.acex-advanced-search-content .mud-input-control {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.acex-advanced-search-content .mud-input-outlined .mud-input-outlined-border {
    display: none !important;
}

.acex-advanced-search-content .mud-input-outlined:focus-within .mud-input-outlined-border {
    display: none !important;
}

.acex-advanced-search-content .mud-input-root-outlined {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.acex-advanced-search-content .mud-input-outlined {
    border-radius: 0 !important;
    box-shadow: inset 0 -1px 0 var(--acex-line, var(--acex-line, rgba(0, 0, 0, 0.32))) !important;
}

.acex-advanced-search-content .mud-input-outlined:hover {
    box-shadow: inset 0 -1px 0 var(--acex-text, rgba(0, 0, 0, 0.87)) !important;
}

.acex-advanced-search-content .mud-input-control:focus-within .mud-input-outlined {
    box-shadow: inset 0 -2px 0 var(--acex-brand, #2196f3) !important;
}

.acex-advanced-search-content .mud-input-label,
.acex-advanced-search-content .mud-select .mud-input-label {
    font-size: var(--acex-text-sm) !important;
}

.acex-advanced-search-actions {
    padding: 4px 6px 2px !important;
}

.acex-advanced-search-actions .mud-button-root {
    text-transform: uppercase;
    letter-spacing: .02em;
}

.tableFiltrePanel > .mud-expand-panel-header {
    padding: 1px 5px !important;
    min-height: 28px !important;
}

.acex-entity-table-legacy-toolbar-hidden .mud-table-toolbar {
    display: none !important;
}

.acex-table-view-tabs + .acex-entity-table.mud-table,
.acex-table-view-tabs + .acex-entity-table-legacy-toolbar-hidden.mud-table {
    margin-top: 0 !important;
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
}

@media (max-width: 959px) {
    .acex-advanced-search-query,
    .acex-advanced-search-columns {
        padding-right: 2px !important;
        padding-left: 2px !important;
    }

    .acex-advanced-search-content > .mud-grid > .mud-grid-item,
    .acex-advanced-search-content .acex-legacy-filter-grid > .mud-grid-item,
    .acex-advanced-search-content .acex-indexlist-filter-grid > .mud-grid-item {
        padding: 4px !important;
    }
}

.acex-dashboard-panel {
    border: 0 !important;
    border-radius: 6px !important;
    box-shadow: var(--acex-shadow-2) !important;
}

.acex-entity-table.mud-table {
    padding: 1px 10px !important;
    border: 1px solid var(--acex-line) !important;
    border-radius: 6px !important;
    overflow: hidden !important;
}

.acex-entity-table .mud-table-toolbar {
    min-height: 42px !important;
    height: auto !important;
    margin-bottom: 0 !important;
    padding: 6px 8px !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    border-bottom: 1px solid var(--acex-line);
    background: var(--acex-surface);
}

.acex-entity-table .mud-toolbar-gutters {
    padding-right: 8px !important;
    padding-left: 8px !important;
}

.acex-entity-table .mud-table-container {
    overflow: auto !important;
}

.acex-entity-table .mud-table-head .mud-table-cell {
    min-height: 30px !important;
    padding: 7px 6px !important;
    font-size: var(--acex-text-2xs) !important;
    font-weight: var(--acex-weight-bold) !important;
    line-height: 1.23 !important;
    white-space: nowrap !important;
    vertical-align: middle !important;
    background: var(--acex-sunken) !important;
}

.acex-entity-table .mud-table-body .mud-table-cell {
    padding: 6px 6px !important;
    font-size: var(--acex-text-2xs) !important;
    line-height: 1.23 !important;
    vertical-align: middle !important;
}

.acex-entity-table .mud-table-cell a,
.acex-entity-table .mud-table-cell .mud-typography,
.acex-entity-table .mud-table-cell .mud-highlighted,
.acex-entity-table .mud-table-cell .mud-highlighter {
    font-size: var(--acex-text-2xs) !important;
    line-height: 1.23 !important;
}

.acex-entity-table .mud-table-row {
    height: auto !important;
    min-height: 30px !important;
}

.acex-entity-table .mud-table-pagination {
    min-height: 38px !important;
    padding: 0 8px !important;
    border-top: 1px solid var(--acex-line);
}

.acex-entity-table .mud-table-pagination-toolbar {
    min-height: 38px !important;
    height: 38px !important;
}

.acex-entity-table .mud-button-root {
    letter-spacing: 0 !important;
}

.acex-entity-table .mud-icon-button {
    width: 32px !important;
    height: 32px !important;
    padding: 4px !important;
}

.acex-entity-table .mud-icon-button .mud-icon-root {
    font-size: 1.15rem !important;
}

.acex-entity-table .mud-table-cell .mud-checkbox,
.acex-entity-table .mud-table-cell .mud-checkbox .mud-button-root {
    min-width: 26px !important;
    min-height: 26px !important;
}

.acex-entity-table .mud-table-cell .mud-checkbox .mud-button-root {
    width: 26px !important;
    height: 26px !important;
    padding: 3px !important;
}

.acex-entity-table .acex-table-action-cell {
    box-shadow: -1px 0 0 var(--acex-line);
}

@media (max-width: 720px) {
    .auth-container {
        padding-top: 24px;
        padding-bottom: 24px;
    }

    .login-logo img {
        height: 170px;
    }

    .shell-header,
    .auth-layout,
    .session-summary {
        grid-template-columns: 1fr;
    }

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

    .definition-grid {
        grid-template-columns: 1fr;
    }

    .legacy-layout,
    .legacy-facts div {
        grid-template-columns: 1fr;
    }
}

/* Legacy table/filter density. Scoped to EntityTable advanced search surfaces. */
.acex-advanced-search .mud-expand-panel-header {
    min-height: 28px !important;
    padding: 2px 8px !important;
}

.acex-advanced-search .mud-expand-panel-text {
    font-size: var(--acex-text-2xs) !important;
    font-weight: var(--acex-weight-bold) !important;
    line-height: 1.23 !important;
}

.acex-advanced-search .mud-expand-panel-content {
    padding: 4px 10px 8px !important;
}

.acex-advanced-search-content .mud-input-control-input-container {
    align-items: stretch !important;
    display: flex !important;
    flex-direction: column !important;
    min-height: 46px !important;
}

.acex-advanced-search-content .mud-input,
.acex-advanced-search-content .mud-input-root,
.acex-advanced-search-content .mud-input-slot,
.acex-advanced-search-content .mud-select-input,
.acex-advanced-search-content input {
    min-height: 2px !important;
    font-size: var(--acex-text-md) !important;
    line-height: 1.25 !important;
}

.acex-advanced-search-content .mud-input,
.acex-advanced-search-content .mud-input-outlined,
.acex-advanced-search-content .mud-input-filled {
    background: transparent !important;
    border-radius: 0 !important;
    box-shadow: inset 0 -1px 0 var(--acex-line, rgba(0, 0, 0, .54)) !important;
    padding: 0 !important;
}

.acex-advanced-search-content .mud-input:hover,
.acex-advanced-search-content .mud-input-outlined:hover,
.acex-advanced-search-content .mud-input-filled:hover {
    box-shadow: inset 0 -1px 0 var(--acex-text, rgba(0, 0, 0, .87)) !important;
}

.acex-advanced-search-content .mud-input-control:focus-within .mud-input,
.acex-advanced-search-content .mud-input-control:focus-within .mud-input-outlined,
.acex-advanced-search-content .mud-input-control:focus-within .mud-input-filled {
    box-shadow: inset 0 -2px 0 var(--acex-brand, #2196f3) !important;
}

.acex-advanced-search-content .mud-select .mud-input-root,
.acex-advanced-search-content .mud-select .mud-input-slot,
.acex-advanced-search-content .mud-select input,
.acex-advanced-search-content .mud-select .mud-select-input:not(.mud-input) {
    box-shadow: none !important;
}

.acex-advanced-search-content .mud-input-outlined-border,
.acex-advanced-search-content .mud-input:before,
.acex-advanced-search-content .mud-input:after,
.acex-advanced-search-content .mud-input-underline:before,
.acex-advanced-search-content .mud-input-underline:after,
.acex-advanced-search-content .mud-input-filled:before,
.acex-advanced-search-content .mud-input-filled:after {
    display: none !important;
}

.acex-advanced-search-content .mud-input-adornment {
    height: 28px !important;
    margin: 0 !important;
}

.acex-column-filter.mud-expand-panel {
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.acex-column-filter > .mud-expand-panel-header {
    border-bottom: 1px solid var(--acex-line, rgba(0, 0, 0, .54));
    min-height: 28px !important;
    padding: 1px 4px !important;
}

.acex-column-filter .mud-expand-panel-content {
    padding: 5px 0 2px !important;
}

.acex-legacy-filter-grid > .mud-grid-item {
    padding-bottom: 4px !important;
    padding-top: 4px !important;
}

.acex-entity-table.mud-table {
    padding: 1px 10px !important;
}

.acex-entity-table .mud-table-toolbar {
    min-height: 36px !important;
    padding: 4px 8px !important;
}

.acex-entity-table .mud-table-head .mud-table-cell,
.acex-entity-table .mud-table-body .mud-table-cell,
.acex-entity-table .mud-table-cell a,
.acex-entity-table .mud-table-cell .mud-typography,
.acex-entity-table .mud-table-cell .mud-highlighted,
.acex-entity-table .mud-table-cell .mud-highlighter {
    font-size: var(--acex-text-2xs) !important;
    line-height: 1.23 !important;
}

.acex-entity-table .mud-table-head .mud-table-cell {
    min-height: 30px !important;
    padding: 7px 6px !important;
}

.acex-entity-table .mud-table-body .mud-table-cell {
    padding: 6px !important;
}

.acex-entity-table .mud-table-row {
    height: auto !important;
    min-height: 30px !important;
}

/* ==========================================================================
   Legacy ACEX.Enerya SPA Styles (ported from fsh.css + StyleSheet.css)
   ========================================================================== */

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 2px !important;
    height: 6px !important;
}

/* --- Button Shadow --- */
.mud-button-filled {
    /* !important gerekli: MudBlazor gölgeyi .mud-elevation-* üzerinden veriyor,
       hangi kademe olduğu bileşene göre değişiyor. Değer merkezi ölçekten. */
    box-shadow: var(--acex-shadow-1) !important;
}

/* --- Dialog --- */
.mud-dialog {
    /* !important gerekli: .mud-elevation-* ezmesi. Değer merkezi ölçekten. */
    box-shadow: var(--acex-shadow-4) !important;
}

.mud-overlay-dark {
    backdrop-filter: blur(2px);
}

.mud-dialog-content {
    max-height: 75vh !important;
    overflow: auto !important;
}

/* --- Card --- */
.mud-card {
    /* !important kaldırıldı: MudBlazor margin-bottom'ı hiç set etmiyor ve app.css
       ondan sonra yükleniyor, yani kural zaten kazanıyor. Artık ızgara/flex kabı
       olan sayfalar boşluğu kendi yönetebiliyor — çift boşluk sorunu buradandı. */
    margin-bottom: var(--acex-space-5);
}

.mud-card-header .mud-card-header-avatar {
    margin-inline-end: var(--acex-space-3);
}

/* --- Grid --- */
.mud-grid-spacing-xs-3 {
    margin: 0px !important;
    margin-left: -12px !important;
}

/* --- MudShrink cursor --- */
.mud-shrink {
    cursor: pointer;
}

/* --- Select input opacity --- */
.mud-select-input-extended .mud-text-secondary {
    opacity: 0.42;
}

/* --- Expand Panel Compact Density --- */
.mud-expand-panel .mud-expand-panel-header {
    /* !important gerekli: MudBlazor aynı özgüllükte padding/min-height veriyor. */
    font-size: var(--acex-text-xs) !important;
    padding: 4px 6px !important;
    min-height: 28px !important;
}

/* --- List Subheader --- */
.mud-list-subheader-gutters-extended {
    padding: 0 var(--acex-space-3) !important;
}

/* --- Tab Color --- */
/* KALDIRILDI — .mud-tab.mud-ripple { color: var(--acex-text) }
   Bu ezme, tema TextPrimary ve TextSecondary'yi ikisi de saf siyah verdiği için
   yazılmıştı; o zaman zararsızdı. Tema artık gerçek bir metin hiyerarşisi
   taşıyor ve bu satır bütün sekmeleri birincil renge zorlayarak aktif/pasif
   sekme ayrımını yok ediyordu. MudBlazor'un kendi davranışı doğru. */

/* --- Highcharts Button --- */
.highcharts-button-pressed > text {
    fill: var(--acex-text) !important;
}

.highcharts-button-normal > text {
    fill: var(--acex-brand) !important;
}

/* --- Loader / Spinner (from StyleSheet.css) --- */
.loader {
    border: 5px solid var(--acex-line);
    border-radius: 50%;
    border-top: 5px solid var(--acex-brand);
    width: 30px;
    height: 30px;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* --- Alarm flash box --- */
.box1 {
    width: 100%;
    animation: color-change 1s infinite;
    z-index: -1;
    font-weight: var(--acex-weight-semibold);
    text-align: center;
}

@keyframes color-change {
    0% { background-color: red; }
    50% { background-color: white; }
    100% { background-color: red; }
}

/* --- Highcharts drilldown fix (from StyleSheet.css) --- */
.highcharts-drilldown-data-label text {
    text-decoration: none !important;
}

.highcharts-xaxis-labels text {
    text-decoration: none !important;
}

.highcharts-figure,
.highcharts-data-table table {
    min-width: 320px;
    margin: 1em auto;
}

.highcharts-data-table table {
    font-family: var(--acex-font);
    border-collapse: collapse;
    border: 1px solid var(--acex-line);
    margin: 10px auto;
    text-align: center;
    width: 100%;
    max-width: 500px;
}

.highcharts-data-table caption {
    padding: 1em 0;
    font-size: var(--acex-text-lg);
    color: var(--acex-text-muted);
}

.highcharts-data-table th {
    font-weight: var(--acex-weight-semibold);
    padding: 0.5em;
}

.highcharts-data-table td,
.highcharts-data-table th,
.highcharts-data-table caption {
    padding: 0.5em;
}

.highcharts-data-table thead tr,
.highcharts-data-table tr:nth-child(even) {
    background: var(--acex-sunken);
}

.highcharts-data-table tr:hover {
    background: color-mix(in srgb, var(--acex-info) 6%, var(--acex-surface));
}

/* --- Blazor Error UI (legacy) --- */
#blazor-error-ui {
    color: var(--mud-palette-drawer-text);
    background: var(--mud-palette-drawer-background);
}

/* --- Login Background --- */
.login-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.6)), url('/Data/Images/loginbackground.png');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    z-index: -1;
}

.mud-select-input-extended .mud-input {
    flex-basis: auto !important;
    flex-grow: 0 !important;
    padding-right: 0 !important;
}
/* Yapisken baslik KENDI zeminini boyamak zorundadir: satirlar altindan aktigi
   icin zemini olmayan bir baslik seffaf kalir ve veri basligin icinden gecer.
   Eskiden bu kural yalnizca yazi kalinligini set ediyordu. Zemin merkezdeki
   jetondan geliyor (jeton MudBlazor'un grey/gray yazim farkina karsi yedekli).
   Ara `*` kaldirildi: MudBlazor'un ic sarmalayici sayisina bagimli olmasi
   gereksiz kirilganlikti, torun birlestiricisi zaten yeterli. */
.mud-table-sticky-header .mud-table-root .mud-table-head .mud-table-cell {
    font-weight: var(--acex-weight-semibold);
    background-color: var(--acex-sunken);
}


/* =============================================================================
   ESKI SPA TEMASINDAN GERI GETIRILENLER  (fsh.css)
   -----------------------------------------------------------------------------
   ACEX.ENERYA.SPA -> mikroservis aktariminda dusen kurallar. Karsilastirma
   fsh.css'in 73 kurali uzerinden yapildi: 18'i zaten aktarilmisti, 55'i
   dusmustu. Asagidakiler dusenler icinden GERCEKTEN KULLANILANLAR; kullanilmayan
   harita kenar cubugu siniflari (#map-sidebar menusu, kml-checkbox, header-menu,
   map-fullscreen-button, fsh-center-text) bilincli olarak geri getirilmedi —
   o sayfalar aktarilmamis.

   Iki fark var:
   1. fsh.css eski uygulamada MudBlazor'DAN ONCE yukleniyordu, bu yuzden her
      kuralda !important vardi. Burada app.css MudBlazor'dan SONRA yukleniyor,
      dolayisiyla !important'a gerek yok — kaldirildi.
   2. Sabit degerler jetona baglandi; boylece koyu temada da calisiyorlar.
   ========================================================================== */

/* --- Gezinme menusu: eski uygulamanin en belirgin kimlik ogesi -------------- */

.mud-nav-link .mud-nav-link-text {
    font-size: var(--acex-text-sm);
}

.mud-nav-group > .mud-nav-link > .mud-nav-link-text {
    font-weight: var(--acex-weight-bold);
}

/* Uzun menu basliklari kirpilmak yerine alt satira gecer. */
.mud-nav-link {
    white-space: normal;
    padding: var(--acex-space-1) var(--acex-space-3);
}

/* Etkin menu ogesi ikincil renkte dolu zemin.
   NOT: eski kural metni --mud-palette-drawer-text (siyah) yapiyordu; mavi zemin
   uzerinde siyah metin kontrast olarak zayifti. Zemin ayni birakildi, metin
   dolgu-uzeri jetonuna alindi. */
.mud-nav-link.active:not(.mud-nav-link-disabled) {
    background-color: var(--acex-accent);
    color: var(--acex-text-on-brand);
}

.mud-nav-link:hover,
.mud-nav-item:hover {
    background-color: var(--acex-hover);
    border-radius: var(--acex-radius-sm);
}

.acex-nav-child {
    padding-left: var(--acex-space-3);
}

.mud-list-item-text > .mud-typography-body2 {
    font-weight: var(--acex-weight-semibold);
}

/* Eski kural rengi --mud-palette-drawer-text'e sabitliyordu; ikon artik
   bulundugu yuzeyin metin rengini devraliyor, boylece cekmece disinda da dogru. */
.mud-list-item-icon {
    color: inherit;
}

/* --- Yogun tablo gorunumu -------------------------------------------------- */
/* Eski uygulamada butun MudTable'lar bu yogunluktaydi; yeni uygulamada kural
   yalnizca .acex-entity-table altina kapsamlanmisti, geri kalan tablolar
   MudBlazor varsayilaninda kaliyordu. */

.mud-table-cell,
.mud-table-cell a {
    font-size: var(--acex-text-2xs);
}

.mud-table-cell {
    line-height: 1.23;
}

.mud-table {
    padding: 1px var(--acex-space-3);
}

.mud-table-toolbar {
    flex-wrap: wrap;
    margin-bottom: var(--acex-space-8);
}

/* --- Izgara ogesi: eski uygulamanin daha sik dikey ritmi -------------------- */
.mud-grid-item {
    padding-top: var(--acex-space-1);
    padding-bottom: var(--acex-space-1);
}

/* --- Harita katmani -------------------------------------------------------- */
/* Bu kurallar harita KAROLARININ uzerinde duruyor, uygulama yuzeyinin degil;
   bu yuzden renkleri bilincli olarak sabit — tema ile donmemeleri gerekiyor. */

.map-icon {
    object-fit: contain;
}

.mapTable {
    border-collapse: collapse;
    width: 100%;
    border-bottom: solid 1px;
    color: #000;
}

.mapTable td,
.mapTable th {
    border-top: 1px solid #000;
    text-align: left;
    padding: 3px;
}

.mapTable tr:nth-child(even),
.mapTable tr:hover {
    background-color: #dee2e6;
}

.leaflet-div-icon {
    border-radius: var(--acex-radius-sm);
}

.map-divicon {
    padding: 0;
    border: 2px solid rgb(0, 136, 204);
    font-weight: var(--acex-weight-bold);
    width: max-content;
    border-radius: var(--acex-radius-sm);
    transition: transform .2s ease;
}

.divicon-content {
    display: none;
    background-color: #fff;
}

.divicon-header {
    color: #fff;
    background-color: rgb(0, 136, 204);
    animation: blink 1s linear 5;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    justify-content: space-between;
}

.divicon-table {
    width: 100%;
    color: #000;
}

.divicon-table tr td:nth-child(1) { text-align: left; }
.divicon-table tr td:nth-child(2) { text-align: right; }

.toggle-icon {
    cursor: pointer;
}

@keyframes blink {
    25% { opacity: .5; }
    50% { opacity: 0; }
    75% { opacity: .5; }
}
.autocomplete-item-electricity,
.autocomplete-item-gas,
.autocomplete-item-water {
    padding: 8px 12px;
    border-left: 4px solid transparent;
}

.autocomplete-item-electricity {
    background-color: var(--acex-mod-electricity-hover);
    border-left-color: var(--acex-mod-electricity);
}

.autocomplete-item-gas {
    background-color: var(--acex-mod-gas-hover);
    border-left-color: var(--acex-mod-gas);
}

.autocomplete-item-water {
    background-color: var(--acex-mod-water-hover);
    border-left-color: var(--acex-mod-water);
}
.global-search-popover {
    max-height: 500px !important;
}

.global-search-popover .mud-list {
        max-height: 500px !important;
}