:root {
  --primary: #138bff;
  --primary-strong: #0066ff;
  --bg: #f7fbff;
  --card: #ffffff;
  --muted: #f2f7fc;
  --border: #d7e4f1;
  --text: #07183d;
  --text-muted: #4f5d75;
  --sidebar-width: 220px;
}

* {
  box-sizing: border-box;
}

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

body {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}

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

a {
  color: inherit;
}

.muted {
  color: var(--text-muted);
}

.cockpit-body {
  height: 100vh;
  overflow: hidden;
}

.cockpit-shell {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

.cockpit-left-panel {
  flex: 1;
  position: relative;
  padding: 60px;
  overflow: hidden;
  background: linear-gradient(135deg, #ffffff 0%, #f2f9ff 100%);
}

.cockpit-logo {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 80px;
  text-decoration: none;
}

.cockpit-logo-mark,
.cockpit-login-logo {
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, #46c2ff, #0066ff);
  box-shadow: 0 14px 35px rgba(0, 102, 255, .18);
}

.cockpit-logo-mark {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  font-weight: 800;
  letter-spacing: 1px;
}

.cockpit-logo-image {
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  object-fit: contain;
}

.cockpit-logo-text {
  max-width: 150px;
  color: #0d1d45;
  font-weight: 700;
  line-height: 1.2;
}

.cockpit-headline {
  max-width: 720px;
  position: relative;
  z-index: 2;
}

.cockpit-headline h1 {
  font-size: clamp(48px, 5vw, 72px);
  line-height: 1.05;
  color: #07183d;
  font-weight: 300;
  margin-bottom: 25px;
}

.cockpit-headline h1 span {
  color: var(--primary);
  font-weight: 700;
}

.cockpit-headline p {
  font-size: clamp(19px, 2vw, 28px);
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 700px;
}

.cockpit-wave {
  position: absolute;
  bottom: -120px;
  left: -10%;
  width: 140%;
  height: 420px;
  background: radial-gradient(circle at center, rgba(0, 170, 255, .9), rgba(0, 120, 255, 0) 70%);
  filter: blur(40px);
  animation: cockpit-wave-move 12s ease-in-out infinite;
  opacity: .8;
}

@keyframes cockpit-wave-move {
  0% {
    transform: translateX(0);
  }

  50% {
    transform: translateX(-80px);
  }

  100% {
    transform: translateX(0);
  }
}

.cockpit-square {
  position: absolute;
  background: rgba(0, 140, 255, .08);
  transform: rotate(45deg);
  animation: cockpit-float 12s infinite ease-in-out;
  backdrop-filter: blur(10px);
}

.cockpit-square-one {
  width: 80px;
  height: 80px;
  top: 120px;
  right: 220px;
}

.cockpit-square-two {
  width: 120px;
  height: 120px;
  top: 260px;
  right: 100px;
}

.cockpit-square-three {
  width: 60px;
  height: 60px;
  top: 420px;
  right: 280px;
}

@keyframes cockpit-float {
  0% {
    transform: translateY(0) rotate(45deg);
  }

  50% {
    transform: translateY(-20px) rotate(45deg);
  }

  100% {
    transform: translateY(0) rotate(45deg);
  }
}

.cockpit-right-panel {
  width: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  position: relative;
}

.cockpit-login-card {
  width: 100%;
  background: rgba(255, 255, 255, .82);
  border-radius: 28px;
  padding: 50px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .08);
  backdrop-filter: blur(12px);
}

.create-account-card {
  padding-top: 34px;
  padding-bottom: 34px;
}

.cockpit-login-logo {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  margin: 0 auto 20px;
  font-weight: 800;
  letter-spacing: 1px;
}

.cockpit-login-logo-image {
  display: block;
  width: 96px;
  height: 96px;
  margin: 0 auto 18px;
  object-fit: contain;
}

.portal-title {
  text-align: center;
  font-size: 36px;
  letter-spacing: 4px;
  color: #0d1d45;
  margin-bottom: 10px;
}

.portal-sub {
  text-align: center;
  color: #2f6ca8;
  margin-bottom: 40px;
}

.input-group {
  margin-bottom: 22px;
}

input,
select,
textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  font: inherit;
  background: #ffffff;
  color: var(--text);
  transition: border-color .2s, box-shadow .2s;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #1590ff;
  box-shadow: 0 0 0 4px rgba(21, 144, 255, .1);
}

.btn,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  border: none;
  border-radius: 14px;
  padding: 12px 18px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s, background .2s;
}

.btn-primary {
  width: 100%;
  padding: 18px;
  letter-spacing: 2px;
  background: linear-gradient(90deg, #46c2ff, #0066ff);
  color: #ffffff;
  margin-top: 10px;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 102, 255, .25);
}

.btn-secondary {
  width: 100%;
  padding: 16px;
  letter-spacing: 2px;
  background: #ffffff;
  border: 2px solid #0d6efd;
  color: #0d6efd;
}

.create-account-link {
  display: block;
  margin-top: 18px;
  text-align: center;
  color: #0d6efd;
  font-weight: 700;
  text-decoration: none;
}

.create-account-link:hover {
  text-decoration: underline;
}

.signup-result {
  margin-top: 16px;
}

.signup-result label,
.mfa-secret label,
.mfa-uri label {
  display: block;
  margin-bottom: 6px;
  color: #4b5c7d;
  font-size: 13px;
  font-weight: 700;
}

.password-rules {
  margin: -8px 0 10px;
  color: #4b5c7d;
  font-size: 13px;
  line-height: 1.45;
}

.mfa-secret,
.mfa-uri {
  margin-top: 14px;
}

.mfa-qr {
  display: flex;
  justify-content: center;
  margin: 16px 0 18px;
}

.mfa-qr img {
  width: min(240px, 100%);
  height: auto;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #ffffff;
  padding: 12px;
}

.mfa-manual {
  margin-top: 14px;
  color: #4b5c7d;
  font-size: 13px;
}

.mfa-manual summary {
  cursor: pointer;
  font-weight: 700;
}

.mfa-steps {
  margin: 16px 0 4px;
  color: #4b5c7d;
  font-size: 13px;
  line-height: 1.45;
}

.mfa-steps ol {
  margin: 0;
  padding-left: 20px;
}

.mfa-uri textarea {
  min-height: 96px;
  resize: vertical;
  font-size: 12px;
  line-height: 1.4;
  word-break: break-all;
}

button:not(.btn-secondary):not(.btn-primary),
.btn:not(.btn-secondary):not(.btn-primary) {
  background: linear-gradient(90deg, #46c2ff, #0066ff);
  color: #ffffff;
}

button:disabled {
  opacity: .65;
  cursor: not-allowed;
}

.divider {
  text-align: center;
  margin: 30px 0;
  color: #7b8ca8;
  position: relative;
}

.divider::before,
.divider::after {
  content: "";
  position: absolute;
  width: 40%;
  height: 1px;
  background: #dfe8f2;
  top: 50%;
}

.divider::before {
  left: 0;
}

.divider::after {
  right: 0;
}

.security {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .45rem;
  margin-top: 30px;
  text-align: center;
  color: #4b5c7d;
  font-size: 14px;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  min-height: 100vh;
}

.top-menu-shell,
.login-shell {
  display: block;
}

.content {
  min-width: 0;
}

.container {
  /*max-width: 1200px;*/
  /*margin: 0 auto;
  padding: 0 18px;*/
}

.page-container {
  padding-top: 0rem;
  padding-bottom: 2rem;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: .85rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
  color: var(--text);
}

.brand-dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, #46c2ff, #0066ff);
}

.brand-logo-image {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  object-fit: contain;
}

.brand-title {
  font-weight: 800;
}

.dashboard-page {
  background:
    linear-gradient(135deg, #061322 0%, #0a1f34 46%, #102b2d 100%);
}

.dashboard-page .nav {
  background: rgba(6, 19, 34, .94);
  border-bottom-color: rgba(84, 214, 255, .35);
  color: #eef9ff;
}

.dashboard-page .brand,
.dashboard-page .top-links a {
  color: #eef9ff;
}

.dashboard-page .brand-dot {
  background: linear-gradient(135deg, #52d6ff, #9cff7a);
  box-shadow: 0 0 18px rgba(82, 214, 255, .55);
}

.dashboard-page .top-links a:hover,
.dashboard-page .top-links a.active {
  background: rgba(82, 214, 255, .16);
  border-color: rgba(156, 255, 122, .35);
}

.settings-page {
  background:
    radial-gradient(circle at 8% 4%, rgba(19, 139, 255, .18), transparent 28%),
    radial-gradient(circle at 92% 10%, rgba(255, 184, 77, .18), transparent 24%),
    linear-gradient(135deg, #f6fbff 0%, #eef7ff 54%, #f8fbf7 100%);
}

.settings-page .nav {
  background: rgba(255, 255, 255, .92);
  border-bottom-color: #b8d8ff;
}

.settings-page .brand-dot {
  background: linear-gradient(135deg, #0066ff, #29d3c3);
}

.settings-page .top-links a.active,
.settings-page .top-links a:hover {
  background: #eaf4ff;
  border-color: #9fcaff;
  color: #063b86;
}

.top-links {
  display: flex;
  align-items: center;
  gap: .35rem;
  flex-wrap: wrap;
}

.top-links a,
.side-links a {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  color: var(--text);
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: .56rem .65rem;
  font-size: .92rem;
}

.top-links a:hover,
.top-links a.active,
.side-links a:hover,
.side-links a.active {
  background: var(--muted);
  border-color: var(--border);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  width: var(--sidebar-width);
  padding: .9rem;
  overflow-y: auto;
  background: rgba(255, 255, 255, .92);
  border-right: 1px solid var(--border);
}

.side-links {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  margin-top: .9rem;
}

.card {
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1rem;
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 12px 32px rgba(0, 77, 160, .07);
  margin: .8rem 0;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin: 1rem 0 .8rem;
}

.page-header h1,
.section-heading h2 {
  margin-bottom: .2rem;
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .8rem;
}

.dashboard-card {
  width: 100vw;
  min-height: 800px;
  overflow: hidden;
}

.dashboard-page .page-container {
  padding-top: 0;
  padding-right: 0;
  padding-left: 0;
}

.dashboard-page .dashboard-card {
  background: linear-gradient(135deg, rgba(9, 31, 52, .86), rgba(6, 20, 29, .92));
  margin-top: 0;
  margin-right: 0;
  margin-left: 0;
  padding-top: 0;
  padding-right: 0;
  padding-left: 0;
  border-color: rgba(82, 214, 255, .35);
  border-top: 0;
  border-right: 0;
  border-left: 0;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .32);
}

.powerbi-frame {
  display: block;
  width: 100vw;
  height: 800px;
  border: 0;
  border-radius: 0;
  background: #ffffff;
}

.embed-placeholder {
  min-height: 720px;
  border: 2px dashed var(--border);
  border-radius: 16px;
  display: grid;
  place-content: center;
  text-align: center;
  gap: .35rem;
  background: var(--muted);
}

.embed-placeholder i {
  font-size: 2.2rem;
  color: var(--primary);
}

.form-stack,
.settings-form {
  display: flex;
  flex-direction: column;
  gap: .9rem;
}

.settings-card {
  margin: 0;
  background: rgba(255, 255, 255, .94);
  border-color: #c8ddf5;
  box-shadow: 0 16px 38px rgba(19, 93, 162, .1);
}

.settings-page .page-container {
  padding: 1.25rem 1.5rem 2rem;
}

.settings-page .page-header {
  background: linear-gradient(135deg, #0b4db3, #14a6d8 68%, #20c997);
  border-radius: 18px;
  color: #ffffff;
  margin-top: 1rem;
  padding: 1.2rem 1.35rem;
  box-shadow: 0 18px 38px rgba(11, 77, 179, .2);
}

.settings-page .page-header .muted {
  color: rgba(255, 255, 255, .82);
}

.settings-page .section-heading {
  border-bottom: 1px solid #dceafa;
  padding-bottom: .65rem;
}

.settings-page .section-heading h2 {
  color: #073b7a;
}

.settings-page .field-stack label {
  color: #23405f;
  font-weight: 700;
}

.settings-page .field-stack input {
  border-color: #bdd6f1;
  background: #fbfdff;
}

.settings-page .field-stack input:focus {
  border-color: #138bff;
  box-shadow: 0 0 0 4px rgba(19, 139, 255, .14);
}

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

.field-stack {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

.field-stack input:disabled {
  opacity: .7;
  cursor: not-allowed;
}

.settings-actions {
  display: flex;
  justify-content: flex-end;
}

.alert {
  border-radius: 14px;
  padding: .75rem .85rem;
  margin: .9rem 0;
  font-weight: 700;
}

.alert.error {
  background: #fff1f2;
  border: 1px solid #fecdd3;
  color: #9f1239;
}

.alert.success {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}

.small-note {
  font-size: .84rem;
}

.row {
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-wrap: wrap;
}

.table-wrap {
  width: 100%;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #ffffff;
  margin-top: .8rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}

th,
td {
  text-align: left;
  padding: .7rem .8rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

th {
  background: var(--muted);
  color: #0d1d45;
  font-weight: 800;
}

@media (max-width: 1100px) {
  .cockpit-body {
    height: auto;
    overflow: auto;
  }

  .cockpit-shell {
    flex-direction: column;
  }

  .cockpit-left-panel {
    min-height: 48vh;
    padding: 40px;
  }

  .cockpit-logo {
    margin-bottom: 50px;
  }

  .cockpit-right-panel {
    width: 100%;
  }
}

@media (max-width: 760px) {
  .cockpit-left-panel {
    padding: 28px;
  }

  .cockpit-headline h1 {
    font-size: 44px;
  }

  .cockpit-headline p {
    font-size: 18px;
  }

  .cockpit-right-panel {
    padding: 24px;
  }

  .cockpit-login-card {
    padding: 30px 24px;
    border-radius: 22px;
  }

  .portal-title {
    font-size: 28px;
  }

  .app-shell {
    display: block;
  }

  .sidebar {
    position: static;
    width: 100%;
    height: auto;
  }

  .nav-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .top-links {
    width: 100%;
  }

  .top-links a {
    flex: 1 1 auto;
    justify-content: center;
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }

  .section-heading {
    display: block;
  }
}
