:root {
  color-scheme: light;
  --ink: #17211f;
  --muted: #62706b;
  --line: #dfe7e2;
  --panel: #ffffff;
  --soft: #f4f7f1;
  --field: #f9fbf8;
  --teal: #107b75;
  --teal-dark: #0b5652;
  --coral: #d86448;
  --gold: #c89b2f;
  --blue: #406b9a;
  --shadow: 0 18px 50px rgba(21, 40, 34, 0.1);
  --radius: 8px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--soft);
  color: var(--ink);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px;
  background: #17211f;
  color: #f9fbf8;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.brand-block,
.nav-item,
.topbar,
.top-actions,
.panel-heading,
.modal-heading,
.modal-actions {
  display: flex;
  align-items: center;
}

.brand-block {
  gap: 14px;
}

.brand-logo {
  width: 74px;
  height: 54px;
  object-fit: contain;
  border-radius: var(--radius);
  background: white;
  padding: 7px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0;
  font-size: 0.72rem;
  font-weight: 800;
}

.sidebar .eyebrow {
  color: #b9cbc3;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 1.16rem;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  line-height: 1.08;
}

h3 {
  margin-bottom: 0;
  font-size: 1.05rem;
}

.nav-list {
  display: grid;
  gap: 8px;
}

.nav-item {
  gap: 10px;
  color: #d7e4de;
  text-decoration: none;
  min-height: 42px;
  padding: 0 12px;
  border-radius: var(--radius);
}

.nav-item span {
  width: 20px;
  text-align: center;
}

.nav-item.active,
.nav-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.side-summary {
  margin-top: auto;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
}

.side-summary p,
.side-summary span {
  color: #b9cbc3;
  display: block;
  margin: 0;
}

.side-summary strong {
  display: block;
  margin: 8px 0;
}

.main-content {
  padding: 28px;
  display: grid;
  gap: 20px;
}

.topbar {
  justify-content: space-between;
  gap: 18px;
}

.top-actions {
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.primary-button,
.secondary-button,
.danger-button,
.icon-button,
.segment {
  border: 1px solid transparent;
  border-radius: var(--radius);
  min-height: 40px;
  padding: 0 14px;
  font-weight: 750;
}

.primary-button {
  background: var(--teal);
  color: white;
}

.primary-button:hover {
  background: var(--teal-dark);
}

.secondary-button,
.segment,
.icon-button {
  background: var(--panel);
  border-color: var(--line);
  color: var(--ink);
}

.danger-button {
  background: #fff4f0;
  color: #a43f2f;
  border-color: #f4c8bb;
}

.icon-button {
  width: 40px;
  padding: 0;
  font-size: 1.1rem;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 14px;
}

.status-card,
.table-panel,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.status-card {
  padding: 18px;
  display: grid;
  gap: 14px;
}

.status-card div:first-child {
  min-height: 72px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}

.status-card span,
#resultCount {
  color: var(--muted);
}

.status-card span {
  font-size: 0.92rem;
  line-height: 1.25;
}

.status-card strong {
  font-size: 2rem;
  line-height: 1;
}

.status-bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9efea;
}

.status-bar span {
  display: block;
  width: 8%;
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 360px) 1fr;
  gap: 12px;
  align-items: end;
}

.search-field,
label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--field);
  color: var(--ink);
  min-height: 42px;
  padding: 10px 12px;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(16, 123, 117, 0.14);
}

textarea {
  resize: vertical;
}

.segmented {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.segment {
  white-space: nowrap;
}

.segment.active {
  background: #e6f3ef;
  border-color: #a8d2c8;
  color: var(--teal-dark);
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
  align-items: start;
}

.workspace-grid.stars-mode {
  grid-template-columns: minmax(0, 1fr);
}

.notes-workspace {
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
  min-height: 590px;
}

.notes-index,
.note-editor-panel {
  min-width: 0;
}

.notes-index-heading {
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
}

#notesCount,
.note-empty span,
.note-card span,
#noteSavedState {
  color: var(--muted);
  font-size: 0.82rem;
}

.note-cards {
  display: grid;
  align-content: start;
  max-height: 650px;
  overflow-y: auto;
}

.note-card {
  width: 100%;
  display: grid;
  gap: 5px;
  padding: 14px 18px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.note-card:hover {
  background: #f7faf6;
}

.note-card.active {
  background: #e6f3ef;
  box-shadow: inset 4px 0 0 var(--teal);
}

.note-card strong,
.note-card span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.note-card-empty {
  padding: 24px 18px;
  color: var(--muted);
  line-height: 1.5;
}

.note-editor-panel {
  padding: 22px;
}

.note-empty {
  min-height: 540px;
  display: grid;
  place-content: center;
  gap: 7px;
  text-align: center;
}

.note-editor {
  min-height: 540px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 16px;
}

.note-body-field {
  min-height: 0;
}

#notebookTitle {
  font-size: 1.08rem;
  font-weight: 750;
}

#notebookBody {
  height: 100%;
  min-height: 410px;
  resize: vertical;
  line-height: 1.6;
}

.note-editor-footer,
.note-editor-footer > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.note-editor-footer {
  justify-content: space-between;
}

.table-panel,
.panel {
  min-width: 0;
}

.panel-heading {
  justify-content: space-between;
  gap: 14px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.list-note {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.panel-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.panel-heading.compact {
  border-bottom: 0;
  padding-bottom: 8px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  /*
    Tanimli sutun genisliklerinin toplami. Bundan dusuk olursa tarayici tum
    sutunlari orantili sikistirir ve URUN gibi sutunlar okunmaz hale gelir.
    Dar ekranda .table-wrap yatay kaydirir.
  */
  min-width: 1360px;
}

table.stars-table {
  min-width: 720px;
}

th,
td {
  text-align: left;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0;
}

/*
  AD sutunu. Icerigi iki satirlidir (isim + @kullanici) ve komsu sutunlarin
  aksine hicbir genislik verilmemisti; sutun asgari genislige sikisip icerik
  hucrenin disina tasiyor, TEL NO sutununun ustune biniyordu.
*/
th:nth-child(1),
td:nth-child(1) {
  width: 260px;
  min-width: 260px;
}

th:nth-child(2),
td:nth-child(2) {
  width: 180px;
  min-width: 180px;
  white-space: nowrap;
}

th:nth-child(3),
td:nth-child(3) {
  width: 240px;
}

th:nth-child(6),
td:nth-child(6) {
  width: 150px;
  min-width: 150px;
  white-space: nowrap;
}

th:nth-child(7),
td:nth-child(7) {
  width: 300px;
  min-width: 300px;
}

.stars-table th:nth-child(1),
.stars-table td:nth-child(1) {
  width: 260px;
}

.stars-table th:nth-child(2),
.stars-table td:nth-child(2) {
  width: 220px;
  min-width: 220px;
}

.stars-table th:nth-child(3),
.stars-table td:nth-child(3) {
  width: auto;
  min-width: 300px;
}

tbody tr:hover {
  background: #fbf8f2;
}

.person {
  display: grid;
  gap: 3px;
  /* Izgara ogesi olarak kendi icerigi kadar genis kalmaya zorlamasin. */
  min-width: 0;
}

/*
  Uzun kullanici adlari (ornegin "partidevametmeli2") tek parca kelimedir;
  sarilamadiklari icin hucreden tasiyorlardi. Bosluk yoksa kelimenin
  icinden kirilmasina izin veriyoruz.
*/
.person strong,
.person span {
  overflow-wrap: anywhere;
}

.drag-person-cell {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.drag-handle {
  width: 22px;
  min-height: 34px;
  display: grid;
  place-items: center;
  color: #8a9691;
  cursor: grab;
  user-select: none;
  font-size: 1.05rem;
  font-weight: 800;
}

.drag-handle:active {
  cursor: grabbing;
}

tbody tr.dragging {
  opacity: 0.45;
}

tbody tr.drop-before {
  box-shadow: inset 0 3px 0 var(--teal);
}

tbody tr.drop-after {
  box-shadow: inset 0 -3px 0 var(--teal);
}

.person strong {
  font-size: 0.95rem;
}

.person span {
  color: var(--muted);
  font-size: 0.82rem;
}

.product-cell {
  width: 100%;
  min-width: 220px;
  display: grid;
  gap: 7px;
  align-content: center;
}

.product-cell strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.28;
  font-size: 0.92rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
}

.status-step-1 {
  background: #edf2f8;
  color: var(--blue);
}

.status-step-2 {
  background: #fff5dc;
  color: #8a6513;
}

.status-step-3 {
  background: #e6f3ef;
  color: var(--teal-dark);
}

.status-step-4 {
  background: #f1ecfb;
  color: #5d468e;
}

.status-step-5 {
  background: #eaf4f8;
  color: #2c6478;
}

.status-step-6 {
  background: #eef5df;
  color: #5c6f24;
}

.status-step-7 {
  background: #f8e9e3;
  color: #994631;
}

.status-step-8 {
  background: #f8e9e3;
  color: #994631;
}

.status-step-9 {
  background: #eef2ff;
  color: #4357ad;
}

.status-step-10 {
  background: #e9f7ef;
  color: #28724a;
}

.status-step-11 {
  background: #f5ecff;
  color: #7544a5;
}

.status-step-12 {
  background: #f0f2f5;
  color: #586174;
}

.row-actions {
  display: flex;
  gap: 7px;
  justify-content: flex-end;
  align-items: center;
}

.row-actions button {
  min-height: 34px;
}

.row-status-select {
  width: 190px;
  min-height: 34px;
  padding: 6px 34px 6px 10px;
  background: white;
  font-weight: 750;
}

.edit-button {
  flex: 0 0 82px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--ink);
  font-weight: 800;
}

.edit-button:hover {
  border-color: #a8d2c8;
  background: #e6f3ef;
  color: var(--teal-dark);
}

.star-note-cell {
  display: grid;
  gap: 9px;
}

.note-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-start;
}

.note-button {
  min-height: 34px;
  border: 1px solid #a8d2c8;
  border-radius: var(--radius);
  background: #e6f3ef;
  color: var(--teal-dark);
  font-weight: 800;
}

.inline-note-editor {
  display: grid;
  gap: 8px;
  max-width: 560px;
}

.inline-note-editor textarea {
  min-height: 84px;
  line-height: 1.35;
}

.inline-note-editor button {
  width: fit-content;
}

.note-preview {
  max-width: 560px;
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.right-rail {
  display: grid;
  gap: 18px;
}

.task-list {
  display: grid;
  gap: 10px;
  padding: 0 18px 18px;
}

.task-item {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--field);
}

.task-dot {
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--coral);
}

.task-item strong {
  display: block;
  font-size: 0.9rem;
}

.task-item span {
  color: var(--muted);
  font-size: 0.82rem;
}

.modal {
  width: min(760px, calc(100vw - 28px));
  border: 0;
  border-radius: var(--radius);
  padding: 0;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.25);
}

.modal::backdrop {
  background: rgba(23, 33, 31, 0.5);
}

.modal form {
  padding: 20px;
}

.modal-heading {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.form-grid > label {
  align-self: start;
  align-content: start;
}

.angle-influencer-picker {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  gap: 8px;
}

.angle-influencer-add {
  min-width: 42px;
  width: 42px;
  padding: 0;
  font-size: 1.15rem;
}

.angle-influencer-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 26px;
}

.angle-influencer-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  max-width: 100%;
  padding: 3px 7px 3px 10px;
  border: 1px solid #a8d2c8;
  border-radius: 999px;
  background: #e6f3ef;
  color: var(--teal-dark);
  font-size: 0.8rem;
  font-weight: 750;
}

.angle-influencer-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.angle-influencer-chip button {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(16, 123, 117, 0.12);
  color: var(--teal-dark);
  padding: 0;
  font-weight: 900;
}

.wide {
  grid-column: 1 / -1;
}

.modal-actions {
  margin-top: 18px;
  justify-content: space-between;
  gap: 12px;
}

.modal-actions > div {
  display: flex;
  gap: 10px;
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
  }

  .nav-list {
    display: flex;
    flex-wrap: wrap;
  }

  .side-summary {
    margin-top: 0;
    margin-left: auto;
  }

  .status-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .workspace-grid {
    grid-template-columns: 1fr;
  }

  .notes-workspace {
    grid-template-columns: 1fr;
  }

  .note-cards {
    max-height: 260px;
  }
}

@media (max-width: 720px) {
  .main-content,
  .sidebar {
    padding: 18px;
  }

  .topbar,
  .toolbar {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .topbar {
    display: grid;
  }

  .top-actions {
    justify-content: stretch;
  }

  .top-actions .primary-button,
  .top-actions .secondary-button {
    flex: 1;
  }

  .status-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .side-summary {
    width: 100%;
    margin-left: 0;
  }

  .modal-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .modal-actions > div {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .note-editor-panel {
    padding: 16px;
  }

  .note-editor-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .note-editor-footer > div {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

/* ============================================================
   Giris kapisi
   Acilis perdesi (.auth-booting) -> ne panel ne form gorunur.
   Kilit (.auth-locked)           -> giris ekrani gorunur, panel gizli.
   Sinif yoksa                    -> panel bugunku gibi acik.
   ============================================================ */

.auth-gate {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(1100px 620px at 18% -12%, rgba(16, 123, 117, 0.16), transparent 62%),
    var(--soft);
}

.auth-booting .auth-gate,
.auth-locked .auth-gate {
  display: grid;
}

.auth-booting .app-shell,
.auth-locked .app-shell {
  display: none;
}

.auth-booting body,
.auth-locked body {
  overflow: hidden;
}

.auth-booting .auth-card,
.auth-locked .auth-splash {
  display: none;
}

/* Acilis perdesi: oturum cozulene kadar sadece marka gorunur. */
.auth-splash {
  display: grid;
  justify-items: center;
  gap: 18px;
}

.auth-splash-logo {
  width: 96px;
  height: 70px;
  object-fit: contain;
  border-radius: var(--radius);
  background: var(--panel);
  padding: 10px;
  box-shadow: var(--shadow);
}

.auth-splash-bar {
  width: 132px;
  height: 4px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
  position: relative;
}

.auth-splash-bar::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 44px;
  border-radius: inherit;
  background: var(--teal);
  animation: auth-splash-slide 1.1s ease-in-out infinite;
}

@keyframes auth-splash-slide {
  0% {
    transform: translateX(-46px);
  }
  100% {
    transform: translateX(132px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-splash-bar::after {
    animation: none;
    width: 100%;
  }
}

/* Giris karti */
.auth-card {
  width: min(420px, 100%);
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) * 2);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.auth-card-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.auth-card-head h1 {
  font-size: 1.24rem;
}

.auth-intro {
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 0.92rem;
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-form label {
  display: grid;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
}

.auth-form input {
  min-height: 44px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--field);
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 500;
  text-transform: none;
}

.auth-form input:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 1px;
  background: var(--panel);
}

.auth-error {
  margin: 0;
  padding: 11px 13px;
  border: 1px solid #f4c8bb;
  border-radius: var(--radius);
  background: #fff4f0;
  color: #a43f2f;
  font-size: 0.88rem;
  font-weight: 650;
}

.auth-submit {
  width: 100%;
  min-height: 46px;
  margin-top: 4px;
}

.auth-submit:disabled {
  background: var(--teal);
  opacity: 0.62;
  cursor: progress;
}

.auth-foot {
  margin: 20px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
}

/* Giris modulu yuklenemediginde gorunen uyari (failsafe). */
.auth-notice {
  position: fixed;
  inset: auto 16px 16px;
  z-index: 120;
  margin: 0;
  padding: 12px 16px;
  border: 1px solid #eddca8;
  border-radius: var(--radius);
  background: #fdf6e3;
  color: #7a5c12;
  font-size: 0.86rem;
  font-weight: 650;
  box-shadow: var(--shadow);
}

@media (max-width: 720px) {
  .auth-gate {
    padding: 16px;
  }

  .auth-card {
    padding: 22px;
  }
}

/* ============================================================
   Tasima ekrani (localStorage -> sunucu)
   Yerel veri varken ve sunucu bosken gorunur; aksi halde gizlidir.
   ============================================================ */

.migrate {
  display: grid;
  gap: 14px;
  padding: 22px 24px;
  border: 1px solid #e6d9a8;
  border-left: 4px solid var(--gold);
  border-radius: calc(var(--radius) * 1.5);
  background: #fffdf5;
  box-shadow: var(--shadow);
}

.migrate-head h3 {
  margin-bottom: 0;
}

.migrate-summary {
  margin: 0 0 14px;
  max-width: 70ch;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.migrate-bar {
  height: 8px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}

.migrate-bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
  transition: width 0.25s ease;
}

@media (prefers-reduced-motion: reduce) {
  .migrate-bar span {
    transition: none;
  }
}

.migrate-progress-text,
.migrate-result-text {
  margin: 10px 0 14px;
  font-size: 0.92rem;
  font-weight: 650;
}

.migrate-error-text {
  margin: 0 0 14px;
  padding: 12px 14px;
  max-width: 70ch;
  border: 1px solid #f4c8bb;
  border-radius: var(--radius);
  background: #fff4f0;
  color: #a43f2f;
  font-size: 0.9rem;
  font-weight: 650;
  line-height: 1.5;
}

.migrate-skipped {
  margin: 0 0 14px;
  padding-left: 20px;
  max-height: 180px;
  overflow-y: auto;
  color: var(--muted);
  font-size: 0.88rem;
}

.migrate-skipped li {
  padding: 2px 0;
}

.migrate-note {
  margin: 0;
  padding-top: 12px;
  border-top: 1px solid #eddca8;
  color: var(--muted);
  font-size: 0.82rem;
}

@media (max-width: 720px) {
  .migrate {
    padding: 18px;
  }

  .migrate button {
    width: 100%;
  }
}

/* Liste bildirimleri (siralama kaydedildi / kaydedilemedi). */
.list-notice {
  margin: 6px 0 0;
  padding: 8px 12px;
  max-width: 60ch;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--field);
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 650;
}

.list-notice.is-error {
  border-color: #f4c8bb;
  background: #fff4f0;
  color: #a43f2f;
}

/* ============================================================
   Kullanici yonetimi
   Mevcut panel dilini izler: .notes-workspace gibi iki sutunlu izgara,
   satirlar .note-card gibi ayirici cizgili, ayri kartlar degil.
   ============================================================ */

.users-workspace {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
  /* Sayfanin alti bos kalmasin; not defteriyle ayni yukseklik dili. */
  min-height: 590px;
  /* Genislik sinirlanmazsa satirin iki ucu birbirinden kopuk gorunuyor. */
  max-width: 1120px;
}

.users-add,
.users-list-panel {
  min-width: 0;
  align-content: start;
}

/*
  Panel basligi 18px ic bosluk kullaniyor; form da ayni hizada olmali.
  Bosluk verilmediginde etiketler iceride, giris kutulari kart kenarina
  kadar tasiyor ve kart kirik gorunuyordu.
*/
.users-notice {
  margin: 0 18px 14px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--field);
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 650;
  line-height: 1.5;
}

.users-notice.is-error {
  border-color: #f4c8bb;
  background: #fff4f0;
  color: #a43f2f;
}

.users-form {
  display: grid;
  gap: 12px;
  padding: 0 18px 18px;
}

.users-form label {
  display: grid;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
}

.users-form input {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--field);
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 500;
  text-transform: none;
}

.users-form input:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 1px;
  background: var(--panel);
}

.users-form input:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Parolaya ait yardimci eylemler: asil eylemden daha hafif ve alana yakin. */
.users-parola-araclari {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: -4px;
}

.ghost-button {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.ghost-button:hover:not(:disabled) {
  background: var(--soft);
  color: var(--ink);
}

.ghost-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Asil eylem tek basina ve tam genislikte: hiyerarsi belirgin olsun. */
.users-submit {
  width: 100%;
  margin-top: 4px;
}

.users-list {
  display: grid;
  align-content: start;
}

/* Satirlar ayri kartlar degil, .note-card gibi ayirici cizgili siralar. */
.user-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.user-row:last-child {
  border-bottom: 0;
}

.user-row:hover {
  background: #f7faf6;
}

.user-info {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.user-info strong {
  overflow-wrap: anywhere;
}

.user-info span {
  color: var(--muted);
  font-size: 0.82rem;
}

/*
  Silme engeli bir HATA degil, bilgidir: kirmizi/kalin degil, ikincil metin.
*/
.user-engel {
  color: var(--muted);
  font-weight: 500;
  font-style: italic;
}

.user-actions {
  display: flex;
  gap: 8px;
}

/* Pasif buton tiklanabilir gorunmesin. */
.user-actions button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  filter: grayscale(0.5);
}

.users-bos {
  padding: 24px 18px;
  color: var(--muted);
  font-size: 0.9rem;
}

.user-parola {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.user-parola input {
  flex: 1 1 220px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--field);
}

@media (max-width: 980px) {
  .users-workspace {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .user-row {
    grid-template-columns: 1fr;
  }

  .user-actions {
    justify-content: flex-start;
  }
}

/*
  Tasima cagrisi kayitlarla ilgilidir; Kullanicilar ve Not Defteri
  ekranlarinda yeri yoktur. Gorunurluk durumu tasima-ekrani'nda tutuldugu
  icin burada yalnizca gorsel olarak gizlenir, hidden'a dokunulmaz.
*/
body[data-panel="users"] .migrate,
body[data-panel="notes"] .migrate {
  display: none;
}
