:root {
  color-scheme: light;
  --ink: #172334;
  --muted: #6b7280;
  --line: #d8e0ea;
  --panel: #ffffff;
  --panel-2: #f4f7fb;
  --brand: #132642;
  --brand-2: #eef4ff;
  --accent: #c69344;
  --accent-2: #fff6e8;
  --paid: #0f766e;
  --warn: #b7791f;
  --blue: #234c84;
  --blue-2: #edf4ff;
  --violet: #5f63b8;
  --violet-2: #f2f1ff;
  --red-2: #fff1f0;
  --focus: #315efb;
  --shadow: 0 20px 48px rgba(15, 23, 42, 0.12);
  --soft-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
  --navy-strong: #0d1b2d;
  --navy-soft: #16263c;
  --gold-soft: #e6c48b;
  --gold-strong: #c69344;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at top left, rgba(49, 94, 251, 0.08), transparent 360px),
    radial-gradient(circle at top right, rgba(198, 147, 68, 0.08), transparent 320px),
    linear-gradient(180deg, #f9fbfd 0%, var(--panel-2) 360px);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.login-page {
  display: grid;
  min-height: 100vh;
  background: #064aa6;
}

body.mobile-menu-open {
  overflow: hidden;
}

.login-screen {
  display: grid;
  min-height: 100vh;
  padding: clamp(18px, 4vw, 56px);
  background:
    linear-gradient(90deg, rgba(0, 30, 86, 0.44), rgba(6, 74, 166, 0.08) 54%, rgba(6, 74, 166, 0)),
    #064aa6;
}

.login-panel {
  display: grid;
  grid-template-columns: minmax(320px, 0.92fr) minmax(360px, 1.08fr);
  align-items: center;
  width: min(1180px, 100%);
  min-height: min(720px, calc(100vh - clamp(36px, 8vw, 112px)));
  margin: auto;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(3, 45, 112, 0.42);
  box-shadow: 0 32px 78px rgba(0, 22, 68, 0.32);
}

.login-card {
  display: grid;
  gap: 18px;
  width: min(420px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid rgba(255, 232, 111, 0.24);
  border-radius: 8px;
  background: rgba(4, 37, 92, 0.62);
  color: #fff8cc;
  box-shadow: 0 22px 46px rgba(0, 20, 54, 0.28);
  backdrop-filter: blur(10px);
}

.login-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.login-heading h1 {
  margin: 0;
  color: #ffe56e;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1;
  letter-spacing: 0;
}

.login-lock {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 2px solid #ffe56e;
  border-radius: 999px;
  color: #ffe56e;
  font-size: 24px;
  font-weight: 900;
}

.login-error {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid rgba(255, 180, 163, 0.48);
  border-radius: 8px;
  background: rgba(194, 65, 45, 0.24);
  color: #fff4ef;
  font-weight: 700;
}

.login-field {
  display: grid;
  gap: 8px;
}

.login-field span {
  color: #ffe56e;
  font-size: 15px;
  font-weight: 800;
}

.login-field input {
  width: 100%;
  min-height: 54px;
  border: 2px solid rgba(255, 229, 110, 0.84);
  border-radius: 8px;
  background: #ffe56e;
  color: #10203d;
  padding: 0 14px;
  font-size: 18px;
  font-weight: 700;
}

.login-submit {
  margin-top: 4px;
  min-height: 54px;
  background: #ffe56e;
  color: #073b86;
  box-shadow: 0 16px 32px rgba(0, 17, 52, 0.28);
}

.login-art {
  align-self: stretch;
  display: grid;
  place-items: center end;
  min-height: 100%;
  background: linear-gradient(90deg, rgba(6, 74, 166, 0), #064aa6 22%);
}

.login-art img {
  width: min(62vw, 560px);
  height: min(82vh, 720px);
  object-fit: contain;
  object-position: right center;
  filter: drop-shadow(0 30px 42px rgba(0, 23, 70, 0.24));
}

button,
input,
select,
textarea {
  font: inherit;
  min-width: 0;
  max-width: 100%;
}

button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: rgba(20, 184, 166, 0.18);
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(20, 184, 166, 0.32);
  outline-offset: 2px;
}

button,
label.icon-button,
select {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: clamp(250px, 19vw, 300px) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px 18px;
  background: linear-gradient(180deg, var(--navy-strong) 0%, var(--navy-soft) 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand > div {
  min-width: 0;
}

.brand-logo {
  object-fit: contain;
  width: 44px;
  height: 44px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.2);
}

.brand h1,
.brand p,
.list-header h2,
.list-header p,
.sync-box p {
  margin: 0;
}

.brand h1 {
  color: #ffffff;
  font-size: 19px;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.brand p,
.sync-box p,
.list-header p,
.meta,
.field span,
.document-row small,
.note-date {
  color: var(--muted);
  font-size: 13px;
}

.brand p,
.sync-box p {
  color: rgba(226, 232, 240, 0.72);
}

.primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, #be8a3f, #d8a85b);
  color: #1a2436;
  font-weight: 750;
  text-align: center;
  box-shadow: 0 14px 28px rgba(190, 138, 63, 0.24);
}

.primary-action:active,
.secondary-action:active,
.danger-action:active,
.nav-item:active,
.status-tab:active,
.tab:active,
.case-card:active,
.icon-button:active {
  transform: translateY(1px);
}

.primary-action.compact {
  padding: 0 18px;
}

.sidebar-guide {
  width: 100%;
  background: rgba(255, 255, 255, 0.96);
  min-height: 46px;
  border-color: rgba(198, 147, 68, 0.28);
}

.sidebar-guide.active {
  border-color: var(--gold-strong);
  color: var(--brand);
}

.sidebar-appointment-links {
  display: grid;
  gap: 7px;
  max-height: 280px;
  overflow: auto;
  padding-right: 2px;
}

.sidebar-appointment-links[hidden] {
  display: none;
}

.appointment-country-link {
  display: grid;
  gap: 2px;
  min-height: 52px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
  text-decoration: none;
  box-shadow: none;
}

.appointment-country-link:hover {
  border-color: rgba(198, 147, 68, 0.4);
  background: rgba(255, 255, 255, 0.12);
}

.appointment-country-link span {
  font-size: 13px;
  font-weight: 800;
}

.appointment-country-link small {
  color: rgba(226, 232, 240, 0.68);
  font-size: 11px;
  line-height: 1.25;
}

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

.nav-item {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: #f8fafc;
  text-align: left;
  padding: 0 12px;
  min-width: 0;
}

.nav-item span,
.nav-item strong {
  min-width: 0;
}

.nav-item.active {
  border-color: rgba(198, 147, 68, 0.48);
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  box-shadow: inset 4px 0 0 var(--gold-strong), 0 10px 24px rgba(15, 23, 42, 0.22);
}

.icon-nav-group {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.icon-nav-item {
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  min-height: 66px;
  padding: 12px 14px;
  gap: 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: none;
}

.icon-nav-item.active {
  box-shadow: inset 0 0 0 1px rgba(198, 147, 68, 0.9), 0 12px 24px rgba(4, 18, 40, 0.2);
}

.icon-nav-symbol {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: rgba(248, 250, 252, 0.88);
}

.icon-nav-label {
  min-width: 0;
  color: rgba(248, 250, 252, 0.92);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: 0;
  text-align: left;
  text-wrap: pretty;
  word-break: keep-all;
}

.icon-nav-symbol svg,
.sidebar-icon-action .button-icon svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-nav-item strong {
  display: inline-grid;
  place-items: center;
  min-width: 40px;
  height: 40px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 14px;
  font-weight: 900;
  justify-self: end;
}

.icon-nav-item.active strong {
  background: rgba(198, 147, 68, 0.18);
  color: #fff7ea;
}

.sidebar-icon-action {
  width: 100%;
  min-height: 64px;
  border-radius: 14px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  justify-content: start;
  gap: 10px;
  padding: 0 14px;
}

.sidebar-icon-action .button-icon {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
}

.sidebar-button-label {
  min-width: 0;
  color: inherit;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: 0;
  text-align: left;
  white-space: normal;
  text-wrap: balance;
}

.sync-box {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: none;
  color: #fff;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gold-strong);
}

.workspace {
  min-width: 0;
  padding: clamp(14px, 2vw, 28px);
}

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

.search-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(620px, 100%);
  min-height: 52px;
  padding: 0 14px;
  border: 1px solid #d9e1ea;
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--soft-shadow);
}

.search-wrap input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
}

.top-actions {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid #d9e1ea;
  border-radius: 12px;
  background: #fff;
  color: var(--brand);
  font-weight: 800;
}

.mobile-menu-button,
.mobile-menu-backdrop,
.mobile-case-brief {
  display: none;
}

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

.case-list,
.detail-pane {
  min-width: 0;
}

body.detail-focus-mode .case-list {
  display: none;
}

body.detail-focus-mode .detail-pane {
  display: block;
}

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

.list-header > * {
  min-width: 0;
}

.list-header h2 {
  font-size: 24px;
}

select,
input,
textarea {
  border: 2px solid #bfd5ce;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

select:focus,
input:focus,
textarea:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.14);
}

select {
  min-height: 46px;
  padding: 0 12px;
}

.case-items {
  display: grid;
  gap: 10px;
}

.ops-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.ops-card {
  display: grid;
  gap: 5px;
  min-height: 72px;
  padding: 12px;
  border: 1px solid #c4d8d1;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--soft-shadow);
}

.ops-card span,
.case-next span,
.case-command span {
  color: var(--muted);
  font-size: 12px;
}

.ops-card strong {
  font-size: 26px;
}

.case-next strong,
.case-command strong {
  overflow-wrap: anywhere;
}

.ops-card.urgent {
  border-color: #f0d09a;
  background: var(--accent-2);
  color: var(--warn);
}

.ops-card.today {
  border-color: #bad1ea;
  background: var(--blue-2);
  color: var(--blue);
}

.ops-card.week {
  border-color: #bddbd3;
  background: var(--brand-2);
  color: var(--brand);
}

.ops-card.danger {
  border-color: #f2c6ba;
  background: var(--red-2);
  color: var(--accent);
}

.status-tabs {
  display: flex;
  gap: 8px;
  margin: 0 0 12px;
  overflow-x: auto;
  padding-bottom: 2px;
  scroll-padding-inline: 12px;
  -webkit-overflow-scrolling: touch;
}

.status-tab {
  flex: 0 0 auto;
  min-height: 46px;
  border: 1px solid #d8e0ea;
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  padding: 0 14px;
  font-weight: 750;
}

.status-tab[data-status="Randevulular"] {
  border-color: #bad1ea;
  background: var(--blue-2);
}

.status-tab[data-status="Randevu Alınacaklar"] {
  border-color: #f0d09a;
  background: var(--accent-2);
}

.status-tab[data-status="Vize Takip"] {
  border-color: #d6cbf2;
  background: var(--violet-2);
}

.status-tab[data-status="Black List"],
.status-tab[data-status="İptal Olanlar"] {
  border-color: #f2c6ba;
  background: var(--red-2);
}

.status-tab[data-status="Arşiv"] {
  border-color: #c8d3cf;
  background: #f1f5f3;
}

.status-tab.active {
  border-color: rgba(198, 147, 68, 0.42);
  background: #fff;
  color: var(--brand);
  box-shadow: inset 0 -3px 0 var(--gold-strong), var(--soft-shadow);
}

.status-tab[data-status="Randevulular"].active {
  border-color: var(--blue);
  background: var(--blue-2);
  color: var(--blue);
  box-shadow: inset 0 -3px 0 var(--blue);
}

.status-tab[data-status="Randevu Alınacaklar"].active {
  border-color: var(--warn);
  background: var(--accent-2);
  color: var(--warn);
  box-shadow: inset 0 -3px 0 var(--warn);
}

.status-tab[data-status="Vize Takip"].active {
  border-color: var(--violet);
  background: var(--violet-2);
  color: var(--violet);
  box-shadow: inset 0 -3px 0 var(--violet);
}

.status-tab[data-status="Black List"].active,
.status-tab[data-status="İptal Olanlar"].active {
  border-color: var(--accent);
  background: var(--red-2);
  color: var(--accent);
  box-shadow: inset 0 -3px 0 var(--accent);
}

.status-tab[data-status="Arşiv"].active {
  border-color: var(--muted);
  background: #f1f5f3;
  color: var(--muted);
  box-shadow: inset 0 -3px 0 var(--muted);
}

.status-tab strong {
  margin-left: 6px;
}

.case-card {
  width: 100%;
  min-height: 104px;
  padding: 16px;
  border: 1px solid #d8e0ea;
  border-left: 5px solid #d1d9e6;
  border-radius: 12px;
  background: #fff;
  text-align: left;
  box-shadow: var(--soft-shadow);
  overflow: hidden;
}

.case-card.active {
  border-color: rgba(198, 147, 68, 0.42);
  border-left-color: var(--gold-strong);
  box-shadow: 0 0 0 3px rgba(198, 147, 68, 0.14), var(--shadow);
}

.case-card[data-status-group="Randevulular"] {
  border-left-color: var(--blue);
  background: #fff;
}

.case-card[data-status-group="Randevu Alınacaklar"] {
  border-left-color: var(--warn);
  background: #fff;
}

.case-card[data-status-group="Vize Takip"] {
  border-left-color: var(--violet);
  background: #fff;
}

.case-card[data-status-group="Black List"],
.case-card[data-status-group="İptal Olanlar"] {
  border-left-color: var(--accent);
  background: #fff;
}

.case-card[data-status-group="Arşiv"] {
  border-left-color: #9aa4b2;
  background: #fff;
}

.inline-detail {
  margin: -4px 0 14px;
}

.new-entry-card {
  max-width: 1120px;
}

.case-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  font-weight: 800;
}

.appointment-stamp {
  flex: 0 0 auto;
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
  text-align: right;
}

.case-subtitle {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
}

.case-next {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.case-next > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #eef2ef;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.badge.paid {
  background: #e2f3e7;
  color: var(--paid);
}

.badge.warn {
  background: var(--accent-2);
  color: var(--warn);
}

.badge.danger {
  background: #fce4df;
  color: var(--accent);
}

.badge.info {
  background: var(--blue-2);
  color: var(--blue);
}

.badge.track {
  background: var(--violet-2);
  color: var(--violet);
}

.detail-card {
  border: 1px solid #c4d8d1;
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.meeting-manager {
  overflow: hidden;
}

.meeting-contact-list {
  display: grid;
  gap: 12px;
}

.meeting-contact-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #c4d8d1;
  border-radius: 8px;
  background: #f9fffc;
  box-shadow: var(--soft-shadow);
}

.detail-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  background: linear-gradient(135deg, #0f2f2b 0%, #0f766e 100%);
  border-bottom: 1px solid #0b4f49;
  color: #f7fffc;
}

.detail-head > div {
  min-width: 0;
}

.detail-head h2 {
  margin: 0 0 8px;
  font-size: 26px;
  color: #ffffff;
}

.detail-head .meta {
  color: #d7f7ef;
}

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

.secondary-action,
.danger-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid #123d38;
  border-radius: 8px;
  background: #123d38;
  color: #ffffff;
  padding: 0 14px;
  font-weight: 750;
  text-align: center;
  white-space: normal;
}

.secondary-action {
  box-shadow: 0 6px 14px rgba(18, 48, 41, 0.18);
}

.secondary-action:hover {
  background: #0f766e;
  border-color: #0f766e;
}

.secondary-action.whatsapp {
  border-color: #22c55e;
  background: #dcfce7;
  color: #14532d;
}

.danger-action {
  border-color: #fecaca;
  background: #fff7f5;
  color: #991b1b;
}

.tabs {
  display: flex;
  gap: 8px;
  padding: 14px;
  overflow-x: auto;
  background: #eef8f3;
  border-bottom: 1px solid var(--line);
  scroll-padding-inline: 14px;
  -webkit-overflow-scrolling: touch;
}

.detail-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  background: #f4fbf7;
}

.overview-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid rgba(17, 35, 59, 0.08);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.overview-card--accent {
  background: linear-gradient(180deg, #f6fffb 0%, #effaf5 100%);
}

.overview-eyebrow {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.overview-card > strong {
  color: #11233b;
  font-size: 18px;
  line-height: 1.3;
}

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

.overview-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.overview-list span {
  color: var(--muted);
  font-size: 12px;
}

.overview-list strong {
  color: var(--ink);
  font-size: 13px;
  text-align: right;
  overflow-wrap: anywhere;
}

.quick-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: #d4e3de;
  border-bottom: 1px solid #c4d8d1;
}

.quick-summary div {
  display: grid;
  gap: 4px;
  min-height: 62px;
  padding: 11px 14px;
  background: #f9fffc;
}

.quick-summary div:nth-child(1) {
  border-top: 3px solid var(--blue);
}

.quick-summary div:nth-child(2) {
  border-top: 3px solid var(--warn);
}

.quick-summary div:nth-child(3) {
  border-top: 3px solid var(--accent);
}

.quick-summary div:nth-child(4) {
  border-top: 3px solid var(--violet);
}

.quick-summary span {
  color: var(--muted);
  font-size: 12px;
}

.quick-summary strong {
  overflow-wrap: anywhere;
}

.balance-warning {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid #f3d7a8;
  background: #fff7df;
  color: #7c3f00;
}

.balance-warning span,
.balance-warning small {
  color: inherit;
}

.balance-warning strong {
  color: #4a2500;
  overflow-wrap: anywhere;
}

.case-command {
  display: grid;
  grid-template-columns: 1.6fr 0.7fr 0.9fr;
  gap: 1px;
  background: #d4e3de;
  border-bottom: 1px solid #c4d8d1;
}

.case-command div {
  display: grid;
  gap: 4px;
  min-height: 58px;
  padding: 11px 14px;
  background: #f9fffc;
}

.case-command div:first-child {
  border-left: 4px solid var(--brand);
}

.case-flag-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #f2faf6;
}

.person-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--line);
}

.person-strip div {
  display: grid;
  gap: 4px;
  min-height: 58px;
  padding: 11px 12px;
  background: #fff;
}

.person-strip span {
  color: var(--muted);
  font-size: 12px;
}

.person-strip strong {
  overflow-wrap: anywhere;
}

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

.identity-surface {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(17, 35, 59, 0.08);
  border-radius: 8px;
  background: #fbfdfc;
  box-shadow: var(--soft-shadow);
}

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

.identity-surface__head h3,
.identity-surface__head p {
  margin: 0;
}

.identity-surface__head h3 {
  color: #11233b;
  font-size: 18px;
}

.identity-surface__head p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.tab {
  flex: 0 0 auto;
  display: inline-grid;
  grid-template-columns: auto auto;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  min-width: 96px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: #103f38;
  padding: 0 14px;
  font-weight: 750;
  color: #f8fffb;
  box-shadow: 0 8px 18px rgba(15, 47, 43, 0.14);
}

.tab .button-icon {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
}

.tab .button-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tab-label {
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.tab:nth-child(1) {
  background: #0f4b42;
  color: #f8fffb;
  border-color: #2dd4bf;
}

.tab:nth-child(2) {
  background: #4b2f7d;
  color: #ffffff;
  border-color: #bba7f2;
}

.tab:nth-child(3) {
  background: #174f86;
  color: #ffffff;
  border-color: #8fc4ff;
}

.tab:nth-child(4) {
  background: #7a430b;
  color: #fff8ed;
  border-color: #f5c16c;
}

.tab:nth-child(5) {
  background: #33433e;
  color: #f7fffb;
  border-color: #9fb5ad;
}

.tab:nth-child(6) {
  background: #7b470f;
  color: #fff8ed;
  border-color: #f3bd76;
}

.tab:nth-child(7) {
  background: #263f7a;
  color: #ffffff;
  border-color: #a8c0ff;
}

.tab:nth-child(8) {
  background: #176a33;
  color: #f4fff7;
  border-color: #91dfa7;
}

.tab.active {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(15, 47, 43, 0.24), inset 0 -4px 0 rgba(255, 255, 255, 0.86);
}

.tab-panel {
  padding: 18px;
}

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

.field {
  display: grid;
  gap: 7px;
}

.field span {
  font-weight: 750;
}

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

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  outline-color: var(--focus);
}

textarea {
  resize: vertical;
  min-height: 96px;
}

.money-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.payment-currency-banner {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid #9bc6f2;
  border-radius: 8px;
  background: var(--blue-2);
  color: var(--blue);
}

.payment-currency-banner span,
.payment-currency-banner small {
  color: inherit;
}

.payment-currency-banner strong {
  padding: 3px 8px;
  border-radius: 8px;
  background: #fff;
}

.process-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(0, 1.15fr);
  gap: 18px;
  align-items: start;
}

.process-layout h3 {
  margin: 0 0 12px;
}

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

.readiness-panel {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid #c4d8d1;
  border-radius: 8px;
}

.readiness-panel ul,
.readiness-panel p {
  margin: 8px 0 0;
}

.ready-panel {
  border-color: #b7dfc2;
  background: #eef9f1;
}

.checkline {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 46px;
  padding: 2px 0;
}

.checkline input {
  width: 22px;
  height: 22px;
  accent-color: var(--brand);
}

.document-tools {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  gap: 10px;
  margin-bottom: 14px;
}

.document-mode-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.document-mode-grid section {
  padding: 12px;
  border: 1px solid #c4d8d1;
  border-radius: 8px;
  background: #fff;
}

.document-mode-grid h3,
.document-mode-grid p {
  margin: 0;
}

.section-note,
.agency-subtitle {
  color: var(--muted);
  font-size: 13px;
}

.agency-subtitle {
  margin: -6px 0 10px;
}

.agency-checklist {
  margin-bottom: 14px;
}

.customer-doc-preview {
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid #c4d8d1;
  border-radius: 8px;
  background: #fff;
  line-height: 1.35;
}

.missing-message-panel {
  display: grid;
  gap: 10px;
  margin: 14px 0;
  padding: 12px;
  border: 1px solid #c4d8d1;
  border-radius: 8px;
}

.compact-message {
  min-height: 150px;
}

.document-list,
.note-list,
.doc-checklist {
  display: grid;
  gap: 10px;
}

.document-workspace {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.document-surface {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(17, 35, 59, 0.08);
  border-radius: 8px;
  background: #fbfdfc;
  box-shadow: var(--soft-shadow);
}

.document-surface__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.document-surface__head h3,
.document-surface__head p {
  margin: 0;
}

.document-surface__head h3 {
  color: #11233b;
  font-size: 18px;
}

.document-surface__head p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.document-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(84px, auto));
  gap: 8px;
}

.document-stat-grid div {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid #d7e4df;
  border-radius: 8px;
  background: #ffffff;
  text-align: center;
}

.document-stat-grid span {
  color: var(--muted);
  font-size: 11px;
}

.document-stat-grid strong {
  color: #11233b;
  font-size: 18px;
}

.document-row,
.note-row,
.checklist-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 54px;
  padding: 13px;
  border: 1px solid #c4d8d1;
  border-radius: 8px;
  background: #fff;
}

.document-row > div,
.note-row > div,
.checklist-row > div {
  min-width: 0;
}

.document-row strong,
.note-row p,
.checklist-row label {
  overflow-wrap: anywhere;
}

.note-compose {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.duplicate-panel {
  display: grid;
  gap: 8px;
  margin: 16px 0;
  padding: 12px;
  border: 1px solid #c4d8d1;
  border-radius: 8px;
  background: #f8fbf8;
}

.warning-panel {
  background: var(--accent-2);
  border-color: #f0ce9a;
}

.blacklist-panel {
  background: #fff1f2;
  border-color: #f2a6b3;
}

.case-link {
  min-height: 44px;
  border: 1px solid #c4d8d1;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  padding: 10px 12px;
}

.danger-link {
  border-color: #f2a6b3;
  color: #8f1d2c;
}

.whatsapp-panel {
  display: grid;
  gap: 14px;
}

.passport-panel {
  display: grid;
  gap: 16px;
}

.drop-zone {
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 170px;
  padding: 18px;
  border: 2px dashed #76b9a7;
  border-radius: 8px;
  background: #f3fbf7;
  text-align: center;
}

.drop-zone.dragging {
  border-color: var(--brand);
  background: var(--brand-2);
}

.drop-zone span {
  max-width: 520px;
  color: var(--muted);
  font-size: 13px;
}

.compact-drop {
  min-height: 112px;
  margin-bottom: 14px;
}

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

.template-actions > button,
.template-actions > label {
  flex: 0 1 auto;
}

.preset-actions {
  margin-bottom: 14px;
}

.message-preview {
  min-height: 220px;
  white-space: pre-wrap;
  line-height: 1.5;
}

.empty-state {
  display: grid;
  place-items: center;
  gap: 12px;
  min-height: 420px;
  border: 2px dashed #a8c8bf;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  text-align: center;
  padding: 24px;
}

.compact-empty {
  min-height: 260px;
}

.guide-pane {
  display: grid;
  gap: 14px;
}

.guide-collapse {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.inline-guide-card {
  box-shadow: none;
}

.guide-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 10px;
}

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

.guide-row {
  display: grid;
  grid-template-columns: 1.1fr 0.8fr 1.3fr;
  gap: 14px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.guide-row h3,
.guide-row p {
  margin: 0;
}

.guide-row p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.guide-link {
  color: var(--brand);
  font-weight: 750;
  text-decoration: none;
}

.empty-state h2,
.empty-state p {
  margin: 0;
}

.empty-state p {
  max-width: 420px;
  color: var(--muted);
}

@media (max-width: 1180px) and (min-width: 1041px) {
  .app-shell {
    grid-template-columns: 238px minmax(0, 1fr);
  }

  .sidebar {
    gap: 16px;
    padding: 18px 14px;
  }

  .nav-item {
    padding: 0 8px;
  }

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

  .ops-panel {
    grid-template-columns: repeat(4, minmax(120px, 1fr));
  }

  .document-tools,
  .document-workspace,
  .money-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 5;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: center;
    gap: 14px;
    padding: 14px;
    max-height: 46vh;
    overflow: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

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

  .nav-group,
  .sync-box {
    grid-column: 1 / -1;
  }

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

  #newCaseBtn,
  #peopleViewBtn,
  #meetingContactsBtn,
  #appointmentLinksToggle {
    grid-column: span 2;
  }

  #appointmentLinksPanel {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: 240px;
  }

  .nav-item {
    grid-template-columns: 20px 1fr;
    min-height: 44px;
  }

  .nav-item strong {
    display: none;
  }

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

  .topbar {
    align-items: stretch;
  }

  .search-wrap {
    width: 100%;
  }

  .new-entry-card {
    max-width: none;
  }
}

@media (max-width: 820px) {
  .login-screen {
    padding: 16px;
  }

  .login-panel {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 18px;
    min-height: calc(100vh - 32px);
    padding: 18px 0;
  }

  .login-card {
    order: 2;
    width: min(440px, calc(100% - 28px));
  }

  .login-art {
    order: 1;
    min-height: 220px;
    place-items: end center;
    background: transparent;
  }

  .login-art img {
    width: min(78vw, 330px);
    height: 240px;
  }

  .sidebar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    position: static;
    max-height: none;
  }

  .brand,
  .nav-group,
  .sync-box {
    grid-column: 1 / -1;
  }

  #newCaseBtn,
  #peopleViewBtn,
  #meetingContactsBtn,
  #appointmentLinksToggle {
    grid-column: 1 / -1;
  }

  #appointmentLinksPanel {
    grid-template-columns: 1fr;
  }

  .nav-group {
    grid-template-columns: 1fr 1fr;
  }

  .topbar,
  .detail-head,
  .list-header {
    align-items: stretch;
    flex-direction: column;
  }

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

  .top-actions > *,
  .header-actions > * {
    flex: 1;
  }

  .detail-overview,
  .quick-summary,
  .person-strip,
  .case-command {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .document-tools,
  .document-workspace,
  .identity-workspace,
  .money-row,
  .process-layout,
  .guide-toolbar,
  .guide-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  body {
    background: linear-gradient(180deg, #eaf6f1 0%, #f3f8f5 260px);
  }

  .app-shell {
    display: block;
  }

  .mobile-menu-button {
    display: grid;
  }

  .mobile-menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 18;
    display: block;
    background: rgba(8, 31, 27, 0.36);
  }

  .mobile-menu-backdrop[hidden] {
    display: none;
  }

  .sidebar {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    z-index: 22;
    display: flex;
    width: min(86vw, 340px);
    max-height: none;
    padding: 16px;
    overflow: auto;
    border-right: 0;
    border-left: 1px solid var(--line);
    border-bottom: 0;
    box-shadow: -18px 0 44px rgba(18, 48, 41, 0.20);
    transform: translateX(104%);
    transition: transform 0.22s ease;
  }

  body.mobile-menu-open .sidebar {
    transform: translateX(0);
  }

  .brand {
    grid-column: auto;
  }

  .nav-group {
    grid-template-columns: 1fr;
  }

  .nav-item {
    grid-template-columns: 22px 1fr auto;
  }

  .nav-item strong {
    display: block;
  }

  #newCaseBtn,
  #peopleViewBtn,
  #meetingContactsBtn,
  #appointmentLinksToggle,
  #appointmentLinksPanel,
  .sync-box {
    grid-column: auto;
  }

  #appointmentLinksPanel {
    grid-template-columns: 1fr;
    max-height: 230px;
  }

  .workspace {
    padding: 10px;
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 14;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    margin: -10px -10px 8px;
    padding: 10px;
    background: rgba(234, 246, 241, 0.96);
    border-bottom: 1px solid rgba(201, 216, 210, 0.76);
    backdrop-filter: blur(8px);
  }

  .search-wrap {
    min-height: 44px;
    padding: 0 10px;
    box-shadow: none;
  }

  .search-wrap input {
    font-size: 14px;
  }

  .top-actions {
    flex-direction: row;
    justify-content: flex-end;
  }

  .top-actions .logout-button,
  .top-actions #exportBtn,
  .top-actions label.icon-button {
    display: none;
  }

  .icon-button {
    width: 44px;
    height: 44px;
  }

  .list-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
    margin-bottom: 8px;
  }

  .list-header h2 {
    font-size: 20px;
  }

  .list-header p {
    margin-top: 2px;
  }

  #sortSelect,
  .status-tabs,
  .ops-panel {
    display: none;
  }

  #peopleViewBtn,
  #meetingContactsBtn,
  #appointmentLinksToggle {
    display: none;
  }

  body.mobile-menu-open .status-tabs {
    position: fixed;
    top: 304px;
    right: 16px;
    z-index: 24;
    display: grid;
    width: min(calc(86vw - 32px), 308px);
    grid-template-columns: 1fr;
    gap: 8px;
    margin: 0;
    padding: 0;
    overflow: visible;
  }

  body.mobile-menu-open .status-tab {
    width: 100%;
    min-height: 46px;
  }

  body.mobile-menu-open .status-tab[data-status="Vize Takip"],
  body.mobile-menu-open .status-tab[data-status="Black List"],
  body.mobile-menu-open .status-tab[data-status="İptal Olanlar"],
  body.mobile-menu-open .status-tab[data-status="Arşiv"] {
    display: none;
  }

  .nav-item[data-sidebar-status="Black List"],
  .nav-item[data-sidebar-status="İptal Olanlar"] {
    display: none;
  }

  .case-items {
    gap: 8px;
  }

  .case-card {
    min-height: 74px;
    padding: 12px 12px 12px 14px;
    border-left-width: 5px;
  }

  .case-title {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    align-items: center;
  }

  .case-title > span:first-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .appointment-stamp {
    display: none;
  }

  .mobile-case-brief {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 6px;
    color: var(--muted);
    font-size: 13px;
  }

  .mobile-case-brief span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-brief-place {
    display: grid;
    gap: 2px;
    min-width: 0;
    white-space: normal;
  }

  .mobile-brief-place strong {
    color: #111827;
    font-size: 18px;
    font-weight: 900;
    line-height: 1.05;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-brief-place small {
    color: #111827;
    font-size: 15px;
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-case-brief strong {
    flex: 0 0 auto;
    color: var(--ink);
    font-size: 26px;
    font-weight: 900;
    line-height: 1;
  }

  .case-card > .case-subtitle,
  .case-card > .case-next,
  .case-card > .badge-row {
    display: none;
  }

  .case-card.active > .case-subtitle,
  .case-card.active > .case-next,
  .case-card.active > .badge-row {
    display: flex;
  }

  .case-card.active > .case-next {
    align-items: stretch;
    flex-direction: column;
  }

  .case-card.active > .badge-row {
    display: flex;
  }

  .brand-logo {
    width: 38px;
    height: 38px;
  }

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

  .sync-box {
    padding: 10px;
  }

  .list-header h2,
  .detail-head h2 {
    font-size: 22px;
  }

  .tab {
    min-height: 46px;
  }

  .detail-head {
    padding: 16px;
  }

  .tab-panel {
    padding: 14px;
  }

  .form-grid,
  .detail-overview,
  .document-mode-grid,
  .identity-workspace,
  .quick-summary,
  .balance-warning,
  .person-strip,
  .case-command,
  .payment-currency-banner {
    grid-template-columns: 1fr;
  }

  .detail-head .header-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .detail-head .header-actions button {
    width: 100%;
  }

  .tabs {
    gap: 6px;
    padding: 10px;
  }

  .overview-card {
    padding: 14px;
  }

  .overview-list li {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }

  .overview-list strong {
    text-align: left;
  }

  .tab {
    flex: 0 0 auto;
    min-width: 104px;
    padding: 0 12px;
    font-size: 13px;
  }

  body.detail-focus-mode .detail-card {
    border-radius: 8px;
  }

  body.detail-focus-mode .detail-head {
    display: grid;
    gap: 12px;
    padding: 14px;
  }

  body.detail-focus-mode .detail-head h2 {
    font-size: 18px;
  }

  body.detail-focus-mode .detail-head .meta {
    font-size: 12px;
    line-height: 1.4;
  }

  body.detail-focus-mode .detail-head .header-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.detail-focus-mode .detail-head .header-actions .secondary-action,
  body.detail-focus-mode .detail-head .header-actions .danger-action {
    min-height: 42px;
    padding: 0 8px;
    font-size: 13px;
  }

  body.detail-focus-mode .quick-summary,
  body.detail-focus-mode .case-command,
  body.detail-focus-mode .case-flag-strip,
  body.detail-focus-mode .person-strip {
    display: none;
  }

  body.detail-focus-mode .tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    overflow: visible;
  }

  body.detail-focus-mode .tab {
    min-width: 0;
    width: 100%;
    justify-content: center;
  }

  body.detail-focus-mode .tab:not([data-tab="identity"]):not([data-tab="appointment"]):not([data-tab="payment"]) {
    display: none;
  }

  .document-row,
  .note-row,
  .checklist-row {
    align-items: stretch;
    flex-direction: column;
  }

  .document-surface__head {
    flex-direction: column;
  }

  .primary-action,
  .secondary-action,
  .danger-action,
  .nav-item,
  .appointment-country-link,
  .field input,
  .field select {
    min-height: 50px;
  }

  .document-row .template-actions,
  .note-row .template-actions {
    width: 100%;
  }

  .template-actions > button,
  .template-actions > label,
  .document-row .template-actions > button {
    flex: 1 1 140px;
  }

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

@media (max-width: 1360px) {
  .sidebar {
    width: 252px;
    padding: 20px 14px 24px;
  }

  .brand {
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
  }

  .brand-logo {
    width: 56px;
    height: 56px;
    border-radius: 16px;
  }

  .brand h1 {
    font-size: 15px;
    line-height: 1.05;
  }

  .brand p {
    font-size: 10px;
    line-height: 1.2;
  }

  .icon-nav-group,
  .nav-group {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .icon-nav-item {
    grid-template-columns: 22px minmax(0, 1fr) 36px;
    min-height: 60px;
    padding: 12px 14px;
    gap: 10px;
    border-radius: 16px;
  }

  .icon-nav-symbol {
    width: 22px;
    height: 22px;
  }

  .icon-nav-symbol svg {
    width: 18px;
    height: 18px;
  }

  .icon-nav-label {
    font-size: 12px;
    font-weight: 800;
    line-height: 1.12;
    white-space: normal;
    overflow-wrap: anywhere;
    text-wrap: balance;
  }

  .icon-nav-item strong {
    min-width: 36px;
    width: 36px;
    height: 36px;
    padding: 0;
    font-size: 12px;
    justify-self: end;
  }
}

@media (max-width: 430px) {
  .login-heading h1 {
    font-size: 25px;
  }

  .login-card {
    padding: 22px;
  }

  .login-field input,
  .login-submit {
    min-height: 52px;
  }

  .sidebar {
    gap: 10px;
    padding: 12px;
  }

  #peopleViewBtn {
    grid-column: 1 / -1;
  }

  .nav-group {
    grid-template-columns: 1fr;
  }

  .top-actions,
  .header-actions,
  .template-actions {
    flex-direction: column;
  }

  .icon-button {
    width: 100%;
  }

  .topbar .top-actions {
    flex-direction: row;
  }

  .topbar .icon-button {
    width: 44px;
  }

  .drop-zone {
    min-height: 130px;
    padding: 14px;
  }

  .empty-state {
    min-height: 300px;
  }
}

/* Premium overhaul v3 */
:root {
  --ink: #172334;
  --muted: #66758a;
  --line: #dbe3ee;
  --panel: #ffffff;
  --panel-2: #f4f7fb;
  --brand: #12233b;
  --brand-2: #eef3fa;
  --accent: #cb8e42;
  --accent-2: #fff5e7;
  --paid: #167f56;
  --warn: #b46b18;
  --blue: #295ea8;
  --blue-2: #eef4ff;
  --violet: #5d65b4;
  --violet-2: #f3f2ff;
  --red-2: #fff1ef;
  --focus: #295ea8;
  --shadow: 0 22px 44px rgba(15, 23, 42, 0.08);
  --soft-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
  --navy: #0f1c2e;
  --navy-2: #16273d;
  --gold: #cb8e42;
  --surface: #f7f9fc;
}

body {
  background:
    radial-gradient(circle at top left, rgba(41, 94, 168, 0.06), transparent 320px),
    linear-gradient(180deg, #f7f9fc 0%, #eef3f8 100%);
  color: var(--ink);
}

body.login-page {
  background: linear-gradient(180deg, #ededed 0%, #e3e3e3 100%);
}

.login-screen {
  position: relative;
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.9), transparent 22%),
    linear-gradient(180deg, #f0efef 0%, #e4e4e4 100%);
}

.login-panel::before {
  opacity: 0.36;
}

.login-heading h1 {
  color: #101010;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.52);
}

.login-heading p {
  max-width: 620px;
  color: #5e6774;
}

.login-badge {
  border-color: rgba(18, 35, 59, 0.08);
  background: rgba(255, 255, 255, 0.76);
  color: #6a7380;
}

.login-field span,
.login-input-combo strong {
  color: #eb7c1b;
}

.login-input-combo input {
  border: 1px solid rgba(18, 35, 59, 0.08);
  background: rgba(255, 255, 255, 0.95);
}

.login-submit {
  background: linear-gradient(135deg, #12233b 0%, #244163 100%);
  color: #ffffff;
}

.login-art {
  isolation: isolate;
}

.login-art img {
  mix-blend-mode: multiply;
  opacity: 0.98;
  filter: drop-shadow(0 26px 40px rgba(15, 23, 42, 0.10));
}

.app-shell {
  grid-template-columns: clamp(268px, 19vw, 320px) minmax(0, 1fr);
}

.sidebar {
  position: relative;
  gap: 20px;
  padding: 24px 18px;
  background: linear-gradient(180deg, #0f1c2e 0%, #17283f 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 18px 0 40px rgba(15, 23, 42, 0.08);
}

.sidebar::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 22%),
    radial-gradient(circle at top right, rgba(203, 142, 66, 0.12), transparent 26%);
  pointer-events: none;
}

.sidebar > * {
  position: relative;
  z-index: 1;
}

.brand {
  gap: 14px;
}

.brand-logo {
  width: 56px;
  height: 56px;
  padding: 5px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
  object-fit: contain;
}

.brand h1 {
  color: #ffffff;
  font-size: 20px;
  font-weight: 800;
}

.brand p {
  color: rgba(228, 235, 244, 0.74);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.nav-item,
.appointment-country-link,
.sync-box {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
  color: #f3f6fb;
}

.nav-item:hover,
.appointment-country-link:hover {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.09);
}

.nav-item.active {
  border-color: rgba(203, 142, 66, 0.58);
  background: rgba(255, 255, 255, 0.98);
  color: #102033;
  box-shadow: inset 4px 0 0 var(--gold), 0 16px 34px rgba(0, 0, 0, 0.16);
}

.nav-item.active .icon-nav-label,
.nav-item.active .icon-nav-symbol {
  color: #102033;
}

.icon-nav-item strong {
  background: rgba(255, 255, 255, 0.10);
  color: #ffffff;
}

.nav-item.active strong {
  background: rgba(18, 35, 59, 0.08);
  color: #12233b;
}

.primary-action {
  border: 1px solid rgba(203, 142, 66, 0.42);
  background: linear-gradient(135deg, #cb8e42 0%, #ddb370 100%);
  color: #12233b;
  box-shadow: 0 18px 34px rgba(203, 142, 66, 0.18);
}

.sidebar-guide {
  border: 1px solid rgba(203, 142, 66, 0.20);
  background: linear-gradient(180deg, #ffffff 0%, #fbf8f2 100%);
  color: #12233b;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.10);
}

.sidebar-guide .button-icon {
  color: var(--gold);
}

.sidebar .sidebar-guide .sidebar-button-label,
.sidebar #newCaseBtn .sidebar-button-label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.sync-box {
  background: rgba(255, 255, 255, 0.07);
}

.status-dot {
  background: var(--gold);
}

.workspace {
  padding: clamp(16px, 2vw, 30px);
}

.search-wrap,
.icon-button,
select,
input,
textarea {
  border-color: #d8e1ec;
}

.search-wrap,
.icon-button {
  border-radius: 14px;
}

.search-wrap {
  min-height: 54px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.icon-button {
  color: #12233b;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.05);
}

.list-header h2 {
  color: #0f1726;
  font-size: 28px;
  font-weight: 800;
}

.status-tab {
  min-height: 48px;
  border: 1px solid #d9e2ec;
  border-radius: 14px;
  background: #ffffff;
  color: #233245;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
}

.status-tab[data-status="Randevulular"] {
  border-top: 3px solid var(--blue);
}

.status-tab[data-status="Randevu Alınacaklar"] {
  border-top: 3px solid var(--gold);
}

.status-tab[data-status="Vize Takip"] {
  border-top: 3px solid var(--violet);
}

.status-tab[data-status="Black List"],
.status-tab[data-status="İptal Olanlar"] {
  border-top: 3px solid #c54f47;
}

.status-tab[data-status="Arşiv"] {
  border-top: 3px solid #8b98ab;
}

.status-tab.active {
  border-color: #12233b;
  color: #12233b;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

.case-card,
.ops-card,
.detail-card,
.meeting-contact-card,
.document-row,
.note-row,
.checklist-row,
.customer-doc-preview,
.missing-message-panel,
.duplicate-panel,
.empty-state,
.guide-row,
.document-surface,
.identity-surface,
.overview-card {
  border-color: #dde5ef;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.05);
}

.case-card {
  border-left-width: 6px;
  min-height: 110px;
  padding: 18px;
}

.case-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.09);
}

.case-card.active {
  border-color: rgba(41, 94, 168, 0.34);
  box-shadow: 0 0 0 4px rgba(41, 94, 168, 0.08), 0 24px 48px rgba(15, 23, 42, 0.12);
}

.case-title,
.appointment-stamp,
.overview-card > strong,
.document-surface__head h3,
.identity-surface__head h3 {
  color: #0f1726;
}

.case-next,
.ops-card,
.drop-zone,
.person-strip div,
.quick-summary div,
.case-command div {
  background: linear-gradient(180deg, #ffffff 0%, #f9fbfd 100%);
}

.detail-card {
  border-radius: 18px;
  overflow: hidden;
}

.detail-head {
  background: linear-gradient(135deg, #12233b 0%, #203b5c 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.detail-head .meta {
  color: rgba(225, 232, 241, 0.82);
}

.secondary-action,
.danger-action {
  min-height: 46px;
  border-radius: 12px;
}

.secondary-action {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  box-shadow: none;
}

.secondary-action:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.12);
}

.secondary-action.whatsapp {
  border-color: rgba(167, 219, 183, 0.9);
  background: #effbf3;
  color: #17603b;
}

.danger-action {
  border-color: #f4c8c3;
  background: #fff7f5;
  color: #b42318;
}

.tabs,
.case-flag-strip {
  background: #f4f7fb;
  border-bottom-color: #e0e7f0;
}

.tab {
  min-height: 46px;
  border: 1px solid #dbe3ee;
  border-radius: 12px;
  background: #ffffff;
  color: #223247;
}

.tab .button-icon {
  width: 18px;
  height: 18px;
}

.tab .button-icon svg {
  width: 18px;
  height: 18px;
}

.tab:nth-child(n) {
  background: #ffffff;
  color: #223247;
  border-color: #dbe3ee;
}

.tab.active {
  background: #12233b;
  border-color: #12233b;
  color: #ffffff;
  box-shadow: inset 0 -4px 0 var(--gold), 0 12px 24px rgba(15, 23, 42, 0.14);
}

.quick-summary,
.case-command,
.person-strip {
  background: #e1e8f0;
}

.overview-card--accent,
.ready-panel {
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}

.warning-panel {
  border-color: #efcf98;
  background: #fff8ec;
}

.blacklist-panel {
  border-color: #efb8bd;
  background: #fff5f6;
}

.drop-zone {
  border: 2px dashed #b8c8da;
}

.drop-zone.dragging {
  border-color: #295ea8;
  background: #eef4ff;
}

.guide-link {
  color: #1f4f95;
}

@media (max-width: 1040px) {
  .sidebar {
    box-shadow: none;
  }
}

@media (max-width: 680px) {
  body {
    background: linear-gradient(180deg, #f6f8fb 0%, #eef3f8 260px);
  }

  .topbar {
    background: rgba(246, 248, 251, 0.96);
    border-bottom-color: rgba(219, 227, 238, 0.92);
  }

  .sidebar {
    width: min(86vw, 344px);
    box-shadow: -22px 0 46px rgba(15, 23, 42, 0.22);
  }

  .case-card {
    border-radius: 14px;
  }

  .icon-nav-item {
    min-height: 70px;
    padding: 12px;
    gap: 12px;
  }

  .icon-nav-label {
    font-size: 10.5px;
  }

  .icon-nav-item strong {
    min-width: 36px;
    height: 36px;
    font-size: 13px;
  }

  .tab {
    min-width: 88px;
    gap: 6px;
    padding: 0 10px;
  }

  .tab-label {
    font-size: 11px;
  }
}

/* Business theme layer */
:root {
  --ink: #17212f;
  --muted: #667085;
  --line: #d6dde8;
  --panel: #ffffff;
  --panel-2: #f4f7fb;
  --brand: #0f6b64;
  --brand-2: #e7f5f2;
  --accent: #b42318;
  --accent-2: #fff3df;
  --paid: #167044;
  --warn: #a15c07;
  --blue: #155eef;
  --blue-2: #eaf1ff;
  --violet: #6941c6;
  --violet-2: #f2edff;
  --red-2: #fff0ed;
  --focus: #0f6b64;
  --shadow: 0 18px 42px rgba(16, 24, 40, 0.10);
  --soft-shadow: 0 8px 22px rgba(16, 24, 40, 0.06);
  --navy: #102033;
  --navy-2: #172b42;
  --gold: #bf7a12;
  --surface: #f7f9fc;
}

body {
  background:
    linear-gradient(180deg, #f7f9fc 0%, #eef3f8 100%);
  color: var(--ink);
}

body.login-page,
.login-screen {
  background:
    linear-gradient(90deg, rgba(10, 31, 54, 0.94), rgba(15, 67, 95, 0.82)),
    #102033;
}

.login-panel {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 34px 80px rgba(9, 20, 36, 0.34);
}

.login-card {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(15, 32, 51, 0.86);
  color: #f8fafc;
}

.login-heading h1,
.login-lock,
.login-field span {
  color: #f4c35c;
}

.login-lock {
  border-color: #f4c35c;
}

.login-field input,
.login-submit {
  border-color: #f4c35c;
  background: #fff7df;
  color: #102033;
}

.app-shell {
  grid-template-columns: clamp(258px, 20vw, 310px) minmax(0, 1fr);
}

.sidebar {
  background: linear-gradient(180deg, var(--navy) 0%, #0d1a2a 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: 18px 0 38px rgba(16, 24, 40, 0.08);
}

.brand-logo {
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
}

.brand h1 {
  color: #ffffff;
}

.brand p {
  color: #b8c4d3;
}

.nav-item,
.sidebar-guide,
.appointment-country-link,
.sync-box {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.07);
  color: #eef4fb;
  box-shadow: none;
}

.appointment-country-link small,
.sync-box p {
  color: #b8c4d3;
}

.nav-item:hover,
.appointment-country-link:hover,
.sidebar-guide:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.28);
}

.nav-item.active,
.sidebar-guide.active {
  background: #ffffff;
  border-color: #ffffff;
  color: var(--navy);
  box-shadow: inset 4px 0 0 #f4c35c, 0 14px 30px rgba(0, 0, 0, 0.18);
}

.primary-action {
  background: linear-gradient(135deg, #0f6b64, #11857c);
  box-shadow: 0 12px 24px rgba(15, 107, 100, 0.22);
}

.workspace {
  background: transparent;
}

.topbar {
  align-items: stretch;
}

.search-wrap,
.icon-button,
select,
input,
textarea {
  border-color: #cfd8e6;
  background: #ffffff;
}

.search-wrap {
  box-shadow: 0 10px 28px rgba(16, 24, 40, 0.07);
}

.icon-button {
  color: var(--navy);
  box-shadow: 0 8px 18px rgba(16, 24, 40, 0.06);
}

.list-header h2 {
  color: #111827;
  font-size: 26px;
}

.status-tab,
.case-card,
.ops-card,
.detail-card,
.meeting-contact-card,
.document-row,
.note-row,
.checklist-row,
.drop-zone,
.duplicate-panel,
.empty-state,
.customer-doc-preview,
.missing-message-panel {
  border-color: #d7deea;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(16, 24, 40, 0.06);
}

.ops-card {
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.ops-card strong {
  color: #111827;
}

.ops-card.urgent {
  border-color: #f3c986;
  background: #fff8eb;
}

.ops-card.today {
  border-color: #adc8ff;
  background: #edf4ff;
}

.ops-card.week {
  border-color: #9ed8ce;
  background: #eaf8f5;
}

.ops-card.danger {
  border-color: #f1b8af;
  background: #fff1ef;
}

.status-tabs {
  gap: 10px;
}

.status-tab {
  color: #1f2937;
}

.status-tab.active {
  background: #ffffff;
  color: var(--navy);
  border-color: var(--navy);
  box-shadow: inset 0 -4px 0 #f4c35c, 0 12px 26px rgba(16, 24, 40, 0.08);
}

.case-card {
  border-left-width: 6px;
  background: #ffffff;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.case-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(16, 24, 40, 0.10);
}

.case-card.active {
  border-color: #aebbd0;
  box-shadow: 0 0 0 4px rgba(21, 94, 239, 0.10), 0 20px 46px rgba(16, 24, 40, 0.14);
}

.case-title {
  color: #111827;
}

.appointment-stamp {
  color: #111827;
}

.case-next {
  border-color: #e2e8f0;
  background: #f8fafc;
}

.badge {
  border-radius: 6px;
  background: #eef2f6;
}

.detail-card {
  overflow: hidden;
}

.detail-head {
  background: linear-gradient(135deg, #102033 0%, #173b57 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}

.detail-head .meta {
  color: #c9d5e4;
}

.secondary-action,
.danger-action {
  border-color: #102033;
  background: #102033;
  color: #ffffff;
  box-shadow: 0 10px 20px rgba(16, 32, 51, 0.16);
}

.secondary-action:hover {
  background: #173b57;
  border-color: #173b57;
}

.secondary-action.whatsapp {
  border-color: #9bd7ad;
  background: #e8f8ed;
  color: #166534;
}

.danger-action {
  border-color: #f7c7c1;
  background: #fff5f3;
  color: #b42318;
}

.quick-summary,
.case-command {
  background: #d7deea;
}

.quick-summary div,
.case-command div,
.person-strip div {
  background: #ffffff;
}

.case-flag-strip,
.tabs {
  background: #f3f6fa;
}

.tab {
  border-color: #d7deea;
  background: #ffffff;
  color: #263445;
  box-shadow: none;
}

.tab:nth-child(n) {
  background: #ffffff;
  color: #263445;
  border-color: #d7deea;
}

.tab.active {
  background: var(--navy);
  border-color: var(--navy);
  color: #ffffff;
  transform: none;
  box-shadow: inset 0 -4px 0 #f4c35c, 0 10px 22px rgba(16, 24, 40, 0.12);
}

.field span {
  color: #435163;
}

.field input,
.field select,
.field textarea {
  border-color: #cfd8e6;
  background: #ffffff;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
select:focus,
input:focus,
textarea:focus {
  border-color: #155eef;
  box-shadow: 0 0 0 4px rgba(21, 94, 239, 0.10);
}

.payment-currency-banner,
.balance-warning {
  border-color: #f0c36d;
  background: #fff8e6;
  color: #7a4b00;
}

.document-tools {
  align-items: end;
}

.drop-zone {
  border-style: dashed;
  background: #f8fafc;
}

.drop-zone.dragging {
  border-color: #155eef;
  background: #edf4ff;
}

@media (max-width: 1040px) {
  .sidebar {
    background: linear-gradient(180deg, var(--navy) 0%, #122843 100%);
  }
}

@media (max-width: 680px) {
  body {
    background: #f4f7fb;
  }

  .topbar {
    background: rgba(247, 249, 252, 0.96);
    border-bottom: 1px solid #d7deea;
  }

  .sidebar {
    width: min(88vw, 352px);
    padding: 18px;
    background: linear-gradient(180deg, #102033 0%, #0d1a2a 100%);
    box-shadow: -20px 0 52px rgba(15, 23, 42, 0.28);
  }

  body.mobile-menu-open .status-tabs {
    top: 316px;
  }

  .case-card {
    min-height: 76px;
    padding: 12px 14px;
    border-radius: 8px;
    box-shadow: 0 8px 18px rgba(16, 24, 40, 0.06);
  }

  .case-card:hover {
    transform: none;
  }

  .mobile-case-brief strong {
    color: #111827;
  }

  body.detail-focus-mode .detail-head {
    background: linear-gradient(135deg, #102033, #173b57);
  }

  body.detail-focus-mode .tabs {
    background: #eef3f8;
  }

  body.detail-focus-mode .tab {
    min-height: 44px;
    font-size: 13px;
  }
}

@media (max-width: 430px) {
  .workspace {
    padding: 8px;
  }

  .search-wrap {
    min-height: 42px;
  }

  .list-header h2 {
    font-size: 20px;
  }

  .detail-head .header-actions {
    gap: 6px;
  }
}

/* Premium polish */
.sidebar #newCaseBtn,
.sidebar .sidebar-guide {
  width: 100%;
  min-height: 54px;
  border-radius: 8px;
  font-weight: 850;
  letter-spacing: 0;
}

.sidebar #newCaseBtn {
  border: 1px solid rgba(47, 214, 187, 0.50);
  background:
    linear-gradient(135deg, rgba(47, 214, 187, 0.18), rgba(255, 255, 255, 0)),
    linear-gradient(135deg, #078174, #0aa79a);
  color: #ffffff;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.sidebar .sidebar-guide {
  position: relative;
  justify-content: flex-start;
  padding: 0 16px 0 48px;
  border: 1px solid rgba(244, 195, 92, 0.72);
  background:
    linear-gradient(135deg, rgba(244, 195, 92, 0.24), rgba(255, 255, 255, 0.05)),
    linear-gradient(180deg, #ffffff, #e8eef6);
  color: #102033;
  text-shadow: none;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.90);
}

.sidebar .sidebar-guide::before {
  content: "";
  position: absolute;
  left: 16px;
  width: 12px;
  height: 28px;
  border-radius: 999px;
  background: linear-gradient(180deg, #f9d77a, #bf7a12);
  box-shadow: 0 0 0 4px rgba(244, 195, 92, 0.16);
}

.sidebar .sidebar-guide:hover {
  border-color: #f7d67b;
  background:
    linear-gradient(135deg, rgba(244, 195, 92, 0.34), rgba(255, 255, 255, 0.10)),
    linear-gradient(180deg, #ffffff, #f3f6fb);
  color: #0b1726;
  transform: translateY(-1px);
}

.sidebar .sidebar-guide.active {
  border-color: #ffffff;
  background:
    linear-gradient(135deg, #ffe8a3, #f4c35c);
  color: #102033;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.26), inset 0 -3px 0 rgba(16, 32, 51, 0.22);
}

.case-card.payment-unpaid {
  border-left-color: #b42318;
  background:
    linear-gradient(90deg, rgba(180, 35, 24, 0.22) 0 12px, #fff4f2 12px, #ffffff 46%);
}

.case-card.payment-partial {
  border-left-color: #c46a05;
  background:
    linear-gradient(90deg, rgba(196, 106, 5, 0.24) 0 12px, #fff7e8 12px, #ffffff 46%);
}

.case-card.payment-paid {
  border-left-color: #167044;
  background:
    linear-gradient(90deg, rgba(22, 112, 68, 0.22) 0 12px, #effaf4 12px, #ffffff 46%);
}

.case-card.payment-unpaid .case-next {
  border-color: #fac7c0;
  background: #fff4f2;
}

.case-card.payment-partial .case-next {
  border-color: #f5cf96;
  background: #fff7e8;
}

.case-card.payment-paid .case-next {
  border-color: #a8dcc2;
  background: #effaf4;
}

.case-card.payment-unpaid .appointment-stamp,
.case-card.payment-unpaid .case-title {
  color: #8f1f16;
}

.case-card.payment-partial .appointment-stamp,
.case-card.payment-partial .case-title {
  color: #8a4b05;
}

.case-card.payment-paid .appointment-stamp,
.case-card.payment-paid .case-title {
  color: #145c3a;
}

@media (max-width: 680px) {
  .sidebar .sidebar-guide {
    min-height: 50px;
  }

  .case-card.payment-unpaid,
  .case-card.payment-partial,
  .case-card.payment-paid {
    background-position: left top;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.button-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
}

.button-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-only {
  width: 48px;
  min-width: 48px;
  padding: 0;
}

.tool-icon-button {
  min-width: 54px;
}

.sidebar-icon-button {
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: center;
  justify-content: start;
  gap: 12px;
  padding: 0 16px;
}

.sidebar-icon-button .button-icon,
.sidebar-icon-button .button-icon svg {
  width: 18px;
  height: 18px;
}

.sidebar .sidebar-guide .sidebar-button-label,
.sidebar #newCaseBtn .sidebar-button-label {
  font-size: 12px;
  font-weight: 800;
  line-height: 1.16;
}

.sidebar .sidebar-guide .button-icon {
  color: #18263f;
}

.sidebar #newCaseBtn .button-icon {
  color: rgba(255, 255, 255, 0.96);
}

/* Premium login refresh */
body.login-page {
  background:
    linear-gradient(180deg, #efefef 0%, #e4e4e4 100%);
}

.login-screen {
  position: relative;
  padding: clamp(18px, 3vw, 42px);
  background:
    radial-gradient(circle at 12% 22%, rgba(255, 255, 255, 0.88), transparent 22%),
    linear-gradient(180deg, #f0efef 0%, #e3e3e3 100%);
}

.login-panel {
  position: relative;
  grid-template-columns: minmax(620px, 1.15fr) minmax(320px, 0.85fr);
  align-items: stretch;
  min-height: min(760px, calc(100vh - 64px));
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
}

.login-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle, rgba(160, 164, 255, 0.18) 0 5px, transparent 6px) 0 0 / 32px 32px,
    radial-gradient(circle, rgba(160, 164, 255, 0.14) 0 5px, transparent 6px) 16px 16px / 32px 32px;
  clip-path: polygon(0% 14%, 34% 4%, 49% 12%, 71% 5%, 100% 16%, 100% 88%, 72% 83%, 57% 90%, 38% 80%, 16% 88%, 0% 78%);
  opacity: 0.52;
  pointer-events: none;
}

.login-copy,
.login-art {
  position: relative;
  z-index: 1;
}

.login-copy {
  display: grid;
  align-content: center;
  gap: 40px;
  padding: clamp(34px, 5vw, 76px) clamp(26px, 5vw, 78px);
}

.login-heading {
  display: grid;
  gap: 18px;
  align-content: start;
}

.login-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid rgba(16, 32, 51, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  color: #4f5b66;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.login-heading h1 {
  margin: 0;
  color: #121212;
  font-family: "Arial Narrow", "Roboto Condensed", "Helvetica Neue", Inter, sans-serif;
  font-size: clamp(58px, 8vw, 88px);
  font-weight: 800;
  line-height: 0.92;
}

.login-heading p {
  margin: 0;
  max-width: 560px;
  color: #4b5563;
  font-size: clamp(18px, 1.8vw, 22px);
  line-height: 1.5;
}

.login-card {
  display: grid;
  gap: 22px;
  width: min(820px, 100%);
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.login-field {
  gap: 0;
}

.login-field-inline {
  display: grid;
  grid-template-columns: minmax(170px, 220px) minmax(0, 1fr);
  align-items: center;
  column-gap: 24px;
}

.login-field span {
  color: #f28721;
  font-family: "Arial Narrow", "Roboto Condensed", "Helvetica Neue", Inter, sans-serif;
  font-size: clamp(28px, 3vw, 44px);
  font-weight: 700;
  line-height: 1;
}

.login-input-combo {
  display: flex;
  align-items: center;
  min-height: 62px;
}

.login-input-combo input {
  min-height: 62px;
  border: 0;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.96);
  color: #111827;
  padding: 0 18px;
  font-size: 22px;
  font-weight: 700;
  box-shadow: 0 14px 32px rgba(16, 24, 40, 0.08);
}

.login-page .login-input-combo input:focus,
.login-page .login-input-combo input:focus-visible {
  outline: none;
  border-color: transparent;
  box-shadow: 0 16px 34px rgba(16, 24, 40, 0.10), 0 0 0 2px rgba(242, 135, 33, 0.22);
}

.login-input-combo strong {
  flex: 0 0 auto;
  margin-left: 10px;
  color: #f28721;
  font-family: "Arial Narrow", "Roboto Condensed", "Helvetica Neue", Inter, sans-serif;
  font-size: clamp(26px, 2.7vw, 42px);
  font-weight: 700;
  line-height: 1;
}

.login-input-combo-user input {
  max-width: 520px;
}

.login-submit {
  width: fit-content;
  min-width: 220px;
  min-height: 58px;
  margin: 10px 0 0 0;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #11233b 0%, #27466d 100%);
  color: #ffffff;
  box-shadow: 0 20px 44px rgba(17, 35, 59, 0.22);
}

.login-error {
  width: fit-content;
  padding: 12px 16px;
  border: 1px solid rgba(194, 65, 45, 0.16);
  background: rgba(255, 255, 255, 0.82);
  color: #b42318;
  box-shadow: 0 12px 24px rgba(180, 35, 24, 0.08);
}

.login-art {
  display: grid;
  place-items: end center;
  min-height: 100%;
  background: transparent;
}

.login-art img {
  width: min(44vw, 620px);
  height: auto;
  max-height: 88vh;
  object-fit: contain;
  object-position: right bottom;
  filter: drop-shadow(0 28px 40px rgba(16, 24, 40, 0.12));
}

@media (max-width: 1080px) {
  .login-panel {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .login-panel::before {
    clip-path: inset(10% 0 24% 0 round 0);
  }

  .login-copy {
    padding-bottom: 0;
  }

  .login-art {
    min-height: 280px;
    place-items: center;
  }

  .login-art img {
    width: min(68vw, 460px);
    max-height: 340px;
  }
}

@media (max-width: 820px) {
  .login-screen {
    padding: 16px;
  }

  .login-copy {
    gap: 28px;
    padding: 22px 6px 0;
  }

  .login-heading h1 {
    font-size: clamp(44px, 14vw, 62px);
  }

  .login-heading p {
    font-size: 16px;
  }

  .login-field-inline {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .login-field span,
  .login-input-combo strong {
    font-size: clamp(22px, 7vw, 34px);
  }

  .login-input-combo {
    flex-wrap: wrap;
    gap: 10px;
  }

  .login-input-combo input,
  .login-input-combo-user input {
    width: 100%;
    max-width: none;
  }

  .login-submit {
    width: 100%;
  }
}

.operations-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 14px;
  margin: 0 0 14px;
  padding: 16px 18px;
  border: 1px solid rgba(17, 35, 59, 0.08);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(244, 248, 246, 0.94));
  box-shadow: var(--soft-shadow);
}

.operations-panel__copy,
.operations-panel__metrics {
  min-width: 0;
}

.operations-panel__eyebrow {
  display: inline-block;
  margin-bottom: 8px;
  color: #6b7280;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.operations-panel__copy strong {
  display: block;
  margin-bottom: 6px;
  color: #11233b;
  font-size: 24px;
  line-height: 1.1;
}

.operations-panel__copy p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

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

.operations-panel__metrics div {
  padding: 12px 14px;
  border: 1px solid rgba(17, 35, 59, 0.08);
  border-radius: 8px;
  background: #fff;
}

.operations-panel__metrics span {
  display: block;
  margin-bottom: 5px;
  color: #6b7280;
  font-size: 12px;
  font-weight: 700;
}

.operations-panel__metrics strong {
  color: #11233b;
  font-size: 22px;
  line-height: 1;
}

.status-tab[data-status="Ödeme Takip"] {
  border-color: #f0c29a;
  background: #fff1e8;
}

.status-tab[data-status="Evrak Eksikleri"] {
  border-color: #f4b9b0;
  background: #fff0ed;
}

.status-tab[data-status="Sonuç Bekleyenler"] {
  border-color: #d4c1ef;
  background: #f6f1ff;
}

.status-tab[data-status="Pasaport Teslim"] {
  border-color: #b7d7c2;
  background: #ebfaf0;
}

.status-tab[data-status="Ödeme Takip"].active {
  border-color: #c26f2a;
  background: #fff1e8;
  color: #9a4d14;
  box-shadow: inset 0 -3px 0 #c26f2a;
}

.status-tab[data-status="Evrak Eksikleri"].active {
  border-color: #c2412d;
  background: #fff0ed;
  color: #b42318;
  box-shadow: inset 0 -3px 0 #c2412d;
}

.status-tab[data-status="Sonuç Bekleyenler"].active {
  border-color: #6d3fb2;
  background: #f6f1ff;
  color: #6d3fb2;
  box-shadow: inset 0 -3px 0 #6d3fb2;
}

.status-tab[data-status="Pasaport Teslim"].active {
  border-color: #15803d;
  background: #ebfaf0;
  color: #166534;
  box-shadow: inset 0 -3px 0 #15803d;
}

.case-card[data-status-group="Ödeme Takip"] {
  border-left-color: #c26f2a;
  background: linear-gradient(90deg, rgba(194, 111, 42, 0.10), #fff 18%);
}

.case-card[data-status-group="Evrak Eksikleri"] {
  border-left-color: #c2412d;
  background: linear-gradient(90deg, rgba(194, 65, 45, 0.10), #fff 18%);
}

.case-card[data-status-group="Sonuç Bekleyenler"] {
  border-left-color: #6d3fb2;
  background: linear-gradient(90deg, rgba(109, 63, 178, 0.09), #fff 18%);
}

.case-card[data-status-group="Pasaport Teslim"] {
  border-left-color: #15803d;
  background: linear-gradient(90deg, rgba(21, 128, 61, 0.09), #fff 18%);
}

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

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

@media (max-width: 640px) {
  .operations-panel {
    padding: 14px;
  }

  .operations-panel__copy strong {
    font-size: 20px;
  }

  .operations-panel__metrics strong {
    font-size: 18px;
  }
}

.wizard-card {
  border-color: rgba(17, 35, 59, 0.12);
}

.wizard-head {
  align-items: flex-start;
}

.wizard-stepper {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 18px;
}

.wizard-step {
  display: grid;
  gap: 8px;
  justify-items: start;
  padding: 14px 12px;
  border: 1px solid rgba(17, 35, 59, 0.1);
  border-radius: 8px;
  background: #fff;
  text-align: left;
}

.wizard-step span {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #eef2f6;
  color: #475467;
  font-size: 12px;
  font-weight: 800;
}

.wizard-step strong {
  color: #11233b;
  font-size: 13px;
  line-height: 1.2;
}

.wizard-step.active {
  border-color: rgba(15, 118, 110, 0.24);
  background: linear-gradient(180deg, rgba(216, 245, 238, 0.78), rgba(255, 255, 255, 0.96));
  box-shadow: 0 10px 24px rgba(15, 118, 110, 0.10);
}

.wizard-step.active span {
  background: #0f766e;
  color: #fff;
}

.wizard-step.done {
  border-color: rgba(21, 128, 61, 0.18);
  background: #f3fbf6;
}

.wizard-step.done span {
  background: #15803d;
  color: #fff;
}

.wizard-stage {
  border: 1px solid rgba(17, 35, 59, 0.08);
  border-radius: 8px;
  background: #fbfdfc;
  overflow: hidden;
}

.wizard-stage__intro {
  padding: 18px 18px 14px;
  border-bottom: 1px solid rgba(17, 35, 59, 0.08);
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.92), rgba(255, 255, 255, 0.96));
}

.wizard-stage__eyebrow {
  display: inline-block;
  margin-bottom: 8px;
  color: #6b7280;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.wizard-stage__intro h3 {
  margin: 0 0 6px;
  color: #11233b;
  font-size: 22px;
  line-height: 1.1;
}

.wizard-stage__intro p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.wizard-stage__body {
  padding: 18px;
}

.wizard-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(17, 35, 59, 0.08);
}

.wizard-actions__hint {
  color: #475467;
  font-size: 14px;
}

.wizard-actions__hint strong {
  color: #11233b;
}

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

.wizard-review-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.wizard-review-card {
  padding: 16px;
  border: 1px solid rgba(17, 35, 59, 0.08);
  border-radius: 8px;
  background: #fff;
}

.wizard-review-card span {
  display: block;
  margin-bottom: 6px;
  color: #6b7280;
  font-size: 12px;
  font-weight: 700;
}

.wizard-review-card strong {
  color: #11233b;
  font-size: 20px;
  line-height: 1.1;
}

@media (max-width: 1080px) {
  .wizard-stepper {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

@media (max-width: 680px) {
  .wizard-stepper {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .wizard-actions__buttons {
    justify-content: stretch;
    flex-direction: column;
  }

  .wizard-actions__buttons > * {
    width: 100%;
  }

  .wizard-review-grid {
    grid-template-columns: 1fr;
  }
}

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

.person-profile-section + .person-profile-section {
  margin-top: 18px;
}

.person-profile-section h3 {
  margin: 0 0 10px;
  color: #11233b;
  font-size: 18px;
}

.document-source {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

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

.person-application-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(17, 35, 59, 0.08);
  border-radius: 8px;
  background: #fff;
  text-align: left;
}

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

.person-application-row strong {
  color: #11233b;
  font-size: 14px;
}

.person-application-row span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 820px) {
  .person-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 560px) {
  .person-summary-grid {
    grid-template-columns: 1fr;
  }
}

.task-panel {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid rgba(17, 35, 59, 0.08);
  border-radius: 8px;
  background: #fbfdfc;
}

.task-panel__head h3,
.task-panel__head p {
  margin: 0;
}

.task-panel__head h3 {
  color: #11233b;
  font-size: 18px;
}

.task-panel__head p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.history-panel .note-row {
  align-items: center;
}

.history-row p {
  margin: 0;
}

.task-compose {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) 180px 160px 140px;
  gap: 10px;
  margin: 16px 0 14px;
}

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

.task-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(17, 35, 59, 0.08);
  border-radius: 8px;
  background: #fff;
}

.task-row.done {
  opacity: 0.72;
}

.task-row.done .checkline span {
  text-decoration: line-through;
}

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

.task-row__meta small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.compact-danger {
  min-height: 36px;
  padding: 0 12px;
}

@media (max-width: 980px) {
  .task-compose {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .task-compose {
    grid-template-columns: 1fr;
  }

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

  .task-row__meta {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }
}

/* Mobile refinement layer */
@media (max-width: 680px) {
  .workspace {
    padding: 12px;
  }

  .topbar {
    margin: -12px -12px 12px;
    padding: 12px;
    gap: 10px;
    background: rgba(246, 248, 251, 0.96);
    border-bottom: 1px solid rgba(219, 227, 238, 0.92);
    backdrop-filter: blur(10px);
  }

  .search-wrap {
    min-height: 46px;
    border-radius: 14px;
  }

  .search-wrap input {
    font-size: 15px;
  }

  .icon-button,
  .mobile-menu-button {
    width: 42px;
    height: 42px;
    border-radius: 12px;
  }

  .sidebar {
    width: min(84vw, 336px);
    gap: 14px;
    padding: 14px;
    box-shadow: -22px 0 46px rgba(15, 23, 42, 0.22);
  }

  .brand {
    align-items: center;
    gap: 12px;
    padding-bottom: 2px;
  }

  .brand-logo {
    width: 44px;
    height: 44px;
    border-radius: 12px;
  }

  .brand h1 {
    font-size: 17px;
  }

  .brand p {
    font-size: 11px;
  }

  .icon-nav-group,
  .nav-group {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .icon-nav-item,
  .sidebar #newCaseBtn,
  .sidebar .sidebar-guide {
    width: 100%;
  }

  .icon-nav-item {
    min-height: 64px;
    padding: 12px 14px;
    gap: 12px;
    border-radius: 14px;
  }

  .icon-nav-label {
    font-size: 11px;
    line-height: 1.14;
  }

  .icon-nav-item strong {
    min-width: 34px;
    height: 34px;
    font-size: 12px;
  }

  .list-header {
    margin-bottom: 10px;
  }

  .list-header h2 {
    font-size: 22px;
  }

  .case-items {
    gap: 10px;
  }

  .case-card {
    min-height: 92px;
    padding: 14px 14px 14px 16px;
    border-radius: 16px;
    border-left-width: 5px;
  }

  .case-title {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .case-title > span:first-child {
    font-size: 14px;
    font-weight: 800;
    line-height: 1.16;
    white-space: normal;
  }

  .mobile-case-brief {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 12px;
    margin-top: 8px;
  }

  .mobile-brief-place {
    gap: 4px;
  }

  .mobile-brief-place strong {
    font-size: 16px;
    font-weight: 900;
  }

  .mobile-brief-place small {
    color: #435163;
    font-size: 13px;
    font-weight: 800;
  }

  .mobile-case-brief strong {
    font-size: 24px;
    line-height: 0.95;
    text-align: right;
  }

  .case-card.active > .case-subtitle {
    display: grid;
    gap: 4px;
    margin-top: 10px;
    font-size: 12px;
    line-height: 1.35;
  }

  .case-card.active > .case-next {
    gap: 8px;
    margin-top: 10px;
    padding: 10px;
  }

  .case-card.active > .badge-row {
    gap: 6px;
    margin-top: 10px;
  }

  .detail-card {
    border-radius: 18px;
  }

  .detail-head {
    padding: 14px;
    gap: 12px;
  }

  .detail-head h2 {
    font-size: 20px;
    line-height: 1.08;
  }

  .detail-head .meta {
    font-size: 12px;
    line-height: 1.45;
  }

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

  .header-actions .secondary-action,
  .header-actions .danger-action {
    min-height: 42px;
    padding: 0 10px;
    font-size: 12px;
  }

  .detail-overview,
  .quick-summary,
  .person-strip,
  .case-command,
  .identity-workspace,
  .document-workspace,
  .process-layout,
  .form-grid,
  .money-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .detail-overview,
  .tab-panel {
    padding: 12px;
  }

  .overview-card,
  .identity-surface,
  .document-surface,
  .task-panel {
    padding: 14px;
    border-radius: 14px;
  }

  .tabs {
    position: sticky;
    top: 66px;
    z-index: 8;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 10px 12px;
    background: rgba(244, 247, 251, 0.96);
    backdrop-filter: blur(10px);
  }

  .tab {
    min-width: 0;
    min-height: 44px;
    padding: 0 10px;
    gap: 6px;
    border-radius: 12px;
  }

  .tab .button-icon,
  .tab .button-icon svg {
    width: 16px;
    height: 16px;
  }

  .tab-label {
    font-size: 11px;
  }

  body.detail-focus-mode .detail-head {
    padding: 14px;
  }

  body.detail-focus-mode .tabs {
    top: 0;
    margin-top: 0;
  }

  body.detail-focus-mode .tab {
    width: 100%;
    justify-content: center;
  }

  .document-row,
  .note-row,
  .checklist-row,
  .task-row {
    gap: 10px;
    padding: 12px;
    border-radius: 14px;
  }

  .template-actions {
    gap: 8px;
  }

  .template-actions > button,
  .template-actions > label {
    min-height: 42px;
  }

  .drop-zone {
    min-height: 128px;
    padding: 16px;
    border-radius: 14px;
  }

  .sync-box {
    border-radius: 14px;
  }
}
