:root {
  --brand: #0077ad;
  --brand-dark: #075f87;
  --ink: #102a43;
  --muted: #617487;
  --line: #d9e2ec;
  --surface: #ffffff;
  --bg: #eef4f8;
  --ok: #0f8b55;
  --warn: #c77700;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px 1fr;
  background: var(--bg);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
}

.sidebar {
  background: #ffffff;
  border-right: 1px solid #cfddea;
  padding: 28px 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.logo {
  width: 150px;
  height: 74px;
  object-fit: contain;
  object-position: left center;
}

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

h1 {
  font-size: 23px;
  letter-spacing: 0;
}

.sidebar p,
.eyebrow,
.api-status,
.panel-head span,
td,
label {
  color: var(--muted);
}

nav {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

button {
  border: 0;
  font: inherit;
}

nav button {
  text-align: left;
  padding: 12px 14px;
  border-radius: 8px;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
}

nav button.active,
nav button:hover {
  background: #e7f4fb;
  color: var(--brand-dark);
  font-weight: 700;
}

.page {
  padding: 28px;
  display: grid;
  gap: 20px;
}

.hidden {
  display: none !important;
}

.app-shell {
  display: grid;
  gap: 20px;
}

.login-panel {
  width: min(420px, 100%);
  align-self: center;
  justify-self: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 26px;
  display: grid;
  gap: 14px;
}

.login-logo {
  width: 170px;
  height: 78px;
  object-fit: contain;
  object-position: left center;
}

.login-form {
  display: grid;
  gap: 12px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.eyebrow {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

h2 {
  font-size: 28px;
  margin-top: 4px;
}

.api-status {
  font-size: 13px;
  margin-top: 6px;
}

.api-status.ok {
  color: var(--ok);
  font-weight: 700;
}

.api-status.warn {
  color: var(--warn);
  font-weight: 700;
}

.primary {
  background: var(--brand);
  color: white;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
}

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

.secondary {
  min-height: 34px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
}

.secondary:hover {
  border-color: var(--brand);
  color: var(--brand-dark);
}

.logout-button {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 20;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 8px;
  border: 1px solid #cfddea;
  background: #ffffff;
  color: #a83232;
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(16, 42, 67, 0.14);
  cursor: pointer;
}

.logout-button:hover {
  border-color: #efb4b4;
  background: #fff7f7;
}

.danger {
  color: #a83232;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 14px;
}

.metric-card,
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(16, 42, 67, 0.05);
}

.metric-card {
  padding: 18px;
  border-top: 4px solid var(--brand);
  text-align: left;
  color: var(--ink);
  cursor: pointer;
  transition: transform 150ms ease, border-color 150ms ease;
}

.metric-card:hover {
  transform: translateY(-2px);
  border-color: #a8ccdf;
}

.metrics span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.metrics strong {
  display: block;
  font-size: 30px;
  margin-top: 8px;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(420px, 1.1fr);
  gap: 20px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(360px, 1.15fr) minmax(300px, 0.85fr);
  gap: 20px;
}

.dashboard-people-panel {
  grid-column: 1 / -1;
}

.people-columns {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 12px;
}

.people-column {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #f9fcff;
  transition: border-color 160ms ease, background 160ms ease;
}

.people-column.pulse {
  border-color: var(--brand);
  background: #e7f4fb;
}

.people-column h4 {
  margin-bottom: 10px;
}

.people-list {
  display: grid;
  gap: 8px;
  max-height: 310px;
  overflow-y: auto;
}

.leave-list {
  margin-top: 10px;
}

.person-row {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 9px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px;
  background: white;
}

.person-row.working { border-left: 4px solid var(--ok); }
.person-row.late { border-left: 4px solid var(--warn); }
.person-row.absent { border-left: 4px solid #a83232; }
.person-row.leave { border-left: 4px solid var(--brand); }

.person-avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e7f4fb;
  color: var(--brand-dark);
  font-weight: 800;
}

.person-row strong,
.person-row small {
  display: block;
}

.person-row small,
.empty-copy,
.list-label {
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}

.list-label {
  font-weight: 800;
  text-transform: uppercase;
}

.panel {
  padding: 18px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

h3 {
  font-size: 18px;
}

.location-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.location-card strong {
  color: var(--brand-dark);
}

.location-actions,
.row-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.coordinate-help {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 14px;
  background: #f9fcff;
}

.coordinate-help strong {
  display: block;
  color: var(--ink);
  margin-bottom: 4px;
}

.coordinate-help p {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-help {
  grid-column: 1 / -1;
  margin: 0;
  padding: 10px 12px;
  border-left: 3px solid var(--brand);
  background: #eef7fb;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.form-actions .form-button {
  flex: 1 1 180px;
}

.form-actions .secondary {
  flex: 0 1 auto;
}

.stack {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
}

input {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  color: var(--ink);
  font: inherit;
}

textarea {
  min-height: 120px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  color: var(--ink);
  font: inherit;
  resize: vertical;
}

select {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  color: var(--ink);
  background: white;
  font: inherit;
}

.form-button {
  min-height: 40px;
  grid-column: span 1;
}

.full-field,
.weekday-field {
  grid-column: 1 / -1;
}

.weekday-picker {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.weekday-picker label {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: #f9fcff;
  color: var(--ink);
}

.weekday-picker input {
  min-height: auto;
}

.form-message {
  align-self: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.toggle-field {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  color: var(--ink);
}

.toggle-field input {
  min-height: auto;
}

.risk-list {
  display: grid;
  gap: 10px;
}

.risk-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #f9fcff;
}

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

.risk-stats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.risk-stats span {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 9px;
  background: white;
  color: var(--muted);
  font-size: 12px;
}

.employee-form {
  display: grid;
  grid-template-columns: repeat(7, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.employee-form.compact-form {
  grid-template-columns: minmax(220px, 360px) auto minmax(180px, 1fr);
  align-items: center;
  padding-bottom: 12px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.department-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.department-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 5px 7px 5px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f7fafc;
}

.department-chip button {
  min-height: 26px;
  padding: 3px 7px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.department-chip button:last-child {
  color: #a13a3a;
}

.report-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.report-toolbar input {
  width: 170px;
}

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

.settings-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 14px;
}

.tenant-tools {
  margin-top: 20px;
}

.tenant-list {
  display: grid;
  gap: 10px;
}

.tenant-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: #f9fcff;
}

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

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(70px, 1fr));
  gap: 8px;
}

.calendar-day {
  min-height: 82px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fcff;
  color: var(--ink);
  padding: 8px;
  display: grid;
  align-content: start;
  gap: 6px;
  text-align: left;
  cursor: pointer;
}

.calendar-day:hover {
  border-color: var(--brand);
}

.calendar-day strong {
  font-size: 18px;
}

.calendar-day span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.calendar-day.holiday {
  background: #fff2f2;
  border-color: #efc2c2;
}

.calendar-day.workday {
  background: #edf9f1;
  border-color: #bfe6d0;
}

.settings-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.settings-grid strong {
  display: block;
  color: var(--ink);
  margin-bottom: 6px;
}

.log-list {
  display: grid;
  gap: 10px;
}

.chart-panel {
  min-height: 250px;
}

.bar-chart {
  height: 180px;
  display: grid;
  grid-template-columns: repeat(12, minmax(18px, 1fr));
  align-items: end;
  gap: 8px;
  padding-top: 12px;
}

.bar-item {
  min-width: 0;
  display: grid;
  gap: 7px;
  justify-items: center;
}

.bar-track {
  width: 100%;
  height: 138px;
  border-radius: 8px;
  background: #edf3f8;
  display: flex;
  align-items: end;
  overflow: hidden;
}

.bar-fill {
  width: 100%;
  min-height: 4px;
  background: var(--brand);
  border-radius: 8px 8px 0 0;
}

.bar-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.status-chart {
  display: grid;
  gap: 12px;
}

.status-row {
  display: grid;
  grid-template-columns: 90px 1fr 38px;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.status-line {
  height: 10px;
  border-radius: 999px;
  background: #edf3f8;
  overflow: hidden;
}

.status-line span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
}

.status-line.ok span {
  background: var(--ok);
}

.status-line.warn span {
  background: var(--warn);
}

.status-line.danger span {
  background: #a83232;
}

.ops-notes {
  display: grid;
  gap: 10px;
}

.ops-note {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #f9fcff;
}

.ops-note strong {
  display: block;
  color: var(--ink);
  margin-bottom: 4px;
}

.ops-note p {
  color: var(--muted);
  font-size: 13px;
}

.log-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.log-item strong {
  display: block;
}

.badge {
  align-self: start;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
}

.badge.ok {
  background: #e7f8ef;
  color: var(--ok);
}

.badge.warn {
  background: #fff3df;
  color: var(--warn);
}

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

th,
td {
  text-align: left;
  padding: 13px 10px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

th {
  color: var(--ink);
  font-size: 13px;
}

.status-ok {
  color: var(--ok);
  font-weight: 800;
}

.status-off {
  color: var(--muted);
  font-weight: 800;
}

@media (max-width: 900px) {
  body {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  nav {
    grid-template-columns: repeat(5, minmax(100px, 1fr));
    overflow-x: auto;
  }

  .metrics,
  .content-grid,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

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

  .risk-row {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .employee-form.compact-form {
    grid-template-columns: 1fr;
  }

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

  .report-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .report-toolbar input {
    width: 100%;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .logout-button {
    position: static;
    justify-self: end;
  }
}

/* Personel cizelgesi ve saha yoklamasi */
.contractor-workspace { display: grid; gap: 16px; }
.module-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 20px 22px; border-radius: 8px; color: #fff;
  background: linear-gradient(105deg, #087db4 0%, #0e8d91 58%, #18a56c 100%);
  box-shadow: 0 10px 24px rgba(5, 92, 125, .14);
}
.module-banner h3 { margin: 3px 0 4px; font-size: 23px; }
.module-banner p { margin: 0; color: rgba(255,255,255,.86); }
.module-banner .eyebrow { color: #fff; font-weight: 800; }
.module-actions { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.module-actions input { min-height: 42px; background: #fff; }
.module-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid #cbdce6; border-radius: 8px; overflow: hidden; background: #fff; }
.module-tabs button { min-height: 46px; border: 0; border-radius: 0; background: #f5f9fb; color: #405b6c; font-weight: 800; cursor: pointer; }
.module-tabs button.active { background: #123d58; color: #fff; box-shadow: inset 0 -4px 0 #19a56f; }
.contractor-pane { display: grid; gap: 16px; }
.timesheet-layout { display: grid; grid-template-columns: minmax(300px, .34fr) minmax(650px, 1fr); gap: 16px; align-items: start; }
.contractor-setup-grid { display: grid; grid-template-columns: repeat(2, minmax(340px, 1fr)); gap: 16px; }
.control-label { display: grid; gap: 7px; margin-bottom: 14px; color: #496375; font-size: 12px; font-weight: 800; text-transform: uppercase; }
.mini-metrics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 12px 0 16px; }
.mini-metrics div { padding: 12px; border: 1px solid #d7e4eb; border-radius: 8px; background: #f7fafc; }
.mini-metrics strong,.mini-metrics span { display: block; }
.mini-metrics strong { color: #123d58; font-size: 20px; }
.mini-metrics span { margin-top: 3px; color: #687f8f; font-size: 11px; }
.correction-callout { margin: 14px 0; padding: 12px; border-left: 4px solid #d29911; background: #fff8e7; }
.correction-callout p { margin: 4px 0 0; color: #6c5b31; font-size: 12px; }
.compact-stack { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tall-table { max-height: 610px; overflow: auto; }
.schedule-table { width: 100%; border-collapse: collapse; }
.schedule-table th { position: sticky; top: 0; z-index: 1; background: #087db4; color: #fff; }
.schedule-table th,.schedule-table td { padding: 10px 9px; border-right: 1px solid #d9e5eb; border-bottom: 1px solid #d9e5eb; text-align: left; }
.schedule-table th:last-child,.schedule-table td:last-child { border-right: 0; }
.timesheet-row { cursor: pointer; }
.timesheet-row:hover { background: #edf7fb; }
.timesheet-row.status-leave,.timesheet-row.status-week_rest,.timesheet-row.status-official_holiday { background: #fff1f3; }
.timesheet-row.status-absent { background: #fff7e6; }
.day-status { display: block; font-weight: 800; color: #183c53; }
.schedule-table small { display: block; margin-top: 2px; color: #a06900; }
.contractor-card-list,.worker-check-list,.day-detail-list { display: grid; gap: 8px; margin-top: 14px; }
.contractor-card,.worker-row,.day-detail-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 12px; border: 1px solid #d7e4eb; border-radius: 8px; background: #f9fbfc; }
.contractor-card p,.worker-row small,.day-detail-row small { display: block; margin: 3px 0 0; color: #687f8f; }
.calendar-weekdays { display: grid; grid-template-columns: repeat(7, minmax(90px, 1fr)); background: #087db4; color: #fff; }
.calendar-weekdays span { padding: 9px; text-align: center; font-weight: 800; }
.contractor-calendar { display: grid; grid-template-columns: repeat(7, minmax(90px, 1fr)); border-left: 1px solid #d5e2e9; }
.contractor-day { min-height: 128px; padding: 8px; border: 0; border-right: 1px solid #d5e2e9; border-bottom: 1px solid #d5e2e9; border-radius: 0; background: #fff; color: #173b52; text-align: left; cursor: pointer; overflow: hidden; }
.contractor-day strong,.contractor-day span,.contractor-day small { display: block; }
.contractor-day-number { color: #647b8a; font-size: 12px; }
.contractor-day .contractor-day-total { margin: 5px 0 7px; color: #6d8391; font-size: 11px; font-weight: 700; }
.contractor-day-events { display: grid; gap: 4px; }
.contractor-day .contractor-event { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-width: 0; margin: 0; padding: 5px 6px; border: 1px solid #a9dfd2; border-radius: 4px; background: #dff5ef; color: #087c68; font-size: 10px; font-style: normal; font-weight: 800; }
.contractor-event b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contractor-event i { display: grid; place-items: center; flex: 0 0 18px; width: 18px; height: 18px; border-radius: 50%; background: #13aa83; color: #fff; font-size: 10px; font-style: normal; }
.contractor-day small { color: #667e8d; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contractor-day:hover,.contractor-day.active { background: #e8f5f8; box-shadow: inset 0 0 0 2px #087db4; }
.contractor-day.blank { background: #f4f7f8; pointer-events: none; }
.day-detail-row.status-absent { border-left: 4px solid #c94747; }
.day-detail-row.status-present,.day-detail-row.status-missing_checkout { border-left: 4px solid #19a56f; }
.day-detail-row.status-leave { border-left: 4px solid #d29911; }
.bar-fill.size-0 { height: 0; } .status-line span.size-0 { width: 0; }
.bar-fill.size-5 { height: 5%; } .status-line span.size-5 { width: 5%; }
.bar-fill.size-10 { height: 10%; } .status-line span.size-10 { width: 10%; }
.bar-fill.size-15 { height: 15%; } .status-line span.size-15 { width: 15%; }
.bar-fill.size-20 { height: 20%; } .status-line span.size-20 { width: 20%; }
.bar-fill.size-25 { height: 25%; } .status-line span.size-25 { width: 25%; }
.bar-fill.size-30 { height: 30%; } .status-line span.size-30 { width: 30%; }
.bar-fill.size-35 { height: 35%; } .status-line span.size-35 { width: 35%; }
.bar-fill.size-40 { height: 40%; } .status-line span.size-40 { width: 40%; }
.bar-fill.size-45 { height: 45%; } .status-line span.size-45 { width: 45%; }
.bar-fill.size-50 { height: 50%; } .status-line span.size-50 { width: 50%; }
.bar-fill.size-55 { height: 55%; } .status-line span.size-55 { width: 55%; }
.bar-fill.size-60 { height: 60%; } .status-line span.size-60 { width: 60%; }
.bar-fill.size-65 { height: 65%; } .status-line span.size-65 { width: 65%; }
.bar-fill.size-70 { height: 70%; } .status-line span.size-70 { width: 70%; }
.bar-fill.size-75 { height: 75%; } .status-line span.size-75 { width: 75%; }
.bar-fill.size-80 { height: 80%; } .status-line span.size-80 { width: 80%; }
.bar-fill.size-85 { height: 85%; } .status-line span.size-85 { width: 85%; }
.bar-fill.size-90 { height: 90%; } .status-line span.size-90 { width: 90%; }
.bar-fill.size-95 { height: 95%; } .status-line span.size-95 { width: 95%; }
.bar-fill.size-100 { height: 100%; } .status-line span.size-100 { width: 100%; }

@media (max-width: 1150px) {
  .timesheet-layout,.contractor-setup-grid { grid-template-columns: 1fr; }
  .contractor-calendar-panel { overflow-x: auto; }
  .calendar-weekdays,.contractor-calendar { min-width: 760px; }
}
@media (max-width: 700px) {
  .module-banner { align-items: stretch; flex-direction: column; }
  .module-actions { width: 100%; }
  .module-actions > * { flex: 1; min-width: 0; }
  .module-tabs { grid-template-columns: 1fr; }
  .compact-stack { grid-template-columns: 1fr; }
  .mini-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Vardım yönetim merkezi görünümü */
:root {
  --brand: #087db4;
  --brand-dark: #0d4667;
  --ink: #172b3a;
  --muted: #687b89;
  --line: #d6e0e7;
  --surface: #ffffff;
  --bg: #f3f6f8;
  --ok: #14845a;
  --warn: #b97908;
}

body {
  grid-template-columns: 244px minmax(0, 1fr);
  background: var(--bg);
  font-family: Inter, "Segoe UI", Arial, Helvetica, sans-serif;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px 16px 18px;
  gap: 14px;
  border-right-color: #d8e1e7;
  box-shadow: 8px 0 24px rgba(24, 50, 67, 0.035);
}

.brand-lockup {
  display: grid;
  gap: 10px;
  padding: 4px 4px 18px;
  border-bottom: 1px solid var(--line);
}

.logo {
  width: 132px;
  height: 48px;
  object-fit: contain;
  object-position: left center;
}

.brand-lockup h1 {
  font-size: 18px;
}

.brand-lockup p {
  margin-top: 3px;
  font-size: 12px;
}

.nav-label {
  padding: 4px 12px 0;
  color: #8a9aa5;
  font-size: 10px;
  font-weight: 800;
}

nav {
  gap: 4px;
  margin-top: 0;
}

nav button {
  min-height: 42px;
  padding: 0 13px;
  border-left: 3px solid transparent;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 650;
}

nav button.active,
nav button:hover {
  border-left-color: var(--brand);
  background: #eaf4f9;
}

.sidebar-meta {
  margin-top: auto;
  padding: 13px;
  border: 1px solid #d8e5ec;
  border-radius: 8px;
  background: #f7fbfd;
}

.sidebar-meta span,
.sidebar-meta strong {
  display: block;
}

.sidebar-meta span {
  color: var(--muted);
  font-size: 11px;
}

.sidebar-meta strong {
  margin-top: 4px;
  color: var(--brand-dark);
  font-size: 12px;
}

.page {
  min-width: 0;
  padding: 24px clamp(20px, 2.6vw, 42px) 38px;
  align-content: start;
}

.app-shell {
  min-width: 0;
  gap: 18px;
}

.topbar {
  min-height: 104px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(16, 42, 67, 0.045);
}

.page-heading {
  min-width: 0;
}

.topbar h2 {
  font-size: clamp(22px, 2.2vw, 30px);
}

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

.scope-pill {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 11px;
  border: 1px solid #d4e3eb;
  border-radius: 999px;
  background: #f2f8fb;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 800;
}

.primary,
.secondary,
input,
select,
textarea {
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #68afd0;
  box-shadow: 0 0 0 3px rgba(8, 125, 180, 0.11);
}

.panel,
.metric-card {
  box-shadow: 0 8px 22px rgba(16, 42, 67, 0.04);
}

.panel {
  min-width: 0;
  padding: 20px;
}

.content-grid {
  grid-template-columns: minmax(360px, 0.8fr) minmax(520px, 1.2fr);
  align-items: start;
}

.manager-mode .content-grid[data-section="leaves"] {
  grid-template-columns: minmax(0, 1fr);
}

.manager-mode .content-grid[data-section="leaves"] > .panel:not(.hidden) {
  width: 100%;
  min-height: 300px;
}

.tenant-card.leave-card {
  border-left: 4px solid var(--brand);
  background: #fbfdfe;
}

.leave-card-copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.leave-card-copy > strong {
  color: var(--ink);
  font-size: 15px;
}

.leave-status-badge {
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.leave-status-approved {
  color: #0f704c;
  background: #dff4e9;
}

.leave-status-pending {
  color: #8a5c04;
  background: #fff0cd;
}

.leave-status-rejected {
  color: #a13737;
  background: #f9e2e2;
}

.leave-note {
  padding-top: 3px;
  color: #526875 !important;
}

.leave-empty-state {
  min-height: 190px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  padding: 28px;
  border: 1px dashed #c6d7e1;
  border-radius: 8px;
  background: #f8fbfc;
  text-align: left;
}

.leave-empty-mark {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e3f3eb;
  color: var(--ok);
  font-size: 22px;
  font-weight: 900;
}

.leave-empty-state strong {
  display: block;
  color: var(--ink);
  font-size: 16px;
}

.leave-empty-state p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.logout-button {
  position: static;
  min-height: 38px;
  border-radius: 6px;
  box-shadow: none;
}

@media (max-width: 1100px) {
  .content-grid,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 900px) {
  body {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    width: 100%;
    min-width: 0;
    height: auto;
    padding: 14px;
    overflow: hidden;
  }

  .brand-lockup {
    grid-template-columns: auto 1fr;
    align-items: center;
    padding-bottom: 12px;
  }

  .nav-label,
  .sidebar-meta {
    display: none;
  }

  nav {
    width: 100%;
    max-width: 100%;
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(112px, 1fr);
    overflow-x: auto;
    overscroll-behavior-inline: contain;
  }

  .page {
    padding: 16px;
  }

  .topbar-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .topbar-actions .logout-button {
    margin-left: auto;
  }

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