:root {
  --bg: #080a08;
  --panel: rgba(11, 15, 13, .82);
  --panel2: rgba(18, 23, 19, .78);
  --text: #f4f2e9;
  --muted: #a8aa9e;
  --line: rgba(231, 235, 212, .14);
  --line-strong: rgba(203, 255, 74, .34);
  --lime: #c9ff4a;
  --lime2: #83d51a;
  --orange: #f5ba43;
  --red: #ff6c62;
}

html { background: #080a08; }

body {
  min-height: 100vh;
  background: #080a08;
  color: var(--text);
  font-family: Inter, "Segoe UI", ui-sans-serif, system-ui, sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background: url('/osiris-world.png') center 42% / cover no-repeat;
  filter: saturate(.78) contrast(1.05);
  transform: scale(1.015);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(5, 8, 6, .3) 0%, rgba(5, 8, 6, .6) 38%, rgba(5, 8, 6, .9) 100%),
    linear-gradient(90deg, rgba(7, 10, 8, .55) 0%, transparent 28%, transparent 72%, rgba(7, 10, 8, .35) 100%);
}

.topbar {
  height: 64px;
  margin: 12px 16px 0;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(8, 11, 9, .66);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .18);
  backdrop-filter: blur(22px) saturate(1.15);
}

.brand { gap: 10px; letter-spacing: -.02em; }
.brand-logo { width: 40px; height: 40px; filter: drop-shadow(0 5px 10px rgba(0,0,0,.25)); }
.brand span { font-size: 15px; text-transform: uppercase; letter-spacing: .08em; }
.brand span strong { color: var(--lime); }
.status { color: #d4d7ca; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.status-dot { width: 6px; height: 6px; box-shadow: none; }
.user-chip, .header-link, .logout-btn {
  min-height: 34px;
  border-radius: 9px;
  font-size: 12px;
  letter-spacing: .02em;
}

main {
  width: calc(100% - 32px);
  max-width: 1540px;
  margin: 0 auto;
  padding: 18px 0 64px;
}

.access-card {
  max-width: 640px;
  margin: 13vh 0 0 clamp(0px, 6vw, 90px);
  padding: clamp(28px, 4vw, 52px);
  border: 1px solid rgba(255,255,255,.17);
  border-radius: 8px 32px 8px 8px;
  background: rgba(8, 12, 9, .8);
  box-shadow: 0 30px 80px rgba(0,0,0,.36);
  backdrop-filter: blur(26px);
}

.access-card::before {
  content: "OSIRIS / CREATOR CONTROL";
  display: block;
  margin-bottom: 42px;
  color: rgba(255,255,255,.52);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .24em;
}

.access-card h1 {
  max-width: 520px;
  font-size: clamp(3rem, 6vw, 5.6rem);
  line-height: .88;
  letter-spacing: -.075em;
}

.access-card form { margin-top: 34px; }
.access-card .inline { padding: 5px; border: 1px solid var(--line); border-radius: 13px; background: rgba(0,0,0,.28); }
.access-card .inline input { border: 0; background: transparent; }

.hero-grid {
  grid-template-columns: minmax(0, 1.7fr) minmax(310px, .65fr);
  gap: 10px;
}

.timer-card, .obs-card, .tab-panel {
  border: 1px solid var(--line);
  background: rgba(9, 13, 10, .62);
  box-shadow: 0 20px 55px rgba(0,0,0,.2);
  backdrop-filter: blur(15px) saturate(1.05);
}

.timer-card {
  min-height: 318px;
  padding: 28px 30px 24px;
  border-radius: 22px 7px 7px 22px;
  overflow: hidden;
  position: relative;
}

.timer-card::after {
  content: "LIVE CONTROL";
  position: absolute;
  right: 24px;
  bottom: 18px;
  color: rgba(255,255,255,.1);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .28em;
}

.timer-top { color: #c5c7bc; }
.timer-top > span:first-child::before { content: "01  "; color: var(--lime); }
.pill { border-radius: 7px; background: rgba(245,186,67,.07); }
.timer {
  margin: 28px 0 22px;
  font-size: clamp(4.8rem, 10.5vw, 10.4rem);
  line-height: .84;
  font-weight: 780;
  letter-spacing: -.075em;
  text-shadow: none;
}

.timer-actions { gap: 7px; }
.timer-actions > button { min-width: 90px; }
.custom-time-form {
  grid-template-columns: minmax(180px, 1fr) minmax(100px, 150px) auto;
  padding-top: 13px;
  margin-top: 7px;
  border-top: 1px solid var(--line);
}
.custom-time-form label { font-size: 10px; text-transform: uppercase; letter-spacing: .12em; }

.obs-card {
  justify-content: flex-end;
  padding: 26px;
  border-radius: 7px 22px 22px 7px;
  background: linear-gradient(180deg, rgba(10,14,11,.42), rgba(10,14,11,.72));
}
.obs-card::before {
  content: "OBS / 02";
  margin-bottom: auto;
  color: var(--lime);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .2em;
}
.obs-card h2 { max-width: 330px; font-size: clamp(1.6rem, 2.7vw, 2.65rem); line-height: 1; }
.obs-card .copy-row { padding-top: 8px; border-top: 1px solid var(--line); }

.tabs {
  position: sticky;
  top: 78px;
  z-index: 8;
  gap: 0;
  margin: 10px 0;
  padding: 4px;
  border-radius: 12px;
  background: rgba(7, 10, 8, .85);
  backdrop-filter: blur(22px);
}
.tabs button {
  flex: 1;
  border-radius: 8px;
  color: #969b90;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .07em;
}
.tabs button.active {
  color: #0a0d09;
  background: var(--lime);
  border-color: var(--lime);
}

.tab-panel {
  min-height: 340px;
  padding: clamp(22px, 3vw, 38px);
  border-radius: 10px 10px 24px 24px;
}
.section-head { padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.8rem); }
.eyebrow { color: var(--lime); font-size: 10px; }

.rule-form {
  gap: 10px;
  padding: 14px;
  border: 0;
  border-left: 2px solid var(--lime);
  border-radius: 0 12px 12px 0;
  background: rgba(0,0,0,.25);
}
label { color: #b9bcb1; font-size: 11px; text-transform: uppercase; letter-spacing: .065em; }
input, select {
  min-height: 44px;
  border-color: rgba(255,255,255,.13);
  border-radius: 8px;
  background: rgba(3, 6, 4, .56);
}
input:focus, select:focus { box-shadow: 0 0 0 2px rgba(201,255,74,.14); }

button {
  border-radius: 8px;
  background: rgba(255,255,255,.055);
  border-color: rgba(255,255,255,.14);
}
button:hover:not(:disabled) { transform: none; background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.24); }
.primary { background: var(--lime); border-color: var(--lime); color: #0b1008; }

.rules-list, .history-list { gap: 6px; }
.rule-item, .history-item {
  border-radius: 8px;
  background: rgba(4,7,5,.45);
}
.tag { border-radius: 5px; background: transparent; border: 1px solid var(--line-strong); }

.connections { grid-template-columns: repeat(3, 1fr); }
.connections article {
  min-height: 185px;
  grid-template-columns: 1fr;
  align-content: space-between;
  border-radius: 10px;
  background: rgba(4,7,5,.45);
}
.connections button { width: 100%; }
.platform { width: 38px; height: 38px; border-radius: 7px; }

.toast { border-radius: 8px; background: var(--lime); color: #0a0e08; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .timer-card, .obs-card { border-radius: 16px; }
  .obs-card::before { margin-bottom: 28px; }
  .connections { grid-template-columns: 1fr; }
  .connections article { min-height: auto; grid-template-columns: auto 1fr auto; }
}

@media (max-width: 620px) {
  .topbar { margin: 8px 8px 0; padding: 0 12px; }
  .status { display: none; }
  main { width: calc(100% - 16px); padding-top: 8px; }
  .access-card { margin: 8vh 0 0; }
  .timer-card { padding: 22px 18px; }
  .timer { font-size: clamp(3.2rem, 17vw, 5rem); }
  .tabs { top: 72px; }
  .tabs button { padding: 10px; font-size: 10px; }
  .custom-time-form { grid-template-columns: 1fr auto; }
  .connections article { grid-template-columns: auto 1fr; }
  .connections button { grid-column: 1 / -1; }
}
