:root {
  --ink: #16324f;
  --ink-soft: #2c4a66;
  --muted: #6b8094;
  --line: #d5e3f0;
  --paper: #e8f1fa;
  --panel: #ffffff;
  --brand: #1f6f9f;
  --brand-deep: #0e4a6e;
  --brand-soft: #dceef8;
  --accent: #2a9d8f;
  --danger: #c0392b;
  --shadow: 0 12px 32px rgba(15, 60, 90, 0.08);
  --radius: 16px;
  --font: "Inter", "Manrope", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  width: 100%;
  overflow-x: hidden;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1100px 520px at 0% -8%, #d4ebf8 0%, transparent 52%),
    radial-gradient(900px 480px at 100% 0%, #eef6fc 0%, transparent 48%),
    var(--paper);
}

body.login-locked {
  overflow: hidden;
}

.login-gate {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background:
    radial-gradient(900px 500px at 18% 0%, #cfe8f6 0%, transparent 55%),
    linear-gradient(180deg, #e8f1fa 0%, #d5e8f4 100%);
}

.login-gate[hidden] {
  display: none !important;
}

.mail-send-status {
  margin: 0.25rem 0 0;
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.mail-send-status.is-ok {
  color: #0f7a3f;
}

.mail-send-status.is-wait {
  color: #9a6200;
}

.mail-send-status.is-fail {
  color: #9b1c1c;
}

.btn-mail-verify {
  margin-top: 0.35rem;
  padding: 0.2rem 0.55rem;
  font-size: 0.82rem;
}

.mail-helper-banner,
.mail-helper-banner[hidden],
body.login-locked .mail-helper-banner {
  display: none !important;
}

.login-card {
  width: min(420px, 100%);
  display: grid;
  gap: 0.75rem;
  padding: 1.85rem 1.55rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.login-kicker {
  margin: 0;
  color: var(--brand);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.login-product {
  margin: 0;
  color: var(--brand);
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-align: center;
}

.login-app-icon {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 22px;
  justify-self: center;
  box-shadow: 0 12px 32px rgba(8, 20, 40, 0.28);
}

.login-logo {
  display: none;
}

.login-card h1 {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.35;
  text-align: center;
  letter-spacing: 0.04em;
}

.login-sub {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

.login-card label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.86rem;
  font-weight: 600;
}

.login-card input {
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--line);
  font: inherit;
}

.login-error {
  min-height: 1.2em;
  margin: 0;
  color: var(--danger);
  font-size: 0.86rem;
}

.login-note {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.4;
  font-weight: 400;
}

.login-install {
  display: grid;
  gap: 0.45rem;
}

.login-install .btn {
  width: 100%;
}

.app-install-row {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.app-install-preview {
  width: 112px;
  height: 112px;
  object-fit: cover;
  border-radius: 24px;
  background: #111;
  box-shadow: var(--shadow);
}

@media (max-width: 720px) {
  .app-install-row {
    grid-template-columns: 1fr;
  }
}

.session-user {
  margin: 0.35rem 0 0.5rem;
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.35;
  word-break: break-all;
}

.app-build {
  margin: 0 0 0.45rem;
  font-size: 0.68rem;
  font-weight: 700;
  color: #0f7a3f;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  grid-template-rows: auto auto minmax(0, 1fr);
  grid-template-areas:
    "top top"
    "nav nav"
    "side main";
  min-height: 100vh;
  width: 100%;
  transition: grid-template-columns 0.22s ease;
}

.app.sidebar-collapsed {
  grid-template-columns: 18px minmax(0, 1fr);
}

.app.is-home {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "top"
    "nav"
    "main";
}

.app.is-home .sidebar {
  display: none;
}

.app.is-home .main {
  grid-area: main;
}

.shell-top {
  grid-area: top;
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) auto;
  align-items: center;
  gap: 1rem 1.25rem;
  padding: 0.7rem 1.15rem;
  background: #fff;
  border-bottom: 1px solid var(--line);
  z-index: 8;
}

.shell-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}

.shell-logo {
  display: block;
  height: 44px;
  width: 44px;
  object-fit: cover;
  border-radius: 11px;
  flex: 0 0 auto;
}

.shell-brand-text {
  display: grid;
  line-height: 1.2;
  min-width: 0;
}

.shell-brand-text strong {
  font-size: 0.78rem;
  letter-spacing: 0.03em;
}

.shell-brand-text span {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
}

.shell-search-wrap {
  position: relative;
  min-width: 0;
}

.shell-search {
  width: 100%;
  height: 42px;
  padding: 0 1.05rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f4f9fc;
  color: var(--ink);
}

.shell-search:focus {
  outline: 2px solid #b7d7ea;
  background: #fff;
}

.shell-search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 20;
  display: grid;
  gap: 2px;
  padding: 0.4rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  max-height: 440px;
  overflow: auto;
}

.shell-search-results button {
  display: grid;
  gap: 0.1rem;
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: 10px;
  padding: 0.55rem 0.7rem;
}

.shell-search-results button:hover,
.shell-search-results button:focus {
  background: var(--brand-soft);
}

.shell-search-results span {
  color: var(--muted);
  font-size: 0.78rem;
}

.shell-search-label {
  margin: 0.35rem 0.35rem 0.1rem;
  padding: 0.15rem 0.35rem 0;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.shell-tools {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.shell-issuer {
  margin: 0;
  display: grid;
  gap: 0.15rem;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--muted);
}

.shell-issuer select {
  min-width: 160px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 0 0.5rem;
}

.shell-clock {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
}

.shell-user {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  padding: 0.2rem 0.25rem 0.2rem 0.2rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f7fbfe;
}

.shell-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--brand);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  flex: 0 0 auto;
}

.shell-user-meta {
  display: grid;
  min-width: 0;
  line-height: 1.15;
}

.shell-user-meta strong {
  font-size: 0.8rem;
}

.shell-user .btn-ghost {
  color: var(--muted);
  border-color: transparent;
}

.shell-nav {
  grid-area: nav;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.55rem 1.15rem;
  background: rgba(255, 255, 255, 0.72);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.shell-nav .nav-tab {
  border: 1px solid transparent;
  background: #fff;
  border-radius: 999px;
  padding: 0.42rem 0.95rem;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--ink-soft);
  box-shadow: 0 1px 0 rgba(15, 60, 90, 0.04);
}

.shell-nav .nav-tab:hover {
  border-color: #b7d7ea;
  background: var(--brand-soft);
}

.shell-nav .nav-tab.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.sidebar {
  grid-area: side;
}

.main {
  grid-area: main;
  min-height: 0;
}

.view-home {
  display: grid;
  gap: 1rem;
}

.d360-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 1.15rem 1.25rem;
}

.home-hero h1 {
  margin: 0.15rem 0 0.35rem;
  font-size: clamp(1.6rem, 3vw, 2.15rem);
  letter-spacing: -0.03em;
}

.home-hero p {
  margin: 0;
  color: var(--muted);
}

.home-kicker {
  margin: 0;
  color: var(--brand);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.home-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
}

.d360-kpi {
  display: grid;
  gap: 0.35rem;
  text-align: left;
  padding: 1rem 1.05rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow);
  color: inherit;
}

.d360-kpi span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.d360-kpi strong {
  font-size: 1.45rem;
  letter-spacing: -0.03em;
}

.d360-kpi:hover {
  border-color: #b7d7ea;
  background: #f7fbfe;
}

.home-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr 0.9fr;
  gap: 0.85rem;
  align-items: start;
}

.home-card-head,
.d360-card h2 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.85rem;
  font-size: 1.02rem;
}

.home-card-head .btn {
  color: var(--brand);
  border-color: #b7d7ea;
  background: #fff;
}

.home-tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.home-tile {
  min-height: 72px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f7fbfe;
  font-weight: 700;
  color: var(--ink);
}

.home-tile:hover {
  background: var(--brand-soft);
  border-color: #b7d7ea;
}

.home-tile-accent {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.home-tile-icon {
  display: block;
  font-size: 1.15rem;
  margin-bottom: 0.15rem;
}

.home-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

.home-list button {
  width: 100%;
  display: grid;
  gap: 0.15rem;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f7fbfe;
  padding: 0.65rem 0.75rem;
}

.home-list button:hover {
  background: var(--brand-soft);
}

.home-list .item-title {
  font-weight: 700;
}

.home-list .item-meta {
  color: var(--muted);
  font-size: 0.78rem;
}

.sidebar {
  position: relative;
  padding: 1.5rem 1.1rem;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
  transition: padding 0.22s ease;
}

.sidebar-inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 0;
  flex: 1;
  overflow: auto;
}

.sidebar-toggle {
  position: absolute;
  top: 1rem;
  right: -14px;
  z-index: 5;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow);
  font-size: 0.95rem;
  line-height: 1;
  padding: 0;
  display: grid;
  place-items: center;
}

.sidebar-toggle:hover {
  background: var(--brand-soft);
}

.app.sidebar-collapsed .sidebar {
  padding: 0;
  border-right-color: transparent;
  background: transparent;
  backdrop-filter: none;
  overflow: visible;
}

.app.sidebar-collapsed .sidebar-inner {
  opacity: 0;
  width: 0;
  overflow: hidden;
  /* pointer-events kaldırıldı — menü donuk kalmasın */
}

.app.sidebar-collapsed .sidebar-toggle {
  right: auto;
  left: 0;
  top: 1rem;
  border-radius: 0 999px 999px 0;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.brand-logo {
  display: block;
  width: 100%;
  max-width: 220px;
  height: auto;
}

.brand-legal {
  margin: 0;
  color: #111;
  font-size: 0.68rem;
  line-height: 1.35;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.brand-sub {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
}

.list-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 0.5rem;
}

.proposal-list {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.proposal-list li button {
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 10px;
  padding: 0.75rem 0.7rem;
  color: inherit;
}

.proposal-list li button:hover {
  background: var(--brand-soft);
}

.proposal-list li button.active {
  border-color: #b8c6db;
  background: var(--brand-soft);
}

.proposal-list .item-title {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
}

.proposal-list .item-meta {
  display: block;
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.archive-search-label {
  display: grid;
  gap: 0.35rem;
  margin: 0 0 0.9rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
}

.fiyat-tablo-wrap {
  overflow: auto;
}

.fiyat-tablo {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.fiyat-tablo th,
.fiyat-tablo td {
  text-align: left;
  padding: 0.7rem 0.75rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.fiyat-tablo th {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}

.fiyat-satir {
  cursor: pointer;
}

.fiyat-satir:hover td,
.fiyat-satir:focus td {
  background: var(--brand-soft);
}

.fiyat-alt,
.fiyat-ayrim {
  display: block;
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
}

.fiyat-rakam {
  white-space: nowrap;
  font-weight: 700;
  text-align: right;
}

.fiyat-tablo td:nth-child(3) {
  white-space: pre-wrap;
}

.archive-search-label input {
  height: 42px;
  padding: 0 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f7fbfe;
  color: var(--ink);
  font: inherit;
}

.archive-folders {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
}

.archive-folder-card {
  display: grid;
  gap: 0.2rem;
  text-align: left;
  min-height: 96px;
  padding: 0.95rem 1rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow);
  color: inherit;
}

.archive-folder-card:hover {
  border-color: #b7d7ea;
  background: var(--brand-soft);
}

.archive-folder-card strong {
  font-size: 1.02rem;
}

.archive-quote-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.45rem;
  align-items: center;
}

.archive-quote-row .btn {
  width: auto;
}

.empty-list {
  color: var(--muted);
  font-size: 0.9rem;
  padding: 0.5rem 0.2rem;
}

.main {
  padding: 0.85rem 1rem 1.5rem;
  min-width: 0;
  width: 100%;
}

.page-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  margin: 0 0 0.7rem;
}

.page-nav[hidden] {
  display: none !important;
}

.btn-page-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 42px;
  padding: 0.5rem 1.05rem;
  border: 1px solid #1f6f8b;
  border-radius: 10px;
  background: #eef7fa;
  color: #15495c;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.btn-page-back:hover {
  background: #d7eef4;
}

.page-nav-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.app.sidebar-collapsed .main {
  padding-left: 4.75rem;
}

.app.sidebar-collapsed .sidebar-toggle {
  width: auto;
  min-width: 3.4rem;
  height: 36px;
  padding: 0 0.7rem 0 0.55rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.teklif-page-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-bottom: 1rem;
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 0.35rem 0;
  background: var(--paper);
  pointer-events: auto;
}

.teklif-page-tab {
  display: grid;
  gap: 0.1rem;
  text-align: left;
  padding: 0.5rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink-soft);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  pointer-events: auto;
  position: relative;
  z-index: 51;
}

.teklif-page-tab span {
  font-weight: 500;
  font-size: 0.78rem;
  color: var(--muted);
}

.teklif-page-tab.active {
  border-color: #1f6f8b;
  background: #eef7fa;
  color: var(--ink);
  box-shadow: 0 0 0 1px #1f6f8b inset;
}

/* Sayfa ayırımı — hidden attribute’a güvenme */
.teklif-page {
  display: none !important;
}

.teklif-page.is-active {
  display: flex !important;
  flex-direction: column;
  gap: 0.85rem;
}

.taslak-right #page-calisma,
#page-calisma.calisma-pane {
  display: flex !important;
  flex-direction: column;
  gap: 0.75rem;
}

.page-footer-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1.25rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafb;
}

.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: flex-end;
}

.topbar-actions[hidden],
[hidden] {
  display: none !important;
}

.topbar h1 {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.view {
  width: 100%;
  min-width: 0;
}

.view[hidden] {
  display: none !important;
}

.muted {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.btn {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.65rem 1rem;
  font-weight: 600;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-sm {
  padding: 0.45rem 0.8rem;
  font-size: 0.88rem;
}

.btn-primary {
  background: var(--brand);
  color: #fff;
}

.btn-primary:hover {
  background: var(--brand-deep);
}

.btn-secondary {
  background: #fff;
  border-color: var(--line);
  color: var(--ink);
}

.btn-ghost {
  background: transparent;
  color: var(--danger);
  border-color: #efc5c5;
}

.editor {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  max-width: none;
  width: 100%;
}

.taslak-bar {
  padding: 0.7rem 0.9rem 0.75rem;
}

.taslak-bar-grid {
  display: grid;
  grid-template-columns: minmax(150px, 1.1fr) auto minmax(160px, 1.15fr) minmax(240px, 1.7fr);
  gap: 0.55rem 0.85rem;
  align-items: end;
}

.taslak-bar-extra {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.45rem;
}

#offer-sign-rule {
  flex: 1 1 240px;
  margin: 0;
}

.ceo-inline {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.35rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f7f9fc;
  min-height: 42px;
}

.ceo-inline-copy {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  min-width: 0;
}

.ceo-inline-copy strong {
  font-size: 0.8rem;
}

.ceo-inline .ceo-sign-preview {
  width: 54px;
  min-height: 28px;
  padding: 0.15rem;
}

.ceo-inline .field-hint {
  margin: 0;
  font-size: 0.72rem;
}

.taslak-split {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(300px, 1.15fr);
  gap: 0.75rem;
  align-items: stretch;
}

.taslak-left,
.taslak-right {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 0;
  min-height: 100%;
}

.taslak-right {
  position: relative;
}

.calisma-rail-btn {
  position: absolute;
  top: 1.15rem;
  left: -0.85rem;
  z-index: 8;
  width: 28px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow);
  font-size: 1.05rem;
  line-height: 1;
  display: grid;
  place-items: center;
}

.calisma-rail-btn:hover {
  background: var(--brand-soft);
  border-color: #1f6f8b;
  color: #15495c;
}

.calisma-size-btn {
  min-width: 7.5rem;
}

body.calisma-expanded {
  overflow: hidden;
}

body.calisma-expanded .shell-top,
body.calisma-expanded .shell-nav,
body.calisma-expanded .sidebar,
body.calisma-expanded .topbar,
body.calisma-expanded .teklif-page-nav,
body.calisma-expanded .taslak-bar,
body.calisma-expanded .taslak-left,
body.calisma-expanded .teklif-bilgi-block,
body.calisma-expanded #page-taslak > .page-footer-nav,
body.calisma-expanded .page-nav {
  display: none !important;
}

body.calisma-expanded .app {
  grid-template-columns: 1fr !important;
  grid-template-rows: minmax(0, 1fr) !important;
  grid-template-areas: "main" !important;
}

body.calisma-expanded .main {
  padding: 0 !important;
}

body.calisma-expanded .taslak-split,
body.calisma-expanded .taslak-right,
body.calisma-expanded .editor,
body.calisma-expanded #page-taslak,
body.calisma-expanded #view-teklif {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  min-height: 0 !important;
}

body.calisma-expanded #page-calisma,
body.calisma-expanded #page-calisma.calisma-pane {
  position: fixed !important;
  inset: 0 !important;
  z-index: 400 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 0.75rem;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  overflow: auto;
  background: var(--paper);
  padding: 1rem 1.25rem 1.5rem;
}

body.calisma-expanded .calisma-rail-btn {
  position: sticky;
  top: 0;
  left: 0;
  z-index: 5;
  align-self: flex-start;
  width: auto;
  height: 36px;
  padding: 0 0.85rem;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 800;
}

body.calisma-expanded .worksheet-block {
  flex: 1 1 auto;
}

body.calisma-expanded .worksheet-block .items-table-wrap {
  min-height: min(62vh, 860px);
}

body.taslak-expanded {
  overflow: hidden;
}

body.taslak-expanded .shell-top,
body.taslak-expanded .shell-nav,
body.taslak-expanded .sidebar,
body.taslak-expanded .topbar,
body.taslak-expanded .teklif-page-nav,
body.taslak-expanded .taslak-bar,
body.taslak-expanded .taslak-right,
body.taslak-expanded .musteri-block,
body.taslak-expanded .note-templates,
body.taslak-expanded .teklif-bilgi-block,
body.taslak-expanded #page-taslak > .page-footer-nav,
body.taslak-expanded .page-nav {
  display: none !important;
}

body.taslak-expanded .app {
  grid-template-columns: 1fr !important;
  grid-template-rows: minmax(0, 1fr) !important;
  grid-template-areas: "main" !important;
}

body.taslak-expanded .main {
  padding: 0 !important;
}

body.taslak-expanded .taslak-split,
body.taslak-expanded .taslak-left,
body.taslak-expanded .editor,
body.taslak-expanded #page-taslak,
body.taslak-expanded #view-teklif {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  min-height: 0 !important;
}

body.taslak-expanded .live-preview-block {
  position: fixed !important;
  inset: 0 !important;
  z-index: 400 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 0.55rem;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 0.85rem 1.1rem 1.1rem;
  background: var(--paper);
}

body.taslak-expanded .live-preview-head {
  flex: 0 0 auto;
}

body.taslak-expanded .live-preview-frame {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  height: auto;
}

body.taslak-expanded #btn-taslak-expand {
  min-width: 7.5rem;
}

.taslak-right .calisma-pane,
.taslak-right .worksheet-block {
  flex: 1 1 auto;
}

.calisma-pane {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 0;
  scroll-margin-top: 5rem;
}

#page-taslak .musteri-block {
  scroll-margin-top: 5rem;
}

.live-preview-block {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 0.65rem 0.75rem 0.7rem;
}

.live-preview-block .block-head {
  margin-bottom: 0.4rem;
}

.taslak-left .note-templates {
  flex: 1 1 auto;
  margin-top: 0;
  display: flex;
  flex-direction: column;
}

.live-preview-frame {
  flex: 1 1 auto;
  min-height: 380px;
  max-height: min(78vh, 980px);
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #d8dce2;
  padding: 0.55rem;
}

.live-preview-scale {
  transform-origin: top left;
  width: 210mm;
}

.sheet-pack {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  width: 210mm;
  max-width: 210mm;
  margin: 0;
  padding: 0;
  background: transparent;
}

.sheet-pack.live-sheet,
#print-sheet.sheet-pack,
.order-sheet-inline.sheet-pack {
  width: 210mm;
  max-width: 210mm;
  margin: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.sheet-page {
  width: 210mm;
  height: 297mm;
  min-height: 297mm;
  max-height: 297mm;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  padding: 11mm 12mm 8mm;
  position: relative;
  overflow: hidden;
  background-color: var(--sheet-paper, #f4f5f7);
  color: #111;
  box-shadow: var(--shadow);
}

.sheet-letterhead-fill {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  object-position: 0 0;
  pointer-events: none;
  user-select: none;
  z-index: 0;
  display: block;
  border: 0;
}

.sheet-page-body,
.sheet-page-foot {
  position: relative;
  z-index: 1;
}

.sheet-page-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.sheet-page-foot {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  min-height: 18mm;
  padding-top: 3mm;
  border-top: 1px solid #cfd6d2;
}

.sheet-matbu {
  min-width: 0;
}

.sheet-matbu-stamp {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.sheet-matbu-sign {
  height: 16mm;
  max-width: 48mm;
  object-fit: contain;
  background: transparent !important;
  mix-blend-mode: multiply;
}

.sheet-matbu-meta {
  font-size: 9px;
  line-height: 1.25;
  color: #445;
}

.sheet-matbu-meta strong {
  display: block;
  font-size: 10px;
  color: #111;
}

.sheet-matbu-label {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #889;
  font-size: 8px;
}

.sheet-page-num {
  flex: 0 0 auto;
  text-align: right;
  font-size: 10px;
  letter-spacing: 0.04em;
  color: #667;
  white-space: nowrap;
}

.sheet-continue-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1.5px solid #111;
  padding-bottom: 8px;
  margin-bottom: 10px;
}

.sheet-continue-head img {
  height: 32px;
  width: auto;
  max-width: 150px;
  object-fit: contain;
}

.sheet-continue-meta {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 11px;
  line-height: 1.35;
}

.sheet-continue-meta strong {
  display: block;
  font-size: 12px;
}

.sheet-continue-label {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #667;
  white-space: nowrap;
}

.sheet-page .sheet-logo {
  width: min(280px, 100%);
  height: auto;
  max-width: 280px;
  max-height: none;
  object-fit: contain;
  image-rendering: auto;
}

.sheet-page .sheet-logo-industrial,
.sheet-logo.sheet-logo-industrial {
  width: min(230px, 100%);
  max-width: 230px;
}

.sheet-page .sheet-client-logo {
  width: auto;
  height: auto;
  max-width: 180px;
  max-height: 90px;
  margin-bottom: 0.55rem;
  object-fit: contain;
}

.sheet-page .sheet-header {
  gap: 1rem;
  padding-bottom: 0.7rem;
  margin-bottom: 0.8rem;
}

.sheet-page .sheet-grid {
  gap: 0.7rem;
  margin-bottom: 0.7rem;
}

.sheet-page .sheet-offer {
  margin: 0.35rem 0 0.55rem;
}

.sheet-page .sheet-sign {
  margin-top: 0.85rem;
}

.sheet-page .sheet-footer-group {
  margin-top: 0.75rem;
  padding-top: 0.45rem;
}

.sheet-page .sheet-notes,
.sheet-page .sheet-footnotes {
  margin-top: 0.7rem;
  padding-top: 0.55rem;
}

.sheet-page .sheet-header {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  text-align: left;
}

.sheet-page .sheet-header > div:first-child {
  flex: 1 1 auto;
  min-width: 0;
}

.sheet-page .sheet-legal {
  white-space: nowrap;
  max-width: none;
}

.sheet-page .sheet-meta {
  text-align: right;
}

.sheet-page .sheet-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.sheet-page .sheet-sign-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
}

.sheet-page .sheet-offer thead {
  display: table-header-group;
}

.sheet-page .sheet-offer tr,
.sheet-page .sheet-box,
.sheet-page .sign-box {
  break-inside: avoid;
  page-break-inside: avoid;
}

.sheet-measure-host {
  position: absolute;
  left: -12000px;
  top: 0;
  width: 210mm;
  pointer-events: none;
  visibility: hidden;
}

.sheet-measure-host .sheet-page {
  box-shadow: none;
}

.sheet-page-measure {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
}

.sheet-page-measure .sheet-page-body {
  flex: 0 0 auto;
  height: auto;
  overflow: visible;
}

.sheet-paper-industrial { --sheet-paper: #f7f9fb; --sheet-paper-soft: #e4eef1; --sheet-letterhead-line: #2aa7b0; }
.sheet-paper-klimasist { --sheet-paper: #f3f8fc; --sheet-paper-soft: #d7ebf6; --sheet-letterhead-line: #1a86c8; }
.sheet-paper-decrates { --sheet-paper: #f7f4ee; --sheet-paper-soft: #ebe4d6; --sheet-letterhead-line: #8a7348; }
.sheet-paper-kosiap { --sheet-paper: #f3f7fb; --sheet-paper-soft: #dbe7f4; --sheet-letterhead-line: #0057c2; }

.sheet-paper.sheet,
.sheet-paper.live-sheet,
.sheet-paper.sheet-pack,
#print-sheet.sheet-paper {
  background: transparent;
}

.sheet-pack.sheet-paper .sheet-page,
.sheet-paper .sheet-page {
  background-color: var(--sheet-paper);
}

.sheet-pack.sheet-paper-letterhead .sheet-page,
.sheet-paper-letterhead .sheet-page {
  background-image: none;
  padding: 36mm 16mm 30mm;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.sheet-pack.sheet-paper-industrial .sheet-page,
.sheet-paper-industrial .sheet-page {
  background-color: #f7f9fb;
}

.sheet-pack.sheet-paper-klimasist .sheet-page,
.sheet-paper-klimasist .sheet-page {
  background-color: #f3f8fc;
  padding: 32mm 16mm 36mm;
}

.sheet-pack.sheet-paper-decrates .sheet-page,
.sheet-paper-decrates .sheet-page {
  background-color: #f7f4ee;
  padding: 56mm 16mm 30mm 80mm;
}

.sheet-pack.sheet-paper-kosiap .sheet-page,
.sheet-paper-kosiap .sheet-page {
  background-color: #f3f7fb;
  padding: 66mm 16mm 32mm 16mm;
}

.sheet-paper-kosiap.sheet-paper-letterhead .sheet-legal {
  margin-top: 0;
}

.sheet-paper-letterhead .sheet-logo,
.sheet-paper-letterhead .sheet-logo-industrial,
.sheet-paper-letterhead .sheet-group-logo {
  display: none !important;
}

.sheet-paper-letterhead .sheet-header {
  border-bottom-color: var(--sheet-letterhead-line, #1b3a4b);
}

.sheet-paper-letterhead .sheet-page-foot {
  border-top-color: transparent;
  min-height: 22mm;
  background: transparent;
}

.sheet-paper-letterhead .sheet-totals {
  background: rgba(255, 255, 255, 0.94);
  padding: 1px 8px 4px;
  width: 100%;
  max-width: 100%;
}

.sheet-totals .grand span:last-child {
  white-space: nowrap;
}

.sheet-paper-decrates.sheet-paper-letterhead .sheet-page-foot {
  justify-content: flex-end;
  gap: 14px;
  min-height: 22mm;
  padding-left: 28mm;
  background: transparent;
}

.sheet-paper-decrates.sheet-paper-letterhead .sheet-matbu,
.sheet-paper-decrates.sheet-paper-letterhead .sheet-matbu-stamp {
  background: transparent;
}

.sheet-paper-industrial .sheet-doc-title {
  color: #0e4a6e;
}

.sheet-paper-klimasist .sheet-doc-title {
  color: #0d5f96;
}

.sheet-paper-decrates .sheet-doc-title {
  color: #6b5430;
}

.sheet-pack.sheet-paper-decrates.sheet-paper-letterhead .sheet-legal,
.sheet-paper-decrates.sheet-paper-letterhead .sheet-legal {
  display: none !important;
}

.sheet-pack.sheet-paper-decrates.sheet-paper-letterhead .sheet-page-body,
.sheet-paper-decrates.sheet-paper-letterhead .sheet-page-body {
  background: rgba(252, 249, 244, 0.42);
  box-shadow: none;
  padding: 2mm 2.5mm 1.5mm;
}

.sheet-paper-decrates.sheet-paper-letterhead .sheet-header {
  border-bottom: 1px solid rgba(196, 176, 137, 0.55);
}

.sheet-paper-decrates.sheet-paper-letterhead .sheet-continue-head {
  border-bottom-color: rgba(196, 176, 137, 0.55);
  background: rgba(252, 249, 244, 0.35);
}

.sheet-paper-kosiap .sheet-doc-title {
  color: #0057c2;
}

.sheet-paper:not(.sheet-paper-decrates) .sheet-box,
.sheet-paper:not(.sheet-paper-decrates) .sheet-kv td,
.sheet-paper:not(.sheet-paper-decrates) .sheet-offer td {
  background: transparent;
}

.sheet-paper .sheet-kv th,
.sheet-paper .sheet-offer th {
  background: var(--sheet-paper-soft);
}

.musteri-block,
.teklif-bilgi-block {
  padding: 0.7rem 0.8rem 0.75rem;
}

.musteri-block .block-head,
.teklif-bilgi-block .block-head {
  margin-bottom: 0.45rem;
}

.musteri-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 0.55rem 0.7rem;
  align-items: start;
}

.musteri-pickers {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto;
  gap: 0.35rem 0.4rem;
  align-items: end;
  margin-bottom: 0.5rem;
}

.musteri-pickers > label {
  min-width: 0;
}

.musteri-block .grid-2 {
  gap: 0.45rem 0.6rem;
}

.musteri-block .field-hint {
  margin-top: 0.1rem;
  font-size: 0.72rem;
}

.musteri-logo {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.4rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f7f9fc;
}

.musteri-logo .logo-picker {
  justify-content: center;
}

.musteri-logo .logo-nav {
  width: 32px;
  height: 88px;
}

.musteri-logo .logo-preview-box {
  width: 128px;
  height: 104px;
}

.musteri-logo .inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.musteri-logo .btn-sm {
  padding: 0.25rem 0.45rem;
  font-size: 0.72rem;
}

.block {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.95rem 1rem 1.05rem;
  box-shadow: var(--shadow);
}

.worksheet-block {
  padding-bottom: 1.2rem;
}

.worksheet-block .items-table-wrap {
  margin: 0 -0.25rem;
  min-height: 340px;
  overflow: auto;
}

.worksheet-block .items-table-wrap.is-boq-drop {
  outline: 2px dashed var(--brand, #1f6f8b);
  outline-offset: 3px;
  background: #f3f8fb;
}

#boq-import-status {
  min-height: 1.1em;
  margin: 0 0 0.65rem;
}

.legacy-items-body {
  display: none !important;
}

.block h2,
.block-head h2 {
  margin: 0 0 0.9rem;
  font-size: 1rem;
  letter-spacing: 0.01em;
}

.block-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}

.block-head h2 {
  margin: 0;
}

.teklif-head-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.45rem;
  justify-content: flex-end;
}

.teklif-head-tools select {
  max-width: 260px;
}

.sheet-layout-label {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
}

.live-preview-head {
  align-items: flex-start;
  gap: 0.55rem;
}

.live-preview-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
}

.sheet-layout-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.sheet-layout-btn {
  border: 1px solid #1f6f8b;
  background: #fff;
  color: #15495c;
  border-radius: 999px;
  padding: 0.45rem 0.75rem;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.sheet-layout-btn:hover {
  background: #eef7fa;
}

.sheet-layout-btn.active {
  background: #1f6f8b;
  color: #fff;
}

.grid-2,
.grid-3 {
  display: grid;
  gap: 0.85rem 1rem;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.84rem;
  color: var(--ink-soft);
  font-weight: 500;
}

label.full {
  grid-column: 1 / -1;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
  background: #fbfcfb;
  color: var(--ink);
}

input:focus,
textarea:focus {
  outline: 2px solid #a8b9d4;
  outline-offset: 1px;
  background: #fff;
}

.email-fit {
  min-height: 2.7rem;
  height: auto;
  field-sizing: content;
  overflow: visible;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: pre-wrap;
  resize: none;
  line-height: 1.4;
}

input[readonly] {
  background: #eef2f7;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: 0.02em;
}

input.ref-fresh {
  animation: refPulse 0.7s ease;
}

.ref-compose {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 2.7rem;
  padding: 0 0.55rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #eef2f7;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.ref-compose.ref-fresh {
  animation: refPulse 0.7s ease;
}

.ref-part {
  flex: 0 0 auto;
  color: var(--ink);
  white-space: nowrap;
  user-select: none;
}

.ref-compose input,
.ref-compose input[type="number"] {
  width: 4.6rem;
  min-width: 3.2rem;
  flex: 0 0 auto;
  margin: 0.2rem 0.15rem;
  padding: 0.2rem 0.15rem;
  border: 1px solid #c5d0e0;
  border-radius: 6px;
  background: #fff;
  text-align: center;
  font-weight: 800;
  letter-spacing: 0;
  appearance: textfield;
  -moz-appearance: textfield;
}

.ref-compose input::-webkit-outer-spin-button,
.ref-compose input::-webkit-inner-spin-button {
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
}

.ref-compose input:focus {
  background: #fff;
}

@keyframes refPulse {
  0% {
    background: #d9f3e3;
    box-shadow: 0 0 0 2px #2e7d4f;
  }
  100% {
    background: #eef2f7;
    box-shadow: none;
  }
}

.items-table-wrap {
  overflow-x: auto;
}

.cost-params {
  margin: 0 0 0.85rem;
  padding: 0.75rem 0.85rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f4f7fb;
}

.cost-params-title {
  margin: 0 0 0.45rem;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--ink);
}

.cost-params-title + .cost-params-title,
.reserve-grid + .cost-params-title,
.cost-params-grid + .cost-params-title {
  margin-top: 0.75rem;
}

.cost-params-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(110px, 1fr));
  gap: 0.5rem 0.65rem;
}

.cost-params-grid label,
.reserve-row label {
  display: grid;
  gap: 0.25rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
}

.cost-params input,
.cost-params select {
  padding: 0.45rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font: inherit;
}

.reserve-grid {
  display: grid;
  gap: 0.4rem;
}

.reserve-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.8fr) 110px 84px;
  gap: 0.4rem;
  align-items: end;
}

.reserve-row label {
  min-width: 0;
}

.items-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 920px;
}

.items-table th {
  text-align: left;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  font-weight: 700;
  padding: 0.35rem 0.3rem 0.55rem;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.items-table tbody tr {
  height: 46px;
}

.items-table td {
  padding: 0.35rem 0.25rem;
  vertical-align: middle;
}

.items-table input {
  padding: 0.5rem 0.45rem;
  font-size: 0.88rem;
}

.worksheet-hint {
  margin: -0.35rem 0 0.75rem;
}

.worksheet-table .col-no {
  width: 44px;
  text-align: center;
}

.worksheet-table .row-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--brand-soft);
  font-weight: 700;
  font-size: 0.82rem;
}

.worksheet-table .col-poz {
  width: 72px;
}

.worksheet-table .col-poz input {
  width: 100%;
}

.worksheet-table .col-desc {
  min-width: 280px;
  width: 28%;
}

.worksheet-table .col-desc textarea {
  width: 100%;
  min-height: 3.4rem;
  resize: vertical;
  white-space: pre-wrap;
  line-height: 1.35;
  font: inherit;
}

.worksheet-table .col-unit {
  width: 70px;
}

.worksheet-table .col-qty,
.worksheet-table .col-mat,
.worksheet-table .col-lab {
  width: 100px;
}

.worksheet-table .col-sub,
.worksheet-table .col-line-grand,
.worksheet-table .line-total,
.worksheet-table .line-calc {
  min-width: 100px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  white-space: nowrap;
  padding-left: 0.35rem;
  font-size: 0.84rem;
}

.worksheet-table .line-grand {
  color: var(--brand-deep);
}

.worksheet-table .col-mat-profit input,
.worksheet-table .col-lab-profit input,
.worksheet-table .col-oh input,
.worksheet-table .col-ind input,
.worksheet-table .col-term input {
  background: #f7fafc;
}

.sheet-worksheet {
  font-size: 0.72rem;
}

.sheet-worksheet th,
.sheet-worksheet td {
  padding: 0.35rem 0.25rem !important;
}

.sheet-offer {
  width: 100%;
  border-collapse: collapse;
  margin: 0.85rem 0 1rem;
  font-size: 0.8rem;
}

.sheet-offer th,
.sheet-offer td {
  border: 1px solid #c5ccd4;
  padding: 0.42rem 0.5rem;
  vertical-align: top;
}

.sheet-offer th {
  background: #f2f5f8;
  font-weight: 700;
  text-align: left;
}

.sheet-offer .num {
  text-align: right;
  white-space: nowrap;
}

.sheet-offer .col-work {
  width: 46%;
  white-space: pre-wrap;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.sheet-offer .col-poz {
  width: 9%;
  font-weight: 700;
  white-space: nowrap;
}

.sheet-offer-boq .col-work {
  width: 54%;
}

.sheet-offer-boq-split {
  font-size: 0.72rem;
}

.sheet-offer-boq-split th,
.sheet-offer-boq-split td {
  padding: 0.32rem 0.32rem;
}

.sheet-offer-boq-split .col-work {
  width: 34%;
}

.sheet-offer-boq-split .col-poz {
  width: 8%;
}

.sheet-offer-section td.col-work {
  font-weight: 700;
}

.worksheet-table tr.is-boq-section .col-desc textarea {
  font-weight: 700;
  background: #f7fafc;
}

.inline-condition {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.35rem;
}

.condition-text {
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-weight: 500;
}

.condition-num {
  width: 88px !important;
}

.condition-select {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.55rem 0.7rem;
  background: #fbfcfb;
}

.note-templates {
  margin-top: 0;
}

.taslak-left .note-check-grid {
  grid-template-columns: 1fr;
  gap: 0.35rem;
  margin: 0.4rem 0 0.5rem;
}

.taslak-left .note-check {
  padding: 0.4rem 0.5rem;
  font-size: 0.8rem;
}

.note-check-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.35rem;
  margin: 0.4rem 0 0.5rem;
}

.note-check {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.55rem 0.65rem;
  background: #fbfcfe;
  font-size: 0.86rem;
  color: var(--ink-soft);
  font-weight: 500;
  cursor: pointer;
}

.note-check input {
  width: auto;
  margin-top: 0.15rem;
}

.note-check:has(input:checked) {
  border-color: #9eb0cd;
  background: var(--brand-soft);
  color: var(--ink);
}

.note-extra {
  margin-top: 0.35rem;
}

.note-add-row {
  display: flex;
  align-items: flex-end;
  gap: 0.45rem;
  margin-top: 0.5rem;
}

.note-add-field {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 0.25rem;
  font-size: 0.78rem;
  font-weight: 700;
}

.note-add-field input {
  width: 100%;
}

.note-check {
  position: relative;
}

.note-remove {
  margin-left: auto;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1;
}

.note-remove:hover {
  background: #f3e4e4;
  color: var(--danger);
}

#commitment-preview {
  display: block;
  margin-top: 0.45rem;
  font-style: italic;
}

.nego-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem 1rem;
  margin-top: 0.75rem;
}

.workforce-panel {
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.workforce-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem 1rem;
  margin: 0.75rem 0;
}

.workforce-q {
  margin: 0.85rem 0 0.35rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.workforce-results {
  margin: 0.75rem 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.35rem 1.25rem;
}

.workforce-results > div {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.25rem 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.workforce-results dt {
  margin: 0;
  font-weight: 500;
}

.workforce-results dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.crew-override-sticky {
  position: sticky;
  top: 0;
  z-index: 12;
  display: grid;
  gap: 0.45rem;
  margin: 0 0 0.75rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid #f0b429;
  border-radius: 12px;
  background: #fff7ed;
  box-shadow: 0 8px 20px rgba(17, 17, 17, 0.06);
}

.crew-override-sticky p {
  margin: 0;
  color: #7c2d12;
  font-size: 0.92rem;
}

.crew-override-sticky.is-ok {
  border-color: #86efac;
  background: #f0fdf4;
}

.crew-override-sticky.is-ok p {
  color: #14532d;
}

.crew-override {
  margin-top: 0.75rem;
  display: grid;
  gap: 0.45rem;
}

.crew-override-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.crew-override-row input {
  flex: 1 1 220px;
  min-width: 12rem;
}

.workforce-results .grand {
  color: var(--ink);
  font-size: 1rem;
}

.nego-panel {
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.offer-distance {
  margin-top: 0.85rem;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
}

.offer-distance[data-state="ok"] {
  background: #e8f6ee;
  color: #1f6b43;
}

.offer-distance[data-state="warn"] {
  background: #fff4e8;
  color: #9a4d10;
}

@media (max-width: 1100px) {
  .nego-grid,
  .workforce-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .taslak-bar-grid {
    grid-template-columns: 1fr 1fr;
  }

  .ceo-inline {
    grid-column: 1 / -1;
  }

  .note-check-grid {
    grid-template-columns: 1fr;
  }
}

.items-table .remove-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  padding: 0.4rem 0.55rem;
  border-radius: 8px;
}

.items-table .remove-btn:hover {
  background: #f8e8e8;
  color: var(--danger);
}

.totals {
  margin-top: 1rem;
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.kdv-field {
  width: 130px;
}

.kdv-field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
  background: #fbfcfb;
  color: var(--ink);
}

.totals dl {
  margin: 0;
  min-width: 240px;
}

.totals dl > div {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.35rem 0;
  color: var(--ink-soft);
}

.totals dt {
  margin: 0;
  font-weight: 500;
}

.totals dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.totals .grand {
  margin-top: 0.35rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: 1.05rem;
}

.nav-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
}

.nav-tab {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 0.55rem 0.4rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink-soft);
  cursor: pointer;
  pointer-events: auto;
}

.nav-tab:disabled {
  opacity: 1;
  cursor: pointer;
  pointer-events: auto;
  color: var(--ink-soft);
}

.nav-tab.active {
  background: var(--brand-soft);
  border-color: #b8c6db;
  color: var(--ink);
}

.shell-nav.nav-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.shell-nav .nav-tab {
  width: auto;
  flex: 0 0 auto;
  border: 1px solid transparent;
  background: #fff;
  border-radius: 999px;
  padding: 0.42rem 0.95rem;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--ink-soft);
  box-shadow: 0 1px 0 rgba(15, 60, 90, 0.04);
}

.shell-nav .nav-tab:hover {
  border-color: #b7d7ea;
  background: var(--brand-soft);
  color: var(--ink);
}

.shell-nav .nav-tab.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.sender-applied {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0.35rem 0 0.55rem;
}

.sender-applied .sign-thumb {
  width: 72px;
  height: 36px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.side-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.4;
}

.sidebar-panel {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 0;
  flex: 1;
}

.directory-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 0.85rem;
  align-items: flex-end;
  margin-bottom: 0.85rem;
}

.directory-pick {
  flex: 1 1 240px;
  min-width: 200px;
}

.directory-pick select {
  width: 100%;
  max-width: none;
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
}

.inline-actions select,
.block-head select,
#client-picker,
#contact-picker,
#sender-picker,
#issuer-select,
#sheet-layout,
#template-picker {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  background: #fff;
  max-width: 100%;
}

.client-logo-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
  align-items: start;
}

.logo-picker {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  outline: none;
}

.logo-nav {
  width: 48px;
  height: 128px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1;
  padding: 0;
}

.logo-nav:hover:not(:disabled) {
  background: var(--brand-soft);
}

.logo-nav:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.logo-picker.is-locked .logo-preview-box {
  border-color: #1f6f8b;
  border-style: solid;
}

.logo-preview-box {
  width: 240px;
  height: 240px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: #f8fafc;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.logo-option-meta {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.logo-preview-box img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.logo-preview-box span {
  color: var(--muted);
  font-size: 0.8rem;
}

.logo-controls {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.field-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.file-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  max-width: none;
  width: 100%;
}

.template-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.15rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.template-card h2 {
  margin: 0;
  font-size: 1.15rem;
}

.template-card p {
  margin: 0;
  color: var(--muted);
}

.template-card ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.template-card details {
  border-top: 1px solid var(--line);
  padding-top: 0.55rem;
}

.template-card pre {
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin: 0.4rem 0 0;
}

.template-card .btn {
  margin-top: auto;
  align-self: flex-start;
}

.toast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 60;
  background: #111;
  color: #fff;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  box-shadow: var(--shadow);
  font-size: 0.9rem;
  font-weight: 600;
}

.issuer-side-label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
}

.issuer-side-label select {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.5rem 0.65rem;
  background: #fff;
  color: var(--ink);
  font-weight: 600;
}

.issuer-compact {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.65rem 0.85rem;
  margin-bottom: 0.9rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--line);
}

.issuer-compact .directory-pick {
  flex: 1 1 180px;
  min-width: 0;
}

.issuer-compact-logo {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.issuer-picker {
  display: none;
}

.issuer-option {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.65rem 0.7rem;
  background: #fbfcfe;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.issuer-option:has(input[type="radio"]:checked) {
  border-color: #9eb0cd;
  background: var(--brand-soft);
}

.issuer-option-main {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  cursor: pointer;
}

.issuer-option-main input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.issuer-logo-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.issuer-logo-upload-mini {
  position: relative;
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.35rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  color: var(--ink);
  overflow: hidden;
}

.issuer-logo-upload-mini input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  font-size: 0;
}

.issuer-logo-upload-mini:hover {
  background: var(--brand-soft);
}

.issuer-logo-clear {
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0.2rem 0.15rem;
}

.issuer-logo-clear:hover {
  color: var(--ink);
}

.issuer-option.has-custom-logo .issuer-logo-upload-mini {
  border-color: #7aa2d4;
  color: #1a4a7a;
}

.issuer-thumb {
  width: 42px;
  height: 42px;
  object-fit: contain;
  background: transparent;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.issuer-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.issuer-option span {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.issuer-thumb {
  width: 42px;
  height: 42px;
  object-fit: contain;
  background: transparent;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.logo-upload-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.85rem;
  margin-top: 0.85rem;
}

.logo-upload-card {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.75rem;
  background: #fbfcfe;
}

.logo-upload-card img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.sheet-footer-group {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #dfe6e2;
  text-align: center;
}

.sheet-affiliation-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.45rem;
}

.sheet-group-logo {
  height: 28px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
}

.sheet-affiliation {
  margin: 0;
  font-size: 0.82rem;
  color: #111;
  font-weight: 600;
}

.sheet-group-contact {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 1rem;
  font-size: 0.78rem;
  color: #667;
}

.sheet-session-mark {
  margin: 0.5rem 0 0;
  text-align: center;
  font-size: 0.7rem;
  color: #889;
}

@media (max-width: 900px) {
  .issuer-picker {
    grid-template-columns: 1fr;
  }
}

.sheet-company-contact {
  margin-top: 0.45rem;
  font-size: 0.78rem;
  line-height: 1.4;
  color: #445;
}

.sheet table.sheet-cari,
.sheet-page table.sheet-cari {
  width: 100%;
  max-width: 420px;
  margin: 0.35rem 0 0;
  border-collapse: collapse;
}

.sheet .sheet-cari th,
.sheet .sheet-cari td,
.sheet-page .sheet-cari th,
.sheet-page .sheet-cari td {
  padding: 0.18rem 0.35rem 0.18rem 0;
  border: none;
  font-size: 0.7rem;
  line-height: 1.35;
  vertical-align: top;
}

.sheet .sheet-cari th,
.sheet-page .sheet-cari th {
  width: 3.6rem;
  font-weight: 700;
  color: #4a5560;
  white-space: nowrap;
  padding-right: 0.55rem;
}

.sheet .sheet-cari td,
.sheet-page .sheet-cari td {
  color: #222;
  font-weight: 600;
}

.sheet-client-logo {
  display: block;
  max-width: 180px;
  max-height: 90px;
  object-fit: contain;
  margin: 0 0 0.55rem auto;
}

.sheet-salutation {
  margin: 0 0 0.55rem;
  font-weight: 700;
}

.sheet-intro {
  margin: 0 0 1.2rem;
  line-height: 1.5;
  color: #334;
}

.sheet-footnotes {
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px dashed #cfd6d2;
}

.sheet-footnotes h3,
.sheet-notes h3 {
  margin: 0 0 0.4rem;
  font-size: 0.9rem;
}

.sheet-footnotes p {
  margin: 0;
  white-space: pre-wrap;
  color: #445;
  font-size: 0.84rem;
  line-height: 1.45;
}

.sheet-sign {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.sheet-sign-3 {
  grid-template-columns: 1fr 1fr 1fr;
}

.sign-box h3 {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6b7c74;
}

.sign-box p {
  margin: 0.15rem 0;
}

.sign-title {
  color: #667;
  font-size: 0.86rem;
}

.sign-line {
  margin-top: 2.4rem;
  border-bottom: 1px solid #bbb;
}

.sign-hint {
  margin-top: 0.35rem !important;
  color: #889;
  font-size: 0.78rem;
}

.sign-image {
  display: block;
  max-height: 64px;
  max-width: 180px;
  margin-top: 0.75rem;
  object-fit: contain;
  background: transparent !important;
  mix-blend-mode: multiply;
}

.sign-image-ceo {
  max-height: 96px;
  max-width: 100%;
}

.sign-pending {
  margin-top: 1.2rem;
  padding: 0.65rem 0.75rem;
  border: 1px dashed #b8c0c8;
  color: #889;
  font-size: 0.82rem;
  background: #f6f8fa;
}

.sign-inactive {
  opacity: 0.72;
}

.ceo-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid #d5dde5;
  background: #f8fafb;
}

.ceo-box.ceo-approved,
.ceo-inline.ceo-approved {
  border-color: #1f6f8b;
  background: #eef7fa;
}

.ceo-sign-preview {
  min-width: 120px;
  min-height: 48px;
  display: grid;
  place-items: center;
  border: 1px dashed #c5ced6;
  background: #fff;
  padding: 0.35rem;
}

.ceo-sign-preview img {
  max-height: 44px;
  max-width: 140px;
  background: transparent !important;
  mix-blend-mode: multiply;
}

.sign-thumb {
  display: block;
  max-height: 56px;
  margin-top: 0.5rem;
  background: transparent;
  mix-blend-mode: multiply;
}

.order-sheet-inline {
  border: none;
  padding: 0;
  background: transparent;
  overflow: auto;
  max-height: min(78vh, 1100px);
}

.mail-compose.sheet {
  padding-top: 1.6rem;
}

.mail-signature-preview {
  margin-top: 1.25rem;
  padding-top: 0.25rem;
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(20, 32, 28, 0.55);
  overflow: auto;
  padding: 1rem;
}

.overlay-bar {
  position: sticky;
  top: 0;
  z-index: 2;
  max-width: 860px;
  margin: 0 auto 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow);
}

.sheet {
  max-width: 860px;
  margin: 0 auto 2rem;
  background: #fff;
  color: #111;
  font-family: "Manrope", system-ui, sans-serif;
  padding: 2.4rem 2.5rem;
  box-shadow: var(--shadow);
}

.sheet-header {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: flex-start;
  border-bottom: 2px solid #111111;
  padding-bottom: 1.1rem;
  margin-bottom: 1.4rem;
}

.sheet-logo,
.sheet-client-logo,
.sheet-group-logo,
.brand-logo,
.login-logo,
.issuer-thumb,
.logo-preview-box img,
.logo-upload-card img {
  background: transparent;
}

.sheet-logo {
  display: block;
  width: min(280px, 100%);
  height: auto;
  max-width: 280px;
}

.sheet-logo.sheet-logo-industrial {
  width: min(230px, 100%);
  max-width: 230px;
}

.sheet-legal {
  margin: 0.55rem 0 0;
  max-width: none;
  white-space: nowrap;
  font-size: 0.68rem;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
  color: #222;
}

.sheet-doc-title {
  margin: 0.35rem 0 0;
  color: #5f769f;
  font-size: 0.88rem;
  font-weight: 700;
}

.sheet-brand {
  font-size: 2.2rem;
  margin: 0;
  color: #111;
  line-height: 1;
}

.sheet-brand-sub {
  margin: 0.25rem 0 0;
  color: #5f7169;
}

.sheet-meta {
  text-align: right;
  font-size: 0.92rem;
  color: #33443d;
}

.sheet-meta strong {
  display: block;
  font-size: 1.05rem;
  margin-bottom: 0.2rem;
}

.sheet-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  margin-bottom: 1.4rem;
}

.sheet-box {
  border: 1px solid #c5ccd4;
  background: #fff;
  overflow: hidden;
}

.sheet-box h3 {
  margin: 0;
  padding: 0.45rem 0.7rem;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  background: #1b3a4b;
}

.sheet-box p {
  margin: 0.15rem 0;
  line-height: 1.45;
}

.sheet table.sheet-kv,
.sheet-page table.sheet-kv {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
}

.sheet .sheet-kv th,
.sheet .sheet-kv td,
.sheet-page .sheet-kv th,
.sheet-page .sheet-kv td {
  padding: 0.38rem 0.7rem;
  border-bottom: 1px solid #e4eaee;
  font-size: 0.8rem;
  line-height: 1.4;
  vertical-align: top;
}

.sheet .sheet-kv th,
.sheet-page .sheet-kv th {
  width: 7.2rem;
  font-weight: 700;
  color: #4a5560;
  background: #f4f7f8;
  white-space: nowrap;
}

.sheet .sheet-kv td,
.sheet-page .sheet-kv td {
  color: #111;
  font-weight: 600;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}

.sheet .sheet-kv td.sheet-kv-wrap,
.sheet-page .sheet-kv td.sheet-kv-wrap {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.sheet.sheet-paper:not(.sheet-paper-decrates) .sheet-box,
.sheet.sheet-paper:not(.sheet-paper-decrates) .sheet-kv td,
.sheet.sheet-paper:not(.sheet-paper-decrates) .sheet-offer td,
.sheet-pack.sheet-paper:not(.sheet-paper-decrates) .sheet-box,
.sheet-pack.sheet-paper:not(.sheet-paper-decrates) .sheet-kv td,
.sheet-pack.sheet-paper:not(.sheet-paper-decrates) .sheet-offer td {
  background: transparent;
}

.sheet-pack.sheet-paper-decrates.sheet-paper-letterhead .sheet-box,
.sheet-pack.sheet-paper-decrates.sheet-paper-letterhead .sheet-kv td,
.sheet-pack.sheet-paper-decrates.sheet-paper-letterhead .sheet-offer td,
.sheet-pack.sheet-paper-decrates.sheet-paper-letterhead .sheet-notes,
.sheet-pack.sheet-paper-decrates.sheet-paper-letterhead .sheet-footnotes,
.sheet-pack.sheet-paper-decrates.sheet-paper-letterhead .sheet-intro,
.sheet-pack.sheet-paper-decrates.sheet-paper-letterhead .sheet-salutation,
.sheet-pack.sheet-paper-decrates.sheet-paper-letterhead .sheet-doc-title,
.sheet-pack.sheet-paper-decrates.sheet-paper-letterhead .sign-box,
.sheet-pack.sheet-paper-decrates.sheet-paper-letterhead .sheet-totals,
.sheet-pack.sheet-paper-decrates.sheet-paper-letterhead .sheet-footer-group,
.sheet-paper-decrates.sheet-paper-letterhead .sheet-box,
.sheet-paper-decrates.sheet-paper-letterhead .sheet-kv td,
.sheet-paper-decrates.sheet-paper-letterhead .sheet-offer td,
.sheet-paper-decrates.sheet-paper-letterhead .sheet-notes,
.sheet-paper-decrates.sheet-paper-letterhead .sheet-footnotes,
.sheet-paper-decrates.sheet-paper-letterhead .sheet-intro,
.sheet-paper-decrates.sheet-paper-letterhead .sheet-salutation,
.sheet-paper-decrates.sheet-paper-letterhead .sheet-doc-title,
.sheet-paper-decrates.sheet-paper-letterhead .sign-box,
.sheet-paper-decrates.sheet-paper-letterhead .sheet-totals,
.sheet-paper-decrates.sheet-paper-letterhead .sheet-footer-group {
  background: rgba(252, 249, 244, 0.52);
}

.sheet-pack.sheet-paper-decrates.sheet-paper-letterhead .sheet-box,
.sheet-paper-decrates.sheet-paper-letterhead .sheet-box {
  border-color: #d4c7b0;
}

.sheet-pack.sheet-paper-decrates.sheet-paper-letterhead .sheet-offer th,
.sheet-pack.sheet-paper-decrates.sheet-paper-letterhead .sheet-offer td,
.sheet-paper-decrates.sheet-paper-letterhead .sheet-offer th,
.sheet-paper-decrates.sheet-paper-letterhead .sheet-offer td {
  border-color: #d4c7b0;
}

.sheet.sheet-paper .sheet-kv th,
.sheet.sheet-paper .sheet-offer th,
.sheet-pack.sheet-paper .sheet-kv th,
.sheet-pack.sheet-paper .sheet-offer th {
  background: var(--sheet-paper-soft);
}

.sheet-pack.sheet-paper-decrates.sheet-paper-letterhead .sheet-kv th,
.sheet-pack.sheet-paper-decrates.sheet-paper-letterhead .sheet-offer th,
.sheet-paper-decrates.sheet-paper-letterhead .sheet-kv th,
.sheet-paper-decrates.sheet-paper-letterhead .sheet-offer th {
  background: rgba(236, 226, 208, 0.68);
}

.sheet .sheet-kv tr:last-child th,
.sheet .sheet-kv tr:last-child td,
.sheet-page .sheet-kv tr:last-child th,
.sheet-page .sheet-kv tr:last-child td {
  border-bottom: none;
}

.sheet table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.5rem 0 1rem;
}

.sheet th,
.sheet td {
  padding: 0.55rem 0.4rem;
  border-bottom: 1px solid #dfe6e2;
  text-align: left;
  font-size: 0.92rem;
}

.sheet th {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b7c74;
}

.sheet .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.sheet-totals {
  margin-left: auto;
  margin-top: 8px;
  width: min(360px, 100%);
}

.sheet-totals div {
  display: flex;
  justify-content: space-between;
  padding: 0.3rem 0;
}

.sheet-totals .grand {
  margin-top: 0.35rem;
  padding-top: 0.55rem;
  padding-bottom: 0.2rem;
  border-top: 2px solid #111111;
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.35;
}

.sheet-notes {
  margin-top: 1.4rem;
  padding-top: 1rem;
  border-top: 1px solid #dfe6e2;
}

.sheet-notes h3 {
  margin: 0 0 0.4rem;
  font-size: 0.9rem;
}

.sheet-notes p {
  margin: 0;
  white-space: pre-wrap;
  color: #33443d;
  line-height: 1.5;
}

.sheet-footer {
  margin-top: 2rem;
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  color: #5f7169;
  font-size: 0.78rem;
  line-height: 1.4;
}

.sheet-footer > div:first-child {
  max-width: 70%;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.01em;
}

@media screen and (max-width: 1100px) {
  .home-kpis,
  .home-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media screen and (max-width: 900px) {
  .shell-top {
    grid-template-columns: 1fr;
  }

  .shell-tools {
    flex-wrap: wrap;
  }

  .home-kpis,
  .home-grid,
  .home-tiles {
    grid-template-columns: 1fr;
  }

  .app {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto minmax(0, 1fr);
    grid-template-areas:
      "top"
      "nav"
      "side"
      "main";
  }

  .app.is-home {
    grid-template-rows: auto auto minmax(0, 1fr);
    grid-template-areas:
      "top"
      "nav"
      "main";
  }

  .app.sidebar-collapsed {
    grid-template-columns: 1fr;
  }

  .app.sidebar-collapsed .sidebar {
    display: block;
    padding: 0;
    border: none;
    height: 0;
    min-height: 0;
    overflow: visible;
  }

  .app.sidebar-collapsed .sidebar-toggle {
    position: fixed;
    left: 0;
    top: 1rem;
    z-index: 20;
  }

  .sidebar {
    border-right: none;
    border-bottom: 1px solid var(--line);
  }

  .sidebar-toggle {
    top: 0.75rem;
    right: 0.75rem;
  }

  .taslak-split,
  .musteri-body,
  .musteri-pickers,
  .grid-2,
  .grid-3,
  .cost-params-grid,
  .reserve-row {
    grid-template-columns: 1fr;
  }

  .calisma-rail-btn {
    left: 0.55rem;
    top: 0.55rem;
  }

  .note-check-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    flex-direction: column;
  }

  .sheet {
    padding: 1.4rem;
  }

  .sheet-header,
  .sheet-grid,
  .sheet-footer,
  .sheet-sign,
  .client-logo-row {
    grid-template-columns: 1fr;
    flex-direction: column;
    text-align: left;
  }

  .sheet-meta {
    text-align: left;
  }

  .sheet-page .sheet-header {
    flex-direction: row;
    text-align: left;
  }

  .sheet-page .sheet-meta {
    text-align: right;
  }

  .sheet-page .sheet-grid {
    grid-template-columns: 1fr 1fr;
  }

  .sheet-page .sheet-sign-3 {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .sheet-client-logo {
    margin-left: 0;
  }

  .teklif-page-nav {
    grid-template-columns: 1fr;
  }
}

.teko-panel {
  margin: 1rem 0 0;
  padding: 1rem 1.05rem;
  border: 1px solid #d5e4ef;
  border-radius: 16px;
  background: #f4f9fc;
}

.teko-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brand);
}

.teko-ask p,
.teko-off p,
.teko-note {
  margin: 0 0 0.55rem;
}

.teko-study .block-head {
  align-items: center;
}

.teko-kartlar {
  display: grid;
  gap: 0.65rem;
}

.teko-kart {
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 0.75rem 0.8rem;
  cursor: pointer;
}

.teko-kart h3 {
  margin: 0 0 0.45rem;
  font-size: 0.92rem;
}

.teko-fiyat-satir {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin: 0.2rem 0;
}

.teko-fiyat-satir strong {
  display: block;
  font-size: 1.05rem;
}

.teko-fiyat-satir span {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
}

.teko-kart .teko-eski {
  margin-top: 0.35rem;
}

.teko-gecmis {
  margin-top: 0.55rem;
  padding-top: 0.45rem;
  border-top: 1px solid var(--line);
}

.teko-durum {
  display: inline-block;
  border-radius: 999px;
  padding: 0.12rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 800;
}

.teko-durum-uyumlu {
  background: #e5f6ea;
  color: #146c36;
}

.teko-durum-kontrol {
  background: #fff3d6;
  color: #8a5a00;
}

.teko-durum-yok {
  background: #eef2f5;
  color: #5c6b76;
}

.teko-durum-piyasa {
  background: #e7f1fb;
  color: #1a5276;
}

.teko-eski {
  display: block;
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.75rem;
}

.teko-sheet {
  max-width: 210mm;
  margin: 0 auto 2rem;
  background: #fff;
  color: #111;
  padding: 14mm 12mm;
  box-shadow: var(--shadow);
}

.teko-sheet h1 {
  margin: 0 0 0.25rem;
  font-size: 1.35rem;
}

.teko-sheet .teko-uyari {
  margin: 0.6rem 0 0.8rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid #e4b15a;
  background: #fff8ea;
  font-size: 0.85rem;
}

.teko-sheet table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}

.teko-sheet th,
.teko-sheet td {
  border-bottom: 1px solid #d5dde3;
  padding: 0.35rem 0.3rem;
  text-align: left;
  vertical-align: top;
}

.teko-sheet th {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

@media print {
  @page {
    size: 210mm 297mm;
    margin: 0;
  }

  html,
  body {
    background: #fff !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    margin: 0 !important;
    padding: 0 !important;
  }

  body > *:not(#preview-overlay) {
    display: none !important;
  }

  body.print-teko > *:not(#teko-overlay) {
    display: none !important;
  }

  body.print-teko #teko-overlay {
    display: block !important;
    position: static !important;
    inset: auto !important;
    background: none !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
    width: 210mm;
  }

  body.print-teko #teko-overlay .overlay-bar {
    display: none !important;
  }

  body.print-teko .teko-sheet {
    box-shadow: none !important;
    max-width: 210mm !important;
    margin: 0 !important;
  }

  #preview-overlay {
    display: block !important;
    position: static !important;
    inset: auto !important;
    background: none !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
    width: 210mm;
  }

  .overlay-bar {
    display: none !important;
  }

  .sheet-pack,
  #print-sheet {
    gap: 0 !important;
    width: 210mm !important;
    max-width: 210mm !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .sheet-page {
    width: 210mm !important;
    height: 296mm !important;
    min-height: 0 !important;
    max-height: 296mm !important;
    margin: 0 !important;
    box-shadow: none !important;
    page-break-after: always;
    break-after: page;
    break-inside: auto;
    page-break-inside: auto;
    overflow: hidden !important;
  }

  .sheet-page:last-child {
    page-break-after: auto;
    break-after: auto;
  }

  .sheet-logo,
  .sheet-client-logo,
  .sheet-group-logo {
    background: transparent !important;
  }

  .sheet-matbu-sign,
  .sign-image {
    background: transparent !important;
    mix-blend-mode: normal !important;
    filter: none !important;
  }

  .sheet-paper-letterhead .sheet-page-foot {
    min-height: 22mm !important;
  }

  .sheet-paper-decrates.sheet-paper-letterhead .sheet-page-foot {
    justify-content: flex-end !important;
    padding-left: 28mm !important;
    background: transparent !important;
  }

  .sheet-page .sheet-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
  }

  .sheet-page .sheet-sign-3 {
    display: grid !important;
    grid-template-columns: 1fr 1fr 1fr !important;
  }

  .sheet-pack.sheet-paper-letterhead .sheet-page,
  .sheet-paper-letterhead .sheet-page {
    background-image: none !important;
    padding: 36mm 16mm 30mm !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .sheet-letterhead-fill {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: fill !important;
    object-position: 0 0 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .sheet-pack.sheet-paper-industrial .sheet-page,
  .sheet-paper-industrial .sheet-page {
    background-color: #f7f9fb !important;
    background-image: none !important;
  }

  .sheet-pack.sheet-paper-klimasist .sheet-page,
  .sheet-paper-klimasist .sheet-page {
    background-color: #f3f8fc !important;
    background-image: none !important;
    padding: 32mm 16mm 36mm !important;
  }

  .sheet-pack.sheet-paper-decrates .sheet-page,
  .sheet-paper-decrates .sheet-page {
    background-color: #f7f4ee !important;
    background-image: none !important;
    padding: 56mm 16mm 30mm 80mm !important;
  }

  .sheet-pack.sheet-paper-decrates.sheet-paper-letterhead .sheet-page-body,
  .sheet-paper-decrates.sheet-paper-letterhead .sheet-page-body {
    background: rgba(252, 249, 244, 0.42) !important;
    box-shadow: none;
    padding: 2mm 2.5mm 1.5mm;
  }

  .sheet-pack.sheet-paper-decrates.sheet-paper-letterhead .sheet-offer td,
  .sheet-paper-decrates.sheet-paper-letterhead .sheet-offer td,
  .sheet-pack.sheet-paper-decrates.sheet-paper-letterhead .sheet-kv td,
  .sheet-paper-decrates.sheet-paper-letterhead .sheet-kv td,
  .sheet-pack.sheet-paper-decrates.sheet-paper-letterhead .sheet-box,
  .sheet-paper-decrates.sheet-paper-letterhead .sheet-box,
  .sheet-pack.sheet-paper-decrates.sheet-paper-letterhead .sheet-intro,
  .sheet-paper-decrates.sheet-paper-letterhead .sheet-intro,
  .sheet-pack.sheet-paper-decrates.sheet-paper-letterhead .sheet-salutation,
  .sheet-paper-decrates.sheet-paper-letterhead .sheet-salutation,
  .sheet-pack.sheet-paper-decrates.sheet-paper-letterhead .sheet-notes,
  .sheet-paper-decrates.sheet-paper-letterhead .sheet-notes {
    background: rgba(252, 249, 244, 0.52) !important;
  }

  .sheet-pack.sheet-paper-decrates.sheet-paper-letterhead .sheet-offer th,
  .sheet-paper-decrates.sheet-paper-letterhead .sheet-offer th,
  .sheet-pack.sheet-paper-decrates.sheet-paper-letterhead .sheet-kv th,
  .sheet-paper-decrates.sheet-paper-letterhead .sheet-kv th {
    background: rgba(236, 226, 208, 0.68) !important;
  }

  .sheet-pack.sheet-paper-kosiap .sheet-page,
  .sheet-paper-kosiap .sheet-page {
    background-color: #f3f7fb !important;
    background-image: none !important;
    padding: 66mm 16mm 32mm 16mm !important;
  }
}

.belge-drop {
  display: grid;
  gap: 0.25rem;
  margin: 0 0 1rem;
  padding: 1.1rem 1rem;
  border: 1px dashed #9ec3da;
  border-radius: 14px;
  background: #f4f9fc;
  font-weight: 800;
  cursor: pointer;
}

.belge-drop span {
  font-weight: 500;
  color: var(--muted);
  font-size: 0.85rem;
}

.belge-drop input {
  margin-top: 0.45rem;
}

.belge-list {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.belge-item {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.belge-item strong {
  display: block;
}

.belge-item small {
  color: var(--muted);
}
