/* Dünya Şehir Talep Sistemi — arayüz stilleri */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --brand: #1f3d7b;
  --brand-dark: #172f61;
  --brand-50: #eef2f9;
  --brand-100: #dbe4f3;
  --brand-200: #b9c9e6;
  --accent: #0090ba;
  --accent-50: #e6f5f9;

  --bg: #f5f7fa;
  --surface: #ffffff;
  --surface-2: #f9fafb;
  --border: #e4e8ee;
  --border-soft: #eef1f5;
  --border-strong: #cfd6e0;

  --text: #101828;
  --text-2: #475467;
  --text-3: #667085;

  --success: #067647;
  --success-strong: #05603a;
  --success-bg: #ecfdf3;
  --success-border: #abefc6;
  --warn: #b54708;
  --warn-bg: #fffaeb;
  --warn-border: #fedf89;
  --danger: #b42318;
  --danger-bg: #fef3f2;
  --danger-border: #fecdca;
  --info: #1849a9;
  --info-bg: #eff4ff;
  --info-border: #c7d7fe;

  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow-md: 0 4px 12px rgba(16, 24, 40, 0.08);
  --control-h: 38px;

  /* eski adlarla uyumluluk */
  --navy: var(--brand);
  --navy-dark: var(--brand-dark);
  --turquoise: var(--accent);
  --turquoise-soft: var(--accent-50);
  --page: var(--bg);
  --panel: var(--surface);
  --line: var(--border);
  --line-strong: var(--border-strong);
  --ink: var(--text);
  --ink-muted: var(--text-3);
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 "Inter", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: var(--brand);
}

a:hover {
  color: var(--brand-dark);
}

h1 {
  font-size: 22px;
  line-height: 1.25;
  font-weight: 650;
  letter-spacing: -0.015em;
  margin: 0;
  color: var(--text);
}

h2 {
  font-size: 15px;
  line-height: 1.35;
  font-weight: 600;
  margin: 0 0 14px;
  color: var(--text);
}

h3 {
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--text-2);
}

p {
  margin: 0 0 12px;
}

.lead {
  margin: 0 0 20px;
  color: var(--text-3);
}

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

.text-danger {
  color: var(--danger);
}

.nowrap {
  white-space: nowrap;
}

.mono {
  font-family: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  font-size: 12.5px;
  color: var(--text-2);
}

.icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 100;
  padding: 8px 14px;
  background: var(--brand);
  color: #fff;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
}

.skip-link:focus {
  top: 12px;
  color: #fff;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
.table-wrap:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- Düğmeler ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: var(--control-h);
  padding: 0 14px;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
}

.btn .icon {
  width: 16px;
  height: 16px;
}

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

.btn-lg {
  height: 44px;
  font-size: 15px;
}

.btn-block {
  width: 100%;
}

.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

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

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: var(--surface-2);
  color: var(--text);
  border-color: #b9c2ce;
}

.btn-ghost {
  background: transparent;
  color: var(--text-2);
}

.btn-ghost:hover {
  background: #eaeef3;
  color: var(--text);
}

.btn-ghost.text-danger {
  color: var(--danger);
}

.btn-ghost.text-danger:hover {
  background: var(--danger-bg);
  color: var(--danger);
}

.btn-success {
  background: var(--success);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.btn-success:hover {
  background: var(--success-strong);
  color: #fff;
}

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

.btn-danger:hover {
  background: #912018;
  color: #fff;
}

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

.btn-danger-outline:hover {
  background: var(--danger-bg);
  color: var(--danger);
}

.btn[disabled],
.btn.is-disabled {
  opacity: 0.5;
  cursor: default;
  pointer-events: none;
}

.inline-form {
  display: inline;
  margin: 0;
}

/* ---------- Form alanları ---------- */
.field {
  margin-bottom: 16px;
}

label,
legend {
  display: block;
  font-weight: 500;
  font-size: 13px;
  color: var(--text-2);
  margin-bottom: 6px;
  padding: 0;
}

.opt,
.istege-bagli {
  font-weight: 400;
  color: var(--text-3);
}

input[type="text"],
input[type="tel"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="date"],
input[type="number"],
select,
textarea {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 0 12px;
  height: var(--control-h);
  box-shadow: var(--shadow-sm);
}

select {
  padding-right: 30px;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
  background-size: 16px;
  text-overflow: ellipsis;
}

textarea {
  height: auto;
  min-height: 96px;
  padding: 9px 12px;
  line-height: 1.5;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: #98a2b3;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 144, 186, 0.18);
}

input[aria-invalid="true"],
select[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: var(--danger);
  background: #fffbfa;
}

input[type="file"] {
  width: 100%;
  font: inherit;
  font-size: 13.5px;
  color: var(--text);
  padding: 10px;
  min-height: 46px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface-2);
}

fieldset {
  border: 0;
  margin: 0 0 16px;
  padding: 0;
  min-width: 0;
}

.hint {
  font-size: 12.5px;
  color: var(--text-3);
  margin: 6px 0 0;
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

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

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

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.inline-field {
  display: flex;
  gap: 8px;
}

.inline-field select,
.inline-field input {
  flex: 1;
  min-width: 0;
}

.input-icon {
  position: relative;
}

.input-icon .icon {
  position: absolute;
  left: 11px;
  top: 50%;
  width: 16px;
  height: 16px;
  margin-top: -8px;
  color: var(--text-3);
  pointer-events: none;
}

.input-icon input {
  padding-left: 34px;
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  cursor: pointer;
  color: var(--text);
}

.checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--brand);
}

.assignee-picker {
  margin: 0;
}

.action-block .assignee-picker {
  margin-bottom: 12px;
}

.assignee-options {
  display: grid;
  gap: 4px;
  max-height: 10rem;
  overflow-y: auto;
}

.assignee-options .checkbox-label {
  min-height: 24px;
  overflow-wrap: anywhere;
}

.assignee-options input[type="checkbox"] {
  flex: none;
}

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

.chip {
  position: relative;
  margin: 0;
}

.chip input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}

.chip span {
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  min-height: 42px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
}

.chip input:checked + span {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.chip input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.gizli {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.is-hidden {
  display: none;
}

.file-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13.5px;
}

.file-item-info {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-item-size {
  color: var(--text-3);
  font-size: 12.5px;
  margin-left: 6px;
}

.file-remove {
  flex-shrink: 0;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--danger);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.file-remove:hover {
  background: var(--danger-bg);
}

/* ---------- Uyarılar ---------- */
.hata {
  display: none;
  background: var(--danger-bg);
  color: #912018;
  border: 1px solid var(--danger-border);
  border-radius: var(--radius);
  padding: 10px 12px;
  margin-bottom: 16px;
  font-size: 13.5px;
}

.hata.acik {
  display: block;
}

.alan-hata {
  display: none;
  margin: 6px 0 0;
  color: var(--danger);
  font-size: 12.5px;
  font-weight: 500;
}

.alan-hata.acik {
  display: block;
}

.flash {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 14px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-size: 13.5px;
  border: 1px solid transparent;
}

.flash .icon {
  width: 17px;
  height: 17px;
}

.flash-ok {
  background: var(--success-bg);
  color: var(--success-strong);
  border-color: var(--success-border);
}

.flash-hata {
  background: var(--danger-bg);
  color: #912018;
  border-color: var(--danger-border);
}

.flash-uyari {
  background: var(--warn-bg);
  color: #93370d;
  border-color: var(--warn-border);
}

.inline-link {
  font-weight: 600;
  margin-left: auto;
  color: inherit;
}

/* ---------- Rozetler ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
  border: 1px solid transparent;
}

.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.badge-open {
  background: var(--info-bg);
  color: var(--info);
  border-color: var(--info-border);
}

.badge-closed {
  background: var(--success-bg);
  color: var(--success);
  border-color: var(--success-border);
}

.badge-warn {
  background: var(--warn-bg);
  color: var(--warn);
  border-color: var(--warn-border);
}

.badge-muted {
  background: #f2f4f7;
  color: var(--text-2);
  border-color: var(--border);
}

.badge-info {
  background: var(--brand-50);
  color: var(--brand);
  border-color: var(--brand-100);
}

.badge-info::before,
.badge-muted::before {
  content: none;
}

.tag {
  display: inline-block;
  padding: 1px 8px;
  border-radius: var(--radius-sm);
  background: #f2f4f7;
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 500;
}

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  flex-shrink: 0;
  background: var(--brand-100);
  color: var(--brand);
}

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

.avatar-lg {
  width: 48px;
  height: 48px;
  font-size: 16px;
}

.av-1 { background: #dbe4f3; color: #1f3d7b; }
.av-2 { background: #d1fadf; color: #05603a; }
.av-3 { background: #fef0c7; color: #93370d; }
.av-4 { background: #fce7f6; color: #9e165f; }
.av-5 { background: #e0f2fe; color: #065986; }
.av-6 { background: #ebe9fe; color: #4a1fb8; }

.person {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.assignee-list {
  display: grid;
  gap: 4px;
  min-width: 12rem;
  white-space: normal;
  overflow-wrap: anywhere;
}

.age {
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.age-ok {
  color: var(--text-3);
  font-weight: 500;
}

.age-warn {
  color: var(--warn);
}

.age-late {
  color: var(--danger);
}

/* ---------- Kartlar ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.card-flush {
  padding: 0;
  overflow: hidden;
}

.card-narrow {
  max-width: 460px;
}

.card-head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}

.card-head h2 {
  margin: 0;
}

.card-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.section-gap {
  margin-bottom: 16px;
}

.disclosure {
  padding: 0;
}

.disclosure > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 18px;
  font-weight: 600;
  color: var(--brand);
  cursor: pointer;
  list-style: none;
  border-radius: var(--radius-lg);
}

.disclosure > summary::-webkit-details-marker {
  display: none;
}

.disclosure > summary:hover {
  background: var(--surface-2);
}

.disclosure[open] > summary {
  border-bottom: 1px solid var(--border);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.disclosure-body {
  padding: 18px;
}

/* ---------- Uygulama iskeleti ---------- */
.shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
}

.sidebar-inner {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 20px 14px 14px;
  overflow-y: auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.sidebar .brand {
  padding: 0 8px 16px;
  border-bottom: 1px solid var(--border-soft);
}

.brand svg {
  height: 46px;
  width: auto;
  display: block;
}

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

.nav-group {
  margin: 14px 10px 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #98a2b3;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
}

.nav-link .icon {
  color: #98a2b3;
}

.nav-link:hover {
  background: #f2f4f7;
  color: var(--text);
}

.nav-link.is-active {
  background: var(--brand-50);
  color: var(--brand);
  font-weight: 600;
}

.nav-link.is-active .icon {
  color: var(--brand);
}

.side-user {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border-soft);
  display: grid;
  gap: 10px;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 6px;
  min-width: 0;
}

.user-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.3;
}

.user-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-role {
  font-size: 12px;
  color: var(--text-3);
}

.user-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.user-actions .inline-form {
  display: block;
}

.user-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: 34px;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
}

.user-action .icon {
  width: 15px;
  height: 15px;
}

.user-action:hover {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--border-strong);
}

.content {
  min-width: 0;
}

.content-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 28px 32px 56px;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.page-head h1 {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.page-sub {
  margin: 4px 0 0;
  color: var(--text-3);
  font-size: 13.5px;
}

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

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 8px;
  text-decoration: none;
  color: var(--text-3);
}

.back-link .icon {
  width: 15px;
  height: 15px;
}

.back-link:hover {
  color: var(--brand);
}

.profile-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.profile-head .page-sub {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

/* ---------- Sekmeler ve filtre çubuğu ---------- */
.tabs {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  margin-bottom: 14px;
  background: #e9edf2;
  border-radius: 10px;
}

.tab {
  padding: 6px 16px;
  border-radius: 7px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
}

.tab:hover {
  color: var(--text);
}

.tab.is-active {
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.tabs-sm {
  margin-bottom: 0;
}

.tabs-sm .tab {
  padding: 4px 12px;
  font-size: 13px;
}

.toolbar {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  padding: 14px 16px;
  margin-bottom: 14px;
  container-type: inline-size;
  container-name: toolbar;
}

.filter-toggle {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
}

.toolbar .filter-toggle-btn {
  display: none;
  margin: 0;
  font-size: 13.5px;
  color: var(--text);
}

.filter-toggle:checked ~ .toolbar-actions .filter-toggle-btn {
  background: var(--brand-50);
  border-color: var(--brand-200);
  color: var(--brand);
}

.filter-toggle:focus-visible ~ .toolbar-actions .filter-toggle-btn {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.toolbar .field {
  flex: 1 1 130px;
  min-width: 0;
  margin: 0;
}

.toolbar .toolbar-search {
  flex: 2 1 220px;
}

.toolbar .field-date {
  flex: 0 1 142px;
}

.toolbar label {
  font-size: 12px;
  margin-bottom: 4px;
  color: var(--text-3);
}

.toolbar-actions {
  display: flex;
  gap: 6px;
  flex: 0 0 auto;
}

@container toolbar (max-width: 1040px) {
  .toolbar .toolbar-search {
    order: 1;
    flex: 1 1 calc(100% - 200px);
  }

  .toolbar-actions {
    order: 2;
  }

  .toolbar .adv {
    order: 3;
  }
}

@container toolbar (max-width: 560px) {
  .toolbar .toolbar-search {
    flex: 1 1 100%;
  }

  .toolbar-actions {
    flex: 1 1 100%;
  }

  .toolbar-actions .btn {
    flex: 1;
  }

  .toolbar .filter-toggle-btn {
    display: inline-flex;
  }

  .toolbar .adv {
    flex: 1 1 100%;
  }

  .toolbar .field-date.adv {
    flex: 1 1 calc(50% - 6px);
  }

  .filter-toggle:not(:checked) ~ .adv {
    display: none;
  }
}

/* ---------- Tablolar ---------- */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  container-type: inline-size;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.data-table th,
.data-table td {
  padding: 11px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: middle;
}

.data-table thead th {
  padding-top: 9px;
  padding-bottom: 9px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  color: var(--text-3);
  font-weight: 600;
  font-size: 12px;
  white-space: nowrap;
}

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

.data-table tbody tr:hover {
  background: #f8fafc;
}

.compact-table th,
.compact-table td {
  padding-top: 8px;
  padding-bottom: 8px;
}

.data-table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.muted-cell {
  color: var(--text-3);
}

.row-link {
  font-weight: 600;
  text-decoration: none;
  color: var(--brand);
  font-variant-numeric: tabular-nums;
}

.row-link:hover {
  text-decoration: underline;
}

a.person.row-link {
  color: var(--text);
}

a.person.row-link:hover {
  color: var(--brand);
}

.c-subject {
  width: 100%;
  max-width: 0;
}

.c-name,
.c-assignee {
  white-space: nowrap;
}

.subject-link {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}

.subject-link:hover {
  color: var(--brand);
}

.excerpt {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-3);
  font-size: 12.5px;
}

.date-main {
  display: block;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}

.file-count {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}

.file-count .icon {
  width: 14px;
  height: 14px;
}

.num-link {
  display: inline-block;
  min-width: 28px;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  color: var(--text);
}

.num-link:hover {
  background: #eaeef3;
}

.num-open {
  color: var(--info);
}

.num-closed {
  color: var(--success);
}

.empty-state {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 44px 20px;
  text-align: center;
  color: var(--text-3);
}

.empty-state p {
  margin: 0;
}

.empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #f2f4f7;
  color: var(--text-3);
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}

.pagination-info {
  font-size: 13px;
  color: var(--text-3);
}

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

/* ---------- Talep detayı ---------- */
.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 16px;
  align-items: start;
}

.detail-main,
.detail-side {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.desc-text {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  word-break: break-word;
}

.attach-block {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border-soft);
}

.attach-block .muted {
  margin: 0;
}

.meta-list {
  margin: 0;
}

.meta-list > div {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-soft);
}

.meta-list > div:first-child {
  padding-top: 0;
}

.meta-list > div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.meta-list dt {
  font-size: 12.5px;
  color: var(--text-3);
}

.meta-list dd {
  margin: 0;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  word-break: break-word;
}

.related {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border-soft);
}

.related-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 4px;
  font-size: 13.5px;
}

.action-block {
  padding: 16px 0;
  border-top: 1px solid var(--border-soft);
}

.action-card h2 + .action-block {
  padding-top: 0;
  border-top: 0;
}

.action-card .action-block:last-child {
  padding-bottom: 0;
}

.action-block .field {
  margin-bottom: 12px;
}

.action-block textarea {
  min-height: 76px;
}

.action-block .muted {
  margin: 0 0 10px;
}

.attachments-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.attachment-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-2);
  display: flex;
  flex-direction: column;
}

.attachment-thumb {
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
  background: #fff;
}

.attachment-meta,
.attachment-file {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  word-break: break-word;
}

.attachment-icon {
  color: var(--text-3);
}

.file-link {
  font-weight: 600;
  text-decoration: none;
}

.file-link:hover {
  text-decoration: underline;
}

.notes-list {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  display: grid;
  gap: 12px;
}

.note-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.note-body {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.note-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
  font-size: 13px;
}

.note-body p {
  margin: 0;
  font-size: 13.5px;
  word-break: break-word;
}

.note-form {
  padding-top: 16px;
  border-top: 1px solid var(--border-soft);
}

.note-form .field {
  margin-bottom: 12px;
}

/* ---------- Özet ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.stat-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 520px;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
}

a.stat-card:hover {
  border-color: var(--brand-200);
  box-shadow: var(--shadow-md);
  color: inherit;
}

.stat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  flex-shrink: 0;
}

.stat-icon .icon {
  width: 20px;
  height: 20px;
}

.tone-warn { background: var(--info-bg); color: var(--info); }
.tone-ok { background: var(--success-bg); color: var(--success); }
.tone-info { background: var(--accent-50); color: #06708f; }
.tone-brand { background: var(--brand-50); color: var(--brand); }

.stat-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.stat-label {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-3);
}

.stat-value {
  font-size: 26px;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.dash-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.bar-meter {
  appearance: none;
  -webkit-appearance: none;
  display: block;
  width: 100%;
  min-width: 72px;
  max-width: 140px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: #e9edf2;
  overflow: hidden;
}

.bar-meter::-webkit-progress-bar {
  background: #e9edf2;
  border-radius: 999px;
}

.bar-meter::-webkit-progress-value {
  background: var(--brand);
  border-radius: 999px;
}

.bar-meter::-moz-progress-bar {
  background: var(--brand);
  border-radius: 999px;
}

/* ---------- Konular ---------- */
.subject-list {
  --subj-cols: minmax(150px, 1.5fr) minmax(140px, 1.1fr) 76px 132px 76px;
  --subj-side: 196px;
}

.subject-head {
  display: grid;
  grid-template-columns: var(--subj-cols);
  gap: 10px;
  padding: 9px calc(16px + var(--subj-side) + 12px) 9px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-3);
}

.subject-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--border-soft);
}

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

.subject-row:hover {
  background: #f8fafc;
}

.subject-edit-form {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: var(--subj-cols);
  gap: 10px;
  align-items: center;
}

.subject-edit-form .field {
  margin-bottom: 0;
}

.subject-edit-form .field > label:not(.checkbox-label),
.subject-edit-form .assignee-picker > legend {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.subject-edit-form input:not([type="checkbox"]),
.subject-edit-form select {
  height: 34px;
  box-shadow: none;
}

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

.field-check .muted {
  font-size: 12px;
  white-space: nowrap;
}

.subject-meta-actions {
  flex: 0 0 var(--subj-side);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.error-card {
  max-width: 520px;
  margin: 48px auto 0;
  padding: 36px 28px;
  text-align: center;
}

.error-card h1 {
  margin-bottom: 8px;
}

.error-code {
  margin: 0 0 4px;
  font-size: 44px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--brand-200);
}

/* ---------- Giriş ekranı ---------- */
.auth-page {
  min-height: 100vh;
  background:
    radial-gradient(900px 480px at 50% -10%, rgba(31, 61, 123, 0.1), transparent 70%),
    var(--bg);
}

.auth-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(16, 24, 40, 0.08);
}

.auth-brand {
  display: flex;
  justify-content: center;
  margin-bottom: 22px;
}

.auth-brand svg {
  height: 60px;
  width: auto;
  display: block;
}

.auth-card h1 {
  font-size: 20px;
  text-align: center;
  margin-bottom: 6px;
}

.auth-card .lead {
  text-align: center;
  font-size: 13.5px;
  margin-bottom: 22px;
}

.auth-card input {
  height: 42px;
}

.auth-foot {
  margin: 18px 0 0;
  font-size: 12.5px;
  color: var(--text-3);
  text-align: center;
}

/* ---------- Sakin formu (herkese açık sayfa) ---------- */
.public-page {
  font-size: 15px;
}

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.bar {
  margin: 0 auto;
  padding: 10px 20px;
}

.bar-narrow {
  max-width: 640px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.bar-narrow .brand svg {
  height: 56px;
}

.brand-sub {
  color: var(--text-3);
  font-size: 14px;
  border-left: 1px solid var(--border);
  padding-left: 14px;
}

.main-narrow {
  max-width: 640px;
  margin: 0 auto;
  padding: 28px 20px 48px;
}

.public-page h1 {
  font-size: 24px;
  margin-bottom: 8px;
  color: var(--brand);
}

.public-page .card {
  padding: 22px;
}

.public-page label,
.public-page legend {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.public-page input[type="text"],
.public-page input[type="tel"],
.public-page input[type="email"],
.public-page textarea,
.public-page .btn {
  min-height: 46px;
}

.public-page input[type="text"],
.public-page input[type="tel"],
.public-page input[type="email"] {
  height: 46px;
}

.public-page textarea {
  min-height: 112px;
}

.public-page .btn {
  height: 48px;
  font-size: 15px;
}

.tamam {
  display: none;
  text-align: center;
  padding: 12px 0;
}

.tamam.acik {
  display: block;
}

.tamam .no {
  display: inline-block;
  margin: 10px 0 14px;
  padding: 8px 18px;
  border-radius: 999px;
  background: var(--accent-50);
  color: var(--brand);
  font-weight: 700;
  font-size: 20px;
}

.tamam h2 {
  margin: 0;
  color: var(--success);
  font-size: 22px;
}

.tamam p {
  color: var(--text-3);
  margin: 0 0 18px;
}

/* ---------- Dar tablolar: satırlar karta dönüşür ---------- */
@container (max-width: 1150px) {
  .request-table th:nth-child(4),
  .request-table td[data-label="Daire statüsü"] {
    display: none;
  }
}

@container (max-width: 480px) {
  .data-table:not(.request-table):not(.dash-table),
  .data-table:not(.request-table):not(.dash-table) tbody,
  .data-table:not(.request-table):not(.dash-table) tr,
  .data-table:not(.request-table):not(.dash-table) td {
    display: block;
  }

  .data-table:not(.request-table):not(.dash-table) thead {
    display: none;
  }

  .data-table:not(.request-table):not(.dash-table) tr {
    border-bottom: 1px solid var(--border-soft);
    padding: 10px 14px;
  }

  .data-table:not(.request-table):not(.dash-table) tr:last-child {
    border-bottom: 0;
  }

  .data-table:not(.request-table):not(.dash-table) td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 0;
    padding: 4px 0;
    text-align: right;
  }

  .data-table:not(.request-table):not(.dash-table) td::before {
    content: attr(data-label);
    font-weight: 500;
    font-size: 12.5px;
    color: var(--text-3);
    text-align: left;
    flex-shrink: 0;
  }
}

@container (max-width: 520px) {
  .dash-table .col-opt {
    display: none;
  }

  .dash-table th,
  .dash-table td {
    padding-left: 10px;
    padding-right: 10px;
  }
}

@container (max-width: 860px) {
  .request-table,
  .request-table tbody,
  .request-table td {
    display: block;
  }

  .request-table thead {
    display: none;
  }

  .request-table tr {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 3px 10px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-soft);
  }

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

  .request-table td {
    padding: 0;
    border: 0;
    text-align: left;
    font-size: 12.5px;
    color: var(--text-2);
    white-space: normal;
  }

  .request-table .c-no {
    order: 1;
    font-size: 13.5px;
  }

  .request-table .c-status {
    order: 2;
    margin-left: auto;
  }

  .request-table .c-subject {
    order: 3;
    flex: 1 1 100%;
    width: auto;
    min-width: 0;
    max-width: none;
    font-size: 14px;
    margin-bottom: 2px;
  }

  .request-table .subject-link {
    white-space: normal;
  }

  .request-table .excerpt {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  .request-table .c-unit {
    order: 4;
    font-weight: 600;
    color: var(--text);
  }

  .request-table .c-name {
    order: 5;
  }

  .request-table .c-assignee {
    order: 6;
  }

  .request-table .c-date {
    order: 7;
    flex: 1 1 100%;
  }

  .request-table .date-main {
    display: inline;
    color: var(--text-3);
  }

  .request-table .age {
    margin-left: 6px;
  }

  .request-table .c-files {
    display: none;
  }
}

/* ---------- Kırılım noktaları ---------- */
@media (max-width: 1400px) {
  .dash-grid {
    grid-template-columns: 1fr;
  }
}

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

@media (max-width: 1200px) {
  .shell {
    display: block;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .sidebar-inner {
    position: static;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0 12px;
    padding: 8px 14px 0;
    overflow: visible;
  }

  .sidebar .brand {
    padding: 0;
    border-bottom: 0;
  }

  .sidebar .brand svg {
    height: 36px;
  }

  .side-user {
    margin: 0 0 0 auto;
    padding: 0;
    border-top: 0;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .user-chip {
    padding: 0;
  }

  .user-meta {
    display: none;
  }

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

  .user-action {
    width: auto;
    padding: 0 10px;
  }

  .side-nav {
    order: 3;
    flex: 1 1 100%;
    flex-direction: row;
    gap: 2px;
    margin-top: 6px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .side-nav::-webkit-scrollbar {
    display: none;
  }

  .nav-group {
    display: none;
  }

  .nav-link {
    flex: 0 0 auto;
    padding: 9px 12px;
    border-radius: 0;
    border-bottom: 2px solid transparent;
  }

  .nav-link:hover {
    background: transparent;
  }

  .nav-link.is-active {
    background: transparent;
    border-bottom-color: var(--brand);
  }

  .content-inner {
    padding: 20px 16px 48px;
  }
}

@media (max-width: 960px) {
  .detail-grid {
    grid-template-columns: 1fr;
  }

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

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

  .subject-head {
    display: none;
  }

  .subject-row {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 14px 16px;
  }

  .subject-edit-form {
    align-items: end;
  }

  .subject-edit-form .field > label:not(.checkbox-label),
  .subject-edit-form .assignee-picker > legend {
    position: static;
    width: auto;
    height: auto;
    clip-path: none;
  }

  .subject-meta-actions {
    flex: 0 0 auto;
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .subject-edit-form {
    grid-template-columns: 76px minmax(0, 1fr) auto;
    gap: 10px;
  }

  .subject-edit-form > div:nth-of-type(1),
  .subject-edit-form > div:nth-of-type(2) {
    grid-column: 1 / -1;
  }

  .row .field {
    margin-bottom: 0;
  }

  .row {
    margin-bottom: 16px;
  }

  .brand-sub {
    display: none;
  }

  h1 {
    font-size: 20px;
  }

  .card {
    padding: 16px;
  }

  .card-flush {
    padding: 0;
  }

  .disclosure {
    padding: 0;
  }

  .main-narrow {
    padding: 18px 12px 40px;
  }

  .bar {
    padding: 10px 12px;
  }

  .meta-list > div {
    grid-template-columns: 100px minmax(0, 1fr);
  }

  .auth-card {
    padding: 24px 20px;
  }

  .user-action span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

/* Dokunmatik ekranlarda hedefler büyür */
@media (pointer: coarse) {
  :root {
    --control-h: 44px;
  }

  .btn-sm {
    height: 40px;
  }

  .user-action {
    height: 40px;
    min-width: 40px;
  }

  .tab {
    padding-top: 9px;
    padding-bottom: 9px;
  }

  .subject-edit-form input:not([type="checkbox"]),
  .subject-edit-form select {
    height: 42px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .btn,
  .chip span,
  .nav-link,
  .tab,
  .stat-card,
  .user-action {
    transition: background-color 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
  }
}
