:root {
  --brand-700: #0a4fc0;
  --brand-600: #0f6ee9;
  --brand-500: #2d8df6;
  --brand-100: #e7f1ff;
  --brand-50: #f3f8ff;

  --bg-page: #eff4ff;
  --bg-soft: #f7faff;
  --bg-panel: #ffffff;
  --bg-elevated: #ffffff;

  --text-strong: #10223e;
  --text-default: #243b5a;
  --text-muted: #627793;
  --text-on-brand: #ffffff;

  --border-default: #d7e3f3;
  --border-strong: #b8cde7;
  --border-soft: #e6eef9;
  --focus-ring: rgba(15, 110, 233, 0.32);
  --shadow-md: 0 10px 24px rgba(11, 34, 72, 0.1);
  --shadow-sm: 0 6px 16px rgba(11, 34, 72, 0.07);

  --ok-bg: #eaf8f0;
  --ok-border: #bee5cf;
  --ok-text: #166840;

  --info-bg: #eaf2ff;
  --info-border: #c6dafb;
  --info-text: #0b4ea3;

  --danger-bg: #fdecef;
  --danger-text: #922437;

  --surface-muted: #f4f7fc;
  --surface-strong: #eef4ff;
  --admin-accent: #173f86;
  --admin-accent-soft: #e9f0ff;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Manrope, "Segoe UI", sans-serif;
  color: var(--text-default);
  background:
    radial-gradient(70rem 40rem at 12% 0%, #ddeaff 0%, rgba(221, 234, 255, 0) 56%),
    radial-gradient(50rem 35rem at 100% 100%, #d8e8ff 0%, rgba(216, 232, 255, 0) 52%),
    linear-gradient(160deg, var(--bg-page) 0%, var(--bg-soft) 100%);
  min-height: 100vh;
}
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}
.card {
  background: var(--bg-panel);
  border: 1px solid var(--border-default);
  border-radius: 14px;
  box-shadow: var(--shadow-md);
  padding: 18px;
  margin-bottom: 14px;
}
.card-tight { margin-bottom: 10px; }
.form { max-width: 460px; margin: 30px auto; }
h1, h2, h3, h4 { color: var(--text-strong); }
h1 { margin: 0 0 10px; font-size: 28px; }
h2 { margin: 0 0 8px; font-size: 24px; }
p { margin: 0 0 14px; color: var(--text-muted); }
label { display: block; font-weight: 700; margin: 12px 0 6px; }
input, select, textarea {
  width: 100%;
  color: var(--text-default);
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: 10px;
  padding: 10px 11px;
  font-size: 14px;
}
input::placeholder, textarea::placeholder { color: var(--text-muted); }
button {
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  background: linear-gradient(130deg, var(--brand-600), var(--brand-700));
  color: var(--text-on-brand);
  font-weight: 700;
  cursor: pointer;
  transition: filter .16s ease, transform .16s ease, box-shadow .16s ease;
}
button:hover {
  filter: brightness(1.03);
  transform: translateY(-1px);
}
button:disabled {
  opacity: .5;
  cursor: not-allowed;
  transform: none;
}
.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  color: var(--text-strong);
  border: 1px solid var(--border-default);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.social-btn:hover {
  background: var(--brand-50);
  border-color: var(--border-strong);
}
.social-btn:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 3px var(--focus-ring);
}
.social-icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 20px;
}
.social-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}
.social-icon-linkedin {
  border-radius: 4px;
  overflow: hidden;
}
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row-gap-sm { margin-top: 8px; }
.row-gap-md { margin-top: 14px; }
.legal-consent {
  margin-top: 12px;
  padding: 10px;
  border: 1px solid var(--border-default);
  border-radius: 10px;
  background: var(--surface-muted);
}
.legal-consent-check {
  margin: 0;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-weight: 600;
}
.legal-consent-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  flex: 0 0 auto;
}
.legal-consent-links {
  margin: 8px 0 0;
  font-size: 13px;
}
.legal-consent-links a {
  color: var(--brand-700);
}
.row-band {
  margin: 10px 0 8px;
  padding: 8px 10px;
  border-radius: 12px;
  background: var(--surface-muted);
  border: 1px solid var(--border-default);
}
.row-between { justify-content: space-between; }
.row-y-sm { margin: 6px 0; }
.mt-8 { margin-top: 8px; }
.mt-10 { margin-top: 10px; }
.section-title {
  margin: 14px 0 8px;
  font-size: 18px;
}
.hero {
  color: var(--text-on-brand);
  background: linear-gradient(130deg, #3fa0ff, #1971e6);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.hero-light {
  background: linear-gradient(130deg, #3fa0ff, #1971e6);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.hero-admin {
  border-color: rgba(17, 57, 122, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.26),
    0 14px 28px rgba(13, 53, 121, 0.24);
}
.hero p { color: rgba(255, 255, 255, 0.85); }
.hero h1,
.hero h2,
.hero h3 {
  color: #fff;
}
.brand-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-logo-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.26);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.brand-logo {
  width: 30px;
  height: 30px;
  object-fit: contain;
  flex: 0 0 auto;
}
.brand-copy h1 {
  margin-bottom: 4px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-shadow: 0 1px 2px rgba(6, 32, 79, 0.2);
}
.brand-copy p {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.9);
}
.trust-row { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.hero .badge {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.24);
}
.hero .admin-badge {
  background: rgba(234, 248, 240, 0.95);
  color: #1a6e48;
  border-color: rgba(190, 229, 207, 0.9);
}
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.nav-wrap { display: flex; gap: 18px; flex-wrap: wrap; }
.nav-group { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.nav-title { font-weight: 700; color: var(--text-muted); font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
.nav-card {
  border-color: var(--border-default);
  box-shadow: var(--shadow-sm);
}
.admin-nav-card {
  border-color: #c2d6f4;
  box-shadow: 0 10px 24px rgba(13, 53, 121, 0.11);
  background: linear-gradient(180deg, #fbfdff 0%, #f2f7ff 100%);
}
.admin-nav-card .nav-title {
  color: var(--admin-accent);
}
.nav-link {
  border: 1px solid var(--border-default);
  border-radius: 999px;
  padding: 7px 12px;
  background: var(--bg-elevated);
  color: var(--text-strong);
  font-weight: 700;
}
.nav-link:hover {
  border-color: var(--border-strong);
  background: var(--brand-50);
}
.nav-link.active {
  border-color: transparent;
  background: linear-gradient(130deg, var(--brand-600), var(--brand-700));
  color: var(--text-on-brand);
}
.admin-nav-card .nav-link.active {
  background: linear-gradient(130deg, #1f56ba, #123b82);
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 3px 10px rgba(16, 50, 109, 0.28);
}
.admin-nav-card .nav-link:hover {
  border-color: #aec6ea;
  background: #edf4ff;
}
.org-row { margin: 0 0 10px; }
.notice {
  color: var(--ok-text);
  background: var(--ok-bg);
  border: 1px solid var(--ok-border);
  border-radius: 10px;
  padding: 8px 10px;
  margin-bottom: 10px;
  font-weight: 700;
}
.loading {
  color: var(--info-text);
  background: var(--info-bg);
  border: 1px solid var(--info-border);
  border-radius: 10px;
  padding: 8px 10px;
  margin-bottom: 10px;
  font-weight: 700;
}
.error { color: var(--danger-text); font-weight: 700; margin-top: 10px; white-space: pre-wrap; }
.link {
  color: var(--brand-700);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  background: none;
  border: 0;
  padding: 0;
}
.badge {
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--surface-muted);
  border: 1px solid var(--border-default);
  color: var(--text-default);
  font-size: 12px;
}
.badge.bad { background: var(--danger-bg); color: var(--danger-text); border-color: transparent; }
.badge.ok { background: var(--ok-bg); color: var(--ok-text); border-color: transparent; }
ul { margin: 10px 0 0; padding-left: 20px; }

.toolbar {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  align-items: end;
}
.toolbar > button {
  align-self: end;
  min-height: 40px;
}
.toolbar-compact { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }

.table-wrap { overflow:auto; }
.table-gap { margin-top: 12px; }
.grid-table {
  width:100%;
  border-collapse: collapse;
  font-size: 13px;
}
.grid-table th, .grid-table td {
  border-bottom:1px solid var(--border-soft);
  padding:10px 9px;
  text-align:left;
  vertical-align: top;
}
.grid-table th {
  background: var(--brand-50);
  color: var(--text-strong);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}
.grid-table td {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
}
.grid-table tbody tr:hover { background: #f6f9ff; }
.th-sort {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  color: #1b355e;
  border: 0;
  padding: 0;
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}
.th-sort:hover {
  color: #123f8e;
  text-decoration: underline;
}
.actions {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
  align-items: center;
  white-space: nowrap;
}
.actions button {
  padding: 6px 9px;
  font-size: 12px;
  min-height: 30px;
  width: auto;
  flex: 0 0 auto;
}
.actions button[disabled] {
  opacity: .48;
  cursor: not-allowed;
  filter: grayscale(0.08);
}
.pager-row { margin-top: 10px; }

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.nav-link:focus-visible,
.link:focus-visible,
.th-sort:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--focus-ring);
}

@media (max-width: 980px) {
  .container { padding: 18px 12px 28px; }
  .card { padding: 14px; border-radius: 12px; }
  h1 { font-size: 24px; }
  h2 { font-size: 21px; }
  .nav-wrap { gap: 10px; }
  .nav-group { gap: 6px; }
  .nav-link { padding: 6px 10px; }
}

@media (max-width: 720px) {
  .form { max-width: 100%; margin: 12px auto; }
  .row { gap: 6px; }
  .brand-logo-wrap { width: 38px; height: 38px; border-radius: 10px; }
  .brand-logo { width: 24px; height: 24px; }
  .brand-copy h1 { font-size: 22px; }
  .hero { padding: 14px; }
  button { width: 100%; min-height: 40px; }
  .row .link { width: auto; }
  .actions { width: auto; }
  .actions button { flex: 0 0 auto; }
  .grid-table { font-size: 12px; min-width: 720px; }
}
