/* ==========================================================================
   SETA Hijyen Takip Portalı
   Palet suyun ve kromun etrafında kuruldu: logodaki balina kuyruğunun mavisi,
   SETA yazısının çeliği, ıslak hacmin köpüğü.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@500;600;700;800&family=Inter:wght@400;500;600&display=swap');

:root {
    --abyss: #04121f;
    --hull: #0a2740;
    --hull-2: #123f66;
    --deck: #0f3557;
    --tail: #1478bd;
    --spray: #4fd0f7;
    --steel: #7f95a8;
    --foam: #eef4f8;
    --sheet: #ffffff;
    --ink: #12263a;

    --ok: #1f9d68;
    --warn: #e6941c;
    --crit: #d94436;
    --fault: #8a4bd1;

    --rail-w: 244px;
    --radius-l: 18px;
    --radius-m: 12px;
    --radius-s: 8px;

    --shadow-card: 0 1px 2px rgba(10, 39, 64, .06), 0 8px 24px -12px rgba(10, 39, 64, .18);
    --shadow-pop: 0 18px 48px -18px rgba(4, 18, 31, .45);

    --font-display: 'Archivo', 'Segoe UI', sans-serif;
    --font-body: 'Inter', 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    font-family: var(--font-body);
    background: var(--foam);
    color: var(--ink);
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 {
    font-family: var(--font-display);
    letter-spacing: -.015em;
    margin: 0 0 .4em;
    color: var(--abyss);
}

h1 { font-size: 1.75rem; font-weight: 700; }
h2 { font-size: 1.3rem; font-weight: 700; }
h3 { font-size: 1.05rem; font-weight: 600; }

a { color: var(--tail); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible {
    outline: 3px solid var(--spray);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ============================ KABUK ============================ */

.shell { display: flex; min-height: 100vh; }

.rail {
    width: var(--rail-w);
    flex: 0 0 var(--rail-w);
    background: linear-gradient(178deg, var(--hull) 0%, var(--abyss) 78%);
    color: #cfe0ec;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
}

.rail::after {
    /* dipteki su çizgisi */
    content: '';
    position: absolute;
    left: -20%;
    right: -20%;
    bottom: -60px;
    height: 160px;
    background: radial-gradient(ellipse at center, rgba(20, 120, 189, .55), transparent 65%);
    pointer-events: none;
}

.rail__brand {
    padding: 22px 20px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
}

.rail__brand img { width: 148px; display: block; }

.rail__tenant {
    margin-top: 12px;
    font-size: .75rem;
    color: var(--spray);
    font-weight: 600;
    letter-spacing: .02em;
}

.rail__nav { padding: 14px 12px; flex: 1; overflow-y: auto; }

.rail__group {
    font-size: .68rem;
    color: #5f7f97;
    padding: 14px 10px 6px;
    font-weight: 600;
}

.rail__link {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 11px;
    border-radius: var(--radius-s);
    color: #cfe0ec;
    font-size: .9rem;
    font-weight: 500;
    margin-bottom: 2px;
    transition: background .15s ease, color .15s ease;
}

.rail__link:hover { background: rgba(255, 255, 255, .06); text-decoration: none; color: #fff; }

.rail__link.is-active {
    background: linear-gradient(90deg, rgba(20, 120, 189, .38), rgba(20, 120, 189, .05));
    color: #fff;
    box-shadow: inset 3px 0 0 var(--spray);
}

.rail__link svg { width: 18px; height: 18px; flex: none; opacity: .85; }

.rail__badge {
    margin-left: auto;
    background: var(--crit);
    color: #fff;
    font-size: .68rem;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 20px;
    font-family: var(--font-display);
}

.rail__foot {
    padding: 14px 16px 18px;
    border-top: 1px solid rgba(255, 255, 255, .07);
    position: relative;
    z-index: 1;
}

.rail__user { display: flex; align-items: center; gap: 10px; }

.avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--tail), var(--spray));
    color: #04121f;
    display: grid;
    place-items: center;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: .82rem;
    flex: none;
}

.rail__user-name { font-size: .85rem; font-weight: 600; color: #fff; line-height: 1.2; }
.rail__user-role { font-size: .72rem; color: #7f9ab0; }

.rail__logout {
    display: block;
    margin-top: 12px;
    font-size: .78rem;
    color: #7f9ab0;
}
.rail__logout:hover { color: var(--spray); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
    height: 64px;
    background: rgba(255, 255, 255, .88);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #dce6ee;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 0 26px;
    position: sticky;
    top: 0;
    z-index: 30;
}

.topbar__title { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; }
.topbar__sub { font-size: .8rem; color: #64798d; }

.topbar__spacer { flex: 1; }

.live-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #eaf7f0;
    color: #14724f;
    padding: 6px 13px 6px 10px;
    border-radius: 30px;
    font-size: .78rem;
    font-weight: 600;
}

.live-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--ok);
    position: relative;
}

.live-dot::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid var(--ok);
    animation: ping 2.2s ease-out infinite;
}

@keyframes ping {
    0%   { transform: scale(.6); opacity: .9; }
    70%  { transform: scale(1.5); opacity: 0; }
    100% { opacity: 0; }
}

.content { padding: 24px 26px 60px; max-width: 1560px; width: 100%; }

/* ============================ TİPİK PARÇALAR ============================ */

.page-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head p { margin: 0; color: #5b7085; font-size: .9rem; max-width: 62ch; }

.card {
    background: var(--sheet);
    border: 1px solid #e2eaf1;
    border-radius: var(--radius-l);
    box-shadow: var(--shadow-card);
}

.card__head {
    padding: 16px 20px;
    border-bottom: 1px solid #edf2f6;
    display: flex;
    align-items: center;
    gap: 12px;
}

.card__head h3 { margin: 0; }
.card__head .spacer { flex: 1; }
.card__body { padding: 18px 20px; }
.card__body--flush { padding: 0; }

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

/* Ölçüm kutuları */
.stat {
    background: var(--sheet);
    border: 1px solid #e2eaf1;
    border-radius: var(--radius-l);
    padding: 16px 18px;
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
}

.stat__label { font-size: .78rem; color: #64798d; font-weight: 500; }

.stat__value {
    font-family: var(--font-display);
    font-size: 2.1rem;
    font-weight: 700;
    line-height: 1.1;
    margin-top: 4px;
    color: var(--abyss);
    font-variant-numeric: tabular-nums;
}

.stat__unit { font-size: .95rem; color: var(--steel); font-weight: 600; margin-left: 3px; }
.stat__foot { font-size: .76rem; color: #7b8fa2; margin-top: 6px; }

.stat--crit .stat__value { color: var(--crit); }
.stat--warn .stat__value { color: var(--warn); }
.stat--ok .stat__value { color: var(--ok); }

.stat::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: var(--tail);
}
.stat--crit::before { background: var(--crit); }
.stat--warn::before { background: var(--warn); }
.stat--ok::before { background: var(--ok); }

/* Rozetler */
.tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: .74rem;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 20px;
    background: #eef3f7;
    color: #4b6376;
    white-space: nowrap;
}

.tag--empty { background: #fdeceb; color: var(--crit); }
.tag--low { background: #fdf3e2; color: #a76d09; }
.tag--normal { background: #eaf3fb; color: #14608f; }
.tag--full { background: #e8f6ef; color: #14724f; }
.tag--fault { background: #f3ecfc; color: #6d31b8; }
.tag--offline { background: #eceff2; color: #556474; }

.tag--crit { background: #fdeceb; color: var(--crit); }
.tag--high { background: #fdf3e2; color: #a76d09; }

/* Butonlar */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 1px solid transparent;
    background: var(--tail);
    color: #fff;
    font-family: var(--font-body);
    font-size: .87rem;
    font-weight: 600;
    padding: 9px 16px;
    border-radius: var(--radius-s);
    cursor: pointer;
    transition: transform .12s ease, box-shadow .15s ease, background .15s ease;
    text-decoration: none;
}

.btn:hover { background: #106399; text-decoration: none; color: #fff; }
.btn:active { transform: translateY(1px); }

.btn--ghost { background: transparent; border-color: #cdd9e3; color: #33506a; }
.btn--ghost:hover { background: #f2f7fa; color: #14608f; }

.btn--ok { background: var(--ok); }
.btn--ok:hover { background: #178355; }

.btn--crit { background: var(--crit); }
.btn--crit:hover { background: #bd3729; }

.btn--sm { padding: 6px 11px; font-size: .8rem; }
.btn--block { width: 100%; justify-content: center; }

/* Formlar */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: .8rem; font-weight: 600; color: #445b70; margin-bottom: 5px; }

.field input[type=text],
.field input[type=email],
.field input[type=password],
.field input[type=number],
.field input[type=color],
.field select,
.field textarea {
    width: 100%;
    border: 1px solid #cfdbe5;
    border-radius: var(--radius-s);
    padding: 9px 12px;
    font-family: var(--font-body);
    font-size: .9rem;
    background: #fff;
    color: var(--ink);
    transition: border-color .15s ease, box-shadow .15s ease;
}

.field input:focus, .field select:focus, .field textarea:focus {
    outline: none;
    border-color: var(--tail);
    box-shadow: 0 0 0 3px rgba(20, 120, 189, .15);
}

.field__hint { font-size: .76rem; color: #7b8fa2; margin-top: 4px; }

.check { display: flex; align-items: center; gap: 8px; font-size: .85rem; margin-bottom: 8px; }
.check input { width: 16px; height: 16px; accent-color: var(--tail); }

/* Tablolar */
.table { width: 100%; border-collapse: collapse; font-size: .87rem; }
.table th {
    text-align: left;
    font-size: .74rem;
    font-weight: 600;
    color: #64798d;
    padding: 10px 14px;
    border-bottom: 1px solid #e6edf3;
    background: #f8fbfd;
    white-space: nowrap;
}
.table td { padding: 11px 14px; border-bottom: 1px solid #f0f4f7; vertical-align: middle; }
.table tbody tr:hover { background: #f8fbfd; }
.table td.num { font-family: var(--font-display); font-variant-numeric: tabular-nums; font-weight: 600; }

/* Uyarılar */
.flash {
    padding: 12px 16px;
    border-radius: var(--radius-m);
    margin-bottom: 18px;
    font-size: .88rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 9px;
}
.flash--ok { background: #e8f6ef; color: #14724f; border: 1px solid #bde5d2; }
.flash--err { background: #fdeceb; color: #a32e22; border: 1px solid #f5c8c3; }

.empty-state { padding: 44px 20px; text-align: center; color: #7b8fa2; }
.empty-state strong { display: block; color: var(--ink); font-family: var(--font-display); margin-bottom: 4px; }

/* ==================== CİHAZ GÖRSELLERİ (ana fikir) ==================== */

.dev-wall {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(176px, 1fr));
    gap: 14px;
}

.dev {
    background: var(--sheet);
    border: 1px solid #e2eaf1;
    border-radius: var(--radius-l);
    padding: 14px;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    position: relative;
    transition: box-shadow .18s ease, border-color .18s ease;
}

.dev:hover { text-decoration: none; color: inherit; box-shadow: var(--shadow-pop); border-color: #c7d8e5; }

.dev.is-empty { border-color: #f2c2bc; }
.dev.is-low { border-color: #f3ddb2; }
.dev.is-fault { border-color: #ddc9f4; }

.dev__top { display: flex; align-items: flex-start; gap: 8px; }
.dev__name { font-family: var(--font-display); font-weight: 600; font-size: .92rem; line-height: 1.25; }
.dev__where { font-size: .75rem; color: #7b8fa2; margin-top: 1px; }

.dev__visual { display: flex; align-items: flex-end; gap: 12px; }

.dev__readout { flex: 1; }
.dev__pct {
    font-family: var(--font-display);
    font-size: 1.9rem;
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    color: var(--abyss);
}
.dev.is-empty .dev__pct { color: var(--crit); }
.dev.is-low .dev__pct { color: var(--warn); }
.dev__amount { font-size: .76rem; color: #7b8fa2; margin-top: 3px; }

/* Sabunluk: gerçek sıvı gibi dalgalanan seviye */
.tank {
    width: 54px;
    height: 76px;
    border-radius: 8px 8px 11px 11px;
    background: linear-gradient(180deg, #f3f8fb, #e7eff5);
    border: 2px solid #cfdde8;
    position: relative;
    overflow: hidden;
    flex: none;
}

.tank__liquid {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    background: linear-gradient(180deg, var(--spray), var(--tail));
    transition: height .9s cubic-bezier(.4, 0, .2, 1);
}

.tank__liquid::before,
.tank__liquid::after {
    content: '';
    position: absolute;
    left: -50%;
    width: 200%;
    height: 12px;
    top: -6px;
    background: inherit;
    border-radius: 45%;
    animation: wave 4.5s linear infinite;
    opacity: .9;
}

.tank__liquid::after {
    animation-duration: 6.5s;
    animation-direction: reverse;
    opacity: .55;
}

@keyframes wave {
    0%   { transform: translateX(-25%) rotate(0deg); }
    100% { transform: translateX(25%) rotate(360deg); }
}

.tank--empty .tank__liquid { background: linear-gradient(180deg, #f07a6d, var(--crit)); }
.tank--low .tank__liquid { background: linear-gradient(180deg, #f5bb5f, var(--warn)); }

.tank__ticks { position: absolute; inset: 0; pointer-events: none; }
.tank__ticks span {
    position: absolute;
    right: 0;
    width: 8px;
    height: 1px;
    background: rgba(10, 39, 64, .18);
}

/* Kağıt havlu: küçülen rulo spirali */
.roll {
    width: 66px; height: 66px;
    flex: none;
    position: relative;
    display: grid;
    place-items: center;
}

.roll svg { width: 100%; height: 100%; }
.roll__paper { transition: r .9s cubic-bezier(.4, 0, .2, 1), stroke-width .9s ease; }

.roll__sheet {
    animation: sheet-sway 5s ease-in-out infinite;
    transform-origin: top center;
}

@keyframes sheet-sway {
    0%, 100% { transform: rotate(0deg); }
    50%      { transform: rotate(2.4deg); }
}

.dev__meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .72rem;
    color: #8697a7;
    border-top: 1px solid #f0f4f7;
    padding-top: 8px;
}

.dev__meta .dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .5; }

/* Aciliyet şeridi */
.urgent-strip {
    background: linear-gradient(120deg, var(--abyss), var(--hull) 60%, var(--deck));
    border-radius: var(--radius-l);
    padding: 20px 22px;
    color: #dceaf3;
    position: relative;
    overflow: hidden;
    margin-bottom: 20px;
}

.urgent-strip::after {
    content: '';
    position: absolute;
    right: -80px; top: -60px;
    width: 320px; height: 320px;
    background: radial-gradient(circle, rgba(79, 208, 247, .18), transparent 62%);
    pointer-events: none;
}

.urgent-strip h2 { color: #fff; margin-bottom: 2px; }
.urgent-strip p { margin: 0 0 16px; font-size: .86rem; color: #90b0c6; }

.urgent-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
    position: relative;
    z-index: 1;
}

.urgent-item {
    display: flex;
    align-items: center;
    gap: 11px;
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: var(--radius-m);
    padding: 10px 12px;
    color: #e8f2f8;
    text-decoration: none;
    transition: background .15s ease;
}

.urgent-item:hover { background: rgba(255, 255, 255, .13); color: #fff; text-decoration: none; }

.urgent-item__bar {
    width: 6px;
    height: 40px;
    border-radius: 4px;
    background: var(--crit);
    flex: none;
    position: relative;
    overflow: hidden;
}
.urgent-item__bar i {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    background: rgba(255, 255, 255, .45);
    display: block;
}

.urgent-item--low .urgent-item__bar { background: var(--warn); }
.urgent-item--fault .urgent-item__bar { background: var(--fault); }
.urgent-item--offline .urgent-item__bar { background: #6d8296; }

.urgent-item__name { font-family: var(--font-display); font-weight: 600; font-size: .87rem; }
.urgent-item__where { font-size: .74rem; color: #9dbace; }
.urgent-item__pct {
    margin-left: auto;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.1rem;
    font-variant-numeric: tabular-nums;
}

/* ==================== TUVALET PLANI ==================== */

.room {
    background: linear-gradient(180deg, #f7fbfd, #eaf2f7);
    border: 1px solid #d9e5ee;
    border-radius: var(--radius-l);
    padding: 18px;
    position: relative;
}

.room__stage {
    position: relative;
    aspect-ratio: 16 / 9;
    background:
        linear-gradient(180deg, #dfe9f0 0 62%, #cdd9e2 62% 100%);
    border-radius: var(--radius-m);
    overflow: hidden;
    border: 1px solid #c8d6e0;
}

/* fayans dokusu */
.room__stage::before {
    content: '';
    position: absolute;
    inset: 0 0 38% 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .55) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .55) 1px, transparent 1px);
    background-size: 54px 54px;
    opacity: .8;
}

.room__stage::after {
    content: '';
    position: absolute;
    left: 0; right: 0; top: 62%;
    height: 2px;
    background: rgba(10, 39, 64, .12);
}

.room__pin {
    position: absolute;
    transform: translate(-50%, -50%);
    background: #fff;
    border: 2px solid #cfdde8;
    border-radius: 12px;
    padding: 8px 10px 9px;
    min-width: 92px;
    box-shadow: 0 8px 22px -10px rgba(4, 18, 31, .5);
    text-decoration: none;
    color: inherit;
    text-align: center;
    transition: transform .18s ease, border-color .18s ease;
}

.room__pin:hover { transform: translate(-50%, -50%) scale(1.06); text-decoration: none; color: inherit; }
.room__pin.is-empty { border-color: var(--crit); }
.room__pin.is-low { border-color: var(--warn); }
.room__pin.is-fault { border-color: var(--fault); }

.room__pin.is-empty::after,
.room__pin.is-fault::after {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: 15px;
    border: 2px solid var(--crit);
    opacity: 0;
    animation: pin-alarm 2s ease-out infinite;
    pointer-events: none;
}
.room__pin.is-fault::after { border-color: var(--fault); }

@keyframes pin-alarm {
    0%   { transform: scale(.94); opacity: .85; }
    75%  { transform: scale(1.12); opacity: 0; }
    100% { opacity: 0; }
}

.room__pin-name { font-size: .72rem; font-weight: 600; font-family: var(--font-display); margin-top: 5px; }
.room__pin-pct { font-size: .68rem; color: #7b8fa2; }

.room__legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 14px; font-size: .78rem; color: #5b7085; }
.room__legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-right: 5px; }

/* ==================== İŞ EMİRLERİ ==================== */

.wo {
    display: flex;
    gap: 14px;
    padding: 14px 16px;
    border-bottom: 1px solid #f0f4f7;
    align-items: center;
}

.wo:last-child { border-bottom: 0; }

.wo__pri {
    width: 4px;
    align-self: stretch;
    border-radius: 3px;
    background: #cdd9e3;
    flex: none;
}
.wo--critical .wo__pri { background: var(--crit); }
.wo--high .wo__pri { background: var(--warn); }

.wo__main { flex: 1; min-width: 0; }
.wo__num { font-family: var(--font-display); font-size: .74rem; color: #8697a7; font-weight: 600; }
.wo__title { font-weight: 600; font-size: .92rem; }
.wo__where { font-size: .78rem; color: #7b8fa2; }
.wo__side { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }

.wo-card {
    background: var(--sheet);
    border: 1px solid #e2eaf1;
    border-left: 4px solid #cdd9e3;
    border-radius: var(--radius-m);
    padding: 15px 17px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-card);
}
.wo-card--critical { border-left-color: var(--crit); }
.wo-card--high { border-left-color: var(--warn); }

.wo-card__head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.wo-card__body { font-size: .88rem; color: #4b6376; }
.wo-card__actions { display: flex; gap: 8px; margin-top: 13px; flex-wrap: wrap; }

/* Tamamlanma anı: kartın dolduğunu göster */
.wo-card.is-done {
    animation: done-sweep .7s ease forwards;
}

@keyframes done-sweep {
    0%   { background: #fff; }
    35%  { background: #e8f6ef; }
    100% { background: #fff; opacity: .5; transform: scale(.98); }
}

/* ==================== GRAFİKLER ==================== */

.chart-box { position: relative; height: 260px; }
.chart-box--sm { height: 190px; }

.legend { display: flex; gap: 16px; font-size: .78rem; color: #5b7085; margin-top: 10px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-right: 6px; }

/* Basit çubuk listesi (grafik kütüphanesi gerektirmeyen yerler) */
.bar-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.bar-row__name { width: 40%; font-size: .85rem; }
.bar-row__name small { display: block; color: #8697a7; font-size: .74rem; }
.bar-row__track { flex: 1; height: 8px; background: #edf2f6; border-radius: 6px; overflow: hidden; }
.bar-row__fill {
    height: 100%;
    background: linear-gradient(90deg, var(--tail), var(--spray));
    border-radius: 6px;
    width: 0;
    transition: width 1.1s cubic-bezier(.2, .8, .2, 1);
}
.bar-row__val { width: 84px; text-align: right; font-family: var(--font-display); font-weight: 600; font-size: .85rem; }

/* ==================== GİRİŞ EKRANI ==================== */

.login {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    background: var(--foam);
}

.login__stage {
    position: relative;
    background: linear-gradient(165deg, #0b2d4a 0%, var(--abyss) 70%);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 46px 52px;
    color: #cfe3f0;
}

/* yükselen su */
.login__water {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 46%;
    background: linear-gradient(180deg, rgba(20, 120, 189, .55), rgba(4, 18, 31, .1));
    animation: water-rise 2.4s cubic-bezier(.22, .9, .3, 1) both;
}

@keyframes water-rise {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

.login__wave {
    position: absolute;
    left: -50%;
    width: 200%;
    bottom: 45%;
    height: 90px;
    background: radial-gradient(ellipse at 50% 100%, rgba(79, 208, 247, .35), transparent 70%);
    border-radius: 45%;
    animation: wave 9s linear infinite;
}

.login__wave--2 { bottom: 43%; opacity: .5; animation-duration: 13s; animation-direction: reverse; }

.login__bubbles { position: absolute; inset: 0; overflow: hidden; }

.login__bubbles i {
    position: absolute;
    bottom: -30px;
    border-radius: 50%;
    background: rgba(79, 208, 247, .16);
    border: 1px solid rgba(79, 208, 247, .3);
    animation: bubble linear infinite;
}

@keyframes bubble {
    0%   { transform: translateY(0) scale(.6); opacity: 0; }
    12%  { opacity: .9; }
    100% { transform: translateY(-92vh) scale(1.15); opacity: 0; }
}

.login__brand { position: relative; z-index: 2; }
.login__brand img { width: 218px; filter: drop-shadow(0 6px 18px rgba(0, 0, 0, .4)); }

.login__pitch { position: relative; z-index: 2; max-width: 27ch; }
.login__pitch h1 {
    color: #fff;
    font-size: 2.5rem;
    line-height: 1.08;
    font-weight: 800;
    letter-spacing: -.02em;
}
.login__pitch p { color: #9dbdd3; font-size: .98rem; }

.login__metrics { position: relative; z-index: 2; display: flex; gap: 34px; }
.login__metric-val {
    font-family: var(--font-display);
    font-size: 1.55rem;
    font-weight: 700;
    color: var(--spray);
    font-variant-numeric: tabular-nums;
}
.login__metric-lbl { font-size: .78rem; color: #86a6bd; }

.login__panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.login__form {
    width: 100%;
    max-width: 372px;
    animation: form-in .7s .35s cubic-bezier(.2, .8, .2, 1) both;
}

@keyframes form-in {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: none; }
}

.login__form h2 { font-size: 1.6rem; margin-bottom: 4px; }
.login__form .sub { color: #64798d; font-size: .9rem; margin-bottom: 24px; }

.login__demo {
    margin-top: 26px;
    border-top: 1px solid #e2eaf1;
    padding-top: 16px;
}
.login__demo p { font-size: .78rem; color: #7b8fa2; margin: 0 0 9px; }

.demo-user {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    text-align: left;
    background: #f6fafc;
    border: 1px solid #e2eaf1;
    border-radius: var(--radius-s);
    padding: 8px 11px;
    margin-bottom: 6px;
    cursor: pointer;
    font-family: var(--font-body);
    transition: border-color .15s ease, background .15s ease;
}
.demo-user:hover { border-color: var(--tail); background: #eff7fb; }
.demo-user__role { font-weight: 600; font-size: .82rem; }
.demo-user__mail { font-size: .74rem; color: #7b8fa2; }

.validation-summary-errors ul { margin: 0; padding-left: 18px; }

/* ==================== SÜPER ADMİN ==================== */

.tenant-card {
    background: var(--sheet);
    border: 1px solid #e2eaf1;
    border-radius: var(--radius-l);
    box-shadow: var(--shadow-card);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: relative;
    overflow: hidden;
}

.tenant-card__stripe { position: absolute; left: 0; top: 0; bottom: 0; width: 4px; }
.tenant-card__head { display: flex; align-items: flex-start; gap: 12px; }
.tenant-card__name { font-family: var(--font-display); font-weight: 700; font-size: 1.02rem; }
.tenant-card__code { font-size: .74rem; color: #8697a7; font-family: var(--font-display); }

.tenant-card__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.tenant-card__cell { background: #f7fafc; border-radius: var(--radius-s); padding: 8px 10px; }
.tenant-card__cell b {
    display: block;
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-variant-numeric: tabular-nums;
}
.tenant-card__cell span { font-size: .7rem; color: #7b8fa2; }

.health {
    height: 6px;
    border-radius: 4px;
    background: #edf2f6;
    overflow: hidden;
}
.health i {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--ok), #57c99a);
    width: 0;
    transition: width 1.2s cubic-bezier(.2, .8, .2, 1);
}
.health.is-poor i { background: linear-gradient(90deg, var(--crit), #ee7a6d); }
.health.is-mid i { background: linear-gradient(90deg, var(--warn), #f3c06a); }

/* ==================== KÜÇÜK EKRAN ==================== */

@media (max-width: 1200px) {
    .grid--4 { grid-template-columns: repeat(2, 1fr); }
    .grid--3 { grid-template-columns: repeat(2, 1fr); }
    .grid--2-1, .grid--1-2 { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
    .login { grid-template-columns: 1fr; }
    .login__stage { min-height: 300px; padding: 30px; }
    .login__pitch h1 { font-size: 1.9rem; }
    .rail {
        position: fixed;
        left: 0; top: 0;
        transform: translateX(-100%);
        transition: transform .25s ease;
        z-index: 60;
        box-shadow: var(--shadow-pop);
    }
    .rail.is-open { transform: none; }
    .rail-toggle { display: inline-flex !important; }
    .content { padding: 18px 16px 60px; }
}

@media (max-width: 680px) {
    .grid--4, .grid--3, .grid--2 { grid-template-columns: 1fr; }
    .dev-wall { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
    .tenant-card__grid { grid-template-columns: repeat(2, 1fr); }
    .table-wrap { overflow-x: auto; }
}

.rail-toggle {
    display: none;
    background: transparent;
    border: 1px solid #cdd9e3;
    border-radius: var(--radius-s);
    padding: 7px 9px;
    cursor: pointer;
}

.scrim {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(4, 18, 31, .45);
    z-index: 55;
}
.scrim.is-open { display: block; }

/* Hareket hassasiyeti */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }
}

.hide { display: none !important; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.text-muted { color: #7b8fa2; }
.text-sm { font-size: .82rem; }
.text-right { text-align: right; }
.flex { display: flex; }
.flex-gap { gap: 10px; }
.items-center { align-items: center; }
.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
