/* =========================================================
   UDF Studio | Enterprise LegalTech Design System (v3.0)
   ========================================================= */

:root {
  /* Kurumsal Renk Paleti - Light Theme */
  --primary: #1e3a8a;
  --primary-hover: #172554;
  --primary-accent: #2563eb;
  --primary-light: #eff6ff;
  --primary-border: #bfdbfe;

  --secondary: #0f172a;
  --accent: #1d4ed8;

  --success: #047857;
  --success-light: #ecfdf5;
  --success-border: #a7f3d0;

  --warning: #b45309;
  --warning-light: #fffbeb;
  --warning-border: #fde68a;

  --danger: #b91c1c;
  --danger-light: #fef2f2;
  --danger-border: #fecaca;

  /* Arka Planlar & Yüzeyler */
  --bg-main: #f4f6f9;
  --bg-surface: #ffffff;
  --bg-subtle: #f8fafc;
  --bg-elevated: #f1f5f9;
  --bg-paper: #ffffff;

  /* Tipografi */
  --text-main: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --text-subtle: #94a3b8;

  /* Çerçeveler & Gölgeler */
  --border-color: #e2e8f0;
  --border-strong: #cbd5e1;
  --focus-ring: 0 0 0 3px rgba(30, 58, 138, 0.16);

  --shadow-xs: 0 1px 2px 0 rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 1px 3px 0 rgba(15, 23, 42, 0.06), 0 1px 2px -1px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 12px -2px rgba(15, 23, 42, 0.07), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 12px 24px -4px rgba(15, 23, 42, 0.08), 0 4px 8px -4px rgba(15, 23, 42, 0.04);
  --shadow-xl: 0 24px 48px -12px rgba(15, 23, 42, 0.18);
  --shadow-paper: 0 12px 32px rgba(15, 23, 42, 0.14), 0 1px 3px rgba(15, 23, 42, 0.08);

  /* Yuvarlaklık */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  /* Font Aileleri */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-serif: 'Merriweather', "Times New Roman", Times, Georgia, serif;
}

/* =========================================================
   DARK THEME PALETTE
   ========================================================= */
[data-theme="dark"] {
  --primary: #3b82f6;
  --primary-hover: #60a5fa;
  --primary-accent: #3b82f6;
  --primary-light: rgba(59, 130, 246, 0.12);
  --primary-border: rgba(59, 130, 246, 0.3);

  --secondary: #f8fafc;
  --accent: #3b82f6;

  --success: #10b981;
  --success-light: rgba(16, 185, 129, 0.12);
  --success-border: rgba(16, 185, 129, 0.3);

  --warning: #f59e0b;
  --warning-light: rgba(245, 158, 11, 0.12);
  --warning-border: rgba(245, 158, 11, 0.3);

  --danger: #ef4444;
  --danger-light: rgba(239, 68, 68, 0.12);
  --danger-border: rgba(239, 68, 68, 0.3);

  --bg-main: #090d16;
  --bg-surface: #111827;
  --bg-subtle: #161f33;
  --bg-elevated: #1e293b;
  --bg-paper: #ffffff;

  --text-main: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;

  --border-color: #1e293b;
  --border-strong: #334155;
  --focus-ring: 0 0 0 3px rgba(59, 130, 246, 0.28);

  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.5);
  --shadow-md: 0 4px 12px -2px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 12px 24px -4px rgba(0, 0, 0, 0.65);
  --shadow-xl: 0 24px 48px -12px rgba(0, 0, 0, 0.8);
}

/* Temel Sıfırlamalar */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

/* =========================================================
   HEADER / KURUMSAL ÜST ÇUBUK
   ========================================================= */
.app-header {
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--border-color);
  padding: 12px 0;
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

[data-theme="dark"] .app-header {
  background: rgba(17, 24, 39, 0.9);
}

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

.logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.logo-icon {
  width: 38px;
  height: 38px;
  background: #0f172a;
  color: #f8fafc;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-xs);
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .logo-icon {
  background: #1e3a8a;
}

.logo-text .logo-title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-text .logo-title span {
  font-size: 0.62rem;
  font-weight: 700;
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid var(--primary-border);
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.logo-text p {
  font-size: 0.74rem;
  color: var(--text-muted);
  font-weight: 500;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-link {
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s ease;
}

.nav-link:hover {
  color: var(--primary);
}

@media (max-width: 960px) {
  .header-nav {
    display: none;
  }
}

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

.header-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background-color: var(--success-light);
  color: var(--success);
  border: 1px solid var(--success-border);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

@media (max-width: 640px) {
  .header-badge {
    display: none;
  }
}

.pulse-dot {
  width: 7px;
  height: 7px;
  background-color: var(--success);
  border-radius: 50%;
}

.theme-toggle-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.theme-toggle-btn:hover {
  background: var(--bg-subtle);
  color: var(--text-main);
  border-color: var(--border-strong);
}

[data-theme="light"] .theme-icon-sun { display: none; }
[data-theme="light"] .theme-icon-moon { display: inline-block; }
[data-theme="dark"] .theme-icon-sun { display: inline-block; }
[data-theme="dark"] .theme-icon-moon { display: none; }

/* =========================================================
   HERO BÖLÜMÜ
   ========================================================= */
.hero {
  text-align: center;
  padding: 40px 0 28px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--bg-surface);
  color: var(--primary);
  border: 1px solid var(--border-color);
  padding: 5px 14px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
  box-shadow: var(--shadow-xs);
}

.hero-title {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.22;
  color: var(--text-main);
  letter-spacing: -0.03em;
  margin-bottom: 12px;
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
}

.hero-title span {
  color: var(--primary-accent);
}

.hero-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 740px;
  margin: 0 auto 22px;
  line-height: 1.6;
}

.trust-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 5px 12px;
  border-radius: var(--radius-md);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-secondary);
  box-shadow: var(--shadow-xs);
}

.pill svg {
  color: var(--primary-accent);
  flex-shrink: 0;
}

/* =========================================================
   WORKSPACE SHELL (BİRLEŞİK ÇALIŞMA ALANI)
   ========================================================= */
.workspace-shell {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 22px;
  margin-bottom: 32px;
  box-shadow: var(--shadow-md);
}

.mode-selector-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.mode-selector {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 4px;
  gap: 4px;
}

@media (max-width: 900px) {
  .mode-selector {
    display: flex;
    overflow-x: auto;
  }
}

.mode-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 14px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.83rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  white-space: nowrap;
}

.mode-tab:hover {
  color: var(--text-main);
  background: rgba(15, 23, 42, 0.04);
}

[data-theme="dark"] .mode-tab:hover {
  background: rgba(255, 255, 255, 0.04);
}

.mode-tab.active {
  background: var(--bg-surface);
  color: var(--primary);
  border-color: var(--border-color);
  box-shadow: var(--shadow-xs);
}

.direction-chip {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: var(--radius-xs);
  letter-spacing: 0.01em;
}

.direction-udf-to-docx {
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid var(--primary-border);
}

.direction-docx-to-udf {
  background: #f5f3ff;
  color: #5b21b6;
  border: 1px solid #ddd6fe;
}

[data-theme="dark"] .direction-docx-to-udf {
  background: rgba(139, 92, 246, 0.15);
  color: #c4b5fd;
  border-color: rgba(139, 92, 246, 0.3);
}

.direction-pdf-to-udf {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

[data-theme="dark"] .direction-pdf-to-udf {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.3);
}

/* =========================================================
   SETTINGS SECTION (ACCORDION)
   ========================================================= */
.settings-section {
  margin-bottom: 16px;
}

.settings-details {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.15s ease;
}

.settings-details[open] {
  border-color: var(--border-strong);
}

.settings-summary {
  list-style: none;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
}

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

.settings-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  color: var(--text-secondary);
}

.settings-title-wrap svg {
  color: var(--text-muted);
}

.settings-badge {
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 2px 9px;
  border-radius: var(--radius-xs);
  color: var(--text-muted);
}

.settings-grid {
  padding: 14px 16px 16px;
  border-top: 1px solid var(--border-color);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  background: var(--bg-surface);
}

.setting-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.setting-item label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-main);
}

.form-select {
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 7px 11px;
  border-radius: var(--radius-sm);
  font-size: 0.83rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-select:focus {
  border-color: var(--primary);
  background-color: var(--bg-surface);
  box-shadow: var(--focus-ring);
}

.setting-hint {
  font-size: 0.71rem;
  color: var(--text-muted);
}

/* =========================================================
   DROPZONE / UPLOAD BOX
   ========================================================= */
.upload-section {
  margin-bottom: 0;
}

.dropzone-container {
  background: var(--bg-subtle);
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 36px 24px 28px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  outline: none;
}

.dropzone-container:hover,
.dropzone-container.drag-active {
  border-color: var(--primary-accent);
  background-color: var(--primary-light);
}

.dropzone-container:focus-visible {
  box-shadow: var(--focus-ring);
}

.dropzone-icon {
  width: 54px;
  height: 54px;
  background: var(--bg-surface);
  color: var(--primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  box-shadow: var(--shadow-xs);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.dropzone-container:hover .dropzone-icon {
  transform: translateY(-2px);
  border-color: var(--primary-border);
}

.dropzone-title {
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.dropzone-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.sub-hint {
  font-size: 0.78rem;
  color: var(--text-subtle);
}

kbd {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 0.73rem;
  font-family: inherit;
  color: var(--text-secondary);
}

.file-input {
  display: none;
}

.dropzone-buttons {
  margin-bottom: 20px;
}

.sample-try-area {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
  max-width: 680px;
  margin: 0 auto;
}

.sample-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}

.sample-pills-wrap {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

.sample-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-weight: 500;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.76rem;
  font-family: inherit;
  transition: all 0.15s ease;
}

.sample-btn:hover {
  border-color: var(--primary-border);
  color: var(--primary);
  background: var(--primary-light);
}

.sample-btn.sample-view-highlight {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary-border);
  font-weight: 600;
}

.sample-btn.sample-view-highlight:hover {
  background: var(--primary);
  color: #ffffff;
}

/* =========================================================
   BUTTONS
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-weight: 600;
  font-size: 0.86rem;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  font-family: inherit;
  line-height: 1.2;
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
  box-shadow: var(--shadow-xs);
}

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

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-outline {
  background-color: var(--bg-surface);
  border-color: var(--border-color);
  color: var(--text-secondary);
}

.btn-outline:hover:not(:disabled) {
  background-color: var(--bg-subtle);
  border-color: var(--border-strong);
  color: var(--text-main);
}

.btn-outline:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

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

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

.btn-lg {
  padding: 11px 22px;
  font-size: 0.92rem;
  border-radius: var(--radius-md);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.78rem;
  border-radius: var(--radius-sm);
}

.btn-xs {
  padding: 4px 9px;
  font-size: 0.73rem;
  border-radius: var(--radius-xs);
}

/* =========================================================
   QUEUE / CONVERSION LIST
   ========================================================= */
.queue-section {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 20px 22px;
  margin-bottom: 32px;
  box-shadow: var(--shadow-sm);
  display: none;
}

.queue-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-color);
}

.queue-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.queue-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
}

.queue-counts {
  display: flex;
  gap: 6px;
}

.count-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.count-total {
  background: var(--bg-elevated);
  color: var(--text-secondary);
}

.count-success {
  background: var(--success-light);
  color: var(--success);
  border: 1px solid var(--success-border);
}

.queue-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.queue-search-box {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
}

.queue-search-box input {
  border: none;
  background: none;
  color: var(--text-main);
  font-size: 0.8rem;
  font-family: inherit;
  outline: none;
  width: 150px;
}

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

.file-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.file-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: border-color 0.15s ease;
}

.file-card:hover {
  border-color: var(--border-strong);
}

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

.file-icon-box {
  width: 42px;
  height: 42px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
}

.file-fmt-tag {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--primary);
}

.file-icon-box[data-fmt="PDF"] .file-fmt-tag {
  color: var(--danger);
}

.file-icon-box.is-signed::after {
  content: "✓";
  position: absolute;
  top: -4px;
  right: -4px;
  width: 15px;
  height: 15px;
  background: var(--success);
  color: #fff;
  font-size: 9px;
  font-weight: bold;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 2px var(--bg-surface);
}

.sig-verified-pill {
  background: var(--success-light);
  color: var(--success);
  border: 1px solid var(--success-border);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: var(--radius-xs);
}

.file-details {
  min-width: 0;
  flex: 1;
}

.file-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 3px;
  flex-wrap: wrap;
}

.file-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-meta-row {
  font-size: 0.76rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 8px;
  border-radius: var(--radius-xs);
  font-size: 0.72rem;
  font-weight: 600;
}

.status-waiting {
  background-color: var(--bg-elevated);
  color: var(--text-muted);
}

.status-processing {
  background-color: var(--warning-light);
  color: var(--warning);
  border: 1px solid var(--warning-border);
}

.status-success {
  background-color: var(--success-light);
  color: var(--success);
  border: 1px solid var(--success-border);
}

.status-error {
  background-color: var(--danger-light);
  color: var(--danger);
  border: 1px solid var(--danger-border);
}

.duration-chip {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 1px 6px;
  border-radius: var(--radius-xs);
  font-size: 0.7rem;
  color: var(--text-muted);
}

.file-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.btn-view-doc {
  font-weight: 600;
  border-color: var(--primary-border);
  color: var(--primary);
}

.btn-view-doc:hover {
  background: var(--primary);
  color: #ffffff;
}

/* =========================================================
   PROFESYONEL BELGE & HUKUK ARAÇLARI STÜDYOSU (TOOLKIT)
   ========================================================= */
.pro-toolkit-section {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 26px;
  margin-bottom: 36px;
  box-shadow: var(--shadow-sm);
}

.toolkit-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.toolkit-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--primary);
  background: var(--primary-light);
  border: 1px solid var(--primary-border);
  padding: 3px 10px;
  border-radius: var(--radius-xs);
  margin-bottom: 8px;
}

.toolkit-header h2 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
  margin: 0 0 4px 0;
}

.toolkit-header p {
  font-size: 0.86rem;
  color: var(--text-muted);
  margin: 0;
}

.toolkit-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  background: var(--bg-elevated);
  padding: 4px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  margin-bottom: 22px;
}

@media (max-width: 900px) {
  .toolkit-tabs {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 540px) {
  .toolkit-tabs {
    grid-template-columns: 1fr;
  }
}

.toolkit-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.81rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.toolkit-tab:hover {
  color: var(--text-main);
  background: rgba(15, 23, 42, 0.04);
}

.toolkit-tab.active {
  background: var(--bg-surface);
  color: var(--primary);
  border-color: var(--border-color);
  box-shadow: var(--shadow-xs);
}

.toolkit-panel {
  display: none;
}

.toolkit-panel.active {
  display: block;
}

.toolkit-panel-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 24px;
  align-items: start;
}

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

.toolkit-col h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 6px 0;
}

.toolkit-desc {
  font-size: 0.83rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 16px;
}

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

@media (max-width: 600px) {
  .toolkit-form-row {
    grid-template-columns: 1fr;
  }
}

.toolkit-form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 12px;
}

.toolkit-form-group label {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-input,
.diff-textarea {
  width: 100%;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px 11px;
  font-size: 0.83rem;
  color: var(--text-main);
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-input:focus,
.diff-textarea:focus {
  border-color: var(--primary);
  background: var(--bg-surface);
  box-shadow: var(--focus-ring);
}

.toolkit-action-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tiff-results-box,
.dizi-preview-list {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 14px;
  min-height: 180px;
  max-height: 300px;
  overflow-y: auto;
}

.toolkit-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 150px;
  color: var(--text-muted);
  font-size: 0.82rem;
  gap: 10px;
  padding: 16px;
}

.toolkit-empty-state svg {
  color: var(--text-subtle);
}

.tiff-item-card,
.dizi-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 8px;
  font-size: 0.8rem;
}

.tiff-saving-badge {
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid var(--primary-border);
  font-weight: 600;
  font-size: 0.7rem;
  padding: 1px 7px;
  border-radius: var(--radius-xs);
}

/* Diff Modülü Stilleri */
.diff-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.diff-inputs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

@media (max-width: 768px) {
  .diff-inputs-grid {
    grid-template-columns: 1fr;
  }
}

.diff-input-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
}

.diff-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.diff-result-container {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-top: 12px;
}

.diff-stats-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.diff-export-actions {
  margin-left: auto;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.diff-stat-pill {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
}

.diff-pill-add {
  background: var(--success-light);
  color: var(--success);
  border-color: var(--success-border);
}

.diff-pill-del {
  background: var(--danger-light);
  color: var(--danger);
  border-color: var(--danger-border);
}

.diff-output-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  font-family: var(--font-serif);
  font-size: 0.9rem;
  line-height: 1.65;
  max-height: 340px;
  overflow-y: auto;
}

ins.diff-added {
  background: #dcfce7;
  color: #166534;
  text-decoration: none;
  font-weight: 600;
  padding: 1px 4px;
  border-radius: 3px;
  border-bottom: 2px solid #22c55e;
}

del.diff-removed {
  background: #fee2e2;
  color: #991b1b;
  text-decoration: line-through;
  padding: 1px 4px;
  border-radius: 3px;
}

[data-theme="dark"] ins.diff-added {
  background: rgba(34, 197, 94, 0.22);
  color: #86efac;
}

[data-theme="dark"] del.diff-removed {
  background: rgba(239, 68, 68, 0.22);
  color: #fca5a5;
}

/* =========================================================
   VERİ GÜVENLİĞİ KARTI
   ========================================================= */
.security-audit-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--success);
  border-radius: var(--radius-lg);
  padding: 24px 26px;
  margin-bottom: 48px;
  box-shadow: var(--shadow-xs);
}

.security-audit-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.audit-icon-box {
  width: 42px;
  height: 42px;
  background: var(--success-light);
  color: var(--success);
  border: 1px solid var(--success-border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.security-audit-header h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
}

.security-audit-header p {
  font-size: 0.84rem;
  color: var(--text-muted);
}

.security-audit-body {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.audit-fact strong {
  display: block;
  font-size: 0.88rem;
  color: var(--text-main);
  margin-bottom: 4px;
}

.audit-fact span {
  font-size: 0.81rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* =========================================================
   ÖZELLİKLER VE TEKNİK MATRİS
   ========================================================= */
.info-section {
  margin-top: 16px;
}

.section-heading-block {
  text-align: center;
  margin-bottom: 32px;
}

.section-eyebrow {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--primary);
  margin-bottom: 6px;
  text-transform: uppercase;
}

.section-title {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.section-subtitle {
  font-size: 0.92rem;
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 18px;
  margin-bottom: 48px;
}

.feature-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  box-shadow: var(--shadow-xs);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.feature-box:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.feature-box-icon {
  width: 38px;
  height: 38px;
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid var(--primary-border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.feature-box h3 {
  font-size: 0.98rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-main);
}

.feature-box p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.feature-box code {
  font-size: 0.78rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  padding: 1px 5px;
  border-radius: 4px;
  color: var(--text-secondary);
}

/* Teknik Uyumluluk Matrisi Tablosu */
.spec-matrix-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 56px;
  box-shadow: var(--shadow-xs);
}

.spec-matrix-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-subtle);
}

.spec-matrix-header h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 2px;
}

.spec-matrix-header p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.spec-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.83rem;
  text-align: left;
}

.spec-table th {
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border-color);
}

.spec-table td {
  padding: 13px 20px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-muted);
}

.spec-table tr:last-child td {
  border-bottom: none;
}

.spec-table td strong {
  color: var(--text-main);
}

.spec-table code {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.76rem;
  color: var(--primary);
}

/* =========================================================
   FAQ ACCORDION
   ========================================================= */
.faq-section {
  margin-bottom: 64px;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 860px;
  margin: 0 auto;
}

.faq-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.faq-item[open] {
  border-color: var(--border-strong);
}

.faq-question {
  list-style: none;
  padding: 15px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text-main);
  cursor: pointer;
  user-select: none;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-chevron {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.faq-item[open] .faq-chevron {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 14px 20px 18px;
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.65;
  border-top: 1px solid var(--border-color);
}

/* =========================================================
   PREVIEW MODAL (DOCUMENT STUDIO)
   ========================================================= */
dialog:not([open]) {
  display: none !important;
}

dialog.preview-modal {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  max-width: 980px;
  width: 96vw;
  max-height: 94vh;
  margin: auto;
  padding: 0;
  background: var(--bg-surface);
  overflow: hidden;
}

dialog.preview-modal[open] {
  display: flex;
  flex-direction: column;
}

dialog.preview-modal.is-fullscreen {
  max-width: 100vw;
  width: 100vw;
  max-height: 100vh;
  height: 100vh;
  border-radius: 0;
  margin: 0;
}

dialog::backdrop {
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
}

.modal-header {
  padding: 14px 22px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface);
}

.modal-title-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-doc-icon {
  width: 36px;
  height: 36px;
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid var(--primary-border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.modal-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.25;
}

.modal-subtitle {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.modal-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-xs);
}

.modal-close:hover {
  color: var(--text-main);
  background: var(--bg-subtle);
}

/* Modal Toolbar */
.modal-toolbar {
  padding: 10px 22px;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.toolbar-left,
.toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.modal-search-box {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
}

.modal-search-box input {
  border: none;
  background: none;
  font-size: 0.8rem;
  color: var(--text-main);
  outline: none;
  width: 145px;
  font-family: inherit;
}

.search-match-count {
  font-size: 0.72rem;
  color: var(--primary);
  font-weight: 600;
  white-space: nowrap;
}

.btn-search-nav {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  border-radius: var(--radius-xs);
  padding: 2px 6px;
  font-size: 0.72rem;
  cursor: pointer;
  line-height: 1;
}

.btn-search-nav:hover:not(:disabled) {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary-border);
}

.btn-search-nav:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* Okuma Kağıt Modu Temaları */
.reader-theme-group {
  display: inline-flex;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 2px;
  gap: 2px;
}

.btn-read-theme {
  background: none;
  border: none;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 4px 9px;
  border-radius: 4px;
  cursor: pointer;
  line-height: 1.1;
  font-family: inherit;
  transition: all 0.15s ease;
}

.btn-read-theme:hover {
  background: var(--bg-subtle);
  color: var(--text-main);
}

.btn-read-theme.active {
  background: var(--primary-light);
  color: var(--primary);
}

/* Metin Boyutu (A- / A+) Kontrolleri */
.font-size-controls {
  display: inline-flex;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.btn-font-size {
  background: none;
  border: none;
  padding: 4px 8px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
}

.btn-font-size:hover {
  background: var(--bg-subtle);
}

.font-size-display {
  padding: 0 6px;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-muted);
}

.btn-toolbar {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-family: inherit;
}

.btn-toolbar.is-active {
  background: var(--danger-light);
  border-color: var(--danger-border);
  color: var(--danger);
}

.toolbar-select {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 4px 9px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  color: var(--text-main);
  outline: none;
  font-family: inherit;
}

.zoom-controls {
  display: flex;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.btn-zoom {
  background: none;
  border: none;
  padding: 4px 9px;
  font-size: 0.88rem;
  color: var(--text-main);
  cursor: pointer;
}

.btn-zoom:hover {
  background: var(--bg-subtle);
}

.zoom-level {
  padding: 0 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* Modal Stats Drawer */
.modal-stats-drawer {
  padding: 9px 22px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.stat-pill {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  padding: 3px 10px;
  border-radius: var(--radius-xs);
  font-size: 0.74rem;
  color: var(--text-muted);
}

.stat-pill strong {
  color: var(--text-main);
}

/* Modal Body (A4 Simulation View) */
.modal-body {
  padding: 28px 24px;
  overflow-y: auto;
  flex: 1;
  background: #cbd5e1;
  display: flex;
  justify-content: center;
}

[data-theme="dark"] .modal-body {
  background: #020617;
}

.modal-footer {
  padding: 12px 22px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--bg-surface);
  flex-wrap: wrap;
}

.modal-footer-left,
.modal-footer-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* A4 Paper Simulation */
.udf-document-sheet {
  background: var(--bg-paper);
  width: 100%;
  max-width: 790px;
  min-height: 1050px;
  padding: 60px 70px;
  box-shadow: var(--shadow-paper);
  font-family: var(--font-serif);
  font-size: 12pt;
  line-height: 1.42;
  color: #000000;
  transform-origin: top center;
  transition: transform 0.15s ease;
}

.udf-signature-badge {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #f0fdf4;
  border: 1px solid #86efac;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 26px;
  font-family: var(--font-sans);
  color: #166534;
}

.udf-sig-icon {
  font-size: 18px;
  line-height: 1;
}

.udf-sig-title {
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 4px;
}

.udf-sig-meta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 0.76rem;
  color: #15803d;
}

.udf-p {
  margin-bottom: 8px;
}

.align-left { text-align: left; }
.align-center { text-align: center; }
.align-right { text-align: right; }
.align-justify { text-align: justify; text-justify: inter-word; }

.text-bold { font-weight: bold; }
.text-italic { font-style: italic; }
.text-underline { text-decoration: underline; }
.text-strike { text-decoration: line-through; }

mark.udf-search-highlight {
  background-color: #fde047;
  color: #000;
  padding: 1px 3px;
  border-radius: 2px;
}

mark.udf-search-highlight.active-search-match {
  background-color: #ea580c !important;
  color: #ffffff !important;
  box-shadow: 0 0 0 2px #c2410c;
  border-radius: 2px;
}

/* Preview Table */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  margin: 18px 0;
}

.udf-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11pt;
}

.udf-table td,
.udf-table th {
  border: 1px solid #888888;
  padding: 6px 10px;
  vertical-align: top;
}

.udf-table-p {
  margin-bottom: 2px;
}

/* =========================================================
   OKUMA MODU KAĞIT TEMALARI (SEPIA & NIGHT)
   ========================================================= */
.modal-body:has(.udf-document-sheet[data-read-theme="sepia"]) {
  background: #d8cca8;
}

.udf-document-sheet[data-read-theme="sepia"] {
  background: #fbf0d9 !important;
  color: #3b2816 !important;
  box-shadow: 0 10px 30px rgba(78, 52, 28, 0.15) !important;
}

.udf-document-sheet[data-read-theme="sepia"] .udf-signature-badge {
  background: #f3e5c0;
  border-color: #d6be8b;
  color: #5c3c13;
}

.udf-document-sheet[data-read-theme="sepia"] .udf-table td {
  border-color: #c9b493;
}

.modal-body:has(.udf-document-sheet[data-read-theme="night"]) {
  background: #030712;
}

.udf-document-sheet[data-read-theme="night"] {
  background: #111827 !important;
  color: #f1f5f9 !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6) !important;
}

.udf-document-sheet[data-read-theme="night"] span {
  color: inherit !important;
}

.udf-document-sheet[data-read-theme="night"] .udf-signature-badge {
  background: #064e3b;
  border-color: #059669;
  color: #a7f3d0;
}

.udf-document-sheet[data-read-theme="night"] .udf-sig-meta {
  color: #6ee7b7;
}

.udf-document-sheet[data-read-theme="night"] .udf-table td {
  border-color: #374151;
  color: #f1f5f9;
}

/* =========================================================
   GÜNLÜK İŞLEM KOTASI & SİSTEM ÖZETİ STİLLERİ
   ========================================================= */
.quota-badge-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 5px 12px;
  border-radius: var(--radius-md);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.quota-badge-btn:hover {
  background: var(--bg-subtle);
  border-color: var(--border-strong);
  color: var(--text-main);
}

.quota-icon-svg {
  color: var(--primary-accent);
}

.quota-pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--success);
}

.quota-badge-btn.warning .quota-pill-dot {
  background-color: var(--warning);
}

.quota-badge-btn.danger .quota-pill-dot {
  background-color: var(--danger);
}

/* Çalışma Alanı İçi Kota Çubuğu */
.quota-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  font-size: 0.79rem;
  color: var(--text-muted);
}

.quota-status-bar.warning {
  border-color: var(--warning-border);
  background: var(--warning-light);
}

.quota-status-bar.danger {
  border-color: var(--danger-border);
  background: var(--danger-light);
}

.quota-status-info {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
}

.quota-status-icon {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary-accent);
  display: inline-block;
  flex-shrink: 0;
}

.quota-status-bar.warning .quota-status-icon {
  background: var(--warning);
}

.quota-status-bar.danger .quota-status-icon {
  background: var(--danger);
}

.quota-status-details {
  display: flex;
  align-items: center;
  gap: 12px;
}

.quota-reset-hint {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.quota-view-details-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--primary);
  padding: 3px 10px;
  border-radius: var(--radius-xs);
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.quota-view-details-btn:hover {
  background: var(--primary-light);
  border-color: var(--primary-border);
}

/* Kota Modalları */
dialog.quota-modal,
dialog.limit-exceeded-modal {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  max-width: 640px;
  width: 94vw;
  margin: auto;
  padding: 0;
  background: var(--bg-surface);
  overflow: hidden;
}

dialog.quota-modal[open],
dialog.limit-exceeded-modal[open] {
  display: flex;
  flex-direction: column;
}

.quota-modal-body,
.limit-exceeded-body {
  padding: 20px 22px;
  overflow-y: auto;
  max-height: 76vh;
}

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

.quota-section-header h4 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
}

.quota-reset-timer-box {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  padding: 3px 10px;
  border-radius: var(--radius-xs);
}

.quota-reset-timer-box strong {
  color: var(--primary);
  font-family: monospace;
}

.quota-cards-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.quota-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 14px;
}

.quota-card.quota-card-danger {
  border-color: var(--danger-border);
  background: var(--danger-light);
}

.quota-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.quota-card-title {
  font-weight: 600;
  font-size: 0.84rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.quota-card-id {
  font-size: 0.68rem;
  font-family: monospace;
  color: var(--text-muted);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 1px 6px;
  border-radius: 3px;
}

.quota-status-pill {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-xs);
}

.quota-status-pill.pill-success {
  background: var(--success-light);
  color: var(--success);
  border: 1px solid var(--success-border);
}

.quota-status-pill.pill-warning {
  background: var(--warning-light);
  color: var(--warning);
  border: 1px solid var(--warning-border);
}

.quota-status-pill.pill-danger {
  background: var(--danger-light);
  color: var(--danger);
  border: 1px solid var(--danger-border);
}

.quota-progress-track {
  height: 6px;
  background: var(--border-color);
  border-radius: 3px;
  overflow: hidden;
}

.quota-progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease;
  background: var(--primary-accent);
}

.quota-progress-fill.warning-fill {
  background: var(--warning);
}

.quota-progress-fill.danger-fill {
  background: var(--danger);
}

.quota-card-footer {
  display: flex;
  justify-content: space-between;
  font-size: 0.71rem;
  color: var(--text-muted);
  margin-top: 5px;
}

.quota-info-notice {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: 0.77rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 14px;
}

/* Teknik Oturum & Cihaz Özeti Accordion */
.fp-details-accordion {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  overflow: hidden;
}

.fp-accordion-summary {
  list-style: none;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}

.fp-accordion-summary::-webkit-details-marker {
  display: none;
}

.fp-badge {
  background: var(--bg-surface);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  padding: 2px 8px;
  border-radius: var(--radius-xs);
  font-size: 0.7rem;
  font-weight: 600;
  font-family: monospace;
}

.fp-card {
  padding: 12px 14px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-surface);
}

.fp-hash-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xs);
  padding: 5px 10px;
  margin-bottom: 10px;
}

.fp-hash-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.fp-hash-text {
  flex: 1;
  font-family: monospace;
  font-size: 0.7rem;
  color: var(--text-main);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fp-details-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}

.fp-detail-item {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xs);
  padding: 6px 10px;
  font-size: 0.71rem;
}

.fp-detail-item .fp-detail-label {
  display: block;
  color: var(--text-muted);
  font-size: 0.67rem;
  margin-bottom: 2px;
}

.fp-detail-item .fp-detail-val {
  color: var(--text-main);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
}

.fp-dev-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--border-color);
}

/* Limit Exceeded Modal Stilleri */
.modal-header-danger {
  border-bottom-color: var(--danger-border);
  background: var(--danger-light);
}

.modal-header-danger .modal-doc-icon {
  background: var(--bg-surface);
  color: var(--danger);
  border-color: var(--danger-border);
}

.modal-header-danger .modal-title {
  color: var(--danger);
}

.limit-exceeded-body {
  text-align: center;
  padding: 24px;
}

.limit-exceeded-body h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
}

.limit-exceeded-body p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.countdown-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 16px;
}

.countdown-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.countdown-value {
  font-size: 1.6rem;
  font-weight: 800;
  font-family: monospace;
  color: var(--primary);
  letter-spacing: 2px;
}

.countdown-subtext {
  font-size: 0.71rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.limit-alternative-box {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  text-align: left;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.limit-alternative-box strong {
  display: block;
  color: var(--text-main);
  margin-bottom: 6px;
}

.limit-alternative-box ul {
  margin: 0;
  padding-left: 18px;
}

.limit-alternative-box li {
  margin-bottom: 4px;
}

/* =========================================================
   FOOTER
   ========================================================= */
.app-footer {
  border-top: 1px solid var(--border-color);
  padding: 28px 0;
  background: var(--bg-surface);
  margin-top: auto;
}

.footer-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: center;
}

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

@media (max-width: 720px) {
  .footer-top {
    justify-content: center;
  }
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
  color: var(--text-main);
}

.logo-icon-sm {
  width: 26px;
  height: 26px;
  background: #0f172a;
  color: #fff;
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-tags {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.footer-disclaimer {
  font-size: 0.75rem;
  color: var(--text-subtle);
  text-align: left;
  line-height: 1.5;
  padding-top: 8px;
  border-top: 1px solid var(--border-color);
}

/* =========================================================
   TOAST NOTIFICATIONS
   ========================================================= */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 999;
}

.toast {
  background: #0f172a;
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 11px 16px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 0.82rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideIn 0.2s ease forwards;
  max-width: 380px;
}

.toast-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3b82f6;
  flex-shrink: 0;
}

.toast-success .toast-dot { background: #10b981; }
.toast-warning .toast-dot { background: #f59e0b; }
.toast-danger .toast-dot { background: #ef4444; }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* =========================================================
   PRINT STYLES FOR DIRECT A4 PDF
   ========================================================= */
@media print {
  body * {
    visibility: hidden;
  }

  #previewModal,
  #previewModal * {
    visibility: visible;
  }

  dialog.preview-modal {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    border: none;
    box-shadow: none;
    background: #fff;
  }

  .modal-header,
  .modal-toolbar,
  .modal-stats-drawer,
  .modal-footer {
    display: none !important;
  }

  .modal-body {
    padding: 0;
    background: #fff;
    overflow: visible;
  }

  .udf-document-sheet {
    box-shadow: none !important;
    padding: 0 !important;
    max-width: 100% !important;
    min-height: auto !important;
    transform: none !important;
  }

  @page {
    size: A4;
    margin: 20mm;
  }
}

/* =========================================================
   RESPONSIVE DESIGN
   ========================================================= */
@media (max-width: 768px) {
  .hero-title { font-size: 1.65rem; }
  .workspace-shell { padding: 14px; }
  .dropzone-container { padding: 28px 16px; }
  .file-card { flex-direction: column; align-items: flex-start; }
  .file-actions { width: 100%; justify-content: flex-end; }
  .udf-document-sheet { padding: 32px 24px; }
  .queue-header { flex-direction: column; align-items: flex-start; }
  .queue-tools { width: 100%; justify-content: space-between; }
  .queue-search-box input { width: 100%; }
  .fp-details-grid { grid-template-columns: 1fr; }
}

/* =========================================================
   DEMO DUYURU ÇUBUĞU & LİSANS / SÜRÜM PLANLARI (PRICING)
   ========================================================= */
.demo-announcement-bar {
  background: #0f172a;
  color: #e2e8f0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 7px 0;
  font-size: 0.77rem;
}

[data-theme="dark"] .demo-announcement-bar {
  background: #172554;
  border-bottom-color: rgba(59, 130, 246, 0.25);
}

.demo-announcement-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.demo-announcement-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.demo-pill-tag {
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.4);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 2px 7px;
  border-radius: var(--radius-xs);
  text-transform: uppercase;
}

.demo-announcement-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #93c5fd;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.15s ease;
}

.demo-announcement-link:hover {
  color: #ffffff;
}

.edition-badge-demo {
  background: var(--warning-light) !important;
  color: var(--warning) !important;
  border: 1px solid var(--warning-border) !important;
}

.pro-inline-note {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.pro-inline-link {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.pro-inline-link:hover {
  text-decoration: underline;
}

/* Sürüm ve Lisanslama Kartları */
.pricing-section {
  margin-bottom: 56px;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: stretch;
}

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

.pricing-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-xs);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.pricing-card-featured {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  position: relative;
}

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

.pricing-plan-name {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text-main);
}

.pricing-status-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.status-active-badge {
  background: var(--success-light);
  color: var(--success);
  border: 1px solid var(--success-border);
}

.status-soon-badge {
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid var(--primary-border);
}

.pricing-price-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 10px;
}

.pricing-price-main {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.pricing-price-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.pricing-plan-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.pricing-feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 22px;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.pricing-feature-list li {
  position: relative;
  padding-left: 18px;
  line-height: 1.45;
}

.pricing-feature-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--primary-accent);
  font-weight: 700;
}

.pricing-card-footer {
  margin-top: auto;
}

.pricing-btn {
  width: 100%;
}
