:root {
  --bg: #16171a;
  --panel: #1f2024;
  --panel-hover: #25262b;
  --panel-raised: #2a2c31;
  --border: #2c2d33;
  --border-strong: #43454d;
  --accent: #a9c1a4;
  --danger: #dba096;
  --text: #e7e5e0;
  --text-soft: #b7b4ad;
  --text-dim: #a19e97;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 10px;
  --font-sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "Consolas", monospace;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- Лаунчер: боковая панель + сетка карточек ---------- */

.shell {
  display: flex;
  flex-wrap: wrap;
  min-height: 100vh;
}

.side {
  flex: 1 1 240px;
  max-width: 280px;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding: 40px 24px;
  border-right: 1px solid #26272c;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.brand__name {
  font-weight: 700;
  font-size: 1.625rem;
  letter-spacing: 0.04em;
}

.brand__host {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
}

.side__nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.side__link {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.9375rem;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.side__link:hover,
.side__link:focus-visible {
  background: #232428;
  color: var(--text);
}

.side__link--active {
  background: #232428;
  color: var(--text);
  font-weight: 600;
}

.side__logout {
  margin: auto 0 0;
}

.side__logout .btn {
  width: 100%;
}

.content {
  flex: 999 1 560px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding: 40px clamp(1rem, 4vw, 3.5rem) 4rem;
}

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

.content__title {
  margin: 0;
  font-size: clamp(1.75rem, 3.4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.content__lead {
  margin: 0;
  color: var(--text-dim);
}

.status {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.9rem;
  min-height: 1.2rem;
}

.status[data-error="true"] {
  color: var(--danger);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 16px;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--text);
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.card:hover,
.card:focus-visible {
  background: var(--panel-hover);
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.card:hover .card__icon,
.card:focus-visible .card__icon {
  background: var(--accent);
  color: var(--bg);
}

.card__top {
  display: flex;
  align-items: center;
  gap: 14px;
}

.card__icon {
  flex: none;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--panel-raised);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.card__name {
  margin: 0;
  font-weight: 600;
  font-size: 1.0625rem;
  line-height: 1.2;
}

.card__domain {
  margin: 3px 0 0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  word-break: break-all;
}

.card__description {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-soft);
}

/* ---------- Шапка внутренних страниц (Office, доступ по ссылке) ---------- */

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 2rem clamp(1rem, 4vw, 3rem) 1rem;
}

.header__title {
  margin: 0;
  font-weight: 700;
  font-size: 1.625rem;
  letter-spacing: 0.04em;
}

main {
  padding: 1rem clamp(1rem, 4vw, 3rem) 3rem;
}

@media (max-width: 720px) {
  .side {
    flex-basis: 100%;
    max-width: none;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 24px;
    padding: 20px 16px;
    border-right: none;
    border-bottom: 1px solid #26272c;
  }

  .side__nav {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .side__logout {
    margin: 0 0 0 auto;
  }

  .side__logout .btn {
    width: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .card,
  .card__icon,
  .side__link {
    transition: none;
  }

  .card:hover,
  .card:focus-visible {
    transform: none;
  }
}

.status:empty {
  display: none;
}
