/* Modern Sleek UI System (Dark & Light Mode Engine) */
@import url('https://fonts.googleapis.com/css2?family=Alex+Brush&family=Allura&family=Bebas+Neue&family=Caveat:wght@400..700&family=Cinzel:wght@400..900&family=Dancing+Script:wght@400..700&family=Great+Vibes&family=Inter:ital,wght@0,100..900;1,100..900&family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&family=Lora:ital,wght@0,400..700;1,400..700&family=Merriweather:ital,wght@0,300..900;1,300..900&family=Montserrat:ital,wght@0,100..900;1,100..900&family=Oswald:wght@200..700&family=Outfit:wght@100..900&family=Pacifico&family=Parisienne&family=Playfair+Display:ital,wght@0,400..900;1,400..900&family=Plus+Jakarta+Sans:ital,wght@0,200..800;1,200..800&family=Poppins:ital,wght@0,100..900;1,100..900&family=Roboto:ital,wght@0,100..900;1,100..900&family=Sacramento&family=Satisfy&display=swap');

/* Built-in Permanent Custom Fonts */
@font-face {
  font-family: 'Edwardian Script ITC';
  src: url('./fonts/EdwardianScriptITCTr.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'EdwardianScriptITCTr';
  src: url('./fonts/EdwardianScriptITCTr.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Dark Theme (Default) */
  --bg-dark: #090d16;
  --bg-header: rgba(15, 23, 42, 0.95);
  --bg-panel: #0f172a;
  --bg-canvas: #0b0f19;
  --bg-toolbar: #1e293b;
  --bg-card: rgba(30, 41, 59, 0.7);
  --bg-dropzone: rgba(0, 0, 0, 0.2);
  --bg-input: #0f172a;
  --bg-tabs: #090d16;
  --bg-btn-sec: #334155;
  --text-sec-btn: #f8fafc;
  --border-color: rgba(255, 255, 255, 0.12);
  --border-focus: #3b82f6;

  --accent-primary: #3b82f6;
  --accent-primary-hover: #2563eb;
  --accent-gradient: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  --accent-success: #10b981;
  --accent-warning: #f59e0b;
  --accent-danger: #ef4444;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --brand-title-fill: transparent;
  --brand-title-bg: linear-gradient(180deg, #ffffff 0%, #cbd5e1 100%);

  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 25px rgba(59, 130, 246, 0.25);
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;
  
  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
}

html[data-theme="light"], [data-theme="light"] {
  /* Light / White Theme Overrides */
  --bg-dark: #cbd5e1;
  --bg-header: #ffffff;
  --bg-panel: #ffffff;
  --bg-canvas: #94a3b8;
  --bg-toolbar: #ffffff;
  --bg-card: #f8fafc;
  --bg-dropzone: #ffffff;
  --bg-input: #ffffff;
  --bg-tabs: #e2e8f0;
  --bg-btn-sec: #e2e8f0;
  --text-sec-btn: #0f172a;
  --border-color: #cbd5e1;
  --border-focus: #2563eb;

  --text-main: #0f172a;
  --text-muted: #334155;
  --text-dim: #64748b;

  --brand-title-fill: #0f172a;
  --brand-title-bg: none;

  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.15);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* Header */
.app-header {
  height: 64px;
  background: var(--bg-header);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: background 0.25s ease, border-color 0.25s ease;
}

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

.brand-logo {
  width: 38px;
  height: 38px;
  background: var(--accent-gradient);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 20px;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.brand-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.5px;
  background: var(--brand-title-bg);
  -webkit-background-clip: text;
  -webkit-text-fill-color: var(--brand-title-fill);
  color: var(--text-main);
}

.brand-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

.header-btn-group {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 3px;
}

html[data-theme="light"] .header-btn-group {
  background: rgba(0, 0, 0, 0.03);
}

.header-btn-group .btn-sm {
  padding: 4px 8px;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 6px;
}

.header-btn-group button,
.header-actions button,
.dropdown-menu-item,
#gdriveHeaderPill {
  pointer-events: auto !important;
  cursor: pointer !important;
  user-select: none !important;
}

.header-btn-group button *,
.header-actions button *,
.dropdown-menu-item * {
  pointer-events: none !important;
}

/* ==========================================================================
 * 🔽 HEADER ACTIONS DROPDOWN MENUS
 * ========================================================================== */
.header-dropdown {
  position: relative;
  display: inline-flex;
}

.header-dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  cursor: pointer;
  padding: 5px 12px;
  font-size: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.header-dropdown-trigger:hover,
.header-dropdown.active .header-dropdown-trigger {
  background: var(--bg-secondary);
  border-color: var(--accent-primary);
  color: #ffffff;
}

.header-dropdown-trigger .dropdown-chevron {
  width: 13px;
  height: 13px;
  transition: transform 0.2s ease;
  opacity: 0.7;
}

.header-dropdown.active .header-dropdown-trigger .dropdown-chevron {
  transform: rotate(180deg);
}

.header-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 290px;
  background: rgba(15, 23, 42, 0.96);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.05);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 3px;
  animation: dropdownSlideDown 0.18s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

html[data-theme="light"] .header-dropdown-menu {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(0, 0, 0, 0.12);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
}

@keyframes dropdownSlideDown {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.dropdown-menu-header {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.6px;
  color: #94a3b8;
  padding: 6px 10px 4px 10px;
}

.dropdown-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  background: transparent;
  border: none;
  color: #f1f5f9;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
  width: 100%;
}

html[data-theme="light"] .dropdown-menu-item {
  color: #1e293b;
}

.dropdown-menu-item:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(2px);
}

html[data-theme="light"] .dropdown-menu-item:hover {
  background: rgba(0, 0, 0, 0.05);
}

.dropdown-menu-item.danger:hover {
  background: rgba(239, 68, 68, 0.15);
}

.dropdown-menu-item i,
.dropdown-menu-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.dropdown-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dropdown-item-title {
  font-size: 12.5px;
  font-weight: 600;
  color: #f8fafc;
  line-height: 1.2;
}

html[data-theme="light"] .dropdown-item-title {
  color: #0f172a;
}

.dropdown-item-desc {
  font-size: 10.5px;
  color: #94a3b8;
  line-height: 1.2;
}

.dropdown-menu-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 4px 6px;
}

html[data-theme="light"] .dropdown-menu-divider {
  background: rgba(0, 0, 0, 0.08);
}

/* Layout Main Container */
.app-container {
  display: grid;
  grid-template-columns: 420px 1fr;
  height: calc(100vh - 64px);
  overflow: hidden;
}

/* Sidebar Panel */
.sidebar {
  background: var(--bg-panel);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  transition: background 0.25s ease, border-color 0.25s ease;
}

/* Tab Navigation */
.tabs-header {
  display: flex;
  background: var(--bg-tabs);
  padding: 8px 12px;
  gap: 6px;
  border-bottom: 1px solid var(--border-color);
}

.tab-btn {
  flex: 1;
  padding: 10px 8px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  color: var(--text-main);
  background: rgba(59, 130, 246, 0.1);
}

.tab-btn.active {
  background: var(--accent-gradient);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.tab-btn *,
.btn * {
  pointer-events: none;
}

.tab-content {
  flex: 1 1 0%;
  min-height: 0;
  max-height: 100%;
  overflow-y: auto !important;
  overflow-x: hidden;
  padding: 16px 14px 40px 14px;
  display: none;
  flex-direction: column;
  gap: 12px;
}

.tab-content.active {
  display: flex !important;
}

.tab-content::-webkit-scrollbar {
  width: 7px;
}
.tab-content::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}
.tab-content::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.4);
  border-radius: 4px;
}
.tab-content::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.7);
}

/* Cards & Sections */
.section-card {
  position: relative;
  flex-shrink: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: background 0.25s ease, border-color 0.25s ease;
}



.section-title {
  position: relative;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: space-between;
  letter-spacing: -0.2px;
}



.section-title i {
  color: var(--accent-primary);
}

/* ==========================================================================
   Export Accordion Layout (Tab 3 Dışa Aktar Akordiyon Modülleri)
   ========================================================================== */
.export-accordion-card {
  position: relative;
  flex-shrink: 0;
  background: var(--bg-card, #1e293b);
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.12));
  border-radius: var(--radius-md, 10px);
  padding: 0 !important;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  margin-bottom: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.export-accordion-card:hover {
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}

.export-accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  cursor: pointer;
  user-select: none;
  background: rgba(255, 255, 255, 0.03);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.export-accordion-header:hover {
  background: rgba(255, 255, 255, 0.07);
}

.export-accordion-card.open .export-accordion-header {
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.export-accordion-title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main, #f8fafc);
  letter-spacing: -0.2px;
}

.export-accordion-title i {
  color: var(--accent-primary, #6366f1);
  width: 17px;
  height: 17px;
}

.export-accordion-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.export-accordion-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: #94a3b8;
  transition: transform 0.25s ease, background 0.2s ease, color 0.2s ease;
}

.export-accordion-chevron i {
  width: 16px;
  height: 16px;
}

.export-accordion-card.open .export-accordion-chevron {
  transform: rotate(180deg);
  color: #fff;
  background: rgba(99, 102, 241, 0.35);
}

.export-accordion-body {
  display: none;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  background: transparent;
  animation: accordionBodyFade 0.22s ease-out forwards;
}

.export-accordion-card.open .export-accordion-body {
  display: flex;
}

/* Custom themed headers for blue and green modules */
.export-accordion-card.theme-blue {
  border-color: rgba(59, 130, 246, 0.35);
  background: rgba(59, 130, 246, 0.05);
}

.export-accordion-card.theme-blue .export-accordion-header {
  background: rgba(59, 130, 246, 0.1);
}

.export-accordion-card.theme-blue .export-accordion-header:hover {
  background: rgba(59, 130, 246, 0.18);
}

.export-accordion-card.theme-blue.open .export-accordion-header {
  border-bottom: 1px solid rgba(59, 130, 246, 0.2);
}

.export-accordion-card.theme-blue.open .export-accordion-chevron {
  color: #60a5fa;
  background: rgba(59, 130, 246, 0.25);
}

.export-accordion-card.theme-green {
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.05);
}

.export-accordion-card.theme-green .export-accordion-header {
  background: rgba(16, 185, 129, 0.1);
}

.export-accordion-card.theme-green .export-accordion-header:hover {
  background: rgba(16, 185, 129, 0.18);
}

.export-accordion-card.theme-green.open .export-accordion-header {
  border-bottom: 1px solid rgba(16, 185, 129, 0.2);
}

.export-accordion-card.theme-green.open .export-accordion-chevron {
  color: #34d399;
  background: rgba(16, 185, 129, 0.25);
}

@keyframes accordionBodyFade {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Upload Box */
.upload-dropzone {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  background: var(--bg-dropzone);
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.upload-dropzone:hover, .upload-dropzone.dragover {
  border-color: var(--accent-primary);
  background: rgba(59, 130, 246, 0.08);
}

.upload-icon {
  width: 48px;
  height: 48px;
  background: rgba(59, 130, 246, 0.12);
  color: var(--accent-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.upload-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
}

.upload-sub {
  font-size: 12px;
  color: var(--text-muted);
}

/* Template Select Cards */
.template-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.template-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.template-card:hover, .template-card.active {
  border-color: var(--accent-primary);
  background: rgba(59, 130, 246, 0.15);
  transform: translateY(-2px);
}

.template-card i {
  font-size: 22px;
  color: var(--accent-primary);
}

.template-card span {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-main);
}

/* Data Table Preview */
.excel-table-preview {
  max-height: 160px;
  overflow: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.excel-table-preview table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.excel-table-preview th {
  background: var(--bg-tabs);
  color: var(--text-muted);
  padding: 6px 10px;
  text-align: left;
  position: sticky;
  top: 0;
  font-weight: 600;
}

.excel-table-preview td {
  padding: 6px 10px;
  border-top: 1px solid var(--border-color);
  color: var(--text-main);
  white-space: nowrap;
}

.excel-table-preview tr:hover {
  background: rgba(59, 130, 246, 0.08);
}

/* Field Control Cards */
.fields-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.field-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.2s ease;
}

.field-item:hover, .field-item.active {
  border-color: var(--accent-primary);
  background: rgba(59, 130, 246, 0.12);
}

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

.field-type-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.type-text { background: rgba(59, 130, 246, 0.2); color: #3b82f6; }
.type-static { background: rgba(168, 85, 247, 0.25); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.4); }
.type-qr { background: rgba(16, 185, 129, 0.2); color: #10b981; }
.type-image { background: rgba(245, 158, 11, 0.2); color: #f59e0b; }
.type-barcode { background: rgba(139, 92, 246, 0.2); color: #8b5cf6; }

.field-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}

/* Controls & Inputs */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

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

label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

input[type="text"], input[type="number"], select {
  width: 100%;
  padding: 8px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 13px;
  outline: none;
  transition: all 0.2s ease;
  font-family: inherit;
}

input[type="text"]:focus, input[type="number"]:focus, select:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.ocr-item-card select {
  width: auto;
}

.ocr-item-card input[type="text"].ocr-item-text-input {
  width: 100%;
}

.color-picker-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

input[type="color"] {
  -webkit-appearance: none;
  border: none;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: none;
}

input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

input[type="color"]::-webkit-color-swatch {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

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

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

.btn-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
}

.btn-success:hover {
  opacity: 0.92;
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: var(--accent-danger);
  border-color: rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
  background: var(--accent-danger);
  color: #ffffff;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

/* Interactive Canvas Workspace */
.canvas-area {
  display: flex;
  flex-direction: column;
  background: var(--bg-canvas);
  position: relative;
  height: 100%;
  overflow: hidden;
  transition: background 0.25s ease;
}

.canvas-toolbar {
  height: 52px;
  background: var(--bg-toolbar);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 10;
  transition: background 0.25s ease, border-color 0.25s ease;
}

.record-navigator {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-btn:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.record-counter {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

.canvas-viewport {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow: auto;
  position: relative;
}

.canvas-wrapper {
  position: relative;
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-sm);
  overflow: hidden;
  max-height: 100%;
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  transition: all 0.2s ease;
}

/* Interactive Split Drag & Drop Overlay on Canvas */
.canvas-split-drop-overlay {
  position: absolute;
  inset: 12px;
  z-index: 10000;
  display: flex;
  gap: 16px;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(14px);
  border-radius: 16px;
  padding: 16px;
  pointer-events: none;
  animation: splitDropFadeIn 0.18s ease-out;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85);
}

@keyframes splitDropFadeIn {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

.split-drop-zone {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2.5px dashed rgba(255, 255, 255, 0.2);
  border-radius: 14px;
  padding: 24px;
  text-align: center;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  pointer-events: none;
}

/* Template (Left Zone - Blue/Indigo) */
.drop-zone-template {
  border-color: rgba(59, 130, 246, 0.45);
  background: radial-gradient(circle at center, rgba(59, 130, 246, 0.1) 0%, rgba(15, 23, 42, 0.5) 100%);
}

.drop-zone-template.active-hover {
  border-color: #3b82f6;
  background: radial-gradient(circle at center, rgba(59, 130, 246, 0.3) 0%, rgba(30, 58, 138, 0.6) 100%);
  transform: scale(1.02);
  box-shadow: 0 0 35px rgba(59, 130, 246, 0.5);
}

/* Data Source (Right Zone - Emerald/Green) */
.drop-zone-data {
  border-color: rgba(16, 185, 129, 0.45);
  background: radial-gradient(circle at center, rgba(16, 185, 129, 0.1) 0%, rgba(15, 23, 42, 0.5) 100%);
}

.drop-zone-data.active-hover {
  border-color: #10b981;
  background: radial-gradient(circle at center, rgba(16, 185, 129, 0.3) 0%, rgba(6, 78, 59, 0.6) 100%);
  transform: scale(1.02);
  box-shadow: 0 0 35px rgba(16, 185, 129, 0.5);
}

.split-drop-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.split-drop-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
  transition: transform 0.2s ease;
}

.split-drop-icon.template-icon {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border: 1.5px solid rgba(59, 130, 246, 0.5);
}

.split-drop-icon.data-icon {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1.5px solid rgba(16, 185, 129, 0.5);
}

.split-drop-zone.active-hover .split-drop-icon {
  transform: scale(1.15) rotate(4deg);
}

.split-drop-icon i, .split-drop-icon svg {
  width: 30px;
  height: 30px;
}

.split-drop-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.drop-zone-template .split-drop-title {
  color: #93c5fd;
}

.drop-zone-data .split-drop-title {
  color: #6ee7b7;
}

.split-drop-desc {
  font-size: 13px;
  color: #cbd5e1;
  font-weight: 500;
}

.split-drop-formats {
  font-size: 11px;
  color: #94a3b8;
  background: rgba(0, 0, 0, 0.35);
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 2px;
}

.split-drop-divider {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  background: #1e293b;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.7);
}

.split-drop-divider span {
  font-size: 11px;
  font-weight: 800;
  color: #e2e8f0;
  letter-spacing: 0.05em;
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Canvas Overlay Markers */
.canvas-field-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: auto;
  user-select: none;
}

.field-marker {
  position: absolute;
  transform: translate(-50%, -50%);
  border: 1.5px dashed transparent;
  background: transparent;
  border-radius: 4px;
  pointer-events: auto !important;
  cursor: grab;
  touch-action: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
  box-sizing: border-box;
  z-index: 10 !important;
}

.field-marker:active {
  cursor: grabbing;
}

.field-marker:hover {
  border: 1.5px dashed rgba(59, 130, 246, 0.6);
  background: rgba(59, 130, 246, 0.04);
}

.field-marker.selected {
  border: 2px solid #3b82f6 !important;
  background: rgba(59, 130, 246, 0.08) !important;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3), 0 2px 8px rgba(0, 0, 0, 0.2);
  z-index: 50 !important;
}

/* Override styling indicator on canvas marker */
.field-marker.has-override {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.06);
}

.field-marker.has-override.selected {
  border: 2px solid #f59e0b;
  background: rgba(245, 158, 11, 0.12);
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.35), 0 2px 8px rgba(0, 0, 0, 0.2);
}

.field-marker.has-override.selected::before,
.field-marker.has-override.selected::after {
  background: #f59e0b;
}

/* Interactive Resize Handles on Bounding Box */
.resize-handle {
  position: absolute;
  width: 10px;
  height: 10px;
  background: #ffffff;
  border: 2px solid #3b82f6;
  border-radius: 2px;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.7);
  pointer-events: auto;
  z-index: 100;
  box-sizing: border-box;
  touch-action: none;
  cursor: pointer;
  transition: transform 0.1s ease, background-color 0.1s ease, border-color 0.1s ease;
}

.resize-handle:hover {
  background: #3b82f6;
  border-color: #ffffff;
  transform: scale(1.35);
}

.field-marker.has-override .resize-handle {
  border-color: #f59e0b;
}

.field-marker.has-override .resize-handle:hover {
  background: #f59e0b;
  border-color: #ffffff;
}

/* 8 Resize Handle Positions */
.resize-handle.handle-nw { top: -5px; left: -5px; cursor: nwse-resize; }
.resize-handle.handle-n  { top: -5px; left: calc(50% - 5px); cursor: ns-resize; }
.resize-handle.handle-ne { top: -5px; right: -5px; cursor: nesw-resize; }
.resize-handle.handle-e  { top: calc(50% - 5px); right: -5px; cursor: ew-resize; }
.resize-handle.handle-se { bottom: -5px; right: -5px; cursor: nwse-resize; }
.resize-handle.handle-s  { bottom: -5px; left: calc(50% - 5px); cursor: ns-resize; }
.resize-handle.handle-sw { bottom: -5px; left: -5px; cursor: nesw-resize; }
.resize-handle.handle-w  { top: calc(50% - 5px); left: -5px; cursor: ew-resize; }

.field-marker-label {
  display: none;
}

/* Marquee Drag Selection Box */
.marquee-selection-box {
  position: absolute;
  border: 1.5px dashed #3b82f6;
  background: rgba(59, 130, 246, 0.18);
  border-radius: 4px;
  pointer-events: none;
  z-index: 120;
  display: none;
  box-sizing: border-box;
}

/* Multi-selected items in list */
.field-item.multi-selected {
  border-color: rgba(59, 130, 246, 0.6) !important;
  background: rgba(59, 130, 246, 0.12) !important;
}

.export-progress {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(8px);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  z-index: 200;
}

.progress-bar-bg {
  width: 280px;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--accent-gradient);
  transition: width 0.2s ease;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.animated-fade {
  animation: fadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Generic Modal System */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}

.modal-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 24px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  color: var(--text-main);
}

/* Activity Log Item Card */
.activity-log-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 12px;
}

.activity-log-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 13px;
}

.activity-log-time {
  font-size: 10px;
  color: var(--text-dim);
  margin-left: auto;
  white-space: nowrap;
}

/* Firebase Cloud Status & Profile Styles */
@keyframes pulseDot {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.cloud-status-dot.active {
  animation: pulseDot 2s infinite ease-in-out;
}

.profile-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.profile-item-row:hover {
  border-color: var(--accent-primary);
  background: rgba(59, 130, 246, 0.08);
}

.profile-item-row.active {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.12);
  font-weight: bold;
}

/* ==========================================================================
 * ULTRA-PREMIUM MODULE HELP BADGE & USER GUIDE STYLING
 * ========================================================================== */

.module-help-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #60a5fa;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  margin-left: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  vertical-align: middle;
  
  letter-spacing: 0.2px;
}

.module-help-badge:hover {
  background: #3b82f6;
  color: #ffffff;
  border-color: #93c5fd;
  transform: scale(1.04);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.45);
}

.module-help-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.18);
  color: #60a5fa;
  font-size: 10px;
  font-weight: bold;
  cursor: help;
  margin-left: 6px;
  transition: all 0.2s ease;
  border: 1px solid rgba(59, 130, 246, 0.35);
  vertical-align: middle;
}

.module-help-icon:hover {
  background: #3b82f6;
  color: #ffffff;
  transform: scale(1.15);
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.6);
}



.guide-chapter-card {
  background: rgba(30, 41, 59, 0.6);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 14px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.guide-chapter-card:hover {
  border-color: rgba(59, 130, 246, 0.4);
  transform: translateY(-2px);
}

.guide-chapter-title {
  font-size: 14px;
  font-weight: 700;
  color: #60a5fa;
  margin: 0 0 4px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.guide-item-list {
  list-style: none;
  padding: 0;
  margin: 10px 0 0 0;
}

.guide-item-list li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;
  font-size: 12px;
  line-height: 1.55;
  color: #cbd5e1;
}

.guide-item-list li::before {
  content: '▸';
  position: absolute;
  left: 4px;
  color: #10b981;
  font-size: 14px;
}

/* Main Workspace Embedded User Guide View */
.main-guide-view {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  animation: fadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.main-guide-header {
  padding: 14px 20px;
  background: rgba(15, 23, 42, 0.85);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  backdrop-filter: blur(10px);
}

.main-guide-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  color: var(--text-main);
  font-family: 'Inter', system-ui, sans-serif;
}

.guide-badge-pill {
  font-size: 10px;
  font-weight: 800;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 3px 8px;
  border-radius: 20px;
  letter-spacing: 0.5px;
}

.main-guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}

.guide-card-box {
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 18px;
  transition: all 0.2s ease;
}

.guide-card-box:hover {
  border-color: rgba(96, 165, 250, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.guide-card-title {
  font-size: 14px;
  font-weight: 700;
  color: #60a5fa;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.guide-step-item {
  font-size: 12px;
  line-height: 1.6;
  color: #cbd5e1;
  margin-bottom: 8px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

/* Modal System & Overlay Styling */
.export-progress,
.modal-overlay,
.modal-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  z-index: 999999;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-card,
.modal-box {
  background: var(--bg-card, #1e293b);
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.12));
  border-radius: var(--radius-lg, 16px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(59, 130, 246, 0.2);
  padding: 20px;
  max-height: 90vh;
  overflow-y: auto;
  color: var(--text-main, #f8fafc);
}

/* ==========================================================================
 * FLOATING RICH TEXT TOOLBAR & INLINE CANVAS EDITOR
 * ========================================================================== */

.floating-text-toolbar {
  position: absolute;
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(15, 23, 42, 0.98);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(59, 130, 246, 0.5);
  border-radius: 10px;
  padding: 6px 10px;
  box-shadow: 0 12px 30px -5px rgba(0, 0, 0, 0.8), 0 0 20px rgba(59, 130, 246, 0.35);
  pointer-events: auto;
  user-select: none;
  animation: tbFadeIn 0.15s ease-out;
}

.tb-drag-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  color: #64748b;
  padding: 2px 4px;
  border-radius: 4px;
  transition: all 0.15s ease;
  user-select: none;
  touch-action: none;
}

.tb-drag-handle:hover {
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.2);
}

.tb-drag-handle:active {
  cursor: grabbing;
}

.tb-drag-handle i, .tb-drag-handle svg {
  width: 14px;
  height: 14px;
}

@keyframes tbFadeIn {
  from { opacity: 0; transform: translate(-50%, -90%); }
  to { opacity: 1; transform: translate(-50%, -100%); }
}

.btn-tb-tool {
  background: transparent;
  border: 1px solid transparent;
  color: #e2e8f0;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.15s ease;
  padding: 0;
}

.btn-tb-tool:hover {
  background: rgba(59, 130, 246, 0.25);
  border-color: rgba(59, 130, 246, 0.5);
  color: #60a5fa;
}

.btn-tb-tool.active {
  background: #3b82f6;
  color: #ffffff;
  border-color: #60a5fa;
}

.btn-tb-tool i, .btn-tb-tool svg {
  width: 14px;
  height: 14px;
}

.tb-btn-done {
  background: rgba(16, 185, 129, 0.25);
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.5);
}

.tb-btn-done:hover {
  background: #10b981;
  color: #ffffff;
}

.tb-divider {
  width: 1px;
  height: 18px;
  background: rgba(255, 255, 255, 0.15);
  margin: 0 3px;
}

.tb-color-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.tb-color-indicator {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-left: 2px;
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.tb-quick-colors {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 0 2px;
}

.tb-color-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.4);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.tb-color-dot:hover {
  transform: scale(1.25);
  border-color: #ffffff;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.5);
}

.tb-fontsize-wrapper {
  display: flex;
  align-items: center;
  gap: 2px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 6px;
  padding: 1px 3px;
}

.tb-size-display {
  font-size: 11px;
  font-weight: 700;
  color: #f8fafc;
  min-width: 20px;
  text-align: center;
}

.tb-size-input {
  font-size: 11.5px;
  font-weight: 700;
  color: #f8fafc;
  width: 38px;
  height: 22px;
  text-align: center;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  padding: 1px 2px;
  outline: none;
  transition: all 0.15s ease;
  -moz-appearance: textfield;
}

.tb-size-input::-webkit-outer-spin-button,
.tb-size-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.tb-size-input:hover {
  border-color: rgba(59, 130, 246, 0.5);
  background: rgba(0, 0, 0, 0.6);
}

.tb-size-input:focus {
  border-color: #3b82f6;
  background: rgba(15, 23, 42, 0.95);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.35);
  color: #60a5fa;
}

/* Inline Canvas Editable Box - 100% In-Place True WYSIWYG */
.inline-canvas-editor {
  position: absolute;
  transform: translate(-50%, -50%);
  outline: 1.5px dashed rgba(59, 130, 246, 0.8) !important;
  box-shadow: none !important;
  background: transparent !important;
  backdrop-filter: none !important;
  border: none !important;
  border-radius: 2px;
  padding: 0 !important;
  margin: 0 !important;
  z-index: 9999;
  min-width: 20px;
  white-space: pre-wrap !important;
  word-break: normal !important;
  overflow-wrap: break-word !important;
  box-sizing: border-box !important;
  caret-color: #3b82f6;
  cursor: text;
  pointer-events: auto;
  line-height: 1.3 !important;
}

.inline-canvas-editor:focus {
  outline: 1.5px dashed #3b82f6 !important;
  background: transparent !important;
}

.inline-canvas-editor ul,
.inline-canvas-editor ol,
.inline-canvas-editor li {
  list-style: none !important;
  list-style-type: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: inline !important;
}

.inline-canvas-editor p,
.inline-canvas-editor div {
  margin: 0 !important;
  padding: 0 !important;
}

.inline-canvas-editor::selection {
  background: rgba(59, 130, 246, 0.25) !important;
}

.inline-canvas-editor *::selection {
  background: rgba(59, 130, 246, 0.25) !important;
}

.tb-fontfamily-wrapper {
  display: flex;
  align-items: center;
}

.tb-font-select {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(59, 130, 246, 0.4);
  border-radius: 6px;
  color: #f8fafc;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 6px;
  outline: none;
  cursor: pointer;
  max-width: 125px;
}

.tb-font-select:hover, .tb-font-select:focus {
  border-color: #60a5fa;
  background: rgba(15, 23, 42, 0.95);
}

.tb-font-select option {
  background: #0f172a;
  color: #f8fafc;
}

/* ==========================================================================
   Publisher Style Multi-Page Template Splitter & Poster Modal Styles
   ========================================================================== */
#modalTemplateSplitter .modal-box {
  animation: modalFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

#posterPreviewBox {
  transition: all 0.2s ease;
  user-select: none;
}

#posterPreviewCanvas {
  transition: transform 0.15s ease;
}

#posterPreviewBox:hover #posterPreviewCanvas {
  transform: scale(1.01);
}

/* Quick Print Choice Modal Card Buttons */
.quick-print-card-btn {
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.quick-print-card-btn:hover {
  transform: translateY(-2px) !important;
  filter: brightness(1.18) !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45) !important;
}

/* ==========================================================================
   Interactive OCR Box & Manual Adjustment Styles
   ========================================================================== */
.ocr-box {
  position: absolute;
  border: 1.5px solid rgba(56, 189, 248, 0.85);
  background: rgba(56, 189, 248, 0.18);
  border-radius: 3px;
  box-sizing: border-box;
  cursor: move;
  pointer-events: auto !important;
  user-select: none;
  transition: background-color 0.1s ease, border-color 0.1s ease;
  z-index: 50 !important;
}

.ocr-box:hover {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.3);
}

.ocr-box.active {
  border: 2px solid #10b981 !important;
  background: rgba(16, 185, 129, 0.25) !important;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.35);
  z-index: 100 !important;
}

.ocr-box-handle {
  position: absolute;
  width: 8px;
  height: 8px;
  background: #ffffff;
  border: 1.5px solid #0284c7;
  border-radius: 2px;
  z-index: 10;
  pointer-events: auto;
}

.ocr-box.active .ocr-box-handle {
  border-color: #059669;
}

.ocr-box-handle.nw { top: -4px; left: -4px; cursor: nwse-resize; }
.ocr-box-handle.ne { top: -4px; right: -4px; cursor: nesw-resize; }
.ocr-box-handle.se { bottom: -4px; right: -4px; cursor: nwse-resize; }
.ocr-box-handle.sw { bottom: -4px; left: -4px; cursor: nesw-resize; }

.ocr-drawing-rect {
  position: absolute;
  border: 2px dashed #38bdf8;
  background: rgba(56, 189, 248, 0.25);
  pointer-events: none;
  border-radius: 2px;
  z-index: 100;
}

/* ==========================================================================
   Dashed Guide Lines (Kılavuz Çizgileri - Çıktılarda Asla Görünmez)
   ========================================================================== */

/* OCR Modal Guidelines */
.ocr-guideline-h {
  position: absolute;
  left: 0;
  width: 100%;
  height: 0;
  border-top: 1.8px dashed #f59e0b;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.95));
  pointer-events: none !important;
  z-index: 2 !important;
  opacity: 0.9;
  transition: opacity 0.15s ease, border-color 0.15s ease;
}

.ocr-guideline-h::before {
  content: '🖼️ Şablon';
  position: absolute;
  right: 6px;
  top: -8px;
  font-size: 8px;
  font-weight: 800;
  color: #fde68a;
  background: rgba(180, 83, 9, 0.85);
  border: 1px solid rgba(245, 158, 11, 0.6);
  padding: 0 4px;
  border-radius: 3px;
  line-height: 11px;
  pointer-events: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  letter-spacing: 0.2px;
}

.ocr-guideline-h.active {
  border-top: 2px dashed #10b981 !important;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.95)) drop-shadow(0 0 4px rgba(16, 185, 129, 0.8)) !important;
  opacity: 1 !important;
  z-index: 3 !important;
}

.ocr-guideline-h.active::before {
  content: '✓ Seçili';
  background: rgba(5, 150, 105, 0.9);
  border-color: rgba(16, 185, 129, 0.8);
  color: #a7f3d0;
}

.ocr-guideline-v {
  position: absolute;
  top: 0;
  height: 100%;
  width: 0;
  border-left: 1.8px dashed #38bdf8;
  filter: drop-shadow(1px 0 2px rgba(0, 0, 0, 0.95));
  pointer-events: none !important;
  z-index: 2 !important;
  opacity: 0.85;
  transition: opacity 0.15s ease, border-color 0.15s ease;
}

.ocr-guideline-v.active {
  border-left: 2px dashed #10b981 !important;
  filter: drop-shadow(1px 0 3px rgba(0, 0, 0, 0.95)) drop-shadow(0 0 4px rgba(16, 185, 129, 0.8)) !important;
  opacity: 1 !important;
  z-index: 3 !important;
}

/* Canvas Overlay Guidelines */
.canvas-guideline-h {
  position: absolute;
  left: 0;
  width: 100%;
  height: 0;
  border-top: 1.5px dashed #0284c7;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.95));
  pointer-events: none !important;
  z-index: 1 !important;
  opacity: 0.85;
}

/* Şablondaki Orijinal Yazı Kılavuzları (Belirgin Kehribar/Turuncu Kesikli) */
.canvas-guideline-h.template-line {
  border-top: 1.8px dashed #f59e0b !important;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.95)) drop-shadow(0 0 2px rgba(245, 158, 11, 0.5)) !important;
  opacity: 0.95 !important;
}

.canvas-guideline-h.template-line::before {
  content: '🖼️ Şablon';
  position: absolute;
  right: 6px;
  top: -8px;
  font-size: 8px;
  font-weight: 800;
  color: #fde68a;
  background: rgba(180, 83, 9, 0.9);
  border: 1px solid rgba(245, 158, 11, 0.7);
  padding: 0 4px;
  border-radius: 3px;
  line-height: 11px;
  pointer-events: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  letter-spacing: 0.2px;
}

/* Dinamik / Seçili Alanların Kılavuzları (Canlı Zümrüt Yeşili) */
.canvas-guideline-h.active {
  border-top: 2px dashed #10b981 !important;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.95)) drop-shadow(0 0 4px rgba(16, 185, 129, 0.8)) !important;
  opacity: 1 !important;
  z-index: 2 !important;
}

.canvas-guideline-h.active::before {
  content: '⚡ Dinamik';
  position: absolute;
  left: 6px;
  top: -8px;
  font-size: 8px;
  font-weight: 800;
  color: #a7f3d0;
  background: rgba(5, 150, 105, 0.9);
  border: 1px solid rgba(16, 185, 129, 0.7);
  padding: 0 4px;
  border-radius: 3px;
  line-height: 11px;
  pointer-events: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  letter-spacing: 0.2px;
}

.canvas-guideline-v {
  position: absolute;
  top: 0;
  height: 100%;
  width: 0;
  border-left: 1.5px dashed #0284c7;
  filter: drop-shadow(1px 0 1px rgba(0, 0, 0, 0.95));
  pointer-events: none !important;
  z-index: 1 !important;
  opacity: 0.85;
}

.canvas-guideline-v.active {
  border-left: 2px dashed #10b981 !important;
  filter: drop-shadow(1px 0 3px rgba(0, 0, 0, 0.95)) drop-shadow(0 0 4px rgba(16, 185, 129, 0.8)) !important;
  opacity: 1 !important;
  z-index: 2 !important;
}

/* Canvas Resize Preset Buttons */
.preset-size-btn {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.preset-size-btn:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.25);
}

.preset-size-btn:active {
  transform: translateY(0);
}

/* ==========================================================================
   Excel Formatter & Print Table Styler System (Authentic Clean Excel Grid)
   ========================================================================== */
.excel-formatter-sheet {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
  border-radius: 3px;
  position: relative;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, width 0.2s ease, min-height 0.2s ease;
  overflow: visible;
  border: 1px solid #cbd5e1;
}

/* Authentic Excel Formatter Table */
.excel-formatter-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Calibri, Arial, sans-serif;
  color: #0f172a;
  border: 1px solid #94a3b8;
}

.excel-formatter-table th {
  background: #f1f5f9;
  color: #1e293b;
  border: 1px solid #cbd5e1;
  font-weight: 700;
  vertical-align: middle;
  padding: 6px 8px;
  overflow: visible;
  word-break: normal;
  overflow-wrap: break-word;
  word-wrap: break-word;
  white-space: normal;
  box-sizing: border-box;
  text-align: left;
  line-height: 1.35;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.excel-formatter-table td {
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #cbd5e1;
  vertical-align: middle;
  padding: 6px 8px;
  overflow: visible;
  word-break: normal;
  overflow-wrap: break-word;
  word-wrap: break-word;
  white-space: normal;
  box-sizing: border-box;
  text-align: left;
  line-height: 1.35;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.excel-formatter-table tr:hover td {
  background: #f8fafc;
}

.excel-formatter-table td.excel-index-col,
.excel-formatter-table th.excel-index-col {
  background: #f8fafc;
  color: #64748b !important;
  text-align: center !important;
  font-weight: 600;
  border: 1px solid #cbd5e1 !important;
  width: 40px;
}

/* Interactive Column Drag Resizer on Preview Table */
.excel-formatter-table th {
  position: relative;
}

.excel-col-resizer {
  position: absolute;
  top: 0;
  right: -3px;
  width: 8px;
  bottom: 0;
  cursor: col-resize;
  user-select: none;
  touch-action: none;
  z-index: 15;
  background: transparent;
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.excel-col-resizer::after {
  content: '';
  position: absolute;
  top: 2px;
  bottom: 2px;
  right: 3px;
  width: 2px;
  background: rgba(16, 185, 129, 0.2);
  border-radius: 1px;
}

.excel-col-resizer:hover,
.excel-col-resizer.is-resizing {
  background: rgba(16, 185, 129, 0.35);
}

.excel-col-resizer:hover::after,
.excel-col-resizer.is-resizing::after {
  background: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.8);
}

/* Column Width Item in Sidebar */
.excel-col-width-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 11px;
  color: #cbd5e1;
}

.excel-col-width-item:hover {
  border-color: rgba(16, 185, 129, 0.3);
  background: rgba(15, 23, 42, 0.75);
}

/* --- Excel Formatter Rulers & Virtual Paper Stage --- */
.excel-top-ruler-row {
  display: grid;
  grid-template-columns: 36px 1fr;
  margin-bottom: 3px;
  user-select: none;
}

.excel-page-unit {
  margin-bottom: 32px;
  display: flex;
  flex-direction: column;
}

.excel-page-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  color: #34d399;
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 4px;
}

.excel-page-row {
  display: grid;
  grid-template-columns: 36px 1fr;
}

.excel-ruler-x {
  position: relative;
  height: 24px;
  border-bottom: 1px solid #cbd5e1;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  color: #0d9488;
  background: #f8fafc;
  border-radius: 4px 4px 0 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.excel-ruler-y {
  position: relative;
  width: 36px;
  border-right: 1px solid #cbd5e1;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  color: #0d9488;
  background: #f8fafc;
  border-radius: 4px 0 0 4px;
  box-shadow: 1px 0 3px rgba(0,0,0,0.06);
}

.excel-ruler-x .tick,
.excel-ruler-y .tick {
  position: absolute;
  white-space: nowrap;
  user-select: none;
  font-weight: 600;
}

.excel-ruler-x .tick {
  top: 4px;
  transform: translateX(-50%);
}

.excel-ruler-y .tick {
  right: 4px;
  transform: translateY(-50%);
}

.excel-col-handle {
  position: absolute;
  top: 0;
  width: 8px;
  height: 100%;
  margin-left: -4px;
  cursor: col-resize;
  z-index: 15;
  transition: background-color 0.15s;
}

.excel-col-handle:hover,
.excel-col-handle.dragging {
  background: #f59e0b;
  opacity: 0.65;
}

.excel-row-handle {
  position: absolute;
  left: 0;
  width: 100%;
  height: 8px;
  margin-top: -4px;
  cursor: row-resize;
  z-index: 15;
  transition: background-color 0.15s;
}

.excel-row-handle:hover,
.excel-row-handle.dragging {
  background: #f59e0b;
  opacity: 0.65;
}

.excel-row-handle .tick-label {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  font-weight: 600;
}

.excel-preview-page {
  position: relative;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.5);
  border-radius: 2px;
  box-sizing: border-box;
}

.excel-preview-margin-box {
  position: absolute;
  border: 1.5px dashed #f59e0b;
  pointer-events: none;
  z-index: 10;
  box-sizing: border-box;
}

.excel-preview-grid {
  position: absolute;
  display: grid;
  box-sizing: border-box;
  overflow: hidden;
}

.excel-preview-cell {
  border-right: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: flex-start;
  padding: 5px 8px;
  color: #1e293b;
  overflow: hidden;
  white-space: pre-line;
  word-break: break-word;
  line-height: 1.25;
  box-sizing: border-box;
}

.excel-preview-cell.head {
  background: rgba(16, 185, 129, 0.14);
  font-weight: 700;
  color: #065f46;
  border-bottom: 1.5px solid #10b981;
}

.excel-preview-legend {
  max-width: 900px;
  width: 100%;
  margin-top: 14px;
  display: flex;
  gap: 18px;
  font-size: 11.5px;
  color: #94a3b8;
  background: rgba(15, 23, 42, 0.6);
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  flex-wrap: wrap;
}

.excel-preview-legend b {
  color: #f8fafc;
}

/* ==========================================================================
 * 🎞️ FILMSTRIP CAROUSEL & QUICK RECORD SWITCHER (BOTTOM DOCK)
 * ========================================================================== */
.filmstrip-container {
  width: 100%;
  flex-shrink: 0;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px 18px;
  box-sizing: border-box;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.45);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  gap: 6px;
  user-select: none;
  z-index: 20;
}

.filmstrip-container.collapsed .filmstrip-track {
  display: none !important;
}

.filmstrip-container.collapsed {
  padding: 6px 18px;
}

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

.filmstrip-title {
  font-size: 12px;
  font-weight: 700;
  color: #34d399;
  display: flex;
  align-items: center;
  gap: 6px;
}

.filmstrip-badge {
  font-size: 10px;
  font-weight: 600;
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 1px 7px;
  border-radius: 10px;
}

.filmstrip-search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.filmstrip-search-icon {
  position: absolute;
  left: 7px;
  font-size: 10px;
  color: #64748b;
  pointer-events: none;
}

.filmstrip-search-box input {
  padding: 4px 8px 4px 22px;
  font-size: 11px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f8fafc;
  width: 140px;
  transition: all 0.2s ease;
}

.filmstrip-search-box input:focus {
  outline: none;
  border-color: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
  width: 180px;
}

.filmstrip-track {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 2px 8px 2px;
  scroll-behavior: smooth;
}

.filmstrip-track::-webkit-scrollbar {
  height: 6px;
}

.filmstrip-track::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 3px;
}

.filmstrip-track::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

.filmstrip-track::-webkit-scrollbar-thumb:hover {
  background: rgba(16, 185, 129, 0.5);
}

.filmstrip-card {
  flex: 0 0 auto;
  width: 100px;
  background: rgba(30, 41, 59, 0.7);
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  box-sizing: border-box;
}

.filmstrip-card:hover {
  background: rgba(51, 65, 85, 0.85);
  border-color: rgba(56, 189, 248, 0.5);
  transform: translateY(-2px);
}

.filmstrip-card.active {
  background: rgba(16, 185, 129, 0.14);
  border-color: #10b981;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
  transform: translateY(-3px);
}

.filmstrip-card-thumb {
  width: 100%;
  height: 58px;
  background: rgba(15, 23, 42, 0.9);
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.filmstrip-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.filmstrip-card-thumb .thumb-placeholder {
  font-size: 20px;
  color: #64748b;
}

.filmstrip-card-info {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}

.filmstrip-card-index {
  font-size: 9px;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.5px;
}

.filmstrip-card.active .filmstrip-card-index {
  color: #34d399;
}

.filmstrip-card-name {
  font-size: 10.5px;
  font-weight: 600;
  color: #f1f5f9;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  width: 100%;
}

/* ==========================================================================
 * 📄 PDF BİRLEŞTİRME & DÜZENLEME MODÜLÜ STİLLERİ (PDF MERGER ENGINE)
 * ========================================================================== */
.pdf-page-card {
  position: relative;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
  cursor: grab;
  user-select: none;
}

.pdf-page-card:active {
  cursor: grabbing;
}

.pdf-page-card:hover {
  border-color: rgba(168, 85, 247, 0.6);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(168, 85, 247, 0.25);
}

.pdf-page-card.dragging {
  opacity: 0.35;
  border: 2px dashed #c084fc !important;
  transform: scale(0.96);
  box-shadow: none;
}

.pdf-page-card.drag-over {
  border-color: #a855f7 !important;
  background: rgba(168, 85, 247, 0.2) !important;
  box-shadow: 0 0 24px rgba(168, 85, 247, 0.7) !important;
  transform: scale(1.04) translateY(-2px);
}

/* Duplex Padding Blank Page Card */
.pdf-page-card.duplex-card {
  background: rgba(14, 165, 233, 0.08);
  border: 1.5px dashed rgba(56, 189, 248, 0.45);
}

.pdf-page-card.duplex-card:hover {
  border-color: #38bdf8;
  box-shadow: 0 12px 32px rgba(14, 165, 233, 0.3);
}

.pdf-page-card.duplex-card .pdf-page-badge-num {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #e0f2fe;
}

.pdf-page-card.duplex-card .pdf-page-thumb-wrapper {
  background: linear-gradient(135deg, #f8fafc 0%, #f0f9ff 100%);
  border: 1.5px dashed rgba(14, 165, 233, 0.35);
}

/* Blank Custom Page Card */
.pdf-page-card.blank-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px dashed rgba(255, 255, 255, 0.2);
}

.pdf-page-card-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  font-weight: 700;
  gap: 4px;
}

.pdf-page-badge-num {
  background: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%);
  color: #ffffff;
  padding: 2px 7px;
  border-radius: 5px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  box-shadow: 0 2px 6px rgba(168, 85, 247, 0.4);
}

.pdf-page-badge-file {
  color: #94a3b8;
  font-size: 9.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 110px;
}

.pdf-page-thumb-wrapper {
  position: relative;
  width: 100%;
  height: 200px;
  background: #ffffff;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.pdf-page-card.thumb-small .pdf-page-thumb-wrapper {
  height: 140px;
}

.pdf-page-card.thumb-large .pdf-page-thumb-wrapper {
  height: 260px;
}

.pdf-page-thumb-canvas,
.pdf-page-thumb-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.25s ease;
  border-radius: 3px;
}

.pdf-page-card-actions {
  position: absolute;
  top: 36px;
  right: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  opacity: 0;
  transform: translateX(6px);
  transition: all 0.2s ease;
  z-index: 10;
}

.pdf-page-card:hover .pdf-page-card-actions {
  opacity: 1;
  transform: translateX(0);
}

.pdf-page-action-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
  transition: all 0.15s ease;
}

.pdf-page-action-btn:hover {
  background: #a855f7;
  color: #ffffff;
  border-color: #c084fc;
  transform: scale(1.12);
}

.pdf-page-action-btn.danger:hover {
  background: #ef4444;
  border-color: #f87171;
}

.pdf-page-card-footer {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  color: #cbd5e1;
  padding-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.pdf-page-rot-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  padding: 1px 5px;
  border-radius: 3px;
}

/* File List Mode Items */
.pdf-file-list-item {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  transition: all 0.2s ease;
}

.pdf-file-list-item:hover {
  border-color: rgba(168, 85, 247, 0.5);
  background: rgba(168, 85, 247, 0.05);
}

.pdf-file-list-item.dragging {
  opacity: 0.4;
  border-style: dashed;
}

.pdf-file-list-item.drag-over {
  border-color: #a855f7;
  background: rgba(168, 85, 247, 0.15);
}

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

.pdf-file-item-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #c084fc;
  font-size: 18px;
  flex-shrink: 0;
}

.pdf-file-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.pdf-file-item-name {
  font-size: 12.5px;
  font-weight: 700;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pdf-file-item-meta {
  font-size: 10.5px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 8px;
}

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

/* ==========================================================================
 * ✂️ PDF BÖLÜCÜ & SAYFA AYIRICI STİLLERİ (PDF SPLITTER ENGINE)
 * ========================================================================== */
.pdf-splitter-card {
  position: relative;
  background: rgba(15, 23, 42, 0.75);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
  cursor: pointer;
  user-select: none;
}

.pdf-splitter-card:hover {
  border-color: rgba(56, 189, 248, 0.6);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(14, 165, 233, 0.25);
}

.pdf-splitter-card.selected {
  border-color: #38bdf8 !important;
  background: rgba(14, 165, 233, 0.12) !important;
  box-shadow: 0 0 24px rgba(14, 165, 233, 0.45) !important;
}

.pdf-splitter-card.selected .pdf-splitter-check {
  background: #38bdf8;
  border-color: #38bdf8;
  color: #0f172a;
}

.pdf-splitter-check {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.85);
  border: 2px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  transition: all 0.15s ease;
}

.pdf-cut-indicator {
  position: absolute;
  top: -10px;
  right: -10px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #ef4444;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  box-shadow: 0 4px 10px rgba(239, 68, 68, 0.6);
  border: 2px solid #ffffff;
  z-index: 20;
  animation: pulse 1.5s infinite;
}

.pdf-cut-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px dashed rgba(245, 158, 11, 0.4);
  cursor: pointer;
  transition: all 0.15s ease;
}

.pdf-cut-btn:hover,
.pdf-cut-btn.active {
  background: #f59e0b;
  color: #0f172a;
  border-style: solid;
}

/* ==========================================================================
 * 🗜️ PDF COMPRESSOR & OPTIMIZATION STYLES
 * ========================================================================== */
.pdf-compressor-card {
  position: relative;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(8px);
}

.pdf-compressor-card:hover {
  border-color: rgba(245, 158, 11, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(245, 158, 11, 0.18);
}

.compressor-stats-card {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, rgba(217, 119, 6, 0.04) 100%);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.compressor-preset-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.compressor-preset-card:hover {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.4);
}

.compressor-preset-card.active {
  background: rgba(245, 158, 11, 0.15);
  border-color: #f59e0b;
  box-shadow: 0 0 0 1px #f59e0b;
}

.compressor-meter-bar {
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
  position: relative;
}

.compressor-meter-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #f59e0b, #ef4444);
  border-radius: 4px;
  transition: width 0.3s ease;
}

/* ==========================================================================
 * 🔄 PDF CONVERTER & FORMAT STUDIO STYLES
 * ========================================================================== */
.pdf-converter-card {
  position: relative;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(8px);
}

.pdf-converter-card:hover {
  border-color: rgba(16, 185, 129, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(16, 185, 129, 0.18);
}

.converter-direction-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 6px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  background: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
  border: 1px solid var(--border-color);
}

.converter-direction-btn:hover {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.4);
  color: #34d399;
}

.converter-direction-btn.active {
  background: rgba(16, 185, 129, 0.2);
  border-color: #10b981;
  color: #34d399;
  box-shadow: 0 0 0 1px #10b981;
}

.converter-badge-format {
  font-size: 9.5px;
  font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.active-photo-mode {
  background: rgba(16, 185, 129, 0.2) !important;
  border-color: rgba(16, 185, 129, 0.6) !important;
  color: #34d399 !important;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.2) !important;
}

/* Mirror Text Choice Modal Styles */
.mirror-choice-card {
  cursor: pointer;
  border-radius: 12px;
  padding: 14px;
  transition: all 0.2s ease;
  user-select: none;
}
.mirror-choice-card:hover {
  transform: translateY(-1px);
}
.badge-recommended {
  background: rgba(16, 185, 129, 0.25);
  color: #6ee7b7;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 12px;
  letter-spacing: 0.5px;
}

/* Spinner Animation & Export Feedback Styles */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.spin {
  animation: spin 0.8s linear infinite;
  display: inline-block;
  vertical-align: middle;
}

#appToastContainer {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: none;
  max-width: 92vw;
  width: max-content;
}
