/**
 * Public Status Page - Hosting Status tarzı
 */
:root {
    --status-green: #28a745;
    --status-red: #dc3545;
    --status-yellow: #ffc107;
    --status-gray: #dee2e6;
    --status-blue: #0d6efd;
    --status-teal: #20c997;
}

.status-page {
    background: linear-gradient(160deg, #eef2f7 0%, #f8f9fb 40%, #eceff4 100%);
    min-height: 100vh;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: #333;
    position: relative;
}
.status-page::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(0,0,0,.04) 1px, transparent 0);
    background-size: 24px 24px;
    pointer-events: none;
    z-index: 0;
}
.status-page > * { position: relative; z-index: 1; }
[data-bs-theme="dark"] .status-page {
    background: linear-gradient(160deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
}
[data-bs-theme="dark"] .status-page::before {
    background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,.04) 1px, transparent 0);
}

/* Geniş layout */
.status-container {
    max-width: 1280px;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
    margin-left: auto;
    margin-right: auto;
}

.status-header {
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid #e8eaed;
    padding: 1rem 0;
    box-shadow: 0 2px 12px rgba(0,0,0,.05);
}
[data-bs-theme="dark"] .status-header {
    background: rgba(30,41,59,.95);
    border-color: #334155;
}

.status-brand {
    display: flex;
    align-items: center;
    gap: .85rem;
}
.status-brand__logo {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: linear-gradient(135deg, #0d6efd, #6610f2);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(13,110,253,.3);
}
.status-brand__logo-img {
    max-height: 48px;
    max-width: 180px;
    object-fit: contain;
    display: block;
}
.status-brand__name {
    font-weight: 700;
    font-size: 1.1rem;
    color: #2c3e50;
    line-height: 1.2;
}
[data-bs-theme="dark"] .status-brand__name { color: #f1f5f9; }
.status-brand__sub {
    font-size: .75rem;
    color: #6c757d;
    font-weight: 400;
}

.status-header__live {
    font-size: .75rem;
    color: #6c757d;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}
.live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--status-green);
    animation: pulse-live 2s infinite;
}
@keyframes pulse-live {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(40,167,69,.5); }
    50% { opacity: .8; box-shadow: 0 0 0 6px rgba(40,167,69,0); }
}

.status-main {
    padding-top: 1.5rem;
    padding-bottom: 2.5rem;
}

/* Hero panel */
.hero-panel {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 16px rgba(0,0,0,.06);
    border: 1px solid #e8eaed;
    margin-bottom: 1.5rem;
    overflow: hidden;
}
[data-bs-theme="dark"] .hero-panel {
    background: #1e293b;
    border-color: #334155;
}
.hero-panel.hero-status--operational { border-top: 4px solid var(--status-green); }
.hero-panel.hero-status--slow { border-top: 4px solid var(--status-yellow); }
.hero-panel.hero-status--down { border-top: 4px solid var(--status-red); }
.hero-panel.hero-status--partial { border-top: 4px solid var(--status-yellow); }
.hero-panel.hero-status--maintenance { border-top: 4px solid var(--status-blue); }
.hero-panel.hero-status--tracking { border-top: 4px solid var(--status-blue); }
.hero-panel.hero-status--major { border-top: 4px solid var(--status-red); }

/* Özet istatistik kartları */
.stat-card {
    background: #fff;
    border-radius: 10px;
    padding: 1rem 1.1rem;
    display: flex;
    align-items: center;
    gap: .85rem;
    box-shadow: 0 2px 10px rgba(0,0,0,.06);
    border: 1px solid #e8eaed;
    height: 100%;
    transition: transform .15s, box-shadow .15s;
}
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,.08);
}
[data-bs-theme="dark"] .stat-card {
    background: #1e293b;
    border-color: #334155;
}
.stat-card__icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}
.stat-card__icon--blue { background: #e7f1ff; color: #0d6efd; }
.stat-card__icon--green { background: #d4edda; color: var(--status-green); }
.stat-card__icon--red { background: #f8d7da; color: var(--status-red); }
.stat-card__icon--teal { background: #d1f2eb; color: var(--status-teal); }
.stat-card__value {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.1;
}
.stat-card__label {
    font-size: .75rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: .3px;
    margin-top: .15rem;
}

/* Kutulu bölümler */
.status-section--boxed {
    background: #fff;
    border-radius: 10px;
    padding: 1.15rem 1.25rem;
    box-shadow: 0 2px 10px rgba(0,0,0,.05);
    border: 1px solid #e8eaed;
}
[data-bs-theme="dark"] .status-section--boxed {
    background: #1e293b;
    border-color: #334155;
}

/* Hero durum */
.hero-status {
    text-align: center;
    padding: 2rem 1rem 1.75rem;
}
.hero-status__icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 1rem;
}
.hero-status--operational .hero-status__icon { background: #d4edda; color: var(--status-green); }
.hero-status--slow .hero-status__icon { background: #fff3cd; color: #856404; }
.hero-status--down .hero-status__icon { background: #f8d7da; color: var(--status-red); }
.hero-status--partial .hero-status__icon { background: #fff3cd; color: #856404; }
.hero-status--maintenance .hero-status__icon { background: #cce5ff; color: var(--status-blue); }
.hero-status--tracking .hero-status__icon { background: #cce5ff; color: var(--status-blue); }
.hero-status--major .hero-status__icon { background: #f8d7da; color: var(--status-red); }

.hero-status__title {
    font-size: 1.35rem;
    font-weight: 600;
    margin: 0;
    color: #2c3e50;
}
[data-bs-theme="dark"] .hero-status__title { color: #f1f5f9; }

.hero-status__meta {
    font-size: .8rem;
    color: #6c757d;
    margin: .5rem 0 0;
}

/* Bölüm başlıkları */
.status-section { margin-bottom: 1.75rem; }
.status-section__title {
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 2px solid var(--status-blue);
    display: inline-block;
    padding-bottom: .35rem;
    margin-bottom: 1rem;
}
[data-bs-theme="dark"] .status-section__title { color: #e2e8f0; }

/* Bilgi kutuları */
.info-box {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    padding: .85rem 1rem;
    border-radius: 6px;
    font-size: .9rem;
}
.info-box > i { font-size: 1.1rem; margin-top: .1rem; flex-shrink: 0; }
.info-box--success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.info-box--success > i { color: var(--status-green); }
.info-box--info { background: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }
.info-box--info > i { color: #17a2b8; }
.info-box--warning { background: #fff3cd; color: #856404; border: 1px solid #ffeeba; }

/* Kategoriler panel */
.categories-panel {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 8px rgba(0,0,0,.07);
    border: 1px solid #e3e6ea;
    overflow: hidden;
}
[data-bs-theme="dark"] .categories-panel {
    background: #1e293b;
    border-color: #334155;
}

.status-section--categories { margin-bottom: 1.75rem; }

.categories-bar {
    background: #f0f2f5;
    padding: .75rem 1.25rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    border-bottom: 1px solid #e3e6ea;
}
[data-bs-theme="dark"] .categories-bar {
    background: #334155;
    border-color: #475569;
}

.categories-bar__title {
    font-size: .95rem;
    font-weight: 700;
    margin: 0;
    color: #343a40;
}
[data-bs-theme="dark"] .categories-bar__title { color: #f1f5f9; }

.status-legend {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1.1rem;
    font-size: .7rem;
    color: #6c757d;
    align-items: center;
}
.status-legend span {
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: .25rem;
}
.text-teal { color: var(--status-teal) !important; }

.categories-list {
    padding: 1rem 1.25rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

.category-card {
    background: #fff;
    border-radius: 6px;
    border: 1px solid #e3e6ea;
    overflow: hidden;
}
[data-bs-theme="dark"] .category-card {
    background: #0f172a;
    border-color: #475569;
}

.category-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .85rem 1.1rem;
    background: #fff;
}
.category-card__header--static {
    cursor: default;
    user-select: auto;
}
[data-bs-theme="dark"] .category-card__header { background: #1e293b; }

.category-card__title {
    font-weight: 600;
    font-size: .9rem;
    display: flex;
    align-items: center;
    gap: .45rem;
    color: #343a40;
}
[data-bs-theme="dark"] .category-card__title { color: #e2e8f0; }

.category-card__icon { color: #6c757d; font-size: .85rem; }
.category-info { font-size: .7rem; color: #0d6efd; }

.info-icon {
    cursor: pointer;
    margin-left: 6px;
    font-size: .75rem;
    color: #0d6efd;
    vertical-align: middle;
}
.info-icon:hover { color: #0a58ca; }

.popover {
    max-width: 300px;
    font-size: 13px;
}
.popover-body {
    line-height: 1.6;
}
.popover-body a {
    color: #0d6efd;
    word-break: break-all;
}

.category-card__status {
    display: flex;
    align-items: center;
    gap: .65rem;
}
.category-status-icon { font-size: 1.15rem; }

.category-card__body {
    border-top: 1px solid #eef0f2;
    padding: 0;
    background: #fff;
}
[data-bs-theme="dark"] .category-card__body {
    border-color: #475569;
    background: #1e293b;
}

.service-item {
    padding: .9rem 1.1rem 1rem;
    border-bottom: 1px solid #f0f2f5;
}
.service-item:last-child { border-bottom: none; }
[data-bs-theme="dark"] .service-item { border-color: #334155; }

.service-item__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: .65rem;
}
.service-item__name {
    font-size: .85rem;
    font-weight: 400;
    color: #495057;
}
[data-bs-theme="dark"] .service-item__name { color: #cbd5e1; }

.service-item__uptime {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    min-width: 0;
}

.uptime-bars {
    display: flex;
    flex: 1 1 0;
    min-width: 0;
    height: 32px;
    gap: 2px;
    align-items: stretch;
}

.uptime-bar-day {
    flex: 1;
    min-width: 0;
    border-radius: 2px;
    cursor: pointer;
    transition: opacity .12s;
}
.uptime-bar-day:hover { opacity: .8; }
.uptime-bar-day.status-ok { background: var(--status-green); }
.uptime-bar-day.status-slow { background: var(--status-yellow); }
.uptime-bar-day.status-down { background: var(--status-red); }
.uptime-bar-day.status-nodata { background: var(--status-gray); }

.uptime-pct {
    flex: 0 0 auto;
    min-width: 72px;
    text-align: right;
    font-size: .85rem;
    font-weight: 600;
    white-space: nowrap;
    color: #6c757d;
}
.uptime-pct--ok { color: var(--status-green); }
.uptime-pct--warn { color: #856404; }
.uptime-pct--down { color: var(--status-red); }
.uptime-pct--tracking { color: #6c757d; font-weight: 500; font-size: .78rem; }

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: .2rem;
    padding: .18rem .55rem;
    border-radius: 999px;
    font-size: .7rem;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}
.status-badge.status-active { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.status-badge.status-watching { background: #cce5ff; color: #004085; border: 1px solid #b8daff; }
.status-badge.status-mild_slow { background: #e7f1ff; color: #0d6efd; border: 1px solid #cfe2ff; }
.status-badge.status-slow { background: #fff3cd; color: #856404; border: 1px solid #ffeeba; }
.status-badge.status-critical_slow { background: #ffe5d0; color: #c44200; border: 1px solid #ffc9a3; }
.status-badge.status-connection_error { background: #e2e3e5; color: #383d41; border: 1px solid #d6d8db; }
.status-badge.status-partial { background: #fff3cd; color: #856404; border: 1px solid #ffeeba; }
.status-badge.status-tracking { background: #cce5ff; color: #004085; border: 1px solid #b8daff; }
.status-badge.status-down { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.status-badge.status-local_timeout { background: #fff3cd; color: #856404; border: 1px solid #ffeeba; }
.status-badge.status-external_access { background: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }
.status-badge.status-maintenance { background: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }
.service-item__verify { margin-top: .2rem; line-height: 1.2; }

/* Geçmiş */
.history-card {
    background: #fff;
    border: 1px solid #e8eaed;
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: .5rem;
}
[data-bs-theme="dark"] .history-card { background: #1e293b; border-color: #334155; }

.incident-description {
    margin-top: 8px;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.6;
}
[data-bs-theme="dark"] .incident-description { color: #94a3b8; }

.incident-update {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #e8eaed;
}
[data-bs-theme="dark"] .incident-update { border-top-color: #334155; }

.incident-update__label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #9ca3af;
    margin-bottom: 4px;
}
[data-bs-theme="dark"] .incident-update__label { color: #64748b; }

.empty-monitors {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}
.empty-monitors i { font-size: 2.5rem; opacity: .4; margin-bottom: 1rem; }

/* Geçmiş sorunlar */
.status-past-incidents {
    padding-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.history-toggle-card {
    margin: 30px auto 10px;
    max-width: 900px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 18px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    transition: 0.2s ease;
    user-select: none;
}
.history-toggle-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.1);
    border-color: #bfdbfe;
}
.history-toggle-card:focus {
    outline: 2px solid #93c5fd;
    outline-offset: 2px;
}
.history-toggle-card.active {
    border-color: #93c5fd;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.1);
}
[data-bs-theme="dark"] .history-toggle-card {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}
[data-bs-theme="dark"] .history-toggle-card:hover,
[data-bs-theme="dark"] .history-toggle-card.active {
    border-color: #3b82f6;
}

.history-toggle-left {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}
.history-toggle-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eff6ff;
    color: #2563eb;
    font-size: 20px;
    flex-shrink: 0;
}
[data-bs-theme="dark"] .history-toggle-icon {
    background: rgba(37, 99, 235, 0.15);
    color: #60a5fa;
}
.history-toggle-title {
    font-weight: 700;
    color: #0f172a;
    font-size: 16px;
}
[data-bs-theme="dark"] .history-toggle-title {
    color: #f1f5f9;
}
.history-toggle-desc {
    color: #64748b;
    font-size: 13px;
    margin-top: 2px;
}
[data-bs-theme="dark"] .history-toggle-desc {
    color: #94a3b8;
}
.history-toggle-arrow {
    color: #64748b;
    transition: 0.2s ease;
    flex-shrink: 0;
    margin-left: 12px;
}
.history-toggle-card.active .history-toggle-arrow {
    transform: rotate(180deg);
}

.history-panel {
    max-width: 900px;
    margin: 0 auto 40px;
    padding-top: 4px;
}

.status-past-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: #6c757d;
    background: #fff;
    border: 1px dashed #dee2e6;
    border-radius: 8px;
}
[data-bs-theme="dark"] .status-past-empty {
    background: #1e293b;
    border-color: #334155;
    color: #94a3b8;
}
.status-past-empty i {
    font-size: 1.5rem;
    display: block;
    margin-bottom: 0.5rem;
}
.status-past-card {
    margin-bottom: 0.75rem;
}
.status-past-card__title {
    font-size: 1rem;
}
.status-past-card__desc {
    margin-bottom: 0.75rem;
}
.status-past-card__label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #9ca3af;
    margin-bottom: 0.35rem;
}
.status-past-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}
.status-past-card__services {
    margin-bottom: 0.75rem;
}
.status-past-card__dates {
    padding-top: 0.5rem;
    border-top: 1px solid #f0f0f0;
}
[data-bs-theme="dark"] .status-past-card__dates {
    border-top-color: #334155;
}

.status-footer {
    text-align: center;
    padding: 1.75rem 1rem;
    color: #adb5bd;
    font-size: .8rem;
    background: rgba(255,255,255,.6);
    border-top: 1px solid #e8eaed;
}
[data-bs-theme="dark"] .status-footer {
    background: rgba(15,23,42,.8);
    border-color: #334155;
}

/* Mobil */
@media (max-width: 991.98px) {
    .status-container { padding-left: 1rem; padding-right: 1rem; }
    .categories-list { padding: .75rem; }
    .status-legend { gap: .4rem .7rem; font-size: .65rem; }
}

@media (max-width: 767.98px) {
    .hero-status { padding: 1.5rem 0 1.25rem; }
    .hero-status__icon { width: 60px; height: 60px; font-size: 1.6rem; }
    .hero-status__title { font-size: 1.15rem; }

    .stat-card { padding: .85rem; }
    .stat-card__icon { width: 40px; height: 40px; font-size: 1rem; }
    .stat-card__value { font-size: 1.25rem; }

    .service-item__uptime { gap: 12px; }
    .uptime-bars { height: 28px; }
    .uptime-pct { min-width: 62px; font-size: .78rem; }

    .status-legend--mobile {
        justify-content: center;
        gap: .5rem .75rem;
    }
}

@media (min-width: 1400px) {
    .status-container { max-width: 1360px; }
}

/* Admin panel stilleri (aynı dosyada) */
.admin-wrapper { display: flex; min-height: 100vh; }
.admin-sidebar {
    width: 260px;
    background: #1e293b;
    color: #e2e8f0;
    flex-shrink: 0;
}
.admin-sidebar .brand {
    padding: 1.25rem;
    font-weight: 700;
    border-bottom: 1px solid #334155;
    color: #fff;
}
.admin-sidebar .nav-link {
    color: #94a3b8;
    padding: .65rem 1.25rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}
.admin-sidebar .nav-link:hover { background: #334155; color: #fff; }
.admin-sidebar .nav-link.active { background: #3b82f6; color: #fff; }
.admin-content {
    flex: 1;
    background: #f1f5f9;
    padding: 1.5rem;
    overflow-x: auto;
}
[data-bs-theme="dark"] .admin-content { background: #0f172a; }
.admin-topbar {
    background: #fff;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    margin: -1.5rem -1.5rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
[data-bs-theme="dark"] .admin-topbar { background: #1e293b; border-color: #334155; }

@media (max-width: 768px) {
    .admin-wrapper { flex-direction: column; }
    .admin-sidebar { width: 100%; }
}
