:root {
  --bg: #f5f7f8;
  --panel: #ffffff;
  --ink: #172022;
  --muted: #667276;
  --line: #dbe2e4;
  --accent: #006d77;
  --accent-strong: #00565f;
  --warning: #9d2f2f;
  --shadow: 0 18px 50px rgba(23, 32, 34, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
}

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

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0 24px;
}

.eyebrow,
.category {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 0;
  font-size: clamp(30px, 5vw, 52px);
  line-height: 1;
}

.status {
  min-width: 120px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--muted);
  text-align: center;
}

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

.workspace {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 20px;
}

.side {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tab,
button,
.open {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  text-decoration: none;
}

.tab {
  width: 100%;
  padding: 0 14px;
  text-align: left;
}

.tab.active,
button[type="submit"],
.open {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.content {
  min-width: 0;
}

.toolbar {
  display: grid;
  grid-template-columns: 1fr 120px;
  gap: 10px;
  margin-bottom: 16px;
}

input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.secondary:hover,
.tab:hover {
  border-color: var(--accent);
}

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

.service,
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.service {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 188px;
  padding: 18px;
}

.service h2,
.panel h2 {
  margin-bottom: 8px;
  font-size: 20px;
}

.description {
  color: var(--muted);
  line-height: 1.5;
}

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

.service.admin .actions {
  grid-template-columns: 1fr 96px;
}

.open,
.delete,
button[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
}

.delete {
  color: var(--warning);
}

.hidden {
  display: none !important;
}

.error {
  margin-bottom: 14px;
  color: var(--warning);
}

.panel {
  margin-top: 18px;
  padding: 18px;
}

.formGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

label {
  color: var(--muted);
  font-size: 13px;
}

label input {
  margin-top: 6px;
}

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

.empty {
  grid-column: 1 / -1;
  color: var(--muted);
}

@media (max-width: 760px) {
  .shell {
    width: min(100% - 20px, 1180px);
    padding-top: 14px;
  }

  .topbar,
  .workspace {
    display: block;
  }

  .topActions {
    align-items: stretch;
    flex-direction: column;
  }

  .status {
    margin-top: 16px;
  }

  .side {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 14px;
  }

  .tab {
    text-align: center;
  }

  .toolbar,
  .grid,
  .formGrid {
    grid-template-columns: 1fr;
  }
}
