﻿:root {
  --ink: #0f172a;
  --muted: #5c6578;
  --line: rgba(15, 23, 42, 0.12);
  --line-strong: rgba(15, 23, 42, 0.22);
  --paper: #fbf9f6;
  --paper-strong: #f2ede6;
  --sheet: #ffffff;
  --accent: #1f992a;
  --accent-soft: rgba(141, 43, 43, 0.12);
  --accent-warm: #a67c2e;
  --brand: #c9a227;
  --brand-deep: #8b6914;
  --brand-muted: rgba(201, 162, 39, 0.14);
  --bg: #e4e9f1;
  --shadow: 0 24px 64px rgba(15, 23, 42, 0.1);
  --shadow-premium: 0 18px 48px rgba(15, 23, 42, 0.12), 0 1px 0 rgba(255, 255, 255, 0.65) inset;
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --body-veil: rgba(255, 255, 255, 0.42);
  --grid-line: rgba(15, 23, 42, 0.028);
  --border-ui: rgba(201, 162, 39, 0.14);
  --border-panel: rgba(201, 162, 39, 0.12);
  --border-landing: rgba(201, 162, 39, 0.16);
  --border-nav: rgba(201, 162, 39, 0.42);
  --border-nav-active: rgba(201, 162, 39, 0.65);
  --border-nav-hover: rgba(201, 162, 39, 0.55);
  --shadow-nav-inset: rgba(201, 162, 39, 0.12);
  --focus-ring-nav: rgba(201, 162, 39, 0.35);
  --nav-tab-fg: #1e3a5f;
  --nav-tab-fg-strong: #0f172a;
  --nav-icon-inset-bottom: rgba(139, 105, 20, 0.06);
  --nav-hover-gold: rgba(212, 175, 55, 0.15);
  --landing-subtitle-fg: #1e3a5f;
  --nav-icon-bg-top: #fffcfa;
  --nav-icon-bg-mid: #f5efe6;
  --nav-icon-bg-bottom: #ebe2d4;
  --nav-icon-bg-active-top: #fffef9;
  --nav-icon-bg-active-mid: #f8efd4;
  --nav-icon-bg-active-bottom: #f0e4c4;
  --nav-icon-shadow-outer: 0 12px 32px rgba(15, 23, 42, 0.08);
  --nav-icon-shadow-glow: 0 2px 10px rgba(201, 162, 39, 0.14);
  --nav-icon-shadow-active-glow: 0 3px 12px rgba(201, 162, 39, 0.18);
  --btn-primary-gradient: linear-gradient(165deg, #1e3a5f 0%, #0f172a 100%);
  --btn-primary-hover-gradient: linear-gradient(165deg, #2a4a73 0%, #152238 100%);
  --btn-primary-shadow: 0 10px 28px rgba(15, 23, 42, 0.2);
  --nav-button-shadow: 0 14px 32px rgba(15, 23, 42, 0.22);
  --bg-root:
    radial-gradient(ellipse 120% 80% at 10% -10%, rgba(201, 162, 39, 0.09), transparent 45%),
    radial-gradient(ellipse 90% 60% at 100% 0%, rgba(15, 23, 42, 0.06), transparent 42%),
    linear-gradient(168deg, #eef1f7 0%, #dfe5ef 48%, #d5dce8 100%);
  font-family: "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
}

html[data-appearance="dark"]:not([data-theme="palette"]) {
  color-scheme: dark;
  --ink: #e8edf4;
  --muted: #94a3b8;
  --line: rgba(248, 250, 252, 0.12);
  --line-strong: rgba(248, 250, 252, 0.2);
  --paper: #1e293b;
  --paper-strong: #0f172a;
  --sheet: #334155;
  --accent: #34d399;
  --accent-soft: rgba(52, 211, 153, 0.15);
  --accent-warm: #fbbf24;
  --brand: #fbbf24;
  --brand-deep: #d97706;
  --brand-muted: rgba(251, 191, 36, 0.18);
  --bg: #0f172a;
  --shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
  --shadow-premium: 0 18px 48px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  --body-veil: rgba(15, 23, 42, 0.35);
  --grid-line: rgba(148, 163, 184, 0.06);
  --border-ui: rgba(251, 191, 36, 0.18);
  --border-panel: rgba(251, 191, 36, 0.14);
  --border-landing: rgba(251, 191, 36, 0.22);
  --border-nav: rgba(251, 191, 36, 0.4);
  --border-nav-active: rgba(251, 191, 36, 0.62);
  --border-nav-hover: rgba(251, 191, 36, 0.5);
  --shadow-nav-inset: rgba(251, 191, 36, 0.15);
  --focus-ring-nav: rgba(251, 191, 36, 0.4);
  --nav-tab-fg: #cbd5e1;
  --nav-tab-fg-strong: #f8fafc;
  --nav-icon-inset-bottom: rgba(251, 191, 36, 0.12);
  --nav-hover-gold: rgba(251, 191, 36, 0.18);
  --landing-subtitle-fg: #e2e8f0;
  --nav-icon-bg-top: #1e293b;
  --nav-icon-bg-mid: #172033;
  --nav-icon-bg-bottom: #0f172a;
  --nav-icon-bg-active-top: #334155;
  --nav-icon-bg-active-mid: #293548;
  --nav-icon-bg-active-bottom: #1e293b;
  --nav-icon-shadow-outer: 0 12px 32px rgba(0, 0, 0, 0.35);
  --nav-icon-shadow-glow: 0 2px 10px rgba(251, 191, 36, 0.18);
  --nav-icon-shadow-active-glow: 0 3px 12px rgba(251, 191, 36, 0.24);
  --btn-primary-gradient: linear-gradient(165deg, #1e3a5f 0%, #0f172a 100%);
  --btn-primary-hover-gradient: linear-gradient(165deg, #2a4a73 0%, #152238 100%);
  --btn-primary-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
  --nav-button-shadow: 0 14px 32px rgba(0, 0, 0, 0.35);
  --bg-root:
    radial-gradient(ellipse 120% 80% at 10% -10%, rgba(251, 191, 36, 0.1), transparent 46%),
    radial-gradient(ellipse 90% 60% at 100% 0%, rgba(56, 189, 248, 0.08), transparent 44%),
    linear-gradient(168deg, #0f172a 0%, #020617 100%);
}

html[data-appearance="dark"][data-theme="palette"] {
  color-scheme: dark;
}

html {
  background: var(--bg-root);
  color: var(--ink);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(var(--body-veil), var(--body-veil)),
    var(--bg);
  color: var(--ink);
}

body.preview-open {
  overflow: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

textarea {
  resize: vertical;
}

.app-shell {
  width: min(1600px, calc(100% - 40px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

.hero {
  position: relative;
  display: block;
  padding: calc(42px + clamp(110px, 12vw, 160px)) 32px 32px;
  border: 1px solid var(--border-ui);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.97) 0%, rgba(251, 248, 242, 0.98) 55%, rgba(245, 240, 230, 0.95) 100%),
    var(--paper);
  box-shadow: var(--shadow);
}

.hero-logo-shell {
  position: absolute;
  top: 26px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.hero-logo {
  width: clamp(110px, 12vw, 160px);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(27, 35, 48, 0.08));
}

.eyebrow,
.section-kicker,
.offer-badge {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.72rem;
  color: var(--accent);
  font-weight: 700;
}

.hero h1,
.panel-heading h2,
.section-headline h3,
.offer-card-header h4 {
  margin: 0;
  font-family: "Palatino Linotype", "Book Antiqua", Georgia, serif;
}

.hero h1 {
  font-size: clamp(1.35rem, 2.5vw, 2.6rem);
  line-height: 1.05;
  max-width: none;
  white-space: nowrap;
}

.hero-text,
.panel-note,
.section-headline span {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.hero-copy {
  display: grid;
  gap: 16px;
  justify-items: center;
  text-align: center;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-top: 24px;
}

.hero-actions > a:first-child {
  margin-right: auto;
}

.btn {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 13px 20px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
  filter: brightness(0.94);
}

.btn-primary {
  background: var(--btn-primary-gradient);
  color: white;
  box-shadow: var(--btn-primary-shadow);
}

.btn-primary:hover {
  background: var(--btn-primary-hover-gradient);
}

.btn-secondary {
  background: var(--accent);
  color: white;
  box-shadow: 0 10px 24px rgba(141, 43, 43, 0.2);
}

.btn-secondary:hover {
  background: #177821;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.65);
  color: var(--ink);
  border-color: rgba(101, 112, 131, 0.25);
}

.btn-ghost:hover {
  background: rgba(27, 35, 48, 0.08);
}


#preview-button,
#print-first-button,
#save-pdf-button,
#print-button {
  display: none;
}
.print-menu {
  position: relative;
}

.print-menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 148px;
  list-style: none;
}

.print-menu-toggle::-webkit-details-marker {
  display: none;
}

.print-menu-list {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 220px;
  display: none;
  padding: 10px;
  border: 1px solid rgba(101, 112, 131, 0.2);
  border-radius: 22px;
  background: rgba(255, 253, 248, 0.98);
  box-shadow: 0 18px 38px rgba(27, 35, 48, 0.16);
  z-index: 20;
}

.print-menu[open] .print-menu-list,
.print-menu.is-open .print-menu-list {
  display: grid;
  gap: 8px;
}

.print-menu-item {
  width: 100%;
  border: 0;
  border-radius: 16px;
  padding: 12px 14px;
  background: rgba(27, 35, 48, 0.05);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease;
}

.print-menu-item:hover {
  background: rgba(27, 35, 48, 0.11);
  transform: translateY(-1px);
}

.print-submenu {
  display: grid;
  gap: 8px;
}

.print-submenu-toggle {
  list-style: none;
  background: var(--ink);
  color: #fff;
}

.print-submenu-toggle::-webkit-details-marker {
  display: none;
}

.print-submenu-list {
  display: none;
  gap: 8px;
  padding-left: 10px;
}

.print-submenu[open] .print-submenu-list {
  display: grid;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  margin-top: 24px;
  align-items: start;
}

.panel {
  padding: 28px;
  border-radius: var(--radius-lg);
  background: rgba(255, 253, 248, 0.94);
  border: 1px solid var(--border-panel);
  box-shadow: var(--shadow);
}

.form-panel {
  padding: 16px;
}

.preview-panel {
  background:
    linear-gradient(180deg, rgba(255, 250, 242, 0.96), rgba(255, 255, 255, 0.94)),
    #fff;
}

.preview-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.preview-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.preview-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(27, 35, 48, 0.5);
  backdrop-filter: blur(6px);
}

.preview-modal-panel {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  overflow: auto;
}

.preview-modal-heading {
  position: sticky;
  top: 0;
  z-index: 2;
  padding-bottom: 18px;
  background: linear-gradient(180deg, rgba(255, 250, 242, 0.98), rgba(255, 255, 255, 0.94));
}

.preview-modal-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin-bottom: 24px;
}

.panel-heading h2 {
  font-size: 1.8rem;
}

.panel-note {
  max-width: 32ch;
}

.minutes-form {
  display: grid;
  gap: 14px;
}

.form-section {
  padding: 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid rgba(101, 112, 131, 0.1);
}

.section-headline {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: end;
  margin-bottom: 10px;
}

.form-grid {
  display: grid;
  gap: 10px;
}

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

.three-columns {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.signature-form-grid {
  grid-template-columns: 1fr;
}

.form-panel .panel-heading {
  margin-bottom: 12px;
}

.form-panel .panel-heading h2 {
  font-size: 1.35rem;
}

.form-panel .panel-note,
.form-panel .section-headline span {
  font-size: 0.82rem;
  line-height: 1.35;
  color: #7a8599;
}

.form-panel .section-headline h3,
.form-panel .offer-card-header h4 {
  font-size: 0.98rem;
}

.signature-form-grid .field input,
.signature-form-grid .field select,
.signature-form-grid .field textarea {
  min-height: 30px;
}

.signature-form-grid .field textarea[name="footerNote"] {
  min-height: 96px;
  line-height: 1.35;
  resize: vertical;
}

.signature-reference-table {
  display: grid;
  gap: 0;
  border: 1px solid rgba(101, 112, 131, 0.2);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.76);
}

.signature-reference-row {
  display: grid;
  grid-template-columns: minmax(180px, 0.9fr) minmax(0, 1fr);
}

.signature-reference-row span {
  padding: 10px 12px;
  font-size: 0.92rem;
  line-height: 1.3;
  border-top: 1px solid rgba(101, 112, 131, 0.14);
}

.signature-reference-row input {
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  font: inherit;
  font-size: 0.92rem;
  line-height: 1.3;
  color: #21314d;
  background: transparent;
  border: 0;
  border-top: 1px solid rgba(101, 112, 131, 0.14);
  outline: none;
}

.signature-reference-row:first-child span {
  border-top: 0;
}

.signature-reference-row:first-child input {
  border-top: 0;
}

.signature-reference-row span + span {
  border-left: 1px solid rgba(101, 112, 131, 0.14);
}

.signature-reference-row span + input {
  border-left: 1px solid rgba(101, 112, 131, 0.14);
}

.signature-reference-row input:focus {
  background: rgba(228, 238, 255, 0.45);
}

.signature-reference-row-spacer span {
  min-height: 12px;
  background: rgba(241, 244, 249, 0.7);
}

.offer-stack {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-items: start;
}

.offer-card {
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(101, 112, 131, 0.1);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.company-card-grid {
  grid-template-columns: 1fr;
}

.offer-line-items-section {
  grid-column: 1 / -1;
}

.offer-card.is-selected {
  border-color: rgba(141, 43, 43, 0.18);
  transform: none;
  box-shadow: none;
}

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

.offer-card-actions {
  display: flex;
  justify-content: flex-start;
  margin-top: 10px;
}

.offer-print-button {
  min-width: 164px;
}

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

.field span {
  font-size: 0.78rem;
  font-weight: 700;
  color: #475569;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(101, 112, 131, 0.18);
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.field input[type="date"] {
  cursor: pointer;
  min-height: 40px;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.company-search:focus {
  outline: none;
  border-color: rgba(141, 43, 43, 0.4);
  box-shadow: 0 0 0 4px rgba(141, 43, 43, 0.08);
}

.field-search {
  position: relative;
}

.search-shell {
  position: relative;
}

.search-results {
  position: absolute;
  inset: calc(100% + 8px) 0 auto 0;
  z-index: 10;
  display: none;
  padding: 8px;
  border-radius: 16px;
  border: 1px solid rgba(101, 112, 131, 0.16);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.12);
}

.search-results.is-open {
  display: grid;
  gap: 6px;
}

.search-result {
  padding: 10px 12px;
  border-radius: 12px;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.search-result:hover,
.search-result:focus {
  background: rgba(141, 43, 43, 0.08);
  outline: none;
}

.search-result strong {
  display: block;
  font-size: 0.96rem;
}

.search-result span {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 3px;
}

.line-items-section {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(101, 112, 131, 0.1);
}

.line-items-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 10px;
  margin-bottom: 10px;
}

.line-items {
  display: grid;
  gap: 8px;
}

.line-item-row {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) repeat(3, minmax(110px, 0.72fr)) minmax(90px, 0.55fr) auto;
  gap: 8px;
  align-items: start;
  padding: 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(101, 112, 131, 0.1);
}

.line-item-name {
  min-height: 78px;
  line-height: 1.35;
  overflow: hidden;
  resize: none;
}

.remove-line-item {
  height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(141, 43, 43, 0.2);
  border-radius: 12px;
  background: rgba(141, 43, 43, 0.08);
  color: var(--accent);
  font-weight: 700;
  cursor: pointer;
  align-self: end;
}

.remove-line-item:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.document-sheet {
  position: relative;
  overflow: hidden;
  padding: 26px;
  border-radius: 24px;
  border: 1px solid rgba(101, 112, 131, 0.2);
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(196, 204, 215, 0.4);
}

#preview-documents {
  display: grid;
  gap: 18px;
}

.preview-document:not(:last-child) {
  break-after: page;
  page-break-after: always;
}

.document-watermark {
  position: absolute;
  inset: auto 24px 40px auto;
  font-size: clamp(5rem, 12vw, 8rem);
  color: rgba(27, 35, 48, 0.05);
  font-family: "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-weight: 700;
  pointer-events: none;
}

.minutes-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-family: "Times New Roman", Times, serif;
  font-size: 11px;
  line-height: 1.25;
  color: #111827;
}

.minutes-table td,
.minutes-table th {
  border: 1px solid var(--line-strong);
  padding: 8px 9px;
  vertical-align: top;
  background: #fff;
}

.minutes-title {
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  text-align: center;
  padding: 12px 10px;
}

.label-cell {
  width: 26%;
  font-weight: 700;
}

.narrative-cell p,
.closing-cell {
  margin: 0;
  line-height: 1.7;
}

.narrative-cell p {
  text-align: justify;
  text-justify: inter-word;
}

.closing-cell {
  text-align: left;
}

.closing-note {
  display: block;
  font-weight: 400;
}

.items-preview-cell {
  padding: 0 !important;
}

.preview-line-items {
  display: grid;
}

.preview-item-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) minmax(120px, 0.8fr) minmax(70px, 0.5fr);
  gap: 0;
}

.preview-item-grid + .preview-item-grid {
  border-top: 1px solid var(--line-strong);
}

.preview-item-grid span {
  padding: 8px 9px;
  border-left: 1px solid var(--line-strong);
  background: #fff;
}

.preview-item-grid span:first-child {
  border-left: 0;
}

.signature-row td {
  padding: 10px 9px 8px;
}

.first-print-template {
  display: none;
}

.second-print-template {
  display: none;
}

.third-print-template {
  display: none;
}

.fourth-print-template {
  display: none;
}

.fifth-print-template {
  display: none;
}

.pdf-print-sheet {
  width: 194mm;
  height: 279mm;
  margin: 0 auto;
  padding: 8mm 6mm 6mm;
  background: #fff;
  color: #111;
  font-family: "Times New Roman", serif;
  font-size: 11px;
  line-height: 1.05;
  display: flex;
  flex-direction: column;
}

.pdf-print-header {
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.pdf-print-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.pdf-print-header-copy {
  text-align: center;
}

.pdf-print-header-copy p,
.pdf-print-header-copy h1 {
  margin: 0;
}

.pdf-print-header-copy h1 {
  margin-top: 3px;
  font-size: 13px;
  letter-spacing: 0.03em;
}

.pdf-meta-table,
.pdf-price-table,
.pdf-summary-table {
  width: 100%;
  border-collapse: collapse;
}

.pdf-meta-table {
  margin-bottom: 4px;
  table-layout: fixed;
}

.pdf-meta-table th,
.pdf-meta-table td,
.pdf-price-table th,
.pdf-price-table td,
.pdf-summary-table th,
.pdf-summary-table td {
  border: 1px solid #111;
  padding: 2px 3px;
  vertical-align: middle;
  overflow-wrap: anywhere;
}

.pdf-meta-table th,
.pdf-price-table th,
.pdf-summary-table th {
  font-weight: 700;
}

.pdf-meta-table .pdf-meta-label {
  text-align: left;
}

.pdf-meta-table td {
  text-align: left;
  overflow-wrap: anywhere;
}

.pdf-meta-table .pdf-meta-row-equal > th,
.pdf-meta-table .pdf-meta-row-equal > td {
  width: 50%;
}

.pdf-price-table {
  table-layout: fixed;
  font-size: 10px;
}

.pdf-price-table .w-sn {
  width: 22px;
}

.pdf-price-table .w-qty,
.pdf-price-table .w-unit {
  width: 34px;
}

.pdf-price-table .w-num {
  width: 62px;
}

.pdf-price-table .w-firm {
  width: 84px;
}

.pdf-price-table .w-firm-sub {
  width: 46px;
}

.pdf-price-table .center {
  text-align: center;
}

.pdf-price-table .num,
.pdf-summary-table .num {
  text-align: right;
  white-space: nowrap;
}

.first-print-template .pdf-price-table .num {
  text-align: center;
}

.pdf-summary-table {
  margin-top: 8px;
  font-size: 10.5px;
}

.pdf-summary-table td strong,
.pdf-summary-table td span {
  display: block;
}

.pdf-print-note {
  margin: 10px 0 12px;
  text-align: justify;
  text-justify: inter-word;
}

.pdf-print-signatures {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 10px;
}

.pdf-print-signatures-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pdf-signature-block {
  text-align: center;
}

.pdf-signature-block strong,
.pdf-signature-block span {
  display: block;
}

.approval-print-sheet {
  width: 194mm;
  height: 279mm;
  margin: 0 auto;
  padding: 8mm 8mm 6mm;
  background: #fff;
  color: #111;
  font-family: "Times New Roman", serif;
  font-size: 11px;
  line-height: 1.05;
  display: flex;
  flex-direction: column;
}

.approval-print-header {
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.approval-print-header h1 {
  margin: 0;
  font-size: 13px;
  text-align: center;
}

.approval-print-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.approval-print-table,
.approval-signature-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.approval-print-table th,
.approval-print-table td,
.approval-signature-table th,
.approval-signature-table td {
  border: 1px solid #111;
  padding: 4px 3px;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.approval-print-table th {
  width: 38%;
  text-align: left;
  font-weight: 700;
}

.approval-print-section {
  text-align: center !important;
  font-weight: 700;
}

.approval-print-justification {
  padding: 6px 8px !important;
  text-align: justify;
  text-justify: inter-word;
}

.approval-signature-table {
  margin-top: 8px;
}

.approval-signature-block {
  min-height: 98px;
  display: grid;
  grid-template-rows: 30px 18px repeat(4, auto);
  text-align: center;
  align-content: start;
}

.approval-signature-block p,
.approval-signature-block strong,
.approval-signature-block span {
  display: block;
  margin: 0;
}

.approval-signature-intro {
  min-height: 30px;
}

.approval-signature-date {
  min-height: 18px;
}

.approval-signature-role {
  margin-top: 3px;
}

.approval-signature-name {
  font-weight: 400;
}

.approval-signature-approval {
  display: flex !important;
  align-items: flex-start;
  justify-content: center;
}

.approval-signature-block p + p,
.approval-signature-block p + strong,
.approval-signature-block strong + strong,
.approval-signature-block strong + span,
.approval-signature-block span + span {
  margin-top: 3px;
}

.approval-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 18px;
  margin-top: auto;
  padding-top: 24px;
}

.approval-paraf-list p,
.approval-form-code {
  margin: 0;
}

.approval-paraf-list {
  display: grid;
  gap: 4px;
}

.cost-print-sheet {
  width: 194mm;
  min-height: 279mm;
  height: auto;
  margin: 0 auto;
  padding: 7mm 5mm 6mm;
  background: #fff;
  color: #111;
  font-family: "Times New Roman", serif;
  font-size: 10.5px;
  line-height: 1;
  display: block;
  box-sizing: border-box;
}

.cost-print-header {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  gap: 8px;
  align-items: start;
  margin-bottom: 6px;
}

.cost-print-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.cost-print-header-copy {
  text-align: center;
}

.cost-print-header-copy p,
.cost-print-header-copy h1 {
  margin: 0;
}

.cost-print-header-copy h1 {
  margin-top: 4px;
  font-size: 13px;
}

.cost-print-subnote {
  margin-top: 4px !important;
  font-size: 10.5px;
  line-height: 1.05;
  text-align: justify;
  text-justify: inter-word;
}

.cost-print-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 9.5px;
}

.cost-print-table th,
.cost-print-table td {
  border: 1px solid #111;
  padding: 1px;
  vertical-align: middle;
  overflow-wrap: anywhere;
}

.cost-print-table th {
  font-weight: 700;
}

.cost-print-table .w-sn {
  width: 16px;
}

.cost-print-table .w-name {
  width: 128px;
}

.cost-print-table .w-qty {
  width: 18px;
}

.cost-print-table .w-unit {
  width: 28px;
}

.cost-print-table .w-firm {
  width: 74px;
}

.cost-print-table .w-num {
  width: 48px;
}

.cost-print-table .w-num-approx {
  width: 54px;
}

.cost-print-table .stacked-header {
  text-align: center;
  vertical-align: middle;
  line-height: 1.05;
  white-space: normal;
}

.cost-print-table .center {
  text-align: center;
}

.cost-print-table .num {
  text-align: right;
  white-space: nowrap;
}

.cost-print-table tfoot th,
.cost-print-table tfoot td {
  height: 24px;
  vertical-align: middle;
}

.vertical-text {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  text-align: center;
  white-space: nowrap;
  letter-spacing: 0.02em;
  font-size: 10px;
  padding: 2px 0 !important;
}

.cost-print-summary {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.cost-print-summary.cost-print-summary--below-table {
  margin-top: 8px;
  margin-bottom: 6px;
}

.cost-print-summary-box {
  display: grid;
  grid-template-columns: minmax(132px, 1fr) 84px;
  width: 232px;
  max-width: 100%;
  border: 1px solid #111;
  box-sizing: border-box;
}

.cost-print-summary-box span,
.cost-print-summary-box strong {
  padding: 4px 8px;
  border-left: 1px solid #111;
  white-space: nowrap;
  font-size: 11px;
}

.cost-print-summary-box span {
  border-left: 0;
  font-weight: 700;
}

.cost-print-summary-box strong {
  text-align: right;
}

.cost-print-footer-cell {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin-top: 10px;
  padding: 4px 6px;
  border: 1px solid #111;
  background: #fff;
  text-align: left;
  font-size: 9.5px;
  line-height: 1.25;
  clear: both;
}

.cost-print-signatures {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 12px;
}

.cost-signature-block {
  text-align: center;
}

.cost-signature-block strong,
.cost-signature-block span {
  display: block;
}

.assignment-print-sheet {
  width: 194mm;
  height: 279mm;
  margin: 0 auto;
  padding: 12mm 10mm 10mm;
  background: #fff;
  color: #111;
  font-family: "Times New Roman", serif;
  font-size: 12px;
  line-height: 1.25;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.assignment-print-header {
  display: grid;
  grid-template-columns: 56px 1fr 56px;
  gap: 18px;
  align-items: start;
  margin-bottom: 18px;
}

.assignment-print-logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.assignment-print-header-copy {
  text-align: center;
}

.assignment-print-header-copy p {
  margin: 0;
}

.assignment-print-meta {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: end;
  margin-top: 6px;
}

.assignment-print-meta p {
  margin: 0;
}

.assignment-print-date {
  white-space: nowrap;
}

.assignment-print-title {
  margin: 18px 0 22px;
  text-align: center;
  font-size: 14px;
}

.assignment-print-body {
  margin: 0 auto 28px;
  width: 88%;
  text-align: justify;
  text-justify: inter-word;
  text-indent: 34px;
}

.assignment-print-signoff,
.assignment-print-approval {
  text-align: center;
}

.assignment-print-signoff {
  width: 42%;
  margin-left: auto;
  margin-bottom: 36px;
}

.assignment-print-signoff strong,
.assignment-print-signoff span,
.assignment-print-approval strong,
.assignment-print-approval span,
.assignment-print-approval p {
  display: block;
  margin: 0;
}

.assignment-print-list h2 {
  margin: 0 0 8px;
  padding-bottom: 4px;
  border-bottom: 2px solid #111;
  text-align: center;
  font-size: 14px;
}

.assignment-print-list {
  margin-top: 8px;
}

.assignment-print-table {
  width: 100%;
  border-collapse: collapse;
}

.assignment-print-table td {
  padding: 2px 4px;
  vertical-align: top;
}

.assignment-print-table .w-index {
  width: 32px;
}

.assignment-print-table .w-item {
  width: auto;
}

.assignment-print-table .w-qty {
  width: 60px;
  text-align: center;
}

.assignment-print-table .w-amount {
  width: 120px;
  text-align: right;
  white-space: nowrap;
}

.assignment-print-approval {
  margin-top: auto;
  padding-top: 24px;
}

.assignment-print-approval p {
  margin-bottom: 1.15em;
}

.result-print-sheet {
  width: 194mm;
  height: 279mm;
  margin: 0 auto;
  padding: 8mm 8mm 10mm;
  background: #fff;
  color: #111;
  font-family: "Times New Roman", serif;
  font-size: 12px;
  line-height: 1.15;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.result-print-header h1 {
  margin: 0 0 8px;
  text-align: center;
  font-size: 14px;
}

.result-meta-table,
.result-offer-table,
.result-selected-table,
.result-approval-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.result-approval-table {
  margin-top: 10px;
}

.result-meta-table th,
.result-meta-table td,
.result-offer-table th,
.result-offer-table td,
.result-selected-table th,
.result-selected-table td,
.result-approval-table th,
.result-approval-table td {
  border: 1px solid #111;
  padding: 2px 4px;
  vertical-align: top;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.result-meta-table th {
  width: 42%;
  text-align: left;
}

.result-section-title {
  margin: 12px 0 18px;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
}

.result-section-title-selected {
  margin: 12px 0 18px;
}

.result-offer-table th,
.result-selected-table th,
.result-approval-table th {
  font-weight: 700;
}

.result-offer-table .num,
.result-selected-table .num {
  text-align: center;
  white-space: nowrap;
}

.result-selected-table th,
.result-selected-table td {
  text-align: center;
  vertical-align: middle;
}

.result-offer-table td[rowspan] {
  min-height: 400px;
  padding-top: 12px;
  padding-bottom: 12px;
  vertical-align: middle;
}

.result-offer-table .center,
.result-approval-table .center,
.result-meta-table .center {
  text-align: center;
}

.result-approval-table th.center {
  text-align: center;
  vertical-align: middle;
  padding-top: 18px;
  padding-bottom: 18px;
}

.result-approval-text {
  margin: 0 0 8px;
  text-align: center;
}

.result-signature-block {
  text-align: center;
}

.result-signature-block p,
.result-signature-block strong,
.result-signature-block span {
  display: block;
  margin: 0;
}

.result-signature-block p.result-signature-date {
  margin-bottom: 1.15em;
}

.result-signature-approval {
  margin-top: 16px;
}

.result-person-name {
  font-weight: 400;
}

.result-footer {
  margin-top: auto;
  padding-top: 12px;
}

.result-paraf-list p {
  margin: 0;
}

.signature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-items: start;
}

.signature-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  min-height: auto;
  line-height: 1;
}

.signature-block strong,
.signature-block span {
  display: block;
  margin: 0;
  line-height: 1;
}

.signature-block strong,
.closing-cell strong {
  font-weight: 400;
}

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

  .signature-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .hero,
  .panel-heading,
  .section-headline {
    flex-direction: column;
    align-items: stretch;
  }

  .panel-note {
    max-width: none;
  }
}

@media (max-width: 820px) {
  .app-shell {
    width: min(100% - 24px, 1600px);
    padding-top: 18px;
  }

  .hero,
  .panel {
    padding: 20px;
  }

  .hero {
    padding: calc(30px + clamp(96px, 28vw, 140px)) 20px 20px;
  }

  .hero-logo-shell {
    top: 18px;
  }

  .two-columns,
  .three-columns,
  .offer-stack {
    grid-template-columns: 1fr;
  }

  .line-item-row {
    grid-template-columns: 1fr;
  }

  .line-items-header {
    flex-direction: column;
    align-items: stretch;
  }

  .document-sheet {
    padding: 18px;
    border-radius: 22px;
  }

  .preview-modal {
    padding: 12px;
  }

  .preview-modal-panel {
    width: min(100vw - 24px, 1120px);
    max-height: calc(100vh - 24px);
  }

  .preview-modal-actions {
    justify-content: stretch;
  }

  .minutes-table td,
  .minutes-table th {
    padding: 9px;
    font-size: 0.93rem;
  }

  .landing-card-tabs,
  .landing-card.landing-card-tabs {
    padding: 20px 12px 24px;
  }

  .landing-orbit-ring.landing-actions-tabs {
    --orbit-r: clamp(118px, 31vw, 198px);
    max-width: min(96vw, 100%);
  }

  .landing-actions-tabs:not(.landing-orbit-ring) {
    gap: 8px;
    padding: 6px 0 2px;
    border-radius: 0;
  }

  .nav-tab {
    gap: 8px;
    min-width: 74px;
    padding: 0;
  }

  .landing-orbit-ring .orbit-nav-item {
    width: 6.35rem;
    min-width: 6.35rem;
    max-width: 6.35rem;
  }

  .nav-tab-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
  }

  .nav-tab-icon::after {
    border-radius: 15px;
  }

  .nav-tab-icon svg {
    width: 28px;
    height: 28px;
  }

  .nav-tab-label {
    font-size: 0.66rem;
    line-height: 1.15;
    padding: 0;
  }
}

@media print {
  :root {
    --print-sheet-scale: 1.05;
  }

  @page {
    size: A4 portrait;
    margin: 8mm;
  }

  :root {
    background: #fff;
  }

  html,
  body {
    background: #fff;
    width: 210mm;
    margin: 0;
    padding: 0;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .app-shell {
    width: auto;
    margin: 0;
    padding: 0;
  }

  .hero,
  .form-panel,
  .preview-modal-backdrop,
  .preview-modal-heading {
    display: none !important;
  }

  .workspace,
  .preview-modal {
    display: block;
    margin: 0;
    padding: 0;
  }

  .preview-modal {
    position: static;
    inset: auto;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }

  .preview-panel,
  .preview-modal-panel {
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    width: auto;
    max-height: none;
    overflow: visible;
  }

  .panel-heading {
    display: none;
  }

  body.print-first-document .app-shell,
  body.print-first-document .preview-modal,
  body.print-first-document #preview-documents {
    display: none !important;
  }

  body.print-minutes-page-1 .app-shell,
  body.print-minutes-page-2 .app-shell,
  body.print-minutes-page-3 .app-shell {
    display: none !important;
  }

  body.print-minutes-page-1 .preview-modal,
  body.print-minutes-page-2 .preview-modal,
  body.print-minutes-page-3 .preview-modal {
    display: block !important;
    position: static;
    inset: auto;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }

  body.print-minutes-page-1 #preview-documents .preview-document:not(:first-child) {
    display: none !important;
  }

  body.print-minutes-page-2 #preview-documents .preview-document:not(:nth-child(2)) {
    display: none !important;
  }

  body.print-minutes-page-3 #preview-documents .preview-document:not(:nth-child(3)) {
    display: none !important;
  }

  body.print-first-document .first-print-template {
    display: block !important;
  }

  body.print-first-document #preview-documents .preview-document:not(:first-child) {
    display: none !important;
  }

  body.print-second-document .app-shell,
  body.print-second-document .preview-modal,
  body.print-second-document #preview-documents,
  body.print-second-document .first-print-template {
    display: none !important;
  }

  body.print-second-document .second-print-template {
    display: block !important;
  }

  body.print-third-document .app-shell,
  body.print-third-document .preview-modal,
  body.print-third-document #preview-documents,
  body.print-third-document .first-print-template,
  body.print-third-document .second-print-template {
    display: none !important;
  }

  body.print-third-document .third-print-template {
    display: block !important;
  }

  body.print-fourth-document .app-shell,
  body.print-fourth-document .preview-modal,
  body.print-fourth-document #preview-documents,
  body.print-fourth-document .first-print-template,
  body.print-fourth-document .second-print-template,
  body.print-fourth-document .third-print-template {
    display: none !important;
  }

  body.print-fourth-document .fourth-print-template {
    display: block !important;
  }

  body.print-fifth-document .app-shell,
  body.print-fifth-document .preview-modal,
  body.print-fifth-document #preview-documents,
  body.print-fifth-document .first-print-template,
  body.print-fifth-document .second-print-template,
  body.print-fifth-document .third-print-template,
  body.print-fifth-document .fourth-print-template {
    display: none !important;
  }

  body.print-fifth-document .fifth-print-template {
    display: block !important;
  }

  body.print-all-documents .app-shell,
  body.print-all-documents .preview-modal,
  body.print-all-documents #preview-documents {
    display: none !important;
  }

  body.print-all-documents .first-print-template,
  body.print-all-documents .second-print-template,
  body.print-all-documents .third-print-template,
  body.print-all-documents .fourth-print-template,
  body.print-all-documents .fifth-print-template {
    display: block !important;
  }

  .first-print-template > .pdf-print-sheet:not(:last-child),
  .third-print-template > .cost-print-sheet:not(:last-child) {
    break-after: page;
    page-break-after: always;
  }

  body.print-all-documents .first-print-template,
  body.print-all-documents .second-print-template,
  body.print-all-documents .third-print-template,
  body.print-all-documents .fourth-print-template {
    break-after: page;
    page-break-after: always;
  }

  .document-sheet {
    width: 194mm;
    height: 279mm;
    margin: 0 auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: #fff;
    overflow: visible;
    break-inside: avoid;
    page-break-inside: avoid;
    box-sizing: border-box;
  }

  .pdf-print-sheet,
  .approval-print-sheet,
  .cost-print-sheet,
  .assignment-print-sheet,
  .result-print-sheet {
    width: calc(100% / var(--print-sheet-scale));
    height: auto;
    min-height: 100%;
    box-sizing: border-box;
    overflow: visible;
    break-inside: avoid;
    page-break-inside: avoid;
    transform: scale(var(--print-sheet-scale));
    transform-origin: top center;
  }

  .minutes-table {
    font-size: 11px;
    line-height: 1.18;
  }

  .minutes-table td,
  .minutes-table th {
    padding: 5px 6px;
  }

  .preview-item-grid span {
    padding: 5px 6px;
  }

  .minutes-title {
    padding: 8px 6px;
    font-size: 14px;
  }

  .label-cell {
    width: 24%;
  }

  .narrative-cell p,
  .closing-cell {
    line-height: 1.35;
  }

  .signature-row td {
    padding: 10px 6px 8px;
  }

  .signature-block {
    min-height: auto;
    gap: 0;
  }
}

.landing-shell,
.placeholder-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.landing-card,
.placeholder-card {
  width: min(720px, 100%);
  padding: 40px 32px;
  border-radius: 32px;
  border: 1px solid var(--border-landing);
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.98) 0%, rgba(252, 250, 246, 0.99) 45%, rgba(247, 243, 234, 0.96) 100%),
    var(--paper);
  box-shadow: var(--shadow);
  text-align: center;
}

.landing-card-tabs {
  width: min(1040px, 100%);
  padding: 28px 20px 20px;
  border: none;
  background: transparent;
  box-shadow: none;
}

/* Ana sayfa: kart/dikdörtgen çerçevesi yok — doğrudan sayfa zemini */
.landing-card.landing-card-tabs {
  width: min(1200px, 100%);
  max-width: 100%;
  margin: 0 auto;
  padding: 24px 16px 32px;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  outline: none;
}

.landing-logo {
  width: clamp(110px, 16vw, 170px);
  height: auto;
  display: block;
  margin: 0 auto 16px;
  filter: drop-shadow(0 18px 24px rgba(22, 41, 56, 0.08));
}

.page-logo-banner {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.page-logo {
  width: clamp(120px, 14vw, 180px);
  height: auto;
  display: block;
  filter: drop-shadow(0 10px 18px rgba(27, 35, 48, 0.08));
}

.landing-subtitle {
  margin: 0 auto 26px;
  max-width: 420px;
  color: var(--landing-subtitle-fg);
  font-weight: 700;
  line-height: 1.45;
  font-size: 12pt;
  letter-spacing: 0.02em;
}

.landing-card h1,
.placeholder-card h1 {
  margin: 0 0 24px;
  font-family: "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: clamp(2rem, 4vw, 3rem);
}

.placeholder-card p {
  margin: 0 0 28px;
  color: var(--muted);
  line-height: 1.6;
}

.landing-actions {
  display: grid;
  gap: 16px;
}

.landing-actions-tabs {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 14px;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  padding: 8px 0 4px;
  border-radius: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  overflow-x: auto;
  scrollbar-width: none;
  backdrop-filter: none;
}

.landing-actions-tabs::-webkit-scrollbar {
  display: none;
}

/* Ana sayfa: menü öğeleri logo çevresinde dairesel */
.landing-orbit {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 12px 0 8px;
}

.landing-orbit-ring.landing-actions-tabs {
  --orbit-r: clamp(150px, 24vw, 252px);
  display: block;
  width: min(680px, 100%);
  aspect-ratio: 1;
  max-width: min(96vw, 680px);
  margin: 0 auto;
  padding: 0;
  overflow: visible;
  border: none;
  box-shadow: none;
  scrollbar-width: auto;
}

.landing-orbit-ring.landing-actions-tabs::-webkit-scrollbar {
  display: none;
}

.landing-orbit-track {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 0;
  width: calc(var(--orbit-r) * 2 + 56px);
  height: calc(var(--orbit-r) * 2 + 56px);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px dashed var(--border-nav);
  opacity: 0.5;
  pointer-events: none;
}

.landing-orbit-center {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: min(300px, 78vw);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.landing-orbit-center .landing-logo {
  margin: 0 0 12px;
}

.landing-orbit-center .landing-subtitle {
  margin: 0;
}

/* Konum: anasayfa.js (applyOrbitLayout) — CSS calc(var(--i)…) bazı ortamlarda tüm transform'u düşürüyordu */
.landing-orbit-ring .orbit-nav-item {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  cursor: pointer;
  pointer-events: auto;
  box-sizing: border-box;
  width: 7.35rem;
  min-width: 7.35rem;
  max-width: 7.35rem;
  transform-origin: center center;
}

.landing-orbit-ring .orbit-nav-item .nav-tab-icon {
  overflow: visible;
  pointer-events: auto;
  transform-origin: 50% 88%;
  will-change: transform;
  transition:
    transform 0.14s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    background 0.22s ease,
    color 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease;
}

@media (prefers-reduced-motion: reduce) {
  .landing-orbit-ring .orbit-nav-item .nav-tab-icon {
    transition: background 0.22s ease, color 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
  }
}

.nav-button {
  display: block;
  padding: 18px 22px;
  border-radius: 20px;
  background: var(--btn-primary-gradient);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  box-shadow: var(--nav-button-shadow);
}

.nav-button:hover {
  transform: translateY(-2px);
  background: var(--btn-primary-hover-gradient);
}

.nav-button.nav-tab:hover {
  transform: none;
  background: transparent;
  box-shadow: none;
}

.nav-tab {
  position: relative;
  z-index: 1;
  display: inline-grid;
  justify-items: center;
  gap: 10px;
  min-width: 92px;
  padding: 2px 2px 0;
  border-radius: 20px;
  background: transparent;
  color: var(--nav-tab-fg);
  text-decoration: none;
  font-weight: 700;
  box-shadow: none;
  transition: color 0.18s ease;
}

.nav-tab:hover {
  background: transparent;
}

.nav-tab-icon {
  position: relative;
  isolation: isolate;
  width: 64px;
  height: 64px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(ellipse 100% 70% at 50% -5%, rgba(255, 255, 255, 0.75), transparent 52%),
    linear-gradient(
      168deg,
      var(--nav-icon-bg-top) 0%,
      var(--nav-icon-bg-mid) 42%,
      var(--nav-icon-bg-bottom) 100%
    );
  border: 1px solid var(--border-nav);
  transition:
    background 0.22s ease,
    color 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease;
  color: var(--nav-tab-fg);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.98),
    inset 0 -2px 10px var(--nav-icon-inset-bottom),
    var(--nav-icon-shadow-outer),
    var(--nav-icon-shadow-glow);
}

.nav-tab-icon::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 17px;
  pointer-events: none;
  z-index: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
  opacity: 0.85;
}

.nav-icon-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

.nav-tab-icon svg {
  position: relative;
  z-index: 1;
  width: 32px;
  height: 32px;
  pointer-events: none;
  stroke: var(--nav-tab-fg);
  stroke-width: 1.32;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0.5px 0 rgba(255, 255, 255, 0.55));
}

.nav-tab.is-active .nav-tab-icon svg {
  stroke: var(--nav-tab-fg-strong);
}

.nav-tab-label {
  position: static;
  transform: none;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--nav-tab-fg);
  font-size: 0.78rem;
  line-height: 1.2;
  letter-spacing: 0.01em;
  white-space: normal;
  text-align: center;
  opacity: 1;
  pointer-events: auto;
  box-shadow: none;
  transition: color 0.18s ease;
}

.nav-tab.is-active {
  color: var(--nav-tab-fg-strong);
}

.nav-tab.is-active .nav-tab-icon {
  background:
    radial-gradient(ellipse 95% 65% at 50% -8%, rgba(255, 255, 255, 0.6), transparent 50%),
    linear-gradient(
      165deg,
      var(--nav-icon-bg-active-top) 0%,
      var(--nav-icon-bg-active-mid) 52%,
      var(--nav-icon-bg-active-bottom) 100%
    );
  color: var(--nav-tab-fg-strong);
  border-color: var(--border-nav-active);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.75),
    inset 0 -3px 14px var(--shadow-nav-inset),
    0 16px 40px rgba(15, 23, 42, 0.1),
    0 0 0 1px rgba(255, 255, 255, 0.45) inset,
    var(--nav-icon-shadow-active-glow);
}

.nav-tab:hover .nav-tab-icon {
  border-color: var(--border-nav-hover);
}

.nav-tab:hover .nav-tab-label,
.nav-tab:focus-visible .nav-tab-label,
.nav-tab.is-active .nav-tab-label {
  color: var(--nav-tab-fg-strong);
}

.nav-tab:focus-visible {
  outline: none;
}

.nav-tab:focus-visible .nav-tab-icon {
  box-shadow:
    0 0 0 3px var(--focus-ring-nav),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.contracts-shell {
  width: min(1400px, calc(100% - 40px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

.contracts-page-header {
  position: relative;
  display: block;
  margin-bottom: 24px;
  text-align: center;
}

.contracts-page-header > div:first-child {
  margin: 0 auto;
}

.contracts-page-header > .btn {
  position: absolute;
  right: 0;
  bottom: 0;
}

.contracts-page-header .panel-note {
  max-width: none;
  margin: 10px auto 0;
  text-align: center;
  white-space: nowrap;
}

.contracts-page-header h1 {
  margin: 0;
  font-family: inherit;
  font-size: clamp(2rem, 4vw, 3.1rem);
}

.contracts-today {
  margin: 10px 0 0;
  font-weight: 700;
  color: var(--ink);
}

.contracts-layout {
  display: grid;
  grid-template-columns: minmax(320px, 430px) minmax(420px, 1fr);
  gap: 24px;
  align-items: start;
}

.contracts-form-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.company-info-card {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(101, 112, 131, 0.14);
}

.company-info-card span {
  color: var(--muted);
}

.date-segment-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.date-segment-group span {
  font-weight: 700;
  color: var(--muted);
}

.date-segment {
  text-align: center;
}

.date-segment.day,
.date-segment.month {
  width: 72px;
}

.date-segment.year {
  width: 110px;
}

.contracts-list {
  display: grid;
  gap: 14px;
}

.contracts-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.contracts-filter {
  border: 1px solid rgba(101, 112, 131, 0.2);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.contracts-filter.is-active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.contracts-empty {
  padding: 26px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px dashed rgba(101, 112, 131, 0.26);
  color: var(--muted);
  text-align: center;
}

.contract-card {
  padding: 14px 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(101, 112, 131, 0.16);
  box-shadow: 0 10px 28px rgba(16, 24, 40, 0.05);
}

.contract-card.is-alert {
  border-color: rgba(220, 38, 38, 0.45);
  animation: contract-alert-blink 1s ease-in-out infinite;
}

.contract-card.is-expired {
  opacity: 0.48;
  background: rgba(241, 245, 249, 0.72);
  border-color: rgba(148, 163, 184, 0.3);
  box-shadow: none;
}

.contract-card-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  margin-bottom: 10px;
}

.contract-card-meta,
.contract-card-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.contract-badge,
.contract-alert,
.contract-expired {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
}

.contract-badge {
  background: rgba(31, 153, 42, 0.12);
  color: #166534;
}

.contract-alert {
  background: rgba(220, 38, 38, 0.12);
  color: #b91c1c;
}

.contract-expired {
  background: rgba(100, 116, 139, 0.12);
  color: #475569;
}

.contract-card h3 {
  margin: 0 0 10px;
  font-size: 1rem;
}

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

.contract-card-details p {
  margin: 0;
  line-height: 1.35;
}

.contract-card-full {
  grid-column: 1 / -1;
}

@keyframes contract-alert-blink {
  0%,
  100% {
    box-shadow: 0 0 0 rgba(220, 38, 38, 0);
    background: rgba(255, 255, 255, 0.85);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(220, 38, 38, 0.12);
    background: rgba(254, 242, 242, 0.95);
  }
}

.firms-shell {
  width: min(1400px, calc(100% - 40px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

.firms-page-header {
  position: relative;
  display: block;
  margin-bottom: 24px;
  text-align: center;
}

.firms-page-header h1 {
  margin: 0;
  font-family: "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: clamp(2rem, 4vw, 3.1rem);
}

.firms-page-header > div:first-child {
  margin: 0 auto;
}

.firms-page-header > .btn {
  position: absolute;
  right: 0;
  bottom: 0;
}

.firms-page-header .panel-note {
  max-width: none;
  margin: 10px auto 0;
  text-align: center;
  white-space: nowrap;
}

.firms-layout {
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(420px, 1fr);
  gap: 24px;
  align-items: start;
}

.firms-form-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.firm-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.firm-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(101, 112, 131, 0.14);
}

.firm-row-main {
  display: grid;
  gap: 4px;
}

.firm-row-main strong {
  font-size: 1rem;
}

.firm-row-main span {
  color: var(--muted);
  line-height: 1.45;
}

.firm-row-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.firms-empty {
  padding: 26px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px dashed rgba(101, 112, 131, 0.26);
  color: var(--muted);
  text-align: center;
}

.confirm-dialog {
  width: min(460px, calc(100% - 32px));
  padding: 0;
  border: 0;
  border-radius: 28px;
  background: transparent;
}

.confirm-dialog::backdrop {
  background: rgba(15, 23, 42, 0.28);
  backdrop-filter: blur(2px);
}

.confirm-dialog-card {
  padding: 28px;
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(255, 253, 248, 0.98), rgba(247, 241, 228, 0.98)),
    var(--paper);
  box-shadow: var(--shadow);
}

.confirm-dialog-card h2 {
  margin: 0 0 10px;
}

.confirm-dialog-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.confirm-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 22px;
  flex-wrap: wrap;
}

.games-shell {
  width: min(1480px, calc(100% - 40px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

.games-page-header {
  position: relative;
  display: block;
  margin-bottom: 24px;
  text-align: center;
}

.games-page-header h1 {
  margin: 0;
  font-family: "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: clamp(2rem, 4vw, 3.1rem);
}

.games-page-header > div:first-child {
  margin: 0 auto;
}

.games-page-header > .btn,
.games-page-header > .games-header-actions {
  position: absolute;
  right: 0;
  bottom: 0;
}

.games-page-header .panel-note {
  max-width: none;
  margin: 10px auto 0;
  text-align: center;
}

.games-header-actions,
.xox-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.game-stage-shell {
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(420px, 1fr) 170px;
  gap: 22px;
  align-items: center;
  margin-top: 56px;
}

.game-page-header-side {
  display: block;
  margin: 0;
  text-align: left;
}

.game-page-intro {
  display: grid;
  gap: 12px;
  justify-items: start;
}

.game-page-logo-banner {
  margin: 0;
}

.game-page-copy {
  text-align: left;
  max-width: 280px;
}

.game-page-copy .panel-note {
  margin: 8px 0 0;
  text-align: left;
}

.game-header-actions-side {
  display: grid;
  gap: 10px;
  justify-items: end;
  align-self: center;
  padding-top: 0;
}

.game-header-actions-side .btn {
  min-width: 150px;
}

.game-layout-side {
  margin-top: 0;
  align-self: start;
}

.game-layout-side .game-panel {
  margin: 0;
}

.xox-stage-shell {
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(420px, 1fr) 170px;
  gap: 22px;
  align-items: center;
  margin-top: 56px;
}

.xox-page-header {
  display: block;
  margin: 0;
  text-align: left;
}

.xox-page-intro {
  display: grid;
  gap: 12px;
  justify-items: start;
}

.xox-page-logo-banner {
  margin: 0;
}

.xox-page-copy {
  text-align: left;
  max-width: 280px;
}

.xox-page-copy .panel-note {
  margin: 8px 0 0;
  text-align: left;
}

.xox-header-actions {
  display: grid;
  gap: 10px;
  justify-items: end;
  align-self: center;
  padding-top: 0;
}

.xox-header-actions .btn {
  min-width: 150px;
}

.xox-game-layout {
  margin-top: 0;
  align-self: start;
}

.xox-game-layout .game-panel {
  margin: 0;
}

.games-menu-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  justify-content: stretch;
  align-items: stretch;
  gap: 18px;
}

.game-choice-card {
  position: relative;
  display: grid;
  grid-template-rows: auto 92px auto;
  min-height: 320px;
  gap: 14px;
  padding: 18px;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.42), transparent 38%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(235, 241, 248, 0.9));
  box-shadow:
    0 22px 44px rgba(16, 24, 40, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  color: var(--ink);
  text-decoration: none;
  text-align: left;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.game-choice-card::before {
  content: "";
  position: absolute;
  inset: auto -12% -18% 45%;
  height: 160px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
  filter: blur(4px);
  transform: rotate(-12deg);
  pointer-events: none;
}

.game-choice-card:hover {
  transform: translateY(-6px) scale(1.015);
  border-color: rgba(255, 255, 255, 0.75);
  box-shadow:
    0 30px 54px rgba(16, 24, 40, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.game-choice-top {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.game-choice-tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.44);
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: rgba(15, 23, 42, 0.78);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.game-choice-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  font-family: "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: 1.18rem;
  font-weight: 700;
  line-height: 1;
}

.game-choice-copy {
  position: relative;
  z-index: 1;
  display: grid;
  align-self: stretch;
  align-content: start;
  gap: 8px;
  margin-top: auto;
}

.game-choice-copy strong {
  font-family: "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: clamp(1.1rem, 1.55vw, 1.48rem);
  line-height: 1.12;
  word-break: break-word;
}

.game-choice-copy span {
  color: rgba(27, 35, 48, 0.76);
  line-height: 1.38;
  font-size: 0.86rem;
}

.game-choice-card--snake {
  background:
    radial-gradient(circle at top right, rgba(161, 255, 202, 0.48), transparent 42%),
    linear-gradient(145deg, rgba(233, 252, 239, 0.96), rgba(198, 244, 212, 0.9));
}

.game-choice-card--xox {
  background:
    radial-gradient(circle at top right, rgba(210, 226, 255, 0.52), transparent 42%),
    linear-gradient(145deg, rgba(239, 245, 255, 0.96), rgba(210, 226, 248, 0.9));
}

.game-choice-card--tetris {
  background:
    radial-gradient(circle at top right, rgba(255, 228, 178, 0.5), transparent 42%),
    linear-gradient(145deg, rgba(255, 245, 230, 0.96), rgba(255, 224, 186, 0.9));
}

.game-choice-card--mines {
  background:
    radial-gradient(circle at top right, rgba(214, 214, 255, 0.5), transparent 42%),
    linear-gradient(145deg, rgba(243, 244, 255, 0.96), rgba(219, 224, 255, 0.9));
}

.game-choice-card--rps {
  background:
    radial-gradient(circle at top right, rgba(255, 214, 214, 0.52), transparent 42%),
    linear-gradient(145deg, rgba(255, 241, 241, 0.96), rgba(255, 217, 217, 0.9));
}


.game-choice-media {
  position: relative;
  z-index: 1;
  min-height: 88px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.48);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.18));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.64),
    0 10px 20px rgba(16, 24, 40, 0.08);
  overflow: hidden;
}

.game-choice-media::after {
  content: "";
  position: absolute;
  inset: -20% auto auto 62%;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  filter: blur(8px);
}

.snake-art {
  position: relative;
  width: 150px;
  height: 74px;
}

.snake-art-segment,
.snake-art-apple {
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 6px;
}

.snake-art-segment {
  background: linear-gradient(145deg, #1f992a, #0f6c17);
  box-shadow: 0 6px 12px rgba(31, 153, 42, 0.26);
}

.snake-art-segment:nth-child(1) {
  left: 20px;
  top: 36px;
}

.snake-art-segment:nth-child(2) {
  left: 40px;
  top: 36px;
}

.snake-art-segment:nth-child(3) {
  left: 60px;
  top: 36px;
}

.snake-art-segment:nth-child(4) {
  left: 60px;
  top: 16px;
}

.snake-art-head {
  left: 80px;
  top: 16px;
  background: linear-gradient(145deg, #22c55e, #15803d);
}

.snake-art-head::after {
  content: "";
  position: absolute;
  right: 4px;
  top: 6px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #fff;
}

.snake-art-apple {
  right: 18px;
  top: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fb7185, #dc2626 70%);
  box-shadow: 0 8px 16px rgba(220, 38, 38, 0.22);
}

.snake-art-apple::before {
  content: "";
  position: absolute;
  left: 8px;
  top: -6px;
  width: 2px;
  height: 8px;
  background: #166534;
  border-radius: 999px;
}

.xox-art,
.mines-art {
  display: grid;
  grid-template-columns: repeat(3, 28px);
  gap: 6px;
}

.xox-art span,
.mines-art span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.44);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.68);
  font-family: "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-weight: 700;
}

.xox-art span:nth-child(odd) {
  color: #1d4ed8;
}

.xox-art span:nth-child(even) {
  color: #dc2626;
}

.tetris-art {
  position: relative;
  width: 146px;
  height: 78px;
}

.tetris-block {
  position: absolute;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  box-shadow: 0 8px 14px rgba(16, 24, 40, 0.12);
}

.tetris-block-a {
  left: 12px;
  top: 38px;
  background: #06b6d4;
}

.tetris-block-b {
  left: 38px;
  top: 38px;
  background: #06b6d4;
}

.tetris-block-c {
  left: 64px;
  top: 38px;
  background: #06b6d4;
}

.tetris-block-d {
  left: 90px;
  top: 38px;
  background: #06b6d4;
}

.tetris-block-e {
  left: 76px;
  top: 10px;
  background: #a855f7;
}

.tetris-block-f {
  left: 102px;
  top: 10px;
  background: #a855f7;
}

.mines-art .is-flag {
  color: #1d4ed8;
}

.mines-art .is-mine {
  color: #b91c1c;
}

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


.rps-art-badge {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.48);
  box-shadow: 0 10px 18px rgba(16, 24, 40, 0.08);
  font-size: 1.35rem;
}

.game-layout {
  display: grid;
}

.game-panel {
  max-width: 860px;
  width: 100%;
  margin: 0 auto;
}

.game-info-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.game-stat {
  min-width: 120px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(101, 112, 131, 0.14);
}

.game-stat span {
  display: block;
  color: var(--muted);
  margin-bottom: 4px;
}

.game-stat strong {
  font-size: 1.4rem;
}

.snake-stage {
  display: flex;
  justify-content: center;
}

#snake-canvas {
  width: min(100%, 420px);
  height: auto;
  display: block;
  border: 1px solid rgba(101, 112, 131, 0.18);
  background: #f8fafc;
  box-shadow: inset 0 0 0 1px rgba(196, 204, 215, 0.32);
}

.game-status {
  margin: 18px 0 6px;
  font-weight: 700;
}

.game-help {
  margin: 0 0 20px;
  color: var(--muted);
  line-height: 1.6;
}

.snake-controls {
  width: min(260px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  grid-template-areas:
    ". up ."
    "left down right";
}

.snake-control-btn {
  min-height: 54px;
  border: 1px solid rgba(101, 112, 131, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease;
}

.snake-control-btn:hover {
  transform: translateY(-1px);
  background: rgba(31, 153, 42, 0.08);
}

.snake-control-btn.up {
  grid-area: up;
}

.snake-control-btn.left {
  grid-area: left;
}

.snake-control-btn.down {
  grid-area: down;
}

.snake-control-btn.right {
  grid-area: right;
}

.xox-mode-switch {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.xox-mode-button {
  border: 1px solid rgba(101, 112, 131, 0.2);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.xox-mode-button.is-active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.xox-board {
  display: grid;
  grid-template-columns: repeat(3, 88px);
  justify-content: center;
  gap: 10px;
  margin: 18px 0 22px;
}

.xox-cell {
  aspect-ratio: 1 / 1;
  border: 1px solid rgba(101, 112, 131, 0.18);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
  font-family: "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: 2.2rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.xox-cell:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: rgba(31, 153, 42, 0.32);
  background: rgba(31, 153, 42, 0.06);
}

.xox-cell:disabled {
  cursor: default;
}

.xox-cell.is-x {
  color: #1d4ed8;
}

.xox-cell.is-o {
  color: #dc2626;
}

.xox-cell.is-win {
  background: rgba(31, 153, 42, 0.14);
  border-color: rgba(31, 153, 42, 0.4);
}

.tetris-layout {
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(220px, 1fr);
  gap: 24px;
  align-items: start;
}

.tetris-stage {
  display: flex;
  justify-content: center;
}

#tetris-canvas,
#tetris-next-canvas {
  display: block;
  border: 1px solid rgba(101, 112, 131, 0.18);
  background: #f8fafc;
}

.tetris-side-panel {
  display: grid;
  gap: 16px;
  align-content: start;
}

.tetris-next-card,
.rps-result-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(101, 112, 131, 0.14);
}

.tetris-next-card span,
.rps-result-card span {
  color: var(--muted);
  font-weight: 700;
}

.mines-board {
  display: grid;
  grid-template-columns: repeat(9, 44px);
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
}

.mines-cell {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(101, 112, 131, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.mines-cell:hover {
  transform: translateY(-1px);
  border-color: rgba(31, 153, 42, 0.32);
}

.mines-cell.is-open {
  background: rgba(226, 232, 240, 0.82);
  cursor: default;
}

.mines-cell.is-mine {
  background: rgba(239, 68, 68, 0.18);
  color: #b91c1c;
}

.mines-cell.is-flagged {
  background: rgba(59, 130, 246, 0.12);
  color: #1d4ed8;
}

.mines-cell[data-value="1"] {
  color: #2563eb;
}

.mines-cell[data-value="2"] {
  color: #15803d;
}

.mines-cell[data-value="3"] {
  color: #dc2626;
}

.mines-cell[data-value="4"] {
  color: #7c3aed;
}

.rps-choices {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 14px;
  margin: 18px 0 24px;
}

.rps-choice-btn {
  min-height: 84px;
  display: grid;
  gap: 6px;
  place-items: center;
  border: 1px solid rgba(101, 112, 131, 0.18);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
  font-family: "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: 1.5rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.rps-choice-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(31, 153, 42, 0.3);
  background: rgba(31, 153, 42, 0.06);
}

.rps-choice-icon {
  font-size: 2rem;
  line-height: 1;
}

.rps-choice-btn.is-picked {
  animation: rps-pick-bounce 0.45s ease;
  border-color: rgba(31, 153, 42, 0.4);
  background: rgba(31, 153, 42, 0.12);
}

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

.rps-result-card strong {
  font-size: 1.6rem;
}

.rps-result-icon {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  margin: 2px 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(101, 112, 131, 0.14);
  font-size: 2rem;
  line-height: 1;
}

.rps-result-card.is-revealed {
  animation: rps-card-reveal 0.45s ease;
}

.rps-result-card.is-win {
  border-color: rgba(31, 153, 42, 0.36);
  background: rgba(31, 153, 42, 0.1);
}

.rps-result-card.is-lose {
  border-color: rgba(239, 68, 68, 0.32);
  background: rgba(239, 68, 68, 0.08);
}

.rps-result-card.is-draw {
  border-color: rgba(59, 130, 246, 0.28);
  background: rgba(59, 130, 246, 0.08);
}


@keyframes rps-pick-bounce {
  0% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.08);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes rps-card-reveal {
  0% {
    transform: translateY(8px) scale(0.96);
    opacity: 0.55;
  }
  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

@media (max-width: 980px) {
  .games-page-header,
  .contracts-page-header,
  .contracts-layout,
  .firms-page-header,
  .firms-layout {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .firm-row {
    flex-direction: column;
    align-items: stretch;
  }

  .tetris-layout,
  .rps-result-grid,
  .contract-card-details {
    grid-template-columns: 1fr;
  }

  .games-menu-grid {
    grid-template-columns: repeat(5, minmax(180px, 1fr));
    overflow-x: auto;
    align-items: stretch;
    padding-bottom: 8px;
  }

  .game-stage-shell {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .game-page-header-side {
    width: 100%;
  }

  .game-page-intro {
    justify-items: center;
  }

  .game-page-copy {
    max-width: none;
    text-align: center;
  }

  .game-page-copy .panel-note {
    text-align: center;
  }

  .game-header-actions-side {
    justify-items: stretch;
    padding-top: 0;
  }

  .xox-page-header {
    width: 100%;
  }

  .xox-stage-shell {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .xox-page-intro {
    justify-items: center;
  }

  .xox-page-copy {
    max-width: none;
    text-align: center;
  }

  .xox-page-copy .panel-note {
    text-align: center;
  }

  .xox-header-actions {
    justify-items: stretch;
    padding-top: 0;
  }

  .mines-board {
    grid-template-columns: repeat(9, minmax(30px, 1fr));
  }

  .mines-cell {
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
  }

  .rps-choices {
    grid-template-columns: 1fr;
  }

  .game-info-bar,
  .firm-row-actions,
  .confirm-dialog-actions {
    width: 100%;
  }
}

.damga-sheet {
  padding: 28px 34px 36px;
  background: #fff;
  overflow: visible;
  break-inside: avoid;
  page-break-inside: avoid;
}

.damga-page {
  width: min(1600px, calc(100% - 40px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

.damga-page-header {
  position: relative;
  padding: calc(42px + clamp(110px, 12vw, 160px)) 32px 32px;
  border: 1px solid rgba(101, 112, 131, 0.18);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(255, 253, 248, 0.97), rgba(247, 241, 228, 0.96)),
    var(--paper);
  box-shadow: var(--shadow);
}

.damga-page-logo-shell {
  position: absolute;
  top: 26px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.damga-page-logo {
  width: clamp(110px, 12vw, 160px);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(27, 35, 48, 0.08));
}

.damga-page-copy {
  display: grid;
  gap: 16px;
  justify-items: center;
  text-align: center;
}

.damga-page-copy h1,
.damga-card-heading h2 {
  margin: 0;
  font-family: "Palatino Linotype", "Book Antiqua", Georgia, serif;
}

.damga-page-copy h1 {
  font-size: clamp(1.35rem, 2.5vw, 2.6rem);
  line-height: 1.05;
}

.damga-page-text,
.damga-card-note {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.damga-page-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-top: 24px;
}

.damga-page-actions > a:first-child {
  margin-right: auto;
}

.damga-page-grid {
  display: grid;
  grid-template-columns: minmax(380px, 640px) minmax(380px, 1fr);
  gap: 24px;
  margin-top: 24px;
  align-items: start;
}

.damga-card {
  padding: 28px;
  border-radius: var(--radius-lg);
  background: rgba(255, 253, 248, 0.92);
  border: 1px solid rgba(101, 112, 131, 0.18);
  box-shadow: var(--shadow);
}

.damga-preview-card {
  background:
    linear-gradient(180deg, rgba(255, 250, 242, 0.96), rgba(255, 255, 255, 0.94)),
    #fff;
}

.damga-card-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin-bottom: 24px;
}

.damga-card-heading h2 {
  font-size: 1.8rem;
}

.damga-letter {
  min-height: 100%;
  color: #111;
  font-family: "Times New Roman", Times, serif;
  font-size: 12pt;
  line-height: 1.3;
}

.damga-letter p {
  margin: 0;
}

.damga-letterhead {
  display: grid;
  justify-items: center;
  gap: 0;
  margin-top: 8mm;
  margin-bottom: 10mm;
  text-align: center;
}

.damga-meta-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 20px;
  margin-bottom: 10mm;
  width: 100%;
}

.damga-meta-left {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.damga-meta-date {
  min-width: 140px;
  text-align: right;
  white-space: nowrap;
  justify-self: end;
}

.damga-target {
  margin-bottom: 20mm;
  text-align: center;
  font-weight: 700;
}

.damga-paragraph {
  margin-bottom: 9mm !important;
  text-indent: 15mm;
  text-align: justify;
}

.damga-signature {
  width: 62mm;
  margin-top: 22mm;
  margin-left: auto;
  text-align: center;
}

.damga-signature p {
  line-height: 1.15;
}

@media (max-width: 1180px) {
  .damga-page-grid {
    grid-template-columns: 1fr;
  }

  .damga-page-header,
  .damga-card-heading {
    flex-direction: column;
    align-items: stretch;
  }

  .damga-letter {
    font-size: 17px;
  }

  .damga-sheet {
    padding: 22px;
  }
}

@media (max-width: 720px) {
  .damga-page {
    width: min(100% - 24px, 1600px);
    padding-top: 18px;
  }

  .damga-page-header,
  .damga-card {
    padding: 20px;
  }

  .damga-page-header {
    padding: calc(30px + clamp(96px, 28vw, 140px)) 20px 20px;
  }

  .damga-page-logo-shell {
    top: 18px;
  }

  .damga-meta-row {
    grid-template-columns: 1fr;
    gap: 14px;
    margin-bottom: 36px;
  }

  .damga-meta-date {
    text-align: left;
    justify-self: start;
  }

  .damga-target {
    margin-bottom: 40px;
  }

  .damga-signature {
    width: 100%;
    margin-top: 52px;
  }
}

@media print {
  .damga-page {
    width: auto;
    margin: 0;
    padding: 0;
  }

  .damga-page-header,
  .damga-form-card {
    display: none !important;
  }

  .damga-page-grid {
    display: block;
    margin: 0;
  }

  .damga-preview-card {
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .damga-card-heading {
    display: none;
  }

  .damga-sheet {
    width: 194mm;
    min-height: 279mm;
    margin: 0 auto;
    padding: 0;
    box-shadow: none;
    border: 0;
    border-radius: 0;
    background: #fff;
    overflow: visible;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .damga-letter {
    min-height: 279mm;
    padding: 8mm;
    font-family: "Times New Roman", Times, serif;
    font-size: 12pt;
    line-height: 1.3;
  }

  .damga-letterhead {
    margin-top: 8mm;
    margin-bottom: 10mm;
  }

  .damga-meta-row {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 8mm;
    margin-bottom: 10mm;
  }

  .damga-meta-left {
    gap: 0;
  }

  .damga-meta-left p {
    line-height: 1.15;
  }

  .damga-meta-date {
    min-width: 32mm;
    justify-self: end;
    align-self: end;
    text-align: right;
    white-space: nowrap;
    line-height: 1.15;
  }

  .damga-target {
    margin-bottom: 20mm;
  }

  .damga-paragraph {
    margin-bottom: 9mm !important;
    text-indent: 15mm;
  }

  .damga-signature {
    width: 62mm;
    margin-top: 22mm;
  }
}

.tax-page {
  width: min(1600px, calc(100% - 40px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

.tax-page-header {
  position: relative;
  padding: calc(42px + clamp(110px, 12vw, 160px)) 32px 32px;
  border: 1px solid rgba(101, 112, 131, 0.18);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(255, 253, 248, 0.97), rgba(247, 241, 228, 0.96)),
    var(--paper);
  box-shadow: var(--shadow);
}

.tax-page-logo-shell {
  position: absolute;
  top: 26px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.tax-page-logo {
  width: clamp(110px, 12vw, 160px);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(27, 35, 48, 0.08));
}

.tax-page-copy {
  display: grid;
  gap: 16px;
  justify-items: center;
  text-align: center;
}

.tax-page-copy h1,
.tax-card-heading h2 {
  margin: 0;
  font-family: "Palatino Linotype", "Book Antiqua", Georgia, serif;
}

.tax-page-copy h1 {
  font-size: clamp(1.35rem, 2.5vw, 2.6rem);
  line-height: 1.05;
}

.tax-page-text,
.tax-card-note {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.tax-page-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-top: 24px;
}

.tax-page-actions > a:first-child {
  margin-right: auto;
}

.tax-page-grid {
  display: grid;
  grid-template-columns: minmax(380px, 620px) minmax(380px, 1fr);
  gap: 24px;
  margin-top: 24px;
  align-items: start;
}

.tax-card {
  padding: 28px;
  border-radius: var(--radius-lg);
  background: rgba(255, 253, 248, 0.92);
  border: 1px solid rgba(101, 112, 131, 0.18);
  box-shadow: var(--shadow);
}

.tax-result-card {
  background:
    linear-gradient(180deg, rgba(255, 250, 242, 0.96), rgba(255, 255, 255, 0.94)),
    #fff;
}

.tax-card-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin-bottom: 24px;
}

.tax-card-heading h2 {
  font-size: 1.8rem;
}

.tax-info-note {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 14px 16px;
  border: 1px solid rgba(31, 153, 42, 0.18);
  border-radius: 16px;
  background: rgba(31, 153, 42, 0.06);
  color: #264231;
  line-height: 1.5;
}

.tax-info-note strong {
  color: var(--accent);
}

.tax-summary {
  display: grid;
  gap: 18px;
  padding: 24px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(101, 112, 131, 0.14);
}

.tax-summary-title {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(101, 112, 131, 0.14);
}

.tax-summary-logo {
  width: 64px;
  height: auto;
  flex: 0 0 auto;
}

.tax-summary-title p {
  margin: 0 0 4px;
  font-weight: 800;
  color: var(--ink);
}

.tax-summary-title span {
  color: var(--muted);
  font-weight: 700;
}

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

.tax-result-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(27, 35, 48, 0.04);
  border: 1px solid rgba(101, 112, 131, 0.12);
}

.tax-result-row span {
  color: #475569;
  font-weight: 700;
}

.tax-result-row strong {
  color: var(--ink);
  font-size: 1.06rem;
  text-align: right;
  white-space: nowrap;
}

.tax-result-row-strong {
  background: rgba(31, 153, 42, 0.08);
  border-color: rgba(31, 153, 42, 0.22);
}

.tax-result-row-total {
  background: var(--ink);
  border-color: var(--ink);
}

.tax-result-row-total span,
.tax-result-row-total strong {
  color: #fff;
}

.tax-result-row-total strong {
  font-size: 1.22rem;
}

.tax-formula {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(185, 124, 49, 0.08);
  border: 1px solid rgba(185, 124, 49, 0.16);
}

.tax-formula p {
  margin: 0;
  color: #5c4a33;
  line-height: 1.55;
}

@media (max-width: 1180px) {
  .tax-page-grid {
    grid-template-columns: 1fr;
  }

  .tax-card-heading {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 720px) {
  .tax-page {
    width: min(100% - 24px, 1600px);
    padding-top: 18px;
  }

  .tax-page-header,
  .tax-card {
    padding: 20px;
  }

  .tax-page-header {
    padding: calc(30px + clamp(96px, 28vw, 140px)) 20px 20px;
  }

  .tax-page-logo-shell {
    top: 18px;
  }

  .tax-info-note {
    grid-template-columns: 1fr;
  }

  .tax-summary {
    padding: 18px;
  }

  .tax-result-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .tax-result-row strong {
    text-align: left;
  }
}

@media print {
  .tax-page {
    width: auto;
    margin: 0;
    padding: 0;
  }

  .tax-page-header,
  .tax-form-card {
    display: none !important;
  }

  .tax-page-grid {
    display: block;
    margin: 0;
  }

  .tax-result-card {
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .tax-card-heading {
    display: none;
  }

  .tax-summary {
    width: 190mm;
    margin: 0 auto;
    padding: 14mm;
    border: 0;
    border-radius: 0;
    background: #fff;
  }
}

.petition-page {
  width: min(1600px, calc(100% - 40px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

.petition-page-header {
  position: relative;
  padding: 32px 32px 32px;
  border: 1px solid rgba(101, 112, 131, 0.18);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(255, 253, 248, 0.97), rgba(247, 241, 228, 0.96)),
    var(--paper);
  box-shadow: var(--shadow);
}

.petition-page-copy {
  display: grid;
  gap: 16px;
  justify-items: center;
  text-align: center;
}

.petition-page-copy h1,
.petition-preview-card .panel-heading h2 {
  margin: 0;
  font-family: "Palatino Linotype", "Book Antiqua", Georgia, serif;
}

.petition-page-copy h1 {
  font-size: clamp(1.35rem, 2.5vw, 2.6rem);
  line-height: 1.05;
}

.petition-page-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-top: 24px;
}

.petition-page-actions > a:first-child {
  margin-right: auto;
}

.petition-page-grid {
  display: grid;
  grid-template-columns: minmax(380px, 620px) minmax(380px, 1fr);
  gap: 24px;
  margin-top: 24px;
  align-items: start;
}

.petition-sheet {
  padding: 28px 34px 36px;
  background: #fff;
  overflow: visible;
  break-inside: avoid;
  page-break-inside: avoid;
}

.petition-document {
  min-height: 100%;
  color: #111;
  font-family: "Times New Roman", Times, serif;
  font-size: 12pt;
  line-height: 1.45;
}

.petition-document p {
  margin: 0;
}

.petition-document-header {
  display: grid;
  justify-items: center;
  gap: 2px;
  margin-top: 8mm;
  margin-bottom: 10mm;
  text-align: center;
  font-weight: 700;
}

.petition-document-date-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 12mm;
}

.petition-document-title {
  margin: 0 0 12mm;
  text-align: center;
  font-size: 15pt;
  letter-spacing: 0.04em;
}

.petition-document-target {
  margin-bottom: 14mm;
  text-align: center;
  font-weight: 700;
}

.petition-document-paragraph {
  margin-bottom: 9mm !important;
  text-indent: 15mm;
  text-align: justify;
}

.petition-document-date-note {
  text-indent: 0;
  text-align: right;
  margin-top: -2mm;
}

.petition-document-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-top: 24mm;
}

.petition-document-contact {
  max-width: 82mm;
}

.petition-document-contact p {
  line-height: 1.45;
}

.petition-document-contact p + p {
  margin-top: 3mm;
}

.petition-document-signature {
  width: 62mm;
  margin-left: auto;
  text-align: center;
}

.petition-document-signature p,
.petition-document-signature strong,
.petition-document-signature span {
  display: block;
  line-height: 1.2;
}

.laws-page {
  width: min(1600px, calc(100% - 40px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

.laws-page-header {
  position: relative;
  padding: 32px 32px 32px;
  border: 1px solid rgba(101, 112, 131, 0.18);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(255, 253, 248, 0.97), rgba(247, 241, 228, 0.96)),
    var(--paper);
  box-shadow: var(--shadow);
}

.laws-page-copy {
  display: grid;
  gap: 16px;
  justify-items: center;
  text-align: center;
}

.laws-page-copy h1 {
  margin: 0;
  font-family: "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: clamp(1.35rem, 2.5vw, 2.6rem);
  line-height: 1.05;
}

.laws-page-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-top: 24px;
}

.laws-page-actions > a:first-child {
  margin-right: auto;
}

.laws-page-grid {
  display: grid;
  grid-template-columns: minmax(420px, 1.6fr) minmax(320px, 0.9fr);
  gap: 24px;
  margin-top: 24px;
  align-items: start;
}

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

.laws-card {
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(101, 112, 131, 0.12);
  background: rgba(255, 255, 255, 0.68);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.laws-card h3 {
  margin: 0 0 10px;
  font-size: 1rem;
}

.laws-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.laws-card-kicker {
  margin: 0 0 8px;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.laws-note-stack {
  display: grid;
  gap: 12px;
}

.laws-note-item {
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(27, 35, 48, 0.04);
  border: 1px solid rgba(101, 112, 131, 0.12);
}

.laws-note-item strong {
  display: block;
  margin-bottom: 6px;
}

.laws-note-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.laws-toolbar {
  margin-top: 24px;
}

.laws-toolbar-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto;
  gap: 16px;
  align-items: end;
}

.laws-search-field {
  min-width: 0;
}

.laws-filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.laws-filter-chip {
  border: 1px solid rgba(101, 112, 131, 0.16);
  border-radius: 999px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.laws-filter-chip:hover {
  transform: translateY(-1px);
}

.laws-filter-chip.is-active {
  background: rgba(141, 43, 43, 0.12);
  border-color: rgba(141, 43, 43, 0.32);
  color: var(--accent);
}

.laws-sidebar {
  display: grid;
  gap: 24px;
}

.laws-side-panel {
  min-height: 220px;
}

.laws-library,
.laws-side-list {
  display: grid;
  gap: 14px;
}

.laws-entry {
  padding: 20px;
  border-radius: 20px;
  border: 1px solid rgba(101, 112, 131, 0.12);
  background: rgba(255, 255, 255, 0.72);
}

.laws-entry-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}

.laws-entry-top h3 {
  margin: 4px 0 0;
}

.laws-entry-code {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.laws-entry-summary {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.laws-pin-button {
  border: 1px solid rgba(101, 112, 131, 0.16);
  border-radius: 999px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.laws-pin-button.is-active {
  background: rgba(141, 43, 43, 0.12);
  border-color: rgba(141, 43, 43, 0.28);
  color: var(--accent);
}

.laws-topic-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.laws-topic-chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(27, 35, 48, 0.06);
  color: #475569;
  font-size: 0.86rem;
  font-weight: 700;
}

.laws-entry-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.laws-side-link {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(101, 112, 131, 0.12);
  background: rgba(255, 255, 255, 0.72);
  color: inherit;
  text-decoration: none;
}

.laws-side-link span {
  color: var(--muted);
}

.laws-empty-state,
.laws-empty-side {
  padding: 18px;
  border-radius: 16px;
  background: rgba(27, 35, 48, 0.04);
  color: var(--muted);
}

.laws-empty-state strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
}

.laws-open-link {
  text-decoration: none;
}

@media (max-width: 1180px) {
  .petition-page-grid {
    grid-template-columns: 1fr;
  }

  .laws-toolbar-grid,
  .laws-page-grid,
  .laws-card-grid {
    grid-template-columns: 1fr;
  }

  .laws-filter-group {
    justify-content: flex-start;
  }

  .petition-page-header,
  .petition-preview-card .panel-heading {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 720px) {
  .petition-page {
    width: min(100% - 24px, 1600px);
    padding-top: 18px;
  }

  .laws-page {
    width: min(100% - 24px, 1600px);
    padding-top: 18px;
  }

  .petition-page-header,
  .petition-form-card,
  .petition-preview-card {
    padding: 20px;
  }

  .laws-page-header,
  .laws-intro-card,
  .laws-notes-card {
    padding: 20px;
  }

  .petition-page-actions {
    justify-content: stretch;
  }

  .laws-page-actions {
    justify-content: stretch;
  }

  .petition-page-actions > a:first-child {
    margin-right: 0;
  }

  .laws-page-actions > a:first-child {
    margin-right: 0;
  }

  .laws-entry-top {
    flex-direction: column;
  }

  .laws-entry-actions .btn,
  .laws-entry-actions .laws-open-link,
  .laws-filter-chip {
    width: 100%;
    justify-content: center;
  }

  .petition-document-date-row {
    flex-direction: column;
    gap: 8px;
  }

  .petition-document-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
  }

  .petition-sheet {
    padding: 18px;
  }
}

@media print {
  .petition-page {
    width: auto;
    margin: 0;
    padding: 0;
  }

  .petition-page-header,
  .petition-form-card {
    display: none !important;
  }

  .petition-page-grid {
    display: block;
    margin: 0;
  }

  .petition-preview-card {
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .petition-preview-card .panel-heading {
    display: none;
  }

  .petition-sheet {
    width: 194mm;
    min-height: 279mm;
    margin: 0 auto;
    padding: 0;
    box-shadow: none;
    border: 0;
    border-radius: 0;
    background: #fff;
  }

  .petition-document {
    min-height: 279mm;
    padding: 8mm;
    font-family: "Times New Roman", Times, serif;
    font-size: 12pt;
    line-height: 1.4;
  }
}

.armory-page {
  width: min(1600px, calc(100% - 40px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

.armory-page-header {
  position: relative;
  padding: 32px 32px 32px;
  border: 1px solid rgba(101, 112, 131, 0.18);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(255, 253, 248, 0.97), rgba(247, 241, 228, 0.96)),
    var(--paper);
  box-shadow: var(--shadow);
}

.armory-page-copy {
  display: grid;
  gap: 16px;
  justify-items: center;
  text-align: center;
}

.armory-page-copy h1,
.armory-preview-card .panel-heading h2 {
  margin: 0;
  font-family: "Palatino Linotype", "Book Antiqua", Georgia, serif;
}

.armory-page-copy h1 {
  font-size: clamp(1.35rem, 2.5vw, 2.6rem);
  line-height: 1.05;
}

.armory-page-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-top: 24px;
}

.armory-page-actions > a:first-child {
  margin-right: auto;
}

.armory-page-grid {
  display: grid;
  grid-template-columns: minmax(420px, 640px) minmax(420px, 1fr);
  gap: 24px;
  margin-top: 24px;
  align-items: start;
}

.armory-form-card,
.armory-preview-card {
  display: grid;
  gap: 20px;
}

.armory-form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}

.armory-subheading {
  padding-top: 6px;
  border-top: 1px solid rgba(101, 112, 131, 0.12);
}

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

.armory-personnel-table-wrap {
  overflow: auto;
  border: 1px solid rgba(101, 112, 131, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.7);
}

.armory-personnel-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
}

.armory-personnel-table th,
.armory-personnel-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(101, 112, 131, 0.1);
  text-align: left;
  vertical-align: top;
}

.armory-personnel-table th {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.armory-delete-button {
  border: 1px solid rgba(141, 43, 43, 0.2);
  border-radius: 999px;
  padding: 8px 14px;
  background: rgba(141, 43, 43, 0.08);
  color: var(--accent);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.armory-edit-button {
  margin-right: 8px;
  border: 1px solid rgba(101, 112, 131, 0.18);
  border-radius: 999px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.armory-sheet {
  padding: 28px 34px 36px;
  background: #fff;
  overflow: auto;
}

.armory-document {
  color: #111;
  font-family: "Times New Roman", Times, serif;
  font-size: 12pt;
  line-height: 1.45;
}

.armory-document-title {
  margin: 0 0 16mm;
  text-align: center;
  font-size: 17pt;
  font-weight: 700;
}

.armory-document-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.armory-document-table th,
.armory-document-table td {
  border: 1px solid #202020;
  padding: 8px 10px;
  text-align: left;
  vertical-align: middle;
}

.armory-document-table th {
  text-align: center;
  font-weight: 700;
}

.armory-document-table th:nth-child(1),
.armory-document-table td:nth-child(1) {
  width: 8%;
  text-align: center;
}

.armory-document-table th:nth-child(2),
.armory-document-table td:nth-child(2) {
  width: 24%;
}

.armory-document-table th:nth-child(3),
.armory-document-table td:nth-child(3) {
  width: 16%;
  text-align: center;
}

.armory-document-table th:nth-child(4),
.armory-document-table td:nth-child(4) {
  width: 36%;
}

.armory-document-table th:nth-child(5),
.armory-document-table td:nth-child(5) {
  width: 16%;
}

.armory-document-table td:nth-child(5) {
  min-height: 26px;
}

.armory-document-paragraphs {
  margin-top: 14mm;
  display: grid;
  gap: 6mm;
}

.armory-document-paragraphs p {
  margin: 0;
  text-align: justify;
  font-size: 13pt;
  line-height: 1.35;
}

.armory-document-signature {
  width: 78mm;
  margin-top: 10mm;
  margin-left: auto;
  text-align: center;
}

.armory-document-signature strong,
.armory-document-signature span {
  display: block;
  line-height: 1.2;
}

.armory-document-signature strong {
  margin-bottom: 2mm;
  font-size: 14pt;
}

@media (max-width: 1180px) {
  .armory-page-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .armory-page {
    width: min(100% - 24px, 1600px);
    padding-top: 18px;
  }

  .armory-page-header,
  .armory-form-card,
  .armory-preview-card {
    padding: 20px;
  }

  .armory-page-actions {
    justify-content: stretch;
  }

  .armory-page-actions > a:first-child {
    margin-right: 0;
  }

  .armory-form-actions .btn,
  .armory-page-actions .btn,
  .armory-page-actions a {
    width: 100%;
    justify-content: center;
  }

  .armory-sheet {
    padding: 18px;
  }

  .armory-document {
    font-size: 10.5pt;
  }

  .armory-document-paragraphs p {
    font-size: 11pt;
  }
}

@media print {
  .armory-page {
    width: auto;
    margin: 0;
    padding: 0;
  }

  .armory-page-header,
  .armory-form-card {
    display: none !important;
  }

  .armory-page-grid {
    display: block;
    margin: 0;
  }

  .armory-preview-card {
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .armory-preview-card .panel-heading {
    display: none;
  }

  .armory-sheet {
    width: 194mm;
    min-height: 279mm;
    margin: 0 auto;
    padding: 0;
    box-shadow: none;
    border: 0;
    border-radius: 0;
    background: #fff;
  }

  .armory-document {
    min-height: 279mm;
    padding: 8mm;
    font-size: 12pt;
    line-height: 1.4;
  }
}

/* Tema renkleri theme.js üzerinden --* değişkenleriyle uygulanır; eski html[data-theme="..."] blokları kaldırıldı. */

.settings-shell {
  min-height: 100vh;
  display: grid;
  justify-items: center;
  align-items: start;
  padding: 28px 24px 40px;
}

.settings-card {
  width: min(720px, 100%);
  padding: 36px 32px 40px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-ui);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.97) 0%, rgba(251, 248, 242, 0.98) 55%, rgba(245, 240, 230, 0.95) 100%),
    var(--paper);
  box-shadow: var(--shadow);
}

html[data-appearance="dark"] .settings-card {
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.96) 0%, rgba(15, 23, 42, 0.98) 100%);
}

.appearance-block {
  margin-bottom: 28px;
}

.appearance-toggle {
  display: flex;
  gap: 0;
  max-width: 360px;
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-ui);
  background: rgba(15, 23, 42, 0.04);
}

html[data-appearance="dark"] .appearance-toggle {
  background: rgba(0, 0, 0, 0.25);
}

.appearance-btn {
  flex: 1;
  margin: 0;
  padding: 10px 16px;
  border: 0;
  border-radius: calc(var(--radius-md) - 3px);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.appearance-btn:hover {
  color: var(--ink);
}

.appearance-btn.is-active {
  background: var(--sheet);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}

html[data-appearance="dark"] .appearance-btn.is-active {
  background: var(--sheet);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.settings-card h1 {
  margin: 0 0 8px;
  font-family: "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.settings-card .panel-note {
  margin: 0 0 28px;
  max-width: none;
}

.settings-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}
.settings-back svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-palette-fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.palette-fieldset-legend-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.palette-section-title {
  margin: 0 0 10px;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.02em;
}

.palette-section-title:not(:first-of-type) {
  margin-top: 28px;
}

.palette-hint {
  margin: 0 0 14px;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.45;
}

.theme-premium-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  border: 2px solid transparent;
  background: rgba(255, 255, 255, 0.56);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  font: inherit;
  color: inherit;
}

.theme-premium-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

html[data-appearance="dark"] .theme-premium-btn {
  background: rgba(255, 255, 255, 0.06);
}

html[data-appearance="dark"] .theme-premium-btn:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.theme-premium-btn.is-active {
  border-color: var(--brand);
  box-shadow: 0 0 0 1px var(--brand-muted);
}

.theme-premium-btn .theme-swatch {
  flex-shrink: 0;
}

.theme-premium-btn-text strong {
  display: block;
  font-size: 1.05rem;
  margin-bottom: 4px;
  color: var(--ink);
}

.theme-premium-btn-text span {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.4;
}

.theme-swatch {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.theme-swatch.theme-swatch--premium {
  background: linear-gradient(145deg, #eef1f7, #d4af37);
}

.palette-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
  gap: 10px;
  max-width: 100%;
}

.palette-swatch-btn {
  width: 100%;
  aspect-ratio: 1;
  max-width: 48px;
  margin: 0 auto;
  border-radius: 50%;
  border: 2px solid rgba(15, 23, 42, 0.12);
  cursor: pointer;
  padding: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.palette-swatch-btn:hover {
  transform: scale(1.06);
  border-color: rgba(15, 23, 42, 0.22);
}

.palette-swatch-btn:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.palette-swatch-btn.is-active {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px var(--brand-muted), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.palette-custom {
  margin-top: 28px;
}

.palette-custom-label {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--ink);
}

.palette-custom-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.palette-custom-row input[type="color"] {
  width: 56px;
  height: 44px;
  padding: 2px;
  border-radius: 12px;
  border: 1px solid var(--border-ui);
  cursor: pointer;
  background: var(--sheet);
}

.palette-custom-note {
  font-size: 0.88rem;
  color: var(--muted);
  flex: 1;
  min-width: 0;
  line-height: 1.4;
}

.settings-status {
  margin-top: 20px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--accent);
  min-height: 1.4em;
}

