:root {
  --bg: #020509;
  --panel: rgba(6, 9, 13, .72);
  --panel-strong: rgba(8, 11, 15, .9);
  --line: rgba(255, 255, 255, .16);
  --line-hot: rgba(255, 136, 18, .45);
  --text: #f6f2ec;
  --muted: rgba(246, 242, 236, .67);
  --soft: rgba(246, 242, 236, .45);
  --accent: #ff870e;
  --accent-2: #ffd08a;
  --danger: #ff4c2e;
  --radius: 18px;
  --shadow: 0 24px 70px rgba(0, 0, 0, .5);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
}

html {
  background: var(--bg);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.glass {
  background:
    linear-gradient(140deg, rgba(255, 255, 255, .075), rgba(255, 255, 255, .025)),
    var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .08);
  backdrop-filter: blur(24px);
}

.login-page {
  position: relative;
  overflow-x: hidden;
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 128, 0, .16), transparent 16rem),
    linear-gradient(180deg, rgba(1, 3, 6, .06), rgba(1, 3, 6, .72)),
    url("../assets/oranjestad-premium-bg.png") center top / cover no-repeat;
}

.login-page::before {
  content: "";
  position: absolute;
  inset: 0;
  min-height: 100%;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, .7), transparent 24%, transparent 74%, rgba(0, 0, 0, .72)),
    radial-gradient(circle at 50% 50%, transparent 34%, rgba(0, 0, 0, .56));
  z-index: 0;
}

.dashboard-page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.login-shell,
.brand-hero {
  position: relative;
  z-index: 1;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 48px 24px 24px;
}

.brand-hero {
  width: min(1240px, 100%);
}

.suite-title {
  text-align: center;
  margin-bottom: 40px;
}

.suite-title h1 {
  margin: 0;
  font-size: clamp(2.25rem, 5vw, 4.2rem);
  line-height: 1;
  font-weight: 800;
  letter-spacing: .22em;
  text-shadow: 0 8px 28px rgba(0, 0, 0, .72);
}

.suite-title p {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  margin: 18px 0 0;
  color: var(--accent);
  font-size: .92rem;
  font-weight: 700;
  letter-spacing: .34em;
  text-transform: uppercase;
}

.suite-title p::before,
.suite-title p::after {
  content: "";
  width: 74px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent));
}

.suite-title p::after {
  background: linear-gradient(90deg, var(--accent), transparent);
}

.login-panel {
  position: relative;
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 52px;
  width: min(900px, 100%);
  min-height: 520px;
  margin: 0 auto;
  padding: 48px;
  border-radius: var(--radius);
}

.login-panel::before,
.login-panel::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 110px;
  height: 2px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  filter: drop-shadow(0 0 12px var(--accent));
}

.login-panel::before { top: -1px; }
.login-panel::after { bottom: -1px; }

.identity-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-right: 38px;
  border-right: 1px solid var(--line);
}

.brand-logo {
  display: block;
  width: min(320px, 100%);
  height: auto;
  margin: 0 auto;
  filter: drop-shadow(0 18px 34px rgba(255, 124, 0, .24));
}

.identity-line,
.form-label {
  color: var(--accent);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .24em;
  text-transform: uppercase;
}

.identity-rule {
  width: 100%;
  height: 1px;
  margin: 38px 0;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.identity-copy,
.form-copy,
.biometric small,
.trust-strip small,
.metric-card small,
.timeline small {
  color: var(--muted);
}

.identity-copy {
  max-width: 270px;
  margin: 0;
  line-height: 1.65;
}

.auth-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.form-label {
  margin: 0 0 12px;
}

.auth-panel h2 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.2rem);
}

.form-copy {
  margin: 14px 0 28px;
}

.field {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 58px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(0, 0, 0, .32);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.field:focus-within {
  border-color: var(--line-hot);
  box-shadow: 0 0 0 4px rgba(255, 135, 14, .11);
  transform: translateY(-1px);
}

.field-icon {
  display: grid;
  place-items: center;
  width: 54px;
  color: var(--soft);
}

.field input {
  width: 100%;
  height: 56px;
  color: var(--text);
  background: transparent;
  border: 0;
  outline: 0;
}

.field input::placeholder {
  color: rgba(246, 242, 236, .55);
}

.icon-button,
.link-button,
.sidebar-action {
  border: 0;
  background: transparent;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 48px;
  color: var(--soft);
}

.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 4px 0 22px;
  font-size: .92rem;
}

.check {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}

.check input {
  position: absolute;
  opacity: 0;
}

.check span {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  border: 1px solid var(--line-hot);
  background: linear-gradient(160deg, #ffae42, #d35b00);
  box-shadow: 0 0 16px rgba(255, 128, 0, .25);
}

.check span::after {
  content: "";
  display: block;
  width: 10px;
  height: 6px;
  margin: 6px 0 0 5px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg);
}

.link-button {
  color: var(--accent);
  font-size: .9rem;
  font-weight: 700;
}

.primary-button,
.small-button,
.sidebar-action {
  color: #fff;
  border-radius: 10px;
  border: 1px solid rgba(255, 189, 95, .55);
  background: linear-gradient(180deg, #ff9b17, #d75d00);
  box-shadow: 0 16px 36px rgba(215, 93, 0, .28), inset 0 1px 0 rgba(255, 255, 255, .32);
}

.primary-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  width: 100%;
  min-height: 60px;
  font-size: 1.06rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  transition: transform .2s ease, filter .2s ease;
}

.primary-button:hover,
.small-button:hover,
.sidebar-action:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.message {
  min-height: 22px;
  margin-top: 10px;
  color: var(--danger);
  font-weight: 700;
}

.divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 8px 0 20px;
  color: var(--soft);
  text-transform: uppercase;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.biometric {
  display: flex;
  align-items: center;
  gap: 18px;
  width: 100%;
  min-height: 72px;
  padding: 0 26px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(0, 0, 0, .28);
  text-align: left;
}

.biometric svg {
  width: 38px;
  height: 38px;
  color: var(--accent);
  stroke-width: 1.4;
}

.biometric span {
  display: grid;
  gap: 3px;
}

.trust-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  width: min(1180px, 100%);
  margin: 38px auto 0;
  padding: 24px 34px;
  border-radius: 12px;
}

.trust-strip div {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 56px;
}

.trust-strip div + div {
  border-left: 1px solid var(--line);
}

.trust-strip svg {
  width: 40px;
  height: 40px;
  color: var(--accent);
}

.trust-strip span {
  display: grid;
  gap: 6px;
}

.trust-strip strong {
  font-size: .95rem;
  text-transform: uppercase;
}

footer {
  margin-top: 16px;
  color: var(--muted);
  text-align: center;
}

footer span {
  color: var(--accent);
}

.dashboard-page {
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(2, 5, 9, .76), #020509 55%),
    url("../assets/oranjestad-premium-bg.png") center / cover fixed;
}

.dashboard-page::before {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, .5), transparent 34%),
    radial-gradient(circle at 78% 12%, rgba(255, 128, 0, .16), transparent 22rem);
}

.sidebar {
  position: fixed;
  z-index: 2;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  width: 270px;
  padding: 26px;
  background: rgba(2, 4, 7, .86);
  border-right: 1px solid var(--line);
  backdrop-filter: blur(20px);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 36px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.mini-logo {
  display: block;
  width: 54px;
  height: 54px;
  object-fit: contain;
  padding: 4px;
  border: 1px solid var(--line-hot);
  border-radius: 10px;
  background: rgba(0, 0, 0, .34);
  filter: drop-shadow(0 10px 18px rgba(255, 124, 0, .2));
}

.sidebar nav {
  display: grid;
  gap: 8px;
}

.sidebar a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 14px;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 10px;
}

.sidebar a.active,
.sidebar a:hover {
  color: var(--text);
  border-color: var(--line-hot);
  background: rgba(255, 135, 14, .12);
}

.sidebar-action {
  min-height: 46px;
  margin-top: auto;
  font-weight: 800;
}

.dashboard-main {
  position: relative;
  z-index: 1;
  margin-left: 270px;
  padding: 28px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 28px;
  border-radius: var(--radius);
}

.topbar p,
.panel-heading p {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.topbar h1,
.panel-heading h2 {
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 2.35rem);
}

.status-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 16px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(0, 0, 0, .28);
  white-space: nowrap;
}

.status-pill span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #35e083;
  box-shadow: 0 0 16px #35e083;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 18px 0;
}

.metric-card {
  display: grid;
  gap: 10px;
  min-height: 148px;
  padding: 22px;
  border-radius: 14px;
}

.metric-card span {
  color: var(--muted);
  font-weight: 700;
}

.metric-card strong {
  font-size: clamp(1.55rem, 2.5vw, 2.2rem);
  letter-spacing: -.02em;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(320px, .8fr);
  gap: 18px;
}

.chart-panel,
.ops-panel,
.table-panel {
  padding: 24px;
  border-radius: var(--radius);
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.panel-heading span {
  color: var(--muted);
}

.native-chart {
  min-height: 320px;
}

.native-chart svg {
  width: 100%;
  height: 280px;
  color: var(--accent);
}

.grid-line {
  stroke: rgba(255, 255, 255, .08);
  stroke-width: 1;
}

.area {
  fill: rgba(255, 135, 14, .12);
  stroke: none;
}

.line {
  stroke: url(#lineGlow);
  stroke-width: 6;
}

.line.muted {
  stroke: rgba(255, 255, 255, .26);
  stroke-width: 3;
}

.chart-labels {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: .86rem;
}

.timeline {
  display: grid;
  gap: 18px;
}

.timeline div {
  position: relative;
  display: grid;
  gap: 4px;
  padding-left: 28px;
}

.timeline span {
  position: absolute;
  left: 0;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 18px rgba(255, 135, 14, .7);
}

.table-panel {
  margin-top: 18px;
}

.small-button {
  min-height: 42px;
  padding: 0 16px;
  font-weight: 800;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

th,
td {
  padding: 16px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  text-align: left;
}

th {
  color: var(--soft);
  font-size: .78rem;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  color: var(--accent-2);
  border: 1px solid var(--line-hot);
  border-radius: 999px;
  background: rgba(255, 135, 14, .12);
}

@media (max-width: 980px) {
  .login-panel,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .identity-panel {
    align-items: center;
    padding-right: 0;
    padding-bottom: 34px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    text-align: center;
  }

  .identity-copy {
    max-width: 520px;
  }

  .trust-strip,
  .metric-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .trust-strip div:nth-child(3) {
    border-left: 0;
  }

  .sidebar {
    position: relative;
    width: auto;
    height: auto;
    inset: auto;
  }

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

  .sidebar-action {
    margin-top: 18px;
  }

  .dashboard-main {
    margin-left: 0;
  }
}

@media (max-width: 640px) {
  .login-shell {
    padding: 28px 14px 18px;
  }

  .suite-title {
    margin-bottom: 24px;
  }

  .suite-title h1 {
    letter-spacing: .1em;
  }

  .suite-title p {
    gap: 12px;
    font-size: .72rem;
    letter-spacing: .18em;
  }

  .suite-title p::before,
  .suite-title p::after {
    width: 32px;
  }

  .login-panel {
    gap: 30px;
    min-height: 0;
    padding: 26px 18px;
  }

  .brand-logo {
    width: min(285px, 100%);
  }

  .form-row,
  .topbar,
  .panel-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .trust-strip,
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .trust-strip {
    padding: 20px;
  }

  .trust-strip div {
    justify-content: flex-start;
  }

  .trust-strip div + div {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding-top: 18px;
  }

  .dashboard-main {
    padding: 16px;
  }

  .sidebar {
    padding: 18px;
  }

  .sidebar nav {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
