/*
 * Hotelil Master Panel — yalnızca ayırt edici kurallar
 * Doküman: docs/02-master-panel-iskelet.md
 *
 * Bu dosya panel temasının KOPYASI DEĞİLDİR. Tema assets/theme/style.css'ten
 * gelir (tools/sync-theme.php ile pansiyon reposundan senkronlanır).
 *
 * Panel temasının RENKLERİNE DOKUNULMAZ: sidebar açık mavi zeminde koyu yazı
 * kullanıyor (#e6f3ff / #475569). Zemini koyulaştırmak menü yazılarını okunmaz
 * yapardı ve panelde her renk değişikliğinde burayı da düzeltmek gerekirdi.
 * Bunun yerine şerit ve rozet kendi renklerini getirir, gerisi panelden ne
 * gelirse odur.
 */

/* 1) Sayfanın en üstünde ince turuncu şerit — "burası master" */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: #f59e0b;
    z-index: 2000;
    pointer-events: none;
}

/* 2) Üst barda MASTER rozeti */
.master-env-badge {
    display: inline-flex;
    align-items: center;
    background: #f59e0b;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border-radius: 999px;
    margin-left: 10px;
    white-space: nowrap;
}

.master-env-badge--local {
    background: #64748b;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
}

/* 3) Sidebar başlığında "master" ibaresi */
.brand-sub::after {
    content: " · master";
    opacity: 0.7;
}

/* Kurulum/bilgi kartları — panelin .alert desenini tamamlar */
.master-note {
    border-left: 4px solid #f59e0b;
    background: #fffbeb;
    padding: 14px 16px;
    border-radius: 10px;
    font-size: 14px;
    color: #78350f;
    margin-bottom: 18px;
}

.master-note strong {
    color: #92400e;
}

.master-checklist {
    list-style: none;
    padding: 0;
    margin: 0;
}

.master-checklist li {
    padding: 9px 0;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
}

.master-checklist li:last-child {
    border-bottom: none;
}

.master-checklist .ok {
    color: #16a34a;
}

.master-checklist .pending {
    color: #94a3b8;
}

.master-checklist .warn {
    color: #d97706;
}

/* Kopyalanacak komutlar (migrations.php) — panel temasında <pre> deseni yok */
.master-cmd {
    background: #0f172a;
    color: #e2e8f0;
    padding: 14px 16px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.7;
    overflow-x: auto;
    margin: 0;
}

/* Migrasyon hatası — tablo hücresi içinde ikincil satır */
.migration-error {
    color: #b91c1c;
    font-size: 12px;
    margin-top: 4px;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .master-env-badge {
        display: none;
    }
}

/* ---------------------------------------------------------------- durumlar --
 *
 * Kiracı ve lisans durumları için KENDİ anlamsal sınıflarımız.
 *
 * Neden panel temasınınkiler kullanılmıyor: oradaki adlar otel odası
 * sözlüğünden gelir — `.status-occupied` "dolu oda" demektir ve AMBER'dır,
 * `.status-vacant` "boş oda" demektir ve YEŞİL'dir. Kiracı durumuna
 * uygulandığında anlam ters dönüyordu: çalışan bir otel sarı, arşivlenmiş
 * bir otel yeşil görünüyordu.
 *
 * Ayrıca tema pansiyon reposundan senkronlanıyor (tools/sync-theme.php);
 * orada bir renk değişse master'ın anlamı sessizce bozulurdu.
 */

.tenant-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
    white-space: nowrap;
}

/* Çalışıyor — her şey yolunda */
.tenant-active { background: #dcfce7; color: #166534; }

/* Kuruluyor — geçici, birkaç saniye sürer */
.tenant-provisioning { background: #dbeafe; color: #1e40af; }

/* Askıda — ödeme/sözleşme sorunu, geri dönülebilir */
.tenant-suspended { background: #fef3c7; color: #92400e; }

/* Arşiv — müşteri ayrıldı, veri duruyor */
.tenant-archived { background: #f1f5f9; color: #475569; }

/* Kurulum hatası — müdahale gerekir */
.tenant-failed { background: #fee2e2; color: #dc2626; }

/* Demo kiracısı — her gece sıfırlanır */
.tenant-demo { background: #ede9fe; color: #6d28d9; }

/* --------------------------------------------------------- DNS yardımı ----
 * Otel detayında «Müşteriye verilecek DNS kayıtları» katlanır bloğu.
 * Ayar yapılmamışsa açık gelir — operatör eksiği hemen görsün.
 */
.dns-help {
    margin-top: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px 16px;
    background: #f8fafc;
}

.dns-help summary {
    cursor: pointer;
    font-weight: 600;
    color: #1e293b;
    font-size: 14px;
    list-style: none;
}

.dns-help summary::-webkit-details-marker { display: none; }
.dns-help summary::after { content: " ▾"; color: #64748b; }
.dns-help[open] summary::after { content: " ▴"; }

.dns-block {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #e2e8f0;
}

.dns-block:first-of-type { border-top: 0; }

.dns-domain {
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
    font-size: 14px;
}

.dns-table { background: #fff; }
.dns-table code { font-size: 13px; }

/* ------------------------------------------------------------ yol haritası --
 * Satır arka planı duruma göre soluk renklenir: bitmiş yeşil, yapılıyor
 * turuncu, iptal gri, fikir/planlandı mor. Tabloyu tek bakışta okunur yapar.
 */
.roadmap-bar {
    height: 12px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
    margin-top: 12px;
}

.roadmap-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #14b8a6, #0f766e);
    transition: width .3s ease;
}

.roadmap-row.roadmap-done        { background: #f0fdf4; }
.roadmap-row.roadmap-in_progress { background: #fff7ed; }
.roadmap-row.roadmap-cancelled   { background: #f1f5f9; opacity: .7; }
.roadmap-row.roadmap-idea,
.roadmap-row.roadmap-planned     { background: #f5f3ff; }

.roadmap-pri-high   { background: #fee2e2; color: #b91c1c; }
.roadmap-pri-medium { background: #dbeafe; color: #1e40af; }
.roadmap-pri-low    { background: #f1f5f9; color: #475569; }

.roadmap-status {
    padding: 6px 8px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 13px;
    background: #fff;
}

/* Deneme sürümü — mavi (nötr, "henüz ödeme yok" ama sorun da yok) */
.tenant-trial { background: #dbeafe; color: #1e40af; }

/* ------------------------------------------------------------ bağlantılar --
 *
 * Panel teması <a> için kural TANIMLAMIYOR; tarayıcı varsayılanı devreye
 * giriyordu: mor renk ve alt çizgi. Tablo içindeki otel adları bu yüzden
 * ziyaret edilmiş bağlantı gibi mor görünüyordu.
 *
 * Kural yalnızca panel içeriğine uygulanır — sidebar ve düğmeler kendi
 * renklerini korur.
 */
.panel-card a:not(.btn),
.data-table a:not(.btn) {
    color: #1e40af;
    text-decoration: none;
    font-weight: 500;
}

.panel-card a:not(.btn):hover,
.data-table a:not(.btn):hover {
    color: #172554;
    text-decoration: underline;
}

/* Ziyaret edilmiş bağlantı da aynı kalır: bir otel adının rengi, ona daha
   önce tıklanıp tıklanmadığına göre değişmemeli. */
.panel-card a:not(.btn):visited,
.data-table a:not(.btn):visited {
    color: #1e40af;
}
