/* =========================================================================
   Elevatora PROJE — tasarım sistemi
   Kaynak: docs/reference-ui/design_tokens.json + docs/contracts/ui-visual-v07.md
   ========================================================================= */

@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: block;
}

:root {
  --primary: #16a34a;
  --primary-hover: #15803d;
  --primary-soft: #ecfdf3;
  --text: #0f172a;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --surface: #ffffff;
  --canvas: #f8fafc;
  --border: #e2e8f0;
  --border-soft: #eef2f6;
  --blue: #2563eb;
  --orange: #f59e0b;
  --red: #ef4444;
  --purple: #7c3aed;

  --green-soft: #ecfdf3;
  --blue-soft: #eff6ff;
  --orange-soft: #fffbeb;
  --red-soft: #fef2f2;
  --purple-soft: #f5f3ff;
  --gray-soft: #f1f5f9;

  --r-input: 8px;
  --r-card: 12px;
  --r-pill: 999px;

  --sidebar-w: 232px;
  --topbar-h: 68px;
  --rail-w: 320px;
  --page-pad: 24px;
  --gap: 16px;

  --shadow-card: 0 1px 2px rgb(15 23 42 / 4%), 0 6px 16px rgb(15 23 42 / 4%);
  --shadow-pop: 0 4px 6px rgb(15 23 42 / 5%), 0 12px 32px rgb(15 23 42 / 10%);

  --fast: 140ms;
  --normal: 200ms;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 21px;
  font-weight: 400;
  color: var(--text);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "cv11", "ss01";
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  border: 0;
  background: none;
  cursor: pointer;
}

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

svg {
  display: block;
  flex: none;
}

img {
  max-width: 100%;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

table {
  border-collapse: collapse;
  width: 100%;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

.num {
  font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------------- shell -- */

.shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  grid-template-rows: var(--topbar-h) minmax(0, 1fr);
  grid-template-areas:
    "topbar topbar"
    "sidebar main";
  min-height: 100vh;
}

.topbar {
  grid-area: topbar;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border-soft);
}

.brandbar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brandbar__logo {
  height: 30px;
  width: auto;
}

.brandbar__suffix {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--primary);
}

.topbar__divider {
  width: 1px;
  height: 26px;
  background: var(--border);
}

.topbar__title {
  font-size: 16px;
  font-weight: 500;
  color: #334155;
}

.topbar__spacer {
  flex: 1;
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.orgswitch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 12px 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-input);
  background: var(--surface);
  font-size: 13px;
  font-weight: 500;
  color: #334155;
  transition: border-color var(--fast);
}

.orgswitch:hover {
  border-color: #cbd5e1;
}

.iconbtn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--r-input);
  color: var(--muted);
  transition: background var(--fast), color var(--fast);
}

.iconbtn:hover {
  background: var(--gray-soft);
  color: var(--text);
}

.iconbtn__badge {
  position: absolute;
  top: 1px;
  right: 1px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: var(--r-pill);
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  line-height: 16px;
  text-align: center;
}

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--r-pill);
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.avatar--sm {
  width: 24px;
  height: 24px;
  font-size: 10px;
}

.avatar--xs {
  width: 20px;
  height: 20px;
  font-size: 9px;
}

.usermenu {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
}

/* -------------------------------------------------------------- sidebar -- */

.sidebar {
  grid-area: sidebar;
  display: flex;
  flex-direction: column;
  padding: 16px 12px;
  background: var(--surface);
  border-right: 1px solid var(--border-soft);
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav__item {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 44px;
  padding: 0 12px;
  border-radius: var(--r-input);
  color: #475569;
  font-size: 14px;
  font-weight: 500;
  transition: background var(--fast), color var(--fast);
}

.nav__item:hover {
  background: var(--gray-soft);
  color: var(--text);
}

.nav__item.is-active {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 600;
}

.nav__item.is-active svg {
  color: var(--primary);
}

.sidebar__spacer {
  flex: 1;
}

.nav__collapse {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-input);
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.nav__collapse:hover {
  background: var(--gray-soft);
}

/* ----------------------------------------------------------------- main -- */

.main {
  grid-area: main;
  min-width: 0;
  padding: var(--page-pad);
  background: var(--canvas);
}

.page {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

.page__head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.page__head--baseline {
  align-items: center;
}

.page__title {
  font-size: 30px;
  line-height: 36px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.page__subtitle {
  margin-top: 4px;
  font-size: 14px;
  color: var(--muted);
}

.page__actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* -------------------------------------------------------------- buttons -- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-radius: var(--r-input);
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: background var(--fast), border-color var(--fast), color var(--fast);
}

.btn--primary {
  background: var(--primary);
  color: #fff;
}

.btn--primary:hover {
  background: var(--primary-hover);
}

.btn--ghost {
  background: var(--surface);
  border-color: var(--border);
  color: #334155;
}

.btn--ghost:hover {
  background: var(--gray-soft);
}

.btn--outline {
  background: var(--surface);
  border-color: var(--primary);
  color: var(--primary);
}

.btn--outline:hover {
  background: var(--primary-soft);
}

.btn--square {
  width: 40px;
  padding: 0;
}

.btn--block {
  width: 100%;
}

.btn--sm {
  height: 32px;
  padding: 0 12px;
  font-size: 13px;
}

/* --------------------------------------------------------------- inputs -- */

.field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-input);
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
}

.field input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: none;
  font-size: 13px;
  color: var(--text);
}

.field input::placeholder {
  color: var(--muted-2);
}

.field--grow {
  display: flex;
  flex: 1;
}

.select {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-input);
  background: var(--surface);
  font-size: 13px;
  font-weight: 500;
  color: #475569;
}

.linkbtn {
  color: var(--primary);
  font-size: 13px;
  font-weight: 500;
}

/* ---------------------------------------------------------------- cards -- */

.card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
}

.card__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
}

.card__head--tight {
  padding-bottom: 12px;
}

.card__title {
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
}

.card__title-note {
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
}

.card__tools {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card__body {
  flex: 1;
  min-height: 0;
  padding: 0 20px 20px;
}

.card__body--flush {
  padding: 0;
}

.card__foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--border-soft);
  color: var(--primary);
  font-size: 13px;
  font-weight: 500;
}

.card__foot--between {
  justify-content: space-between;
}

/* ------------------------------------------------------------------ kpi -- */

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--gap);
}

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

.kpi {
  padding: 18px 20px 0;
}

.kpi__top {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 16px;
}

.kpi__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: var(--r-pill);
  color: #fff;
  flex: none;
}

.kpi__icon--square {
  border-radius: 12px;
}

.kpi__label {
  font-size: 13px;
  color: var(--muted);
}

.kpi__value {
  margin-top: 2px;
  font-size: 32px;
  line-height: 35px;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.kpi__unit {
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
  margin-left: 4px;
}

.kpi__foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 0 14px;
  border-top: 1px solid var(--border-soft);
  font-size: 12px;
  color: var(--muted);
}

.kpi__foot .delta {
  margin-left: auto;
}

.delta {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.delta--up {
  color: var(--primary);
}

.delta--down {
  color: var(--red);
}

.delta--warn {
  color: var(--red);
}

.delta--muted {
  color: var(--muted);
}

/* ------------------------------------------------------------- surfaces -- */

.bg-green {
  background: var(--primary);
}

.bg-blue {
  background: var(--blue);
}

.bg-orange {
  background: var(--orange);
}

.bg-purple {
  background: var(--purple);
}

.bg-red {
  background: var(--red);
}

.soft-green {
  background: var(--green-soft);
  color: var(--primary);
}

.soft-blue {
  background: var(--blue-soft);
  color: var(--blue);
}

.soft-orange {
  background: var(--orange-soft);
  color: #b45309;
}

.soft-red {
  background: var(--red-soft);
  color: #dc2626;
}

.soft-purple {
  background: var(--purple-soft);
  color: var(--purple);
}

.soft-gray {
  background: var(--gray-soft);
  color: #475569;
}

/* --------------------------------------------------------------- badges -- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 9px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.badge--pill {
  border-radius: var(--r-pill);
  height: 24px;
  padding: 0 10px;
}

.badge--lg {
  height: 26px;
  font-size: 12px;
  padding: 0 12px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: var(--r-pill);
  flex: none;
}

/* --------------------------------------------------------------- tables -- */

.table {
  font-size: 13px;
}

.table thead th {
  padding: 10px 16px;
  background: var(--canvas);
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  text-align: left;
  white-space: nowrap;
}

.table tbody td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: middle;
  white-space: nowrap;
}

.table td.wrap {
  white-space: normal;
}

.table tbody tr:last-child td {
  border-bottom: 0;
}

.table tbody tr:hover td {
  background: #fbfdff;
}

.table .num,
.table .ta-r {
  text-align: right;
}

.table .ta-c {
  text-align: center;
}

.cell-media {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.thumb {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: cover;
  background: var(--gray-soft);
  flex: none;
}

.thumb--lg {
  width: 40px;
  height: 40px;
  border-radius: 8px;
}

.thumb--xl {
  width: 72px;
  height: 72px;
  border-radius: 10px;
}

.cell-title {
  font-weight: 500;
  color: var(--text);
}

.cell-sub {
  font-size: 11px;
  color: var(--muted);
}

/* ------------------------------------------------------------- progress -- */

.progress {
  position: relative;
  width: 100%;
  height: 6px;
  border-radius: var(--r-pill);
  background: #eef2f6;
  overflow: hidden;
}

.progress__bar {
  height: 100%;
  border-radius: var(--r-pill);
  background: var(--primary);
}

.progress--sm {
  height: 5px;
}

.progress-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.progress-row .progress {
  flex: 1;
}

.progress-row__value {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  min-width: 34px;
  text-align: right;
}

/* ----------------------------------------------------------------- grid -- */

.grid {
  display: grid;
  gap: var(--gap);
}

/* Referans 01: kart genişlikleri 455 / 350 / 323 px (1448 baseline).
   minmax(0, …): fr track'lerin içerikle birlikte büyüyüp sayfayı taşırmasını
   engeller (grid blowout). */
.grid--5-4-3 {
  grid-template-columns: minmax(0, 455fr) minmax(0, 350fr) minmax(0, 323fr);
}

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

.grid--8-4 {
  grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
}

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

.grid--main-rail {
  grid-template-columns: minmax(0, 1fr) var(--rail-w);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

.row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.row--between {
  justify-content: space-between;
}

.row--wrap {
  flex-wrap: wrap;
}

/* ------------------------------------------------------------ list rows -- */

.listrow {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border-soft);
}

.listrow:last-child {
  border-bottom: 0;
}

.listrow__title {
  font-size: 13px;
  font-weight: 500;
}

.listrow__sub {
  font-size: 12px;
  color: var(--muted);
}

.listrow__meta {
  margin-left: auto;
  text-align: right;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.listrow__amount {
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------- activity -- */

.activity {
  display: flex;
  gap: 12px;
  padding: 12px 20px;
}

.activity__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--r-pill);
  flex: none;
}

.activity__title {
  font-size: 13px;
  font-weight: 500;
}

.activity__sub {
  font-size: 12px;
  color: var(--muted);
}

.activity__time {
  margin-left: auto;
  font-size: 12px;
  color: var(--muted-2);
  white-space: nowrap;
}

/* ---------------------------------------------------------- suggestions -- */

.suggest {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  transition: border-color var(--fast), box-shadow var(--fast);
}

.suggest:hover {
  border-color: var(--border);
  box-shadow: var(--shadow-card);
}

.suggest__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  flex: none;
}

.suggest__title {
  font-size: 13px;
  font-weight: 600;
}

.suggest__body {
  margin-top: 2px;
  font-size: 12px;
  line-height: 17px;
  color: var(--muted);
}

.suggest__chev {
  margin-left: auto;
  color: var(--muted-2);
  align-self: center;
}

/* --------------------------------------------------------------- kanban -- */

.kanban {
  display: grid;
  gap: var(--gap);
  align-items: start;
}

.kanban__col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
}

.kanban__head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
}

.kanban__count {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
}

.wo-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: var(--surface);
  transition: border-color var(--fast), box-shadow var(--fast);
}

.wo-card:hover {
  border-color: #cbd5e1;
  box-shadow: var(--shadow-card);
}

.wo-card.is-selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary);
}

.wo-card__top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.wo-card__code {
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.wo-card__title {
  font-size: 13px;
  font-weight: 600;
}

.wo-card__sub {
  font-size: 11px;
  color: var(--muted);
}

.wo-card__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--muted);
}

.kanban__add {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.kanban__add:hover {
  background: var(--gray-soft);
  color: var(--text);
}

/* ---------------------------------------------------------------- tabs -- */

.tabs {
  display: flex;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid var(--border-soft);
}

.tab {
  position: relative;
  padding: 10px 0 11px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}

.tab.is-active {
  color: var(--primary);
  font-weight: 600;
}

.tab.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px 2px 0 0;
}

.segmented {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.segmented__item {
  height: 34px;
  padding: 0 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.segmented__item.is-active {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 600;
}

/* -------------------------------------------------------------- stepper -- */

.stepper {
  display: flex;
  align-items: flex-start;
}

.stepper__step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 96px;
  flex: none;
  text-align: center;
}

.stepper__bullet {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--r-pill);
  font-size: 13px;
  font-weight: 600;
}

.stepper__bullet--done {
  background: var(--primary);
  color: #fff;
}

.stepper__bullet--active {
  background: var(--primary);
  color: #fff;
}

.stepper__bullet--idle {
  background: var(--gray-soft);
  color: var(--muted);
}

.stepper__name {
  font-size: 13px;
  font-weight: 500;
}

.stepper__state {
  font-size: 11px;
  color: var(--muted);
}

.stepper__pct {
  font-size: 13px;
  font-weight: 600;
}

.stepper__line {
  flex: 1;
  height: 2px;
  margin-top: 16px;
  background: var(--border);
  border-radius: 2px;
}

.stepper__line.is-done {
  background: var(--primary);
}

/* ----------------------------------------------------------- pagination -- */

.pagination {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pagination__item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 12px;
  color: #475569;
  background: var(--surface);
}

.pagination__item.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 600;
}

.pagination__item.is-plain {
  border-color: transparent;
  background: none;
}

/* -------------------------------------------------------------- calendar */

.calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 2px;
  text-align: center;
}

.calendar__dow {
  padding: 6px 0;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
}

.calendar__day {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  border-radius: var(--r-pill);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.calendar__day--muted {
  color: var(--muted-2);
}

.calendar__day--today {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
}

.calendar__mark {
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 2px;
}

.calendar__mark i {
  width: 4px;
  height: 4px;
  border-radius: var(--r-pill);
  display: block;
}

/* ------------------------------------------------------------- timeline -- */

.timeline {
  position: relative;
  padding-left: 18px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--primary-soft);
}

.timeline__item {
  position: relative;
  padding-bottom: 18px;
}

.timeline__item:last-child {
  padding-bottom: 0;
}

.timeline__dot {
  position: absolute;
  left: -18px;
  top: 5px;
  width: 10px;
  height: 10px;
  border-radius: var(--r-pill);
  background: var(--primary);
}

/* ---------------------------------------------------------- misc states -- */

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 40px 20px;
  text-align: center;
  color: var(--muted);
}

.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13px;
}

.skeleton {
  background: linear-gradient(90deg, #eef2f6 25%, #f6f8fb 37%, #eef2f6 63%);
  background-size: 400% 100%;
  border-radius: 6px;
  animation: skeleton 1.4s ease infinite;
}

@keyframes skeleton {
  0% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0 50%;
  }
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--text);
  color: #fff;
  font-size: 13px;
  box-shadow: var(--shadow-pop);
}

/* ------------------------------------------------------------ utilities -- */

.muted {
  color: var(--muted);
}

.small {
  font-size: 12px;
  line-height: 17px;
}

.xsmall {
  font-size: 11px;
  line-height: 16px;
}

.strong {
  font-weight: 600;
}

.green {
  color: var(--primary);
}

.red {
  color: var(--red);
}

.orange {
  color: var(--orange);
}

.blue {
  color: var(--blue);
}

.purple {
  color: var(--purple);
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ml-auto {
  margin-left: auto;
}

.mt-4 {
  margin-top: 4px;
}

.mt-8 {
  margin-top: 8px;
}

.mt-12 {
  margin-top: 12px;
}

.mt-16 {
  margin-top: 16px;
}

.mt-24 {
  margin-top: 24px;
}

.gap-4 {
  gap: 4px;
}

.gap-8 {
  gap: 8px;
}

.gap-12 {
  gap: 12px;
}

.divider {
  height: 1px;
  background: var(--border-soft);
}

.scroll-x {
  overflow-x: auto;
}

/* ----------------------------------------------------------- responsive -- */

@media (max-width: 1199px) {
  .shell {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "topbar"
      "main";
  }

  .brandbar,
  .sidebar {
    display: none;
  }

  .grid--5-4-3,
  .grid--4-4-4,
  .grid--8-4,
  .grid--main-rail {
    grid-template-columns: minmax(0, 1fr);
  }

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

@media (max-width: 767px) {
  .main {
    padding: 16px;
  }

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

/* ------------------------------------------------------------------ modal -- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
}

.modal[hidden] {
  display: none;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgb(15 23 42 / 45%);
  backdrop-filter: blur(2px);
}

.modal__panel {
  position: relative;
  width: 100%;
  max-width: 720px;
  max-height: calc(100vh - 64px);
  overflow: hidden auto;
  background: var(--surface);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-pop);
}

.modal__panel--wide {
  max-width: 1040px;
}

.modal__panel--narrow {
  max-width: 520px;
}

.modal__loading,
.modal__error {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
}

.modal__error {
  align-items: flex-start;
}

body.has-modal {
  overflow: hidden;
}

.modal__head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 20px 20px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border-soft);
}

.modal__title {
  font-size: 18px;
  line-height: 24px;
  font-weight: 600;
}

.modal__subtitle {
  margin-top: 4px;
  font-size: 13px;
  color: var(--muted);
}

.modal__content {
  padding: 20px;
}

.modal__foot {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 20px;
  border-top: 1px solid var(--border-soft);
}

/* --------------------------------------------------------- tablo taşması -- */

/* Kart içindeki tablolar kartı taşırmaz; kendi alanında yatay kayar. */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
}

.table-wrap > .table {
  min-width: 100%;
}

.table-wrap::-webkit-scrollbar {
  height: 8px;
}

.table-wrap::-webkit-scrollbar-thumb {
  border-radius: var(--r-pill);
  background: #d8dfe8;
}

.table-wrap::-webkit-scrollbar-track {
  background: transparent;
}

/* ------------------------------------------------------------- ayarlar -- */

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

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

@media (max-width: 767px) {
  .settings-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ------------------------------------------------------------- personel -- */

.staff-access {
  padding: 14px;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: var(--canvas);
}

.staff-access__list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.staff-reset {
  padding: 16px 20px;
  border-top: 1px solid var(--border-soft);
  background: var(--canvas);
}

/* Personel tablosu dar sütunlarda okunur kalsın */
.page .table-wrap .cell-title,
.page .table-wrap .cell-sub {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
}

/* ------------------------------------------------------- finans hareketi -- */

.fin-types {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.fin-type {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color var(--fast), background var(--fast);
}

.fin-type:hover {
  border-color: var(--border);
}

.fin-type input {
  margin-top: 2px;
  accent-color: var(--primary);
}

.fin-type:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-soft);
}


/* Satır içi eylem düğmeleri satırı taşırmasın */
.listrow > form {
  flex: none;
}

.listrow__meta {
  min-width: 0;
}
