﻿:root {
  --bg: #060b1a;
  --bg-soft: #0b1430;
  --panel: #0f1b36;
  --panel-2: #122244;
  --line: #203256;
  --text: #e6edf9;
  --muted: #8d9fbe;
  --accent: #4da3ff;
  --accent-soft: rgba(77, 163, 255, 0.16);
  --danger: #ff7c7c;
  --ok: #51d39d;
  --shadow: 0 20px 45px rgba(2, 8, 22, 0.45);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 480px at 80% -50px, #1d315e 0%, transparent 60%),
    radial-gradient(1000px 420px at -20% 100%, #10204b 0%, transparent 60%),
    var(--bg);
}

.hidden {
  display: none !important;
}

.tenant-shell {
  width: 100%;
  min-height: 100vh;
}

.tenant-card {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.kicker {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 11px;
  color: var(--muted);
  font-weight: 700;
}

.tenant-auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 24px;
  align-items: center;
  padding: 28px;
}

.tenant-hero {
  padding: 16px;
}

.tenant-hero h1 {
  margin: 10px 0 14px;
  font-family: "Montserrat", "Segoe UI", sans-serif;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.02;
}

.tenant-hero p {
  margin: 0;
  color: var(--muted);
  max-width: 60ch;
  line-height: 1.6;
}

.tenant-login {
  padding: 22px;
  display: grid;
  gap: 11px;
}

.tenant-login h2 {
  margin: 0 0 6px;
  font-family: "Montserrat", "Segoe UI", sans-serif;
  font-size: 30px;
}

label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}

input,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0b1834;
  color: var(--text);
  padding: 10px 11px;
  font-size: 14px;
  outline: none;
  transition: border-color 160ms, box-shadow 160ms;
}

input:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(77, 163, 255, 0.2);
}

button {
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 9px 12px;
  cursor: pointer;
  font-weight: 700;
  background: var(--accent);
  color: #07152e;
  font-size: 13px;
}

button.ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}

button.danger {
  background: rgba(255, 124, 124, 0.12);
  color: var(--danger);
  border-color: rgba(255, 124, 124, 0.35);
}

.status {
  min-height: 18px;
  margin: 0;
  font-size: 13px;
}

.status.ok {
  color: var(--ok);
}

.status.err {
  color: var(--danger);
}

.tenant-dashboard {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 242px minmax(0, 1fr);
}

.tenant-sidebar {
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, #0a1530, #081126);
  padding: 22px 18px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 20px;
}

.tenant-brand h2 {
  margin: 6px 0 0;
  font-family: "Montserrat", "Segoe UI", sans-serif;
  font-size: 23px;
  line-height: 1.1;
}

.tenant-nav {
  display: grid;
  gap: 8px;
  align-content: start;
}

.nav-item {
  position: relative;
  border: 0;
  background: none;
  color: var(--muted);
  text-align: left;
  border-radius: 0;
  padding: 3px 0 3px 12px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}

.nav-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 2px;
  border-radius: 1px;
  background: transparent;
}

.nav-item:hover {
  color: #c8d5ee;
}

.nav-item.active {
  color: #ffffff;
}

.nav-item.active::before {
  background: var(--accent);
}

.tenant-user {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}

.tenant-main {
  padding: 16px;
  display: grid;
  gap: 12px;
}

.tenant-top {
  background: linear-gradient(180deg, #0f1f3f, #0d1b38);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.tenant-top h3 {
  margin: 4px 0 0;
  font-family: "Montserrat", "Segoe UI", sans-serif;
  font-size: 22px;
}

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

.section-panel {
  display: none;
  gap: 10px;
}

.section-panel.active {
  display: grid;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.section-head h3 {
  margin: 0;
  font-family: "Montserrat", "Segoe UI", sans-serif;
  font-size: 19px;
}

.mini-btn {
  border: 1px solid var(--line);
  background: transparent;
  color: #d4dff3;
  padding: 7px 10px;
  font-size: 12px;
  border-radius: 8px;
}

.mini-btn:hover {
  border-color: #2d4b7f;
  background: rgba(77, 163, 255, 0.08);
}

.tenant-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.metric {
  padding: 12px 13px;
}

.metric p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.metric strong {
  display: block;
  margin-top: 6px;
  font-family: "Montserrat", "Segoe UI", sans-serif;
  font-size: clamp(22px, 2.6vw, 30px);
}

.list-block {
  padding: 12px;
}

.list-block h3 {
  margin: 0 0 8px;
  font-family: "Montserrat", "Segoe UI", sans-serif;
  font-size: 17px;
}

.inline-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.inline-head h3 {
  margin: 0;
}

.scroll {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(5, 14, 34, 0.58);
  max-height: 360px;
  overflow: auto;
}

ul {
  margin: 0;
  padding: 8px;
  list-style: none;
}

li {
  border: 1px solid rgba(42, 63, 101, 0.9);
  border-radius: 8px;
  padding: 8px 9px;
  margin-bottom: 7px;
  font-size: 13px;
  color: #d6e0f3;
  background: rgba(9, 19, 42, 0.85);
}

li strong {
  display: block;
  margin-bottom: 2px;
}

li small {
  color: var(--muted);
  line-height: 1.45;
}

.info-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(8, 18, 40, 0.78);
  color: #d5e0f4;
  padding: 12px;
  font-size: 14px;
  line-height: 1.55;
}

.tenant-lists {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.tenant-lists.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 7, 18, 0.78);
  z-index: 90;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 91;
  display: grid;
  place-items: center;
  padding: 14px;
}

.modal-card {
  width: min(560px, 100%);
  background: linear-gradient(180deg, #13254a, #101f3e);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 22px 56px rgba(2, 8, 21, 0.58);
  padding: 14px;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.modal-head h3 {
  margin: 0;
  font-family: "Montserrat", "Segoe UI", sans-serif;
  font-size: 21px;
}

.icon-close {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  padding: 6px 9px;
  font-size: 12px;
}

.stack {
  display: grid;
  gap: 9px;
}

@media (max-width: 1080px) {
  .tenant-auth {
    grid-template-columns: 1fr;
  }

  .tenant-dashboard {
    grid-template-columns: 1fr;
  }

  .tenant-sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    grid-template-rows: auto;
    gap: 12px;
  }

  .tenant-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .nav-item {
    font-size: 13px;
    padding-left: 10px;
  }

  .tenant-metrics,
  .tenant-lists,
  .tenant-lists.two,
  .section-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .tenant-auth,
  .tenant-main {
    padding: 12px;
  }

  .tenant-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .tenant-top-actions {
    width: 100%;
  }

  .tenant-top-actions button {
    flex: 1;
  }

  .tenant-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
