﻿/* Sirket paneli stilleri. Tema degerleri (--fiko-*) global styles.scss'ten gelir. */

/* TAM SAYFA: yan panel/arka perde yok; sidebar'in da ustunu kaplar. Geri donus "Sohbete don" ya da Esc.
   Tablo genis oldugu icin icerik 1400px'e kadar ortalanir (--gutter), dar ekranda kenarlara 1.1rem kalir. */
:host {
  --gutter: max(1.1rem, calc((100vw - 1400px) / 2));
  position: fixed;
  inset: 0;
  z-index: 50;
  display: block;
  background: var(--fiko-bg);
}

.page {
  display: flex;
  flex-direction: column;
  height: 100%;
  animation: fade 0.15s ease-out;
}

@keyframes fade { from { opacity: 0; } }

header {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding: 0.9rem var(--gutter);
  border-bottom: 1px solid var(--fiko-line);
  background: var(--fiko-panel);
}

h2 { margin: 0; font-size: 1rem; letter-spacing: 0.06em; }
.sub { margin: 0.15rem 0 0; font-size: 0.68rem; color: var(--fiko-muted); }
.x {
  flex: none;
  border: 1px solid var(--fiko-line);
  border-radius: 9px;
  background: none;
  color: var(--fiko-muted);
  font-size: 0.82rem;
  line-height: 1;
  padding: 0.5rem 0.8rem;
  cursor: pointer;
}
.x:hover { color: var(--fiko-text); border-color: var(--fiko-accent-line); }

.pad { padding: 0 var(--gutter); }
.hint { font-size: 0.68rem; color: var(--fiko-warn); }
.notice { font-size: 0.72rem; color: var(--fiko-ok); }
.muted { color: var(--fiko-muted); font-size: 0.74rem; }

.toolbar {
  display: flex;
  gap: 0.4rem;
  padding: 0.8rem var(--gutter) 0.4rem;
  flex-wrap: wrap;
}

.search { flex: 1; min-width: 10rem; }

.summary { padding: 0.4rem var(--gutter); }

.form {
  margin: 0.6rem var(--gutter);
  padding: 0.7rem;
  border: 1px solid var(--fiko-accent-line);
  border-radius: 10px;
  background: var(--fiko-surface);
  max-height: 45vh;
  overflow-y: auto;
}

.form h3 { margin: 0 0 0.4rem; font-size: 0.82rem; }

/* Kaydet-onay kartı: kullanıcı Kaydet'e basınca açılır, Onayla'ya basmadan yazılmaz. */
.confirm {
  margin-top: 0.6rem;
  padding: 0.6rem 0.7rem;
  border: 1px dashed var(--fiko-accent-line);
  border-radius: 8px;
  background: var(--fiko-panel);
}

.confirm h4 { margin: 0 0 0.4rem; font-size: 0.76rem; }
.confirm dl { margin: 0 0 0.5rem; display: grid; gap: 0.2rem 0.9rem; }
.confirm .actions { margin-top: 0; }
.fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: 0.45rem; }
.f { display: flex; flex-direction: column; gap: 0.15rem; }
.f.wide { grid-column: 1 / -1; }
.form label { font-size: 0.66rem; color: var(--fiko-muted); }
.req { color: var(--fiko-danger); }
.actions { display: flex; gap: 0.4rem; justify-content: flex-end; margin-top: 0.6rem; }

.list { padding: 0.4rem var(--gutter) 1.2rem; overflow-y: auto; flex: 1; min-height: 0; }
.list > .pad { padding-inline: 0; }
.wrap { overflow-x: auto; border: 1px solid var(--fiko-line); border-radius: 8px; }

table { width: 100%; border-collapse: collapse; font-size: 0.74rem; }

th {
  position: sticky;
  top: 0;
  background: var(--fiko-surface);
  text-align: left;
  border-bottom: 1px solid var(--fiko-line);
  padding: 0;
  white-space: nowrap;
}

th button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.4rem 0.5rem;
  border: 0;
  background: none;
  color: var(--fiko-muted);
  font: inherit;
  cursor: pointer;
}

th button:hover { color: var(--fiko-accent); }
.arrow { color: var(--fiko-accent); font-size: 0.6rem; }

td {
  padding: 0.35rem 0.5rem;
  border-bottom: 1px solid var(--fiko-line);
  max-width: 20rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

tr:hover td { background: var(--fiko-surface); }
.exp { width: 1.6rem; text-align: center; }
.ops { width: 9rem; text-align: right; white-space: nowrap; }

.toggle {
  border: 1px solid var(--fiko-line);
  background: none;
  color: var(--fiko-muted);
  border-radius: 4px;
  width: 1.15rem;
  height: 1.15rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.toggle:hover { color: var(--fiko-accent); border-color: var(--fiko-accent-line); }

.mini {
  border: 1px solid var(--fiko-line);
  background: none;
  color: var(--fiko-muted);
  border-radius: 5px;
  font-size: 0.62rem;
  padding: 0.12rem 0.45rem;
  cursor: pointer;
  margin-left: 0.25rem;
}

.mini:hover:not(:disabled) { color: var(--fiko-accent); border-color: var(--fiko-accent-line); }
.mini.danger:hover:not(:disabled) { color: var(--fiko-danger); border-color: var(--fiko-danger-line); }
.mini:disabled { opacity: 0.45; cursor: not-allowed; }

.detail td { white-space: normal; background: var(--fiko-panel); }

dl {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
  gap: 0.2rem 0.9rem;
}

.pair { display: flex; gap: 0.4rem; border-bottom: 1px dashed var(--fiko-line); padding: 0.15rem 0; }
.pair dt { color: var(--fiko-muted); min-width: 6.5rem; font-size: 0.68rem; }
.pair dd { margin: 0; word-break: break-word; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

/* CSV dosya secici: butun gibi gorunen, gercek <input type="file"> gizli. */
.filebtn {
  border: 1px solid var(--fiko-line);
  background: none;
  color: var(--fiko-muted);
  border-radius: 6px;
  font-size: 0.72rem;
  padding: 0.3rem 0.6rem;
  cursor: pointer;
  white-space: nowrap;
}

.filebtn:hover { color: var(--fiko-accent); border-color: var(--fiko-accent-line); }
.filebtn.disabled { opacity: 0.45; cursor: not-allowed; }
.filebtn input[type="file"] { display: none; }
