/* ═══════════════════════════════════════════
   TÜKENMEZ KALEM — EDITOR
   Font  : Plus Jakarta Sans (300 / 400 / 600 / 700)
   Palet : Sıcak kağıt, lacivert, bronz
═══════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
  --ink: #1C2330;
  --dark: #2C3A47;
  --paper: #FDFBF7;
  --warm: #F4EDE4;
  --white: #FFFFFF;
  --rust: #A8440A;
  --accent: #B8906B;
  --muted: #7A8694;
  --border: #E2D9CF;
  --coal: #3D2B1F;
  --teal: #2A7A6A;
  --ok: #2A7A6A;
  --warn: #B8860B;
  --danger: #C0392B;

  --canvas-bg: #CCC8C0;
  --font: 'Plus Jakarta Sans', sans-serif;
}

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

html,
body {
  height: 100%;
  font-family: var(--font);
  background: var(--canvas-bg);
  color: var(--dark);
  overflow: hidden;
}

::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(28, 35, 48, 0.15);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(28, 35, 48, 0.25);
}

/* ═══════════════════════════════════════════
   LAYOUT
═══════════════════════════════════════════ */
.app-container {
  display: grid;
  grid-template-columns: 240px 1fr;
  grid-template-rows: 52px 1fr 26px;
  height: 100vh;
  width: 100vw;
}

/* ═══════════════════════════════════════════
   HEADER
═══════════════════════════════════════════ */
.app-header {
  grid-column: 1 / -1;
  grid-row: 1;
  background: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 500;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.header-left .app-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.logo-icon {
  width: 26px;
  height: 26px;
  background: var(--accent);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  border-radius: 5px;
}

.logo-text {
  font-family: var(--font);
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.2px;
}

.logo-text b {
  color: var(--accent);
  font-weight: 700;
}

/* Mode Switcher */
.mode-switcher {
  background: rgba(255, 255, 255, 0.05);
  padding: 3px;
  border-radius: 6px;
  display: flex;
  gap: 2px;
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.mode-btn {
  font-family: var(--font);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0px;
  padding: 6px 16px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  background: transparent;
  color: rgba(255, 255, 255, 0.35);
  transition: 0.15s;
}

.mode-btn:hover {
  color: rgba(255, 255, 255, 0.65);
}

.mode-btn.active {
  background: var(--accent);
  color: var(--ink);
  font-weight: 600;
}

.header-center {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  justify-content: center;
}

.header-sep {
  width: 1px;
  height: 20px;
  background: rgba(255, 255, 255, 0.08);
}

/* Choice Grid & Cards */
.choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.choice-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.choice-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(184, 144, 107, 0.12);
  background: var(--warm);
}

.choice-icon {
  font-size: 32px;
  margin-bottom: 16px;
  background: rgba(184, 144, 107, 0.08);
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s;
}

.choice-card:hover .choice-icon {
  background: var(--accent);
  color: white;
  transform: scale(1.1);
}

.choice-content h3 {
  font-family: var(--font);
  font-size: 16px;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 8px;
}

.choice-content p {
  font-family: var(--font);
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

/* Header Title */
.header-title-container {
  display: flex;
  align-items: center;
  max-width: 220px;
}

.header-title-input {
  background: transparent;
  border: 1px solid transparent;
  color: white;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 4px;
  width: 100%;
  transition: all 0.2s;
  text-overflow: ellipsis;
}

.header-title-input:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.1);
}

.header-title-input:focus {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(184, 144, 107, 0.1);
}

/* Header Right */
.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-sep {
  width: 1px;
  height: 18px;
  background: rgba(255, 255, 255, 0.08);
  margin: 0 4px;
}

.zoom-pill {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 5px;
  height: 30px;
  padding: 0 2px;
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.zoom-pill button {
  font-family: var(--font);
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.35);
  width: 24px;
  height: 100%;
  cursor: pointer;
  font-size: 14px;
  transition: 0.15s;
  border-radius: 3px;
}

.zoom-pill button:hover {
  color: rgba(255, 255, 255, 0.7);
}

.zoom-pill span {
  font-family: var(--font);
  font-size: 11px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.55);
  min-width: 40px;
  text-align: center;
}

.action-btn {
  font-family: var(--font);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0px;
  height: 30px;
  padding: 0 14px;
  border-radius: 5px;
  border: 1px solid transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: 0.15s;
}

.action-btn.primary {
  background: var(--accent);
  color: var(--ink);
  border-color: var(--accent);
}

.action-btn.primary:hover {
  background: #C9A07C;
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(184, 144, 107, 0.3);
}

.action-btn.secondary {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.5);
  border-color: rgba(255, 255, 255, 0.08);
}

.action-btn.secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
}

.action-btn.icon-only {
  padding: 0 9px;
}

#btnCloudSave {
  background: var(--teal) !important;
  border-color: var(--teal) !important;
  color: white !important;
}

#btnCloudSave:hover {
  background: #348A7A !important;
  box-shadow: 0 3px 10px rgba(42, 122, 106, 0.3) !important;
}

/* Dropdown System */
.dropdown-container {
  position: relative;
  display: inline-block;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  min-width: 180px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
  padding: 6px;
  display: none;
  flex-direction: column;
  z-index: 1000;
  animation: dropdownIn 0.2s ease-out;
}

.dropdown-menu.show {
  display: flex;
}

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

.dropdown-item {
  background: transparent;
  border: none;
  padding: 10px 12px;
  text-align: left;
  font-family: var(--font);
  font-size: 12px;
  color: var(--ink);
  cursor: pointer;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.15s;
}

.dropdown-item svg {
  color: var(--muted);
  opacity: 0.7;
}

.dropdown-item:hover {
  background: var(--warm);
  color: var(--dark);
}

.dropdown-item.danger {
  color: var(--danger);
}

.dropdown-item.danger:hover {
  background: rgba(192, 57, 43, 0.05);
}

.dropdown-sep {
  height: 1px;
  background: var(--border);
  margin: 4px 6px;
}

/* ═══════════════════════════════════════════
   SIDEBAR
═══════════════════════════════════════════ */
.sidebar-v2 {
  grid-column: 1;
  grid-row: 2;
  background: var(--paper);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: row;
  z-index: 100;
  overflow: hidden;
}

.activity-bar {
  width: 44px;
  background: var(--ink);
  border-right: 1px solid rgba(255, 255, 255, 0.04);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 12px;
  gap: 4px;
  flex-shrink: 0;
}

.ab-item {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  color: rgba(255, 255, 255, 0.25);
  cursor: pointer;
  transition: all 0.15s;
}

.ab-item svg {
  width: 16px;
  height: 16px;
}

.ab-item:hover {
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.6);
}

.ab-item.active {
  background: rgba(184, 144, 107, 0.15);
  color: var(--accent);
}

.sb-content {
  overflow-y: auto;
  padding: 16px 14px;
  flex: 1;
  min-height: 0;
}

.sb-content::-webkit-scrollbar {
  width: 3px;
}

.sb-content::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

.sb-pane {
  display: none;
}

.sb-pane.active {
  display: block;
  animation: sbIn 0.15s ease-out;
}

@keyframes sbIn {
  from {
    opacity: 0;
    transform: translateY(3px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.pane-header {
  font-family: var(--font);
  font-size: 10px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 14px;
  margin-top: 2px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.pane-sep {
  height: 1px;
  background: var(--border);
  margin: 14px 0;
}

.stat-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 16px;
}

.stat-card-v2 {
  background: var(--white);
  border: 1px solid var(--border);
  padding: 10px 12px;
  border-radius: 6px;
}

.stat-card-v2 label {
  font-family: var(--font);
  font-size: 9px;
  font-weight: 400;
  color: var(--muted);
  display: block;
  margin-bottom: 4px;
  opacity: 0.7;
}

.stat-card-v2 .val {
  font-family: var(--font);
  font-size: 16px;
  font-weight: 300;
  color: var(--ink);
}

.quick-actions {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.quick-btn {
  width: 100%;
  padding: 8px 10px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.13s ease;
  text-align: left;
}

.quick-btn:hover {
  background: var(--warm);
  border-color: var(--border);
}

.q-icon {
  font-size: 14px;
  width: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--muted);
}

.q-icon svg {
  width: 15px;
  height: 15px;
}

.q-txt b {
  display: block;
  font-family: var(--font);
  font-size: 12px;
  color: var(--dark);
  font-weight: 500;
}

.q-txt span {
  font-family: var(--font);
  font-size: 10px;
  color: var(--muted);
  font-weight: 400;
}

.tool-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 10px;
}

.tool-field label {
  font-family: var(--font);
  font-size: 10px;
  font-weight: 400;
  color: var(--muted);
}

.design-select {
  height: 32px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0 10px;
  font-family: var(--font);
  font-size: 11px;
  font-weight: 400;
  color: var(--dark);
  outline: none;
  transition: border-color 0.15s;
  cursor: pointer;
  width: 100%;
  letter-spacing: 0.3px;
}

.design-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(184, 144, 107, 0.12);
}

.fmt-group-v2 {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.fmt-row-v2 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}

.fmt-btn-v3 {
  height: 32px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 5px;
  font-family: var(--font);
  font-size: 13px;
  cursor: pointer;
  transition: 0.13s;
  color: var(--dark);
  display: flex;
  align-items: center;
  justify-content: center;
}

.fmt-btn-v3:hover {
  background: var(--warm);
  border-color: var(--accent);
}

.fmt-btn-v3.active-align {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
}

.pattern-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}

.pat-btn {
  height: 32px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-family: var(--font);
  color: var(--dark);
  font-size: 12px;
  transition: 0.13s;
}

.pat-btn:hover {
  background: var(--warm);
  border-color: var(--accent);
}

.pat-btn.active {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
}

.fs-stepper {
  display: flex;
  align-items: center;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 5px;
  height: 32px;
}

.fs-stepper button {
  font-family: var(--font);
  width: 32px;
  height: 100%;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  color: var(--muted);
  transition: 0.13s;
}

.fs-stepper button:hover {
  background: var(--warm);
  color: var(--dark);
}

.fs-stepper span {
  font-family: var(--font);
  flex: 1;
  text-align: center;
  font-size: 11px;
  font-weight: 400;
  color: var(--dark);
  letter-spacing: 0.5px;
}

.color-pill {
  height: 32px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 3px;
  position: relative;
}

.delete-btn-v2 {
  margin-top: 8px;
  height: 32px;
  background: white;
  border: 1px solid rgba(192, 57, 43, 0.2);
  color: var(--danger);
  border-radius: 5px;
  font-family: var(--font);
  font-weight: 400;
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  width: 100%;
  transition: 0.15s;
}

.delete-btn-v2:hover {
  background: var(--danger);
  color: white;
  border-color: var(--danger);
}

.switch-v2 {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
}

.switch-v2 input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider-v2 {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--border);
  transition: .25s;
  border-radius: 22px;
}

.slider-v2:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .25s;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

input:checked+.slider-v2 {
  background-color: var(--teal);
}

input:checked+.slider-v2:before {
  transform: translateX(18px);
}

/* ═══════════════════════════════════════════
   STATUS BAR
═══════════════════════════════════════════ */
.statusbar {
  grid-column: 1 / -1;
  grid-row: 3;
  background: var(--ink);
  display: flex;
  align-items: center;
  padding: 0 16px;
  height: 26px;
  font-family: var(--font);
  font-size: 10px;
  z-index: 500;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.sb-section {
  display: flex;
  align-items: center;
  gap: 6px;
}

.sb-label {
  font-family: var(--font);
  color: rgba(255, 255, 255, 0.25);
  font-weight: 400;
  font-size: 10px;
}

.sb-val {
  font-family: var(--font);
  color: rgba(255, 255, 255, 0.55);
  font-weight: 400;
}

.sb-sep {
  width: 1px;
  height: 10px;
  background: rgba(255, 255, 255, 0.08);
  margin: 0 12px;
}

.sb-push {
  flex: 1;
}

.sb-mode-pill {
  font-family: var(--font);
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 10px;
  border-radius: 100px;
  font-size: 8px;
  font-weight: 300;
  letter-spacing: 1.5px;
  color: rgba(255, 255, 255, 0.3);
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.sb-mode-pill span {
  color: var(--accent);
}

/* ═══════════════════════════════════════════
   CANVAS
═══════════════════════════════════════════ */
.canvas-wrap {
  grid-column: 2;
  grid-row: 2;
  overflow: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 40px 60px 80px 60px;
  position: relative;
  background: var(--canvas-bg);
  gap: 32px;
  background-image: radial-gradient(rgba(28, 35, 48, 0.08) 1px, transparent 1px);
  background-size: 28px 28px;
}

.a4-page {
  width: 794px;
  height: 1123px !important;
  max-height: 1123px;
  background: white;
  box-shadow: 0 1px 3px rgba(28, 35, 48, 0.08), 0 6px 20px rgba(28, 35, 48, 0.1), 0 16px 48px rgba(28, 35, 48, 0.07);
  position: relative;
  flex-shrink: 0;
  transform-origin: top center;
  transition: transform 0.18s;
  overflow: visible;
}

.tk-content {
  width: 100%;
  position: relative;
  outline: none;
}

.tk-content>div {
  max-width: 100% !important;
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  box-shadow: none !important;
  transform: none !important;
  min-height: auto !important;
}

.a4-page.edit-mode .tk-content [data-tk]:hover {
  outline: 1px dashed rgba(184, 144, 107, 0.5);
  outline-offset: 2px;
  background: rgba(184, 144, 107, 0.03);
}

.a4-page.edit-mode .tk-content [data-tk][contenteditable="true"] {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  background: rgba(184, 144, 107, 0.03);
}

.a4-page.edit-mode .tk-content [data-tk].block-selected {
  outline: 2px solid var(--rust);
  outline-offset: 3px;
  background: rgba(168, 68, 10, 0.03);
}

.tk-page.pat-dots {
  background-image: radial-gradient(rgba(28, 35, 48, 0.1) 1px, transparent 1px);
  background-size: 20px 20px;
}

.tk-page.pat-grid {
  background-image: linear-gradient(rgba(28, 35, 48, 0.07) 1px, transparent 1px), linear-gradient(90deg, rgba(28, 35, 48, 0.07) 1px, transparent 1px);
  background-size: 25px 25px;
}

.tk-page.pat-lines {
  background-image: repeating-linear-gradient(transparent, transparent 31px, rgba(28, 35, 48, 0.07) 32px);
  background-size: 100% 32px;
}

.tk-page.has-side-decor .tk-content {
  border-left: 3px solid var(--accent) !important;
}

.tk-page::after {
  content: attr(data-page);
  position: absolute;
  bottom: 20px;
  right: 40px;
  font-family: var(--font);
  font-size: 10px;
  font-weight: 300;
  color: var(--muted);
  opacity: 0;
  transition: 0.3s;
  letter-spacing: 1px;
}

.tk-page.show-numbers::after {
  opacity: 1;
}

.drag-handle {
  position: absolute;
  bottom: 40px;
  right: -52px;
  width: 34px;
  height: 34px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--muted);
  border: 1px solid rgba(28, 35, 48, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  box-shadow: 0 2px 8px rgba(28, 35, 48, 0.1);
  transition: 0.2s;
  z-index: 1000;
}

.drag-handle:hover {
  background: white;
  color: var(--ink);
  border-color: var(--accent);
  transform: scale(1.08);
}

.pb-line {
  width: 794px;
  height: 1px;
  background: rgba(28, 35, 48, 0.08);
  position: relative;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pb-line::before {
  content: 'SAYFA SONU';
  font-family: var(--font);
  font-size: 8px;
  font-weight: 300;
  letter-spacing: 3px;
  color: rgba(28, 35, 48, 0.25);
  background: var(--canvas-bg);
  padding: 0 12px;
  text-transform: uppercase;
}

.page-num-badge {
  position: absolute;
  top: 12px;
  right: -48px;
  background: rgba(28, 35, 48, 0.06);
  color: rgba(28, 35, 48, 0.3);
  font-family: var(--font);
  font-size: 8px;
  font-weight: 300;
  padding: 3px 8px;
  border-radius: 3px;
  letter-spacing: 1.5px;
}

/* ═══════════════════════════════════════════
   FLOAT TOOLBAR
═══════════════════════════════════════════ */
.float-tb {
  position: fixed;
  background: var(--coal);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: none;
  gap: 1px;
  padding: 4px 6px;
  z-index: 500;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4);
  align-items: center;
  border-radius: 6px;
}

.float-tb.on {
  display: flex;
}

.ft-label {
  font-family: var(--font);
  font-size: 8px;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.2);
  padding: 0 6px;
}

.ft-sep {
  width: 1px;
  background: rgba(255, 255, 255, 0.08);
  align-self: stretch;
  margin: 0 4px;
}

.ft-btn {
  font-family: var(--font);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.5px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.55);
  padding: 6px 8px;
  cursor: pointer;
  transition: 0.13s;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
  height: 28px;
}

.ft-btn:hover {
  color: white;
  background: rgba(255, 255, 255, 0.08);
}

.ft-btn.ft-del {
  color: rgba(192, 57, 43, 0.75);
}

.ft-btn.ft-del:hover {
  color: white;
  background: var(--danger);
}

/* ═══════════════════════════════════════════
   EMPTY STATE
═══════════════════════════════════════════ */
.empty-overlay {
  position: absolute;
  inset: 0;
  background: var(--canvas-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px;
  z-index: 10;
}

.empty-card {
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 48px;
  width: 100%;
  max-width: 700px;
  text-align: center;
}

.empty-card h2 {
  font-family: var(--font);
  font-size: 26px;
  color: var(--ink);
  margin-bottom: 12px;
  font-weight: 300;
  letter-spacing: 1px;
}

.empty-card p {
  font-family: var(--font);
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 32px;
  line-height: 1.7;
  font-weight: 300;
}

#pasteInput {
  width: 100%;
  height: 180px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  background: white;
  color: var(--dark);
  margin-bottom: 20px;
  outline: none;
  resize: none;
  transition: 0.15s;
}

#pasteInput:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(184, 144, 107, 0.12);
}

.btn-primary {
  width: 100%;
  height: 46px;
  background: var(--ink);
  color: white;
  border: none;
  border-radius: 6px;
  font-family: var(--font);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  transition: 0.2s;
}

.btn-primary:hover {
  background: var(--dark);
  transform: translateY(-1px);
}

.empty-footer {
  margin-top: 32px;
  font-family: var(--font);
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: rgba(28, 35, 48, 0.2);
}

/* ═══════════════════════════════════════════
   MODALS
═══════════════════════════════════════════ */
.modal-ov {
  position: fixed;
  inset: 0;
  background: rgba(28, 35, 48, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(6px);
}

.modal-ov.hidden {
  display: none;
}

.modal-box {
  background: var(--paper);
  max-width: 560px;
  width: 90%;
  padding: 36px;
  position: relative;
  border-radius: 8px;
  box-shadow: 0 24px 64px rgba(28, 35, 48, 0.3);
  border: 1px solid var(--border);
}

.modal-eyebrow {
  font-family: var(--font);
  font-size: 8px;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--accent);
  margin-bottom: 10px;
}

.modal-title {
  font-family: var(--font);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.modal-sub {
  font-family: var(--font);
  font-size: 12px;
  color: var(--muted);
  font-weight: 300;
  line-height: 1.7;
  margin-bottom: 18px;
  letter-spacing: 0.3px;
}

#modalInput {
  width: 100%;
  height: 160px;
  font-family: 'Courier New', monospace;
  font-size: 0.8rem;
  color: var(--dark);
  background: var(--white);
  border: 1px solid var(--border);
  padding: 14px;
  outline: none;
  resize: vertical;
  line-height: 1.5;
  border-radius: 5px;
  transition: 0.15s;
}

#modalInput:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(184, 144, 107, 0.1);
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.btn-modal-ok {
  font-family: var(--font);
  font-size: 11px;
  font-weight: 600;
  color: var(--ink);
  background: var(--accent);
  border: none;
  padding: 11px 22px;
  cursor: pointer;
  transition: 0.15s;
  border-radius: 5px;
}

.btn-modal-ok:hover {
  background: #C9A07C;
}

.btn-modal-cancel {
  font-family: var(--font);
  font-size: 11px;
  font-weight: 400;
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 10px 18px;
  cursor: pointer;
  transition: 0.15s;
  border-radius: 5px;
}

.btn-modal-cancel:hover {
  border-color: var(--dark);
  color: var(--dark);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: none;
  border: none;
  font-size: 16px;
  color: var(--muted);
  cursor: pointer;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: 0.13s;
}

.modal-close:hover {
  color: var(--dark);
  background: var(--warm);
}

.prompt-modal-box {
  background: var(--coal);
  border: 1px solid rgba(255, 255, 255, 0.06);
  max-width: 680px;
  width: 90%;
  padding: 36px;
  position: relative;
  border-radius: 8px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
}

.prompt-text {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 20px;
  border-radius: 5px;
  font-family: 'Courier New', monospace;
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 360px;
  overflow-y: auto;
  margin-bottom: 18px;
}

.btn-copy-prompt {
  font-family: var(--font);
  font-size: 10px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--ink);
  background: var(--accent);
  border: none;
  padding: 11px 22px;
  cursor: pointer;
  transition: 0.15s;
  border-radius: 5px;
}

.btn-copy-prompt:hover {
  background: #C9A07C;
}

.btn-copy-prompt.copied {
  background: var(--teal);
  color: white;
}

.cloud-modal {
  position: fixed;
  inset: 0;
  background: rgba(28, 35, 48, 0.75);
  backdrop-filter: blur(6px);
  z-index: 10001;
}

.cloud-modal-content {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 24px 64px rgba(28, 35, 48, 0.3);
  width: 90%;
  max-width: 600px;
  overflow: hidden;
}

.cm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--border);
}

.cm-header h2 {
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.5px;
}

.cm-close {
  background: none;
  border: none;
  font-size: 18px;
  color: var(--muted);
  cursor: pointer;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: 0.13s;
}

.cm-close:hover {
  background: var(--warm);
  color: var(--dark);
}

/* ═══════════════════════════════════════════
   TOAST
═══════════════════════════════════════════ */
#toast {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--coal);
  color: white;
  font-family: var(--font);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 1.5px;
  padding: 10px 20px;
  border-radius: 5px;
  z-index: 1100;
  border-left: 3px solid var(--accent);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
  text-transform: uppercase;
}

/* ═══════════════════════════════════════════
   THEMES
═══════════════════════════════════════════ */
.theme-watercolor {
  background: linear-gradient(135deg, #fff5f5 0%, #f5faff 100%) !important;
}

.theme-cartoon {
  border: 4px solid var(--ink) !important;
  background: white !important;
}

.theme-cartoon .tk-content {
  padding: 45px !important;
}

.theme-antique {
  background: #f4ecd8 !important;
  background-image: url('https://www.transparenttextures.com/patterns/old-map.png') !important;
}

.theme-antique * {
  color: #5d4037 !important;
}

.theme-blueprint {
  background: #002855 !important;
  background-image: linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px) !important;
  background-size: 20px 20px !important;
}

.theme-blueprint * {
  color: white !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
}

/* ═══════════════════════════════════════════
   PRINT
═══════════════════════════════════════════ */
@media print {

  .app-header,
  .sidebar-v2,
  .statusbar,
  .drag-handle,
  .float-tb,
  .pb-line,
  .page-num-badge,
  .empty-overlay,
  #emptyOverlay {
    display: none !important;
  }

  body {
    background: white;
    display: block;
    overflow: visible;
    height: auto;
  }

  .app-container {
    display: block;
    height: auto;
    background: white;
  }

  .canvas-wrap {
    display: block;
    padding: 0;
    background: white;
    overflow: visible;
    background-image: none;
  }

  .a4-page {
    box-shadow: none !important;
    transform: none !important;
    margin: 0 !important;
    page-break-after: always;
    width: 794px;
    height: 1123px;
    overflow: hidden;
  }

  @page {
    size: A4 portrait;
    margin: 0;
  }
}