/* ============================================================
   XTheme v2 — base.css : sıfırlama, tipografi, yerleşim, formlar, tablolar
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
/* Keskin köşe kuralı: yuvarlatma yok (avatar/spinner gibi bilerek yuvarlak öğeler hariç). */
*, *::before, *::after { border-radius: 0 !important; }
.avatar, .spinner, [data-round], .is-round { border-radius: 50% !important; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.65;
    color: var(--c-body); background: var(--c-bg); -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, svg { max-width: 100%; height: auto; vertical-align: middle; }
a { color: var(--c-blue); text-decoration: none; transition: color var(--t); }
a:hover { color: var(--c-navy); }
ul, ol { margin: 0; padding: 0; list-style: none; }
p { margin: 0 0 1em; }
h1, h2, h3, h4, h5 { margin: 0 0 .5em; color: var(--c-ink); font-weight: 800; line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: var(--fs-h1); } h2 { font-size: var(--fs-h2); } h3 { font-size: var(--fs-h3); } h4 { font-size: var(--fs-h4); }
::selection { background: var(--c-ice); color: var(--c-navy); }
:focus-visible { outline: 2px solid var(--c-blue); outline-offset: 2px; }
hr { border: 0; border-top: var(--bd); margin: var(--s-5) 0; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; white-space: nowrap; }

/* ---------- Yerleşim ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--s-8); }
.section-tight { padding-block: var(--s-7); }
.section-alt { background: var(--c-white); border-block: var(--bd); }
.section-dark { background: var(--c-ink); color: var(--c-ice); }
.section-dark h1, .section-dark h2, .section-dark h3 { color: #fff; }
.section-head { max-width: 680px; margin: 0 auto var(--s-7); text-align: center; }
.section-head h2 { margin-bottom: var(--s-2); }
.section-head p { color: var(--c-mute); margin: 0; }
.eyebrow { display: inline-block; font-size: var(--fs-xs); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--c-blue); margin-bottom: var(--s-3); }

.grid { display: grid; gap: var(--s-5); }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-auto { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.stack > * + * { margin-top: var(--s-4); }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-4); }
.between { justify-content: space-between; }
.center { text-align: center; }
.mt-0 { margin-top: 0; } .mt-2 { margin-top: var(--s-2); } .mt-4 { margin-top: var(--s-4); } .mt-6 { margin-top: var(--s-6); }
.mb-0 { margin-bottom: 0; } .mb-4 { margin-bottom: var(--s-4); } .mb-6 { margin-bottom: var(--s-6); }
.muted { color: var(--c-mute); }
.text-right { text-align: right; }

/* ---------- Formlar ---------- */
label { display: block; font-size: var(--fs-sm); font-weight: 600; color: var(--c-ink); margin-bottom: var(--s-2); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=tel], input[type=search], input[type=url], input[type=date], select, textarea {
    width: 100%; height: 44px; padding: 0 var(--s-4); font: inherit; font-size: .92rem; color: var(--c-ink);
    background: var(--c-white); border: 1px solid var(--c-line-strong); border-radius: 0;
    transition: border-color var(--t);
}
textarea { height: auto; min-height: 120px; padding: var(--s-3) var(--s-4); resize: vertical; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--c-navy) 50%), linear-gradient(135deg, var(--c-navy) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
input:hover, select:hover, textarea:hover { border-color: var(--c-navy); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--c-blue); box-shadow: none; }
input::placeholder, textarea::placeholder { color: var(--c-mute); opacity: .8; }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; accent-color: var(--c-blue); vertical-align: middle; margin-right: var(--s-2); }
input[type=file] { width: 100%; padding: var(--s-3); border: 1px dashed var(--c-line-strong); background: var(--c-white); font: inherit; font-size: var(--fs-sm); }
/* Telefon alanı (ülke seçici): kutu diğer input'larla aynı; iç alanlar çerçevesiz */
.pi { position: relative; width: 100%; }
.pi-row { display: flex; align-items: stretch; height: 44px; background: var(--c-white); border: 1px solid var(--c-line-strong); border-radius: 0; transition: border-color var(--t); }
.pi-row:hover { border-color: var(--c-navy); }
.pi-row:focus-within { border-color: var(--c-blue); outline: none; box-shadow: none; }
.pi-btn:focus-visible, .pi-btn:focus { outline: none; box-shadow: none; }
.pi-btn { display: inline-flex; align-items: center; gap: var(--s-2); padding: 0 var(--s-3); background: transparent; border: 0; border-right: 1px solid var(--c-line-strong); color: var(--c-ink); font: inherit; font-size: .92rem; cursor: pointer; white-space: nowrap; outline: none; }
.pi-flag { width: 22px; height: 16px; object-fit: cover; box-shadow: 0 0 0 1px rgba(0, 0, 0, .12); flex: none; }
.pi-caret { border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid var(--c-navy); }
.pi .pi-num { flex: 1; min-width: 0; height: auto; border: 0; outline: 0; background: transparent; }
.pi-pop { position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 4px); background: var(--c-white); border: 1px solid var(--c-line-strong); box-shadow: 0 12px 28px rgba(15, 23, 42, .18); padding: var(--s-2); }
.pi-pop[hidden] { display: none; }
.pi .pi-q { height: 44px; margin-bottom: var(--s-2); border: 1px solid var(--c-line-strong); background: var(--c-white); outline: none; box-shadow: none; }
.pi .pi-q:hover { border-color: var(--c-navy); }
.pi .pi-q:focus { border-color: var(--c-blue); outline: none; box-shadow: none; }
.pi-list { list-style: none; margin: 0; padding: 0; max-height: 240px; overflow-y: auto; }
.pi-list li { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-2); cursor: pointer; font-size: .92rem; }
.pi-list li[hidden] { display: none !important; }
.pi-list li:hover, .pi-list li[aria-selected=true] { background: var(--c-ice); }
.pi-list .pi-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pi-list .pi-code { color: var(--c-mute); font-variant-numeric: tabular-nums; }
/* Parola gücü çubuğu: kırmızı = gereksinim yok, turuncu = yeterli, yeşil = çok güçlü */
.pw-meter { margin-top: var(--s-2); }
.pw-track { height: 6px; background: var(--c-line-strong); }
.pw-fill { height: 100%; width: 0; background: transparent; transition: width .25s, background-color .25s; }
.pw-text { margin-top: 4px; font-size: var(--fs-sm); color: var(--c-mute); min-height: 1.2em; }
.pw-meter[data-level="1"] .pw-fill { background: #dc2626; } .pw-meter[data-level="1"] .pw-text { color: #dc2626; }
.pw-meter[data-level="2"] .pw-fill { background: #f97316; } .pw-meter[data-level="2"] .pw-text { color: #c2410c; }
.pw-meter[data-level="3"] .pw-fill { background: #16a34a; } .pw-meter[data-level="3"] .pw-text { color: #15803d; }
[dir=rtl] .pi-btn { border-right: 0; border-left: 1px solid var(--c-line-strong); }
.field { min-width: 0; }
.field .hint { font-size: var(--fs-xs); color: var(--c-mute); margin-top: var(--s-1); }
.field .error, .error-text { font-size: var(--fs-xs); color: var(--c-danger); margin-top: var(--s-1); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4); }
.form-grid .span-2 { grid-column: 1 / -1; }
/* Onay kutusu: projedeki TEK tanım (giriş, kayıt, ödeme ve tüm formlar `<label class="check"><input type="checkbox"> metin</label>` kullanır) */
.check { display: flex; align-items: flex-start; gap: 10px; margin: 0; font-size: var(--fs-sm, .9rem); font-weight: 400; line-height: 1.5; color: inherit; cursor: pointer; }
.check input[type=checkbox] { -webkit-appearance: none; appearance: none; flex: 0 0 auto; width: 18px; height: 18px; margin: 2px 0 0; padding: 0; border: 0; outline: 0; background: #fff; box-shadow: inset 0 0 0 1.5px #94a3b8; cursor: pointer; display: inline-grid; place-content: center; transition: background .12s, box-shadow .12s; }
.check input[type=checkbox] { border-radius: 3px; }
.check input[type=checkbox]:hover { box-shadow: inset 0 0 0 1.5px var(--c-blue, #1e3a8a); }
.check input[type=checkbox]:checked { background-color: var(--c-blue, #1e3a8a); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.4l3.2 3.2 6-6.6' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-size: 100% 100%; background-repeat: no-repeat; background-position: center; box-shadow: inset 0 0 0 1.5px var(--c-blue, #1e3a8a); }
.check input[type=checkbox]:focus-visible { box-shadow: inset 0 0 0 1.5px var(--c-blue, #1e3a8a), 0 0 0 3px rgba(30, 58, 138, .25); }
.check input[type=checkbox]:disabled { opacity: .55; cursor: not-allowed; }
/* Zorunlu onay işaretlenmediğinde: bildirim yerine kutu ve metin kırmızı gösterilir */
.check.is-invalid { color: #b91c1c; }
.check.is-invalid a { color: #b91c1c; }
.check.is-invalid input[type=checkbox] { box-shadow: inset 0 0 0 1.5px #dc2626, 0 0 0 3px rgba(220, 38, 38, .16); }
/* Radyo düğmesi (adres / ödeme kartları): sade, ince halka. Seçilince dolgulu mavi daire, içinde SVG tik ve ince yarı saydam dış gölge */
.co-addr input[type=radio] { -webkit-appearance: none; appearance: none; flex: 0 0 auto; width: 20px; height: 20px; margin: 0; padding: 0; border: 0; outline: 0; background-color: #fff; background-repeat: no-repeat; background-position: center; background-size: 0; border-radius: 50% !important; box-shadow: inset 0 0 0 1.5px #b6c0cf; cursor: pointer; transition: background-color .15s, box-shadow .15s; }
.co-addr:hover input[type=radio]:not(:checked) { box-shadow: inset 0 0 0 1.5px #7b8aa3; }
.co-addr input[type=radio]:checked { background-color: var(--c-blue, #1e3a8a); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.4l3.2 3.2 6-6.6' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-size: 100% 100%; box-shadow: 0 0 0 4px rgba(30, 58, 138, .14); }
.co-addr input[type=radio]:focus-visible { box-shadow: 0 0 0 4px rgba(30, 58, 138, .30); }
.co-addr:hover input[type=radio]:not(:checked) { box-shadow: inset 0 0 0 1.5px #7b8aa3; }
.co-addr:hover input[type=radio]:not(:checked) { box-shadow: inset 0 0 0 1.5px #7b8aa3; }
.co-addr:hover input[type=radio]:not(:checked) { box-shadow: inset 0 0 0 1.5px #64748b; }
.check a { color: var(--c-blue, #1e3a8a); font-weight: 600; text-decoration: underline; }
.check + .check { margin-top: 12px; }

/* ---------- Tablolar ---------- */
.table-wrap { overflow-x: auto; overflow-y: hidden; border: var(--bd); background: var(--c-white); }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--c-navy); background: var(--c-ice); padding: var(--s-3) var(--s-4); border-bottom: var(--bd); white-space: nowrap; }
.table td { padding: var(--s-3) var(--s-4); border-bottom: var(--bd); color: var(--c-ink); font-size: .9rem; vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: #F7F9FC; }
.table .actions { text-align: right; white-space: nowrap; }

@media (max-width: 960px) {
    .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    h1 { font-size: 2.2rem; } h2 { font-size: 1.65rem; }
}
@media (max-width: 640px) {
    :root { --gutter: 16px; }
    .cols-2, .cols-3, .cols-4, .form-grid { grid-template-columns: 1fr; }
    .section { padding-block: var(--s-7); }
    h1 { font-size: 1.85rem; } h2 { font-size: 1.45rem; }
}
