/* =====================================================
   Sivas Cumhuriyet Üniversitesi Dijital Arşiv — Ana Stil
   Kurumsal, sade, mor/gradient YOK
   ===================================================== */

:root {
    --primary:      #1e3a5f;
    --primary-dark: #142843;
    --primary-light:#2b5290;
    --accent:       #c8102e;
    --bg:           #f4f5f7;
    --bg-white:     #ffffff;
    --border:       #d8dde4;
    --text:         #2c3e50;
    --text-muted:   #6c757d;
    --shadow-sm:    0 1px 4px rgba(0,0,0,.08);
    --shadow:       0 2px 10px rgba(0,0,0,.10);
    --radius:       6px;
}

* { box-sizing: border-box; }

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* =====================================================
   Site Header
   ===================================================== */
.site-header {
    background-color: var(--primary);
    color: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,.2);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: #fff;
}

.brand-logo {
    width: 46px;
    height: 46px;
    background: rgba(255,255,255,.15);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: .01em;
}

.brand-sub {
    font-size: 11px;
    opacity: .75;
    letter-spacing: .04em;
    text-transform: uppercase;
}

/* =====================================================
   Navigation Bar
   ===================================================== */
.site-nav {
    background-color: var(--primary-dark);
    border-bottom: 3px solid var(--accent);
}

.nav-items {
    display: flex;
    align-items: center;
    gap: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.nav-item {
    display: inline-flex;
    align-items: center;
    padding: 10px 18px;
    color: rgba(255,255,255,.82);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    white-space: nowrap;
    transition: all .15s ease;
    border-bottom: 3px solid transparent;
    margin-bottom: -3px;
}

.nav-item:hover,
.nav-item.active {
    color: #fff;
    background: rgba(255,255,255,.08);
    border-bottom-color: var(--accent);
}

/* =====================================================
   Main Content
   ===================================================== */
.site-main {
    flex: 1;
    padding: 24px 0;
}

/* =====================================================
   Category Tree / Archive Tree
   ===================================================== */
.archive-hero {
    background: var(--primary);
    color: #fff;
    padding: 36px 24px;
    margin-bottom: 28px;
}

.archive-hero h1 {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 6px;
}

.archive-hero p {
    margin: 0;
    opacity: .78;
    font-size: 14px;
}

.breadcrumb-bar {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    padding: 10px 24px;
}

.breadcrumb {
    margin: 0;
    font-size: 13px;
}

.breadcrumb-item a {
    color: var(--primary);
    text-decoration: none;
}

.breadcrumb-item a:hover { text-decoration: underline; }

/* Category Cards */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.category-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    text-decoration: none;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 14px;
    transition: all .18s ease;
    box-shadow: var(--shadow-sm);
}

.category-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
    color: var(--primary);
    transform: translateY(-2px);
}

.category-card .cat-icon {
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: #fff;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.category-card.level-2 .cat-icon {
    background: var(--primary-light);
}

.category-card.level-3 .cat-icon {
    background: #4a7fb5;
}

.cat-info .cat-title {
    font-weight: 600;
    font-size: 14px;
    line-height: 1.3;
}

.cat-info .cat-count {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* File List */
.file-list-header {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius) var(--radius) 0 0;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid var(--primary);
}

.file-list-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--primary);
}

.file-table {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 var(--radius) var(--radius);
    overflow: hidden;
}

.file-table table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
}

.file-table th {
    background: #f8f9fa;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--text-muted);
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
}

.file-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
    vertical-align: middle;
}

.file-table tr:last-child td { border-bottom: none; }
.file-table tr:hover td { background: #f9fafc; }

.file-name {
    display: flex;
    align-items: center;
    gap: 10px;
}

.file-icon {
    width: 34px;
    height: 34px;
    background: #fee2e2;
    color: #c8102e;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.file-title-text {
    font-weight: 500;
    color: var(--text);
    line-height: 1.3;
}

.file-meta {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.badge-goster {
    font-size: 11px;
    padding: 3px 8px;
}

/* =====================================================
   Login Page
   ===================================================== */
.login-page {
    min-height: 100vh;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-card {
    background: var(--bg-white);
    border-radius: 10px;
    box-shadow: 0 8px 40px rgba(0,0,0,.22);
    width: 100%;
    max-width: 420px;
    overflow: hidden;
}

.login-header {
    background: var(--primary);
    color: #fff;
    padding: 30px;
    text-align: center;
}

.login-header .login-logo {
    width: 64px;
    height: 64px;
    background: rgba(255,255,255,.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    margin: 0 auto 14px;
}

.login-header h2 {
    margin: 0 0 4px;
    font-size: 20px;
    font-weight: 700;
}

.login-header p {
    margin: 0;
    font-size: 13px;
    opacity: .75;
}

.login-body { padding: 30px; }

.login-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 18px 0 14px;
    color: #adb5bd;
    font-size: 12px;
    gap: 10px;
}
.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    border-top: 1px solid #e9ecef;
}

.btn-edevlet {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 16px;
    background: #c8102e;
    color: #fff !important;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background .2s;
}
.btn-edevlet:hover { background: #a50d26; color: #fff !important; }

/* =====================================================
   Site Footer
   ===================================================== */
.site-footer-bottom {
    background: var(--primary-dark);
    color: rgba(255,255,255,.7);
    margin-top: auto;
}

.footer-logo {
    color: #fff;
    font-size: 14px;
}

/* =====================================================
   General Components
   ===================================================== */
.page-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border);
}

.stat-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-sm);
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.stat-icon.blue  { background: #dbeafe; color: #1d4ed8; }
.stat-icon.green { background: #dcfce7; color: #15803d; }
.stat-icon.red   { background: #fee2e2; color: #b91c1c; }
.stat-icon.amber { background: #fef3c7; color: #92400e; }

.stat-value {
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
    color: var(--text);
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 3px;
}

.card-box {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.card-box-header {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fafbfc;
}

.card-box-header h5 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--primary);
}

.card-box-body { padding: 20px; }

/* Form styling */
.form-label {
    font-weight: 500;
    font-size: 13.5px;
    color: var(--text);
    margin-bottom: 5px;
}

.form-control, .form-select {
    border-color: var(--border);
    font-size: 14px;
    padding: 8px 12px;
    border-radius: var(--radius);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(30,58,95,.12);
}

/* Buttons */
.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline-primary:hover {
    background-color: var(--primary);
    border-color: var(--primary);
}

/* Tables */
.table th {
    background: #f8f9fa;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--text-muted);
    border-bottom-width: 1px;
}

.table td { font-size: 14px; vertical-align: middle; }

/* Alerts */
.alert { font-size: 14px; border-radius: var(--radius); }

/* Badges */
.badge { font-size: 11px; font-weight: 600; }

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 48px;
    opacity: .3;
    display: block;
    margin-bottom: 16px;
}

.empty-state h5 { font-size: 16px; color: var(--text-muted); margin-bottom: 8px; }
.empty-state p  { font-size: 13px; margin: 0; }

/* =====================================================
   Responsive
   ===================================================== */
@media (max-width: 768px) {
    .category-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 12px;
    }

    .archive-hero { padding: 24px 16px; }
    .archive-hero h1 { font-size: 19px; }

    .brand-sub { display: none; }
    .nav-item { padding: 8px 12px; font-size: 13px; }
}
