/* Theme: back-to-the-future (IIO unified schema, based on b2b solution-provider) */
@import url('../../../b2b/solution-provider/assets/style.css');

:root {
  --color-black: #04050b;
  --color-navy: #070d1f;
  --color-blue-dark: #0f2d63;
  --color-blue-mid: #1d57a5;
  --color-blue-light: #4fd7ff;
  --color-gray-900: #0d1426;
  --color-gray-700: #1e2b44;
  --color-gray-500: #8190ac;
  --color-gray-300: #334a73;
  --color-gray-100: #dce9ff;
  --color-gray-50: #edf5ff;
  --color-white: #f7fbff;
  --color-success: #3ee38d;
  --color-warning: #ffad3b;
  --color-danger: #ff4f52;
  --color-info: #41d7ff;
  --font-family-base: 'Exo 2', 'Orbitron', 'Rajdhani', sans-serif;
  --font-family-mono: 'JetBrains Mono', 'Consolas', 'Monaco', monospace;
  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.36);
  --shadow-md: 0 14px 34px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 26px 56px rgba(0, 0, 0, 0.58);
  --bttf-cyan: #46d9ff;
  --bttf-blue: #2f5cf7;
  --bttf-amber: #ff9d3b;
  --bttf-hot: #ff5c3b;

  --iio-bg: #050913;
  --iio-surface: #0f1b33;
  --iio-ink: #f7fbff;
  --iio-muted: #b0c2df;
  --iio-line: #334a73;
  --iio-accent: #4fd7ff;
  --iio-accent-mid: #2f5cf7;
  --iio-accent-light: #13284a;
  --iio-ok: #3ee38d;
  --iio-warn: #ffad3b;
  --iio-risk: #ff4f52;
  --iio-thead-bg: #12203c;
  --iio-tab-bg: #0e1a31;
  --iio-shadow-md: 0 14px 34px rgba(0, 0, 0, 0.45);
}

html,
body {
  background:
    radial-gradient(circle at 12% -10%, rgba(70, 217, 255, 0.3), transparent 36%),
    radial-gradient(circle at 82% -12%, rgba(255, 157, 59, 0.28), transparent 33%),
    radial-gradient(circle at 45% 120%, rgba(47, 92, 247, 0.2), transparent 40%),
    linear-gradient(150deg, #050913 0%, #070e1d 42%, #0d1430 100%);
  color: var(--color-white);
}

body {
  position: relative;
  min-height: 100vh;
  letter-spacing: 0.01em;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      116deg,
      rgba(70, 217, 255, 0.06) 0 1px,
      transparent 1px 72px
    ),
    repeating-linear-gradient(
      64deg,
      rgba(255, 157, 59, 0.045) 0 1px,
      transparent 1px 86px
    );
  opacity: 0.42;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  left: -28%;
  right: -28%;
  top: -20%;
  height: 44%;
  pointer-events: none;
  background: conic-gradient(
    from 90deg,
    rgba(70, 217, 255, 0.2),
    rgba(47, 92, 247, 0.08),
    rgba(255, 92, 59, 0.26),
    rgba(255, 157, 59, 0.16),
    rgba(70, 217, 255, 0.2)
  );
  filter: blur(38px);
  animation: bttf-halo-spin 24s linear infinite;
  transform-origin: center;
  z-index: 0;
}

header,
nav,
main,
footer,
.container,
.card,
.sidebar,
.table-wrap,
.iio-theme-picker {
  position: relative;
  z-index: 1;
}

header {
  border-bottom: 1px solid rgba(70, 217, 255, 0.42);
  background:
    linear-gradient(130deg, rgba(8, 13, 28, 0.95), rgba(11, 24, 52, 0.9)),
    radial-gradient(circle at 88% 25%, rgba(255, 157, 59, 0.24), transparent 36%);
  overflow: hidden;
}

header::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    rgba(70, 217, 255, 0.18),
    rgba(70, 217, 255, 0.95) 36%,
    rgba(255, 157, 59, 0.95) 62%,
    rgba(255, 92, 59, 0.75) 84%,
    rgba(70, 217, 255, 0.2)
  );
  box-shadow: 0 0 18px rgba(70, 217, 255, 0.56), 0 0 34px rgba(255, 157, 59, 0.4);
  animation: bttf-rail-drift 3.4s ease-in-out infinite;
}

header::after {
  content: '';
  position: absolute;
  top: 14px;
  right: clamp(12px, 4vw, 28px);
  width: clamp(130px, 14vw, 180px);
  height: clamp(130px, 14vw, 180px);
  border-radius: 50%;
  pointer-events: none;
  background:
    radial-gradient(circle, rgba(70, 217, 255, 0.26), rgba(70, 217, 255, 0) 62%),
    conic-gradient(
      from 40deg,
      rgba(70, 217, 255, 0.75),
      rgba(47, 92, 247, 0.45),
      rgba(255, 157, 59, 0.78),
      rgba(255, 92, 59, 0.5),
      rgba(70, 217, 255, 0.75)
    );
  filter: blur(0.6px);
  opacity: 0.7;
  animation: bttf-flux-ring 7s linear infinite;
}

header h1,
h1,
h2,
h3 {
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

header h1 {
  text-shadow: 0 0 18px rgba(70, 217, 255, 0.34), 0 0 26px rgba(255, 157, 59, 0.14);
}

header p {
  color: #d6e5ff;
}

nav {
  background: rgba(7, 13, 26, 0.9);
  border-bottom: 1px solid rgba(70, 217, 255, 0.3);
  backdrop-filter: blur(4px);
}

nav a {
  color: #e6f2ff;
  border: 1px solid transparent;
}

nav a:hover {
  border-color: rgba(70, 217, 255, 0.75);
  background: linear-gradient(120deg, rgba(70, 217, 255, 0.16), rgba(255, 157, 59, 0.16));
  color: #ffffff;
  text-shadow: 0 0 9px rgba(70, 217, 255, 0.45);
}

a {
  color: #6be2ff;
}

a:hover {
  color: #ffd39a;
}

.sidebar,
.card {
  background:
    linear-gradient(160deg, rgba(10, 19, 39, 0.93), rgba(10, 27, 61, 0.84)),
    radial-gradient(circle at 85% 15%, rgba(70, 217, 255, 0.12), transparent 44%);
  border: 1px solid rgba(70, 217, 255, 0.24);
  box-shadow:
    0 14px 30px rgba(0, 0, 0, 0.4),
    inset 0 0 0 1px rgba(70, 217, 255, 0.06);
}

.card-header {
  border-bottom-color: rgba(70, 217, 255, 0.64);
}

.card:hover,
.sidebar:hover {
  border-color: rgba(255, 157, 59, 0.62);
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.45),
    0 0 26px rgba(70, 217, 255, 0.14),
    inset 0 0 0 1px rgba(255, 157, 59, 0.15);
  transform: translateY(-2px);
}

table {
  background: rgba(10, 18, 36, 0.9);
  border: 1px solid rgba(70, 217, 255, 0.22);
}

thead {
  background: linear-gradient(180deg, rgba(70, 217, 255, 0.24), rgba(70, 217, 255, 0.08));
  border-bottom-color: rgba(70, 217, 255, 0.42);
}

th,
td {
  border-color: rgba(56, 84, 126, 0.76);
}

code {
  background: rgba(11, 23, 41, 0.9);
  color: #9ee7ff;
  border: 1px solid rgba(70, 217, 255, 0.4);
}

pre {
  background: rgba(6, 12, 24, 0.95);
  color: #b8efff;
  border-color: rgba(70, 217, 255, 0.34);
}

button,
.btn {
  background: linear-gradient(120deg, #2a87ff, #38bfff 55%, #ff9d3b);
  border-color: rgba(70, 217, 255, 0.82);
  color: #04111f;
  font-weight: 700;
  letter-spacing: 0.03em;
  box-shadow: 0 0 0 1px rgba(70, 217, 255, 0.34), 0 0 22px rgba(70, 217, 255, 0.2);
}

button:hover,
.btn:hover {
  background: linear-gradient(120deg, #4ba0ff, #58caff 58%, #ffb45b);
  border-color: rgba(255, 157, 59, 0.95);
}

.btn-secondary {
  background: rgba(10, 19, 38, 0.96);
  border-color: rgba(108, 148, 211, 0.56);
  color: #deefff;
}

.btn-secondary:hover {
  background: rgba(13, 25, 47, 0.98);
  border-color: rgba(70, 217, 255, 0.72);
  color: #ffffff;
}

button:focus-visible,
.btn:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid rgba(255, 157, 59, 0.92);
  outline-offset: 2px;
}

.badge-active,
.badge-passed {
  background: rgba(62, 227, 141, 0.22);
  color: #9dffc6;
}

.badge-pending {
  background: rgba(255, 173, 59, 0.22);
  color: #ffd79e;
}

.badge-failed,
.badge-archived {
  background: rgba(255, 79, 82, 0.23);
  color: #ffb5b6;
}

.iio-theme-picker {
  background: linear-gradient(130deg, rgba(8, 16, 32, 0.96), rgba(10, 26, 55, 0.9));
  border-color: rgba(70, 217, 255, 0.48);
  box-shadow: inset 0 0 0 1px rgba(70, 217, 255, 0.08);
}

.iio-theme-picker label {
  color: #e8f7ff;
  letter-spacing: 0.04em;
}

.iio-theme-picker select {
  background: rgba(12, 24, 47, 0.94);
  color: #f0f8ff;
  border-color: rgba(70, 217, 255, 0.62);
}

.iio-theme-picker select:focus {
  outline: 2px solid rgba(255, 157, 59, 0.84);
  outline-offset: 2px;
}

/* Optional helper utility for pages that want a clear BTTF display panel. */
.bttf-time-circuit {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid rgba(70, 217, 255, 0.42);
  background: linear-gradient(160deg, rgba(6, 15, 28, 0.96), rgba(8, 27, 56, 0.9));
  box-shadow: inset 0 0 0 1px rgba(70, 217, 255, 0.08);
}

.bttf-time-circuit .slot {
  border-radius: 8px;
  border: 1px solid rgba(255, 157, 59, 0.4);
  background: rgba(9, 16, 30, 0.9);
  padding: 8px;
}

.bttf-time-circuit .label {
  display: block;
  margin-bottom: 4px;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #ffd3a0;
}

.bttf-time-circuit .value {
  display: block;
  font-family: var(--font-family-mono);
  color: #9ee7ff;
  font-weight: 700;
}

@keyframes bttf-flux-ring {
  0% {
    transform: rotate(0deg) scale(0.96);
    opacity: 0.62;
  }
  50% {
    transform: rotate(180deg) scale(1.02);
    opacity: 0.84;
  }
  100% {
    transform: rotate(360deg) scale(0.96);
    opacity: 0.62;
  }
}

@keyframes bttf-halo-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes bttf-rail-drift {
  0% {
    filter: saturate(95%);
    opacity: 0.8;
  }
  50% {
    filter: saturate(120%);
    opacity: 1;
  }
  100% {
    filter: saturate(95%);
    opacity: 0.8;
  }
}

@media (max-width: 900px) {
  header::after {
    width: 96px;
    height: 96px;
    top: 8px;
    right: 10px;
  }

  body::after {
    height: 34%;
    filter: blur(26px);
  }
}

@media (prefers-reduced-motion: reduce) {
  body::after,
  header::before,
  header::after {
    animation: none;
  }
}
