/* Fırsat markası: Inter (OFL, fonts/Inter-LICENSE.txt), mavi #1634ff, zinc griler. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
    U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308,
    U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113,
    U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #f4f4f5;
  --surface: #ffffff;
  --surface-2: #fafafa;
  --ink: #09090b;
  --muted: #52525b;
  --line: #e4e4e7;
  --line-strong: #d4d4d8;
  --accent: #1634ff;
  --accent-hover: #0d24d6;
  --accent-deep: #0b1fb8;
  --accent-soft: #eef2ff;
  --accent-tint: #d7eaff;
  --ok: #15803d;
  --ok-soft: #e7f6ec;
  --warn: #a16207;
  --warn-soft: #fdf5e1;
  --danger: #b91c1c;
  --danger-soft: #fdecec;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 1px 3px rgba(16, 24, 40, 0.06);
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
}

a {
  color: var(--accent);
}

h1,
h2,
h3 {
  line-height: 1.25;
  margin: 0;
}

h1 {
  font-size: 1.6rem;
  letter-spacing: -0.01em;
}

code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.05em 0.35em;
}

[hidden] {
  display: none !important;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.85rem;
}

.center {
  text-align: center;
}

.break {
  word-break: break-all;
}

/* ---------- Üst çubuk ---------- */

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  box-shadow: inset 0 3px 0 var(--accent);
}

.topbar-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.topbar-public .topbar-inner {
  max-width: 820px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
}

.brand-lg {
  font-size: 1.05rem;
  gap: 12px;
}

.brand-logo {
  display: block;
  width: auto;
  height: 24px;
}

.brand-lg .brand-logo {
  height: 32px;
}

.brand-sub {
  padding-left: 10px;
  border-left: 1px solid var(--line-strong);
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}

.secure-note {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 4px 10px;
  white-space: nowrap;
}

/* ---------- Sayfa ---------- */

.page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 16px 64px;
}

.layout-public .page {
  max-width: 820px;
  display: grid;
  gap: 16px;
}

.page-print {
  max-width: 940px;
}

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

.back-link {
  display: inline-block;
  margin-bottom: 10px;
  text-decoration: none;
  font-size: 0.9rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}

.stack {
  display: grid;
  gap: 16px;
}

.stack-sm {
  display: grid;
  gap: 10px;
}

.section-title {
  font-size: 1.05rem;
  margin-bottom: 12px;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

/* ---------- Butonlar ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 9px 16px;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

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

.btn:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(22, 52, 255, 0.3);
  outline-offset: 1px;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

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

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line-strong);
}

.btn-secondary:hover {
  background: var(--surface-2);
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
}

.btn-ghost:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-sm {
  padding: 6px 11px;
  font-size: 0.85rem;
}

.btn-lg {
  padding: 14px 20px;
  font-size: 1.05rem;
}

.btn-block {
  width: 100%;
}

/* ---------- Form ---------- */

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

.field > span {
  font-weight: 600;
  font-size: 0.9rem;
}

.field em {
  font-style: normal;
  font-weight: 400;
}

input:not([type="checkbox"]),
textarea {
  width: 100%;
  font: inherit;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

textarea {
  resize: vertical;
}

.contract-input {
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.6;
  min-height: 420px;
}

.hint {
  font-size: 0.85rem;
  color: var(--muted);
}

.hint summary {
  cursor: pointer;
}

.hint ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.form-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.signer-row {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px 14px;
  margin: 0;
  display: grid;
  gap: 10px;
  background: var(--surface-2);
}

.signer-row-legend {
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0 4px;
}

.signer-remove {
  justify-self: end;
}

/* ---------- Mesajlar ---------- */

.flash {
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 16px;
  font-size: 0.95rem;
}

.flash ul {
  margin: 0;
  padding-left: 18px;
}

.flash-ok {
  background: var(--ok-soft);
  color: #14532d;
  border: 1px solid #bfe5cb;
}

.flash-error {
  background: var(--danger-soft);
  color: #7f1d1d;
  border: 1px solid #f5c6c6;
}

.callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  margin-bottom: 16px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  border: 1px solid #c9d7f8;
}

.layout-public .callout {
  margin-bottom: 0;
}

.callout-ok {
  background: var(--ok-soft);
  border-color: #bfe5cb;
}

.callout-error {
  background: var(--danger-soft);
  border-color: #f5c6c6;
}

.callout-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.callout-actions form {
  margin: 0;
}

/* ---------- Durum rozetleri ---------- */

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
  border: 1px solid transparent;
}

.badge-draft {
  background: #eef0f4;
  color: #475063;
}

.badge-open,
.badge-signer-pending {
  background: var(--warn-soft);
  color: var(--warn);
  border-color: #f1dfb0;
}

.badge-completed,
.badge-signer-signed {
  background: var(--ok-soft);
  color: var(--ok);
  border-color: #bfe5cb;
}

.badge-declined,
.badge-void,
.badge-signer-declined {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: #f5c6c6;
}

/* ---------- Liste ---------- */

.tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  margin-bottom: 16px;
  padding-bottom: 2px;
}

.tab {
  padding: 7px 12px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.88rem;
  white-space: nowrap;
  border: 1px solid transparent;
}

.tab:hover {
  background: var(--surface);
  border-color: var(--line);
}

.tab-active {
  background: var(--ink);
  color: #fff;
}

.tab-active:hover {
  background: var(--ink);
}

.tab-count {
  opacity: 0.7;
  font-weight: 500;
  margin-left: 2px;
}

.contract-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.contract-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s;
}

.contract-row:hover {
  border-color: var(--line-strong);
}

.contract-row-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.contract-title {
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contract-row-side {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.progress-text {
  color: var(--muted);
}

.empty {
  text-align: center;
  padding: 40px 20px;
}

.empty p {
  margin: 0 0 8px;
}

.empty .btn {
  margin-top: 8px;
}

/* ---------- Detay ---------- */

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.signer-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.signer-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px;
  display: grid;
  gap: 10px;
}

.signer-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.signer-name {
  font-weight: 650;
}

.signer-meta {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 12px;
  margin: 0;
}

.signer-meta:empty {
  display: none;
}

.signer-meta dt {
  color: var(--muted);
}

.signer-meta dd {
  margin: 0;
}

.share {
  display: grid;
  gap: 8px;
}

.copy-field {
  display: flex;
  gap: 6px;
}

.copy-field input {
  font-family: var(--mono);
  font-size: 0.8rem;
  background: var(--surface-2);
}

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

.danger-zone summary {
  list-style: none;
}

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

.danger-zone[open] summary {
  margin-bottom: 8px;
}

.danger-zone form {
  margin: 0;
}

aside form {
  margin: 0;
}

.chain {
  font-weight: 600;
}

.chain-ok {
  color: var(--ok);
}

.chain-bad {
  color: var(--danger);
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0 0 0 14px;
  border-left: 2px solid var(--line);
  display: grid;
  gap: 12px;
}

.timeline li {
  position: relative;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: -20px;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--accent);
}

.timeline-title {
  font-weight: 600;
  font-size: 0.92rem;
}

.hash {
  color: var(--muted);
  margin: 14px 0 0;
  word-break: break-all;
}

/* ---------- Sözleşme metni ---------- */

.contract-doc {
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1.7;
  color: #1b1e25;
}

.contract-doc .doc-title {
  font-size: 1.5rem;
  text-align: center;
  margin: 4px 0 20px;
}

.contract-doc h2 {
  font-size: 1.2rem;
  margin: 22px 0 8px;
}

.contract-doc h3 {
  font-size: 1.08rem;
  margin: 18px 0 6px;
}

.contract-doc h4 {
  font-size: 1rem;
  margin: 16px 0 4px;
}

.contract-doc p {
  margin: 0 0 12px;
}

.contract-doc ul,
.contract-doc ol {
  margin: 0 0 12px;
  padding-left: 24px;
}

.contract-doc hr {
  border: 0;
  border-top: 1px solid var(--line-strong);
  margin: 20px 0;
}

.contract-doc-preview {
  max-height: 560px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
  background: #fffefb;
}

.layout-public .contract-doc.card {
  padding: 32px 36px;
  background: #fffefb;
}

/* ---------- İmza sayfası ---------- */

.sign-hero {
  padding: 8px 2px 4px;
}

.sign-hero-brand {
  position: relative;
  overflow: hidden;
  padding: 28px 28px 24px;
  border-radius: 20px;
  color: #fff;
  background: url("/mark-white.svg") no-repeat right -36px top -28px / 220px auto,
    linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
  box-shadow: 0 12px 32px -14px rgba(22, 52, 255, 0.55);
}

.sign-hero-brand .eyebrow {
  color: var(--accent-tint);
}

.sign-hero-brand h1 {
  max-width: 34ch;
  font-size: 1.75rem;
  letter-spacing: -0.02em;
}

.sign-hero-brand .lead {
  color: rgba(255, 255, 255, 0.9);
  max-width: 60ch;
}

.sign-hero-brand .lead strong {
  color: #fff;
}

.sign-hero-brand .deadline-note {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
}

.sign-hero-brand .steps li {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.24);
  color: #fff;
}

.sign-hero-brand .steps li::before {
  background: #fff;
  color: var(--accent);
}

.eyebrow {
  margin: 0 0 6px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

.lead {
  font-size: 1.05rem;
  margin: 10px 0 14px;
}

.steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  counter-increment: step;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 12px 5px 6px;
  font-size: 0.85rem;
  font-weight: 600;
}

.steps li::before {
  content: counter(step);
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 0.75rem;
}

.parties {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.party {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.party-current {
  border-color: #c9d7f8;
  background: var(--accent-soft);
}

.party-name {
  font-weight: 650;
}

.you {
  font-weight: 500;
  color: var(--accent);
}

.sign-card {
  border: 2px solid #c9d7f8;
}

.signature-pad {
  position: relative;
  height: 200px;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  overflow: hidden;
}

.signature-pad canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: crosshair;
  z-index: 2;
}

.signature-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 0 16px;
  text-align: center;
  color: #9aa2b1;
  font-size: 0.95rem;
  pointer-events: none;
  z-index: 1;
}

.signature-line {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 44px;
  border-bottom: 1px solid #d5d9e1;
  pointer-events: none;
}

.signature-tools {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  min-height: 32px;
}

[data-signature-error] {
  color: var(--danger);
  font-weight: 600;
}

.consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 0.93rem;
  cursor: pointer;
}

.consent input {
  width: 20px;
  height: 20px;
  margin-top: 1px;
  flex-shrink: 0;
  accent-color: var(--accent);
}

.decline {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.decline summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 0.9rem;
}

.decline form {
  margin-top: 12px;
}

.message-card {
  text-align: center;
  padding: 40px 24px;
  max-width: 560px;
  margin: 24px auto;
  display: grid;
  gap: 10px;
  justify-items: center;
}

.message-card p {
  margin: 0;
  color: var(--muted);
}

.message-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.4rem;
  background: var(--accent-soft);
  color: var(--accent);
}

.message-icon-ok {
  background: var(--ok-soft);
  color: var(--ok);
}

.message-icon-error {
  background: var(--danger-soft);
  color: var(--danger);
}

/* ---------- Giriş ---------- */

.login {
  min-height: 80vh;
  display: grid;
  place-items: center;
}

.login-card {
  width: 100%;
  max-width: 400px;
  display: grid;
  gap: 14px;
  border-top: 4px solid var(--accent);
}

.login-card p {
  margin: 0;
}

/* ---------- İmzalı belge ---------- */

.print-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.sheet {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 40px 48px;
  box-shadow: var(--shadow);
}

.sheet-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  margin-bottom: 24px;
  border-bottom: 2px solid var(--accent);
}

.sheet-org {
  font-weight: 800;
  font-size: 1.1rem;
}

.sheet-logo {
  display: block;
  height: 30px;
  width: auto;
  margin-bottom: 6px;
}

.sheet-meta {
  text-align: right;
}

.signatures,
.audit {
  margin-top: 32px;
}

.signatures h2,
.audit h2 {
  font-size: 1.1rem;
  padding-bottom: 8px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line-strong);
}

.signature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  align-items: start;
}

.signature-box {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 14px;
  break-inside: avoid;
}

.signature-box-name {
  font-weight: 700;
}

.signature-img {
  display: block;
  width: 100%;
  max-height: 110px;
  object-fit: contain;
  margin: 8px 0;
  border-bottom: 1px solid var(--line-strong);
}

.signature-empty {
  margin: 14px 0 4px;
  padding: 24px 0;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
}

.evidence,
.verification {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3px 12px;
  margin: 0;
}

.evidence dt,
.verification dt {
  color: var(--muted);
}

.evidence dd,
.verification dd {
  margin: 0;
}

.verification {
  margin: 16px 0 10px;
}

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

.audit-table th,
.audit-table td {
  text-align: left;
  vertical-align: top;
  padding: 7px 8px;
  border-bottom: 1px solid var(--line);
}

.audit-table th {
  background: var(--surface-2);
  font-weight: 700;
}

/* ---------- Mobil ---------- */

@media (max-width: 860px) {
  .form-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  h1 {
    font-size: 1.35rem;
  }

  .page {
    padding: 16px 12px 48px;
  }

  .card {
    padding: 16px;
  }

  .page-head,
  .callout {
    flex-direction: column;
    align-items: stretch;
  }

  .callout-actions .btn,
  .callout-actions form {
    flex: 1;
  }

  .callout-actions form .btn {
    width: 100%;
  }

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

  .contract-row-side {
    justify-content: space-between;
  }

  .layout-public .contract-doc.card {
    padding: 22px 18px;
  }

  .contract-doc {
    font-size: 1rem;
  }

  .sheet {
    padding: 22px 16px;
  }

  .sheet-head {
    flex-direction: column;
  }

  .sheet-meta {
    text-align: left;
  }

  .print-bar .muted {
    display: none;
  }

  .audit-table {
    display: block;
    overflow-x: auto;
  }

  .secure-note {
    display: none;
  }

  .topbar-user .muted {
    display: none;
  }
}

/* ---------- Yazdırma ---------- */

@media print {
  @page {
    size: A4;
    margin: 16mm 14mm;
  }

  body {
    background: #fff;
    font-size: 11pt;
  }

  .no-print,
  .topbar {
    display: none !important;
  }

  .page {
    padding: 0;
    max-width: none;
  }

  .sheet {
    border: 0;
    box-shadow: none;
    padding: 0;
    border-radius: 0;
  }

  .contract-doc {
    font-size: 11pt;
  }

  .audit {
    break-before: page;
  }

  .audit-table tr,
  .signature-box {
    break-inside: avoid;
  }

  a {
    color: inherit;
    text-decoration: none;
  }
}

/* ---------- Protokol / EK-1 ---------- */

.head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.exports {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.badge-expired {
  background: #f3f4f6;
  color: #6b7280;
  border-color: #e5e7eb;
}

.deadline-note {
  margin: 0 0 14px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--warn-soft);
  border: 1px solid #f1dfb0;
  color: #713f12;
  font-size: 0.95rem;
  display: inline-block;
}

.annex {
  margin-top: 28px;
  font-family: var(--sans);
}

.annex-title {
  font-size: 1.1rem;
  text-align: center;
  margin: 0 0 16px;
  padding-top: 20px;
  border-top: 1px solid var(--line-strong);
}

.annex-section {
  margin-bottom: 18px;
}

.annex-section h3 {
  font-size: 0.98rem;
  margin: 0 0 8px;
}

.annex-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  line-height: 1.45;
}

.annex-table th,
.annex-table td {
  border: 1px solid var(--line-strong);
  padding: 7px 10px;
  text-align: left;
  vertical-align: top;
}

.annex-table thead th {
  background: var(--surface-2);
  font-weight: 700;
}

.annex-table tbody th {
  font-weight: 600;
  width: 42%;
  background: #fcfcfd;
}

.annex-value {
  white-space: pre-line;
}

.annex-grid td.num {
  text-align: right;
  white-space: nowrap;
}

.table-scroll {
  overflow-x: auto;
}

.annex-form {
  font-family: var(--sans);
}

.annex-fieldset {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 16px 16px;
  margin: 0;
  display: grid;
  gap: 12px;
}

.annex-fieldset > legend {
  font-weight: 700;
  padding: 0 6px;
}

.readonly-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 12px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 0.92rem;
}

.readonly-row span {
  color: var(--muted);
}

.pre-line {
  white-space: pre-line;
}

.item-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px 14px;
  margin: 0;
  background: var(--surface-2);
  display: grid;
  gap: 10px;
}

.item-card > legend {
  font-weight: 700;
  font-size: 0.88rem;
  padding: 0 4px;
}

.item-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
}

.item-wide {
  grid-column: 1 / -1;
}

.item-discount output {
  display: block;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  font-weight: 700;
  color: var(--ok);
}

.item-discount output.is-invalid {
  color: var(--danger);
  font-weight: 600;
  font-size: 0.85rem;
}

.item-remove {
  justify-self: end;
}

.decline.card {
  margin-top: 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

@media (max-width: 640px) {
  .item-grid,
  .readonly-row {
    grid-template-columns: 1fr;
  }

  .readonly-row {
    gap: 2px;
  }

  .head-actions {
    justify-content: stretch;
  }

  .head-actions .btn {
    white-space: normal;
    text-align: center;
  }

  .annex-table tbody th {
    width: 45%;
  }
}

@media print {
  .annex {
    break-before: page;
  }

  .annex-table tr {
    break-inside: avoid;
  }
}

/* ---------- Menü, kullanıcılar ---------- */

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.topbar-nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
}

.topbar-nav a:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.topbar-nav form {
  margin: 0;
}

.user-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.user-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.user-disabled {
  opacity: 0.6;
  background: var(--surface-2);
}

.user-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.user-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.user-actions form {
  margin: 4px 0 0;
}

.issued .copy-field input {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

@media (max-width: 640px) {
  .user-row {
    flex-direction: column;
  }

  .user-actions {
    align-items: stretch;
    width: 100%;
  }

  .topbar-inner {
    flex-wrap: wrap;
  }
}

@media (max-width: 640px) {
  .sign-hero-brand {
    padding: 22px 18px 18px;
    border-radius: 16px;
    background-size: 150px auto, auto;
    background-position: right -30px top -24px, 0 0;
  }

  .sign-hero-brand h1 {
    font-size: 1.4rem;
  }

  .brand-logo {
    height: 20px;
  }

  .topbar .brand-sub {
    display: none;
  }
}
