/* ============================================================
   RDM - Özel Stiller
   Kara Kuvvetleri Komutanlığı - Kurumsal Tema
   ============================================================ */

/* ---------- Renk Paleti ------------------------------------ */
:root {
    --kkk-primary:    #1a3055;   /* Lacivert */
    --kkk-secondary:  #2e5f8a;   /* Orta mavi */
    --kkk-accent:     #c8a951;   /* Altın */
    --kkk-dark:       #0d1f36;   /* Koyu lacivert */
    --kkk-light:      #f0f4f8;   /* Açık arka plan */
    --kkk-success:    #1e6e3e;
    --kkk-danger:     #8b1a1a;
    --kkk-warning:    #7d5a00;
}

/* ---------- Genel ------------------------------------------ */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--kkk-light);
    color: #2c3e50;
    min-height: 100vh;
}

.text-military { color: var(--kkk-primary) !important; }
.bg-military   { background-color: var(--kkk-primary) !important; }
.border-military { border-color: var(--kkk-accent) !important; }

/* ---------- Navbar ----------------------------------------- */
.navbar-military {
    background: linear-gradient(135deg, var(--kkk-dark) 0%, var(--kkk-primary) 100%);
    border-bottom: 3px solid var(--kkk-accent);
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.navbar-military .navbar-brand {
    color: #fff !important;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.5px;
}

.navbar-military .nav-link {
    color: rgba(255,255,255,0.85) !important;
    transition: color 0.2s;
}

.navbar-military .nav-link:hover,
.navbar-military .nav-link.active {
    color: var(--kkk-accent) !important;
}

.navbar-military .navbar-toggler {
    border-color: rgba(200,169,81,0.5);
}

/* ---------- Header / Hero ---------------------------------- */
.site-header {
    background: linear-gradient(160deg, var(--kkk-dark) 0%, var(--kkk-primary) 60%, var(--kkk-secondary) 100%);
    border-bottom: 4px solid var(--kkk-accent);
    color: #fff;
    padding: 1.5rem 0;
}

.site-header .header-logo {
    max-width: 80px;
    max-height: 100px;
}

.site-header h1 {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin: 0;
    line-height: 1.4;
}

.site-header .subtitle {
    font-size: 0.85rem;
    color: var(--kkk-accent);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-top: 0.2rem;
}

/* ---------- Kartlar ---------------------------------------- */
.card {
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    transition: box-shadow 0.2s;
}

.card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

.card-header-military {
    background: linear-gradient(135deg, var(--kkk-primary), var(--kkk-secondary));
    color: #fff;
    border-radius: 0.5rem 0.5rem 0 0 !important;
    padding: 0.9rem 1.25rem;
    font-weight: 600;
    border-bottom: 2px solid var(--kkk-accent);
}

/* ---------- Butonlar --------------------------------------- */
.btn-military {
    background: linear-gradient(135deg, var(--kkk-primary), var(--kkk-secondary));
    color: #fff;
    border: none;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: all 0.2s;
}

.btn-military:hover {
    background: linear-gradient(135deg, var(--kkk-dark), var(--kkk-primary));
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26,48,85,0.4);
}

.btn-accent {
    background: linear-gradient(135deg, var(--kkk-accent), #a88930);
    color: var(--kkk-dark);
    border: none;
    font-weight: 700;
    transition: all 0.2s;
}

.btn-accent:hover {
    background: linear-gradient(135deg, #d4b56a, var(--kkk-accent));
    color: var(--kkk-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(200,169,81,0.4);
}

/* ---------- KVKK Modal ------------------------------------- */
#kvkkModal .modal-header {
    background: linear-gradient(135deg, var(--kkk-primary), var(--kkk-secondary));
    color: #fff;
    border-bottom: 2px solid var(--kkk-accent);
}

#kvkkModal .modal-body {
    max-height: 55vh;
    overflow-y: auto;
    font-size: 0.9rem;
    line-height: 1.7;
}

#kvkkModal .modal-footer {
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

/* ---------- Test Formu ------------------------------------- */
.test-question-card {
    border-left: 4px solid var(--kkk-primary);
    margin-bottom: 1.25rem;
}

.test-question-card .question-number {
    background: var(--kkk-primary);
    color: #fff;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.likert-option {
    cursor: pointer;
    transition: all 0.15s;
    border: 2px solid #dee2e6;
    border-radius: 0.4rem;
    padding: 0.4rem 0.6rem;
    user-select: none;
}

.likert-option:hover {
    border-color: var(--kkk-secondary);
    background: #e8f0f8;
}

.likert-option input[type="radio"] { display: none; }
.likert-option.selected {
    border-color: var(--kkk-primary);
    background: var(--kkk-primary);
    color: #fff;
}

.yn-btn {
    min-width: 100px;
    font-weight: 600;
}

/* ---------- Progress Bar ----------------------------------- */
.test-progress {
    height: 8px;
    border-radius: 4px;
    background: #dee2e6;
}

.test-progress .progress-bar {
    background: linear-gradient(90deg, var(--kkk-secondary), var(--kkk-accent));
    border-radius: 4px;
    transition: width 0.4s ease;
}

/* ---------- Admin Panel ------------------------------------ */
.admin-sidebar {
    background: linear-gradient(180deg, var(--kkk-dark) 0%, var(--kkk-primary) 100%);
    min-height: calc(100vh - 60px);
    width: 260px;
    flex-shrink: 0;
}

.admin-sidebar .sidebar-brand {
    padding: 1.2rem 1.2rem 0.8rem;
    border-bottom: 1px solid rgba(200,169,81,0.3);
    color: var(--kkk-accent);
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.admin-sidebar .nav-link {
    color: rgba(255,255,255,0.8);
    padding: 0.65rem 1.2rem;
    border-radius: 0;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.admin-sidebar .nav-link:hover {
    color: #fff;
    background: rgba(255,255,255,0.08);
    border-left-color: var(--kkk-accent);
}

.admin-sidebar .nav-link.active {
    color: var(--kkk-accent);
    background: rgba(200,169,81,0.12);
    border-left-color: var(--kkk-accent);
    font-weight: 600;
}

.admin-sidebar .nav-section-title {
    color: var(--kkk-accent);
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 1.1rem 1.2rem 0.25rem;
    border-top: 1px solid rgba(255,255,255,0.08);
    margin-top: 0.25rem;
}

.admin-main {
    flex: 1;
    overflow-x: hidden;
    padding: 1.5rem;
    background: var(--kkk-light);
}

/* ---------- İstatistik Kartları ---------------------------- */
.stat-card {
    border-left: 4px solid var(--kkk-accent);
    border-radius: 0.5rem;
}

.stat-card .stat-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    opacity: 0.85;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--kkk-primary);
    line-height: 1;
}

.stat-card .stat-label {
    font-size: 0.8rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ---------- Tablo ------------------------------------------ */
.table-military thead th {
    background: var(--kkk-primary);
    color: #fff;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.3px;
    border: none;
    white-space: nowrap;
}

.table-military tbody tr:hover {
    background: #e8f0f8;
}

/* ---------- Risk Seviyeleri -------------------------------- */
.risk-badge-DUSUK  { background-color: #198754 !important; }
.risk-badge-ORTA   { background-color: #fd7e14 !important; }
.risk-badge-YUKSEK { background-color: #dc3545 !important; }

/* ---------- Birlik Ağacı ----------------------------------- */
.unit-tree-item {
    border-left: 2px solid #dee2e6;
    padding-left: 1rem;
    margin-left: 1rem;
    margin-bottom: 0.3rem;
}

.unit-tree-item:last-child {
    border-left-color: transparent;
}

/* ---------- Login Sayfası ---------------------------------- */
.login-card {
    max-width: 420px;
    width: 100%;
}

.login-logo {
    max-height: 80px;
}

/* ---------- Footer ----------------------------------------- */
.site-footer {
    background: var(--kkk-dark);
    color: rgba(255,255,255,0.6);
    border-top: 2px solid var(--kkk-accent);
    font-size: 0.82rem;
    padding: 1rem 0;
    margin-top: auto;
}

/* ---------- Responsive Düzenlemeler ----------------------- */
@media (max-width: 768px) {
    .admin-sidebar {
        width: 100%;
        min-height: auto;
    }

    .site-header h1 {
        font-size: 1.1rem;
    }

    .stat-card .stat-value {
        font-size: 1.5rem;
    }
}

/* ---------- Baskı ------------------------------------------ */
@media print {
    .admin-sidebar, .navbar, .no-print { display: none !important; }
    .admin-main { padding: 0; }
    body { background: #fff; }
}
