.admin-shell {
  display: grid;
  gap: 18px;
}

.admin-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

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

.secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 6px;
  padding: 10px 16px;
  background: #e7edf1;
  color: #24313d;
  font-weight: 900;
  text-decoration: none;
}

.admin-message {
  border: 1px solid #d9e1e7;
  border-radius: 8px;
  padding: 12px 14px;
  background: #f8fbfc;
  color: #24313d;
  font-weight: 800;
}

.admin-message.error {
  border-color: #e0b868;
  background: #fff8e8;
  color: #8a4f20;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.admin-stats div {
  border: 1px solid #d8e2e6;
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.admin-stats span {
  display: block;
  color: #607080;
  font-size: 13px;
  font-weight: 900;
}

.admin-stats strong {
  display: block;
  margin-top: 6px;
  color: #296f77;
  font-size: 30px;
  line-height: 1;
}

.admin-panel {
  padding: 22px;
}

.admin-form {
  display: grid;
  grid-template-columns: 1fr 1fr 160px 120px;
  gap: 12px;
  align-items: end;
}

select {
  min-height: 46px;
  border: 1px solid #c9d2da;
  border-radius: 6px;
  padding: 10px 12px;
  background: #fbfcfd;
  font: inherit;
}

.member-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 340px;
}

.member-tools button,
.member-tools select,
.member-tools input {
  min-height: 36px;
  font-size: 13px;
}

.member-tools input {
  width: 110px;
}

.line-plan-tools {
  display: grid;
  grid-template-columns: 105px 145px;
  gap: 6px;
  min-width: 260px;
}

.line-member-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 12px;
}

.line-member-filters button {
  min-height: 38px;
  border: 1px solid #c9d2da;
  border-radius: 999px;
  padding: 7px 14px;
  background: #f4f7f9;
  color: #43515e;
  font-weight: 800;
}

.line-member-filters button.active {
  border-color: #296f77;
  background: #296f77;
  color: #fff;
}

.compact-date,
.compact-time {
  width: 82px;
  min-width: 82px;
  white-space: nowrap;
  font-size: 12px;
}

.line-plan-tools select,
.line-plan-tools input,
.line-plan-tools button {
  min-height: 36px;
  font-size: 13px;
}

.permanent-option {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.permanent-option input {
  width: auto;
  min-height: auto;
}

.mini-button {
  padding: 7px 10px;
}

.mini-button.is-saving {
  background: #607080;
  cursor: wait;
  opacity: 0.85;
}

.mini-button.is-saved {
  background: #1f7a52;
}

.danger-button {
  background: #b23a48;
}

.muted-text {
  color: #607080;
  font-size: 12px;
  font-weight: 800;
}

.line-watchlist-box {
  margin-top: 18px;
  border: 1px solid #d8e2e6;
  border-radius: 8px;
  padding: 16px;
  background: #f8fbfc;
}

.line-watchlist-box h3 {
  margin: 0 0 10px;
  color: #24313d;
}

.line-watchlist-box ul {
  margin: 0;
  padding-left: 20px;
  color: #24313d;
  font-weight: 800;
}

.line-watchlist-box li + li {
  margin-top: 6px;
}

.watermark-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px;
  gap: 12px;
  align-items: start;
}

.watermark-form textarea {
  min-height: 120px;
}

.status-pill {
  display: inline-flex;
  border-radius: 999px;
  padding: 4px 9px;
  background: #e7edf1;
  color: #24313d;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.status-pill.active {
  background: #e6f5ee;
  color: #1f6b45;
}

.status-pill.online {
  background: #fff2c7;
  color: #7a4f00;
}

@media (max-width: 780px) {
  .admin-hero,
  .admin-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-stats,
  .admin-form,
  .watermark-form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 400px) {
  .admin-shell {
    gap: 10px;
  }

  .admin-panel,
  .line-watchlist-box {
    padding: 12px;
  }

  .admin-stats {
    gap: 7px;
  }

  .admin-stats div {
    padding: 10px;
  }

  .admin-stats strong {
    font-size: 24px;
  }

  .member-tools {
    min-width: 0;
  }
}
