/* Ana sayfa, giriş ve profil sayfaları (style.css'ten sonra yüklenir). */

/* Ortak */
a.primary, a.secondary, a.ghost { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
a.secondary.small { padding: 8px 14px; font-size: 14px; }
.linkish { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: none; }
.linkish:hover { text-decoration: underline; }
.notice { background: var(--accent-soft); border-radius: 12px; padding: 12px 16px; margin-bottom: 12px; font-size: 14px; }
main.narrow { max-width: 440px; }
main.wide { max-width: 1080px; }
h1 { letter-spacing: -0.5px; }
h2 .ms { color: var(--accent); }

/* Ana sayfa */
.hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: center; padding: 32px 0 56px; }
.hero h1 { font-size: clamp(32px, 5vw, 52px); line-height: 1.1; margin: 16px 0; }
.hero h1 em { font-style: normal; color: var(--accent); }
.lead { font-size: 17px; color: var(--muted); max-width: 540px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; background: var(--accent-soft); color: var(--accent);
  font-weight: 600; font-size: 13px; padding: 6px 12px; border-radius: 99px;
}
.pill .ms { font-size: 18px; }
.cta { display: flex; gap: 12px; margin: 24px 0 10px; flex-wrap: wrap; }
.cta .primary, .cta .ghost { width: auto; padding: 14px 26px; }
.hero-video { display: flex; justify-content: center; }
.phone {
  position: relative; width: min(300px, 80vw); aspect-ratio: 9/16; border-radius: 34px; overflow: hidden;
  border: 8px solid #0d0e11; box-shadow: 0 30px 60px rgba(0,0,0,.25); background: #000;
}
.phone video { width: 100%; height: 100%; object-fit: cover; display: block; }
.unmute {
  position: absolute; right: 12px; bottom: 12px; border: 0; border-radius: 99px; padding: 7px 12px;
  background: rgba(0,0,0,.6); color: #fff; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; gap: 4px;
}
.unmute .ms { font-size: 18px; }
.steps-home, .features { padding: 24px 0 40px; }
.steps-home h2, .features h2, .final-cta h2 { font-size: 26px; justify-content: center; text-align: center; margin-bottom: 24px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.step-card, .feat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.step-card .ms, .feat .ms { font-size: 30px; color: var(--accent); display: block; margin-bottom: 10px; }
.step-card b, .feat b { display: block; font-size: 16px; margin-bottom: 6px; }
.step-card p, .feat p { margin: 0; color: var(--muted); font-size: 14px; }
.final-cta { text-align: center; padding: 40px 20px; }
.final-cta h2 { margin-bottom: 6px; }
.final-cta .primary { width: auto; display: inline-flex; padding: 14px 32px; }
.footer {
  max-width: 1080px; margin: 0 auto; padding: 24px 20px 40px; display: flex; flex-wrap: wrap;
  justify-content: space-between; gap: 8px; font-size: 13px;
}
.footer .hint { margin: 0; }
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; gap: 28px; padding-top: 12px; text-align: center; }
  .lead { margin: 0 auto; }
  .cta { justify-content: center; }
  .hero-video { order: -1; }
  .phone { width: min(240px, 64vw); }
  .grid3 { grid-template-columns: 1fr; }
}

/* Giriş */
.auth { padding: 28px; }
.auth h1 { font-size: 24px; margin: 20px 0 4px; }
.tabs { display: flex; }
.tabs label { flex: 1; text-align: center; }
.google {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 16px;
  background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; padding: 13px;
  font: inherit; font-weight: 600; cursor: pointer;
}
.google:hover { background: var(--bg); }
.google:disabled { opacity: .6; cursor: wait; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; margin: 18px 0 4px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth .primary { margin-top: 18px; }
.auth #forgot { display: block; margin: 14px auto 0; }

/* Profil */
.profile-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.who { display: flex; align-items: center; gap: 14px; min-width: 0; }
.who h1 { font-size: 22px; margin: 0; overflow-wrap: anywhere; }
.who .hint { margin: 0; overflow-wrap: anywhere; }
.stats { display: flex; gap: 10px; }
.stats div { background: var(--bg); border-radius: 12px; padding: 10px 16px; text-align: center; min-width: 84px; }
.stats b { display: block; font-size: 20px; }
.stats span { font-size: 12px; color: var(--muted); }
.form-actions { display: flex; justify-content: flex-end; align-items: center; gap: 14px; margin-top: 16px; }
.saved { color: var(--accent); font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 4px; }
.plan-box { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.plan-box b { font-size: 18px; }
.plan-box .hint { margin: 2px 0 0; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.section-head h2 { margin: 0; }
.videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.vcard { display: flex; gap: 12px; border: 1px solid var(--line); border-radius: 14px; padding: 10px; min-width: 0; }
.thumb {
  position: relative; flex: none; width: 76px; aspect-ratio: 9/16; border: 0; padding: 0; border-radius: 10px;
  overflow: hidden; background: var(--bg); cursor: pointer; display: grid; place-items: center;
}
.thumb:disabled { cursor: default; }
.thumb video { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.play-over { position: absolute; color: #fff; font-size: 34px; text-shadow: 0 1px 6px rgba(0,0,0,.6); }
.thumb .ph { color: var(--muted); font-size: 28px; }
.vinfo { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 13px; }
.vinfo b { font-size: 14px; overflow-wrap: anywhere; }
.vinfo .hint { margin: 0; font-size: 12px; }
.vinfo .linkish { margin-top: 4px; align-self: flex-start; }
.err-text { color: var(--danger); font-size: 12px; }
.badge { align-self: flex-start; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; margin-bottom: 2px; }
.badge.ok { background: #e3f4e8; color: #1d7a3d; }
.badge.wait { background: var(--accent-soft); color: var(--accent); }
.badge.err { background: #fdecea; color: var(--danger); }
.empty { grid-column: 1 / -1; text-align: center; padding: 24px; color: var(--muted); }
.empty .ms { font-size: 40px; }
.empty .primary { width: auto; display: inline-flex; padding: 12px 22px; }
.logout { display: flex; margin: 8px auto 0; align-items: center; gap: 6px; }
dialog#player { border: 0; border-radius: 18px; padding: 12px; background: var(--card); color: var(--ink); width: min(380px, 92vw); }
dialog#player::backdrop { background: rgba(0,0,0,.7); }
dialog#player video { width: 100%; aspect-ratio: 9/16; background: #000; border-radius: 12px; display: block; }
dialog#player .actions { margin: 12px 0 0; grid-template-columns: 1fr 1fr; }
.stats a { background: var(--bg); border-radius: 12px; padding: 10px 16px; text-align: center; min-width: 84px; color: inherit; text-decoration: none; }
.stats a b { display: block; font-size: 20px; color: var(--accent); }
.stats a span { font-size: 12px; color: var(--muted); }

/* Kredi */
.links .credit-chip { background: var(--accent-soft); color: var(--accent); font-weight: 700; gap: 4px; }
.links .credit-chip .ms { font-size: 18px; }
.links .credit-chip:hover, .links .credit-chip.on { background: var(--accent); color: var(--accent-ink); }
.balance-card { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.balance-card .hint { margin: 0; }
.balance { display: flex; align-items: center; gap: 8px; font-size: 40px; font-weight: 800; line-height: 1.2; }
.balance .ms { font-size: 40px; color: var(--accent); }
.balance-card .primary { width: auto; padding: 13px 22px; }
.notice .linkish { margin-left: 4px; }
/* Dar sayfalarda (kredi) 2 sütun, geniş sayfada (ana sayfa) 4 sütun; minmax(0,…) taşmayı önler */
.packages { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 18px 0 14px; }
main.wide .packages { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { main.wide .packages { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .packages, main.wide .packages { grid-template-columns: minmax(0, 1fr); } }
.package {
  position: relative; border: 1px solid var(--line); border-radius: 16px; padding: 22px 18px 18px; background: var(--card);
  display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; min-width: 0;
}
.package.best { border: 2px solid var(--accent); box-shadow: 0 8px 24px rgba(217, 154, 43, .12); }
.package .tag {
  position: absolute; top: -11px; left: 50%; transform: translateX(-50%); background: var(--accent); color: var(--accent-ink);
  font-size: 11px; font-weight: 700; padding: 2px 10px; border-radius: 99px; white-space: nowrap;
}
.pname { font-size: 15px; font-weight: 600; color: var(--muted); }
.pprice { font-size: 30px; font-weight: 800; line-height: 1.25; margin: 2px 0 6px; }
.pcredits { color: var(--ink); font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 5px; }
.pcredits .ms { color: var(--accent); font-size: 20px; }
.gift {
  display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700;
  color: #1d7a3d; background: #e3f4e8; padding: 3px 10px; border-radius: 99px;
}
.gift .ms { font-size: 16px; }
.gift.none { visibility: hidden; }
@media (prefers-color-scheme: dark) { .gift { color: #7ee2a0; background: rgba(126, 226, 160, .12); } }
.pmeta { font-size: 13px; font-weight: 600; margin-top: 6px; display: flex; flex-direction: column; }
.pmeta span { font-size: 12px; font-weight: 400; color: var(--muted); }
.package .buy {
  margin-top: 14px; width: 100%; padding: 11px 12px; font-size: 14px; white-space: nowrap;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.package .buy .ms { font-size: 18px; }
.package button:disabled { opacity: .55; cursor: not-allowed; }
.pay-note { margin: 0; line-height: 1.6; }
.pay-note .ms { font-size: 18px; vertical-align: -4px; margin-right: 2px; }
.pay-note b { color: var(--ink); background: var(--bg); padding: 1px 8px; border-radius: 6px; font-family: ui-monospace, Consolas, monospace; }
.price-table { width: 100%; border-collapse: collapse; font-size: 14px; margin-bottom: 8px; }
.price-table td { padding: 9px 4px; border-bottom: 1px solid var(--line); }
.price-table td:last-child { text-align: right; font-weight: 700; white-space: nowrap; }
.price-table .hint { font-size: 12px; margin: 0; }
h3 { font-size: 14px; margin: 18px 0 4px; }
.ledger { list-style: none; padding: 0; margin: 0; }
.ledger li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.ledger li:last-child { border-bottom: 0; }
.lic { width: 36px; height: 36px; border-radius: 50%; background: var(--bg); display: grid; place-items: center; color: var(--muted); flex: none; font-size: 20px; }
.ldesc { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ldesc b { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.ldesc .hint, .lamt .hint { margin: 0; font-size: 12px; }
.lamt { text-align: right; font-weight: 700; display: flex; flex-direction: column; }
.lamt.pos { color: #1d7a3d; }
.lamt.neg { color: var(--ink); }
.estimate { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; margin-bottom: 12px; }
.estimate.short { border-color: var(--danger); }
.estimate.short #estBalance { color: var(--danger); font-weight: 600; }
.est-main { display: flex; align-items: center; gap: 10px; }
.est-main .ms { color: var(--accent); font-size: 26px; }
.est-main b { font-size: 16px; }
.estimate details { border: 0; padding: 6px 0 0; }
.estimate summary { font-size: 13px; color: var(--muted); font-weight: 500; }
.estimate ul { list-style: none; padding: 0; margin: 8px 0 0; font-size: 13px; }
.estimate li { display: flex; justify-content: space-between; padding: 3px 0; }
.estimate details .hint { margin: 6px 0 0; font-size: 12px; }
.pricing { padding: 24px 0 40px; }
.pricing h2 { font-size: 26px; text-align: center; margin-bottom: 6px; }
.center { text-align: center; }

/* Yönetim */
.wide-stats { flex-wrap: wrap; }
.wide-stats div { flex: 1; }
.search-row { display: flex; gap: 10px; }
.search-row input { flex: 1; }
.search-row button { padding: 0 20px; }
.user-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 16px 0 4px; padding: 14px; background: var(--bg); border-radius: 12px; }
.user-head .hint { margin: 2px 0 0; font-size: 12px; overflow-wrap: anywhere; }
.balance.small { font-size: 26px; }
.balance.small .ms { font-size: 26px; }
.grant-packages .pick { font: inherit; color: inherit; cursor: pointer; padding: 12px 10px; gap: 2px; }
.grant-packages .pick span { font-size: 13px; }

/* Yönetim: kullanıcı tablosu */
.filter { max-width: 280px; padding: 9px 12px !important; }
@media (max-width: 560px) { .section-head { flex-wrap: wrap; } .filter { max-width: none; } }
.table-wrap { overflow-x: auto; margin: 0 -4px; }
.users-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 640px; }
.users-table th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.users-table td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; white-space: nowrap; }
.users-table td:first-child { white-space: normal; min-width: 220px; }
.users-table td b { display: block; font-weight: 600; }
.users-table td .hint { display: block; margin: 0; font-size: 12px; overflow-wrap: anywhere; }
.users-table .n { text-align: right; font-variant-numeric: tabular-nums; }
.users-table td.n { font-weight: 600; }
.users-table tbody tr { cursor: pointer; }
.users-table tbody tr:hover, .users-table tbody tr:focus { background: var(--bg); outline: none; }
.users-table code { font-size: 12px; background: var(--bg); padding: 1px 6px; border-radius: 5px; }
.tags { display: flex; gap: 4px; margin-top: 3px; }
.tag-s { font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 99px; background: var(--bg); color: var(--muted); }
.tag-s.warn { background: #fdecea; color: var(--danger); }

/* Paylaşım izni anahtarı */
.consent { display: flex; gap: 14px; align-items: flex-start; cursor: pointer; margin-top: 4px; }
.consent input { position: absolute; opacity: 0; pointer-events: none; }
.switch { flex: none; width: 44px; height: 26px; border-radius: 99px; background: var(--line); position: relative; transition: background .2s; margin-top: 2px; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.consent input:checked + .switch { background: var(--accent); }
.consent input:checked + .switch::after { transform: translateX(18px); }
.consent input:focus-visible + .switch { outline: 2px solid var(--accent); outline-offset: 2px; }
.consent input:disabled + .switch { opacity: .6; }
.consent-text { display: flex; flex-direction: column; gap: 4px; }
.consent-text .hint { margin: 0; line-height: 1.55; }
.consent-status { font-weight: 600; }
.tag-s.admin { background: var(--accent); color: var(--accent-ink); }
.tag-s.user { background: var(--accent-soft); color: var(--accent); }
.tag-s.hub { background: #e6eefc; color: #2d5bd1; }
@media (prefers-color-scheme: dark) { .tag-s.hub { background: rgba(110,150,255,.15); color: #9db7ff; } .tag-s.warn { background: rgba(192,57,43,.18); color: #ff9c8f; } }
/* Kredi yükleme: kompakt paket seçimi */
.grant-packages { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; gap: 10px; margin: 10px 0; }
@media (max-width: 560px) { .grant-packages { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
.grant-packages .pick { padding: 12px 8px; gap: 3px; border-radius: 12px; }
.grant-packages .pick .pname { font-size: 13px; }
.grant-packages .pick .gift { font-size: 10px; padding: 2px 6px; }
.section-head h2 .hint { margin: 0; font-weight: 500; font-size: 14px; }

/* Ofis logosu */
.logo-row { display: flex; gap: 16px; align-items: center; padding: 14px; margin: 4px 0 8px; background: var(--bg); border-radius: 14px; }
.logo-preview { flex: none; width: 150px; height: 84px; border-radius: 12px; background: #fff; border: 1px dashed var(--line); display: grid; place-items: center; color: #9aa0aa; overflow: hidden; }
.logo-preview.has { border-style: solid; }
.logo-preview img { max-width: 130px; max-height: 70px; object-fit: contain; }
.logo-preview .ms { font-size: 32px; }
.logo-actions { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.logo-actions .hint { margin: 0; font-size: 12px; }
.logo-buttons { display: flex; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.file-btn { cursor: pointer; display: inline-flex; align-items: center; gap: 4px; border-radius: 10px; }
.ghost.small { padding: 8px 14px; font-size: 14px; }
.logo-msg { font-weight: 600; }
@media (max-width: 480px) { .logo-row { flex-direction: column; align-items: flex-start; } }
/* Hazır logolar */
.brand-panel { border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin-bottom: 8px; }
.brand-panel .hint { margin: 2px 0 10px; }
.brand-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.brand-item { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px; border-radius: 12px; border: 2px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.brand-item img { width: 100%; height: 56px; object-fit: contain; background: #fff; border-radius: 8px; padding: 6px; }
.brand-item.on { border-color: var(--accent); }
.brand-confirm { margin-top: 12px; display: grid; gap: 10px; }
.brand-form { margin-top: 12px; flex-wrap: wrap; }
.brand-form .file-btn { padding: 0 14px; display: inline-flex; align-items: center; }
#adminBrands .brand-item { cursor: default; }
.consent-box { background: var(--bg); border-radius: 14px; padding: 16px; margin: 16px 0 12px; font-size: 14px; line-height: 1.6; }
.consent-box b .ms { color: var(--accent); vertical-align: -5px; margin-right: 4px; }
.consent-box p { margin: 8px 0 0; }
.consent-check { margin-bottom: 4px; }
.auth #decline { display: block; margin: 14px auto 0; color: var(--muted); }
.vinfo .vlinks { display: flex; gap: 16px; }
.vinfo .vlinks .linkish { margin-top: 4px; }

/* Arkadaşını getir */
.invite .invite-link { display: flex; gap: 8px; margin: 10px 0; }
.invite .invite-link input { flex: 1; min-width: 0; font-size: 13px; }
.invite .invite-link .secondary { flex: none; display: inline-flex; align-items: center; gap: 4px; }
.invite .invite-wa { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.invite .ms { font-size: 18px; }
#inviteStats { margin: 10px 0 0; }
