@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Space+Grotesk:wght@500;600;700&display=swap");

:root {
  --dhruv-ink: #07101f;
  --dhruv-rail: #081322;
  --dhruv-panel: #101d31;
  --dhruv-panel-2: #14243b;
  --dhruv-line: rgba(153, 185, 222, 0.14);
  --dhruv-line-strong: rgba(91, 180, 235, 0.34);
  --dhruv-text: #f6f9ff;
  --dhruv-muted: #93a5bd;
  --dhruv-blue: #367df5;
  --dhruv-cyan: #55c4e1;
  --dhruv-green: #58d5a2;
  --dhruv-amber: #f0bd58;
  --dhruv-red: #ff7b82;
  --dhruv-radius: 18px;
  --dhruv-shadow: 0 22px 70px rgba(0, 5, 15, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--dhruv-ink);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--dhruv-text) !important;
  background:
    radial-gradient(circle at 74% 4%, rgba(54, 125, 245, 0.14), transparent 31rem),
    radial-gradient(circle at 92% 72%, rgba(85, 196, 225, 0.07), transparent 26rem),
    linear-gradient(135deg, #091525 0%, #07101f 54%, #091829 100%) !important;
  font-family: "Manrope", sans-serif !important;
  letter-spacing: -0.012em;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
  opacity: 0.34;
  background-image:
    linear-gradient(rgba(126, 174, 222, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(126, 174, 222, 0.035) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: linear-gradient(to bottom, black, transparent 78%);
}

body > header {
  position: fixed !important;
  inset: 0 auto 0 0;
  z-index: 20;
  display: flex !important;
  width: 248px;
  min-height: 100vh;
  padding: 24px 18px !important;
  align-items: stretch !important;
  flex-direction: column;
  gap: 14px !important;
  border-right: 1px solid var(--dhruv-line) !important;
  background:
    radial-gradient(circle at 18% 8%, rgba(54, 125, 245, 0.2), transparent 12rem),
    rgba(6, 15, 28, 0.96) !important;
  box-shadow: 24px 0 70px rgba(0, 5, 15, 0.2);
  backdrop-filter: blur(20px);
}

body > header::after {
  display: block;
  margin-top: auto;
  padding: 15px 14px;
  color: var(--dhruv-muted);
  border: 1px solid var(--dhruv-line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
  content: "Create  •  Deploy  •  Engage\A a Nila-AV product";
  font-size: 10px;
  font-weight: 700;
  line-height: 1.8;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: pre;
}

body > header > :first-child {
  display: grid !important;
  width: 48px;
  height: 48px;
  margin-bottom: 2px;
  place-items: center;
  color: white !important;
  border: 1px solid rgba(112, 187, 255, 0.36);
  border-radius: 14px;
  background: linear-gradient(145deg, #2459dd, #53bde6) !important;
  box-shadow: 0 12px 30px rgba(43, 112, 238, 0.32);
  font-family: "Space Grotesk", sans-serif;
  font-size: 24px;
  font-weight: 700;
}

body > header > :nth-child(2) {
  margin-bottom: 18px;
  color: var(--dhruv-text) !important;
  font-family: "Space Grotesk", sans-serif;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.25;
}

body > header a,
body > header button {
  width: 100%;
}

body > header a {
  display: flex !important;
  min-height: 46px;
  padding: 0 14px !important;
  align-items: center;
  color: #c3d1e4 !important;
  border: 1px solid transparent !important;
  border-radius: 12px !important;
  background: transparent !important;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: 160ms ease;
}

body > header a:hover {
  color: white !important;
  border-color: var(--dhruv-line-strong) !important;
  background: rgba(54, 125, 245, 0.12) !important;
  transform: translateX(2px);
}

body > header > :last-child:not(a) {
  display: flex;
  min-height: 42px;
  padding: 0 12px;
  align-items: center;
  gap: 8px;
  color: #a9b9cd !important;
  border: 1px solid rgba(88, 213, 162, 0.18);
  border-radius: 12px;
  background: rgba(88, 213, 162, 0.055) !important;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

body > header > :last-child:not(a)::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--dhruv-green);
  box-shadow: 0 0 0 5px rgba(88, 213, 162, 0.08);
  content: "";
}

body > main {
  width: auto !important;
  max-width: 1540px !important;
  min-height: 100vh;
  margin: 0 0 0 248px !important;
  padding: 42px clamp(24px, 4vw, 64px) 70px !important;
}

h1,
h2,
h3,
strong {
  font-family: "Space Grotesk", sans-serif;
}

h1 {
  margin: 0 0 8px !important;
  font-size: clamp(32px, 4vw, 54px) !important;
  line-height: 1 !important;
  letter-spacing: -0.055em;
}

h2 {
  margin: 0;
  font-size: 19px !important;
  letter-spacing: -0.025em;
}

h3 {
  margin: 0 0 8px;
  font-size: 15px !important;
}

p {
  color: var(--dhruv-muted);
  line-height: 1.65;
}

main > div,
main > section,
.panel,
.card,
.licence-card {
  border-color: var(--dhruv-line) !important;
}

#workspace,
#login-view {
  animation: dhruv-enter 500ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

#workspace > section,
#workspace > div,
#login-view > section,
#login-view > div,
.panel,
.licence-card {
  border: 1px solid var(--dhruv-line) !important;
  border-radius: var(--dhruv-radius) !important;
  background:
    linear-gradient(145deg, rgba(23, 41, 66, 0.96), rgba(13, 27, 46, 0.96)) !important;
  box-shadow: var(--dhruv-shadow) !important;
}

#workspace > section,
#workspace > div {
  padding: clamp(20px, 2.5vw, 30px) !important;
}

#super-controls {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px !important;
}

#tenant-summary,
#screen-list {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px !important;
}

.tenant-list .tenant {
  color: var(--dhruv-text) !important;
  border: 1px solid var(--dhruv-line) !important;
  background: rgba(5, 16, 31, 0.72) !important;
}

.tenant-list .tenant span,
.tenant-list .tenant strong,
.tenant-list .tenant small {
  color: var(--dhruv-text) !important;
}

.tenant-list .tenant small {
  color: var(--dhruv-muted) !important;
}

.licence-card {
  position: relative;
  overflow: hidden;
  padding: 20px !important;
  box-shadow: none !important;
}

.licence-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(var(--dhruv-cyan), var(--dhruv-blue));
  content: "";
}

form {
  display: grid;
  gap: 14px !important;
}

label {
  display: block;
  margin: 0 0 7px !important;
  color: #aebed2 !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase;
}

input,
select,
textarea {
  width: 100% !important;
  min-height: 49px !important;
  padding: 0 14px !important;
  color: var(--dhruv-text) !important;
  border: 1px solid rgba(147, 171, 202, 0.22) !important;
  border-radius: 12px !important;
  outline: none !important;
  background: rgba(3, 11, 22, 0.6) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025) !important;
  font-family: "Manrope", sans-serif !important;
  font-size: 14px !important;
  font-weight: 600;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

textarea {
  min-height: 110px !important;
  padding-top: 12px !important;
  resize: vertical;
}

select {
  padding-right: 42px !important;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--dhruv-cyan) 50%), linear-gradient(135deg, var(--dhruv-cyan) 50%, transparent 50%) !important;
  background-position: calc(100% - 19px) 21px, calc(100% - 14px) 21px !important;
  background-repeat: no-repeat !important;
  background-size: 5px 5px, 5px 5px !important;
}

input:hover,
select:hover,
textarea:hover {
  border-color: rgba(112, 177, 229, 0.4) !important;
  background-color: rgba(5, 16, 31, 0.82) !important;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--dhruv-cyan) !important;
  background-color: rgba(4, 15, 30, 0.96) !important;
  box-shadow: 0 0 0 4px rgba(85, 196, 225, 0.12), 0 12px 30px rgba(0, 7, 18, 0.22) !important;
}

input::placeholder,
textarea::placeholder {
  color: #60738e !important;
}

input[type="date"],
input[type="datetime-local"] {
  color-scheme: dark;
}

button,
.primary,
.secondary {
  min-height: 45px;
  padding: 0 18px !important;
  border: 1px solid rgba(109, 181, 235, 0.28) !important;
  border-radius: 11px !important;
  color: white !important;
  background: rgba(21, 40, 66, 0.95) !important;
  box-shadow: none !important;
  font-family: "Manrope", sans-serif !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  letter-spacing: 0.015em;
  cursor: pointer;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

button:hover,
.secondary:hover {
  border-color: rgba(85, 196, 225, 0.68) !important;
  background: rgba(29, 57, 92, 0.98) !important;
  transform: translateY(-1px);
}

button:focus-visible,
.secondary:focus-visible {
  outline: 3px solid rgba(85, 196, 225, 0.28) !important;
  outline-offset: 2px;
}

button.primary,
.primary,
button[type="submit"] {
  border-color: transparent !important;
  background: linear-gradient(135deg, var(--dhruv-blue), #46bde0) !important;
  box-shadow: 0 10px 25px rgba(42, 119, 235, 0.24) !important;
}

button.primary:hover,
.primary:hover,
button[type="submit"]:hover {
  background: linear-gradient(135deg, #478bf7, #61cce7) !important;
  box-shadow: 0 14px 34px rgba(42, 119, 235, 0.34) !important;
}

button:disabled {
  cursor: not-allowed !important;
  filter: grayscale(0.5);
  opacity: 0.5 !important;
  transform: none !important;
}

code {
  padding: 5px 9px !important;
  color: #bfeeff !important;
  border: 1px solid rgba(85, 196, 225, 0.2);
  border-radius: 999px;
  background: rgba(85, 196, 225, 0.07) !important;
  font-family: "Manrope", sans-serif !important;
  font-size: 11px !important;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hidden {
  display: none !important;
}

#workspace-message,
#login-message {
  min-height: 20px;
  color: var(--dhruv-amber) !important;
  font-size: 12px;
  font-weight: 700;
}

@keyframes dhruv-enter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 920px) {
  body > header {
    position: sticky !important;
    inset: 0;
    width: 100%;
    min-height: 0;
    padding: 13px 16px !important;
    align-items: center !important;
    flex-direction: row;
    border-right: 0 !important;
    border-bottom: 1px solid var(--dhruv-line) !important;
  }

  body > header::after,
  body > header > :last-child:not(a) {
    display: none;
  }

  body > header > :first-child {
    width: 38px;
    height: 38px;
    margin: 0;
    border-radius: 11px;
    font-size: 18px;
  }

  body > header > :nth-child(2) {
    margin: 0 auto 0 0;
    font-size: 14px;
  }

  body > header a {
    width: auto;
    min-height: 38px;
    padding: 0 11px !important;
  }

  body > main {
    margin: 0 !important;
    padding: 28px 16px 50px !important;
  }

  #super-controls {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  h1 {
    font-size: 34px !important;
  }

  body > header > :nth-child(2) {
    max-width: 130px;
  }

  #workspace > section,
  #workspace > div {
    padding: 18px !important;
  }

  #tenant-summary,
  #screen-list {
    grid-template-columns: 1fr !important;
  }

  button,
  .primary,
  .secondary {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
