/* Portalın kendi stilleri; tema dosyalarına (wwwroot/theme) dokunulmaz. */
@font-face { font-family: "Barlow Semi Condensed"; font-weight: 600; font-display: swap; src: url("../fonts/barlow-semi-condensed-latin-ext-600-normal.woff2") format("woff2"); unicode-range: U+0100-02FF, U+1E00-1EFF, U+20A0-20CF; }
@font-face { font-family: "Barlow Semi Condensed"; font-weight: 600; font-display: swap; src: url("../fonts/barlow-semi-condensed-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+2000-206F, U+20AC; }
@font-face { font-family: "Barlow Semi Condensed"; font-weight: 700; font-display: swap; src: url("../fonts/barlow-semi-condensed-latin-ext-700-normal.woff2") format("woff2"); unicode-range: U+0100-02FF, U+1E00-1EFF, U+20A0-20CF; }
@font-face { font-family: "Barlow Semi Condensed"; font-weight: 700; font-display: swap; src: url("../fonts/barlow-semi-condensed-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+2000-206F, U+20AC; }

:root { --portal-navy: #17324d; --portal-yellow: #f5b81c; --sign: "Barlow Semi Condensed", "Arial Narrow", sans-serif; }
.print-only { display: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* Kurum renkleri: üst çubuk ve sol menü */
.portal-navbar { --navbar-bg: var(--portal-navy); border-bottom: 3px solid var(--portal-yellow); }
.sidebar-main.sidebar-dark { --sidebar-bg: var(--portal-navy); }
.portal-brand { display: inline-flex; align-items: center; gap: .65rem; color: #fff; text-decoration: none; padding: .35rem 0; white-space: nowrap; }
.portal-brand:hover { color: #fff; }
.portal-brand b { display: block; font-weight: 600; font-size: 1rem; line-height: 1.15; }
.portal-brand small { display: block; font-size: .75rem; opacity: .75; line-height: 1.2; }
.portal-avatar { display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--portal-yellow); color: var(--portal-navy); font-weight: 600; }
.nav-sidebar .nav-link > i { width: var(--icon-font-size); flex-shrink: 0; text-align: center; }
.sidebar-main .nav-sidebar .nav-link { --nav-link-padding-y: .4rem; }
.sidebar-main .nav-item-header { font-size: .75rem; font-weight: 500; opacity: .65; padding-top: .8rem; padding-bottom: .2rem; }
.dropdown-menu .dropdown-header { text-transform: none; font-size: .875rem; }
@media (min-width: 992px) {
  .layout-static .sidebar-main.sidebar-expand-lg .sidebar-content { position: sticky; top: 0; max-height: 100vh; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #3d5c76 transparent; }
}

/* Başlık şeridi */
.page-header-content { gap: .5rem 1.25rem; padding-top: .75rem; padding-bottom: .75rem; min-height: 3.75rem; }
.page-header .page-title { font-size: 1.125rem; font-weight: 600; margin: 0; padding: 0; min-width: 0; overflow-wrap: anywhere; }
.page-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-left: auto; }
.page-actions:empty { display: none; }
.lead-note { max-width: 78ch; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; }

/* Kart ve tablo */
.card-header { display: flex; flex-wrap: wrap; gap: .25rem 1rem; align-items: center; justify-content: space-between; }
.card h2 { font-size: 1rem; font-weight: 600; margin: 0; }
.card h3 { font-size: .9375rem; font-weight: 600; margin: 0; }
summary.card-header { display: list-item; list-style-position: inside; cursor: pointer; }
details:not([open]) > summary.card-header { border-bottom: 0; }
.card .table { margin: 0; --table-cell-padding-x: 1rem; --table-cell-padding-y: .55rem; }
.card > .table-responsive:last-child > .table > :last-child > tr:last-child > * { border-bottom: 0; }
.table > thead th { white-space: nowrap; }
.table td { vertical-align: middle; }
.table td.desc { min-width: 16rem; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.form-control.num { text-align: right; }
.prewrap { white-space: pre-line; }
.linkbtn { white-space: nowrap; border: 0; background: none; padding: 0; color: var(--link-color); }
.linkbtn:hover { text-decoration: underline; }
tr.canceled td { color: var(--gray-600); text-decoration: line-through; }
tr.canceled td .keep { text-decoration: none; display: inline-block; }
tr.flagged > * { background-color: rgba(var(--danger-rgb), .07); }
tr.total > * { font-weight: 600; background-color: rgba(var(--black-rgb), .03); }
.empty { padding: 1.5rem 1.25rem; color: var(--gray-600); }
.badge { --badge-font-weight: 500; white-space: normal; text-align: left; }
.tag { background: rgba(var(--secondary-rgb), .12); color: var(--gray-700); }
.tag-ok { background: rgba(var(--success-rgb), .12); color: #0a6b4b; }
.tag-warn { background: rgba(var(--warning-rgb), .18); color: #8a4413; }
.tag-bad { background: rgba(var(--danger-rgb), .12); color: #b42323; }
.alert { white-space: pre-line; }
.filter { display: flex; flex-wrap: wrap; gap: .75rem; align-items: end; padding: 1rem 1.25rem; border-bottom: 1px solid var(--border-color); }
.filter > div:not(.form-check) { min-width: 10rem; }
.filter .form-label { margin-bottom: .25rem; }
.pager { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; justify-content: space-between; padding: .75rem 1.25rem; border-top: 1px solid var(--border-color); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 1rem 1.5rem; margin: 0; }
.facts dt { font-weight: 400; color: var(--gray-600); font-size: .8125rem; }
.facts dd { margin: 0; font-weight: 500; }

/* Formlar */
.form-narrow { max-width: 48rem; }
.form-wide { max-width: 62rem; }
.form-label { font-weight: 500; }
.field-validation-error, .field-error { display: block; color: var(--danger); margin-top: .25rem; }
.input-validation-error { border-color: var(--danger); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.25rem; }
.grid-2 > * { min-width: 0; }
.grid-2 .wide { grid-column: 1 / -1; }
.columns { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 1.25rem; align-items: start; }
.select2-container { max-width: 100%; }
.select2-container--focus .select2-selection, .select2-container--open .select2-selection { border-color: var(--primary) !important; }
.lines { display: grid; gap: .75rem; }
.line { display: grid; grid-template-columns: minmax(0, 2.4fr) minmax(0, 1fr) minmax(0, 1.5fr) minmax(0, 1.1fr) auto; gap: .5rem; align-items: end; }
.line.three { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1.6fr) auto; }
.line.use { grid-template-columns: minmax(0, 2fr) minmax(0, .9fr) 4rem minmax(0, 1.8fr) auto; }
.line .form-label { font-size: .8125rem; color: var(--gray-600); margin-bottom: .2rem; }

/* Araçlar kendi plakasıyla görünür */
.plate { display: inline-flex; align-items: stretch; font-family: var(--sign); font-weight: 700; font-size: 1rem; line-height: 1; color: #111d27; background: #fff; border: 1.5px solid #1d2b36; border-radius: 4px; overflow: hidden; white-space: nowrap; text-decoration: none; }
.plate::before { content: "TR"; background: #1c4fa0; color: #fff; font-size: .58em; display: flex; align-items: end; padding: 0 .3em .3em; }
.plate > span { padding: .26em .5em .28em; }
.plate.machine { background: #fbd460; }
.plate.machine::before { content: none; }
a.plate:hover { color: #111d27; box-shadow: 0 0 0 2px var(--gray-400); }
.canceled .plate { opacity: .55; }
tr.canceled td .plate.keep { display: inline-flex; }
.page-title .plate { font-size: 1.5rem; vertical-align: middle; }

/* Pompa sayacı */
.meter { background: #14222e; border-radius: .5rem; padding: .9rem 1rem 1rem; color: #cfdbe4; }
.meter-row { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; margin-bottom: .5rem; }
.meter input { width: 100%; font-family: var(--sign); font-weight: 700; font-variant-numeric: tabular-nums; font-size: clamp(2.1rem, 9vw, 3rem); letter-spacing: .12em; text-align: right; color: #fff; background: #04090d; border: 2px solid #43586a; border-radius: 5px; padding: .15rem .6rem; }
.meter input:focus { border-color: var(--portal-yellow); outline: none; }
.meter .calc { min-height: 1.5em; margin-top: .5rem; }
.meter .calc b { color: var(--portal-yellow); font-weight: 600; }
.meter .calc.bad { color: #ffc4bb; }

/* Yakıt verme: telefonda pompa başında kullanılır, kutular büyük */
.pumpform { max-width: 36rem; margin: 0 auto; }
.pumpform .form-control, .pumpform .form-select { font-size: 1.1rem; padding: .6rem .8rem; }
.pumpform .step { margin-bottom: 1.1rem; }
.pumpform .liters input { font-family: var(--sign); font-weight: 700; font-size: 1.9rem; text-align: right; padding: .25rem .8rem; }
.pumpform .save { width: 100%; font-size: 1.2rem; padding: .85rem; }
.pick { list-style: none; margin: .5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(9.2rem, 1fr)); gap: .45rem; max-height: 21rem; overflow-y: auto; }
.pick button { width: 100%; min-height: 3.6rem; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: .25rem; background: var(--white); border: 1px solid var(--border-color); border-radius: var(--border-radius); padding: .4rem .55rem; text-align: left; }
.pick button:hover { border-color: var(--primary); }
.pick small { color: var(--gray-600); line-height: 1.1; }
.picked { display: flex; align-items: center; justify-content: space-between; gap: 1rem; border: 2px solid var(--primary); border-radius: var(--border-radius); padding: .6rem .8rem; }
.picked .plate { font-size: 1.5rem; }
#newVehicle { white-space: normal; }

/* Depo göstergesi */
.tank { height: 1.5rem; border-radius: var(--border-radius); background: var(--gray-200); position: relative; overflow: hidden; }
.tank > i { position: absolute; inset: 0 auto 0 0; background: var(--primary); }
.tank.low > i { background: var(--danger); }
.tank > u { position: absolute; top: 0; bottom: 0; border-left: 2px dashed var(--gray-800); }
.depot-qty { font-size: 1.9rem; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }

/* Giriş */
.auth-body { background: var(--portal-navy); }
.auth-card { width: min(24rem, 100%); }
.auth-card .card { border: 0; border-top: 5px solid var(--portal-yellow); box-shadow: 0 1rem 3rem rgba(0, 0, 0, .35); }

@media (max-width: 991.98px) {
  .columns { grid-template-columns: minmax(0, 1fr); gap: 0; }
}
@media (max-width: 640px) {
  .content { padding: 1rem .75rem; }
  .page-header-content { padding-left: .75rem; padding-right: .75rem; }
  .page-actions { margin-left: 0; }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .line, .line.three, .line.use { grid-template-columns: 1fr 1fr; border: 1px solid var(--border-color); border-radius: var(--border-radius); padding: .6rem; }
  .line > :first-child { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

@media print {
  html { font-size: 12px; }
  .print-only { display: block !important; }
  .columns { gap: 0; }
  .columns > div:last-child .card, .card-header { break-inside: avoid; break-after: auto; }
  tr { break-inside: avoid; }
  .no-print, .filter, .pager, .btn-to-top, .alert-success { display: none !important; }
  body, .content-inner, .content-wrapper, .page-content { background: #fff !important; display: block !important; overflow: visible !important; }
  .page-header { box-shadow: none !important; border: 0; }
  .page-header-content, .content { padding: 0 !important; }
  .card { border: 0; box-shadow: none; margin-bottom: .6rem; }
  .card-header, .card-body { padding: .3rem 0; background: none; }
  .card .table { --table-cell-padding-x: .4rem; --table-cell-padding-y: .2rem; }
  .plate { border: 0; background: none !important; font-size: 1em; }
  .plate::before { content: none; }
  .plate > span { padding: 0; }
  a { color: inherit !important; text-decoration: none !important; }
}
