* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: #1f2933;
  background: #edf2f4;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
}

body.login-page {
  background: #17324d;
}

a {
  color: inherit;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  display: table;
  width: 100%;
  padding: 16px 28px;
  color: #fff;
  background: #17324d;
  border-bottom: 4px solid #38a169;
}

.brand,
.main-nav {
  display: table-cell;
  vertical-align: middle;
}

.brand {
  width: 320px;
  white-space: nowrap;
}

.brand-mark {
  display: inline-block;
  width: 42px;
  height: 42px;
  margin-right: 10px;
  color: #17324d;
  background: #9ae6b4;
  border-radius: 4px;
  font-size: 26px;
  font-weight: bold;
  line-height: 42px;
  text-align: center;
  vertical-align: middle;
}

.brand strong,
.brand small {
  display: block;
}

.brand span:last-child {
  display: inline-block;
  vertical-align: middle;
}

.brand strong {
  font-size: 22px;
  letter-spacing: 0;
}

.brand small {
  color: #cde3f7;
  font-size: 12px;
  text-transform: uppercase;
}

.main-nav {
  text-align: right;
}

.main-nav a {
  display: inline-block;
  margin-left: 8px;
  padding: 9px 12px;
  border-radius: 4px;
  color: #e6f0f8;
  text-decoration: none;
}

.main-nav a:hover,
.main-nav a.active {
  color: #10263b;
  background: #e6ffef;
}

.content {
  max-width: 1080px;
  margin: 0 auto;
  padding: 34px 24px 48px;
}

.content.admin-content {
  max-width: 1260px;
}

.page-header {
  padding: 28px 0 30px;
}

.page-header.compact {
  padding-bottom: 20px;
}

.eyebrow {
  margin: 0 0 8px;
  color: #2f855a;
  font-size: 12px;
  font-weight: bold;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 10px;
  color: #10263b;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 10px;
  color: #17324d;
  font-size: 21px;
}

.page-header p:last-child,
.feature-card p,
.muted {
  color: #52616f;
  line-height: 1.5;
}

.section-grid {
  margin-right: -18px;
  overflow: hidden;
}

.feature-card,
.upload-panel {
  background: #fff;
  border: 1px solid #d8e2ea;
  border-radius: 6px;
  box-shadow: 0 8px 18px rgba(16, 38, 59, 0.06);
}

.feature-card {
  float: left;
  width: 48%;
  min-height: 178px;
  margin: 0 18px 18px 0;
  padding: 22px;
}

.button {
  display: inline-block;
  min-width: 126px;
  padding: 10px 16px;
  border: 0;
  border-radius: 4px;
  color: #fff;
  background: #2f855a;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  font-weight: bold;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.button:hover {
  background: #276749;
}

.button:disabled {
  background: #8aa39a;
  cursor: default;
}

.button.secondary {
  color: #17324d;
  background: #dbeafe;
}

.button.secondary:hover {
  background: #c7ddf7;
}

.upload-panel {
  padding: 24px;
  overflow: hidden;
}

.upload-panel > div:first-child {
  float: left;
  width: 280px;
  padding-right: 24px;
}

.upload-box {
  overflow: hidden;
  min-width: 0;
}

.file-label {
  display: block;
  margin-bottom: 8px;
  color: #334e68;
  font-weight: bold;
}

input[type="file"] {
  width: 100%;
  padding: 12px;
  border: 1px solid #bcccdc;
  border-radius: 4px;
  background: #f8fafc;
}

.actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
}

.status {
  display: inline-block;
  min-height: 20px;
  color: #52616f;
  font-weight: bold;
}

.status.uploading {
  color: #2b6cb0;
}

.status.success {
  color: #2f855a;
}

.status.error {
  color: #c53030;
}

.login-shell {
  min-height: 100vh;
  padding: 48px 20px;
}

.login-card {
  width: 100%;
  max-width: 390px;
  margin: 0 auto;
  padding: 28px;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.22);
}

.login-brand {
  display: block;
  width: auto;
  margin-bottom: 24px;
  color: #17324d;
}

.login-brand small {
  color: #52616f;
}

.field-label {
  display: block;
  margin: 14px 0 6px;
  color: #334e68;
  font-weight: bold;
}

.text-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #bcccdc;
  border-radius: 4px;
  background: #fff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
}

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

.form-error,
.form-success {
  display: block;
  margin-top: 12px;
  font-weight: bold;
}

.form-error {
  color: #c53030;
}

.form-success {
  color: #2f855a;
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(360px, 0.9fr) minmax(520px, 1.1fr);
  gap: 18px;
}

.admin-panel {
  min-width: 0;
  min-height: 300px;
  margin: 0;
  padding: 22px;
  overflow-x: auto;
  background: #fff;
  border: 1px solid #d8e2ea;
  border-radius: 6px;
  box-shadow: 0 8px 18px rgba(16, 38, 59, 0.06);
}

.hint {
  margin: 6px 0 0;
  color: #52616f;
  font-size: 13px;
}

.checkbox-row {
  display: block;
  margin: 14px 0 18px;
  color: #334e68;
  font-weight: bold;
}

.form-actions {
  margin-top: 18px;
}

.form-actions .button {
  margin-right: 8px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

.data-table th,
.data-table td {
  padding: 10px 8px;
  border-bottom: 1px solid #d8e2ea;
  text-align: left;
  vertical-align: middle;
}

.data-table th {
  color: #17324d;
  background: #f0f4f8;
}

.table-action {
  display: inline-block;
  padding: 6px 10px;
  color: #17324d;
  background: #dbeafe;
  border-radius: 4px;
  font-size: 13px;
  font-weight: bold;
  text-decoration: none;
}

.table-action:hover {
  background: #c7ddf7;
}

.progress-shell {
  height: 10px;
  margin-top: 18px;
  overflow: hidden;
  background: #d8e2ea;
  border-radius: 4px;
}

.progress-bar {
  width: 0;
  height: 100%;
  background: #38a169;
  transition: width 180ms ease;
}

@media (max-width: 760px) {
  .topbar,
  .brand,
  .main-nav {
    display: block;
  }

  .brand {
    width: auto;
    margin-bottom: 14px;
  }

  .main-nav {
    text-align: left;
  }

  .main-nav a {
    margin: 0 6px 6px 0;
  }

  .feature-card {
    float: none;
    width: auto;
    min-height: 0;
  }

  .admin-panel {
    min-height: 0;
  }

  .admin-layout {
    display: block;
  }

  .admin-panel {
    margin-bottom: 18px;
  }

  .upload-panel > div:first-child {
    float: none;
    width: auto;
    padding-right: 0;
    margin-bottom: 18px;
  }

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