/**
 * SCOP — Sağ panel dosya detayı (Genel Bakış)
 */

.case-detail {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  background: var(--color-surface);
}

/* ── Header ───────────────────────────────────────────────── */

.case-detail-header {
  flex-shrink: 0;
  padding: 1rem 1rem 0.75rem;
  border-bottom: 1px solid var(--color-border-light);
}

.case-detail-header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.875rem;
}

.case-detail-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.case-detail-ref {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: var(--font-weight-semibold);
  letter-spacing: -0.01em;
  color: var(--color-text-primary);
}

.case-detail-risk {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  flex-shrink: 0;
}

.case-detail-risk-label {
  font-size: 10px;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.case-detail-risk-bar-wrap {
  width: 48px;
  height: 6px;
  border-radius: 3px;
  background: #e5e7eb;
  overflow: hidden;
}

.case-detail-risk-bar {
  height: 100%;
  border-radius: 3px;
}

.case-detail-risk-bar--low {
  background: #22c55e;
}

.case-detail-risk-bar--medium {
  background: #f59e0b;
}

.case-detail-risk-bar--high {
  background: #ef4444;
}

.case-detail-risk-value {
  font-size: 11px;
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-secondary);
  white-space: nowrap;
}

.case-detail-risk-icon {
  display: inline-flex;
  width: 14px;
  height: 14px;
}

.case-detail-risk-icon--low {
  color: #22c55e;
}

.case-detail-risk-icon--medium {
  color: #f59e0b;
}

.case-detail-risk-icon--high {
  color: #ef4444;
}

.case-detail-risk-icon svg {
  width: 100%;
  height: 100%;
}

.case-detail-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 1rem;
  margin: 0;
}

.case-detail-meta-item {
  margin: 0;
  min-width: 0;
}

.case-detail-meta-item dt {
  margin: 0 0 1px;
  font-size: 10px;
  font-weight: var(--font-weight-medium);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.case-detail-meta-item dd {
  margin: 0;
  font-size: 12px;
  color: var(--color-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.case-detail-owner {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.case-detail-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--color-brand-primary);
  color: #fff;
  font-size: 9px;
  font-weight: var(--font-weight-semibold);
  flex-shrink: 0;
}

/* ── Tabs ─────────────────────────────────────────────────── */

.case-detail-tabs {
  display: flex;
  flex-wrap: wrap;
  flex-shrink: 0;
  gap: 0;
  padding: 0 0.75rem;
  border-bottom: 1px solid var(--color-border-light);
  background: var(--color-surface);
}

.case-detail-tab {
  padding: 0.625rem 0.5rem;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  font-family: inherit;
  font-size: 11px;
  font-weight: var(--font-weight-medium);
  color: var(--color-text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: color 160ms ease, border-color 160ms ease;
}

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

.case-detail-tab.is-active {
  color: var(--color-brand-primary);
  border-bottom-color: var(--color-brand-primary);
  font-weight: var(--font-weight-semibold);
}

/* ── Body scroll ──────────────────────────────────────────── */

.case-detail-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

/* ── Cards ────────────────────────────────────────────────── */

.case-detail-card {
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  padding: 0.75rem;
}

.case-detail-card-title {
  margin: 0 0 0.625rem;
  font-size: 12px;
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
}

.case-detail-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.625rem;
}

.case-detail-card-head .case-detail-card-title {
  margin: 0;
}

.case-detail-link {
  border: none;
  background: none;
  padding: 0;
  font-family: inherit;
  font-size: 11px;
  color: var(--color-brand-primary);
  cursor: pointer;
}

.case-detail-muted {
  margin: 0;
  font-size: 12px;
  color: var(--color-text-muted);
  line-height: 1.45;
}

.case-detail-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.625rem;
}

.case-detail-card--half {
  margin: 0;
}

/* ── File status & gauge ───────────────────────────────────── */

.case-file-status {
  display: flex;
  gap: 0.875rem;
  align-items: flex-start;
}

.case-completion-gauge {
  position: relative;
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: conic-gradient(
    var(--color-brand-primary) calc(var(--completion) * 1%),
    #e5e7eb calc(var(--completion) * 1%)
  );
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.case-completion-gauge::before {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: var(--color-surface);
}

.case-completion-value,
.case-completion-label {
  position: relative;
  z-index: 1;
  text-align: center;
}

.case-completion-value {
  font-size: 14px;
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  line-height: 1.1;
}

.case-completion-label {
  font-size: 8px;
  color: var(--color-text-muted);
  line-height: 1.2;
  max-width: 52px;
}

.case-file-status-main {
  flex: 1;
  min-width: 0;
}

.case-file-status-stats {
  margin: 0 0 0.5rem;
  font-size: 11px;
  color: var(--color-text-secondary);
}

.case-file-status-stats strong {
  color: var(--color-text-primary);
  font-weight: var(--font-weight-medium);
}

/* ── Workflow stepper ─────────────────────────────────────── */

.case-workflow {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0;
  margin-bottom: 0.5rem;
}

.case-workflow-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  flex: 1;
  min-width: 0;
}

.case-workflow-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #d1d5db;
  background: #fff;
  margin-bottom: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.case-workflow-icon--done {
  border-color: #16a34a;
  background: #16a34a;
  color: #fff;
}

.case-workflow-icon--done svg {
  width: 10px;
  height: 10px;
}

.case-workflow-icon--active {
  border-color: #7c3aed;
  background: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

.case-workflow-step--active .case-workflow-label {
  color: #7c3aed;
  font-weight: var(--font-weight-semibold);
}

.case-workflow-step--done .case-workflow-label {
  color: #16a34a;
}

.case-workflow-label {
  font-size: 8px;
  color: var(--color-text-muted);
  text-align: center;
  line-height: 1.2;
  max-width: 100%;
}

.case-workflow-connector {
  position: absolute;
  top: 9px;
  left: calc(50% + 12px);
  width: calc(100% - 24px);
  height: 2px;
  background: #e5e7eb;
}

.case-workflow-connector--done {
  background: #16a34a;
}

.case-next-action {
  margin: 0 0 0.25rem;
  font-size: 11px;
  color: var(--color-text-primary);
}

.case-next-action-hint {
  margin: 0;
  font-size: 10px;
  color: var(--color-text-muted);
}

/* ── Module grid ──────────────────────────────────────────── */

.case-module-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.case-module-card {
  border: 1px solid var(--color-border-light);
  border-radius: 6px;
  padding: 0.5rem;
  background: var(--color-surface-muted);
}

.case-module-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.25rem;
  margin-bottom: 0.375rem;
}

.case-module-title {
  margin: 0;
  font-size: 11px;
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
}

.case-module-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: var(--font-weight-semibold);
  white-space: nowrap;
}

.case-module-badge--waiting {
  color: #b45309;
  background: #fef3c7;
}

.case-module-badge--processing {
  color: #2563eb;
  background: #eff6ff;
}

.case-module-badge--gtip {
  color: #7c3aed;
  background: #f3e8ff;
}

.case-module-badge--completed {
  color: #15803d;
  background: #dcfce7;
}

.case-module-badge--draft {
  color: #6b7280;
  background: #f3f4f6;
}

.case-module-lock {
  display: inline-flex;
  width: 10px;
  height: 10px;
}

.case-module-lock svg {
  width: 100%;
  height: 100%;
}

.case-module-progress {
  height: 4px;
  border-radius: 2px;
  background: #e5e7eb;
  margin-bottom: 0.375rem;
  overflow: hidden;
}

.case-module-progress-fill {
  height: 100%;
  border-radius: 2px;
  background: var(--color-brand-primary);
}

.case-module-detail {
  margin: 0;
  font-size: 10px;
  color: var(--color-text-muted);
  line-height: 1.35;
}

/* ── Blockers ─────────────────────────────────────────────── */

.case-blocker-count {
  font-size: 10px;
  font-weight: var(--font-weight-semibold);
  color: #ef4444;
}

.case-blocker-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.case-blocker {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.5rem;
  border-radius: 6px;
  background: var(--color-surface-muted);
  border-left: 3px solid transparent;
}

.case-blocker--high {
  border-left-color: #ef4444;
}

.case-blocker--medium {
  border-left-color: #f59e0b;
}

.case-blocker--done {
  opacity: 0.55;
  border-left-color: #d1d5db;
}

.case-blocker--done .case-blocker-label {
  text-decoration: line-through;
}

.case-blocker-priority {
  flex-shrink: 0;
  font-size: 9px;
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.02em;
}

.case-blocker--high .case-blocker-priority {
  color: #ef4444;
}

.case-blocker--medium .case-blocker-priority {
  color: #f59e0b;
}

.case-blocker-label {
  flex: 1;
  min-width: 0;
  font-size: 11px;
  color: var(--color-text-primary);
}

.case-blocker-check {
  display: inline-flex;
  width: 14px;
  height: 14px;
  color: #16a34a;
  flex-shrink: 0;
}

.case-blocker-check svg {
  width: 100%;
  height: 100%;
}

.case-blocker-action {
  flex-shrink: 0;
  padding: 2px 8px;
  border: 1px solid var(--color-border-light);
  border-radius: 4px;
  background: var(--color-surface);
  font-family: inherit;
  font-size: 10px;
  color: var(--color-brand-primary);
  cursor: pointer;
}

.case-blocker-action:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* ── Insights & activities ────────────────────────────────── */

.case-insights {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.case-insight {
  padding: 0.5rem 0.625rem;
  border-radius: 6px;
  font-size: 11px;
  line-height: 1.4;
}

.case-insight--red {
  color: #b91c1c;
  background: #fef2f2;
  border: 1px solid #fecaca;
}

.case-insight--orange {
  color: #b45309;
  background: #fffbeb;
  border: 1px solid #fde68a;
}

.case-insight--blue {
  color: #1d4ed8;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
}

.case-insight--green {
  color: #15803d;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
}

.case-activities {
  list-style: none;
  margin: 0;
  padding: 0 0 0 0.5rem;
  border-left: 2px solid #e5e7eb;
}

.case-activity {
  position: relative;
  padding: 0 0 0.625rem 0.75rem;
  font-size: 11px;
}

.case-activity::before {
  content: "";
  position: absolute;
  left: -0.5625rem;
  top: 0.25rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d1d5db;
}

.case-activity--purple::before {
  background: #7c3aed;
}

.case-activity--green::before {
  background: #16a34a;
}

.case-activity--blue::before {
  background: #2563eb;
}

.case-activity-time {
  display: block;
  font-size: 10px;
  color: var(--color-text-muted);
  margin-bottom: 1px;
}

.case-activity-text {
  color: var(--color-text-primary);
}

/* ── Extracted & financial ────────────────────────────────── */

.case-extracted-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem 0.75rem;
  margin: 0;
}

.case-extracted-grid div {
  min-width: 0;
}

.case-extracted-grid dt {
  margin: 0 0 1px;
  font-size: 10px;
  color: var(--color-text-muted);
}

.case-extracted-grid dd {
  margin: 0;
  font-size: 11px;
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
}

.case-financial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.case-financial-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.case-financial-label {
  font-size: 10px;
  color: var(--color-text-muted);
}

.case-financial-value {
  font-size: 12px;
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
}

.case-financial-hint {
  font-size: 9px;
  color: var(--color-text-muted);
  line-height: 1.3;
}

/* ── Placeholder tab ──────────────────────────────────────── */

.case-detail-placeholder {
  padding: 1.5rem 1rem;
  text-align: center;
}

.case-detail-placeholder h3 {
  margin: 0 0 0.5rem;
  font-size: 14px;
  font-weight: var(--font-weight-semibold);
}

.case-detail-placeholder p {
  margin: 0 0 0.5rem;
  font-size: 12px;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

/* ── Belgeler sekmesi ─────────────────────────────────────── */
.case-documents {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 0.75rem;
}

.case-docs-timing {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.625rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
}

.case-docs-timing--live {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.case-docs-timing-main {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

.case-docs-timing-label {
  font-size: 11px;
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-secondary);
}

.case-docs-timing-value {
  font-size: 13px;
  font-weight: var(--font-weight-semibold);
  font-variant-numeric: tabular-nums;
  color: var(--color-text-primary);
}

.case-docs-timing--live .case-docs-timing-value {
  color: #1d4ed8;
}

.case-docs-timing-hint {
  margin: 0;
  font-size: 10px;
  color: var(--color-text-tertiary);
  line-height: 1.4;
}

.case-doc-slot-timing {
  margin: 0;
  font-size: 10px;
  font-weight: var(--font-weight-medium);
  font-variant-numeric: tabular-nums;
  color: var(--color-text-secondary);
}

.case-doc-slot-timing--live {
  color: #1d4ed8;
}

.case-docs-section-title {
  margin: 0 0 0.625rem;
  font-size: 11px;
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-secondary);
  letter-spacing: 0.01em;
}

.case-doc-slots-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
}

.case-doc-slots-layout {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.case-doc-slots-section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.5rem;
  font-size: 12px;
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-secondary);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.case-doc-slots-section-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.case-doc-slots-section-title--mandatory {
  color: #b91c1c;
}

.case-doc-slots-section-title--mandatory .case-doc-slots-section-dot {
  background: #dc2626;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.2);
}

.case-doc-slots-section-title--conditional {
  color: #1e40af;
}

.case-doc-slots-section-title--conditional .case-doc-slots-section-dot {
  background: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.case-doc-slots-grid--optional .case-doc-slot--add {
  min-height: 108px;
}

/* Zorunlu belge kutuları — kırmızı ton */
.case-doc-slot--tier-mandatory.case-doc-slot--empty,
.case-doc-slot--tier-mandatory.case-doc-slot--missing {
  border: 1.5px dashed #fca5a5;
  border-left: 3px solid #dc2626;
  background: #fef2f2;
}

.case-doc-slot--tier-mandatory.case-doc-slot--processing {
  border-left: 3px solid #dc2626;
}

.case-doc-slot--tier-mandatory.case-doc-slot--uploading {
  border-left: 3px solid #dc2626;
}

.case-doc-slot--tier-mandatory.case-doc-slot--completed {
  border-left: 3px solid #dc2626;
}

.case-doc-slot--tier-mandatory.case-doc-slot--failed {
  border-left: 3px solid #dc2626;
}

/* Koşullu belge kutuları — mavi ton */
.case-doc-slot--tier-conditional.case-doc-slot--empty,
.case-doc-slot--tier-conditional.case-doc-slot--missing {
  border: 1.5px dashed #93c5fd;
  border-left: 3px solid #2563eb;
  background: #eff6ff;
}

.case-doc-slot--tier-conditional.case-doc-slot--processing,
.case-doc-slot--tier-conditional.case-doc-slot--uploading,
.case-doc-slot--tier-conditional.case-doc-slot--completed,
.case-doc-slot--tier-conditional.case-doc-slot--failed {
  border-left: 3px solid #2563eb;
}

/* Özel ek belge kutuları — amber turuncu ton */
.case-doc-slot--tier-custom.case-doc-slot--empty,
.case-doc-slot--tier-custom.case-doc-slot--missing {
  border: 1.5px dashed #fcd34d;
  border-left: 3px solid #f59e0b;
  background: #fffbeb;
}

.case-doc-slot--tier-custom.case-doc-slot--processing,
.case-doc-slot--tier-custom.case-doc-slot--uploading,
.case-doc-slot--tier-custom.case-doc-slot--completed,
.case-doc-slot--tier-custom.case-doc-slot--failed {
  border-left: 3px solid #f59e0b;
}

.case-doc-slot--add.case-doc-slot--tier-conditional:not(:disabled) {
  border: 1.5px dashed #93c5fd;
  border-left: 3px solid #2563eb;
  background: #eff6ff;
  color: #1d4ed8;
}

.case-doc-slot--add.case-doc-slot--tier-conditional:not(:disabled):hover {
  background: #dbeafe;
  border-color: #60a5fa;
}

.case-doc-slot {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  min-height: 108px;
  padding: 0.5rem;
  border-radius: 8px;
  background: var(--color-surface);
}

.case-doc-slot--completed {
  border: 1px solid #bbf7d0;
  background: #f0fdf4;
}

.case-doc-slot--empty,
.case-doc-slot--missing {
  border: 1.5px dashed #d1d5db;
  background: #fafafa;
}

.case-doc-slot--processing {
  border: 1px solid #bfdbfe;
  background: #eff6ff;
}

.case-doc-slot--uploading {
  border: 1px solid #fde68a;
  background: #fffbeb;
}

.case-doc-slot-uploading-name {
  margin: 0;
  font-size: 10px;
  color: var(--color-text-secondary);
  line-height: 1.35;
  word-break: break-all;
}

.case-doc-slot-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid #fde68a;
  border-top-color: #d97706;
  border-radius: 50%;
  flex-shrink: 0;
  animation: case-doc-slot-spin 0.75s linear infinite;
}

.case-doc-slot-spinner--processing {
  border-color: #bfdbfe;
  border-top-color: #2563eb;
}

@keyframes case-doc-slot-spin {
  to {
    transform: rotate(360deg);
  }
}

.case-doc-slot--failed {
  border: 1px solid #fecaca;
  background: #fef2f2;
}

.case-doc-slot-error {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  color: #dc2626;
  line-height: 1.35;
}

.case-doc-slot--add:not(:disabled) {
  cursor: pointer;
}

.case-doc-slot-upload:not(:disabled) {
  cursor: pointer;
}

.case-doc-slot--add {
  align-items: center;
  justify-content: center;
  border: 1.5px dashed #d1d5db;
  background: transparent;
  cursor: not-allowed;
  color: var(--color-text-muted);
}

.case-doc-slot-top {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.case-doc-slot-check {
  display: inline-flex;
  width: 14px;
  height: 14px;
  color: #16a34a;
}

.case-doc-slot-check svg {
  width: 100%;
  height: 100%;
}

.case-doc-slot-status-text {
  font-size: 9px;
  font-weight: var(--font-weight-medium);
  color: #16a34a;
}

.case-doc-slot-label {
  margin: 0;
  font-size: 10px;
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  line-height: 1.3;
}

.case-doc-slot-label-text {
  font-weight: var(--font-weight-semibold);
}

.case-doc-slot-code {
  margin-left: 0.2rem;
  font-size: 9px;
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  text-transform: uppercase;
}

.case-doc-slot-file {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  min-width: 0;
}

.case-doc-slot-pdf {
  display: inline-flex;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: #dc2626;
}

.case-doc-slot-pdf svg {
  width: 100%;
  height: 100%;
}

.case-doc-slot-filename {
  font-size: 9px;
  color: var(--color-text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.case-doc-slot-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: auto;
}

.case-doc-slot-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid var(--color-border-light);
  border-radius: 4px;
  background: var(--color-surface);
  color: var(--color-text-muted);
  cursor: pointer;
}

.case-doc-slot-btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.case-doc-slot-btn:not(:disabled):hover {
  color: var(--color-text-primary);
  border-color: var(--color-border);
  background: var(--color-surface-muted);
}

.case-doc-slot-btn svg {
  width: 12px;
  height: 12px;
}

.case-doc-slot-badge {
  position: absolute;
  top: 0.375rem;
  right: 0.375rem;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 8px;
  font-weight: var(--font-weight-semibold);
  line-height: 1.4;
}

.case-doc-slot-badge--missing {
  color: #b91c1c;
  background: #fef2f2;
  border: 1px solid #fecaca;
}

.case-doc-slot-badge--mandatory {
  color: #b91c1c;
  background: #fee2e2;
  border: 1px solid #fca5a5;
}

.case-doc-slot-badge--conditional {
  color: #1d4ed8;
  background: #dbeafe;
  border: 1px solid #93c5fd;
}

.case-doc-slot-badge--custom {
  color: #b45309;
  background: #fef3c7;
  border: 1px solid #fcd34d;
}

.case-doc-slot-badge--optional {
  color: #1d4ed8;
  background: #dbeafe;
  border: 1px solid #93c5fd;
}

.case-doc-slot-upload {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  flex: 1;
  min-height: 52px;
  margin: 0;
  padding: 0.375rem;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--color-text-muted);
  cursor: not-allowed;
}

.case-doc-slot-upload-icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
  opacity: 0.6;
}

.case-doc-slot-upload-icon svg {
  width: 100%;
  height: 100%;
}

.case-doc-slot-upload-text {
  font-size: 9px;
  text-align: center;
  line-height: 1.3;
}

.case-doc-slot-add-icon {
  display: inline-flex;
  width: 20px;
  height: 20px;
  opacity: 0.5;
}

.case-doc-slot-add-icon svg {
  width: 100%;
  height: 100%;
}

.case-doc-slot-add-label {
  font-size: 10px;
  font-weight: var(--font-weight-medium);
}

.case-template-group {
  border: 1px solid var(--color-border-light);
  border-radius: 8px;
  background: var(--color-surface);
  overflow: hidden;
}

.case-template-group + .case-template-group {
  margin-top: 0.5rem;
}

.case-template-group-summary {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0.625rem;
  font-size: 11px;
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.case-template-group-summary::-webkit-details-marker {
  display: none;
}

.case-template-chevron {
  display: inline-flex;
  width: 14px;
  height: 14px;
  color: var(--color-text-muted);
  transition: transform 0.15s ease;
}

.case-template-group[open] .case-template-chevron {
  transform: rotate(180deg);
}

.case-template-chevron svg {
  width: 100%;
  height: 100%;
}

.case-template-group-body {
  padding: 0 0.625rem 0.5rem;
  border-top: 1px solid var(--color-border-light);
}

.case-template-field {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0;
  border-bottom: 1px solid var(--color-border-light);
}

.case-template-field:last-child {
  border-bottom: none;
}

.case-template-field-label {
  font-size: 10px;
  color: var(--color-text-muted);
}

.case-template-field-value {
  font-size: 11px;
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
  text-align: right;
}

.case-template-missing {
  font-size: 11px;
  font-weight: var(--font-weight-medium);
  color: #ea580c;
}

.case-template-field-edit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--color-text-muted);
  cursor: not-allowed;
  opacity: 0.5;
}

.case-template-field-edit svg {
  width: 12px;
  height: 12px;
}

.case-docs-ai-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.case-docs-ai-card {
  display: flex;
  align-items: flex-start;
  gap: 0.375rem;
  flex: 1 1 140px;
  min-width: 0;
  padding: 0.5rem 0.625rem;
  border-radius: 8px;
  font-size: 10px;
  line-height: 1.4;
}

.case-docs-ai-icon {
  display: inline-flex;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}

.case-docs-ai-icon svg {
  width: 100%;
  height: 100%;
}

.case-docs-ai-card--green {
  color: #15803d;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
}

.case-docs-ai-card--green .case-docs-ai-icon {
  color: #16a34a;
}

.case-docs-ai-card--amber,
.case-docs-ai-card--orange {
  color: #b45309;
  background: #fffbeb;
  border: 1px solid #fde68a;
}

.case-docs-ai-card--amber .case-docs-ai-icon,
.case-docs-ai-card--orange .case-docs-ai-icon {
  color: #d97706;
}

.case-docs-ai-card--red {
  color: #b91c1c;
  background: #fef2f2;
  border: 1px solid #fecaca;
}

.case-docs-ai-card--red .case-docs-ai-icon {
  color: #dc2626;
}

.case-docs-ai-card--blue {
  color: #1d4ed8;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
}

.case-docs-ai-card--blue .case-docs-ai-icon {
  color: #2563eb;
}

/* ── GTIP & Vergi sekmesi ─────────────────────────────────── */

.case-gtip {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.75rem;
}

.case-gtip-locked {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 200px;
  padding: 2rem 1rem;
  text-align: center;
}

.case-gtip-locked-icon {
  display: inline-flex;
  width: 32px;
  height: 32px;
  color: var(--color-text-muted);
  opacity: 0.6;
}

.case-gtip-locked-icon svg {
  width: 100%;
  height: 100%;
}

.case-gtip-locked h3 {
  margin: 0;
  font-size: 13px;
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
}

.case-gtip-locked p {
  margin: 0;
  font-size: 11px;
  color: var(--color-text-muted);
  max-width: 260px;
}

.case-gtip-ready {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
  padding: 2rem 1.25rem;
  border-radius: 12px;
  background: linear-gradient(180deg, #eff6ff 0%, #f8fafc 100%);
  border: 1px solid #bfdbfe;
}

.case-gtip-ready-icon {
  display: flex;
  color: #2563eb;
}

.case-gtip-ready-icon svg {
  width: 28px;
  height: 28px;
}

.case-gtip-ready-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 11px;
  font-weight: var(--font-weight-semibold);
  color: #1d4ed8;
  background: #dbeafe;
}

.case-gtip-ready h3 {
  margin: 0;
  font-size: 15px;
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
}

.case-gtip-ready p {
  margin: 0;
  max-width: 28rem;
  font-size: 12px;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

.case-gtip-ready-cta {
  margin-top: 0.25rem;
  min-width: 14rem;
}

.case-gtip-ready-or {
  margin: 0;
  font-size: 11px;
  color: var(--color-text-muted);
}

.case-gtip-add-product-btn {
  flex-shrink: 0;
}

.case-gtip-product-tabs-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.case-gtip-product-tabs-head .case-gtip-section-title {
  margin: 0;
}

.case-gtip-ready-cta.is-loading {
  opacity: 0.85;
  pointer-events: none;
}

.case-gtip-ready-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 0.4rem;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  vertical-align: -2px;
  animation: case-gtip-spin 0.7s linear infinite;
}

@keyframes case-gtip-spin {
  to {
    transform: rotate(360deg);
  }
}

.case-gtip-active-wrap {
  position: relative;
  min-height: 120px;
}

.case-gtip-active-wrap--busy {
  pointer-events: none;
  user-select: none;
}

.case-gtip-discovering-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(2px);
}

.case-gtip-discovering-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  max-width: 280px;
  padding: 1rem 1.25rem;
  border-radius: 10px;
  border: 1px solid var(--color-border-light);
  background: var(--color-surface);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.1);
  text-align: center;
}

.case-gtip-discovering-spinner {
  display: inline-block;
  width: 28px;
  height: 28px;
  border: 3px solid rgba(37, 99, 235, 0.2);
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: case-gtip-spin 0.75s linear infinite;
}

.case-gtip-discovering-title {
  margin: 0;
  font-size: 13px;
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
}

.case-gtip-discovering-hint {
  margin: 0;
  font-size: 11px;
  color: var(--color-text-muted);
  line-height: 1.4;
}

.case-gtip-error-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  width: 100%;
  padding: 0.625rem 0.75rem;
  border-radius: 8px;
  font-size: 11px;
  line-height: 1.45;
  text-align: left;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  color: #92400e;
}

.case-gtip-error-banner--config {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #991b1b;
}

.case-gtip-error-banner--tariff {
  background: #fff7ed;
  border-color: #fdba74;
  color: #9a3412;
}

.case-gtip-error-banner-icon svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.case-gtip-error-banner p {
  margin: 0;
}

.case-gtip--interactive .case-gtip-product-tab:not(:disabled) {
  cursor: pointer;
}

.case-gtip--interactive .case-gtip-tax-option input:not(:disabled) {
  cursor: pointer;
}

.case-gtip--interactive .case-gtip-tax-option:has(input:not(:disabled)) {
  cursor: pointer;
}

.case-gtip--interactive .case-gtip-alt-btn:not(:disabled) {
  cursor: pointer;
}

.case-gtip-alt-select {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.375rem 0.5rem;
  border: none;
  border-radius: 4px;
  background: transparent;
  font: inherit;
  text-align: left;
  color: inherit;
  cursor: pointer;
}

.case-gtip-alt-select:hover {
  background: #f1f5f9;
}

.case-gtip-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.case-gtip-section--tariff {
  margin-top: 0.625rem;
}

.case-gtip-section-title {
  margin: 0;
  font-size: 11px;
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-secondary);
}

.case-gtip-product-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.case-gtip-product-tab {
  padding: 0.375rem 0.625rem;
  border: 1px solid var(--color-border-light);
  border-radius: 6px;
  background: var(--color-surface);
  font-size: 10px;
  font-weight: var(--font-weight-medium);
  color: var(--color-text-muted);
  cursor: not-allowed;
  white-space: nowrap;
}

.case-gtip-product-tab.is-active {
  border-color: #3b82f6;
  color: #2563eb;
  background: #eff6ff;
}

.case-gtip-product-desc {
  margin: 0.5rem 0 0;
  font-size: 10px;
  line-height: 1.4;
  color: var(--color-text-secondary);
}

.case-gtip-selected {
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--color-border-light);
  border-radius: 8px;
  background: var(--color-surface);
}

.case-gtip-selected-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.375rem;
}

.case-gtip-selected-label {
  font-size: 10px;
  color: var(--color-text-muted);
}

.case-gtip-confidence {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: var(--font-weight-semibold);
  color: #2563eb;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  white-space: nowrap;
}

.case-gtip-code {
  margin: 0 0 0.5rem;
  font-size: 1.125rem;
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.02em;
  color: var(--color-text-primary);
}

.case-gtip-path-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem 0.5rem;
}

.case-gtip-path-label {
  font-size: 9px;
  color: var(--color-text-muted);
  width: 100%;
}

.case-gtip-path {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.125rem;
  flex: 1;
  min-width: 0;
}

.case-gtip-path-seg {
  font-size: 10px;
  font-weight: var(--font-weight-medium);
  color: var(--color-text-secondary);
}

.case-gtip-path-arrow {
  font-size: 10px;
  color: var(--color-text-muted);
  margin: 0 2px;
}

.case-gtip-alt-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.case-gtip-alt-btn svg {
  width: 14px;
  height: 14px;
}

.case-gtip-alternatives {
  border: 1px solid var(--color-border-light);
  border-radius: 8px;
  background: var(--color-surface);
  pointer-events: none;
}

.case-gtip-alternatives-summary {
  padding: 0.5rem 0.625rem;
  font-size: 11px;
  font-weight: var(--font-weight-medium);
  color: var(--color-text-secondary);
  cursor: default;
  list-style: none;
}

.case-gtip-alternatives-summary::-webkit-details-marker {
  display: none;
}

.case-gtip-alt-list {
  margin: 0;
  padding: 0 0.625rem 0.5rem;
  list-style: none;
}

.case-gtip-alt-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.5rem;
  padding: 0.375rem 0;
  border-top: 1px solid var(--color-border-light);
  font-size: 10px;
}

.case-gtip-alt-code {
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  white-space: nowrap;
}

.case-gtip-alt-label {
  color: var(--color-text-muted);
}

.case-gtip-alt-conf {
  color: #2563eb;
  font-weight: var(--font-weight-medium);
}

/* GTIP alternatifleri + arama modalı */
body.gtip-search-modal-open {
  overflow: hidden;
}

.gtip-search-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.45);
}

.gtip-search-modal {
  width: min(520px, 100%);
  max-height: min(85vh, 720px);
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.18);
}

.gtip-search-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1rem 0.75rem;
  border-bottom: 1px solid var(--color-border-light);
}

.gtip-search-modal-title {
  margin: 0;
  font-size: 15px;
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
}

.gtip-search-modal-subtitle {
  margin: 0.25rem 0 0;
  font-size: 11px;
  color: var(--color-text-muted);
}

.gtip-search-modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
}

.gtip-search-modal-close:hover {
  background: var(--color-surface-hover, rgba(0, 0, 0, 0.04));
  color: var(--color-text-primary);
}

.gtip-search-modal-close svg {
  width: 16px;
  height: 16px;
}

.gtip-search-modal-body {
  padding: 0.75rem 1rem 1rem;
  overflow-y: auto;
}

.gtip-search-modal-selected {
  margin: 0 0 0.75rem;
  font-size: 11px;
  color: var(--color-text-secondary);
}

.gtip-search-modal-section + .gtip-search-modal-section {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border-light);
}

.gtip-search-modal-section-title {
  margin: 0 0 0.5rem;
  font-size: 11px;
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
}

.gtip-search-modal-search-wrap {
  position: relative;
  margin-bottom: 0.5rem;
}

.gtip-search-modal-search-icon {
  position: absolute;
  left: 0.625rem;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  width: 14px;
  height: 14px;
  color: var(--color-text-muted);
  pointer-events: none;
}

.gtip-search-modal-search-icon svg {
  width: 100%;
  height: 100%;
}

.gtip-search-modal-search-input {
  width: 100%;
  padding: 0.5rem 0.625rem 0.5rem 2rem;
  border: 1px solid var(--color-border-light);
  border-radius: 8px;
  font: inherit;
  font-size: 12px;
  background: var(--color-surface);
  color: var(--color-text-primary);
}

.gtip-search-modal-search-input:focus {
  outline: none;
  border-color: var(--color-primary, #2563eb);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
}

.gtip-search-modal-status {
  margin: 0 0 0.5rem;
  font-size: 11px;
  color: var(--color-text-muted);
}

.gtip-search-modal-status--error {
  color: #b91c1c;
}

.gtip-search-modal-empty {
  margin: 0;
  font-size: 11px;
  color: var(--color-text-muted);
}

.gtip-search-modal-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.gtip-search-modal-select {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem 0.5rem;
  width: 100%;
  padding: 0.5rem 0.625rem;
  border: 1px solid var(--color-border-light);
  border-radius: 8px;
  background: var(--color-surface);
  font: inherit;
  font-size: 11px;
  text-align: left;
  color: inherit;
  cursor: pointer;
}

.gtip-search-modal-select:hover:not(:disabled) {
  border-color: var(--color-primary, #2563eb);
  background: rgba(37, 99, 235, 0.04);
}

.gtip-search-modal-item.is-selected .gtip-search-modal-select {
  opacity: 0.65;
  cursor: default;
}

.gtip-search-modal-code {
  font-weight: var(--font-weight-semibold);
  font-family: var(--font-mono, ui-monospace, monospace);
  color: var(--color-text-primary);
}

.gtip-search-modal-role {
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
  font-size: 9px;
  font-weight: var(--font-weight-medium);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: rgba(37, 99, 235, 0.1);
  color: #1d4ed8;
}

.gtip-search-modal-label {
  flex: 1 1 100%;
  color: var(--color-text-secondary);
  line-height: 1.35;
}

.gtip-search-modal-reason {
  flex: 1 1 100%;
  font-size: 10px;
  color: var(--color-text-muted);
}

.gtip-search-modal-conf {
  margin-left: auto;
  font-size: 10px;
  font-weight: var(--font-weight-medium);
  color: var(--color-text-muted);
}

.gtip-search-modal-current {
  font-size: 10px;
  font-weight: var(--font-weight-medium);
  color: var(--color-text-muted);
}

.case-gtip-tariff-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.case-gtip-tariff-actions {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  flex-wrap: wrap;
}

.case-gtip-tariff-actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.case-gtip-tariff-actions svg {
  width: 14px;
  height: 14px;
}

.case-gtip-legislation-name {
  margin: 0;
  font-size: 10px;
  color: var(--color-text-muted);
}

.case-gtip-legislation-name strong {
  color: var(--color-text-primary);
  font-weight: var(--font-weight-medium);
}

.case-gtip-tariff-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.5rem;
  padding: 1.25rem 1rem;
  border: 1px dashed var(--color-border-light);
  border-radius: 8px;
  background: var(--color-surface-muted);
}

.case-gtip-tariff-empty-icon {
  display: inline-flex;
  width: 28px;
  height: 28px;
  color: var(--color-text-muted);
}

.case-gtip-tariff-empty-icon svg {
  width: 100%;
  height: 100%;
}

.case-gtip-tariff-empty h4 {
  margin: 0;
  font-size: 12px;
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
}

.case-gtip-tariff-empty p {
  margin: 0;
  max-width: 22rem;
  font-size: 10px;
  line-height: 1.45;
  color: var(--color-text-secondary);
}

.case-gtip-tariff-empty .btn {
  margin-top: 0.25rem;
}

.case-gtip-tariff-empty--loading {
  border-style: solid;
  background: var(--color-surface);
}

.case-gtip-tariff-empty--error {
  border-color: #fecaca;
  background: #fef2f2;
}

.case-gtip-tariff-empty--error .case-gtip-tariff-empty-icon {
  color: #dc2626;
}

.case-gtip-tariff-empty--error h4 {
  color: #991b1b;
}

.case-gtip-tariff-empty--error p {
  color: #b91c1c;
}

.case-gtip-tariff-empty-spinner {
  width: 22px;
  height: 22px;
  border: 2px solid var(--color-border-light);
  border-top-color: var(--color-brand-primary);
  border-radius: 50%;
  animation: case-gtip-spin 0.8s linear infinite;
}

.case-gtip-tax-table {
  border: 1px solid var(--color-border-light);
  border-radius: 8px;
  overflow: hidden;
  background: var(--color-surface);
}

.case-gtip-tax-table-head {
  display: grid;
  grid-template-columns: 1fr 64px 72px 20px;
  gap: 0.5rem;
  padding: 0.375rem 0.625rem;
  font-size: 9px;
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: #f9fafb;
  border-bottom: 1px solid var(--color-border-light);
}

.case-gtip-tax-row {
  border-bottom: 1px solid var(--color-border-light);
}

.case-gtip-tax-row:last-child {
  border-bottom: none;
}

.case-gtip-tax-row-head,
.case-gtip-tax-row--collapsed {
  display: grid;
  grid-template-columns: 20px 1fr 64px 72px 20px;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.625rem;
}

.case-gtip-tax-radio input {
  margin: 0;
  cursor: not-allowed;
}

.case-gtip-tax-name {
  font-size: 11px;
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
}

.case-gtip-tax-rate-col {
  font-size: 11px;
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  text-align: right;
}

.case-gtip-tax-status {
  font-size: 9px;
  color: var(--color-text-muted);
  text-align: right;
  white-space: nowrap;
}

.case-gtip-tax-status--done {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: #16a34a;
  font-weight: var(--font-weight-medium);
}

.case-gtip-tax-status--done svg,
.case-gtip-tax-status--suggestion svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.case-gtip-tax-status--pending {
  color: #b45309;
  font-weight: var(--font-weight-medium);
}

.case-gtip-tax-status--suggestion {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: #1d4ed8;
  font-weight: var(--font-weight-medium);
}

.case-gtip-tax-row--simple.case-gtip-tax-row--collapsed {
  grid-template-columns: 20px 1fr 64px 72px auto;
}

.case-gtip-tax-row--info {
  grid-template-columns: 20px 1fr 64px 72px 20px;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.625rem;
  color: var(--color-text-secondary);
}

.case-gtip-tax-row--info .case-gtip-tax-radio {
  width: 20px;
}

.case-gtip-tax-rate-col--text {
  white-space: normal;
  text-align: right;
  font-size: 10px;
  line-height: 1.3;
  color: var(--color-text-muted);
}

.case-gtip-tax-status--info {
  font-size: 9px;
  color: var(--color-text-muted);
}

.case-gtip-tax-fn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 11px;
  height: 11px;
  margin-left: 3px;
  border-radius: 2px;
  background: var(--color-blue-soft);
  color: var(--color-brand-deep);
  border: 1px solid var(--badge-processing-border);
  font-size: 7px;
  font-weight: var(--font-weight-bold);
  vertical-align: super;
  cursor: help;
}

.case-gtip-tax-edit-btn {
  justify-self: end;
  padding: 0.15rem 0.45rem;
  font-size: 9px;
  line-height: 1.2;
}

.case-gtip-tax-simple-edit {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.case-gtip-tax-source {
  margin: 0;
  font-size: 10px;
  color: var(--color-text-secondary);
}

.case-gtip-tax-source strong {
  color: var(--color-text-primary);
}

.case-gtip-tax-rate-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 10px;
  color: var(--color-text-secondary);
}

.case-gtip-tax-rate-input {
  width: 100%;
  max-width: 8rem;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--color-border-light);
  border-radius: 6px;
  font-size: 12px;
  color: var(--color-text-primary);
  background: var(--color-surface);
}

.case-gtip-tax-rate-input:focus {
  outline: 2px solid #bfdbfe;
  border-color: #93c5fd;
}

.case-gtip-tax-simple-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.case-gtip-tax-chevron {
  display: inline-flex;
  width: 14px;
  height: 14px;
  color: var(--color-text-muted);
}

.case-gtip-tax-chevron svg {
  width: 100%;
  height: 100%;
}

.case-gtip-tax-row-body {
  padding: 0 0.625rem 0.625rem 2.25rem;
}

.case-gtip-origin {
  margin: 0 0 0.5rem;
  font-size: 10px;
  color: var(--color-text-muted);
}

.case-gtip-ai-suggestion {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.375rem 0.5rem;
  padding: 0.5rem 0.625rem;
  margin-bottom: 0.5rem;
  border-radius: 6px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
}

.case-gtip-ai-suggestion-label {
  flex: 1;
  min-width: 0;
  font-size: 10px;
  font-weight: var(--font-weight-medium);
  color: #15803d;
}

.case-gtip-ai-suggestion-rate {
  font-size: 11px;
  font-weight: var(--font-weight-semibold);
  color: #15803d;
}

.case-gtip-ai-suggestion--applied {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.case-gtip-ai-suggestion--applied .case-gtip-ai-suggestion-label,
.case-gtip-ai-suggestion--applied .case-gtip-ai-suggestion-rate {
  color: #1d4ed8;
}

.case-gtip-ai-suggestion--approved {
  background: #f0fdf4;
  border-color: #86efac;
}

.case-gtip-ai-suggestion-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 10px;
  font-weight: var(--font-weight-medium);
  white-space: nowrap;
}

.case-gtip-ai-suggestion-badge svg {
  width: 12px;
  height: 12px;
}

.case-gtip-ai-suggestion-badge--pending {
  background: #dbeafe;
  color: #1d4ed8;
}

.case-gtip-ai-suggestion-badge--done {
  background: #dcfce7;
  color: #15803d;
}

.case-gtip-gv-approve-wrap {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.625rem;
  padding-top: 0.625rem;
  border-top: 1px solid var(--color-border-light);
}

.case-gtip-gv-approve-hint {
  font-size: 10px;
  color: var(--color-text-muted);
}

.case-gtip-tax-row--gv.case-gtip-tax-row--approved .case-gtip-tax-row-head {
  grid-template-columns: 20px 1fr 64px 72px auto;
}

.case-gtip-gv-reset-wrap {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.625rem;
  padding-top: 0.625rem;
  border-top: 1px solid var(--color-border-light);
}

.case-gtip-tax-row--suggestion-pending .case-gtip-tax-row-head {
  background: rgba(37, 99, 235, 0.04);
}

.case-gtip-tax-options {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.case-gtip-tax-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.5rem;
  border-radius: 4px;
  font-size: 10px;
  color: var(--color-text-secondary);
  cursor: not-allowed;
}

.case-gtip-tax-option.is-selected {
  background: #eff6ff;
}

.case-gtip-tax-option input {
  margin: 0;
  cursor: not-allowed;
}

.case-gtip-tax-option-label {
  flex: 1;
  min-width: 0;
}

.case-gtip-tax-option-rate {
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
}

.case-gtip-warning {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.625rem 0.75rem;
  border-radius: 8px;
  background: #fffbeb;
  border: 1px solid #fde68a;
}

.case-gtip-warning-icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: #d97706;
  margin-top: 1px;
}

.case-gtip-warning-icon svg {
  width: 100%;
  height: 100%;
}

.case-gtip-warning-text strong {
  display: block;
  font-size: 11px;
  font-weight: var(--font-weight-semibold);
  color: #b45309;
  margin-bottom: 0.125rem;
}

.case-gtip-warning-text p {
  margin: 0;
  font-size: 10px;
  color: #92400e;
  line-height: 1.4;
}

.case-gtip-footer {
  justify-content: flex-end;
}

.case-gtip-footer--locked {
  justify-content: center;
}

.case-gtip-footer-status {
  flex: 1;
  font-size: 10px;
  font-weight: var(--font-weight-medium);
  color: #16a34a;
}

.case-gtip-footer-actions {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* ── Operatör sekmesi ─────────────────────────────────────── */

.case-operator {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 220px);
  gap: 0.75rem;
  padding: 0.75rem;
  align-items: start;
}

.case-operator-form {
  grid-column: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

.case-operator-locked {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 200px;
  padding: 2rem 1rem;
  text-align: center;
}

.case-operator-locked-icon {
  display: inline-flex;
  width: 32px;
  height: 32px;
  color: var(--color-text-muted);
  opacity: 0.6;
}

.case-operator-locked-icon svg {
  width: 100%;
  height: 100%;
}

.case-operator-locked h3 {
  margin: 0;
  font-size: 13px;
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
}

.case-operator-locked p {
  margin: 0;
  font-size: 11px;
  color: var(--color-text-muted);
  max-width: 280px;
}

.case-operator-error-banner {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.625rem 0.75rem;
  margin-bottom: 0.75rem;
  border-radius: var(--radius-md);
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
  font-size: 11px;
  color: var(--color-text-primary);
}

.case-operator-error-banner--fx {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.3);
}

.case-operator-error-banner-icon {
  flex-shrink: 0;
  display: inline-flex;
  width: 16px;
  height: 16px;
  color: var(--color-danger, #ef4444);
}

.case-operator-error-banner--fx .case-operator-error-banner-icon {
  color: #d97706;
}

.case-operator-error-banner-icon svg {
  width: 100%;
  height: 100%;
}

.case-operator-error-banner p {
  margin: 0;
  line-height: 1.4;
}

.case-operator-summary--loading .case-operator-breakdown {
  opacity: 0.55;
  pointer-events: none;
}

.case-operator-summary--loading .case-operator-summary-rows,
.case-operator-summary--loading .case-operator-summary-total {
  opacity: 0.45;
}

.case-operator-summary-loading {
  margin: 0 0 0.5rem;
  font-size: 9px;
  color: var(--color-text-muted);
}

.case-operator-summary-loading[hidden] {
  display: none;
}

.case-operator-section--legislation {
  margin-bottom: 0.25rem;
}

.case-operator-legislation-loading,
.case-operator-legislation-error,
.case-operator-legislation-empty {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--scop-text-muted, #64748b);
}

.case-operator-legislation-error {
  color: var(--scop-danger, #b91c1c);
}

.case-operator-legislation-group + .case-operator-legislation-group {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--scop-border-subtle, #e2e8f0);
}

.case-operator-legislation-gtip {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--scop-text, #0f172a);
  margin-bottom: 0.35rem;
}

.case-operator-legislation-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.case-operator-legislation-item {
  display: grid;
  grid-template-columns: minmax(4.5rem, auto) 1fr;
  gap: 0.5rem 0.75rem;
  align-items: start;
  font-size: 0.8125rem;
  line-height: 1.45;
}

.case-operator-legislation-code {
  font-weight: 600;
  color: var(--scop-text, #0f172a);
  white-space: nowrap;
}

.case-operator-legislation-text {
  color: var(--scop-text-muted, #64748b);
}

.case-operator-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.case-operator-section-title {
  margin: 0;
  font-size: 11px;
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-secondary);
}

.case-operator-fields {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.case-operator-field label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 10px;
  font-weight: var(--font-weight-medium);
  color: var(--color-text-muted);
}

.case-operator-input {
  width: 100%;
  height: 32px;
  padding: 0 0.5rem;
  border: 1px solid var(--color-border-light);
  border-radius: 6px;
  background: #fff;
  font-size: 11px;
  color: var(--color-text-primary);
  cursor: text;
}

.case-operator-input:disabled {
  background: #f9fafb;
  color: var(--color-text-muted);
  cursor: not-allowed;
}

.case-operator-select-wrap .case-operator-input:not(:disabled) {
  cursor: pointer;
}

.case-operator-select-wrap {
  position: relative;
}

.case-operator-select-wrap .case-operator-input {
  appearance: none;
  padding-right: 1.75rem;
}

.case-operator-select-chevron {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%) rotate(90deg);
  display: inline-flex;
  width: 14px;
  height: 14px;
  color: var(--color-text-muted);
  pointer-events: none;
}

.case-operator-select-chevron svg {
  width: 100%;
  height: 100%;
}

.case-operator-rate-wrap {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.case-operator-rate-wrap .case-operator-input {
  flex: 1;
}

.case-operator-rate-refresh {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--color-border-light);
  border-radius: 6px;
  background: var(--color-surface);
  color: var(--color-text-muted);
  cursor: pointer;
  flex-shrink: 0;
}

.case-operator-rate-refresh:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.case-operator-rate-refresh svg {
  width: 14px;
  height: 14px;
}

.case-operator-amount-row {
  display: flex;
  align-items: stretch;
  gap: 0.35rem;
}

.case-operator-input--amount {
  flex: 1;
  min-width: 0;
}

.case-operator-select-wrap--currency {
  flex: 0 0 5.5rem;
  max-width: 5.5rem;
}

.case-operator-input--currency {
  padding-right: 1.35rem;
  font-size: 10px;
}

.case-operator-field--fx {
  margin-bottom: 0.35rem;
}

.case-operator-fx-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.case-operator-fx-title {
  font-size: 11px;
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-secondary);
}

.case-operator-fx-edit {
  flex-shrink: 0;
  height: 26px;
  padding: 0 0.55rem;
  font-size: 10px;
}

.case-operator-fx-display {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--color-border-light);
  border-radius: 6px;
  background: #f8fafc;
}

.case-operator-fx-display-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-height: 1.25rem;
}

.case-operator-fx-display-label {
  font-size: 10px;
  color: var(--color-text-muted);
  min-width: 0;
}

.case-operator-fx-display-unit {
  font-size: 9px;
  color: var(--color-text-muted);
}

.case-operator-fx-display-rate {
  font-size: 10px;
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.case-operator-fx-display-empty {
  margin: 0;
  font-size: 10px;
  color: var(--color-text-muted);
}

body.operator-fx-modal-open {
  overflow: hidden;
}

.operator-fx-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.45);
}

.operator-fx-modal {
  width: min(420px, 100%);
  max-height: min(85vh, 560px);
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.18);
}

.operator-fx-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1rem 0.75rem;
  border-bottom: 1px solid var(--color-border-light);
}

.operator-fx-modal-title {
  margin: 0;
  font-size: 15px;
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
}

.operator-fx-modal-subtitle {
  margin: 0.25rem 0 0;
  font-size: 11px;
  color: var(--color-text-muted);
}

.operator-fx-modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
}

.operator-fx-modal-close:hover {
  background: #f1f5f9;
  color: var(--color-text-primary);
}

.operator-fx-modal-close svg {
  width: 18px;
  height: 18px;
}

.operator-fx-modal-body {
  padding: 0.75rem 1rem;
  overflow-y: auto;
}

.operator-fx-modal-rows {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.operator-fx-modal-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 6.5rem;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--color-border-light);
  border-radius: 8px;
  background: #f8fafc;
}

.operator-fx-modal-row-label {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.operator-fx-modal-code {
  font-size: 11px;
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
}

.operator-fx-modal-desc {
  font-size: 10px;
  color: var(--color-text-muted);
}

.operator-fx-modal-input {
  height: 30px;
  font-size: 11px;
  text-align: right;
}

.operator-fx-modal-empty {
  margin: 0;
  font-size: 11px;
  color: var(--color-text-muted);
  line-height: 1.45;
}

.operator-fx-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem 1rem;
  border-top: 1px solid var(--color-border-light);
}

.operator-fx-modal-footer-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.case-operator-expenses-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.case-operator-expenses-grid .case-operator-field {
  min-width: 0;
}

.case-operator-damping-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.case-operator-damping-header .case-operator-section-title {
  flex: 1 1 auto;
}

.case-operator-damping-qty {
  flex: 0 0 auto;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  background: #f1f5f9;
  border: 1px solid var(--color-border-light);
  font-size: 9px;
  font-weight: var(--font-weight-medium);
  color: var(--color-text-muted);
  white-space: nowrap;
}

.case-operator-damping-body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.case-operator-field--damping-method {
  margin: 0;
}

.case-operator-damping-panels {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.case-operator-damping-panel {
  display: none;
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--color-border-light);
  border-radius: 8px;
  background: #f8fafc;
}

.case-operator-damping-panel-title {
  margin: 0 0 0.5rem;
  font-size: 9px;
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.case-operator-damping-specific-fields {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.85fr);
  gap: 0.5rem;
  align-items: start;
}

.case-operator-damping-panel .case-operator-field {
  margin: 0;
}

.case-operator-damping-panel .case-operator-field-note {
  margin: 0.2rem 0 0;
}

.case-operator-damping:has(
    [data-operator-field="operator.damping.method"] option[value="ad_valorem"]:checked
  )
  .case-operator-damping-advalorem {
  display: block;
}

.case-operator-damping:has(
    [data-operator-field="operator.damping.method"] option[value="specific"]:checked
  )
  .case-operator-damping-specific {
  display: block;
}

.case-operator-damping:has(
    [data-operator-field="operator.damping.method"] option[value=""]:checked
  )
  .case-operator-damping-panels {
  display: none;
}

.case-operator-summary {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  padding: 0.875rem;
  border-radius: 10px;
  background: #0f172a;
  color: #f8fafc;
  position: sticky;
  top: 0;
}

.case-operator-summary-title {
  margin: 0;
  font-size: 10px;
  font-weight: var(--font-weight-semibold);
  color: #e2e8f0;
}

.case-operator-summary-rows {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.case-operator-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 10px;
  color: #94a3b8;
}

.case-operator-summary-row span:last-child {
  color: #f1f5f9;
  font-weight: var(--font-weight-medium);
  text-align: right;
}

.case-operator-summary-total {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  padding-top: 0.5rem;
  border-top: 1px solid #334155;
}

.case-operator-summary-total-label {
  font-size: 9px;
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.04em;
  color: #94a3b8;
}

.case-operator-summary-total-value {
  font-size: 1.25rem;
  font-weight: var(--font-weight-semibold);
  color: #ffffff;
  letter-spacing: -0.01em;
}

.case-operator-summary-disclaimer {
  margin: 0;
  font-size: 9px;
  line-height: 1.35;
  color: #64748b;
}

.case-operator-summary-cta {
  width: 100%;
  margin-top: 0.25rem;
  justify-content: center;
  font-size: 10px;
  padding: 0.35rem 0.5rem;
}

.case-operator-section-hint {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  line-height: 1.4;
  color: #64748b;
}

.case-operator-section--info {
  opacity: 0.92;
}

.case-operator-field-note {
  margin: 0.25rem 0 0;
  font-size: 0.6875rem;
  color: #94a3b8;
}

.case-operator-breakdown {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 0.625rem;
}

.case-operator-breakdown-row {
  display: grid;
  grid-template-columns: minmax(5.5rem, 1fr) auto auto;
  align-items: baseline;
  gap: 0.35rem 0.5rem;
  font-size: 0.6875rem;
  line-height: 1.3;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: #e2e8f0;
}

.case-operator-breakdown-row--subtotal {
  font-weight: 600;
  color: #f8fafc;
  padding-top: 0.2rem;
  margin-top: 0.15rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.case-operator-breakdown-row--grand {
  font-weight: 700;
  color: #fff;
  padding-top: 0.25rem;
  margin-top: 0.2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.case-operator-breakdown-row--genel {
  font-weight: 700;
  font-size: 11px;
  color: #fff;
  padding-top: 0.35rem;
  margin-top: 0.35rem;
  border-top: 2px solid rgba(255, 255, 255, 0.22);
}

.case-operator-breakdown-row--genel .case-operator-breakdown-value {
  font-size: 11px;
  color: #fff;
}

.case-operator-breakdown-row--footer {
  color: #94a3b8;
  font-size: 0.625rem;
}

.case-operator-breakdown-row--info {
  color: #94a3b8;
}

.case-operator-breakdown-row--info .case-operator-breakdown-value {
  color: #cbd5e1;
}

.case-operator-breakdown-label {
  color: #cbd5e1;
}

.case-operator-breakdown-sep {
  color: #64748b;
}

.case-operator-breakdown-value {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.1rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: #f8fafc;
}

.case-operator-breakdown-value-foreign {
  font-size: 10px;
  font-weight: var(--font-weight-semibold);
  color: #f8fafc;
  white-space: nowrap;
}

.case-operator-breakdown-value-try {
  font-size: 9px;
  color: #94a3b8;
  white-space: nowrap;
}

.case-operator-summary-empty {
  margin: 0 0 0.5rem;
  font-size: 0.6875rem;
  color: #94a3b8;
}

/* ── Beyanname sekmesi ────────────────────────────────────── */
.case-declaration {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.75rem;
}

.case-decl-locked {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 200px;
  padding: 2rem 1rem;
  text-align: center;
}

.case-decl-locked-icon {
  display: inline-flex;
  width: 32px;
  height: 32px;
  color: var(--color-text-muted);
  opacity: 0.6;
}

.case-decl-locked-icon svg {
  width: 100%;
  height: 100%;
}

.case-decl-locked h3 {
  margin: 0;
  font-size: 13px;
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
}

.case-decl-locked p {
  margin: 0;
  font-size: 11px;
  color: var(--color-text-muted);
  max-width: 280px;
}

.case-decl-status-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.625rem 0.75rem;
  border-radius: 8px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
}

.case-decl-status-icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: #16a34a;
  margin-top: 1px;
}

.case-decl-status-icon svg {
  width: 100%;
  height: 100%;
}

.case-decl-status-text {
  flex: 1;
  min-width: 0;
}

.case-decl-status-text strong {
  display: block;
  font-size: 11px;
  font-weight: var(--font-weight-semibold);
  color: #15803d;
  margin-bottom: 0.125rem;
}

.case-decl-status-text p {
  margin: 0;
  font-size: 10px;
  color: #166534;
  line-height: 1.4;
}

.case-decl-status-badge {
  flex-shrink: 0;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.04em;
  color: #b45309;
  background: #fffbeb;
  border: 1px solid #fde68a;
}

.case-decl-preview-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.case-decl-section-title {
  margin: 0 0 0.5rem;
  font-size: 11px;
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-secondary);
}

.case-decl-preview-card {
  border: 1px solid var(--color-border-light);
  border-radius: 8px;
  background: var(--color-surface);
  overflow: hidden;
}

.case-decl-preview-thumb {
  padding: 0.75rem;
  background: #f3f4f6;
  border-bottom: 1px solid var(--color-border-light);
}

.case-decl-preview-doc {
  aspect-ratio: 3 / 4;
  max-height: 140px;
  margin: 0 auto;
  padding: 0.625rem;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.case-decl-preview-doc-line {
  height: 4px;
  margin-bottom: 6px;
  border-radius: 2px;
  background: #e5e7eb;
}

.case-decl-preview-doc-line--title {
  width: 55%;
  height: 6px;
  background: #d1d5db;
}

.case-decl-preview-doc-line--short {
  width: 70%;
}

.case-decl-preview-doc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-top: 8px;
}

.case-decl-preview-doc-grid span {
  height: 12px;
  border-radius: 2px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
}

.case-decl-preview-hint {
  margin: 0;
  padding: 0.5rem 0.625rem;
  font-size: 9px;
  color: var(--color-text-muted);
  text-align: center;
}

.case-decl-summary {
  border: 1px solid var(--color-border-light);
  border-radius: 8px;
  padding: 0.625rem 0.75rem;
  background: var(--color-surface);
}

.case-decl-summary-list {
  margin: 0;
}

.case-decl-summary-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.375rem 0;
  border-bottom: 1px solid var(--color-border-light);
  font-size: 10px;
}

.case-decl-summary-row:last-child {
  border-bottom: none;
}

.case-decl-summary-row dt {
  margin: 0;
  color: var(--color-text-muted);
  font-weight: var(--font-weight-medium);
}

.case-decl-summary-row dd {
  margin: 0;
  color: var(--color-text-primary);
  font-weight: var(--font-weight-semibold);
  text-align: right;
}

.case-decl-summary-disclaimer {
  margin: 0.5rem 0 0;
  font-size: 9px;
  font-style: italic;
  color: var(--color-text-muted);
}

.case-decl-checklist-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.case-decl-checklist-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.case-decl-checklist-badge {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: var(--font-weight-semibold);
  color: #15803d;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  white-space: nowrap;
}

.case-decl-checklist {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.case-decl-checklist-item {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 10px;
  color: var(--color-text-secondary);
}

.case-decl-checklist-icon {
  display: inline-flex;
  width: 14px;
  height: 14px;
  color: #16a34a;
  flex-shrink: 0;
}

.case-decl-checklist-icon svg {
  width: 100%;
  height: 100%;
}

.case-decl-warning-section {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.case-decl-warning {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.625rem 0.75rem;
  border-radius: 8px;
  background: #fffbeb;
  border: 1px solid #fde68a;
}

.case-decl-warning-icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: #d97706;
  margin-top: 1px;
}

.case-decl-warning-icon svg {
  width: 100%;
  height: 100%;
}

.case-decl-warning p {
  margin: 0;
  font-size: 10px;
  color: #92400e;
  line-height: 1.4;
}

.case-decl-footer {
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
}

.case-decl-footer--locked {
  justify-content: center;
}

.case-decl-footer-left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.case-decl-footer-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.case-decl-footer-btn svg {
  width: 14px;
  height: 14px;
}

/* ── Footer ───────────────────────────────────────────────── */

.case-detail-footer {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.625rem 0.75rem;
  border-top: 1px solid var(--color-border-light);
  background: var(--color-surface);
}

.case-detail-updated {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 10px;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.case-detail-updated-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
}

.case-detail-actions {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.btn-sm {
  height: 30px;
  padding: 0 10px;
  font-size: 11px;
}

.case-detail-more {
  min-width: 30px;
  padding: 0 8px;
}

@media (max-width: 560px) {
  .case-detail-split,
  .case-extracted-grid,
  .case-financial-grid,
  .case-module-grid {
    grid-template-columns: 1fr;
  }

  .case-file-status {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

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

  .case-operator {
    grid-template-columns: 1fr;
  }

  .case-operator-summary {
    grid-column: 1;
  }

  .case-operator-expenses-grid {
    grid-template-columns: 1fr;
  }

  .case-operator-damping-specific-fields {
    grid-template-columns: 1fr;
  }

  .case-decl-preview-row {
    grid-template-columns: 1fr;
  }
}

/* ── Belge PDF önizleme modal ─────────────────────────────── */

body.doc-preview-modal-open {
  overflow: hidden;
}

.doc-preview-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 260;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
}

.doc-preview-modal {
  display: flex;
  flex-direction: column;
  width: min(1100px, 96vw);
  height: min(88vh, 900px);
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.22);
  overflow: hidden;
}

.doc-preview-modal-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--color-border-light);
  background: var(--color-surface);
}

.doc-preview-modal-header-text {
  min-width: 0;
  flex: 1;
}

.doc-preview-modal-title {
  margin: 0;
  font-size: 1rem;
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.doc-preview-modal-subtitle {
  margin: 0.2rem 0 0;
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.doc-preview-zoom {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.doc-preview-zoom-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-text-secondary);
  cursor: pointer;
}

.doc-preview-zoom-btn:hover:not(:disabled) {
  color: var(--color-text-primary);
  background: var(--color-surface-muted);
}

.doc-preview-zoom-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.doc-preview-zoom-btn svg {
  width: 16px;
  height: 16px;
}

.doc-preview-zoom-label {
  min-width: 3rem;
  text-align: center;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-secondary);
}

.doc-preview-zoom-fit {
  margin-left: 0.15rem;
}

.doc-preview-modal-close {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
}

.doc-preview-modal-close:hover {
  background: var(--color-surface-muted);
  color: var(--color-text-primary);
}

.doc-preview-modal-close svg {
  width: 18px;
  height: 18px;
}

.doc-preview-modal-body {
  flex: 1;
  min-height: 0;
  background: #525659;
}

.doc-preview-scroll {
  width: 100%;
  height: 100%;
  overflow: auto;
  padding: 1rem;
}

.doc-preview-stage {
  transform-origin: top center;
  margin: 0 auto;
  width: fit-content;
}

.doc-preview-frame {
  display: block;
  width: 820px;
  height: min(72vh, 1100px);
  border: none;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.doc-preview-loading,
.doc-preview-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  height: 100%;
  padding: 2rem;
  color: #f8fafc;
  text-align: center;
}

.doc-preview-spinner {
  width: 28px;
  height: 28px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: doc-preview-spin 0.8s linear infinite;
}

@keyframes doc-preview-spin {
  to {
    transform: rotate(360deg);
  }
}
