/* Bildirim sistemi (tek kaynak): sayfa içi kutular (.alert), sağ alttaki toast ve doğrulama penceresi notları.
   Hem çekirdek (ui.css) hem tema başlığından en son yüklenir; başka dosyalardaki .alert/.toast kuralları bunu ezer. */
:root {
    --nf-info: var(--c-blue, var(--primary, #2563eb));
    --nf-success: var(--c-success, var(--success, #059669));
    --nf-danger: var(--c-danger, var(--danger, #dc2626));
    --nf-warning: var(--c-warning, var(--warning, #d97706));
    --nf-ink: var(--c-ink, #0f172a);
    --nf-line: var(--c-line-strong, var(--border, #cbd5e1));
}

/* Sayfa içi kutu: [ikon] [metin] */
.alert { display: flex; align-items: flex-start; gap: 12px; margin: 0 0 16px; padding: 12px 16px; background: #fff; color: var(--nf-ink); border: 1px solid var(--nf-line); border-left: 4px solid var(--nf-info); border-radius: 0; font-size: .92rem; line-height: 1.45; }
.alert-ico { flex: 0 0 auto; margin-top: 2px; font-size: 1.05rem; color: var(--nf-info); }
.alert-body { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.alert ul { margin: 0; padding: 0; list-style: none; }
.alert li { list-style: none; margin: 0; padding: 0; }
.alert-success { background: rgba(5, 150, 105, .06); border-color: rgba(5, 150, 105, .35); border-left-color: var(--nf-success); color: var(--nf-ink); }
.alert-success .alert-ico { color: var(--nf-success); }
.alert-danger, .alert-error { background: rgba(220, 38, 38, .05); border-color: rgba(220, 38, 38, .35); border-left-color: var(--nf-danger); color: var(--nf-ink); }
.alert-danger .alert-ico, .alert-error .alert-ico { color: var(--nf-danger); }
.alert-warning { background: rgba(217, 119, 6, .06); border-color: rgba(217, 119, 6, .4); border-left-color: var(--nf-warning); color: var(--nf-ink); }
.alert-warning .alert-ico { color: var(--nf-warning); }

.alert[hidden], .toast[hidden], .dlg-note[hidden] { display: none !important; }

/* Toast: sağ altta, kendiliğinden kaybolur. Sayfa içi kutuyla (.alert) aynı dil: açık zemin, ince çerçeve, 4px renkli şerit, koyu metin.
   Zemin opak (altındaki içerik görünmesin); renkler .alert tonlarının opak karşılığıdır. */
.toast-stack { position: fixed; right: 20px; bottom: 20px; z-index: 2100; display: flex; flex-direction: column; gap: 8px; width: min(380px, calc(100vw - 32px)); max-width: none; pointer-events: none; }
.toast { --t: var(--nf-info); --tbg: #eff6ff; --tline: #bfdbfe; display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px 12px 16px; background: var(--tbg); color: var(--nf-ink); border: 1px solid var(--tline); border-left: 4px solid var(--t); border-radius: 0; font-size: .9rem; line-height: 1.45; box-shadow: 0 8px 24px rgba(15, 23, 42, .14); pointer-events: auto; animation: nf-in .28s ease-out both, nf-out .3s ease-in 5.2s forwards; }
.toast-ico { flex: 0 0 auto; margin-top: 2px; font-size: 1.05rem; color: var(--t); }
.toast-msg { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.toast small { display: block; margin-top: 2px; opacity: .7; font-size: .75rem; }
.toast-x { flex: 0 0 auto; background: none; border: 0; padding: 2px 4px; color: #64748b; cursor: pointer; font-size: .9rem; line-height: 1; }
.toast-x:hover { color: var(--nf-ink); }
.toast.toast-success { --t: var(--nf-success); --tbg: #ecfdf5; --tline: #a7f3d0; }
.toast.toast-error, .toast.is-error { --t: var(--nf-danger); --tbg: #fef2f2; --tline: #fecaca; }
.toast.toast-warning { --t: var(--nf-warning); --tbg: #fffbeb; --tline: #fde68a; }
.toast.toast-info { --t: var(--nf-info); --tbg: #eff6ff; --tline: #bfdbfe; }
@keyframes nf-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes nf-out { to { opacity: 0; transform: translateY(8px); visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { .toast { animation: nf-out .01s linear 6s forwards; } }

/* Doğrulama penceresi (popup) içi bilgi notu: bilgi kutusuyla aynı görünüm */
.dlg-note { margin: 0; padding: 10px 12px; font-size: .85rem; line-height: 1.5; color: var(--nf-ink); background: rgba(37, 99, 235, .05); border: 1px solid var(--nf-line); border-left: 4px solid var(--nf-info); border-radius: 0; }

/* Boş durum: ikon yerine sade SVG + kısa metin; yükleniyor: sahte satır yerine tek dönen gösterge (veri varmış izlenimi vermez) */
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 150px; padding: 24px 16px; text-align: center; color: var(--c-mute, #64748b); }
.empty-state .empty-ico { width: 48px; height: 48px; opacity: .9; }
.empty-state p { margin: 0; font-size: .9rem; }
.lb-loading { display: flex; align-items: center; justify-content: center; min-height: 150px; }
/* Sitenin tek spinner'ı: butonlardaki .is-loading halkasıyla aynı (kalın 2px halka, üstte koyu parça, .7s) */
.spinner { display: inline-block; width: 24px; height: 24px; flex: none; border: 2px solid var(--c-line-strong, #cbd5e1); border-top-color: var(--c-navy, #1e3a8a); border-radius: 50%; animation: xt-spin .7s linear infinite; }
@keyframes xt-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2s; } }

/* Kart başlığı türleri: varsayılan .card-title üst şeritli ve büyük harflidir (ana bölümler: yenilemeler, faturalar vb.).
   .card--plain ikincil/araç kutuları içindir: üst şerit yok, sade başlık, ince alt çizgi. */
.card.card--plain { border: 1px solid var(--nf-line); }   /* tek tip: üst şerit yok, her yanda ince kenarlık */
.card.card--plain > .card-title,
.xc-content .card.card--plain > .card-title { background: transparent; color: var(--nf-ink); border-top: 0; border-bottom: 1px solid var(--nf-line); padding-top: 14px; padding-bottom: 12px; }
.card.card--plain > .card-title h2, .card.card--plain > .card-title h3, .card.card--plain > .card-title h4,
.xc-content .card.card--plain > .card-title :is(h2, h3, h4) { color: var(--nf-ink); font-size: .98rem; font-weight: 700; letter-spacing: 0; text-transform: none; }
.card.card--plain > .card-title a,
.xc-content .card.card--plain > .card-title a { color: var(--nf-info); font-weight: 600; }

/* Kök parola: sayfada yalnızca nokta; göz ikonu satır içi parola onayı formunu açar */
.sd-pass-wrap { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sd-pass-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
.sd-pass-form[hidden], .sd-pass-form [hidden] { display: none !important; }
.sd-pass-form input { height: 34px; min-width: 0; width: 180px; padding: 0 10px; font: inherit; font-size: .85rem; border: 1px solid var(--nf-line); background: #fff; }
.sd-pass-form .field-error { flex: 1 0 100%; color: var(--nf-danger); font-size: .8rem; }

/* Panel istatistik kutuları ve hizmet ayrıntı listesi: aynı tek tip çerçeve, üst şerit yok */
.card.stat, .xc-content .card.stat { border: 1px solid var(--nf-line); }
.sd-dl > div:last-child, .sd-dl > div:nth-last-child(2):nth-child(odd) { border-bottom: 0; }
@media (max-width: 560px) { .sd-dl > div:nth-last-child(2):nth-child(odd) { border-bottom: 1px solid var(--c-line, #e2e8f0); } }

/* Yan yana kutuda (sd-pair) kart komşusunun yüksekliğine uzar: ayrıntı satırları boşluğu eşit paylaşır, alt kısımda boş bant kalmaz */
.sd-pair > .card:has(> .sd-dl) { display: flex; flex-direction: column; }
.sd-pair > .card > .sd-dl { flex: 1 1 auto; align-content: stretch; }

/* Hızlı erişim kutuları: üst şerit yok, tek tip ince kenarlık */
.cl-quick-tile, .xc-content .cl-quick-tile { border: 1px solid var(--nf-line); }
.cl-quick-tile:hover, .xc-content .cl-quick-tile:hover { border-color: var(--nf-info); }

/* Hizmetlerim: kategori sekmeleri ve bölüm başlıkları (sunucular / hosting / alan adları) */
.cl-cats { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 20px; }
.cl-cat-chip { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; background: #fff; border: 1px solid var(--nf-line); color: var(--nf-ink); font-weight: 600; font-size: .9rem; text-decoration: none; }
.cl-cat-chip:hover { border-color: var(--nf-info); color: var(--nf-info); }
.cl-cat-chip i { color: var(--nf-info); }
.cl-cat-chip b { min-width: 22px; padding: 1px 7px; text-align: center; font-size: .78rem; background: rgba(37, 99, 235, .08); color: var(--nf-info); }
.cl-cat-chip.is-empty { opacity: .6; }
.cl-cat { margin: 0 0 28px; scroll-margin-top: 90px; }
.cl-cat-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin: 0 0 12px; padding-bottom: 10px; border-bottom: 1px solid var(--nf-line); }
.cl-cat-head h2 { margin: 0; font-size: 1.05rem; font-weight: 700; color: var(--nf-ink); display: inline-flex; align-items: center; gap: 8px; }
.cl-cat-head h2 i { color: var(--nf-info); }
.cl-cat-count { padding: 1px 8px; font-size: .78rem; font-weight: 700; background: rgba(37, 99, 235, .08); color: var(--nf-info); }
.cl-cat-links { display: inline-flex; gap: 16px; font-size: .88rem; font-weight: 600; }
.cl-cat-links a { color: var(--nf-info); text-decoration: none; }
.cl-cat-links a:hover { text-decoration: underline; }
.cl-cat-empty { padding: 18px 16px; background: #fff; border: 1px dashed var(--nf-line); color: #64748b; font-size: .9rem; text-align: center; }
button.cl-cat-chip { font: inherit; font-weight: 600; font-size: .9rem; cursor: pointer; }

/* Hizmet kutusu: üst ve sağ kenar durum rengini taşır (aktif yeşil, süresi dolmuş/bekleyen turuncu, askıda/kötüye kullanım kırmızı).
   Seçici bilerek yüksek özgüllükte: modül/tema CSS'indeki .cl-srv border kurallarını (yükleme sırasından bağımsız) ezer. */
article.cl-srv.cl-srv { --st: #94a3b8; border-top: 2px solid var(--st); border-right: 2px solid var(--st); }
article.cl-srv.cl-srv:hover { border-top-color: var(--st); border-right-color: var(--st); }
article.cl-srv.cl-srv.is-active { --st: #059669; }
article.cl-srv.cl-srv.is-expired, article.cl-srv.cl-srv.is-pending { --st: #d97706; }
article.cl-srv.cl-srv.is-abuse, article.cl-srv.cl-srv.is-suspended { --st: #dc2626; }
article.cl-srv.cl-srv.is-cancelled, article.cl-srv.cl-srv.is-terminated { --st: #94a3b8; }
/* Parola onayı + düğme: yan yana, tek renk (hizmet detay kartları) */
.xc-content .sd-pwbar, .card .sd-pwbar { display: flex; flex-direction: row; align-items: stretch; gap: 0; max-width: none; margin: 12px 0 0; }
.xc-content .sd-pwbar input, .card .sd-pwbar input { flex: 1 1 auto; min-width: 0; height: 42px; border: 1px solid var(--c-line-strong, #cbd5e1); border-right: 0; border-radius: 6px 0 0 6px; background: #fff; padding: 0 12px; }
.xc-content .sd-pwbar .btn, .card .sd-pwbar .btn { height: 42px; margin: 0; padding: 0 18px; white-space: nowrap; border-radius: 0 6px 6px 0; background: var(--c-blue, #1E3A8A); border: 1px solid var(--c-blue, #1E3A8A); color: #fff; }
.xc-content .sd-pwbar .btn:hover, .card .sd-pwbar .btn:hover { filter: brightness(1.1); }
.sd-panel-go { margin-bottom: 4px; }
@media (max-width: 600px) { .xc-content .sd-pwbar, .card .sd-pwbar { flex-wrap: wrap; } .xc-content .sd-pwbar input, .card .sd-pwbar input { flex-basis: 100%; border-right: 1px solid var(--c-line-strong, #cbd5e1); border-radius: 6px; } .xc-content .sd-pwbar .btn, .card .sd-pwbar .btn { flex: 1 1 100%; margin-top: 8px; border-radius: 6px; } }
/* Hizmet bilgileri: satırlar arasında çizgi yok; yalnız başlık ile satırlar arasında çizgi */
.xc-content .sd-dl > div, .sd-dl > div { border-bottom: 0; }
.card > .card-title + .sd-dl { border-top: 1px solid var(--c-line, #e2e8f0); }
.sd-dl .sd-dl-go { display: flex; align-items: center; justify-content: flex-start; }
.sd-ns-hint { margin: 0 0 12px; padding: 10px 12px; border: 1px solid var(--c-line, #e2e8f0); border-left: 3px solid var(--nf-info, #2563eb); border-radius: 6px; background: var(--c-ice, #f1f5f9); font-size: .9rem; line-height: 1.45; }
.sd-ns-hint i { color: var(--nf-info, #2563eb); margin-right: 6px; }
.sd-ns-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--c-line, #e2e8f0); }
.sd-ns-row:last-child { border-bottom: 0; }
.sd-ns-row span { color: var(--c-mute, #64748b); font-size: .85rem; }
.sd-ns-row code { background: var(--c-ice, #f1f5f9); padding: 2px 8px; border-radius: 4px; }
/* Hizmet sayfası: kutular birbirine eşitlenmez, her biri kendi içeriği kadar yüksek olur */
.xc-content .sd-pair:not(.sd-pair-power) { align-items: start; }
.sd-pair:not(.sd-pair-power) > .card:has(> .sd-dl) { display: block; }
/* Nameserver açıklaması: kutusuz düz metin */
.sd-ns-hint { margin: 0 0 12px; padding: 0; border: 0; border-radius: 0; background: none; color: var(--c-mute, #64748b); font-size: .9rem; line-height: 1.5; }
.sd-ns-hint i { display: none; }
/* Sunucu: güvenlik + güç işlemleri yan yana (eklentiler kartı kaldırıldı) */
.xc-content .sd-pair-power { grid-template-columns: 1fr; }
.xc-content .sd-pair-power .sd-stack { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: none; }
@media (max-width: 760px) { .xc-content .sd-pair-power .sd-stack { grid-template-columns: 1fr; } }
.sd-pwbar + small.text-muted { display: block; margin-top: 8px; }
.sd-usage { margin-bottom: 20px; }
.sd-usage-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 32px; }
.sd-usage-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.sd-usage-head span { font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--c-mute, #64748b); }
.sd-usage-head small { color: var(--c-mute, #64748b); font-weight: 500; }
@media (max-width: 640px) { .sd-usage-grid { grid-template-columns: 1fr; } }
/* Kaynak kutuları soldaki karta göre uzamaz; kendi içeriği kadar yüksek kalır */
.xc-content .sd-pair > .sd-res { align-self: start; grid-auto-rows: minmax(118px, auto); }
/* Hosting kontrol paneli logoları (cPanel / Plesk / DirectAdmin): kutuda ve hizmet sayfasında */
.sd-os-logo--cpanel, .sd-os-logo--plesk, .sd-os-logo--directadmin { -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: left center; mask-position: left center; -webkit-mask-size: contain; mask-size: contain; }
.sd-os-logo--cpanel { -webkit-mask-image: url(../themes/default/images/panels/cpanel.svg); mask-image: url(../themes/default/images/panels/cpanel.svg); }
.sd-os-logo--plesk { -webkit-mask-image: url(../themes/default/images/panels/plesk.svg); mask-image: url(../themes/default/images/panels/plesk.svg); }
.sd-os-logo--directadmin { -webkit-mask-image: url(../themes/default/images/panels/directadmin.svg); mask-image: url(../themes/default/images/panels/directadmin.svg); }
.cl-os-logo.sd-os-logo.sd-os-logo--cpanel { width: 70px; height: 20px; }

/* Hata/uyarı toast'ı: daha uzun kalır; birden çok satır alt alta */
.toast-line { display: block; }
.toast-line + .toast-line { margin-top: 4px; }
.toast.toast-sticky { animation: nf-in .28s ease-out both, nf-out .3s ease-in 12s forwards; }
@media (prefers-reduced-motion: reduce) { .toast.toast-sticky { animation: nf-out .01s linear 12s forwards; } }
