@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* ===== TASARIM TOKEN'LARI ===== */
:root {
    /* Navy skalası */
    --navy-950: #060b1e;
    --navy-900: #0a1128;
    --navy-800: #0f1a3d;
    --navy-700: #16245a;
    --navy-600: #1e3178;
    --navy-500: #2a4198;
    --navy-400: #4563b8;
    --navy-300: #7089cf;
    --navy-200: #a8b8e0;
    --navy-100: #d5dcf0;
    --navy-50:  #eef1f9;

    /* Teal skalası */
    --teal-700: #147074;
    --teal-600: #188c93;
    --teal-500: #1dafb8;
    --teal-400: #3cc8d2;
    --teal-300: #6eddd9;
    --teal-200: #a8ece8;
    --teal-100: #d3f6f3;
    --teal-50:  #ecfbfa;

    /* Ink (nötr metin/zemin) skalası */
    --ink-900: #0b1020;
    --ink-700: #2d3657;
    --ink-500: #5b6887;
    --ink-400: #8993b0;
    --ink-300: #b8c0d4;
    --ink-200: #dde2ec;
    --ink-100: #eef1f7;
    --ink-50:  #f7f8fb;

    /* Anlam renkleri */
    --ok:   #2db38a;
    --warn: #e8a63a;
    --err:  #de5463;

    /* Köşe yarıçapları */
    --r-sm:   4px;
    --r-md:   8px;
    --r-lg:   12px;
    --r-xl:   16px;
    --r-2xl:  20px;
    --r-pill: 999px;

    /* Legacy uyumluluk takma adları */
    --primary:       var(--navy-900);
    --primary-hover: var(--navy-700);
    --text-color:    var(--ink-900);
    --text-muted:    var(--ink-500);
    --accent:        var(--ok);
    --danger:        var(--err);
}

/* ===== TEMEL ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

body {
    background: var(--ink-50);
    color: var(--ink-900);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ===== SUNUCU DURUM GÖSTERGESİ ===== */
#nf-server-status {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border: 1px solid var(--ink-200);
    border-radius: var(--r-pill);
    padding: 7px 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    color: var(--ink-500);
    font-family: 'Plus Jakarta Sans', sans-serif;
    z-index: 9999;
    box-shadow: 0 2px 12px rgba(10, 17, 40, 0.08);
    transition: border-color 0.4s;
    user-select: none;
    cursor: default;
}

#nf-server-status.online {
    border-color: rgba(45, 179, 138, 0.5);
}

#nf-server-status.offline {
    border-color: rgba(222, 84, 99, 0.5);
}

#nf-server-led {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--ink-300);
    flex-shrink: 0;
    transition: background 0.3s;
}

#nf-server-status.online #nf-server-led {
    background: var(--ok);
    box-shadow: 0 0 8px var(--ok);
    animation: nf-pulse 2s infinite;
}

#nf-server-status.offline #nf-server-led {
    background: var(--err);
    box-shadow: 0 0 8px var(--err);
}

@keyframes nf-pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.4; }
}

/* ===== KART (eski glass-panel'in yerine) ===== */
.glass-panel,
.card {
    background: white;
    border: 1px solid var(--ink-200);
    border-radius: var(--r-lg);
    box-shadow: 0 1px 4px rgba(10, 17, 40, 0.06);
}

/* ===== GİRİŞ EKRANI ===== */
.login-wrapper {
    width: 100%;
    max-width: 480px;
    padding: 20px;
}

.login-box {
    padding: 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    background: white;
    border: 1px solid var(--ink-200);
    border-radius: var(--r-xl);
    box-shadow: 0 4px 24px rgba(10, 17, 40, 0.08);
}

.login-header h1 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--navy-900);
    margin-bottom: 8px;
}

.login-header p {
    color: var(--ink-500);
    font-size: 0.95rem;
    margin-bottom: 30px;
}

/* ===== FORM ===== */
.input-group {
    position: relative;
    margin-bottom: 20px;
    text-align: left;
}

.input-group i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ink-400);
}

.input-group input {
    width: 100%;
    padding: 14px 14px 14px 45px;
    background: white;
    border: 1px solid var(--ink-200);
    color: var(--ink-900);
    border-radius: var(--r-lg);
    font-size: 1rem;
    outline: none;
    transition: border 0.2s, box-shadow 0.2s;
}

.input-group input::placeholder {
    color: var(--ink-400);
}

.input-group input:focus {
    border-color: var(--navy-600);
    box-shadow: 0 0 0 3px rgba(30, 49, 120, 0.12);
}

/* ===== BUTONLAR ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 18px;
    border: none;
    border-radius: var(--r-lg);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
    text-decoration: none;
    white-space: nowrap;
}

/* Primary — lacivert dolgu */
.btn-primary {
    background: var(--navy-900);
    color: white;
}
.btn-primary:hover {
    background: var(--navy-700);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(10, 17, 40, 0.2);
}

/* Teal — onay / başlat */
.btn-teal {
    background: var(--teal-600);
    color: white;
}
.btn-teal:hover {
    background: var(--teal-700);
    transform: translateY(-1px);
}

/* Outline */
.btn-outline {
    background: white;
    color: var(--navy-900);
    border: 1.5px solid var(--ink-300);
}
.btn-outline:hover {
    border-color: var(--navy-600);
    background: var(--ink-50);
}

/* Ghost */
.btn-ghost {
    background: transparent;
    color: var(--ink-700);
    width: auto;
}
.btn-ghost:hover {
    background: var(--ink-100);
}

/* Danger */
.btn-danger {
    background: var(--err);
    color: white;
}
.btn-danger:hover {
    background: #c7404f;
}

/* AI Rapor */
.btn-ai-report {
    background: linear-gradient(90deg, #F59E0B, #EF4444);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: var(--r-md);
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
    transition: transform 0.2s;
}
.btn-ai-report:hover { transform: scale(1.04); }

/* ===== BAĞLANTI & YARDIMCI ===== */
.forgot-link {
    display: block;
    margin-top: 15px;
    color: var(--ink-500);
    font-size: 0.9rem;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s;
}
.forgot-link:hover { color: var(--navy-900); }

#forgotSection {
    display: none;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--ink-200);
    text-align: left;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ===== PANEL YERLEŞİMİ ===== */
.dashboard-layout {
    display: flex;
    width: 100%;
    height: 100%;
}

/* ===== SIDEBAR ===== */
.sidebar {
    width: 260px;
    height: 100vh;
    padding: 30px;
    background: var(--navy-900);
    border-right: none;
    flex-shrink: 0;
}

.sidebar .logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
    margin-bottom: 40px;
}

.nav-item {
    padding: 11px 14px;
    margin-bottom: 4px;
    border-radius: var(--r-md);
    color: var(--navy-200);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background 0.2s, color 0.2s;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.07);
    color: white;
}

.nav-item.active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-left: 3px solid var(--teal-300);
    padding-left: 11px;
}

.nav-item.active i,
.nav-item.active svg {
    color: var(--teal-300);
}

/* ===== ANA İÇERİK ===== */
.main-content {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
    background: var(--ink-50);
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--ink-900);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--teal-600);
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
    font-size: 1.1rem;
    color: white;
}

/* ===== STAT KARTLARI ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: white;
    border: 1px solid var(--ink-200);
    border-radius: var(--r-lg);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.stat-card h3 {
    color: var(--ink-500);
    font-size: 0.9rem;
    font-weight: 500;
}

.stat-card .value {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--ink-900);
}

/* ===== TABLO ===== */
.recent-activity {
    padding: 30px;
    background: white;
    border: 1px solid var(--ink-200);
    border-radius: var(--r-lg);
}

.recent-activity h3 {
    margin-bottom: 20px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--ink-900);
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th,
table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--ink-200);
}

table th {
    color: var(--ink-500);
    font-weight: 600;
    font-size: 0.85rem;
    background: var(--ink-50);
}

table td {
    color: var(--ink-700);
    font-size: 0.9rem;
}

table tr:last-child td {
    border-bottom: none;
}

/* ===== BADGE'LER ===== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: var(--r-pill);
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.4;
}

/* Eski isimler (geriye dönük uyumluluk) */
.badge.danger,
.badge.error,
.badge-err {
    background: #fbe2e5;
    color: var(--err);
}

.badge.success,
.badge-ok {
    background: #e0f5ee;
    color: var(--ok);
}

/* Yeni token bazlı badge'ler */
.badge-warn {
    background: #fbf0db;
    color: #b37a10;
}

.badge-info {
    background: var(--teal-100);
    color: var(--teal-700);
}

.badge-neutral {
    background: var(--ink-100);
    color: var(--ink-500);
}

.badge-navy {
    background: var(--navy-900);
    color: white;
}

/* ===== MOBİL RESPONSIVE ===== */
.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 1001;
    background: var(--navy-900);
    border: none;
    color: white;
    width: 42px;
    height: 42px;
    border-radius: var(--r-md);
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(10, 17, 40, 0.25);
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .dashboard-layout { flex-direction: column; }

    .sidebar {
        position: fixed;
        top: 0; left: 0;
        width: 260px;
        height: 100vh;
        z-index: 1000;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        padding-top: 60px;
    }
    .sidebar.open { transform: translateX(0); }

    .sidebar-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(10, 17, 40, 0.5);
        z-index: 999;
    }
    .sidebar-backdrop.open { display: block; }

    .main-content {
        padding: 60px 16px 24px;
        width: 100%;
    }

    .header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
        margin-bottom: 20px;
    }
    .header h2 { font-size: 1.3rem; }

    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .stat-card .value { font-size: 1.6rem; }
}
