* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f4f7fb;
  color: #18212f;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(135deg, #eaf2ff, #f8fbff 50%, #e9f6f6);
}

.login-card {
  width: min(420px, 100%);
  background: #fff;
  border-radius: 24px;
  padding: 32px;
  box-shadow: 0 20px 50px rgba(19, 44, 86, 0.12);
}

.login-card h1 {
  margin: 0 0 8px;
  font-size: 32px;
}

.login-card p {
  margin: 0 0 20px;
  color: #5f6d7c;
}

.logo {
  display: block;
  width: 140px;
  max-width: 100%;
  margin: 0 auto 16px;
}

.logo.small {
  width: 120px;
  margin: 0 0 12px;
}

.shell {
  display: grid;
  grid-template-columns: 300px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: linear-gradient(180deg, #16356d, #1e4d8a);
  color: #fff;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.sidebar h2 {
  margin: 0;
}

.sidebar p {
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.5;
}

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

.sidebar nav a,
.secondary,
.sidebar button {
  border: 0;
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  cursor: pointer;
  text-align: left;
}

.sidebar nav a:hover,
.sidebar button:hover,
button:hover {
  opacity: 0.92;
}

.password-box,
.logout-form {
  display: grid;
  gap: 10px;
}

.content {
  padding: 28px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.card,
.panel .table-card,
.panel .form-card {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 12px 30px rgba(31, 66, 135, 0.08);
  padding: 20px;
}

.card strong {
  display: block;
  margin-top: 10px;
  font-size: 28px;
  color: #10356f;
}

.card small {
  color: #5c6b7f;
}

.toolbar,
.top-actions,
.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.chip {
  padding: 10px 14px;
  border-radius: 999px;
  background: #e9eef9;
  color: #1d3f79;
  font-weight: 600;
}

.chip.active {
  background: #1d4d8f;
  color: #fff;
}

.panel {
  display: grid;
  gap: 18px;
}

.panel.two-col {
  grid-template-columns: minmax(320px, 420px) 1fr;
}

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

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

label {
  display: grid;
  gap: 8px;
  font-weight: 600;
}

input,
select,
textarea,
button {
  width: 100%;
  border: 1px solid #d7deeb;
  border-radius: 14px;
  padding: 12px 14px;
  background: #fff;
}

textarea {
  min-height: 96px;
  resize: vertical;
}

button,
.button-link {
  background: #1c6dd0;
  color: #fff;
  border: 0;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.button-link {
  border-radius: 14px;
  padding: 12px 14px;
}

.button-link.secondary,
button.secondary {
  background: #5b6c84;
}

.button-link.danger,
button.danger {
  background: #c13e4f;
}

.button-link.success,
button.success {
  background: #17815a;
}

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

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

th {
  color: #4e6078;
  font-size: 14px;
}

td small {
  color: #6d7b8b;
}

.alert {
  padding: 14px 16px;
  border-radius: 14px;
  margin-bottom: 16px;
  font-weight: 600;
}

.alert.error {
  background: #fee2e2;
  color: #991b1b;
}

.alert.success {
  background: #dcfce7;
  color: #166534;
}

@media (max-width: 960px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .panel.two-col {
    grid-template-columns: 1fr;
  }
}
