* {
  box-sizing: border-box;
}

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

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

button {
  cursor: pointer;
}

.shell {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 28px 0 40px;
}

.login-panel {
  min-height: calc(100vh - 80px);
  display: grid;
  grid-template-columns: 1.1fr 420px;
  gap: 32px;
  align-items: center;
}

.login-panel h1,
.topbar h1 {
  margin: 4px 0 0;
  font-size: 34px;
  line-height: 1.15;
}

.eyebrow {
  margin: 0;
  color: #1677ff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.muted {
  color: #6f7682;
}

.login-form,
.panel,
.stat {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.login-form {
  padding: 24px;
}

label {
  display: grid;
  gap: 7px;
  color: #5f6670;
  font-size: 13px;
  font-weight: 700;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid #d6dae1;
  border-radius: 6px;
  background: #ffffff;
  color: #202124;
  outline: none;
}

input,
select {
  height: 40px;
  padding: 0 11px;
}

textarea {
  min-height: 76px;
  padding: 10px 11px;
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-color: #1677ff;
  box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.12);
}

button {
  min-height: 40px;
  border: 0;
  border-radius: 6px;
  background: #1677ff;
  color: #ffffff;
  padding: 0 16px;
  font-weight: 800;
}

.login-form button {
  width: 100%;
  margin-top: 16px;
}

.ghost {
  border: 1px solid #d6dae1;
  background: #ffffff;
  color: #202124;
}

.danger {
  background: #fff1f0;
  color: #d93025;
}

.error-text {
  min-height: 20px;
  color: #d93025;
  font-size: 13px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

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

.tab-button {
  border: 1px solid #d6dae1;
  background: #ffffff;
  color: #202124;
}

.tab-button.active {
  border-color: #1677ff;
  background: #1677ff;
  color: #ffffff;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 22px;
}

.stat {
  padding: 18px;
  display: grid;
  gap: 8px;
}

.stat span {
  color: #6f7682;
  font-size: 13px;
}

.stat strong {
  font-size: 28px;
}

.grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 18px;
  margin-top: 18px;
}

.panel {
  min-width: 0;
  padding: 18px;
}

.panel-head {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel h2 {
  margin: 0;
  font-size: 18px;
}

.activity-list {
  margin-top: 14px;
  display: grid;
  gap: 9px;
}

.activity-item {
  width: 100%;
  min-height: 72px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  color: #202124;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
}

.activity-item.active {
  border-color: #1677ff;
  background: #f0f7ff;
}

.activity-item span {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.activity-item strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-item em {
  color: #6f7682;
  font-size: 12px;
  font-style: normal;
}

.activity-item i,
.badge {
  min-width: 48px;
  height: 26px;
  border-radius: 999px;
  background: #eef0f3;
  color: #5f6670;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.activity-item i.home,
.badge.home {
  background: #e8f7ef;
  color: #0f8f4c;
}

.empty-state {
  min-height: 80px;
  border: 1px dashed #d6dae1;
  border-radius: 6px;
  color: #6f7682;
  display: grid;
  place-items: center;
}

.file-list {
  min-height: 40px;
  border: 1px solid #d6dae1;
  border-radius: 6px;
  padding: 9px 11px;
  display: grid;
  gap: 8px;
  background: #ffffff;
}

.file-list a {
  color: #1677ff;
  overflow-wrap: anywhere;
}

.activity-form {
  margin-top: 14px;
  display: grid;
  gap: 14px;
}

.form-row {
  display: grid;
  gap: 12px;
}

.form-row.two {
  grid-template-columns: repeat(2, 1fr);
}

.form-row.three {
  grid-template-columns: repeat(3, 1fr);
}

.form-row.four {
  grid-template-columns: 0.8fr 0.9fr 1fr 0.8fr;
}

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.check {
  display: flex;
  grid-template-columns: none;
  flex-direction: row;
  align-items: center;
}

.check input {
  width: 18px;
  height: 18px;
}

code {
  padding: 5px 8px;
  border-radius: 6px;
  background: #f1f3f4;
  color: #5f6670;
  font-size: 12px;
}

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

@media (max-width: 900px) {
  .login-panel,
  .grid,
  .stats,
  .form-row.two,
  .form-row.three,
  .form-row.four {
    grid-template-columns: 1fr;
  }

  .topbar,
  .switch-row {
    align-items: stretch;
    flex-direction: column;
  }
}
