:root {
  --ink: #231f20;
  --muted: #66717b;
  --line: #e1e7ec;
  --paper: #f4f6f8;
  --white: #ffffff;
  --teal: #5a2080;
  --teal-dark: #231f20;
  --green: #3f985e;
  --red: #b94b3e;
  --shadow: 0 24px 70px rgba(21, 31, 43, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

input,
textarea,
button {
  font: inherit;
}

.admin-shell {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 56px;
}

.login-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(340px, 420px);
  gap: 42px;
  align-items: center;
  min-height: calc(100vh - 68px);
}

.login-brand img {
  display: block;
  width: min(280px, 80%);
  height: auto;
  margin-bottom: 22px;
}

.login-brand h1 {
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 4.8rem);
  line-height: 1;
  letter-spacing: 0;
}

.login-brand p {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.login-card {
  display: grid;
  gap: 16px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.admin-header h1,
section h2 {
  margin: 0;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 24px;
}

.admin-header p {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
  color: var(--teal);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.76rem;
}

.admin-header p img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.admin-header nav {
  display: flex;
  gap: 10px;
}

a,
button {
  border: 0;
  border-radius: 8px;
  background: var(--teal);
  color: var(--white);
  cursor: pointer;
  font-weight: 900;
  text-decoration: none;
}

a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
}

button {
  min-height: 48px;
  padding: 0 18px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  padding: 12px 13px;
  outline: none;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(8, 127, 134, 0.12);
}

.remember {
  display: flex;
  align-items: center;
  gap: 9px;
}

.remember input {
  width: 16px;
  height: 16px;
}

.alert {
  margin: 0 0 18px;
  padding: 13px 15px;
  border-radius: 8px;
  font-weight: 800;
}

.alert.success {
  background: rgba(63, 152, 94, 0.12);
  color: var(--green);
}

.alert.error {
  background: rgba(185, 75, 62, 0.12);
  color: var(--red);
}

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

section {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

section h2 {
  margin-bottom: 18px;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.wide {
  grid-column: 1 / -1;
}

.section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-title span {
  color: var(--muted);
  font-size: 0.92rem;
}

.services-editor {
  display: grid;
  gap: 14px;
}

.service-row {
  display: grid;
  grid-template-columns: minmax(180px, 0.36fr) 1fr;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.actions {
  display: flex;
  justify-content: flex-end;
}

@media (max-width: 780px) {
  .login-layout,
  .admin-header,
  .section-title,
  .service-row {
    display: grid;
  }

  .field-grid {
    grid-template-columns: 1fr;
  }
}
