/* Gösterge paneli: sekmeler, kart başlığı, Özetim ızgarası, "Kart ekle" penceresi. */

.ptabs { display: flex; gap: 2px; flex-wrap: wrap; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.ptabs a { padding: 9px 16px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.ptabs a:hover { color: var(--text); }
.ptabs a.on { color: var(--accent1); border-bottom-color: var(--accent1); }
.ptabs .pstar { color: #e0a800; }
.pbadge { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: #e5484d; color: #fff;
  font-size: 11px; line-height: 18px; text-align: center; margin-left: 4px; }

.pkpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-bottom: 14px; }
.phalves { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); gap: 14px; margin-bottom: 14px; }
.phalves > .card { margin-bottom: 0 !important; }

.phead { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.phead h2 { margin: 0; }
.phead-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.ppin { background: none; border: 1px solid var(--line); color: var(--muted); font-size: 12px; font-weight: 400;
  padding: 0 8px; height: 26px; border-radius: 6px; white-space: nowrap; }
.ppin:hover { color: var(--text); border-color: var(--accent1); filter: none; }
.ppin.on { color: #e0a800; }
.ppin:focus-visible { outline: 2px solid var(--accent2); outline-offset: 2px; }
.psmall .ppin { border: 0; padding: 0 2px; font-size: 15px; height: 22px; }
.psmall .ppin-text { display: none; }
.ppin-ask { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; flex-wrap: wrap; }
@media (max-width: 991.98px) { .ppin-text { display: none; } }

.pgauge { display: inline-block; width: 64px; height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; vertical-align: middle; margin-right: 6px; }
.pgauge i { display: block; height: 100%; }
.pill-count { font-weight: 700; font-size: 1.15em; color: #e5484d; }
.pill.pcrit { background: rgba(229, 72, 77, .16); color: #e5484d; }

.pkinds { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin: 8px 0; }
.pkind { display: inline-flex; align-items: center; gap: 3px; color: var(--text); font-size: 1.05em; line-height: 1.2; padding: 2px 4px; border-radius: 6px; }
/* Simge rakamın görünen boyunda: rakam yazı boyutunun %72'si, simge 24 birimlik kutunun 20 birimi. */
.pkind .kind-icon { height: .86em; vertical-align: 0; }
a.pkind:hover { background: rgba(116, 198, 157, .18); }
.pkind.off { opacity: .45; }

.pintro { display: flex; gap: 14px; align-items: flex-start; border-left: 4px solid var(--accent1); }
.pintro-text { flex: 1; min-width: 0; }
.psteps { margin: 8px 0 0; padding-left: 20px; }
.psteps li { margin-top: 3px; }
.psteps li.done { color: var(--muted); }
.psteps li.done::marker { content: "✓  "; color: var(--accent1); }

.psum-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; font-size: .9em; }
.psum-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.psum-wide-hint { display: none; }
html.psum-wide .psum-wide-hint { display: inline; }
html.psum-wide .psum-narrow-hint { display: none; }

/* İlk açılış (Panel.razor _ready): içerik hazırlanırken görünmez ama yerini tutar (ızgara ölçebilsin), üstünü iskelet
   örter. min-height: yükleme boyunca sayfa hep kaydırılır, kaydırma çubuğu gelip gidip sayfayı yana oynatmasın. */
.pload { position: relative; }
.pwait { min-height: 100vh; }
.pwait > .pbody { visibility: hidden; }
.pwait-cover { position: absolute; top: 0; left: 0; right: 0; z-index: 1; }

/* Özetim, ızgara kurulmadan ya da dar ekranda: kartlar sırasıyla. Geniş ekranda panel-grid.js gridstack'e geçirir.
   Izgara dizilene dek görünmez (psum-drawn): sekme değişiminde liste hâli bir an görünüp ızgaraya sıçramasın. */
.psum { display: grid; grid-template-columns: repeat(20, minmax(0, 1fr)); gap: 14px; }
.psum:not(.psum-drawn), .psum:not(.psum-drawn) ~ .padd { visibility: hidden; }
.psum-item { min-width: 0; position: relative; }
.psum-small { grid-column: span 5; }
.psum-half { grid-column: span 10; }
.psum-full { grid-column: span 20; }
.psum-item > .grid-stack-item-content > .card { height: 100%; margin-bottom: 0 !important; }
.psum-tools { display: none; }
@media (max-width: 991.98px) {
  .psum { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .psum-small { grid-column: span 1; }
  .psum-half, .psum-full { grid-column: span 2; }
}
@media (max-width: 640px) {
  .psum { grid-template-columns: minmax(0, 1fr); }
  .psum-small, .psum-half, .psum-full { grid-column: span 1; }
}

.psum.grid-stack { display: block; margin: -7px -7px 7px; width: auto; }
.psum.grid-stack > .psum-item { grid-column: auto; }
.psum.grid-stack > .psum-item > .grid-stack-item-content { overflow: visible; display: flex; flex-direction: column; cursor: grab; }
.psum.grid-stack > .psum-item > .grid-stack-item-content > * { flex: 1 1 auto; min-height: 0; }
.psum.grid-stack .grid-stack-item-content > .card { overflow: auto; height: auto; }
.psum.grid-stack .grid-stack-item-content :is(a, button, input, select, label, table, .leaflet-container) { cursor: auto; }
.psum.grid-stack .grid-stack-item-content :is(a, button) { cursor: pointer; }
.psum.grid-stack .ppin, .psum.grid-stack .ppin-ask { display: none; }
.psum.grid-stack > .psum-item.psum-measure > .grid-stack-item-content { bottom: auto; }
.psum.grid-stack > .psum-item.psum-measure .card { overflow: visible; }
.psum.grid-stack > .psum-item > .psum-tools { display: flex; position: absolute; top: 0; left: 50%; transform: translateX(-50%); z-index: 6;
  align-items: center; height: 22px; background: var(--panel-solid); border: 1px solid var(--line); border-radius: 0 0 6px 6px;
  color: var(--muted); font-size: 11.5px; opacity: 0; transition: opacity .12s; }
.psum.grid-stack > .psum-item:hover > .psum-tools, .psum.grid-stack > .psum-item:focus-within > .psum-tools,
.psum.grid-stack > .psum-item.ui-draggable-dragging > .psum-tools { opacity: 1; }
.psum-grip { cursor: grab; white-space: nowrap; padding: 0 8px; user-select: none; }
.psum-remove { border: 0; border-left: 1px solid var(--line); border-radius: 0; background: transparent; color: var(--muted); padding: 0 8px; height: 100%; }
.psum-remove:hover { color: #e5484d; filter: none; }
.psum.grid-stack > .psum-item:hover > .grid-stack-item-content > .card { border-color: var(--accent1); }
.psum.grid-stack > .psum-item.ui-draggable-dragging > .grid-stack-item-content { cursor: grabbing; }
/* gridstack'in köşe okunun rengi sabit: koyu temada kart üstünde kaybolmasın diye açık zemin. */
.psum.grid-stack > .psum-item > .ui-resizable-se { width: 20px; height: 20px; background-size: 16px; background-color: #fff;
  border-radius: 5px 0 9px 0; opacity: 0; transition: opacity .12s; right: 7px; bottom: 7px; }
.psum.grid-stack > .psum-item:hover > .ui-resizable-se { opacity: .9; }
.psum.grid-stack > .grid-stack-placeholder > .placeholder-content { background: rgba(116, 198, 157, .08); border: 2px dashed var(--accent1); border-radius: 10px; }
@media (hover: none) { .psum.grid-stack > .psum-item > .psum-tools { opacity: 1; } }

.psum-flash > .grid-stack-item-content > .card { animation: psum-flash 1.6s ease-out; }
@keyframes psum-flash { 0%, 40% { box-shadow: 0 0 0 3px var(--accent1); } 100% { box-shadow: 0 0 0 3px transparent; } }
.pempty { color: var(--muted); font-size: .9em; }

.padd { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 84px; margin-top: 14px; background: none;
  border: 2px dashed var(--line); border-radius: 10px; color: var(--text); font-weight: 600; }
.padd small { display: block; font-weight: 400; color: var(--muted); }
.padd:hover { border-color: var(--accent1); filter: none; }

.pmodal-back { position: fixed; inset: 0; background: rgba(0, 0, 0, .5); z-index: 60; }
.pmodal { position: fixed; z-index: 61; top: 6vh; left: 50%; transform: translateX(-50%); width: min(680px, calc(100vw - 32px));
  max-height: 88vh; overflow: auto; background: var(--panel-solid); border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.pmodal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.pmodal-head h2 { margin: 0; }
.pmodal-foot { display: flex; justify-content: flex-end; margin-top: 14px; }
.pcat-group { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 14px 0 6px; }
.pcat-item { display: flex; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; margin-bottom: 6px; }
.pcat-item > div { flex: 1; min-width: 0; }
.pcat-item b { display: block; }
.pcat-item .muted { font-size: .85em; }

.ptoast { position: fixed; left: 16px; bottom: 16px; z-index: 70; display: flex; gap: 12px; align-items: center; max-width: calc(100vw - 32px);
  background: var(--panel-solid); border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; box-shadow: 0 8px 28px rgba(0, 0, 0, .35); }
.ptoast button { background: none; border: 0; color: var(--accent1); font-weight: 600; padding: 0; height: auto; }

@media (prefers-reduced-motion: reduce) { .psum-tools { transition: none; } .psum-flash > .grid-stack-item-content > .card { animation: none; } }
