/* WireGuard Panel — tema düzeltmeleri */

/* Navbar — tüm öğeler tek satır (Kullanıcılar eklendikten sonra 900px yetmiyordu).
   DİKKAT: justify-content: center KULLANMAYIN — içerik taşınca sol uç (Özet, Sunucular)
   kaydırmayla erişilemez hale gelir. Ortalamayı ilk/son öğeye auto margin yapar:
   sığıyorsa ortalar, taşıyorsa baştan sona kaydırılabilir. */
.admin-nav__inner {
    justify-content: flex-start;
    max-width: 100%;
    margin: 0 auto;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.admin-nav__inner > :first-child {
    margin-left: auto;
}

.admin-nav__inner > :last-child {
    margin-right: auto;
}

.admin-nav__inner::-webkit-scrollbar {
    display: none;
}

.admin-nav-link {
    flex-shrink: 0;
}

@media (min-width: 992px) {
    .admin-nav__inner {
        flex-wrap: nowrap !important;
        gap: 2px;
    }

    .admin-nav-link {
        padding: 10px 12px;
        font-size: 0.8125rem;
    }
}

/* Durum kartları — link rengi ezilmesin */
.admin-status-strip a.admin-status-tile,
.admin-status-strip a.admin-status-tile:hover,
.admin-status-strip a.admin-status-tile:focus {
    color: #fff !important;
    text-decoration: none !important;
}

.admin-status-tile__value,
.admin-status-tile__label {
    color: #fff !important;
}

.admin-status-tile__icon {
    color: #fff !important;
    opacity: 0.35 !important;
}

/* Marka: logo veya metin */
.admin-brand {
    display: flex;
    align-items: center;
    min-width: 120px;
    text-decoration: none !important;
}

.admin-brand__img {
    max-height: 40px;
    max-width: 180px;
    width: auto;
    object-fit: contain;
}

.admin-brand__text {
    color: #fff !important;
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

/* Giriş sayfası marka */
.login-brand__img {
    max-height: 56px;
    max-width: 220px;
    object-fit: contain;
}

.login-brand__title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--adm-heading, #1e293b);
}

/* Sayfa üstü araç çubuğu */
.admin-page-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    margin-bottom: 1.5rem;
}

.admin-page-head__title h4 {
    margin-bottom: 0.25rem;
}

.admin-page-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.admin-back-link {
    margin-bottom: 0.5rem;
}

/* Tablo aksiyon butonları */
body.admin-shell .table .btn {
    white-space: nowrap;
}

body.admin-shell .table td.text-end,
body.admin-shell .table th.text-end {
    width: 1%;
    white-space: nowrap;
}

/* outline-warning — admin-shell’de tanımlı değil */
body.admin-shell .btn-outline-warning {
    color: #b45309 !important;
    border-color: #fcd34d !important;
    background: #fff !important;
}

body.admin-shell .btn-outline-warning:hover {
    background: #f59e0b !important;
    border-color: #f59e0b !important;
    color: #fff !important;
}

body.admin-shell .card-footer-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
    padding-top: 0.25rem;
    margin-top: 0.5rem;
    border-top: 1px solid var(--adm-border, #e2e8f0);
}

/* Canlı iş takibi */
.wg-live-pulse {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ef4444;
    margin-right: 4px;
    animation: wg-pulse 1.2s ease-in-out infinite;
    vertical-align: middle;
}

.wg-live-pulse--sm {
    width: 6px;
    height: 6px;
}

@keyframes wg-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.45; transform: scale(0.85); }
}

.wg-job-card--live {
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}

.wg-live-jobs-dock {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1040;
    pointer-events: none;
}

.wg-live-jobs-dock__inner {
    pointer-events: auto;
    max-width: 960px;
    margin: 0 auto 12px;
    padding: 10px 14px;
    background: rgba(15, 23, 42, 0.94);
    color: #f8fafc;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(148, 163, 184, 0.25);
}

.wg-live-jobs-dock__title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #94a3b8;
    margin-bottom: 8px;
}

.wg-live-jobs-dock__list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.wg-live-jobs-dock__item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: #f1f5f9;
    text-decoration: none;
    font-size: 0.8rem;
}

.wg-live-jobs-dock__item:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
}

.wg-live-jobs-dock__item code {
    color: #93c5fd;
    font-size: 0.75rem;
}

.wg-live-jobs-dock__pct {
    font-weight: 600;
    color: #fcd34d;
}

body.admin-shell .admin-footer {
    padding-bottom: 56px;
}

/* ===== Mobil iyileştirmeler ===== */
@media (max-width: 991.98px) {
    /* Sayfa içi sekmeler (ayarlar vb.): alt satıra sarmak yerine yatay kaydır */
    body.admin-shell .nav-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    body.admin-shell .nav-tabs::-webkit-scrollbar {
        display: none;
    }

    body.admin-shell .nav-tabs .nav-link {
        white-space: nowrap;
        flex-shrink: 0;
    }
}

@media (max-width: 575.98px) {
    /* iOS: 16px altındaki inputlara odaklanınca sayfa zoom yapar — engelle */
    body.admin-shell .form-control,
    body.admin-shell .form-select {
        font-size: 16px;
    }

    /* Sayfa başı araç çubuğu: butonlar satırı eşit paylaşsın */
    .admin-page-toolbar > * {
        flex: 1 1 auto;
    }

    .admin-page-toolbar form .btn,
    .admin-page-toolbar > .btn {
        width: 100%;
    }

    /* Uzun config/pre blokları kart dışına taşmasın */
    body.admin-shell pre {
        max-width: 100%;
        overflow-x: auto;
    }
}
