:root {
  --bg: #edf1f0;
  --surface: #ffffff;
  --ink: #16282c;
  --muted: #5b6f73;
  --line: #d3dcdb;
  --lake: #1d5f68;
  --lake-deep: #123f46;
  --lake-soft: #dcebec;
  --brass: #9a6a12;
  --brass-soft: #f6ecd4;
  --ok: #2b7549;
  --ok-soft: #dff0e5;
  --danger: #b3261e;
  --danger-soft: #f9e1df;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 8px;
  --line-soft: #e6ecec;
  --surface-2: #f6f9f9;
  --hover: #f3f7f7;
  --input-line: #b9c7c6;
  --chip-gray: #e6ebea;
  --nav-active: #ffffff;
  --gold: #c9a24a;
  --gold-deep: #8a6414;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0c1517;
  --surface: #121f22;
  --ink: #e5eeee;
  --muted: #8fa6a9;
  --line: #223437;
  --lake: #4fb3bf;
  --lake-deep: #0a2a30;
  --lake-soft: #16353a;
  --brass: #e0b44f;
  --brass-soft: #3a2f12;
  --ok: #5cc486;
  --ok-soft: #153324;
  --danger: #ef7770;
  --danger-soft: #3b1816;
  --line-soft: #1c2c2f;
  --surface-2: #0f1a1c;
  --hover: #172629;
  --input-line: #34494c;
  --chip-gray: #1d2d30;
  --nav-active: #e5eeee;
  --gold: #e0b44f;
  --gold-deep: #e0b44f;
  --lake-ink: #bfe3e8;
  /* koyu temada başlık/rozet metni (lake-deep koyu zeminde okunmuyordu) */
  color-scheme: dark;
}

:root[data-theme="dark"] .btn.primary,
:root[data-theme="dark"] .seg button[aria-pressed="true"] {
  color: #06181b;
}

:root[data-theme="dark"] .alert.danger {
  color: #ffd2cf;
}

:root[data-theme="dark"] .alert.note {
  color: #f5dfa3;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 var(--sans);
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 600;
  line-height: 1.2;
}

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

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

:focus-visible {
  outline: 3px solid #4aa3ad;
  outline-offset: 2px;
}

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

.small {
  font-size: 13px;
}

.right {
  text-align: right;
}

.nowrap {
  white-space: nowrap;
}

/* ---------- Düzen ---------- */
.app {
  display: grid;
  grid-template-columns: 232px 1fr;
  min-height: 100vh;
}

.side {
  background: var(--lake-deep);
  color: #d8e8ea;
  padding: 22px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.brand {
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.15;
  color: #fff;
  padding: 0 10px 18px;
}

.brand small {
  display: block;
  font: 12px var(--sans);
  color: #9fc3c8;
  margin-top: 4px;
}

.nav a {
  display: block;
  padding: 7px 12px;
  border-radius: 6px;
  color: #d8e8ea;
  text-decoration: none;
  margin-bottom: 2px;
}

.nav a:hover {
  background: rgba(255, 255, 255, .08);
}

.nav a[aria-current="page"] {
  background: var(--nav-active);
  color: var(--lake-deep);
  font-weight: 600;
}

.nav-sep {
  height: 1px;
  background: rgba(255, 255, 255, .14);
  margin: 10px 6px;
}

.side-foot {
  margin-top: auto;
  padding: 12px 10px 0;
  border-top: 1px solid rgba(255, 255, 255, .14);
  font-size: 13px;
  color: #9fc3c8;
}

.side-foot strong {
  display: block;
  color: #fff;
  font-weight: 600;
}

.side-foot button {
  margin-top: 8px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .35);
  color: #fff;
  border-radius: 6px;
  padding: 6px 12px;
  cursor: pointer;
}

.side-foot button:hover {
  background: rgba(255, 255, 255, .1);
}

.main {
  padding: 28px 32px 60px;
  max-width: 1180px;
  width: 100%;
  min-width: 0;
  outline: none;
}

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.page-head h1 {
  font-family: var(--serif);
  font-size: 28px;
}

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

/* ---------- Bileşenler ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}

.card+.card,
.card+.two,
.two+.card,
.two+.two {
  margin-top: 20px;
}

.card h2 {
  font-size: 16px;
  margin-bottom: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
}

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

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

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

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

.btn.ghost {
  border-color: transparent;
  background: transparent;
  color: var(--lake);
  padding: 4px 8px;
}

.btn.ghost.danger-text {
  color: var(--danger);
}

.btn.sm {
  padding: 5px 10px;
  font-size: 13px;
}

.btn.block {
  width: 100%;
}

.btn[disabled] {
  opacity: .5;
  cursor: not-allowed;
}

.field {
  display: block;
  margin-bottom: 12px;
}

.field>span {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 4px;
}

.field input,
.field select,
.field textarea,
.toolbar input,
.toolbar select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--input-line);
  border-radius: 6px;
  background: var(--surface);
}

.field textarea {
  min-height: 70px;
  resize: vertical;
}

.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 12px;
}

.form-sub {
  font-size: 14px;
  margin: 14px 0 8px;
  color: var(--lake-ink, var(--lake-deep));
}

.toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  align-items: center;
}

.toolbar input[type="search"] {
  flex: 1 1 240px;
  min-width: 200px;
}

.toolbar select {
  width: auto;
}

.chip {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--lake-soft);
  color: var(--lake-ink, var(--lake-deep));
}

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

.chip.warn {
  background: var(--brass-soft);
  color: var(--brass);
}

.chip.bad {
  background: var(--danger-soft);
  color: var(--danger);
}

.chip.gray {
  background: var(--chip-gray);
  color: var(--muted);
}

.alert {
  padding: 10px 12px;
  border-radius: 6px;
  margin-bottom: 12px;
  font-size: 14px;
}

.alert.danger {
  background: var(--danger-soft);
  color: #7d1a15;
}

.alert.info {
  background: var(--lake-soft);
  color: var(--lake-ink, var(--lake-deep));
}

.alert.note {
  background: var(--brass-soft);
  color: #5e4209;
}

.tablewrap {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

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

th,
td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}

th {
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 600;
  background: var(--surface-2);
  white-space: nowrap;
}

tr:last-child td {
  border-bottom: 0;
}

tbody tr.click {
  cursor: pointer;
}

tbody tr.click:hover {
  background: var(--hover);
}

td.num,
th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.empty {
  padding: 28px;
  text-align: center;
  color: var(--muted);
}

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
}

.pager div {
  display: flex;
  gap: 8px;
}

/* ---------- Panel ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.stat .v {
  font-family: var(--serif);
  font-size: 30px;
  line-height: 1.1;
}

.stat .l {
  color: var(--muted);
  font-size: 13px;
  margin-top: 2px;
}

.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: stretch;
}

.two > .card {
  margin-top: 0 !important;
}

.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.tbl th,
.tbl td {
  padding: 7px 10px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.tbl thead th {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.tbl tbody tr:last-child td {
  border-bottom: none;
}

.tbl .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.list li {
  padding: 9px 0;
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.list li:last-child {
  border-bottom: 0;
}

/* ---------- Üye detayı ---------- */
.member-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.member-head h1 {
  font-family: var(--serif);
  font-size: 32px;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  margin-top: 10px;
  color: var(--muted);
}

.meta b {
  color: var(--ink);
  font-weight: 600;
}

.facility {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 22px 0 6px;
}

.facility .lbl {
  font-weight: 600;
  margin-right: 4px;
}

.seg {
  display: inline-flex;
  border: 1px solid var(--input-line);
  border-radius: 8px;
  overflow: hidden;
}

.seg button {
  border: 0;
  background: var(--surface);
  padding: 8px 14px;
  cursor: pointer;
}

.seg button+button {
  border-left: 1px solid var(--input-line);
}

.seg button[aria-pressed="true"] {
  background: var(--lake);
  color: #fff;
  font-weight: 600;
}

.sect {
  margin: 26px 0 10px;
  font-size: 15px;
  color: var(--lake-ink, var(--lake-deep));
}

/* Hak "çekleri": kesik çizgili bilet görünümü */
.tickets {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 14px;
}

.ticket {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.ticket-top {
  display: grid;
  grid-template-columns: 1fr 90px;
}

.ticket-main {
  padding: 14px 14px 12px 16px;
}

.ticket-cat {
  font-size: 12px;
  color: var(--lake);
  font-weight: 600;
}

.ticket-name {
  font-family: var(--serif);
  font-size: 19px;
  margin: 2px 0 6px;
  line-height: 1.2;
}

.ticket-stub {
  border-left: 2px dashed var(--input-line);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px;
  position: relative;
}

.ticket-stub::before,
.ticket-stub::after {
  content: "";
  position: absolute;
  left: -9px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--line);
}

.ticket-stub::before {
  top: -8px;
}

.ticket-stub::after {
  bottom: -8px;
}

.stub-n {
  font-family: var(--serif);
  font-size: 32px;
  line-height: 1;
}

.stub-l {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
}

.ticket.done .stub-n,
.ticket.dead .stub-n {
  color: var(--muted);
}

.ticket.dead {
  background: var(--surface-2);
}

/* Biten haklar (kota doldu / süresi doldu): koyu, soluk ve üstü çizili görünür; aktif haklardan net ayrılır */
.ticket.done,
.ticket.dead {
  background: #dde4e4;
  border-color: #b5c3c2;
  border-left: 6px solid #7d8f90;
  box-shadow: none;
}

.ticket.dead {
  border-left-color: var(--danger);
}

.ticket.done .ticket-top,
.ticket.dead .ticket-top {
  filter: grayscale(1);
  opacity: .62;
}

.ticket.done .ticket-name,
.ticket.dead .ticket-name {
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
}

.ticket.done .ticket-cat,
.ticket.dead .ticket-cat {
  color: var(--muted);
}

.ticket.done .dot,
.ticket.dead .dot {
  border-color: var(--muted);
}

.ticket.done .dot.used,
.ticket.dead .dot.used {
  background: var(--muted);
}

.ticket.done:hover,
.ticket.dead:hover {
  transform: none;
  box-shadow: none;
}

:root[data-theme="dark"] .ticket.done,
:root[data-theme="dark"] .ticket.dead {
  background: #091012;
  border-color: #1b2a2d;
  border-left-color: #566b6e;
}

:root[data-theme="dark"] .ticket.dead {
  border-left-color: var(--danger);
}

.dots {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 6px 0 8px;
}

.dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 2px solid var(--lake);
}

.dot.used {
  background: var(--lake);
}

/* dots stub — sağ sütunda, daha büyük */
.dots-stub {
  justify-content: center;
  margin: 8px 0 0;
  gap: 5px;
}

.dots-stub .dot {
  width: 15px;
  height: 15px;
  border-width: 2.5px;
}

.valid {
  font-size: 13px;
  color: var(--muted);
}

.valid.soon {
  color: var(--brass);
  font-weight: 600;
}

.ticket-act {
  padding: 0 14px 12px 16px;
}

.history {
  border-top: 1px solid var(--line-soft);
  background: var(--surface-2);
  padding: 8px 14px 10px 16px;
  font-size: 13px;
}

.history ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.history li {
  padding: 3px 0;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: baseline;
}

.history li.void {
  color: var(--muted);
  text-decoration: line-through;
}

.history li.void .why {
  text-decoration: none;
  display: inline-block;
  color: var(--danger);
}

.tag-extra {
  background: var(--brass-soft);
  color: var(--brass);
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
  margin-left: 6px;
  vertical-align: middle;
}

/* ---------- Modal ---------- */
dialog.modal {
  border: 0;
  border-radius: 10px;
  padding: 0;
  width: min(520px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  box-shadow: 0 20px 50px rgba(10, 30, 35, .35);
  color: var(--ink);
  overflow-x: hidden;
}

dialog.modal::backdrop {
  background: rgba(10, 30, 35, .5);
}

.modal-head {
  padding: 16px 20px 0;
}

.modal-head h2 {
  font-family: var(--serif);
  font-size: 21px;
}

.modal-body {
  padding: 14px 20px 4px;
  overflow-x: hidden;
  max-width: 100%;
}

.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 20px 18px;
}

.modal-err {
  margin: 0 20px;
}

/* ---------- Toast ---------- */
.toasts {
  position: fixed;
  right: 16px;
  bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 50;
  max-width: calc(100vw - 32px);
}

.toast {
  background: var(--lake-deep);
  color: #fff;
  padding: 11px 16px;
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .25);
  font-size: 14px;
}

.toast.err {
  background: var(--danger);
}

/* ---------- Paketler ---------- */
.pkg-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.pkg-head h2 {
  font-family: var(--serif);
  font-size: 22px;
  margin: 0;
}

.item-row {
  display: grid;
  grid-template-columns: 120px 1fr minmax(120px, 150px) 70px auto;
  gap: 8px;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid var(--line-soft);
}

.item-row input {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid var(--input-line);
  border-radius: 6px;
}

.item-row select {
  width: 100%;
  padding: 6px 6px;
  border: 1px solid var(--input-line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
}

.item-row .acts {
  display: flex;
  gap: 4px;
}

.item-add {
  background: var(--surface-2);
  border-radius: 6px;
  padding: 10px;
  margin-top: 10px;
}

.pkg-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pkg-tools {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin: 0 0 12px;
}

.pkg-tools input[type=search] {
  flex: 1 1 200px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--input-line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}

.pkg-acc {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.pkg-acc>summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 14px;
  border-radius: 10px;
}

.pkg-acc>summary::-webkit-details-marker {
  display: none;
}

.pkg-acc>summary::before {
  content: '\25B8';
  color: var(--muted);
  transition: transform .15s;
}

.pkg-acc[open]>summary::before {
  transform: rotate(90deg);
}

.pkg-acc[open]>summary {
  border-bottom: 1px solid var(--line-soft);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.pkg-acc>summary:hover {
  background: var(--hover);
}

.pkg-name {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 600;
}

.pkg-meta {
  flex: 1 1 auto;
}

.pkg-body {
  padding: 12px 14px 14px;
}

.pkg-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 8px;
}

.item-cols {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  border-bottom: 2px solid var(--line-soft);
}

/* ---------- Giriş ---------- */
.login-body {
  background: var(--lake-deep);
}

.login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.login-brand {
  color: #fff;
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.login-mark {
  font-family: var(--serif);
  font-size: 52px;
  line-height: 1.05;
}

.login-brand p {
  color: #a7cbd0;
  margin: 14px 0 0;
  font-size: 16px;
}

.login-card {
  background: var(--bg);
  padding: 56px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 480px;
}

.login-card h1 {
  font-family: var(--serif);
  font-size: 26px;
  margin-bottom: 18px;
}

/* ---------- Mobil ---------- */
@media (max-width: 860px) {
  .app {
    grid-template-columns: minmax(0, 1fr);
  }

  .main {
    min-width: 0;
    padding: 16px 14px 50px;
  }

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

  .two > .card {
    margin-top: 0 !important;
  }

  .grid2 {
    grid-template-columns: 1fr;
  }

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

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

  .item-cols {
    display: none;
  }

  .login {
    grid-template-columns: 1fr;
  }

  .login-brand {
    padding: 28px 24px;
    justify-content: flex-start;
  }

  .login-mark {
    font-size: 34px;
  }

  .login-card {
    max-width: none;
    padding: 28px 24px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .toast {
    animation: toastin .18s ease-out;
  }

  @keyframes toastin {
    from {
      transform: translateY(8px);
      opacity: 0;
    }

    to {
      transform: none;
      opacity: 1;
    }
  }
}

@media print {

  .side,
  .toasts,
  .btn,
  .facility {
    display: none !important;
  }

  .app {
    display: block;
  }

  .main {
    padding: 0;
  }
}

/* =====================================================================
   v2 tasarım eklemeleri: tema düğmesi, üye kartı, makbuz, göstergeler
   (Satır içi stil kullanılmaz; CSP uyumlu.)
   ===================================================================== */

/* ---------- Giriş sayfası ---------- */
.login-body {
  background: radial-gradient(1200px 600px at 10% 90%, #1d5f68 0%, transparent 60%), linear-gradient(160deg, #0c2f35, #123f46 55%, #0a272c);
}

.login-emblem {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  margin-bottom: 22px;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #d8b25a, #9a6a12 55%, #1d5f68);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
}

.login-rule {
  width: 56px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, #d8b25a, transparent);
  margin-top: 18px;
}

.login-card {
  box-shadow: -20px 0 50px rgba(0, 0, 0, .25);
}

/* ---------- Tema düğmesi ---------- */
.theme-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  margin-top: 8px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .35);
  color: #fff;
  border-radius: 6px;
  padding: 6px 12px;
  cursor: pointer;
}

.theme-btn:hover {
  background: rgba(255, 255, 255, .1);
}

.side-foot .theme-btn+button {
  margin-top: 6px;
  width: 100%;
}

/* ---------- Genel hareket ve yüzey ---------- */
.main>div {
  animation: pagein .22s ease-out both;
}

.card,
.stat,
.ticket,
.tablewrap {
  box-shadow: 0 1px 2px rgba(16, 40, 44, .05);
}

:root[data-theme="dark"] .card,
:root[data-theme="dark"] .stat,
:root[data-theme="dark"] .ticket,
:root[data-theme="dark"] .tablewrap {
  box-shadow: 0 1px 2px rgba(0, 0, 0, .4);
}

.ticket {
  transition: transform .15s ease, box-shadow .15s ease;
}

.ticket:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(16, 40, 44, .12);
}

dialog.modal {
  background: var(--surface);
}

dialog.modal::backdrop {
  backdrop-filter: blur(2px);
}

@keyframes pagein {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Panel: göstergeler ---------- */
.stat {
  position: relative;
  overflow: hidden;
  padding-left: 20px;
}

.stat::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: var(--lake);
}

.stat.gold::before {
  background: var(--gold);
}

.stat.ok::before {
  background: var(--ok);
}

.stat.warn::before {
  background: var(--brass);
}

.stat .ico {
  position: absolute;
  right: 12px;
  top: 10px;
  font-size: 22px;
  opacity: .55;
}

.stat .sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}

.meter {
  height: 8px;
  border-radius: 999px;
  background: var(--chip-gray);
  overflow: hidden;
  border: 1px solid var(--line);
}

.meter>i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--lake), var(--gold));
  transition: width .5s ease;
}

.meter.resort>i {
  background: linear-gradient(90deg, #2b7549, #5cc486);
}

.meter.center>i {
  background: linear-gradient(90deg, #1d5f68, #4fb3bf);
}

.bar-row {
  margin-bottom: 14px;
}

.bar-row:last-child {
  margin-bottom: 0;
}

.bar-row .top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
  font-size: 14px;
}

/* ---------- Rozetler: paket seviyesi, tesis ---------- */
.tier {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  background: var(--lake-soft);
  color: var(--lake-ink, var(--lake-deep));
}

.tier.premium {
  background: #f3dde0;
  color: #6b1d2a;
  border-color: #e3b8bf;
}

.tier.gold {
  background: #fbf1cf;
  color: #85600c;
  border-color: #ecd68a;
}

.tier.silver {
  background: #e8edf0;
  color: #4a5a62;
  border-color: #cbd5da;
}

.tier.vip {
  background: #26262b;
  color: #f0d68a;
  border-color: #4a4a52;
}

.tier.jest {
  background: #f7e6d2;
  color: #7a3f1c;
  border-color: #e3c19b;
}

.tier.safir {
  background: #dfe6f6;
  color: #1a3a72;
  border-color: #b9c8e6;
}

.tier.zumrut {
  background: #dcefe4;
  color: #12614a;
  border-color: #b4d8c4;
}

.tier.std {
  background: var(--lake-soft);
  color: var(--lake-ink, var(--lake-deep));
  border-color: var(--line);
}

.tier.bordo {
  background: #f5dde2;
  color: #5a0e27;
  border-color: #e8aab8;
}

.tier.gok {
  background: #d8edf8;
  color: #1f6090;
  border-color: #96cce8;
}

.tier.kumsal {
  background: #f8edcf;
  color: #7a5210;
  border-color: #e6c878;
}

:root[data-theme="dark"] .tier.gold {
  background: #3a2f12;
  color: #f0cf7a;
  border-color: #5b4a1c;
}

:root[data-theme="dark"] .tier.premium {
  background: #3a1822;
  color: #f0b6c0;
  border-color: #66303c;
}

:root[data-theme="dark"] .tier.silver {
  background: #24323a;
  color: #c5d3da;
  border-color: #3a4c56;
}

:root[data-theme="dark"] .tier.vip {
  background: #17171a;
  color: #f0d68a;
  border-color: #55555c;
}

:root[data-theme="dark"] .tier.jest {
  background: #3a2a1d;
  color: #f0c9a0;
  border-color: #66482f;
}

:root[data-theme="dark"] .tier.safir {
  background: #1a2644;
  color: #b9c8f0;
  border-color: #34487c;
}

:root[data-theme="dark"] .tier.zumrut {
  background: #12342a;
  color: #a8dcc0;
  border-color: #25584a;
}

:root[data-theme="dark"] .tier {
  color: var(--lake);
}

:root[data-theme="dark"] .tier.std {
  color: var(--lake);
}

:root[data-theme="dark"] .tier.bordo {
  background: #3a0818;
  color: #f4a8ba;
  border-color: #7a1535;
}

:root[data-theme="dark"] .tier.gok {
  background: #0c2a40;
  color: #90c8f0;
  border-color: #2a7bb8;
}

:root[data-theme="dark"] .tier.kumsal {
  background: #3a2008;
  color: #f0c870;
  border-color: #8c5e18;
}

.tcp {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}

.tcp.resort {
  background: var(--ok-soft);
  color: var(--ok);
}

.tcp.center {
  background: var(--lake-soft);
  color: var(--lake);
}

/* ---------- Üye kartı (dijital kart) ---------- */
/* Üye kartı ve renk örnekleri: renkler değişkenlerle tanımlıdır (aşağıdaki .c-... paletleri) */
.vcard,
.swatch {
  --vc-bg: radial-gradient(500px 220px at 90% -10%, rgba(216, 178, 90, .35), transparent 60%), linear-gradient(135deg, #0f3a41 0%, #123f46 45%, #0a272c 100%);
  --vc-text: #f4ecd6;
  --vc-accent: #d8b25a;
  --vc-accent2: #f0d68a;
  --vc-name: #fff;
  --vc-muted: #b8d3d6;
  --vc-line: rgba(216, 178, 90, .35);
  --vc-pkg-line: rgba(216, 178, 90, .5);
  --vc-ring: rgba(216, 178, 90, .25);
  --vc-ring2: rgba(216, 178, 90, .06);
  --vc-ring3: rgba(216, 178, 90, .04);
  --vc-shadow: rgba(8, 30, 34, .35);
}

.vcard {
  position: relative;
  overflow: hidden;
  color: var(--vc-text);
  border-radius: 16px;
  padding: 22px 24px;
  min-height: 190px;
  background: var(--vc-bg);
  box-shadow: 0 14px 34px var(--vc-shadow);
  border: 1px solid var(--vc-line);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
}

.vcard::after {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  right: -90px;
  bottom: -120px;
  border-radius: 50%;
  border: 1px solid var(--vc-ring);
  box-shadow: 0 0 0 28px var(--vc-ring2), 0 0 0 56px var(--vc-ring3);
  pointer-events: none;
}

/* Kartta dinamik parlama: kartın üzerinden soldan sağa geçen ışık şeridi */
.vcard::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  transform: translateX(-120%);
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, .18) 50%, transparent 60%);
  animation: shine 4s ease-in-out 1.5s infinite;
}

@keyframes shine {
  0% {
    transform: translateX(-120%);
  }

  50%,
  100% {
    transform: translateX(120%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .vcard::before {
    animation: none;
    display: none;
  }
}

@media print {
  .vcard::before {
    display: none;
  }
}

.vcard-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.vcard-brand {
  font-family: var(--serif);
  letter-spacing: .14em;
  font-size: 12px;
  text-transform: uppercase;
  color: var(--vc-accent);
}

.vcard-pkg {
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--vc-pkg-line);
  color: var(--vc-accent2);
  white-space: nowrap;
}

.vcard-name {
  font-family: var(--serif);
  font-size: 28px;
  line-height: 1.15;
  color: var(--vc-name);
}

.vcard-no {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  letter-spacing: .12em;
  font-size: 15px;
  color: var(--vc-accent2);
  margin-top: 6px;
}

.vcard-bot {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--vc-muted);
  position: relative;
  z-index: 1;
}

.vcard-bot b {
  display: block;
  font-size: 14px;
  color: var(--vc-name);
  font-weight: 600;
}

.vcard-state {
  position: relative;
  z-index: 1;
}

/* ---- Paket renk paleti ---- */
.c-silver {
  --vc-bg: radial-gradient(500px 220px at 90% -10%, rgba(255, 255, 255, .75), transparent 60%), linear-gradient(135deg, #f3f5f8 0%, #c9cfd6 48%, #9aa3ae 100%);
  --vc-text: #1d252c;
  --vc-accent: #38434d;
  --vc-accent2: #2a343d;
  --vc-name: #10171d;
  --vc-muted: #2c3842;
  --vc-line: rgba(60, 72, 84, .4);
  --vc-pkg-line: rgba(44, 54, 64, .55);
  --vc-ring: rgba(60, 72, 84, .22);
  --vc-ring2: rgba(60, 72, 84, .07);
  --vc-ring3: rgba(60, 72, 84, .04);
  --vc-shadow: rgba(40, 50, 60, .35);
}

.c-gold {
  --vc-bg: radial-gradient(500px 220px at 90% -10%, rgba(255, 246, 206, .85), transparent 60%), linear-gradient(135deg, #f6dd8e 0%, #d9ac43 48%, #a97a1d 100%);
  --vc-text: #2b1d05;
  --vc-accent: #3f2a04;
  --vc-accent2: #3a2704;
  --vc-name: #1a1002;
  --vc-muted: #1e1303;
  --vc-line: rgba(107, 74, 10, .45);
  --vc-pkg-line: rgba(74, 50, 6, .55);
  --vc-ring: rgba(107, 74, 10, .25);
  --vc-ring2: rgba(107, 74, 10, .08);
  --vc-ring3: rgba(107, 74, 10, .05);
  --vc-shadow: rgba(110, 80, 10, .38);
}

.c-premium {
  --vc-bg: radial-gradient(500px 220px at 90% -10%, rgba(226, 189, 106, .38), transparent 60%), linear-gradient(135deg, #5a1424 0%, #7a1d33 45%, #3a0c18 100%);
  --vc-text: #f7e6d0;
  --vc-accent: #e2bd6a;
  --vc-accent2: #f3d489;
  --vc-name: #fff;
  --vc-muted: #e8c6cc;
  --vc-line: rgba(226, 189, 106, .5);
  --vc-pkg-line: rgba(226, 189, 106, .6);
  --vc-ring: rgba(226, 189, 106, .28);
  --vc-ring2: rgba(226, 189, 106, .07);
  --vc-ring3: rgba(226, 189, 106, .05);
  --vc-shadow: rgba(58, 12, 24, .45);
}

.c-vip {
  --vc-bg: radial-gradient(500px 220px at 90% -10%, rgba(216, 178, 90, .32), transparent 60%), linear-gradient(135deg, #1c1c20 0%, #2b2b31 45%, #0c0c0f 100%);
  --vc-text: #f1e6c8;
  --vc-accent: #d8b25a;
  --vc-accent2: #f0d68a;
  --vc-name: #fff;
  --vc-muted: #c2bca9;
  --vc-line: rgba(216, 178, 90, .55);
  --vc-pkg-line: rgba(216, 178, 90, .65);
  --vc-ring: rgba(216, 178, 90, .28);
  --vc-ring2: rgba(216, 178, 90, .07);
  --vc-ring3: rgba(216, 178, 90, .05);
  --vc-shadow: rgba(0, 0, 0, .5);
}

.c-jest {
  --vc-bg: radial-gradient(500px 220px at 90% -10%, rgba(255, 255, 255, .6), transparent 60%), linear-gradient(135deg, #faeedd 0%, #e6c49f 45%, #bd7c4d 100%);
  --vc-text: #3a2212;
  --vc-accent: #5a2c10;
  --vc-accent2: #4a230d;
  --vc-name: #241208;
  --vc-muted: #241208;
  --vc-line: rgba(122, 63, 28, .42);
  --vc-pkg-line: rgba(90, 45, 18, .55);
  --vc-ring: rgba(122, 63, 28, .24);
  --vc-ring2: rgba(122, 63, 28, .08);
  --vc-ring3: rgba(122, 63, 28, .05);
  --vc-shadow: rgba(120, 70, 30, .35);
}

.c-safir {
  --vc-bg: radial-gradient(500px 220px at 90% -10%, rgba(216, 178, 90, .3), transparent 60%), linear-gradient(135deg, #142a52 0%, #1a3a72 45%, #0b1a38 100%);
  --vc-text: #e8eefc;
  --vc-accent: #d8b25a;
  --vc-accent2: #f0d68a;
  --vc-name: #fff;
  --vc-muted: #bccae8;
  --vc-line: rgba(216, 178, 90, .42);
  --vc-pkg-line: rgba(216, 178, 90, .55);
  --vc-ring: rgba(216, 178, 90, .26);
  --vc-ring2: rgba(216, 178, 90, .06);
  --vc-ring3: rgba(216, 178, 90, .04);
  --vc-shadow: rgba(11, 26, 56, .45);
}

.c-zumrut {
  --vc-bg: radial-gradient(500px 220px at 90% -10%, rgba(216, 178, 90, .3), transparent 60%), linear-gradient(135deg, #0d4a34 0%, #12614a 45%, #07301f 100%);
  --vc-text: #e9f6ee;
  --vc-accent: #d8b25a;
  --vc-accent2: #f0d68a;
  --vc-name: #fff;
  --vc-muted: #b8dac7;
  --vc-line: rgba(216, 178, 90, .42);
  --vc-pkg-line: rgba(216, 178, 90, .55);
  --vc-ring: rgba(216, 178, 90, .26);
  --vc-ring2: rgba(216, 178, 90, .06);
  --vc-ring3: rgba(216, 178, 90, .04);
  --vc-shadow: rgba(7, 48, 31, .42);
}

.c-bordo {
  --vc-bg: radial-gradient(500px 220px at 90% -10%, rgba(255, 180, 180, .25), transparent 60%), linear-gradient(135deg, #5a0e27 0%, #7a1535 45%, #3a0818 100%);
  --vc-text: #f9e8ec;
  --vc-accent: #f4a8ba;
  --vc-accent2: #ffc8d4;
  --vc-name: #fff;
  --vc-muted: #e8b8c4;
  --vc-line: rgba(244, 168, 186, .45);
  --vc-pkg-line: rgba(244, 168, 186, .6);
  --vc-ring: rgba(244, 168, 186, .28);
  --vc-ring2: rgba(244, 168, 186, .07);
  --vc-ring3: rgba(244, 168, 186, .05);
  --vc-shadow: rgba(58, 8, 24, .45);
}

.c-gok {
  --vc-bg: radial-gradient(500px 220px at 90% -10%, rgba(200, 232, 255, .55), transparent 60%), linear-gradient(135deg, #75b7e5 0%, #4d9fd4 45%, #2a7bb8 100%);
  --vc-text: #07253d;
  --vc-accent: #0d3b5e;
  --vc-accent2: #0a3050;
  --vc-name: #05192d;
  --vc-muted: #103354;
  --vc-line: rgba(10, 48, 80, .4);
  --vc-pkg-line: rgba(10, 48, 80, .55);
  --vc-ring: rgba(10, 48, 80, .22);
  --vc-ring2: rgba(10, 48, 80, .07);
  --vc-ring3: rgba(10, 48, 80, .04);
  --vc-shadow: rgba(20, 70, 120, .38);
}

.c-kumsal {
  --vc-bg: radial-gradient(500px 220px at 90% -10%, rgba(255, 236, 180, .6), transparent 60%), linear-gradient(135deg, #d39d3f 0%, #b8832a 45%, #8c5e18 100%);
  --vc-text: #2d1a02;
  --vc-accent: #3d2403;
  --vc-accent2: #362004;
  --vc-name: #1a0f01;
  --vc-muted: #1e1203;
  --vc-line: rgba(100, 60, 8, .42);
  --vc-pkg-line: rgba(80, 45, 5, .55);
  --vc-ring: rgba(100, 60, 8, .24);
  --vc-ring2: rgba(100, 60, 8, .08);
  --vc-ring3: rgba(100, 60, 8, .05);
  --vc-shadow: rgba(100, 65, 15, .38);
}

/* Renk seçici (Paketler > düzenle) */
.swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.swatch {
  width: 52px;
  height: 34px;
  padding: 0;
  border-radius: 9px;
  border: 2px solid var(--line);
  background: var(--vc-bg);
  cursor: pointer;
  position: relative;
}

.swatch:hover {
  transform: translateY(-1px);
}

.swatch[aria-pressed="true"] {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px var(--lake-soft);
}

.swatch[aria-pressed="true"]::after {
  content: "✓";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: var(--vc-name);
  text-shadow: 0 1px 2px rgba(0, 0, 0, .35);
}

.swatch.auto {
  background: repeating-linear-gradient(45deg, var(--surface-2), var(--surface-2) 6px, var(--line-soft) 6px, var(--line-soft) 12px);
  width: auto;
  padding: 0 12px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
}

.swatch.auto[aria-pressed="true"]::after {
  content: none;
}

.swatch.sm {
  width: 26px;
  height: 16px;
  border-width: 1px;
  cursor: default;
  display: inline-block;
  vertical-align: middle;
  border-radius: 5px;
}

.head-grid {
  display: grid;
  grid-template-columns: minmax(0, 420px) 1fr;
  gap: 16px;
  align-items: stretch;
  margin-bottom: 24px;
}

/* ---------- Hak özet şeridi ---------- */
.sumstrip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 24px;
  margin-bottom: 24px;
}

.sumstrip .box {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.sumstrip .n {
  font-family: var(--serif);
  font-size: 28px;
  line-height: 1.1;
  margin-bottom: 4px;
}

.sumstrip .l {
  font-size: 13px;
  color: var(--muted);
}

/* ---------- Kategori ikonu ---------- */
.ci {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--lake-soft);
  margin-right: 6px;
  font-size: 13px;
  vertical-align: middle;
}

/* ---------- Makbuz ---------- */
dialog.receipt {
  width: min(440px, calc(100vw - 24px));
  background: #ffffff;
  color: #16282c;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
}

dialog.receipt .modal-head {
  background: #ffffff;
  color: #16282c;
  border-bottom: 1px solid #eef2f2;
  padding: 12px 20px 8px;
}

dialog.receipt .modal-head h2 {
  color: #16282c;
  font-size: 16px;
}

dialog.receipt .modal-body {
  padding: 0;
  background: #ffffff;
}

dialog.receipt .modal-foot {
  background: #f7faf9;
  border-top: 1px solid #eef2f2;
}

.rc {
  padding: 22px 24px 8px;
  background: #fff;
  color: #16282c;
}

.rc-head {
  text-align: center;
  border-bottom: 2px dashed #b9c7c6;
  padding-bottom: 12px;
  margin-bottom: 12px;
}

.rc-brand {
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: .08em;
}

.rc-sub {
  font-size: 12px;
  color: #5b6f73;
  margin-top: 2px;
}

.rc-code {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-weight: 700;
  letter-spacing: .08em;
  margin-top: 8px;
  font-size: 16px;
  color: #9a6a12;
}

.rc dl {
  margin: 0;
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 7px 10px;
  font-size: 14px;
}

.rc dt {
  color: #5b6f73;
}

.rc dd {
  margin: 0;
  font-weight: 600;
  word-break: break-word;
}

.rc-sign {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 38px 0 10px;
  font-size: 12px;
  color: #5b6f73;
  text-align: center;
}

.rc-sign span {
  border-top: 1px solid #16282c;
  padding-top: 4px;
}

.rc-foot {
  font-size: 11px;
  color: #6b7d80;
  text-align: center;
  padding: 6px 0 12px;
}


.btn.mini {
  padding: 2px 8px;
  font-size: 12px;
}

/* ---------- Kutlama (konfeti) ---------- */
.confetti {
  position: fixed;
  top: -12px;
  width: 9px;
  height: 14px;
  border-radius: 2px;
  z-index: 80;
  pointer-events: none;
  animation: confall 1.6s ease-in forwards;
}

@keyframes confall {
  to {
    transform: translate3d(var(--dx, 0px), 105vh, 0) rotate(var(--rot, 540deg));
    opacity: .9;
  }
}

@media (prefers-reduced-motion: reduce) {
  .confetti {
    display: none;
  }

  .main>div,
  .ticket {
    animation: none;
    transition: none;
  }
}

/* ---------- Mobil ek ---------- */
@media (max-width: 860px) {
  .head-grid {
    grid-template-columns: 1fr;
  }

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

  .vcard-name {
    font-size: 24px;
  }
}

/* ---------- Yazdırma: yalnızca kart veya makbuz ---------- */
@media print {
  @page {
    background: #ffffff;
    margin: 8mm;
  }

  :root {
    color-scheme: light !important;
  }

  html,
  body {
    background: #ffffff !important;
    background-color: #ffffff !important;
    color: #16282c !important;
  }

  body.print-receipt {
    background: #ffffff !important;
    background-color: #ffffff !important;
    color: #16282c !important;
  }

  body.print-receipt .app,
  body.print-receipt .toasts,
  body.print-receipt .scrim,
  body.print-receipt .topbar,
  body.print-receipt dialog:not(.receipt) {
    display: none !important;
  }

  body.print-receipt dialog.receipt {
    position: static !important;
    display: block !important;
    width: 100% !important;
    max-width: 480px !important;
    margin: 0 auto !important;
    padding: 0 !important;
    box-shadow: none !important;
    border: 0 !important;
    background: #ffffff !important;
    background-color: #ffffff !important;
    color: #16282c !important;
  }

  body.print-receipt dialog.receipt::backdrop {
    display: none !important;
    background: transparent !important;
  }

  body.print-receipt dialog.receipt .modal-foot,
  body.print-receipt dialog.receipt .modal-head {
    display: none !important;
  }

  body.print-receipt dialog.receipt .modal-body {
    padding: 0 !important;
    margin: 0 !important;
    background: #ffffff !important;
    background-color: #ffffff !important;
  }

  body.print-card .toasts,
  body.print-card dialog {
    display: none !important;
  }

  body.print-card .app {
    display: block;
  }

  body.print-card .main>div>*:not(.head-grid) {
    display: none !important;
  }

  body.print-card .head-grid>*:not(.vcard) {
    display: none !important;
  }

  body.print-card .head-grid {
    display: block;
  }

  .vcard,
  .rc,
  #print-root .rc {
    background: #ffffff !important;
    background-color: #ffffff !important;
    color: #16282c !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

/* =====================================================================
   v8: serbest süreli yenileme, hak durum raporu ve toplu makbuz yazdırma
   ===================================================================== */
.presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

/* Yazdırılacak belge ekranda hiç görünmez; yalnızca yazdırma sırasında gösterilir */
#print-root {
  display: none;
}

.rep {
  color: #16282c;
  background: #fff;
  padding: 4px 2px;
  font-size: 13px;
}

.rep-head {
  text-align: center;
  border-bottom: 2px solid #16282c;
  padding-bottom: 10px;
  margin-bottom: 12px;
}

.rep-head .rc-brand {
  font-size: 20px;
}

.rep-info {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 4px 10px;
  margin: 0 0 12px;
}

.rep-info dt {
  color: #5b6f73;
}

.rep-info dd {
  margin: 0;
  font-weight: 600;
}

.rep-sum {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.rep-sum div {
  border: 1px solid #b9c7c6;
  border-radius: 6px;
  padding: 6px 12px;
}

.rep-sum b {
  font-size: 18px;
  margin-right: 4px;
}

.rep h3 {
  margin: 16px 0 6px;
  font-size: 14px;
  border-bottom: 1px solid #b9c7c6;
  padding-bottom: 3px;
}

.rep-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.rep-table th,
.rep-table td {
  border: 1px solid #b9c7c6;
  padding: 4px 6px;
  text-align: left;
  vertical-align: top;
}

.rep-table th {
  background: #eef3f3;
}

.rep-table tr {
  break-inside: avoid;
  page-break-inside: avoid;
}

@media print {
  @page {
    margin: 12mm;
  }

  body.print-doc {
    background: #fff !important;
    color: #16282c !important;
  }

  body.print-doc>*:not(#print-root) {
    display: none !important;
  }

  body.print-doc #print-root {
    display: block;
  }

  #print-root .rc,
  #print-root .rep {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  #print-root .rc.batch {
    break-inside: avoid;
    page-break-inside: avoid;
    border: 1px solid #b9c7c6;
    border-radius: 6px;
    margin: 0 0 12px;
  }

  #print-root .rc.batch .rc-sign {
    margin-top: 26px;
  }
}


/* =====================================================================
   v9: mobil gezinme (soldan açılan menü) ve telefonda kart görünümlü tablolar
   ===================================================================== */
.topbar,
.scrim {
  display: none;
}

.hamburger {
  width: 44px;
  height: 44px;
  flex: none;
  border: 1px solid rgba(255, 255, 255, .32);
  background: transparent;
  border-radius: 10px;
  display: grid;
  place-content: center;
  gap: 5px;
  cursor: pointer;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}

.topbar-title {
  font-family: var(--serif);
  font-size: 18px;
  color: #fff;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 860px) {
  .topbar {
    display: flex;
    position: sticky;
    top: 0;
    z-index: 30;
    align-items: center;
    gap: 10px;
    padding: calc(env(safe-area-inset-top, 0px) + 8px) 12px 8px;
    background: var(--lake-deep);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
  }

  .side {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    height: auto;
    width: min(84vw, 300px);
    z-index: 50;
    overflow-y: auto;
    padding: calc(env(safe-area-inset-top, 0px) + 20px) 14px calc(env(safe-area-inset-bottom, 0px) + 16px);
    transform: translateX(-102%);
    visibility: hidden;
    transition: transform .25s ease, visibility 0s linear .25s;
    box-shadow: 8px 0 30px rgba(0, 0, 0, .35);
  }

  body.menu-open .side {
    transform: none;
    visibility: visible;
    transition: transform .25s ease;
  }

  .scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 40;
    background: rgba(6, 24, 27, .55);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
  }

  body.menu-open .scrim {
    opacity: 1;
    pointer-events: auto;
  }

  body.menu-open {
    overflow: hidden;
  }

  body.menu-open .hamburger span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  body.menu-open .hamburger span:nth-child(2) {
    opacity: 0;
  }

  body.menu-open .hamburger span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .nav a {
    padding: 13px 14px;
    font-size: 16px;
  }

  .side-foot button {
    width: 100%;
  }

  .page-head h1 {
    font-size: 24px;
  }

  .member-head h1 {
    font-size: 26px;
  }

  .toolbar input[type="search"] {
    flex: 1 1 100%;
    min-width: 0;
  }

  .toolbar select {
    flex: 1 1 45%;
    min-width: 0;
  }

  .pager {
    flex-wrap: wrap;
    gap: 8px;
  }
}

@media (max-width: 720px) {
  .tablewrap {
    overflow: visible;
    background: transparent;
    border: 0;
    box-shadow: none !important;
  }

  table.stack,
  table.stack tbody,
  table.stack tr,
  table.stack td {
    display: block;
    width: 100%;
  }

  table.stack thead {
    display: none;
  }

  table.stack tr {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    margin-bottom: 10px;
    padding: 4px 14px;
  }

  table.stack tr:last-child td {
    border-bottom: 1px solid var(--line-soft);
  }

  table.stack td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 8px 0;
    border-bottom: 1px solid var(--line-soft);
    text-align: right;
    white-space: normal;
  }

  table.stack td:last-child,
  table.stack tr:last-child td:last-child {
    border-bottom: 0;
  }

  table.stack td::before {
    content: attr(data-label);
    flex: none;
    max-width: 42%;
    text-align: left;
    color: var(--muted);
    font-size: 12.5px;
    font-weight: 600;
  }

  table.stack td[data-label=""]::before,
  table.stack td:not([data-label])::before {
    display: none;
  }

  table.stack td.nowrap {
    white-space: normal;
  }

  table.stack tr.click:active {
    background: var(--hover);
  }
}

@media print {

  .topbar,
  .scrim {
    display: none !important;
  }
}

/* ---------- v10: düzeltme talepleri ---------- */
a.alert.block-link {
  display: block;
  text-decoration: none;
  font-weight: 600;
  margin-bottom: 14px;
}

.nav .badge {
  margin-left: 8px;
  background: #c0392b;
  color: #fff;
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 12px;
  font-weight: 700;
}

.hamburger {
  position: relative;
}

@media (max-width: 860px) {
  body.has-pending .hamburger::after {
    content: "";
    position: absolute;
    top: 6px;
    right: 6px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #e0523f;
    border: 2px solid var(--lake-deep);
  }
}

/* v11: hediye işareti (yalnızca yönetici ekranı), hak başına izinli tesis, onay kutusu satırı */
.tag-gift {
  display: inline-block;
  background: #f1e6fb;
  color: #5b2a86;
  border: 1px solid #dcc6f2;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
  margin-left: 6px;
  vertical-align: middle;
  white-space: nowrap;
}

:root[data-theme="dark"] .tag-gift {
  background: #2e2243;
  color: #d5c0f5;
  border-color: #4a3868;
}

.tag-fac {
  display: inline-block;
  background: var(--lake-soft);
  color: var(--lake-ink, var(--lake-deep));
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
  margin-left: 6px;
  vertical-align: middle;
  white-space: nowrap;
}

.checkrow {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin: 4px 0 12px;
  font-size: 14px;
  cursor: pointer;
  white-space: normal;
  max-width: 100%;
  line-height: 1.4;
}

.checkrow input[type="checkbox"] {
  margin: 3px 0 0;
  flex: none;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.checkrow span {
  flex: 1 1 auto;
  min-width: 0;
  word-break: normal;
  overflow-wrap: break-word;
}

/* toolbar içinde checkrow: margin sıfırla, satır bozmaz */
.toolbar .checkrow {
  display: inline-flex;
  align-items: center;
  margin: 0;
  white-space: nowrap;
}

.toolbar .checkrow input[type="checkbox"] {
  margin: 0;
}

/* v12 */
.vcard-qr {
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 2;
  background: #fff;
  border-radius: 8px;
  padding: 3px;
  line-height: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .35);
}

.vcard-qr svg {
  display: block;
  width: 78px;
  height: 78px;
}

.vcard-state {
  position: relative;
  z-index: 1;
}

.giftbox {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 10px 12px 2px;
  margin: 0 0 12px;
}

.giftbox[hidden],
.alert[hidden],
.field[hidden],
[hidden] {
  display: none !important;
}

details.noedit {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  margin: 0 0 12px;
}

details.noedit summary {
  cursor: pointer;
  font-weight: 600;
}

.rep-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.rep-tabs button[aria-pressed="true"] {
  background: var(--lake-deep);
  color: #fff;
  border-color: var(--lake-deep);
}

.rep-sheet h2 {
  margin: 14px 0 6px;
  font-size: 16px;
}

.rep-sheet table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

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

.rep-sheet th.num,
.rep-sheet td.num {
  text-align: right;
}

.rep-sheet tr.total td {
  font-weight: 700;
  border-top: 2px solid var(--ink);
}

.rep-head {
  margin-bottom: 8px;
}

.rep-head .t {
  font-size: 18px;
  font-weight: 700;
}

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

a.btn.wa {
  background: #1faa59;
  color: #fff;
  border-color: #1faa59;
  text-decoration: none;
}

.warnbox {
  border: 1px solid #e0b252;
  background: #fff7e0;
  color: #5a4300;
  border-radius: 8px;
  padding: 8px 10px;
  margin: 8px 0;
  font-size: 13px;
}

:root[data-theme="dark"] .warnbox {
  background: #3b3115;
  color: #f0d78a;
  border-color: #7a6320;
}

.set-card {
  margin-bottom: 14px;
}

.set-card h2 {
  margin-top: 0;
}

.set-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  flex-wrap: wrap;
  margin: 8px 0;
}

@media print {
  #print-root .rep-sheet {
    font-size: 11px;
    color: #16282c;
  }

  #print-root .rep-sheet table {
    page-break-inside: auto;
  }

  #print-root .rep-sheet tr {
    page-break-inside: avoid;
  }

  #print-root .rep-sheet thead {
    display: table-header-group;
  }

  #print-root .rep-sheet .mgroup {
    break-inside: avoid;
  }
}

.vcard.has-qr .vcard-bot {
  padding-right: 92px;
}

/* ===== v13: Mesaj kartları ===== */
.msg-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.msg-card {
  border-radius: 12px;
  padding: 14px 16px;
  position: relative;
  animation: msg-in .25s ease;
}

.msg-card.msg-hiding {
  animation: msg-out .3s ease forwards;
}

@keyframes msg-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes msg-out {
  to {
    opacity: 0;
    transform: translateY(-8px);
    max-height: 0;
    padding: 0;
    margin: 0;
  }
}

.msg-kampanya {
  background: linear-gradient(135deg, #fff8e0 0%, #fff3c0 100%);
  border: 1.5px solid #e0b252;
  color: #5a4300;
}

.msg-uyari {
  background: #fff3cd;
  border: 1.5px solid #e09c00;
  color: #5a3500;
}

.msg-duyuru {
  background: #e8f4fd;
  border: 1.5px solid #5ba8d4;
  color: #0d3b5a;
}

.msg-bilgi {
  background: var(--surface);
  border: 1.5px solid var(--line);
}

:root[data-theme="dark"] .msg-kampanya {
  background: #332a00;
  border-color: #a07c20;
  color: #f0d87a;
}

:root[data-theme="dark"] .msg-uyari {
  background: #3a2800;
  border-color: #a07000;
  color: #f0c060;
}

:root[data-theme="dark"] .msg-duyuru {
  background: #0d2a3d;
  border-color: #3a7dad;
  color: #a8d5f0;
}

.msg-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.msg-tur {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .3px;
  text-transform: uppercase;
  opacity: .7;
}

.msg-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 6px;
  opacity: .6;
}

.msg-close:hover {
  opacity: 1;
  background: rgba(0, 0, 0, .08);
}

.msg-baslik {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 5px;
}

.msg-icerik {
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

/* v14: silindi rozeti */
.chip.dead {
  background: #e8e8e8;
  color: #555;
  border: 1px solid #ccc;
}

:root[data-theme="dark"] .chip.dead {
  background: #2a2a2a;
  color: #aaa;
  border-color: #444;
}

/* paket dağılımı çipi — renk paleti .tier ile aynı */
.chip-paket {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
  border: 1px solid transparent;
}

.chip-paket.renk-varsayilan,
.chip-paket.renk- {
  background: var(--lake-soft);
  color: var(--lake-ink, var(--lake-deep));
  border-color: var(--line);
}

.chip-paket.renk-gold {
  background: #fbf1cf;
  color: #85600c;
  border-color: #ecd68a;
}

.chip-paket.renk-silver {
  background: #e8edf0;
  color: #4a5a62;
  border-color: #cbd5da;
}

.chip-paket.renk-premium {
  background: #f3dde0;
  color: #6b1d2a;
  border-color: #e3b8bf;
}

.chip-paket.renk-vip {
  background: #26262b;
  color: #f0d68a;
  border-color: #4a4a52;
}

.chip-paket.renk-jest {
  background: #f7e6d2;
  color: #7a3f1c;
  border-color: #e3c19b;
}

.chip-paket.renk-safir {
  background: #dfe6f6;
  color: #1a3a72;
  border-color: #b9c8e6;
}

.chip-paket.renk-zumrut {
  background: #dcefe4;
  color: #12614a;
  border-color: #b4d8c4;
}

.chip-paket.renk-bordo {
  background: #f5dde2;
  color: #5a0e27;
  border-color: #e8aab8;
}

.chip-paket.renk-gok {
  background: #d8edf8;
  color: #1f6090;
  border-color: #96cce8;
}

.chip-paket.renk-kumsal {
  background: #f8edcf;
  color: #7a5210;
  border-color: #e6c878;
}

:root[data-theme="dark"] .chip-paket.renk-gold {
  background: #3d2e06;
  color: #f0d68a;
  border-color: #6b500e;
}

:root[data-theme="dark"] .chip-paket.renk-silver {
  background: #2a3038;
  color: #c8d5db;
  border-color: #4a5560;
}

:root[data-theme="dark"] .chip-paket.renk-premium {
  background: #3a1622;
  color: #f4b8c6;
  border-color: #7a2a3a;
}

:root[data-theme="dark"] .chip-paket.renk-vip {
  background: #1a1a20;
  color: #f0d68a;
  border-color: #4a4a52;
}

:root[data-theme="dark"] .chip-paket.renk-jest {
  background: #3a1e0a;
  color: #f0c090;
  border-color: #7a3f1c;
}

:root[data-theme="dark"] .chip-paket.renk-safir {
  background: #0e1e40;
  color: #90b8f0;
  border-color: #1a3a72;
}

:root[data-theme="dark"] .chip-paket.renk-zumrut {
  background: #0a2818;
  color: #80d0a8;
  border-color: #12614a;
}

:root[data-theme="dark"] .chip-paket.renk-bordo {
  background: #3a0818;
  color: #f4a8ba;
  border-color: #7a1535;
}

:root[data-theme="dark"] .chip-paket.renk-gok {
  background: #0c2a40;
  color: #90c8f0;
  border-color: #2a7bb8;
}

:root[data-theme="dark"] .chip-paket.renk-kumsal {
  background: #3a2008;
  color: #f0c870;
  border-color: #8c5e18;
}