:root {
  --navy: #1a2f4c;
  --navy-light: #3d5470;
  --bg: #f6f7f9;
  --card-bg: #ffffff;
  --border: #e1e4e8;
  --text: #1f2937;
  --muted: #6b7280;
  --blue: #1155cc;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}
.topbar {
  background: var(--navy);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  flex-wrap: wrap;
  gap: 12px;
}
.brand { color: #fff; text-decoration: none; font-weight: 700; font-size: 18px; }
.brand span { font-weight: 400; opacity: .8; margin-left: 6px; }
.topbar nav a {
  color: #cfd8e3;
  text-decoration: none;
  margin-left: 20px;
  font-size: 14px;
}
.topbar nav a:hover { color: #fff; }
.content { max-width: 960px; margin: 0 auto; padding: 32px 20px 60px; }
h1 { margin-top: 0; }
.lead { color: var(--muted); max-width: 640px; }
.back-link { color: var(--blue); text-decoration: none; font-size: 14px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin: 28px 0; }
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 22px;
  text-decoration: none;
  color: var(--text);
  transition: box-shadow .15s, transform .15s;
}
.card:hover { box-shadow: 0 6px 18px rgba(0,0,0,.08); transform: translateY(-2px); }
.card-icon {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--navy); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; margin-bottom: 12px;
}
.card h2 { margin: 4px 0 8px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); font-size: 14px; }
.status-box { padding: 14px 16px; border-radius: 8px; font-size: 14px; margin-top: 20px; }
.status-box.ok { background: #eafaf0; color: #166534; border: 1px solid #bbf0cd; }
.status-box.warn { background: #fff7e6; color: #92620a; border: 1px solid #ffe3a3; }
.upload-form { background: var(--card-bg); border: 1px solid var(--border); border-radius: 10px; padding: 24px; max-width: 520px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; font-size: 14px; }
.field-row { display: flex; gap: 16px; }
.field-row .field { flex: 1; }
input[type=file], select { padding: 8px; border: 1px solid var(--border); border-radius: 6px; font-size: 14px; }
.checkbox { display: flex; align-items: center; gap: 8px; font-size: 14px; margin-bottom: 18px; }
.btn-primary {
  background: var(--navy); color: #fff; border: none; padding: 12px 20px;
  border-radius: 8px; font-size: 15px; cursor: pointer; text-decoration: none;
  display: inline-block;
}
.btn-primary:hover { background: var(--navy-light); }
.note { color: var(--muted); font-size: 13px; margin-top: 12px; }
.stats-row { display: flex; gap: 28px; margin: 20px 0; flex-wrap: wrap; }
.stat { background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 14px 20px; text-align: center; min-width: 140px; }
.stat .num { display: block; font-size: 26px; font-weight: 700; color: var(--navy); }
.stat .lbl { font-size: 12px; color: var(--muted); }
.downloads { display: flex; gap: 12px; margin: 20px 0; flex-wrap: wrap; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 8px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: left; }
th { background: #fafbfc; color: var(--muted); font-weight: 600; }
.footer { text-align: center; color: var(--muted); font-size: 12px; padding: 20px; }
pre { white-space: pre-wrap; background: #fafbfc; padding: 12px; border-radius: 8px; font-size: 12px; }

/* --- Bosqich 5.2/5.4/5.5: auth, admin, banner --- */
.topbar .user-box { display: flex; align-items: center; gap: 14px; margin-left: 20px; }
.topbar .user-box span { color: #cfd8e3; font-size: 13px; }
.topbar .user-box a { color: #cfd8e3; text-decoration: none; font-size: 13px; }
.topbar .user-box a:hover { color: #fff; }
.topbar .badge-admin { background: #3d5470; color: #fff; padding: 2px 8px; border-radius: 10px; font-size: 11px; }

.banner { display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: #fff7e6; border: 1px solid #ffe3a3; color: #92620a; border-radius: 8px;
  padding: 12px 18px; margin: 0 0 20px; font-size: 14px; flex-wrap: wrap; }
.banner .banner-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.banner .banner-actions a, .banner .banner-actions button {
  font-size: 13px; padding: 7px 14px; border-radius: 6px; text-decoration: none; cursor: pointer; border: none; }
.banner .btn-go { background: var(--navy); color: #fff; }
.banner .btn-dismiss { background: transparent; color: #92620a; border: 1px solid #ffe3a3 !important; }

.auth-form { background: var(--card-bg); border: 1px solid var(--border); border-radius: 10px;
  padding: 28px; max-width: 380px; margin: 40px auto; }
.auth-form h1 { font-size: 20px; margin-top: 0; }
.auth-form input[type=text], .auth-form input[type=password] {
  padding: 10px; border: 1px solid var(--border); border-radius: 6px; font-size: 14px; width: 100%; }
.auth-form .field { margin-bottom: 14px; }
.auth-form .btn-primary { width: 100%; text-align: center; margin-top: 6px; }
.auth-error { background: #fdecea; color: #a12622; border: 1px solid #f5c6c3; border-radius: 6px;
  padding: 10px 14px; font-size: 13px; margin-bottom: 16px; }

.admin-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--border);
  border-radius: 8px; overflow: hidden; margin-bottom: 28px; }
.admin-table th, .admin-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); font-size: 14px; text-align: left; }
.admin-table th { background: #fafbfc; color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; }
.tag-fresh { background: #eafaf0; color: #166534; border-radius: 10px; padding: 2px 10px; font-size: 12px; }
.tag-mid { background: #fff7e6; color: #92650a; border-radius: 10px; padding: 2px 10px; font-size: 12px; }
.tag-stale { background: #fdecea; color: #a12622; border-radius: 10px; padding: 2px 10px; font-size: 12px; }
.source-block { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 20px; margin-bottom: 18px; }
.source-block h3 { margin: 0 0 4px; }
.source-block .yordam { color: var(--muted); font-size: 13px; margin-bottom: 14px; }
.source-block form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.summary-box { background: #f6f7f9; border-radius: 8px; padding: 14px 16px; font-size: 13px; margin: 12px 0; }
.summary-box dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0; }
.summary-box dt { color: var(--muted); }
.summary-box dd { margin: 0; font-weight: 600; }
.summary-box > div { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; }
.summary-box > div span { color: var(--muted); }
.role-badge { background: var(--navy); color: #fff; padding: 2px 8px; border-radius: 10px; font-size: 11px; }
.role-badge.azo { background: var(--muted); }
.danger-link { color: #a12622; font-size: 13px; text-decoration: none; }
.tabs-admin { display: flex; gap: 4px; margin-bottom: 20px; border-bottom: 1px solid var(--border); }
.tabs-admin a { padding: 10px 16px; text-decoration: none; color: var(--muted); font-size: 14px; border-bottom: 2px solid transparent; }
.tabs-admin a.active { color: var(--navy); border-bottom-color: var(--navy); font-weight: 600; }
