:root {
    --font-sans: "Aptos", "Calibri", "Segoe UI", Arial, sans-serif;
    --primary-color: #2298d3;
    --primary-dark: #176fa8;
    --primary-soft: #e9f6fc;
    --accent-color: #10a39a;
    --accent-soft: #e7f8f4;
    --indigo: #5568d8;
    --indigo-soft: #eef0ff;
    --rose: #de6174;
    --rose-soft: #fff0f3;
    --amber: #e7a83d;
    --amber-soft: #fff6e6;
    --green: #34a86f;
    --green-soft: #e8f8ef;
    --bg-page: #f5f8fb;
    --bg-header: #ffffff;
    --surface: #ffffff;
    --surface-muted: #f4f8fb;
    --text-main: #172033;
    --text-muted: #647287;
    --text-soft: #9aa8b7;
    --border-color: #dce6f0;
    --danger: #c84b5e;
    --danger-bg: #fff0f3;
    --success: #218a58;
    --success-bg: #e8f8ef;
    --warning: #a76717;
    --warning-bg: #fff6e6;
    --radius-sm: 8px;
    --radius-md: 8px;
    --radius-lg: 8px;
    --shadow-sm: 0 10px 28px rgba(30, 65, 95, 0.06);
    --shadow-md: 0 18px 46px rgba(30, 65, 95, 0.10);
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
}

body {
    margin: 0;
    background:
        linear-gradient(180deg, #f7fbfe 0%, var(--bg-page) 260px),
        var(--bg-page);
    color: var(--text-main);
    font-family: var(--font-sans);
    font-weight: 400;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a {
    color: inherit;
}

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.app-container {
    min-height: 100vh;
}

.app-header {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: space-between;
    gap: 14px;
    min-height: 0;
    padding: 14px 30px 16px;
    color: #ffffff;
    background:
        linear-gradient(135deg, rgba(32, 151, 210, 0.98), rgba(30, 114, 181, 0.98) 58%, rgba(16, 163, 154, 0.94)),
        #1b74b7;
    border-bottom: 0;
    box-shadow: 0 16px 36px rgba(30, 65, 95, 0.14);
}

.app-header__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-width: 0;
}

.app-brand {
    display: inline-flex;
    align-items: center;
    gap: 18px;
    color: #ffffff;
    text-decoration: none;
    min-width: 0;
}

.app-brand__logo {
    display: block;
    width: 132px;
    height: 38px;
    object-fit: contain;
    object-position: left center;
}

.app-brand-subtitle {
    padding-left: 18px;
    border-left: 1px solid rgba(255, 255, 255, 0.28);
    color: rgba(255, 255, 255, 0.88);
    font-size: 15px;
    font-weight: 600;
}

.header-actions,
.header-form {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 8px 14px;
    color: var(--text-main);
    background: #ffffff;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.16s ease, background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.btn:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
    box-shadow: 0 10px 22px rgba(30, 65, 95, 0.08);
    transform: translateY(-1px);
}

.btn--primary {
    background: linear-gradient(135deg, var(--primary-color), #3a74df);
    border-color: var(--primary-color);
    color: #ffffff;
    box-shadow: 0 10px 22px rgba(34, 152, 211, 0.22);
}

.btn--primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: #ffffff;
}

.btn--secondary {
    border-color: var(--border-color);
    color: var(--primary-dark);
    background: #f8fcff;
}

.btn--ghost {
    border-color: rgba(255, 255, 255, 0.26);
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.08);
}

.btn--ghost:hover {
    border-color: rgba(255, 255, 255, 0.42);
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
}

.btn:disabled,
.btn:disabled:hover,
.btn[aria-busy="true"],
.btn[aria-busy="true"]:hover {
    cursor: wait;
    opacity: 0.72;
    transform: none;
    box-shadow: none;
}

.header-form.is-submitting,
.header-form.is-submitting .btn {
    cursor: wait;
}

.header-form.is-submitting .btn {
    pointer-events: none;
}

.btn--block {
    width: 100%;
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
        "title meta"
        "controls meta";
    align-items: end;
    justify-content: stretch;
    gap: 8px 18px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(14px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.filter-bar__main {
    display: flex;
    align-items: center;
    gap: 22px;
    min-width: 0;
}

.filter-title {
    grid-area: title;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.92);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    white-space: nowrap;
}

.filter-title::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #8ed3f7;
    box-shadow: 0 0 0 4px rgba(142, 211, 247, 0.12);
}

.filter-controls {
    grid-area: controls;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    flex-wrap: wrap;
    flex: 0 1 auto;
    gap: 12px;
}

.filter-group {
    display: inline-flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.filter-input,
.form-control,
.table-toolbar input,
.table-toolbar select {
    min-height: 38px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 10px;
    background: #fbfdff;
    color: var(--text-main);
    outline: none;
}

.filter-bar .filter-input {
    min-width: 150px;
    border-color: rgba(255, 255, 255, 0.38);
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
}

.filter-bar #filter_year {
    min-width: 150px;
}

.filter-bar #filter_start,
.filter-bar #filter_end {
    min-width: 220px;
}

.filter-bar select.filter-input {
    background:
        linear-gradient(45deg, transparent 50%, #ffffff 50%),
        linear-gradient(135deg, #ffffff 50%, transparent 50%),
        rgba(255, 255, 255, 0.18);
    background-position:
        calc(100% - 15px) 17px,
        calc(100% - 10px) 17px,
        0 0;
    background-size:
        5px 5px,
        5px 5px,
        100% 100%;
    background-repeat: no-repeat;
    appearance: none;
}

.filter-bar .filter-input option {
    color: var(--text-main);
}

.filter-bar .btn--primary {
    align-self: flex-end;
    min-width: 108px;
    border-color: rgba(255, 255, 255, 0.34);
    background: rgba(255, 255, 255, 0.16);
    box-shadow: none;
}

.filter-bar .btn--primary:hover {
    border-color: rgba(255, 255, 255, 0.48);
    background: rgba(255, 255, 255, 0.24);
}

.filter-input:focus,
.form-control:focus,
.table-toolbar input:focus,
.table-toolbar select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.filter-meta {
    grid-area: meta;
    align-self: end;
    margin-left: 0;
    margin-bottom: 6px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.filter-meta strong {
    color: #ffffff;
}

.tabs-container {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 10px 30px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border-color);
}

.tab-btn {
    position: relative;
    flex: 0 0 auto;
    min-height: 40px;
    padding: 9px 14px;
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.16s ease, color 0.16s ease;
}

.tab-btn:hover,
.tab-btn.active {
    color: var(--primary-dark);
    background: linear-gradient(135deg, #eaf7fd, #eef9f4);
}

.tab-btn.active::after {
    display: none;
}

.main-content {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 24px 18px 56px;
}

.page-heading {
    position: relative;
    margin-bottom: 22px;
    padding: 22px 26px 22px 38px;
    overflow: hidden;
    border: 1px solid #e5edf5;
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(251, 253, 255, 0.98)),
        #ffffff;
    box-shadow: var(--shadow-sm);
}

.page-heading::before {
    content: "";
    position: absolute;
    left: 20px;
    top: 22px;
    bottom: 22px;
    width: 7px;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--primary-color), var(--green));
    box-shadow: 0 8px 18px rgba(34, 152, 211, 0.18);
}

.page-heading h1 {
    margin: 0;
    color: var(--text-main);
    font-size: 30px;
    font-weight: 600;
    line-height: 1.16;
}

.page-heading p {
    max-width: 1120px;
    margin: 8px 0 0;
    color: var(--text-muted);
    font-size: 15px;
}

.eyebrow {
    margin: 0 0 7px;
    color: var(--accent-color);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.metric-grid,
.step-grid,
.two-column {
    display: grid;
    gap: 16px;
}

.metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 16px;
}

.metric-grid--four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.step-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.two-column {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
}

.card,
.panel,
.step-panel,
.metric-card,
.login-card {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.metric-card {
    position: relative;
    min-height: 150px;
    overflow: hidden;
    padding: 22px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 252, 255, 0.98)),
        #ffffff;
}

.metric-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: linear-gradient(90deg, var(--card-accent, var(--primary-color)), rgba(255, 255, 255, 0));
}

.metric-card--accent-1 {
    --card-accent: var(--primary-color);
}

.metric-card--accent-2 {
    --card-accent: var(--green);
}

.metric-card--accent-3 {
    --card-accent: var(--indigo);
}

.metric-card--accent-4 {
    --card-accent: var(--amber);
}

.metric-card__label,
.metric-card p,
.panel__header p,
.step-panel p,
.status-row small,
.table-state,
.login-header p {
    color: var(--text-muted);
}

.metric-card__label {
    display: block;
    font-size: 14px;
    font-weight: 600;
}

.metric-card strong {
    display: block;
    margin: 10px 0 5px;
    color: var(--card-accent, var(--primary-color));
    font-size: 34px;
    font-weight: 700;
    line-height: 1;
}

.metric-card p {
    margin: 0;
    font-size: 13px;
}

.metric-card__hint {
    display: block;
    margin-top: 6px;
    color: var(--text-muted);
    font-size: 13px;
}

.card,
.panel,
.step-panel {
    padding: 22px;
}

.panel,
.step-panel {
    margin-bottom: 16px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(251, 253, 255, 0.98)),
        #ffffff;
}

.panel__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.panel__header > div:first-child {
    min-width: 0;
}

.panel h2,
.step-panel h2,
.chart-panel h2,
.empty-panel h2,
.dash-title,
.plot-panel h2,
.map-side-panel h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding-bottom: 12px;
    border-bottom: 1px solid #edf2f7;
    color: var(--text-main);
    font-size: 19px;
    font-weight: 700;
    line-height: 1.2;
}

.panel h2::before,
.step-panel h2::before,
.chart-panel h2::before,
.empty-panel h2::before,
.dash-title::before,
.plot-panel h2::before,
.map-side-panel h3::before {
    content: "";
    flex: 0 0 auto;
    width: 9px;
    height: 26px;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--primary-color), var(--green));
    box-shadow: 0 8px 18px rgba(34, 152, 211, 0.16);
}

.panel__header p,
.step-panel p {
    margin: 6px 0 0;
    font-size: 14px;
}

.chart-panel h2,
.empty-panel h2 {
    margin-bottom: 16px;
}

.panel-meta {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    border: 1px solid #dce6f0;
    border-radius: 999px;
    padding: 6px 12px;
    background: #f8fcff;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

/* Panel basligindaki sag aksiyonlar (or. "Excel'e Aktar" + kayit sayaci). */
.panel-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.empty-panel {
    min-height: 220px;
    display: grid;
    align-content: center;
}

.empty-panel p {
    max-width: 620px;
    margin: 8px 0 0;
    color: var(--text-muted);
}

.chart-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.muted-text {
    color: var(--text-muted);
    font-size: 14px;
}

.bar-list,
.stack-list {
    display: grid;
    gap: 10px;
}

.bar-list--wide {
    gap: 14px;
}

.bar-row,
.stack-row {
    display: grid;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: rgba(244, 248, 251, 0.62);
    transition: background-color 0.16s ease, border-color 0.16s ease;
}

.bar-row:hover,
.stack-row:hover {
    border-color: #dce6f0;
    background: #fbfdff;
}

.bar-row {
    grid-template-columns: minmax(110px, 170px) minmax(120px, 1fr) 64px;
}

.stack-row {
    grid-template-columns: minmax(140px, 230px) auto minmax(120px, 1fr) 60px;
}

.bar-row span,
.stack-row span:first-child {
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
}

.bar-row strong,
.stack-row strong {
    color: var(--text-main);
    font-size: 13px;
    font-weight: 700;
    text-align: right;
}

.bar-track {
    height: 28px;
    overflow: hidden;
    border: 1px solid #e6edf5;
    border-radius: 999px;
    background: linear-gradient(90deg, #f5f8fb, #eef4f9);
    box-shadow: inset 0 1px 2px rgba(30, 65, 95, 0.05);
}

.bar-fill {
    position: relative;
    height: 100%;
    min-width: 5px;
    border-radius: inherit;
    background: linear-gradient(90deg, #52c1e8, #2298d3);
    box-shadow: 0 6px 16px rgba(34, 152, 211, 0.18);
}

.bar-fill--success {
    background: linear-gradient(90deg, #62c885, #28a665);
    box-shadow: 0 6px 16px rgba(40, 166, 101, 0.18);
}

.bar-fill--danger {
    background: linear-gradient(90deg, #f08a9a, #d64f63);
    box-shadow: 0 6px 16px rgba(214, 79, 99, 0.18);
}

.bar-fill--warning {
    background: linear-gradient(90deg, #f5c46a, #e39a2d);
    box-shadow: 0 6px 16px rgba(227, 154, 45, 0.18);
}

.bar-fill--info {
    background: linear-gradient(90deg, #76d5ee, #4a82dc);
    box-shadow: 0 6px 16px rgba(74, 130, 220, 0.18);
}

.chart-panel--success,
.chart-panel--conversion {
    --chart-soft: var(--green-soft);
}

.chart-panel--improvement {
    --chart-soft: var(--rose-soft);
}

.chart-panel--aging {
    --chart-soft: var(--amber-soft);
}

.chart-panel--status,
.chart-panel--channel {
    --chart-soft: var(--indigo-soft);
}

.chart-panel {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.92)),
        var(--chart-soft, #ffffff);
}

.chart-panel .bar-row:nth-child(5n+1) .bar-fill:not(.bar-fill--success):not(.bar-fill--danger):not(.bar-fill--warning):not(.bar-fill--info) {
    background: linear-gradient(90deg, #52c1e8, #2298d3);
}

.chart-panel .bar-row:nth-child(5n+2) .bar-fill:not(.bar-fill--success):not(.bar-fill--danger):not(.bar-fill--warning):not(.bar-fill--info) {
    background: linear-gradient(90deg, #6cd6ba, #10a39a);
}

.chart-panel .bar-row:nth-child(5n+3) .bar-fill:not(.bar-fill--success):not(.bar-fill--danger):not(.bar-fill--warning):not(.bar-fill--info) {
    background: linear-gradient(90deg, #a2a8f5, #6574d8);
}

.chart-panel .bar-row:nth-child(5n+4) .bar-fill:not(.bar-fill--success):not(.bar-fill--danger):not(.bar-fill--warning):not(.bar-fill--info) {
    background: linear-gradient(90deg, #f2bc73, #e39a2d);
}

.chart-panel .bar-row:nth-child(5n) .bar-fill:not(.bar-fill--success):not(.bar-fill--danger):not(.bar-fill--warning):not(.bar-fill--info) {
    background: linear-gradient(90deg, #ef8ca0, #d85c76);
}

.sales-heading {
    margin-bottom: 18px;
}

.dash-section,
.plot-panel {
    margin-bottom: 26px;
    padding: 20px 22px 24px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(251, 253, 255, 0.98)),
        #ffffff;
    border: 1px solid #e5edf5;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.dash-title {
    margin: 0 0 18px;
    font-size: 21px;
}

.dash-table {
    border-color: #e5e7eb;
    border-radius: 8px;
    box-shadow: none;
}

.dash-table table {
    min-width: 0;
    table-layout: fixed;
}

.dash-table th,
.dash-table td {
    height: 48px;
    padding: 12px 14px;
    vertical-align: middle;
}

.dash-table th {
    background: #f8fafc;
    color: #7b8494;
    font-size: 14px;
    font-weight: 500;
    text-transform: none;
}

.dash-table th:not(:first-child) {
    text-align: right;
}

.dash-table td {
    font-size: 14px;
}

.dash-table td:not(:first-child) {
    text-align: right;
}

.sales-col-city {
    width: 10.5%;
}

.sales-col-total {
    width: 10%;
}

.sales-col-completed {
    width: 12%;
}

.sales-col-success,
.sales-col-failed {
    width: 7.5%;
}

.sales-col-open {
    width: 8.5%;
}

.sales-col-conversion {
    width: 9%;
}

.sales-col-open-rate {
    width: 14%;
}

.sales-col-amount {
    width: 21%;
}

.heat-cell {
    color: #ffffff;
    font-weight: 700;
}

.plot-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
    margin: 22px 0 20px;
}

.plot-grid--analysis-pair {
    grid-template-columns: minmax(320px, 0.74fr) minmax(620px, 1.26fr);
    grid-auto-rows: 1fr;
    align-items: stretch;
}

.plot-grid--analysis-pair > .plot-panel {
    display: flex;
    height: 100%;
    min-height: 0;
    flex-direction: column;
}

.plot-grid > .plot-panel:only-child {
    grid-column: 1 / -1;
}

.plot-panel {
    padding: 20px 22px 26px;
    border: 1px solid #e5edf5;
    border-radius: 8px;
    background: #ffffff;
}

.plot-panel h2 {
    margin: 0 0 22px;
}

.plot-panel h3 {
    margin: -10px 0 26px;
    color: #647287;
    font-size: 14px;
    font-weight: 600;
}

.plot-panel--wide {
    margin-top: 36px;
}

.hplot {
    display: grid;
    gap: 0;
}

.hplot__row {
    display: grid;
    grid-template-columns: minmax(96px, 130px) minmax(0, 1fr) 62px;
    align-items: center;
    min-height: 32px;
}

.hplot__label {
    overflow: hidden;
    padding-right: 10px;
    color: #657287;
    font-size: 13px;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hplot__track,
.status-plot__track {
    position: relative;
    height: 28px;
}

.plot-gridline {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 1px;
    background: #dfe6ef;
    transform: translateX(-0.5px);
    z-index: 0;
}

.hplot__bar {
    display: block;
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: 0;
    min-width: 0;
    background: #4caf50;
    z-index: 1;
}

.hplot__bar--green {
    background: #4caf50;
}

.hplot__bar--score {
    border-radius: 0 4px 4px 0;
    background: linear-gradient(90deg, #9aa4f4, #5568d8);
}

/* Degisken adlari uzun oldugu icin etiket kolonu genis tutulur. */
.hplot--features .hplot__row,
.hplot--features .hplot__axis {
    grid-template-columns: minmax(180px, 280px) minmax(0, 1fr) 72px;
}

.hplot--features .hplot__row strong {
    padding-left: 10px;
}

.hplot__row strong,
.status-plot__row strong {
    color: #657287;
    font-size: 13px;
    font-weight: 500;
    text-align: left;
}

.hplot__axis {
    display: grid;
    grid-template-columns: minmax(96px, 130px) minmax(0, 1fr) 62px;
    margin-top: 12px;
}

.hplot__ticks {
    position: relative;
    height: 24px;
}

.hplot__ticks em {
    position: absolute;
    top: 0;
    color: #657287;
    font-size: 13px;
    font-style: normal;
    transform: translateX(-50%);
}

.hplot__ticks em:first-child {
    transform: translateX(0);
}

.hplot__ticks em:last-child {
    transform: translateX(-100%);
}

.plot-axis-title {
    margin-top: 2px;
    color: #657287;
    font-size: 15px;
    text-align: center;
}

.vplot {
    display: grid;
    grid-template-columns: 44px 46px minmax(0, 1fr) 90px;
    gap: 14px;
    min-height: 430px;
}

.vplot__ylabel {
    align-self: center;
    color: #657287;
    font-size: 14px;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
}

.vplot__yaxis {
    position: relative;
    height: 360px;
}

.vplot__yaxis span {
    position: absolute;
    right: 0;
    color: #657287;
    font-size: 13px;
    transform: translateY(50%);
}

.vplot__canvas {
    position: relative;
    height: 360px;
    border-bottom: 1px solid #dfe6ef;
}

.vplot__gridline {
    position: absolute;
    right: 0;
    left: 0;
    height: 1px;
    background: #dfe6ef;
}

.vplot__bars {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    gap: 28px;
    padding: 0 24px;
}

.vplot__bar-item {
    position: relative;
    display: flex;
    flex: 1 1 0;
    align-items: center;
    justify-content: flex-end;
    height: 100%;
    min-width: 90px;
    flex-direction: column;
}

.vplot__bar-item i {
    display: block;
    width: min(100%, 210px);
    min-height: 6px;
}

.vplot__bar-item strong {
    position: absolute;
    top: calc(100% + 12px);
    color: #657287;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}

.vplot__value {
    position: absolute;
    color: #657287;
    font-size: 13px;
    transform: translateY(50%);
}

.vplot__legend {
    position: relative;
    align-self: center;
    height: 240px;
    color: #657287;
}

.vplot__legend span {
    position: absolute;
    top: -30px;
    left: 0;
    font-size: 15px;
}

.vplot__legend i {
    display: block;
    width: 22px;
    height: 200px;
    background: linear-gradient(180deg, #9b0000, #ef553a, #fff0dc);
}

.vplot__legend em {
    position: absolute;
    left: 30px;
    font-size: 13px;
    font-style: normal;
    transform: translateY(50%);
}

.channel-vplot {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px;
    margin-top: -2px;
    margin-bottom: 58px;
}

.plot-grid--analysis-pair .channel-vplot {
    flex: 1;
    align-content: center;
    margin-bottom: 0;
}

.channel-vplot__yaxis {
    position: relative;
    height: 250px;
}

.plot-grid--analysis-pair .channel-vplot__yaxis {
    height: 190px;
}

.channel-vplot__yaxis span {
    position: absolute;
    right: 0;
    color: #657287;
    font-size: 12px;
    transform: translateY(50%);
}

.channel-vplot__canvas {
    position: relative;
    height: 250px;
    border-bottom: 1px solid #dfe6ef;
}

.plot-grid--analysis-pair .channel-vplot__canvas {
    height: 190px;
}

.channel-vplot__bars {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 34px;
    padding: 0 18px;
}

.plot-grid--analysis-pair .channel-vplot__bars {
    gap: 18px;
    padding: 0 10px;
}

.channel-vplot__bar-item {
    position: relative;
    display: flex;
    flex: 1 1 0;
    align-items: center;
    justify-content: flex-end;
    height: 100%;
    min-width: 130px;
    max-width: 220px;
    flex-direction: column;
}

.plot-grid--analysis-pair .channel-vplot__bar-item {
    min-width: 96px;
    max-width: 160px;
}

.channel-vplot__bar-item i {
    display: block;
    width: min(100%, 120px);
    min-height: 6px;
    border-radius: 8px 8px 0 0;
    background: linear-gradient(180deg, #38b978, #2298d3);
    box-shadow: 0 10px 22px rgba(34, 152, 211, 0.16);
}

.plot-grid--analysis-pair .channel-vplot__bar-item i {
    width: min(100%, 92px);
}

.channel-vplot__value {
    position: absolute;
    color: #176fa8;
    font-size: 13px;
    font-weight: 800;
    transform: translateY(50%);
}

.channel-vplot__bar-item strong {
    position: absolute;
    top: calc(100% + 10px);
    max-width: 160px;
    color: #172033;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
}

.plot-grid--analysis-pair .channel-vplot__bar-item strong {
    max-width: 120px;
    font-size: 11px;
}

.channel-vplot__bar-item small {
    position: absolute;
    top: calc(100% + 44px);
    color: #657287;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    white-space: nowrap;
}

.plot-grid--analysis-pair .channel-vplot__bar-item small {
    top: calc(100% + 38px);
}

.previous-flow {
    display: grid;
    gap: 9px;
}

.previous-flow__legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    align-items: center;
    margin: -12px 0 14px;
    color: #657287;
    font-size: 12px;
    font-weight: 800;
}

.previous-flow__legend span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.previous-flow__legend i {
    width: 24px;
    height: 10px;
    border-radius: 999px;
    box-shadow: inset 0 0 0 1px rgba(23, 32, 51, 0.08);
}

.previous-flow-panel {
    margin-bottom: 20px;
}

.plot-grid--analysis-pair .previous-flow-panel {
    margin-bottom: 0;
}

.plot-grid--analysis-pair .previous-flow {
    gap: 7px;
}

.plot-grid--analysis-pair .previous-flow__row,
.plot-grid--analysis-pair .previous-flow__axis,
.plot-grid--analysis-pair .previous-flow__head {
    grid-template-columns: minmax(54px, 72px) minmax(190px, 1fr) 62px 72px 82px;
    gap: 8px;
}

.plot-grid--analysis-pair .previous-flow__legend {
    margin-bottom: 10px;
}

.plot-grid--analysis-pair .previous-flow__track {
    height: 24px;
}

.plot-grid--analysis-pair .previous-flow__count {
    padding: 3px 7px;
    font-size: 11px;
}

.previous-flow__row,
.previous-flow__axis,
.previous-flow__head {
    display: grid;
    grid-template-columns: minmax(78px, 108px) minmax(280px, 1fr) 78px 86px 96px;
    align-items: center;
    gap: 10px;
}

.previous-flow__head {
    min-height: 24px;
    color: #657287;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.previous-flow__head span:first-child {
    text-align: right;
}

.previous-flow__head span:nth-child(n + 3) {
    text-align: right;
}

.previous-flow__label {
    color: #657287;
    font-size: 13px;
    font-weight: 800;
    text-align: right;
}

.previous-flow__track {
    position: relative;
    height: 28px;
}

.previous-flow__bar {
    position: absolute;
    inset: 4px 0;
    display: flex;
    overflow: hidden;
    border-radius: 999px;
    background: #eef4f9;
    box-shadow: inset 0 0 0 1px rgba(23, 32, 51, 0.06);
    z-index: 1;
}

.previous-flow__segment {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    color: #ffffff;
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
}

.previous-flow__segment + .previous-flow__segment {
    box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.46);
}

.previous-flow__segment em {
    padding: 0 5px;
    font-style: normal;
    text-shadow: 0 1px 2px rgba(23, 32, 51, 0.18);
}

.previous-flow__row strong {
    justify-self: end;
    color: #176fa8;
    font-size: 13px;
    font-weight: 900;
    text-align: right;
}

.previous-flow__row small {
    color: #657287;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.previous-flow__count {
    justify-self: end;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.previous-flow__count--success {
    background: #e7f6ef;
    color: #1f8655;
}

.previous-flow__count--lost {
    background: #fde9ed;
    color: #bb3f52;
}

.previous-flow__axis {
    margin-top: 8px;
}

.previous-flow__axis > span {
    color: #657287;
    font-size: 12px;
    font-weight: 800;
}

.status-plot {
    display: grid;
    gap: 8px;
}

.status-plot--compact {
    gap: 12px;
}

.status-plot__row {
    display: grid;
    grid-template-columns: minmax(140px, 230px) 64px minmax(0, 1fr) 72px;
    align-items: center;
    min-height: 30px;
    gap: 10px;
}

.status-plot__group {
    overflow: hidden;
    color: #657287;
    font-size: 13px;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.status-plot__bar {
    display: block;
    position: absolute;
    top: 5px;
    bottom: 5px;
    left: 0;
    min-width: 0;
    background: #2298d3;
    z-index: 1;
}

.status-plot__axis {
    display: grid;
    grid-template-columns: minmax(140px, 230px) 64px minmax(0, 1fr) 72px;
    gap: 10px;
    margin-top: 10px;
}

.status-breakdown {
    display: grid;
    gap: 12px;
}

.status-breakdown__legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    align-items: center;
    margin: -8px 0 16px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
}

.status-breakdown__legend span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.status-breakdown__legend i {
    width: 24px;
    height: 10px;
    border-radius: 999px;
    box-shadow: inset 0 0 0 1px rgba(23, 32, 51, 0.08);
}

.status-breakdown__row,
.status-breakdown__axis {
    display: grid;
    grid-template-columns: minmax(96px, 130px) minmax(0, 1fr) 72px;
    align-items: center;
    gap: 12px;
}

.status-breakdown__group {
    overflow: hidden;
    color: #657287;
    font-size: 13px;
    font-weight: 700;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.status-breakdown__track {
    position: relative;
    height: 34px;
}

.status-breakdown__bar {
    position: absolute;
    top: 6px;
    bottom: 6px;
    left: 0;
    display: flex;
    min-width: 4px;
    overflow: hidden;
    border-radius: 999px;
    background: #eef4f9;
    box-shadow: 0 8px 18px rgba(30, 65, 95, 0.08);
    z-index: 1;
}

.status-breakdown__segment {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 4px;
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
}

.status-breakdown__segment + .status-breakdown__segment {
    box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.42);
}

.status-breakdown__segment em {
    overflow: hidden;
    max-width: 100%;
    padding: 0 5px;
    font-style: normal;
    text-overflow: ellipsis;
    text-shadow: 0 1px 2px rgba(23, 32, 51, 0.18);
    white-space: nowrap;
}

.status-breakdown__row strong {
    color: #657287;
    font-size: 13px;
    font-weight: 700;
}

.status-breakdown__axis {
    margin-top: 8px;
}

.status-matrix {
    display: grid;
    gap: 10px;
    width: 100%;
    padding-bottom: 4px;
}

.status-matrix__row,
.status-matrix__xaxis {
    display: grid;
    grid-template-columns: minmax(96px, 130px) minmax(0, 1fr) 72px;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.status-matrix__ylabel {
    overflow: hidden;
    color: #657287;
    font-size: 13px;
    font-weight: 700;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.status-matrix__cells,
.status-matrix__xlabels {
    display: grid;
    grid-template-columns: repeat(var(--status-count), minmax(0, 1fr));
    gap: 10px;
    min-width: 0;
}

.status-matrix__cell {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 42px;
    border: 1px solid;
    border-radius: 8px;
    color: #172033;
    font-size: 13px;
    font-weight: 800;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.status-matrix__row strong {
    color: #657287;
    font-size: 13px;
    font-weight: 800;
    text-align: left;
}

.status-matrix__xaxis {
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid #e5edf5;
}

.status-matrix__xlabels span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-width: 0;
    min-height: 30px;
    color: #657287;
    font-size: 12px;
    font-weight: 800;
    text-align: center;
    white-space: nowrap;
}

.status-matrix__xlabels i {
    width: 18px;
    height: 8px;
    border-radius: 999px;
    box-shadow: inset 0 0 0 1px rgba(23, 32, 51, 0.08);
}

.status-matrix__xaxis > span:last-child {
    color: #657287;
    font-size: 12px;
    font-weight: 800;
    text-align: left;
    white-space: nowrap;
}

.step-panel__number {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    margin-bottom: 14px;
    border-radius: var(--radius-sm);
    background: var(--primary-soft);
    color: var(--primary-color);
    font-weight: 800;
}

.rate-callout {
    display: grid;
    gap: 5px;
    margin: 18px 0;
    padding: 16px;
    border: 1px solid #fde68a;
    border-radius: var(--radius-md);
    background: var(--warning-bg);
    color: var(--warning);
}

.rate-callout strong {
    font-size: 32px;
    line-height: 1;
}

.status-list {
    display: grid;
    gap: 10px;
}

.status-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--surface-muted);
}

.status-row > span:first-child {
    font-size: 14px;
    font-weight: 800;
}

.status-row small {
    grid-column: 1 / -1;
    font-size: 12px;
}

.compact-table,
.wide-table {
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: #ffffff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 13px 14px;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
    white-space: nowrap;
    vertical-align: middle;
}

th {
    background: linear-gradient(180deg, #f8fbfe, #f0f5fa);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

td {
    color: var(--text-main);
    font-size: 14px;
}

tbody tr {
    transition: background-color 0.14s ease;
}

tbody tr:hover {
    background: #f8fcff;
}

tr:last-child td {
    border-bottom: 0;
}

td strong {
    color: var(--primary-dark);
}

.wide-table table {
    min-width: 1120px;
}

.table-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 10px;
    margin-bottom: 12px;
}

.table-toolbar label,
.form-group {
    display: grid;
    gap: 6px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
}

/* İl performans özeti sıralama araç çubuğu: etiket + açılır menüler + buton
   tamami tek satirda, yatay hizali. Etiket metni select'in yaninda durur. */
.city-sort-toolbar {
    flex-wrap: nowrap;
    align-items: center;
    overflow-x: auto;
}

.city-sort-toolbar label {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.city-sort-toolbar select {
    min-width: 180px;
}

.city-sort-toolbar .btn--primary {
    align-self: center;
    flex: 0 0 auto;
}

@media (max-width: 720px) {
    .city-sort-toolbar {
        flex-wrap: wrap;
    }
}

.table-toolbar input {
    width: min(420px, 78vw);
}

.table-state {
    min-height: 26px;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 600;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 12px;
}

.pagination--compact {
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    padding-top: 4px;
}

.pagination button,
.table-toolbar button {
    min-height: 38px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 13px;
    background: #ffffff;
    color: var(--text-main);
    font-weight: 600;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    min-height: 36px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 7px 11px;
    background: #ffffff;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.page-link:hover {
    border-color: #b8dff0;
    background: var(--primary-soft);
    color: var(--primary-dark);
}

.page-link--active {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, var(--primary-color), #3a74df);
    color: #ffffff;
}

.page-link--disabled,
.page-link--gap {
    color: var(--text-soft);
    pointer-events: none;
}

.pagination button:hover,
.table-toolbar button:hover {
    background: var(--surface-muted);
}

.pagination button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    border-radius: 999px;
    padding: 4px 10px;
    background: var(--surface-muted);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.pill--success,
.pill--info {
    background: var(--success-bg);
    color: var(--success);
}

.pill--blue {
    background: var(--primary-soft);
    color: var(--primary-dark);
}

.pill--warning {
    background: var(--warning-bg);
    color: var(--warning);
}

.pill--error {
    background: var(--danger-bg);
    color: var(--danger);
}

.message-stack {
    display: grid;
    gap: 10px;
    margin-bottom: 18px;
}

.message {
    padding: 12px 14px;
    border-radius: var(--radius-md);
    background: var(--primary-soft);
    color: #1e40af;
    font-size: 14px;
    font-weight: 600;
}

.probability-cell,
.score-cell {
    display: grid;
    min-width: 130px;
    gap: 7px;
}

.probability-cell strong,
.score-cell strong {
    font-size: 13px;
}

.mini-track {
    display: block;
    width: 100%;
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #edf4f9;
}

.mini-track i {
    display: block;
    height: 100%;
    min-width: 4px;
    border-radius: inherit;
    background: linear-gradient(90deg, #6dd3c7, #2298d3);
}

.mini-track--score i {
    background: linear-gradient(90deg, #9aa4f4, #5568d8);
}

.map-rank-row .mini-track i {
    background: linear-gradient(90deg, #f6b9b9, #df7373);
}

/* Yeni Talep Tahmini ekrani */
.prediction-form {
    display: flex;
    align-items: flex-end;
    gap: 14px;
    flex-wrap: wrap;
}

.prediction-form__field {
    display: grid;
    gap: 6px;
    flex: 0 1 360px;
    min-width: 200px;
    max-width: 360px;
}

.prediction-form__field label {
    color: #647287;
    font-size: 13px;
    font-weight: 600;
}

.prediction-form__field .form-control {
    width: 100%;
    font-size: 15px;
}

.prediction-form .btn--primary {
    min-height: 38px;
    min-width: 150px;
}

/* Toplu Talep Tahmini ekrani - tarih araligi secici */
.range-picker {
    /* Ust bar (app-header) ile AYNI mavi-teal gradient; yavasca kayarak ince hareket katar. */
    color: #ffffff;
    background-color: #1b74b7;
    background-image: linear-gradient(135deg, rgba(32, 151, 210, 0.98), rgba(30, 114, 181, 0.98) 58%, rgba(16, 163, 154, 0.94));
    background-size: 200% 200%;
    border-color: transparent;
    box-shadow: 0 14px 30px rgba(30, 65, 95, 0.18);
    animation: rangePickerShift 15s ease-in-out infinite;
}

.range-picker__form {
    /* Kontroller solda, hizli secim sagdaki bosluga yaslanir; dar ekranda alta kayar. */
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px 28px;
}

.range-picker__main {
    display: flex;
    align-items: flex-end;
    gap: 14px;
    flex-wrap: wrap;
}

.range-picker__field {
    display: grid;
    gap: 6px;
}

.range-picker__field label {
    color: rgba(255, 255, 255, 0.92);
    font-size: 13px;
    font-weight: 700;
}

.range-picker__field .form-control {
    min-width: 190px;
    font-size: 15px;
}

.range-picker__arrow {
    /* Input kutulariyla dikey hizali (etikete degil): alta yasla + input yuksekligi (38px). */
    align-self: flex-end;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 20px;
    font-weight: 700;
    animation: rangeArrowNudge 1.9s ease-in-out infinite;
}

.range-picker__submit {
    min-height: 40px;
    min-width: 150px;
    /* Mavi panelde belirgin dursun diye ters (beyaz zemin, mavi yazi). */
    background: #ffffff;
    color: var(--primary-color, #2298d3);
    border-color: #ffffff;
    box-shadow: 0 8px 18px rgba(15, 55, 95, 0.22);
}

.range-picker__submit:hover {
    background: #eef6fd;
    color: #1b74b7;
    border-color: #eef6fd;
}

.range-picker__presets {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.range-picker__presets-label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    font-weight: 700;
    margin-right: 4px;
}

.range-chip {
    /* Ust bardaki kontroller gibi yari saydam beyaz. */
    border: 1px solid rgba(255, 255, 255, 0.55);
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    padding: 7px 14px;
    border-radius: 999px;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.range-chip:hover {
    background: rgba(255, 255, 255, 0.28);
    border-color: rgba(255, 255, 255, 0.85);
    color: #ffffff;
}

.range-chip:active {
    background: rgba(255, 255, 255, 0.36);
}

@media (max-width: 560px) {
    .range-picker__arrow {
        display: none;
    }

    .range-picker__field .form-control {
        width: 100%;
    }
}

@keyframes rangePickerShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes rangeArrowNudge {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(4px); }
}

@media (prefers-reduced-motion: reduce) {
    .range-picker,
    .range-picker__arrow {
        animation: none;
    }
}

.bulk-result-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 4px 0 16px;
    padding: 14px 16px;
    border: 1px solid #dce8f3;
    border-radius: var(--radius-md);
    background: #ffffff;
}

.bulk-result-heading h2 {
    margin: 0 0 2px;
    font-size: 18px;
    color: #1f3350;
}

.bulk-result-heading p {
    margin: 0;
    color: #647287;
    font-size: 14px;
}

.bulk-result-groups {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.bulk-group-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 36px;
    border: 1px solid #cce5f5;
    border-radius: 999px;
    padding: 7px 12px;
    background: var(--primary-soft);
    color: var(--primary-dark);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.bulk-group-badge--failed {
    border-color: #f2c4cc;
    background: var(--danger-bg);
    color: var(--danger);
}

.bulk-group-badge--failed:hover {
    border-color: var(--danger);
    color: #a73649;
}

.bulk-f-panel {
    scroll-margin-top: 20px;
    border-color: #eed7db;
    background:
        linear-gradient(180deg, rgba(255, 251, 252, 0.98), rgba(255, 255, 255, 0.98) 120px),
        #ffffff;
    box-shadow: var(--shadow-sm);
}

.bulk-f-panel h2::before {
    background: linear-gradient(180deg, #d78a97, #e2a48f);
    box-shadow: 0 6px 14px rgba(200, 75, 94, 0.12);
}

.bulk-f-panel h2 .pill {
    min-width: 29px;
    margin-left: 2px;
}

.panel-meta--failed {
    border-color: #ecd3d8;
    background: #fdf6f7;
    color: #9a5866;
}

.bulk-f-notice {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 16px;
    padding: 12px 14px;
    border: 1px solid #ecd3d8;
    border-left: 4px solid var(--danger);
    border-radius: 10px;
    background: #fdf7f8;
    color: #5f4a4e;
}

.bulk-f-notice__mark {
    display: inline-flex;
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--danger);
    color: #ffffff;
    font-size: 15px;
    font-weight: 800;
}

.bulk-f-notice p {
    margin: 0;
    font-size: 13px;
    line-height: 1.45;
}

.bulk-f-metrics {
    margin-bottom: 16px;
}

.bulk-f-metric-card {
    min-height: 130px;
    border-color: #ecd9dd;
    padding: 18px;
    --card-accent: #d78a97;
}

.bulk-f-metric-card strong {
    font-size: 29px;
    color: #9a5866;
}

.open-demand-table--failed {
    border-color: #ecd9dd;
}

.open-demand-table--failed thead {
    background: #fbf7f8;
}

.open-demand-table--failed .mini-track i {
    background: linear-gradient(90deg, #e0a293, #cf7f8d);
}

.page-link--failed {
    border-color: #c98b96;
    background: linear-gradient(135deg, #b46a78, #c98a76);
}

.prediction-empty--inline {
    margin: 0;
}

.band-distribution {
    display: grid;
    gap: 14px;
}

.band-row {
    display: grid;
    grid-template-columns: 78px 1fr auto;
    align-items: center;
    gap: 16px;
}

.band-row__label {
    font-weight: 700;
    font-size: 14px;
    color: #33475b;
}

.band-row .mini-track {
    height: 14px;
}

.band-row__meta {
    color: #647287;
    font-size: 13px;
    white-space: nowrap;
}

@media (max-width: 640px) {
    .bulk-result-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .bulk-result-groups {
        justify-content: flex-start;
    }

    .bulk-f-panel .panel__header {
        flex-direction: column;
    }

    .band-row {
        grid-template-columns: 60px 1fr;
    }

    .band-row__meta {
        grid-column: 1 / -1;
        white-space: normal;
    }
}

.prediction-result .panel__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.prediction-badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}

.prediction-badge--success {
    border: 1px solid #a7e3c8;
    background: #e7f8ef;
    color: #1f7a4d;
}

.prediction-badge--fail {
    border: 1px solid #f3c0c0;
    background: #fdeaea;
    color: #b23b3b;
}

.prediction-score {
    display: grid;
    grid-template-columns: minmax(160px, 220px) minmax(0, 1fr);
    align-items: center;
    gap: 18px 28px;
    margin: 20px 0 8px;
    padding: 20px 22px;
    border: 1px solid #e5edf5;
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, #fbfdff, #f4f8fc);
}

.prediction-score__value {
    display: grid;
    gap: 4px;
}

.prediction-score__number {
    color: #3d4dbb;
    font-size: 38px;
    font-weight: 800;
    line-height: 1;
}

.prediction-score__label {
    color: #647287;
    font-size: 13px;
    font-weight: 600;
}

.prediction-score__bar {
    display: grid;
    gap: 10px;
}

.prediction-score__bar .mini-track {
    height: 12px;
}

.prediction-score__band {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 28px;
    color: #647287;
    font-size: 14px;
}

.prediction-features {
    margin-top: 22px;
}

.prediction-features h3 {
    margin: 0 0 14px;
    color: #384252;
    font-size: 16px;
}

.prediction-features__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
    margin: 0;
}

.prediction-features__item {
    display: grid;
    gap: 4px;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--surface-muted);
}

.prediction-features__item dt {
    color: #8a95a6;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.prediction-features__item dd {
    margin: 0;
    color: #2f3947;
    font-size: 14px;
    font-weight: 600;
    word-break: break-word;
}

.prediction-empty {
    margin: 0;
    color: #647287;
    line-height: 1.5;
}

.data-quality-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.data-quality-item {
    display: grid;
    gap: 4px;
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    border-left: 4px solid #34a86f;
    border-radius: var(--radius-md);
    background: var(--surface-muted);
}

.data-quality-item--warn {
    border-left-color: #e0a53b;
}

.data-quality-item--muted {
    border-left-color: #9aa4b2;
}

.data-quality-item__label {
    color: #8a95a6;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.data-quality-item__value {
    color: #2f3947;
    font-size: 26px;
    line-height: 1.1;
}

.data-quality-item__hint {
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.4;
}

.prediction-help {
    margin: 14px 0 0;
    padding: 12px 14px;
    border: 1px solid #dbe6f2;
    border-radius: var(--radius-md);
    background: #f4f8fc;
    color: #48566a;
    font-size: 13px;
    line-height: 1.6;
}

.prediction-note {
    margin: 4px 0 0;
    padding: 12px 14px;
    border: 1px solid #fde68a;
    border-radius: var(--radius-md);
    background: var(--warning-bg);
    color: #8a6d1f;
    font-size: 13px;
    line-height: 1.5;
}

/* Modeli Yeniden Eğit onay penceresi */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(20, 32, 48, 0.55);
}

.modal-overlay[hidden] {
    display: none;
}

.modal-card {
    width: 100%;
    max-width: 460px;
    padding: 24px;
    border-radius: var(--radius-md);
    background: #ffffff;
    box-shadow: 0 20px 50px rgba(20, 32, 48, 0.25);
}

.modal-card h2 {
    margin: 0 0 12px;
    color: #1f2a3a;
    font-size: 19px;
}

.modal-card p {
    margin: 0 0 18px;
    color: #48566a;
    font-size: 14px;
    line-height: 1.6;
}

.modal-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 22px;
    color: #2f3947;
    font-size: 14px;
    line-height: 1.4;
    cursor: pointer;
}

.modal-check input {
    margin-top: 2px;
    width: 17px;
    height: 17px;
    flex-shrink: 0;
    cursor: pointer;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.modal-actions .btn--primary[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Ghost buton header'daki renkli zemin icin beyaz metinli; acik renk modalda okunur olmasi icin ezilir. */
.modal-actions .btn--ghost {
    border-color: var(--border-color);
    background: #ffffff;
    color: #48566a;
}

.modal-actions .btn--ghost:hover {
    border-color: #c4d0de;
    background: #f4f8fc;
    color: #2f3947;
}

@media (max-width: 640px) {
    .prediction-score {
        grid-template-columns: 1fr;
    }

    .prediction-result .panel__header {
        flex-direction: column;
    }
}

.open-demand-table {
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: #ffffff;
}

.demand-filter-form {
    display: grid;
    /* Arama + 3 filtre (Ulke/Il/Son Duzey) + butonlar: hepsi tek satirda.
       Arama kutusu kucultuldu ki filtreler ve butonlar alta kaymasin. */
    grid-template-columns: minmax(180px, 1fr) repeat(3, minmax(120px, 0.5fr)) auto;
    gap: 12px;
    align-items: end;
    margin: -2px 0 16px;
    padding: 14px;
    border: 1px solid #dce8f3;
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 251, 254, 0.98)),
        #ffffff;
}

.demand-filter-field {
    display: grid;
    gap: 6px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
}

.demand-filter-field span {
    line-height: 1.2;
}

.demand-filter-actions {
    display: flex;
    gap: 8px;
    align-items: end;
    justify-content: flex-end;
}

.demand-filter-actions .btn {
    min-height: 46px;
    white-space: nowrap;
}

/* Toplu Talep Tahmini liste filtresi: 4 filtre (Ürün Müd./Referans/İl/Son Düzey) + aksiyonlar. */
.demand-filter-form--bulk {
    grid-template-columns: repeat(4, minmax(130px, 1fr)) auto;
}

.multi-select {
    position: relative;
    min-width: 0;
}

.multi-select__button {
    display: flex;
    width: 100%;
    min-height: 46px;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 13px;
    border: 1.5px solid #dbe6f1;
    border-radius: 10px;
    background: #ffffff;
    color: #1f2d40;
    font-size: 14px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
}

.multi-select__button:hover {
    border-color: #a9cce8;
}

.multi-select.is-open .multi-select__button {
    border-color: var(--primary-color, #2298d3);
    box-shadow: 0 0 0 3px rgba(34, 152, 211, 0.15);
}

/* Aktif filtre (en az bir seçim) görsel olarak belirgin olsun. */
.multi-select:has(input:checked) .multi-select__button {
    border-color: var(--primary-color, #2298d3);
    background: #f1f8fe;
    color: #14507a;
}

.multi-select__button span:first-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.multi-select__chevron {
    flex: 0 0 auto;
    width: 8px;
    height: 8px;
    border-right: 2px solid #6b7c93;
    border-bottom: 2px solid #6b7c93;
    transform: rotate(45deg) translate(-1px, -1px);
    transition: transform .18s ease, border-color .15s ease;
}

.multi-select.is-open .multi-select__chevron {
    transform: rotate(225deg);
    border-color: var(--primary-color, #2298d3);
}

.multi-select__menu {
    position: absolute;
    z-index: 25;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    max-height: 280px;
    overflow: auto;
    padding: 6px;
    border: 1px solid #e0e9f3;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 18px 40px rgba(31, 51, 80, 0.18);
    animation: multiSelectIn .16s ease;
}

@keyframes multiSelectIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.multi-select__menu::-webkit-scrollbar {
    width: 11px;
}

.multi-select__menu::-webkit-scrollbar-thumb {
    background: #cfdcea;
    border: 3px solid #ffffff;
    border-radius: 999px;
}

.multi-select__menu::-webkit-scrollbar-thumb:hover {
    background: #b4c8dd;
}

.multi-select__search-wrap {
    position: sticky;
    z-index: 1;
    top: -6px;
    margin: -6px -6px 6px;
    padding: 8px 6px 8px;
    background: #ffffff;
    border-bottom: 1px solid #eef3f8;
}

.multi-select__search {
    width: 100%;
    min-height: 38px;
    padding: 8px 12px 8px 34px;
    border: 1px solid #d3e0ee;
    border-radius: 8px;
    background-color: #f7fafd;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237c8ba0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 10px center;
    color: #172033;
    font: inherit;
    font-size: 13px;
}

.multi-select__search:focus {
    border-color: var(--primary-color, #2797d5);
    background-color: #ffffff;
    outline: 3px solid rgba(34, 152, 211, 0.14);
    outline-offset: 0;
}

.multi-select__search::placeholder {
    color: #8494a7;
}

.multi-select__option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 8px;
    color: #26344a;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background .12s ease, color .12s ease;
}

.multi-select__option:hover {
    background: #eef6fd;
}

.multi-select__option input {
    flex: 0 0 auto;
    width: 17px;
    height: 17px;
    accent-color: var(--primary-color, #2298d3);
    cursor: pointer;
}

/* Seçili seçenek hafif vurgulu. */
.multi-select__option:has(input:checked) {
    background: #f1f8fe;
    color: #14507a;
    font-weight: 600;
}

.multi-select__option[hidden],
.multi-select__empty[hidden] {
    display: none;
}

.multi-select__empty {
    margin: 8px 10px;
    color: #8494a7;
    font-size: 13px;
}

@media (prefers-reduced-motion: reduce) {
    .multi-select__menu {
        animation: none;
    }
}

@media (max-width: 720px) {
    .demand-filter-form--bulk {
        grid-template-columns: 1fr;
    }

    .demand-filter-form--bulk .demand-filter-actions {
        justify-content: flex-start;
    }
}

.open-demand-table table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
}

.open-demand-table th,
.open-demand-table td {
    padding: 12px 14px;
    white-space: normal;
    word-break: normal;
    overflow-wrap: anywhere;
}

.open-demand-table th {
    font-size: 11px;
    line-height: 1.25;
}

.open-demand-table td {
    font-size: 13px;
    line-height: 1.35;
}

.open-demand-table .probability-cell {
    min-width: 0;
}

.open-demand-table .mini-track {
    max-width: 140px;
}

.dashboard-table-panel .compact-table {
    width: 100%;
}

.dashboard-table-panel table {
    min-width: 0;
    table-layout: fixed;
}

.dashboard-table-panel th:first-child,
.dashboard-table-panel td:first-child {
    width: 72%;
}

.dashboard-table-panel th:last-child,
.dashboard-table-panel td:last-child {
    width: 28%;
}

.dashboard-table-panel .score-cell {
    min-width: 0;
}

.od-col-id {
    width: 5.5%;
}

.od-col-probability {
    width: 11%;
}

.od-col-status {
    width: 6%;
}

.od-col-previous {
    width: 9.5%;
}

.od-col-product {
    width: 21%;
}

.od-col-reference {
    width: 15%;
}

.od-col-detail {
    width: 23%;
}

.od-col-city {
    width: 9%;
}

.message--error {
    background: var(--danger-bg);
    color: var(--danger);
}

.message--success {
    background: var(--success-bg);
    color: var(--success);
}

.login-body {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 28px;
    background:
        radial-gradient(circle at 18% 16%, rgba(34, 152, 211, 0.16), transparent 30%),
        linear-gradient(135deg, #edf6fb 0%, #f8fafc 58%, #eef6fb 100%);
}

.login-card {
    display: grid;
    grid-template-columns: minmax(380px, 1.05fr) minmax(360px, 0.95fr);
    width: min(980px, 100%);
    min-height: 520px;
    overflow: hidden;
    padding: 0;
    border: 1px solid rgba(203, 213, 225, 0.78);
    border-radius: 14px;
    box-shadow: 0 28px 80px rgba(30, 65, 95, 0.16);
}

.login-brand-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 28px;
    padding: 36px;
    color: #ffffff;
    background:
        linear-gradient(150deg, rgba(34, 152, 211, 0.96), rgba(25, 91, 160, 0.98)),
        #1b74b7;
}

.login-brand-panel::after {
    content: "";
    position: absolute;
    right: -92px;
    bottom: -88px;
    width: 230px;
    height: 230px;
    border: 32px solid rgba(255, 255, 255, 0.10);
    border-radius: 999px;
}

.login-logo-shell {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 86px;
    padding: 0;
}

.login-logo-img {
    display: block;
    width: 100%;
    max-width: 360px;
    height: 70px;
    object-fit: contain;
    object-position: left center;
}

.login-brand-copy {
    position: relative;
    z-index: 1;
}

.login-brand-copy span,
.login-kicker {
    display: inline-flex;
    margin-bottom: 9px;
    font-size: 13px;
    font-weight: 500;
}

.login-brand-copy span {
    color: rgba(255, 255, 255, 0.76);
}

.login-brand-copy h1 {
    margin: 0;
    color: #ffffff;
    font-size: 34px;
    font-weight: 500;
    line-height: 1.16;
}

.login-brand-copy p {
    max-width: 310px;
    margin: 14px 0 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
    font-weight: 400;
}

.login-brand-footer {
    position: relative;
    z-index: 1;
    margin: 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 12px;
    font-weight: 500;
}

.login-form-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 46px 48px;
    background: #ffffff;
}

.login-header {
    margin-bottom: 24px;
    text-align: left;
}

.login-kicker {
    color: #2298d3;
}

.login-header h2 {
    margin: 0;
    color: #172033;
    font-size: 28px;
    font-weight: 500;
    line-height: 1.2;
}

.login-header p {
    margin: 8px 0 0;
    color: #5f6f82;
    font-size: 14px;
}

.form-stack {
    display: grid;
    gap: 15px;
}

.form-group {
    text-align: left;
}

.form-group span {
    color: #4b5c70;
    font-size: 13px;
    font-weight: 500;
    text-transform: none;
}

.form-control {
    width: 100%;
    min-height: 46px;
    border-color: #d7e1eb;
    border-radius: 7px;
    background: #ffffff;
    color: #172033;
    font-size: 14px;
    font-weight: 500;
}

.form-control::placeholder {
    color: #9aa8b7;
}

.password-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42px;
    align-items: stretch;
    overflow: hidden;
    border: 1px solid #d7e1eb;
    border-radius: 7px;
    background: #ffffff;
}

.password-field .form-control {
    min-height: 44px;
    border: 0;
    border-radius: 0;
    padding-right: 10px;
}

.password-toggle {
    display: grid;
    place-items: center;
    width: 42px;
    min-width: 42px;
    min-height: 44px;
    border: 0;
    border-left: 1px solid #d7e1eb;
    border-radius: 0;
    padding: 0;
    color: #66788d;
    background: #f7fbfe;
    cursor: pointer;
    transition: transform 0.16s ease, background-color 0.16s ease, border-color 0.16s ease;
}

.password-toggle:hover {
    background: #eaf6fc;
}

.password-toggle:focus-visible {
    outline: 3px solid rgba(34, 152, 211, 0.22);
    outline-offset: 2px;
}

.password-toggle__icon {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.password-toggle__icon--hide {
    display: none;
}

.password-toggle[aria-pressed="true"] .password-toggle__icon--show {
    display: none;
}

.password-toggle[aria-pressed="true"] .password-toggle__icon--hide {
    display: block;
}

.login-error {
    margin-top: 2px;
}

.login-card .btn--primary {
    min-height: 46px;
    margin-top: 4px;
    border-color: #2298d3;
    background: #2298d3;
    font-weight: 500;
}

.login-card .btn--primary:hover {
    border-color: #1685bd;
    background: #1685bd;
}

.login-footer {
    margin: 24px 0 0;
    color: #8a99aa;
    font-size: 12px;
    font-weight: 500;
    text-align: left;
    text-transform: none;
}

.metric-card__value--text {
    font-size: 26px;
    line-height: 1.2;
}

.heat-map-panel {
    overflow: hidden;
}

.map-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    color: #5f6f82;
    font-size: 12px;
    font-weight: 600;
}

.map-legend span {
    display: inline-flex;
    gap: 6px;
    align-items: center;
}

.map-legend i {
    width: 24px;
    height: 11px;
    border: 1px solid rgba(23, 32, 51, 0.08);
    border-radius: 999px;
}

.heat-map-layout {
    display: block;
}

.turkey-map-shell {
    min-width: 0;
    overflow: auto;
    border: 1px solid #f4dddd;
    border-radius: 8px;
    background:
        linear-gradient(180deg, #fffdfd, #fff8f8);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.turkey-map {
    display: block;
    width: 100%;
    min-width: 980px;
    height: auto;
}

.turkey-map__bg {
    fill: #fffdfd;
}

.turkey-map__province {
    stroke: rgba(255, 255, 255, 0.78);
    stroke-width: 0.7;
    vector-effect: non-scaling-stroke;
    transition: fill 160ms ease, filter 160ms ease, stroke 160ms ease;
}

.turkey-map__province:hover {
    filter: saturate(1.06) brightness(0.98);
    stroke: #b94f55;
    stroke-width: 1.15;
}

.turkey-map__label {
    fill: #263447;
    stroke: rgba(255, 255, 255, 0.88);
    stroke-width: 2.5px;
    paint-order: stroke;
    dominant-baseline: middle;
    font-size: 6.8px;
    font-weight: 700;
    letter-spacing: 0;
    pointer-events: none;
    text-anchor: middle;
}

.turkey-map__label-value {
    fill: #a94f55;
    font-size: 6.2px;
    font-weight: 800;
}

.map-side-panel,
.map-bottom-panel {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 18px;
    border: 1px solid #f4dddd;
    border-radius: 8px;
    background:
        linear-gradient(180deg, #ffffff, #fffafa);
}

.map-side-panel h3,
.map-bottom-panel h3 {
    margin: 0 0 14px;
    color: var(--text-main);
    font-size: 18px;
    font-weight: 700;
}

.map-bottom-panel {
    margin-top: 18px;
}

.map-rank-list {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.map-rank-row {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 10px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: #172033;
    background: rgba(249, 246, 246, 0.72);
    transition: background-color 0.16s ease, border-color 0.16s ease;
}

.map-rank-row:hover {
    border-color: #efd1d1;
    background: #fffdfd;
}

.map-rank-row span {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: linear-gradient(135deg, #fde8e8, #fff7f7);
    color: #b45757;
    font-size: 12px;
    font-weight: 700;
}

.map-rank-row div {
    display: grid;
    min-width: 0;
    gap: 7px;
}

.map-rank-row strong {
    overflow: hidden;
    font-size: 14px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.map-rank-row em {
    color: #5f6f82;
    font-size: 13px;
    font-style: normal;
    font-weight: 600;
}

@media (max-width: 1040px) {
    .metric-grid,
    .step-grid,
    .two-column,
    .metric-grid--four,
    .chart-grid,
    .plot-grid,
    .heat-map-layout,
    .map-rank-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 820px) {
    .app-header {
        align-items: flex-start;
        flex-direction: column;
        padding: 16px;
    }

    .app-header__top,
    .header-actions,
    .filter-bar,
    .filter-controls {
        width: 100%;
    }

    .app-header__top,
    .filter-bar {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .filter-bar {
        display: grid;
        grid-template-columns: 1fr;
        grid-template-areas:
            "title"
            "controls"
            "meta";
    }

    .filter-meta {
        margin-bottom: 0;
    }

    .filter-group {
        align-items: flex-start;
        flex-direction: column;
        flex: 1 1 150px;
    }

    .filter-input {
        width: 100%;
    }

    .filter-bar .filter-input {
        min-width: 0;
        width: 100%;
    }

    .filter-bar #filter_year,
    .filter-bar #filter_start,
    .filter-bar #filter_end {
        min-width: 0;
    }

    .tabs-container {
        gap: 8px;
        padding: 10px 16px;
    }

    .main-content {
        width: 100%;
        padding: 18px 12px 44px;
    }

    .demand-filter-form {
        grid-template-columns: 1fr;
    }

    .demand-filter-actions {
        justify-content: stretch;
    }

    .demand-filter-actions .btn {
        flex: 1 1 0;
    }

    .panel__header {
        flex-direction: column;
    }

    .bar-row,
    .stack-row,
    .hplot__row,
    .hplot__axis,
    .status-plot__row,
    .status-plot__axis,
    .status-breakdown__row,
    .status-breakdown__axis,
    .status-matrix__row,
    .status-matrix__xaxis,
    .previous-flow__row,
    .previous-flow__head,
    .previous-flow__axis {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .previous-flow__head {
        display: none;
    }

    .bar-row strong,
    .stack-row strong,
    .hplot__label,
    .status-plot__group,
    .status-breakdown__group,
    .status-matrix__ylabel,
    .previous-flow__label {
        text-align: left;
    }

    .previous-flow__row strong,
    .previous-flow__count {
        justify-self: start;
    }

    .status-matrix__cells,
    .status-matrix__xlabels {
        grid-template-columns: repeat(var(--status-count), minmax(58px, 1fr));
        gap: 6px;
        overflow-x: auto;
        padding-bottom: 2px;
    }

    .vplot {
        grid-template-columns: 1fr;
    }

    .vplot__ylabel,
    .vplot__legend {
        display: none;
    }

    .vplot__bars {
        gap: 14px;
        padding: 0 10px;
    }

}

@media (max-width: 700px) {
    .login-body {
        padding: 18px;
    }

    .login-card {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .login-brand-panel {
        min-height: 250px;
        padding: 30px;
    }

    .login-brand-copy h1 {
        font-size: 32px;
    }

    .login-form-panel {
        padding: 34px 30px 30px;
    }
}

@media (max-width: 520px) {
    .app-brand {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .app-brand-subtitle {
        padding-left: 0;
        border-left: 0;
    }

    .app-brand__logo {
        width: 124px;
        height: 34px;
    }

    .header-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .header-actions .btn,
    .header-form,
    .header-form .btn {
        width: 100%;
    }

    .page-heading h1 {
        font-size: 24px;
    }

    .login-brand-panel {
        min-height: 220px;
        padding: 24px;
    }

    .login-logo-shell {
        min-height: 66px;
        padding: 12px 14px;
    }

    .login-logo-img {
        width: min(300px, 100%);
        height: 58px;
    }

    .login-form-panel {
        padding: 28px 22px 24px;
    }

    .login-header h2 {
        font-size: 24px;
    }
}

/* === Admin paneli: alt sekme, kullanici tablosu ve formlar === */
.tabs-container--sub {
    padding: 6px;
    margin: 0 0 18px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: 0 6px 16px rgba(30, 65, 95, 0.06);
}

.btn--danger {
    border-color: var(--danger);
    color: #ffffff;
    background: var(--danger);
}

.btn--danger:hover {
    border-color: #b03a4c;
    background: #b03a4c;
    color: #ffffff;
}

.btn--sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn--icon {
    gap: 7px;
}

.btn--icon svg {
    flex: 0 0 auto;
}

.table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.table-actions form {
    margin: 0;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px 20px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-field label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
}

.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="password"] {
    padding: 9px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text-main);
    background: #ffffff;
}

.form-field input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(34, 152, 211, 0.16);
}

.form-field--check {
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

.form-field--check label {
    order: 2;
    font-weight: 500;
}

.form-field--check input {
    order: 1;
    width: 18px;
    height: 18px;
}

.form-hint {
    font-size: 12px;
    color: var(--text-muted);
}

.form-error {
    font-size: 12px;
    color: var(--danger);
    font-weight: 600;
}

.form-actions {
    grid-column: 1 / -1;
    display: flex;
    gap: 12px;
    align-items: center;
}
