/* ==========================================================================
   Nevada License Portal — "Frost" (yüksek kontrast / okunaklı sürüm)
   ========================================================================== */

:root {
  --bg:        #0A0E14;
  --surface:   #141B26;
  --surface-2: #1C2734;
  --raised:    #223143;
  --line:      #2E3E52;
  --line-soft: #24313F;
  --frost:      #6EC8FF;
  --frost-deep: #1E86C9;
  --frost-ink:  #06212F;
  --text:      #F2F7FB;
  --text-2:    #C4D2DF;
  --text-3:    #8DA1B5;
  --ok:        #46E39B;   --ok-bg:     #0E2A20;   --ok-line:   #1C5540;
  --warn:      #FFC24B;   --warn-bg:   #2C2411;   --warn-line: #574618;
  --bad:       #FF6B78;   --bad-bg:    #2E1319;   --bad-line:  #5A2530;
  --patreon:   #FF424D;
  --display: 'Chakra Petch', sans-serif;
  --body:    'IBM Plex Sans', sans-serif;
  --mono:    'IBM Plex Mono', monospace;
  --radius:    14px;
  --radius-sm: 9px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg); color: var(--text);
  font-family: var(--body); font-size: 16px; line-height: 1.55;
  min-height: 100vh; display: flex; flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

.backdrop {
  position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(1000px 500px at 78% -8%, rgba(110,200,255,0.10), transparent 60%),
    radial-gradient(800px 500px at 10% 108%, rgba(30,134,201,0.08), transparent 60%),
    var(--bg);
}

.brand-strip {
  display: flex; align-items: center; gap: 16px;
  padding: 20px 30px; border-bottom: 1px solid var(--line);
  background: rgba(10,14,20,0.6);
}
.brand-name { font-family: var(--display); font-weight: 700; font-size: 18px; letter-spacing: 0.20em; color: var(--text); }
.brand-dot { color: var(--frost); margin: 0 3px; }
.brand-sub {
  font-family: var(--display); font-weight: 600; font-size: 11px;
  letter-spacing: 0.30em; color: var(--frost);
  padding: 4px 10px; border: 1px solid var(--frost-deep); border-radius: 20px;
}

.stage { flex: 1; display: flex; align-items: flex-start; justify-content: center; padding: 44px 20px 60px; }

.card {
  width: 100%; max-width: 500px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 38px 34px;
  box-shadow: 0 24px 60px -30px rgba(0,0,0,0.9);
}

.mod-eyebrow {
  display: inline-block; font-family: var(--display); font-size: 11px; font-weight: 700;
  letter-spacing: 0.24em; color: var(--frost); text-transform: uppercase;
  margin-bottom: 12px; padding-bottom: 6px; border-bottom: 2px solid var(--frost-deep);
}
.mod-title { font-family: var(--display); font-weight: 700; font-size: 28px; line-height: 1.2; color: var(--text); margin-bottom: 8px; }
.mod-sub { color: var(--text-2); font-size: 15px; margin-bottom: 26px; }

.alert { border-radius: var(--radius-sm); padding: 15px 18px; font-size: 15px; margin-bottom: 22px; line-height: 1.55; border-left: 4px solid; }
.alert b { font-weight: 700; }
.alert.danger  { background: var(--bad-bg);  border-color: var(--bad);  color: #FFC6CC; }
.alert.success { background: var(--ok-bg);   border-color: var(--ok);   color: #B8F5D8; }
.alert.warn    { background: var(--warn-bg); border-color: var(--warn); color: #FFE1A6; }

.section-label { font-family: var(--display); font-size: 12px; font-weight: 700; letter-spacing: 0.16em; color: var(--text-3); text-transform: uppercase; margin: 24px 0 12px; }

.btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 15px 20px; border: none; border-radius: var(--radius-sm); cursor: pointer;
  font-family: var(--body); font-weight: 600; font-size: 15.5px; text-decoration: none;
  transition: filter .15s, transform .08s, box-shadow .15s;
}
.btn:hover { filter: brightness(1.10); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid var(--frost); outline-offset: 2px; }
.btn-patreon { background: var(--patreon); color: #fff; box-shadow: 0 8px 24px -10px rgba(255,66,77,0.6); }
.btn-frost { background: linear-gradient(180deg, #7FD0FF, #4FB6F5); color: var(--frost-ink); font-weight: 700; box-shadow: 0 8px 24px -10px rgba(110,200,255,0.7); }
.btn-ghost { background: var(--surface-2); color: var(--frost); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--raised); }
.btn + .btn { margin-top: 11px; }

.hint { color: var(--text-3); font-size: 13px; text-align: center; margin-top: 10px; }

.how { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }
.how ol { margin-left: 20px; color: var(--text-2); font-size: 14.5px; line-height: 2; }
.how li { padding-left: 4px; }
.how b { color: var(--text); font-weight: 700; }

.divider { display: flex; align-items: center; gap: 14px; color: var(--text-3); font-family: var(--display); font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; margin: 26px 0 4px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.keycard {
  position: relative; border-radius: 12px; padding: 22px; margin: 22px 0;
  background: linear-gradient(140deg, #1B2A3A 0%, #101A26 100%);
  border: 1px solid var(--frost-deep); box-shadow: inset 0 1px 0 rgba(110,200,255,0.15); overflow: hidden;
}
.keycard::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, transparent, var(--frost), transparent); }
.keycard-row { display: flex; justify-content: space-between; align-items: center; }
.keycard-mod { font-family: var(--display); font-weight: 700; font-size: 16px; color: var(--text); }
.keycard-status { font-family: var(--display); font-size: 11px; font-weight: 700; letter-spacing: 0.18em; padding: 5px 11px; border-radius: 6px; }
.keycard-status.active  { color: var(--ok);   background: var(--ok-bg);   border: 1px solid var(--ok-line); }
.keycard-status.grace   { color: var(--warn); background: var(--warn-bg); border: 1px solid var(--warn-line); }
.keycard-status.expired { color: var(--bad);  background: var(--bad-bg);  border: 1px solid var(--bad-line); }
.keycard-holder { color: var(--text-2); font-size: 14px; margin-top: 6px; }
.keycard-meta { display: flex; gap: 30px; margin-top: 18px; }
.keycard-meta > div { font-size: 12px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.08em; }
.keycard-meta b { display: block; color: var(--text); font-family: var(--mono); font-size: 14px; margin-top: 4px; text-transform: none; letter-spacing: 0; }

.token-box { font-family: var(--mono); font-size: 11.5px; line-height: 1.7; color: var(--frost); background: #0B1420; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 13px 15px; word-break: break-all; max-height: 100px; overflow-y: auto; margin-bottom: 11px; }

.scenario { display: block; width: 100%; text-align: left; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px 18px; margin-bottom: 12px; cursor: pointer; text-decoration: none; color: var(--text); transition: border-color .15s, background .15s, transform .08s; }
.scenario:hover { border-color: var(--frost); background: var(--raised); }
.scenario:active { transform: translateY(1px); }
.scenario b { display: block; font-size: 16px; font-weight: 700; margin-bottom: 4px; color: var(--text); }
.scenario span { color: var(--text-2); font-size: 13.5px; line-height: 1.55; }

.consent-note { background: var(--warn-bg); border: 1px solid var(--warn-line); color: #FFE1A6; border-radius: var(--radius-sm); padding: 13px 16px; font-size: 14px; margin-bottom: 22px; }

.input { width: 100%; padding: 14px 16px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--text); font-family: var(--body); font-size: 15px; transition: border-color .15s, box-shadow .15s; }
.input:focus { outline: none; border-color: var(--frost); box-shadow: 0 0 0 3px rgba(110,200,255,0.18); }
.input::placeholder { color: #6B8299; }
select.input { appearance: none; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236EC8FF' d='M6 8L0 0h12z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 40px; }
input[type="file"].input { padding: 11px 14px; color: var(--text-2); cursor: pointer; }
input[type="file"].input::file-selector-button { background: var(--raised); color: var(--frost); border: 1px solid var(--line); border-radius: 6px; padding: 7px 12px; margin-right: 12px; cursor: pointer; font-family: var(--body); font-size: 13px; }

.card.admin { max-width: 900px; }
.admin-section { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 22px 24px; margin-bottom: 22px; }
.admin-section > .section-label { margin-top: 0; }
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.admin-grid .btn { grid-column: 1 / -1; }
.admin-inline { display: flex; gap: 12px; margin-bottom: 16px; align-items: stretch; }
.admin-inline .input { flex: 1; }
.admin-inline .btn { width: auto; padding: 14px 26px; white-space: nowrap; }

.tbl-wrap { overflow-x: auto; border-radius: 10px; border: 1px solid var(--line); }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl thead th { text-align: left; font-family: var(--display); font-size: 11px; font-weight: 700; letter-spacing: 0.12em; color: var(--frost); text-transform: uppercase; padding: 12px 14px; background: #0F1824; border-bottom: 2px solid var(--line); white-space: nowrap; }
.tbl tbody td { padding: 13px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; color: var(--text-2); }
.tbl tbody tr:last-child td { border-bottom: none; }
.tbl tbody tr:hover { background: rgba(110,200,255,0.04); }
.tbl .mono { font-family: var(--mono); font-size: 13px; color: var(--text); }
.tbl .empty { color: var(--text-3); text-align: center; padding: 22px; font-style: italic; }

.badge { display: inline-block; font-family: var(--mono); font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 6px; white-space: nowrap; }
.badge.ok   { color: var(--ok);   background: var(--ok-bg);   border: 1px solid var(--ok-line); }
.badge.warn { color: var(--warn); background: var(--warn-bg); border: 1px solid var(--warn-line); }
.badge.bad  { color: var(--bad);  background: var(--bad-bg);  border: 1px solid var(--bad-line); }

.row-actions { white-space: nowrap; }
.row-actions a, .link-btn { display: inline-block; background: none; cursor: pointer; color: var(--frost); font-size: 13px; font-family: var(--body); font-weight: 600; text-decoration: none; padding: 5px 10px; margin: 2px 2px; border: 1px solid var(--line); border-radius: 6px; transition: background .15s, border-color .15s; }
.row-actions a:hover, .link-btn:hover { background: var(--raised); border-color: var(--frost); }
.danger-link { color: var(--bad); }
.danger-link:hover { border-color: var(--bad); background: var(--bad-bg); }

.sim-log { font-family: var(--mono); font-size: 13px; line-height: 1.75; background: #0B1420; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px; min-height: 140px; white-space: pre-wrap; word-break: break-all; color: var(--text-2); margin-top: 16px; }
.sim-log .ok { color: var(--ok); }
.sim-log .bad { color: var(--bad); }
.sim-log .info { color: var(--frost); }

.foot { text-align: center; color: var(--text-3); font-size: 13px; padding: 22px; border-top: 1px solid var(--line); }
.demo-pill { color: var(--warn); font-family: var(--display); font-weight: 700; font-size: 11px; letter-spacing: 0.18em; padding: 3px 9px; border: 1px solid var(--warn-line); border-radius: 20px; }

@media (max-width: 640px) {
  .card { padding: 28px 22px; }
  .card.admin { padding: 24px 18px; }
  .mod-title { font-size: 24px; }
  .brand-strip { padding: 16px 20px; }
  .brand-sub { display: none; }
  .admin-grid { grid-template-columns: 1fr; }
  .admin-inline { flex-direction: column; }
  .admin-inline .btn { width: 100%; }
  .keycard-meta { gap: 20px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ==========================================================================
   VİTRİN (storefront) + MOD DETAY
   ========================================================================== */
.store { width: 100%; max-width: 1080px; margin: 0 auto; }
.store-head { margin-bottom: 28px; }
.store-title { font-family: var(--display); font-weight: 700; font-size: 32px; color: var(--text); margin: 4px 0 6px; }
.store-sub { color: var(--text-2); font-size: 15px; }

.mod-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
}
.mod-card {
  display: block; text-decoration: none; color: var(--text);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  transition: transform .16s, border-color .16s, box-shadow .16s;
}
.mod-card:hover {
  transform: translateY(-4px); border-color: var(--frost);
  box-shadow: 0 20px 44px -24px rgba(110,200,255,0.5);
}
.mod-card-img { position: relative; aspect-ratio: 16 / 10; background: var(--surface-2); overflow: hidden; }
.mod-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mod-card-noimg { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--text-3); font-family: var(--mono); font-size: 13px; }
.mod-badge {
  position: absolute; top: 12px; left: 12px;
  background: rgba(10,14,20,0.82); color: var(--frost);
  border: 1px solid var(--frost-deep); border-radius: 6px;
  font-family: var(--display); font-size: 11px; font-weight: 700;
  letter-spacing: 0.1em; padding: 5px 10px; backdrop-filter: none;
}
.mod-card-body { padding: 18px 20px 20px; }
.mod-card-title { font-family: var(--display); font-weight: 700; font-size: 18px; line-height: 1.3; color: var(--text); margin-bottom: 10px; }
.mod-card-foot { display: flex; align-items: center; justify-content: space-between; }
.mod-card-sub { color: var(--text-3); font-size: 13.5px; }
.mod-card-arrow { color: var(--frost); font-size: 20px; transition: transform .16s; }
.mod-card:hover .mod-card-arrow { transform: translateX(4px); }

.store-admin { margin-top: 34px; max-width: 240px; }

/* --- Detay sayfası --- */
.detail { width: 100%; max-width: 1080px; margin: 0 auto; }
.back-link { display: inline-block; color: var(--frost); text-decoration: none; font-size: 14px; margin-bottom: 22px; font-weight: 600; }
.back-link:hover { text-decoration: underline; }
.detail-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 32px; align-items: start; }

.detail-hero { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); aspect-ratio: 16 / 10; }
.detail-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.detail-noimg { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--text-3); font-family: var(--mono); }
.detail-badge { top: 14px; left: 14px; font-size: 12px; }

.thumb-row { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.thumb { width: 84px; height: 60px; border-radius: 8px; overflow: hidden; border: 2px solid var(--line); background: var(--surface-2); cursor: pointer; padding: 0; transition: border-color .15s; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb:hover, .thumb.active { border-color: var(--frost); }

.detail-info { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 28px; }
.detail-title { font-family: var(--display); font-weight: 700; font-size: 26px; line-height: 1.2; color: var(--text); margin-bottom: 6px; }
.detail-sub { color: var(--text-2); font-size: 15px; margin-bottom: 18px; }
.detail-tier { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-2); margin-bottom: 20px; padding: 12px 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.detail-tier b { color: var(--frost); }
.tier-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.detail-desc { color: var(--text-2); font-size: 14.5px; line-height: 1.7; margin-bottom: 24px; }
.detail-cta { margin-top: 6px; }

/* --- Admin ek alanlar --- */
.field-label { display: block; font-family: var(--display); font-size: 11px; font-weight: 700; letter-spacing: 0.1em; color: var(--text-3); text-transform: uppercase; margin: 16px 0 8px; }
textarea.input { resize: vertical; font-family: var(--body); line-height: 1.6; }
.upload-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 8px; }

@media (max-width: 820px) {
  .detail-grid { grid-template-columns: 1fr; }
  .upload-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .store-title { font-size: 26px; }
  .mod-grid { grid-template-columns: 1fr; }
}

/* ===== Admin Konsol ===== */
.card.console { max-width: 1180px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 8px; }
.stat { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px 18px; }
.stat .n { font-family: var(--display); font-size: 30px; font-weight: 700; color: var(--text); line-height: 1; }
.stat .l { font-size: 12px; color: var(--text-3); margin-top: 7px; letter-spacing: 0.02em; }
.stat.alert-stat .n { color: var(--bad); }
.stat.warn-stat .n { color: var(--warn); }
.stat.ok-stat .n { color: var(--ok); }
.ev-filter { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.ev-chip { font-family: var(--mono); font-size: 12px; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line);
           color: var(--text-3); background: var(--surface-2); text-decoration: none; white-space: nowrap; }
.ev-chip:hover { color: var(--text); border-color: var(--frost-deep); }
.ev-chip.active { color: var(--frost-ink); background: var(--frost); border-color: var(--frost); font-weight: 600; }
.k-tag { font-family: var(--mono); font-size: 11px; padding: 2px 8px; border-radius: 5px; background: var(--raised); color: var(--text-2); border: 1px solid var(--line); white-space: nowrap; }
.k-tag.deny { color: var(--bad); background: var(--bad-bg); border-color: var(--bad-line); }
.k-tag.ok   { color: var(--ok);  background: var(--ok-bg);  border-color: var(--ok-line); }
.k-tag.warn { color: var(--warn); background: var(--warn-bg); border-color: var(--warn-line); }

/* ===== Footer linkleri + yasal sayfalar ===== */
.foot a { color: var(--text-3); text-decoration: none; border-bottom: 1px dotted var(--line); }
.foot a:hover { color: var(--frost); }
.legal { max-width: 820px; text-align: left; }
.legal h2 { font-family: var(--display); font-size: 17px; color: var(--text); margin: 26px 0 10px; letter-spacing: 0.02em; }
.legal p, .legal li { color: var(--text-2); font-size: 14.5px; line-height: 1.7; }
.legal ul { margin: 8px 0 8px 20px; }
.legal li { margin-bottom: 6px; }
.legal .note { background: var(--warn-bg); border: 1px solid var(--warn-line); color: var(--warn); border-radius: 10px; padding: 12px 15px; font-size: 13px; margin: 18px 0; }
.legal a { color: var(--frost); }

/* ===== Tier seçici (mod ekleme) ===== */
.tier-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; margin: 6px 0 4px; }
.tier-opt { display: flex; align-items: center; gap: 9px; background: var(--surface-2); border: 1px solid var(--line);
            border-radius: var(--radius-sm); padding: 10px 13px; cursor: pointer; transition: border-color .15s; }
.tier-opt:hover { border-color: var(--frost-deep); }
.tier-opt input { width: 16px; height: 16px; accent-color: var(--frost); cursor: pointer; }
.tier-opt span { font-size: 13.5px; color: var(--text); }
.tier-opt small { color: var(--text-3); font-family: var(--mono); font-size: 11px; }
