:root {
  font-family: Inter, Arial, sans-serif;
  color: #182234;
  background: #f4f7fa;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #f4f7fa;
}

a {
  color: #1768ac;
}

h1,
h2,
p {
  margin-top: 0;
}

.muted {
  color: #68778a;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at top left, #173b64, transparent 48%),
    #071729;
}

.login-card {
  width: min(430px, 100%);
  padding: 42px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

.brand-mark,
.sidebar-logo {
  display: inline-grid;
  place-items: center;
  background: #0d67ae;
  color: #fff;
  font-weight: 800;
}

.brand-mark {
  width: 52px;
  height: 52px;
  margin-bottom: 18px;
  border-radius: 14px;
  font-size: 20px;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 250px;
  padding: 24px 18px;
  background: #081b31;
  color: #fff;
  display: flex;
  flex-direction: column;
}

.sidebar-logout {
  margin-top: auto;
}

.sidebar-logout button {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #315170;
  background: transparent;
  color: #d7e4f2;
  text-align: left;
}

.sidebar-logout button:hover {
  background: #12375d;
  color: #fff;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 36px;
  padding: 0 8px;
  font-size: 19px;
  font-weight: 800;
}

.sidebar-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.sidebar nav {
  display: grid;
  gap: 7px;
}

.sidebar nav a {
  padding: 12px 14px;
  border-radius: 9px;
  color: #d7e4f2;
  text-decoration: none;
}

.sidebar nav .nav-disabled {
  padding: 12px 14px;
  border-radius: 9px;
  color: #d7e4f2;
  cursor: not-allowed;
  opacity: 0.38;
}

.sidebar nav a:hover,
.sidebar nav a.active {
  background: #12375d;
  color: #fff;
}

.sidebar nav a.disabled {
  cursor: default;
  opacity: 0.45;
}

.app-shell {
  min-height: 100vh;
  margin-left: 250px;
}

.topbar {
  min-height: 68px;
  padding: 0 30px;
  background: #fff;
  border-bottom: 1px solid #e3e9ef;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.user-panel {
  display: flex;
  align-items: center;
  gap: 14px;
}

.page {
  max-width: 1320px;
  margin: 0 auto;
  padding: 34px;
}

.page-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(190px, 1fr));
  gap: 20px;
  margin-bottom: 26px;
}

.card,
.panel {
  background: #fff;
  border: 1px solid #e5ebf0;
  border-radius: 14px;
  box-shadow: 0 7px 25px rgba(18, 40, 64, 0.05);
}

.card {
  min-height: 132px;
  padding: 24px;
}

.card-label {
  color: #68778a;
  font-size: 14px;
}

.card-value {
  margin-top: 10px;
  font-size: 38px;
  font-weight: 800;
}

.status-ok {
  margin-top: 15px;
  color: #13733c;
  font-size: 21px;
  font-weight: 800;
}

.panel-heading {
  padding: 20px 24px;
  border-bottom: 1px solid #e5ebf0;
}

.empty-state {
  padding: 42px 24px;
  text-align: center;
}

.table-panel {
  overflow: hidden;
}

table {
  width: 100%;
  border-collapse: collapse;
}

.archive-table {
  table-layout: fixed;
  font-size: 13px;
}

.archive-table th,
.archive-table td {
  padding: 11px 8px;
  overflow-wrap: break-word;
}

.archive-col-document { width: 22%; }
.archive-col-period { width: 7%; }
.archive-col-date { width: 14%; }
.archive-col-hash { width: 9%; }
.archive-col-size { width: 7%; }
.archive-col-worm { width: 9%; }
.archive-col-retention { width: 10%; }
.archive-col-status { width: 13%; }
.archive-col-actions { width: 9%; }

.archive-cell-ellipsis {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.archive-date-cell {
  white-space: nowrap;
}

.archive-actions-cell .button-light {
  padding: 8px 10px;
  white-space: nowrap;
}

th,
td {
  padding: 15px 18px;
  border-bottom: 1px solid #e8edf2;
  text-align: left;
}

th {
  background: #f1f5f8;
  color: #526174;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.empty-cell {
  padding: 40px;
  color: #68778a;
  text-align: center;
}

.form-panel {
  max-width: 900px;
  padding: 26px;
}

.permission-groups {
  display: grid;
  gap: 12px;
}

.permission-group {
  overflow: hidden;
  border: 1px solid #d9e2ea;
  border-radius: 10px;
  background: #fff;
}

.permission-group summary {
  display: flex;
  justify-content: space-between;
  padding: 14px 16px;
  background: #f1f5f8;
  cursor: pointer;
  font-weight: 800;
}

.permission-group summary span {
  color: #68778a;
  font-size: 12px;
  font-weight: 600;
}

.permission-group-content {
  overflow-x: auto;
}

.permission-code {
  display: block;
  margin-top: 4px;
  font-family: monospace;
  font-weight: 400;
}

form {
  display: grid;
  gap: 10px;
}

.inline-form {
  display: inline-block;
}

label {
  margin-top: 10px;
  font-weight: 700;
}

small {
  color: #68778a;
}


input,
select {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid #c8d3dd;
  border-radius: 8px;
  background: #fff;
  font: inherit;
}

input:focus,
select:focus {
  border-color: #1671b9;
  outline: 3px solid rgba(22, 113, 185, 0.14);
}


button,
.button {
  display: inline-block;
  padding: 11px 17px;
  border: 0;
  border-radius: 8px;
  background: #0d67ae;
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}

.button-full {
  width: 100%;
  margin-top: 17px;
}

.button-light {
  padding: 8px 12px;
  background: #edf3f8;
  color: #18324f;
}

.button-secondary {
  background: #e9eef3;
  color: #283b50;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 22px;
}

.badge {
  display: inline-block;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.badge-success {
  background: #def5e6;
  color: #146a35;
}

.badge-muted {
  background: #e8edf1;
  color: #657384;
}

.alert {
  margin-bottom: 16px;
  padding: 13px;
  border-radius: 8px;
}

.alert-error {
  background: #fff0f0;
  color: #9d2020;
}

@media (max-width: 960px) {
  .sidebar {
    position: static;
    width: 100%;
  }

  .app-shell {
    margin-left: 0;
  }

  .cards {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }
}

@media (max-width: 600px) {
  .page,
  .topbar {
    padding-left: 18px;
    padding-right: 18px;
  }

  .cards {
    grid-template-columns: 1fr;
  }

  .page-title {
    align-items: flex-start;
    flex-direction: column;
  }
}

.badge-error {
  background: #ffe2e2;
  color: #a61b1b;
}

.status-error {
  color: #a61b1b;
  font-size: 20px;
  font-weight: 800;
}
.badge-warning {
  background: #fff1c7;
  color: #8a5a00;
}
.section-title {
  margin-top: 36px;
}

code {
  overflow-wrap: anywhere;
  white-space: normal;
}
.filter-panel {
  margin-bottom: 24px;
  padding: 22px;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 18px;
  align-items: end;
}

.filter-grid label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-weight: 600;
}

.filter-grid input,
.filter-grid select {
  width: 100%;
}

.filter-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.summary-card {
  background: #ffffff;
  border: 1px solid #dfe7ef;
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 8px 24px rgba(12, 38, 64, 0.05);
}

.summary-card span {
  display: block;
  color: #6a7c90;
  font-size: 14px;
  margin-bottom: 8px;
}

.summary-card strong {
  font-size: 24px;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 22px;
}

.detail-panel {
  padding: 26px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: 22px;
}

.detail-grid > div {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.detail-grid span {
  color: #6a7c90;
  font-size: 14px;
}

.detail-wide {
  grid-column: 1 / -1;
}

.detail-wide code {
  background: #f5f8fb;
  border-radius: 8px;
  padding: 12px;
}

.evidence-panel {
  margin-top: 24px;
  padding: 26px;
}

.check-list {
  margin: 18px 0 0;
  padding-left: 22px;
}

.check-list li {
  margin: 9px 0;
}

@media (max-width: 1100px) {
  .filter-grid {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }

  .summary-grid {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
  }
}
.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.manifest-panel {
  padding: 26px;
}

.manifest-heading {
  margin-bottom: 18px;
}

.manifest-heading code {
  display: block;
  margin-top: 8px;
  overflow-wrap: anywhere;
}

.manifest-panel pre {
  background: #071a2e;
  color: #dcecff;
  border-radius: 12px;
  padding: 20px;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: monospace;
  line-height: 1.55;
}
