:root {
  --ink: #14201c;
  --muted: #4a5c54;
  --paper: #e8f0ea;
  --panel: rgba(255, 255, 255, 0.78);
  --accent: #0f6b4c;
  --accent-deep: #0a4d37;
  --line: rgba(20, 32, 28, 0.12);
  --shadow: 0 18px 50px rgba(15, 40, 30, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "DM Sans", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, #cfe8d8 0%, transparent 55%),
    radial-gradient(900px 500px at 100% 0%, #d9e7f2 0%, transparent 50%),
    linear-gradient(165deg, #f3f7f4 0%, var(--paper) 45%, #dfece4 100%);
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 1.5rem clamp(1.25rem, 4vw, 3rem) 3rem;
}

.top {
  margin-bottom: clamp(3rem, 10vh, 6rem);
}

.top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-link {
  text-decoration: none;
  color: inherit;
}

.firma-link {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--accent-deep);
  text-decoration: none;
  padding: 0.55rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: var(--panel);
  transition: background 0.15s ease, border-color 0.15s ease;
}

.firma-link:hover {
  border-color: rgba(15, 107, 76, 0.35);
  background: #fff;
}

.brand {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--accent-deep);
}

.hero {
  max-width: 40rem;
  margin: 0 auto;
  width: 100%;
  animation: rise 0.7s ease both;
}

.hero h1 {
  margin: 0 0 0.75rem;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.75rem, 4.5vw, 2.5rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.lead {
  margin: 0 0 1.75rem;
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--muted);
  max-width: 28rem;
  animation: rise 0.7s ease 0.08s both;
}

.track {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  padding: 0.65rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  animation: rise 0.7s ease 0.16s both;
}

.track input {
  flex: 1 1 14rem;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 0.9rem 1rem;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  outline: none;
}

.track input::placeholder {
  color: #7a8c84;
}

.track button {
  border: 0;
  border-radius: 0.75rem;
  padding: 0.9rem 1.35rem;
  font: inherit;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(180deg, #17835e 0%, var(--accent) 100%);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.track button:hover {
  background: linear-gradient(180deg, #1a9168 0%, var(--accent-deep) 100%);
}

.track button:active {
  transform: translateY(1px);
}

.result {
  margin-top: 1.25rem;
  padding: 1.15rem 1.25rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 1rem;
  box-shadow: var(--shadow);
  animation: rise 0.45s ease both;
}

.result-label {
  margin: 0 0 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.result-code {
  margin: 0 0 0.5rem;
  font-weight: 700;
  font-size: 1.05rem;
}

.result-status {
  margin: 0 0 0.35rem;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--accent-deep);
}

.result-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

.result.is-empty .result-status {
  color: #8a4b2a;
}

.events {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.events li {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
}

.events li:last-child {
  border-bottom: 0;
}

.ev-when {
  font-size: 0.8rem;
  color: var(--muted);
}

.ev-desc {
  font-size: 0.95rem;
  color: var(--ink);
}

.track button:disabled {
  opacity: 0.7;
  cursor: wait;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 520px) {
  .track {
    flex-direction: column;
  }

  .track button {
    width: 100%;
  }
}

/* —— Firma auth —— */
.auth {
  max-width: 28rem;
  margin: 0 auto;
  width: 100%;
  animation: rise 0.55s ease both;
}

.auth h1 {
  margin: 0 0 0.5rem;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.6rem, 4vw, 2.1rem);
}

.auth-lead {
  margin-bottom: 1.25rem !important;
}

.tabs {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.tab {
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--muted);
  cursor: pointer;
}

.tab.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.panel {
  display: none !important;
}

.panel.is-active {
  display: block !important;
}

.panel[hidden] {
  display: none !important;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1.1rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 1rem;
  box-shadow: var(--shadow);
}

.auth-form label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
}

.auth-form input,
.auth-form select {
  font: inherit;
  font-weight: 400;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  padding: 0.7rem 0.85rem;
  background: #fff;
}

.auth-form button[type="submit"],
.btn-primary-link {
  border: 0;
  border-radius: 0.75rem;
  padding: 0.85rem 1.2rem;
  font: inherit;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(180deg, #17835e 0%, var(--accent) 100%);
  cursor: pointer;
  text-align: center;
  text-decoration: none;
}

.btn-secondary {
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  font: inherit;
  font-weight: 600;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}

.warn-box {
  margin: 0;
  padding: 0.85rem 0.95rem;
  border-radius: 0.75rem;
  background: #fff6e8;
  border: 1px solid #efd2a8;
  color: #6a4a22;
  font-size: 0.9rem;
  line-height: 1.45;
  font-weight: 400;
}

.hint {
  margin: 0.35rem 0 0.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.q-block {
  padding-top: 0.5rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.q-title {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  color: var(--accent-deep);
}

.q-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.alt-login {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 1rem;
  border: 1px dashed var(--line);
  background: rgba(255, 255, 255, 0.5);
}

.alt-login summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--accent-deep);
}

.form-msg {
  margin: 0 0 0.85rem;
  padding: 0.7rem 0.9rem;
  border-radius: 0.65rem;
  background: #e7f5ee;
  color: var(--accent-deep);
  font-size: 0.92rem;
}

.form-msg.is-error {
  background: #fdeceb;
  color: #8a2f2a;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-user {
  font-size: 0.85rem;
  color: var(--muted);
}

.app-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: -2rem 0 2rem;
  max-width: 72rem;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

.app-nav a {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--muted);
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 1px solid transparent;
}

.app-nav a.is-active,
.app-nav a:hover {
  color: var(--accent-deep);
  border-color: var(--line);
  background: var(--panel);
}

.wide {
  max-width: 72rem !important;
}

.card-grid {
  display: grid;
  gap: 0.85rem;
  margin: 1.25rem 0 2rem;
}

.dash-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.1rem 1.2rem;
  border-radius: 1rem;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
}

.dash-card strong {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.15rem;
  color: var(--accent-deep);
}

.dash-card span {
  font-size: 0.92rem;
  color: var(--muted);
}

.section-title {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.2rem;
  margin: 0 0 0.75rem;
}

.ship-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.ship-item {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) auto minmax(0, auto);
  align-items: center;
  gap: 0.75rem 1rem;
  padding: 0.85rem 1rem;
  border-radius: 0.85rem;
  border: 1px solid var(--line);
  background: var(--panel);
}

.ship-main {
  min-width: 0;
}

.ship-mid {
  justify-self: center;
  text-align: center;
}

.ship-status {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  white-space: nowrap;
  border: 1px solid var(--line);
  background: #f3f5f4;
  color: var(--ink);
}

.ship-status.tone-neutral {
  background: #eef1ef;
  color: #3d4a44;
}

.ship-status.tone-info {
  background: #e7f0ff;
  color: #1e4d8c;
  border-color: #c5d8f5;
}

.ship-status.tone-warn {
  background: #fff6e8;
  color: #6a4a22;
  border-color: #efd2a8;
}

.ship-status.tone-ok {
  background: #e8f5ef;
  color: #0f5c3f;
  border-color: #b7dfc9;
}

.ship-status.tone-error {
  background: #fdeced;
  color: #8b1e2b;
  border-color: #f0b8be;
}

@media (max-width: 640px) {
  .ship-item {
    grid-template-columns: 1fr;
    justify-items: start;
  }
  .ship-mid {
    justify-self: start;
  }
}

.ship-item .muted,
.muted {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 400;
}

.ship-item a {
  color: var(--accent-deep);
  font-weight: 700;
  text-decoration: none;
}

.crumb {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0 0 0.5rem;
}

.crumb a {
  color: var(--accent-deep);
}

.check-row {
  flex-direction: row !important;
  align-items: center;
  gap: 0.5rem !important;
  font-weight: 600;
}

.check-row input {
  width: auto;
}

.done-box {
  padding: 1.25rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 1rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.btn-sm {
  padding: 0.4rem 0.7rem !important;
  font-size: 0.85rem !important;
  text-decoration: none;
  display: inline-block;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.field[hidden] {
  display: none !important;
}

.form-row-ship-meta {
  display: grid;
  gap: 0.75rem 1rem;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1.15fr) minmax(0, 1fr) minmax(5.5rem, 0.55fr);
  align-items: end;
}

.form-row-ship-meta .field-desi {
  min-width: 0;
}

.form-row-ship-meta label.field {
  margin: 0;
}

@media (max-width: 900px) {
  .form-row-ship-meta {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .form-row-ship-meta {
    grid-template-columns: 1fr;
  }
}

.form-row-receiver-loc {
  display: grid;
  gap: 0.75rem 1rem;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1fr);
  align-items: end;
}

.form-row-receiver-loc label.field {
  margin: 0;
}

@media (max-width: 640px) {
  .form-row-receiver-loc {
    grid-template-columns: 1fr;
  }
}

.field-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.field-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
}

.combo-row {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
}

.combo {
  position: relative;
  flex: 1;
  min-width: 0;
}

.combo input {
  width: 100%;
  font: inherit;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  padding: 0.7rem 0.85rem;
  background: #fff;
}

.icon-btn {
  flex-shrink: 0;
  width: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  background: #fff;
  color: var(--accent-deep);
  cursor: pointer;
  padding: 0;
}

.icon-btn:hover {
  background: #e8f5ef;
  border-color: var(--accent-deep);
}

.suggest {
  list-style: none;
  margin: 0.25rem 0 0;
  padding: 0.25rem;
  position: absolute;
  left: 0;
  right: 0;
  z-index: 20;
  max-height: 220px;
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  box-shadow: var(--shadow);
}

.suggest li {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.55rem 0.7rem;
  border-radius: 0.5rem;
  cursor: pointer;
}

.suggest li:hover,
.suggest li:focus {
  background: #e8f5ef;
  outline: none;
}

.suggest li span {
  font-size: 0.8rem;
  color: var(--muted);
}

.nested-form {
  margin: 0.25rem 0 0.5rem;
  box-shadow: none;
}

.import-box {
  margin-bottom: 1.25rem;
}

.file-label input[type="file"] {
  display: block;
  margin-top: 0.35rem;
  width: 100%;
  font: inherit;
}

.search-bar {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0 0 0.85rem;
}

.search-bar input[type="search"] {
  width: 100%;
  font: inherit;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  padding: 0.7rem 0.85rem;
  background: #fff;
}

body.modal-open {
  overflow: hidden;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal[hidden] {
  display: none !important;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 28, 24, 0.55);
}

.modal-card {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  max-height: min(90vh, 640px);
  overflow: auto;
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
  padding: 1.1rem 1.15rem 1.2rem;
  animation: modalIn 0.18s ease-out;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.modal-head h2 {
  margin: 0;
  font-family: Fraunces, Georgia, serif;
  font-size: 1.35rem;
}

.modal-close {
  border: 0;
  background: transparent;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
  padding: 0.15rem 0.4rem;
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.modal-body label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
}

.modal-body input {
  font: inherit;
  font-weight: 400;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  padding: 0.65rem 0.8rem;
  background: #fff;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.55rem;
  margin-top: 1rem;
}

.btn-primary {
  border: 0;
  border-radius: 0.75rem;
  padding: 0.75rem 1.15rem;
  font: inherit;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(180deg, #17835e 0%, var(--accent) 100%);
  cursor: pointer;
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: wait;
}

.int-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.field .field-row-head {
  margin-bottom: 0.35rem;
}

.field select {
  width: 100%;
  font: inherit;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  padding: 0.7rem 0.85rem;
  background: #fff;
}

.link-btn {
  border: 0;
  background: none;
  color: var(--accent-deep);
  font: inherit;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

.modal-card-wide {
  width: min(480px, 100%);
}

.modal-body label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
}

.modal-body select,
.modal-body input[type="text"],
.modal-body input[type="password"],
.modal-body input:not([type]) {
  font: inherit;
  font-weight: 400;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  padding: 0.65rem 0.8rem;
  background: #fff;
}

.modal-body .check-row {
  flex-direction: row;
  align-items: center;
  font-weight: 500;
  color: var(--ink);
}

.modal-actions {
  flex-wrap: wrap;
}

.test-result {
  margin: 0.35rem 0 0;
  padding: 0.7rem 0.85rem;
  border-radius: 0.65rem;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.4;
  background: #e8f5ef;
  border: 1px solid #b7dfc9;
  color: #0f5c3f;
}

.test-result.is-error {
  background: #fdeced;
  border-color: #f0b8be;
  color: #8b1e2b;
}

.test-result.is-ok {
  background: #e8f5ef;
  border-color: #b7dfc9;
  color: #0f5c3f;
}

.print-page {
  max-width: 22rem;
}

.print-page:has(#printSheetYci:not([hidden])) {
  max-width: 22rem;
}

.carrier-banner {
  margin: 0.75rem 0 1rem;
  padding: 0.65rem 0.85rem;
  border-radius: 0.65rem;
  font-weight: 600;
  font-size: 0.92rem;
}

.carrier-banner.is-ok {
  background: #e8f5ef;
  color: #0f5c3f;
}

.carrier-banner.is-warn {
  background: #fff6e8;
  color: #6a4a22;
}

.carrier-banner.is-error {
  background: #fdeced;
  color: #8b1e2b;
}

.print-actions {
  margin-bottom: 1.25rem;
}

.print-sheet {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 1.25rem;
  color: #111;
  box-shadow: var(--shadow);
}

.print-head {
  text-align: center;
  border-bottom: 1px solid #ddd;
  padding-bottom: 0.85rem;
}

.print-brand {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #666;
}

.print-firm {
  margin: 0.35rem 0 0;
  font-size: 1.15rem;
  font-weight: 700;
}

.print-codes {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #ddd;
}

.print-codes[hidden],
#arasLabelWrap[hidden],
#talepWrap[hidden] {
  display: none !important;
}

.print-bc,
.print-qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.print-bc {
  flex: 1;
}

.print-code {
  margin: 0;
  font-family: ui-monospace, Consolas, monospace;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.print-muted {
  margin: 0.25rem 0 0;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #666;
}

#arasLabelImg {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0.5rem auto 0;
}

.print-meta {
  margin: 1rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.print-meta dt {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #666;
}

.print-meta dd {
  margin: 0.15rem 0 0;
  font-size: 0.95rem;
  font-weight: 600;
}

.print-meta .mono {
  font-family: ui-monospace, Consolas, monospace;
}

@media print {
  body {
    background: #fff !important;
  }
  .no-print {
    display: none !important;
  }
  .page {
    max-width: none;
    margin: 0;
    padding: 0;
  }
  .print-sheet,
  .yci-label {
    box-shadow: none !important;
    border-radius: 0 !important;
  }
  .yci-label {
    border: 0 !important;
    padding: 0 !important;
    max-width: none !important;
  }
}

.print-sheet[hidden],
.yci-label[hidden] {
  display: none !important;
}

/* —— Yurtiçi selfservis etiket —— */
.yci-label {
  background: #fff;
  color: #111;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  padding: 0.65rem 0.75rem 0.85rem;
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
  max-width: 20rem;
  margin: 0 auto;
}

.yci-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}

.yci-logos {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2rem;
  flex-wrap: wrap;
}

.yci-logo {
  max-height: 2.1rem;
  max-width: 5.5rem;
  object-fit: contain;
  display: block;
}

.yci-logo[hidden],
.yci-brand-fallback[hidden] {
  display: none !important;
}

.yci-brand-fallback {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
  line-height: 1;
}

.yci-yk {
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.04em;
}

.yci-self {
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.yci-time {
  font-size: 0.72rem;
  white-space: nowrap;
  padding-top: 0.15rem;
}

.yci-frame {
  display: grid;
  grid-template-columns: 1fr 3.85rem;
  border: 1.5px solid #111;
  min-height: 11rem;
}

.yci-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.yci-block {
  display: grid;
  grid-template-columns: 1.1rem 1fr;
  border-bottom: 1.5px solid #111;
}

.yci-block:last-child {
  border-bottom: 0;
  flex: 1;
}

.yci-gon {
  min-height: 2.6rem;
}

.yci-rail {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1.5px solid #111;
  padding: 0.2rem 0;
}

.yci-content {
  padding: 0.35rem 0.45rem;
  font-size: 0.72rem;
  line-height: 1.25;
}

.yci-gon .yci-content {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
}

.yci-name {
  margin: 0 0 0.25rem;
  font-size: 0.95rem;
  font-weight: 800;
  text-transform: uppercase;
}

.yci-addr,
.yci-line,
.yci-piece {
  margin: 0.15rem 0 0;
}

.yci-line[hidden] {
  display: none !important;
}

.yci-piece {
  margin-top: 0.55rem;
  font-weight: 700;
}

.yci-vbar {
  border-left: 1.5px solid #111;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  overflow: hidden;
  min-height: 11rem;
}

.yci-vbar-bc {
  flex: 1 1 auto;
  position: relative;
  overflow: hidden;
  min-width: 0;
}

.yci-vbar-rot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10.5rem;
  height: 1.85rem;
  margin-left: -5.25rem;
  margin-top: -0.92rem;
  transform: rotate(-90deg);
  transform-origin: center center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.yci-vbar-rot svg {
  width: 100% !important;
  height: 100% !important;
  max-width: none;
  display: block;
}

.yci-vcode {
  flex: 0 0 1.15rem;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  font-family: ui-monospace, Consolas, monospace;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.15rem 0;
  line-height: 1.05;
  border-left: 1px solid #ddd;
  background: #fff;
  z-index: 2;
}

.yci-hbar {
  margin-top: 0.65rem;
  text-align: center;
}

.yci-hbar svg {
  max-width: 100%;
}

.yci-hcode {
  margin: 0.2rem 0 0;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  font-family: ui-monospace, Consolas, monospace;
}

/* —— Entegrasyon logo yükleme —— */
.logo-upload-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

@media (max-width: 560px) {
  .logo-upload-grid {
    grid-template-columns: 1fr;
  }
}

.logo-upload {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.65rem;
  border: 1px dashed var(--line);
  border-radius: 0.65rem;
  background: #fafcfb;
}

.logo-upload input[type="file"] {
  font-size: 0.82rem;
}

.logo-preview-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.5rem;
}

.logo-preview-wrap img {
  max-height: 2.5rem;
  max-width: 6rem;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0.35rem;
  padding: 0.15rem;
}

.print-talep {
  text-align: center;
  padding: 0.85rem 0;
  border-bottom: 1px solid #ddd;
  margin-bottom: 0.25rem;
}

.print-talep[hidden] {
  display: none !important;
}

.print-talep .print-code {
  margin-top: 0.35rem;
}

.talep-info label input[readonly] {
  background: #f3f5f4;
  color: var(--ink);
}

.field select {
  width: 100%;
  font: inherit;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  padding: 0.7rem 0.85rem;
  background: #fff;
}

/* SMS entegrasyonu */
.sms-form .switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.35rem;
}

.switch {
  position: relative;
  display: inline-block;
  width: 3rem;
  height: 1.65rem;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-slider {
  position: absolute;
  inset: 0;
  cursor: pointer;
  background: #c5cdc8;
  border-radius: 999px;
  transition: background 0.15s ease;
}

.switch-slider::before {
  content: "";
  position: absolute;
  height: 1.25rem;
  width: 1.25rem;
  left: 0.2rem;
  top: 0.2rem;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.15s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.switch input:checked + .switch-slider {
  background: #22a06b;
}

.switch input:checked + .switch-slider::before {
  transform: translateX(1.25rem);
}

.sms-provider-box {
  margin: 0.35rem 0 0.5rem;
  padding: 1rem 1.05rem;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.65);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.sms-provider-title {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.05rem;
  color: var(--accent-deep);
}

.sms-provider-link {
  margin: -0.35rem 0 0.15rem;
  font-size: 0.88rem;
  color: #1a6bb5;
  word-break: break-all;
}

#btnTestOpen {
  border-color: #2f7fc9;
  color: #fff;
  background: linear-gradient(180deg, #4a9ae0 0%, #2f7fc9 100%);
}

.modal-card:has(.sms-test-head) {
  padding: 0;
  overflow: hidden;
}

.sms-test-head {
  margin: 0;
  padding: 0.95rem 1.1rem;
  background: #2f7fc9;
  color: #fff;
  align-items: flex-start;
}

.sms-test-eyebrow {
  margin: 0 0 0.15rem;
  font-size: 0.82rem;
  font-weight: 600;
  opacity: 0.92;
}

.sms-test-head h2 {
  color: #fff;
  font-size: 1.2rem;
}

.sms-test-head .modal-close {
  color: #fff;
  opacity: 0.9;
}

.sms-test-info {
  margin: 0;
  padding: 0.75rem 0.85rem;
  border-left: 3px solid #2f7fc9;
  background: #f3f5f7;
  border-radius: 0 0.5rem 0.5rem 0;
  font-size: 0.9rem;
  color: #445;
  font-weight: 400;
}

.modal-card:has(.sms-test-head) .modal-body {
  padding: 1rem 1.15rem 0.35rem;
}

.modal-card:has(.sms-test-head) .modal-actions {
  margin: 0;
  padding: 0.85rem 1.15rem 1.05rem;
  background: #f4f5f6;
  justify-content: flex-end;
}

.sms-tpl-head {
  margin-top: 2rem;
}

.sms-tpl-sample {
  margin: 0.35rem 0 0;
  font-size: 0.88rem;
  line-height: 1.4;
}

.sms-preview-box {
  margin-top: 0.35rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: #f7f8f8;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.sms-preview-text {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--ink);
}

#tplForm textarea {
  font: inherit;
  font-weight: 400;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  padding: 0.65rem 0.8rem;
  background: #fff;
  resize: vertical;
  min-height: 7rem;
}

.sms-card-grid {
  margin-bottom: 1.25rem;
}

button.dash-card.sms-nav-card {
  width: 100%;
  text-align: left;
  cursor: pointer;
  font: inherit;
  appearance: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

button.dash-card.sms-nav-card.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(23, 131, 94, 0.18);
}

.sms-panel {
  margin-top: 0.25rem;
}

.sms-accordion {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin: 1.25rem 0 2rem;
}

.sms-acc-item {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.sms-acc-item .sms-panel {
  margin: 0;
  padding: 1rem 1.05rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.sms-acc-item .sms-form {
  margin: 0;
}

.panel-ship-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.panel-ship-head h1 {
  margin: 0;
}

.status-groups {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  justify-content: flex-end;
  max-width: 100%;
}

.status-group-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 0.4rem 0.7rem;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  line-height: 1.2;
}

.status-group-btn:hover {
  border-color: #9bb5a8;
}

.status-group-btn.is-active {
  background: linear-gradient(180deg, #17835e 0%, var(--accent) 100%);
  border-color: transparent;
  color: #fff;
}

.status-group-count {
  min-width: 1.25rem;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.1rem 0.35rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
}

.status-group-btn.is-active .status-group-count {
  background: rgba(255, 255, 255, 0.22);
}

@media (max-width: 720px) {
  .panel-ship-head {
    flex-direction: column;
    align-items: stretch;
  }
  .status-groups {
    justify-content: flex-start;
  }
}

.ship-item-pipeline {
  grid-template-columns: minmax(140px, 0.9fr) minmax(0, 1.8fr) auto;
}

.ship-mid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
}

.ship-pipeline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.2rem 0.15rem;
  max-width: 100%;
}

.ship-step {
  font-size: 0.72rem;
  font-weight: 600;
  color: #8a9690;
  padding: 0.15rem 0.35rem;
  border-radius: 0.35rem;
  white-space: nowrap;
}

.ship-step.is-done {
  color: #0f5c3f;
  background: #e8f5ef;
}

.ship-step.is-current {
  color: #1e4d8c;
  background: #e7f0ff;
  font-weight: 700;
}

.ship-step.is-muted {
  opacity: 0.45;
}

.ship-step-sep {
  color: #c5cdc8;
  font-size: 0.7rem;
  padding: 0 0.05rem;
}

.ship-sms {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  border: 1px solid transparent;
}

.ship-sms.is-ok {
  background: #e8f5ef;
  color: #0f5c3f;
  border-color: #b7dfc9;
}

.ship-sms.is-fail {
  background: #fdeced;
  color: #8b1e2b;
  border-color: #f0b8be;
}

.ship-sms.is-wait {
  background: #f3f5f4;
  color: #5a6660;
  border-color: var(--line);
}

@media (max-width: 900px) {
  .ship-item-pipeline {
    grid-template-columns: 1fr;
  }
  .ship-mid {
    align-items: flex-start;
  }
  .ship-pipeline {
    justify-content: flex-start;
  }
}

.ship-item-row {
  grid-template-columns: auto minmax(140px, 1fr) auto auto;
  gap: 0.65rem 0.85rem;
}

.ship-carrier-name {
  display: block;
  margin-bottom: 0.08rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.ship-tracking-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.ship-carrier-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.45rem;
  height: 1.45rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 0.4rem;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  flex: none;
}

.ship-carrier-link:hover {
  color: var(--accent-deep);
  border-color: #b9c6be;
}

.ship-carrier-open {
  margin-top: 0.75rem;
}

.ship-tracking-link {
  display: block;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--accent-deep);
  font: inherit;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  text-align: left;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 0.18rem;
}

.ship-tracking-link:hover {
  text-decoration-color: currentColor;
}

.ship-tracking-panel {
  grid-column: 2 / -1;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: #f8faf9;
}

.ship-tracking-panel.is-error {
  color: #8b1e2b;
  background: #fdeced;
  border-color: #f0b8be;
}

.ship-tracking-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.ship-tracking-head small,
.ship-tracking-head strong {
  display: block;
}

.ship-tracking-head small {
  color: var(--muted);
}

.ship-tracking-close {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 1.35rem;
  cursor: pointer;
}

.ship-tracking-status {
  margin: 0.6rem 0 0.2rem;
  font-weight: 800;
}

.ship-tracking-events {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.ship-tracking-events li {
  display: grid;
  grid-template-columns: minmax(8rem, auto) 1fr;
  gap: 0.75rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.86rem;
}

.ship-tracking-events time {
  color: var(--muted);
}

.ship-trash {
  border: 0;
  background: transparent;
  color: #9aa39c;
  cursor: pointer;
  padding: 0.35rem;
  border-radius: 0.45rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.ship-trash:hover {
  color: #8b1e2b;
  background: #fdeceb;
}

.ship-item-row .ship-mid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

@media (max-width: 720px) {
  .ship-item-row {
    grid-template-columns: auto 1fr;
  }
  .ship-item-row .ship-mid,
  .ship-item-row .row-actions {
    grid-column: 2;
    justify-self: start;
    align-items: flex-start;
  }
  .ship-tracking-panel {
    grid-column: 1 / -1;
  }
  .ship-tracking-events li {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }
}

.ship-item-row .ship-mid {
  justify-self: center;
  text-align: center;
  min-width: 9.5rem;
}

.ship-sms-btn {
  font: inherit;
  cursor: pointer;
  appearance: none;
}

.ship-sms.is-wait {
  background: #fff3cd;
  color: #7a5b00;
  border-color: #f0d78c;
  box-shadow: 0 0 0 2px rgba(240, 215, 140, 0.35);
}

.ship-sms.is-ok {
  background: #d8f5e5;
  color: #0a6b42;
  border-color: #7ed0a8;
  box-shadow: 0 0 0 2px rgba(126, 208, 168, 0.35);
}

.ship-status.tone-shipped,
.ship-status.is-kargolandi {
  background: linear-gradient(180deg, #2bb673 0%, #17835e 100%);
  color: #fff;
  border-color: #0f5c3f;
  box-shadow: 0 4px 12px rgba(23, 131, 94, 0.28);
  font-size: 0.88rem;
  padding: 0.4rem 0.85rem;
}

.ship-status.tone-info:not(.is-kargolandi) {
  background: #e7f0ff;
  color: #1e4d8c;
}

/* Büyüteç kartı */
.ship-peek {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.9rem;
  height: 1.9rem;
  border: 1px solid var(--line);
  border-radius: 0.6rem;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
}

.ship-peek:hover {
  color: var(--ink);
  border-color: #b9c6be;
}

.peek-card {
  width: min(560px, 100%);
  max-height: min(92vh, 780px);
}

.peek-h3 {
  margin: 0.35rem 0 0;
  font-family: Fraunces, Georgia, serif;
  font-size: 1.05rem;
}

.peek-live-hint {
  margin: 0.55rem 0 0;
  font-size: 0.8rem;
}

.peek-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 0.9rem;
  margin: 0;
}

.peek-facts > div {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.peek-facts dt {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.peek-facts dd {
  margin: 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.peek-log {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-height: 15rem;
  overflow: auto;
}

.peek-log-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.15rem 0.6rem;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--line);
  border-left: 3px solid #b9c6be;
  border-radius: 0.55rem;
  background: #fbfcfb;
  font-size: 0.88rem;
}

.peek-log-label {
  font-weight: 600;
}

.peek-log-at {
  color: var(--muted);
  font-size: 0.8rem;
  white-space: nowrap;
}

.peek-log-detail {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}

.peek-log-item.peek-print {
  border-left-color: #2f7fc9;
}

.peek-log-item.peek-tracking {
  border-left-color: #7a5b00;
}

.peek-log-item.peek-sms {
  border-left-color: #17835e;
}

.peek-log-item.peek-sms-fail {
  border-left-color: #b3261e;
}

.peek-log-item.peek-save {
  border-left-color: #6d3fc0;
}

.peek-note {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.peek-note.is-warn {
  color: #7a5b00;
}

.peek-form {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.peek-form label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
}

.peek-form input,
.peek-form textarea {
  font: inherit;
  font-weight: 400;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  padding: 0.6rem 0.75rem;
  background: #fff;
  resize: vertical;
}

.peek-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.peek-form-actions {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.peek-form-msg {
  font-size: 0.85rem;
  font-weight: 600;
  color: #0a6b42;
}

.peek-form-msg.is-warn {
  color: #7a5b00;
}

.peek-form-msg.is-error {
  color: #b3261e;
}

@media (max-width: 520px) {
  .peek-facts,
  .peek-form-row {
    grid-template-columns: 1fr;
  }
}

