body { font-family: 'Manrope', sans-serif; background: #f4f7fb; color: #1a2535; margin: 0; }
.wrap { width: 100%; max-width: 1100px; margin: 0 auto; padding: 24px; box-sizing: border-box; }
.app-spacer { height: 64px; }
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 11000;
  background: #fff;
  border-bottom: 1px solid #dde6f0;
  box-shadow: 0 2px 12px rgba(0,0,0,.05);
}
.nav .wrap {
  max-width: 1100px;
  padding-top: 12px;
  padding-bottom: 12px;
  box-sizing: border-box;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.nav-links {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.nav a {
  color: #24527a;
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
  padding: 7px 10px;
  border-radius: 8px;
  margin-right: 0;
}
.nav a:hover { background: #edf5fd; }
.nav-right {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.user-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #4a6070;
  font-size: 12px;
  line-height: 1.2;
  text-align: right;
}
.user-name {
  font-weight: 600;
  color: #1a2535;
}
.role-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
}
.role-badge.edit {
  background: #e8f7ea;
  color: #225a2b;
  border: 1px solid #bfe5c7;
}
.role-badge.read {
  background: #eef1f5;
  color: #4a6070;
  border: 1px solid #d2d9e2;
}
.role-badge.user {
  background: #e8f3fb;
  color: #1e72a8;
  border: 1px solid #bfd9ee;
}
.card { background: #fff; border: 1px solid #dde6f0; border-radius: 12px; padding: 18px; margin-top: 16px; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; }
.stat .label { font-size: 11px; text-transform: uppercase; color: #5a7184; margin-bottom: 6px; font-weight: 700; }
.stat .val { font-size: 26px; font-weight: 700; }
.flash { padding: 10px 12px; border-radius: 8px; margin-top: 16px; font-size: 14px; }
.flash.error { background: #fdebea; color: #8d2f27; border: 1px solid #f3c5c1; }
.flash.success { background: #e8f7ea; color: #225a2b; border: 1px solid #bfe5c7; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; border: 1px solid #dde6f0; }
th, td { padding: 10px 12px; border-bottom: 1px solid #edf2f7; font-size: 14px; text-align: left; vertical-align: top; }
th { background: #f8fbff; color: #4a6070; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
tr:last-child td { border-bottom: 0; }
.btn { display: inline-block; border: 1px solid #2f6fb4; background: #3a98d7; color: #fff; border-radius: 8px; padding: 8px 12px; text-decoration: none; font-size: 13px; font-weight: 600; cursor: pointer; }
.btn-primary { background: #3A98D7; color: #fff; border-color: #3A98D7; }
.btn-primary:hover { background: #1e72a8; border-color: #1e72a8; }
.btn.secondary { background: #fff; color: #24527a; border-color: #c3d5e8; }
.btn.danger { background: #c0392b; border-color: #a93226; }
.actions { display: flex; gap: 8px; align-items: center; }
form.inline { display: inline; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.field { margin-bottom: 10px; }
label { display: block; font-size: 12px; color: #4a6070; margin-bottom: 4px; font-weight: 600; }
input, select, textarea { width: 100%; border: 1px solid #c9d7e6; border-radius: 8px; padding: 8px 10px; font-size: 14px; box-sizing: border-box; font-family: 'Manrope', sans-serif; }
textarea { min-height: 90px; resize: vertical; }
.check { display: flex; align-items: center; gap: 8px; margin-top: 24px; }
.check input { width: auto; }
.muted { color: #6b8296; font-size: 12px; }
.logout-btn {
  border: 1px solid #c3d5e8;
  background: #fff;
  color: #24527a;
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: 'Manrope', sans-serif;
}
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.page-title { margin: 0; font-size: 28px; font-weight: 600; letter-spacing: -0.01em; }
.page-subtitle { font-size: 13px; color: #4a6070; margin-top: 3px; margin-bottom: 0; padding-bottom: 4px; }
.w-actions { width: 170px; }
.audit-filters { margin-top: 0; margin-bottom: 14px; padding: 14px; }
.audit-grid { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; }
.audit-actions { display: flex; gap: 8px; align-items: center; margin-top: 12px; }
.audit-detail-cell { min-width: 260px; }
.audit-details-old { margin-bottom: 6px; }
.audit-summary { cursor: pointer; color: #4a6070; font-size: 12px; }
.audit-pre {
  margin: 6px 0 0;
  padding: 8px;
  border: 1px solid #dde6f0;
  background: #f8fbff;
  border-radius: 8px;
  white-space: pre-wrap;
  font-size: 12px;
  line-height: 1.45;
  max-height: 180px;
  overflow: auto;
}
.ml-10 { margin-left: 10px; }
@media (max-width: 900px) {
  .grid4,
  .form-grid,
  .audit-grid { grid-template-columns: 1fr; }
  .app-spacer { height: 96px; }
  .user-meta { text-align: left; }
}
