* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: #0f1c2e;
  background: #f3f7fb;
}

a {
  color: #0647a8;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 66px;
  padding: 12px 28px;
  background: #ffffff;
  border-bottom: 1px solid #dbe6f2;
  box-shadow: 0 6px 22px rgba(15, 28, 46, .07);
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #0f1c2e;
  text-decoration: none;
  font-weight: 800;
}

.logo-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #0647a8;
  color: #fff;
}

.brand-text {
  font-size: 16px;
}

.brand-sub {
  font-size: 12px;
  color: #6b7a90;
  font-weight: 500;
}

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-nav a,
.btn,
button,
input[type="submit"] {
  border: 1px solid #dbe6f2;
  border-radius: 10px;
  padding: 10px 14px;
  background: #eef4ff;
  color: #082d66;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.topbar-nav a.active,
.btn-primary,
button[type="submit"],
input[type="submit"] {
  background: #0647a8;
  color: #fff;
  border-color: #0647a8;
}

.btn-logout {
  background: #fff1f2 !important;
  color: #c9182b !important;
  border-color: #ffd0d6 !important;
}

.container {
  width: min(1180px, calc(100% - 40px));
  margin: 28px auto;
}

.card,
.stat-card,
.quick-card,
.client-card,
.doc-card,
.step-card {
  background: #fff;
  border: 1px solid #dbe6f2;
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 12px 30px rgba(15, 28, 46, .06);
}

.stats-grid,
.quick-grid,
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
}

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid #e5edf5;
  text-align: left;
}

th {
  color: #53657d;
  font-size: 12px;
  text-transform: uppercase;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #d8e2ee;
  border-radius: 10px;
  padding: 12px 14px;
  font: inherit;
  background: #fff;
}

label {
  display: block;
  margin-bottom: 6px;
  color: #31445f;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
}

.flash-msg {
  margin: 12px 0;
  padding: 12px 14px;
  border-radius: 10px;
  font-weight: 700;
}

.flash-msg.success {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}

.flash-msg.error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  border-radius: 99px;
  background: #eef4ff;
  color: #082d66;
  font-size: 12px;
  font-weight: 800;
}

.badge-green {
  background: #dcfce7;
  color: #166534;
}

.badge-red {
  background: #fee2e2;
  color: #991b1b;
}

.badge-blue {
  background: #e7f0ff;
  color: #0647a8;
}

.quick-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-sm {
  padding: 8px 10px;
  font-size: 13px;
}

.btn-outline {
  background: #eef4ff;
  color: #082d66;
}

.test-banner {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #0f1c2e;
  color: #fff;
  font-weight: 800;
  border-left: 5px solid #e60e16;
}

.mini-progress {
  width: 90px;
  height: 7px;
  margin-top: 5px;
  border-radius: 999px;
  background: #e5edf5;
  overflow: hidden;
}

.mini-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #16a34a;
}

@media (max-width: 768px) {
  .container {
    width: min(100% - 24px, 1180px);
    margin: 18px auto;
  }

  .topbar {
    padding: 10px 14px;
  }
}
