:root {
  --bg: #040507;
  --panel: rgba(14, 18, 24, 0.92);
  --panel-strong: rgba(8, 10, 14, 0.96);
  --line: rgba(255, 255, 255, 0.1);
  --line-soft: rgba(255, 255, 255, 0.06);
  --text: #f5f7fb;
  --muted: #a8b0bf;
  --green: #35d07f;
  --red: #f45a63;
  --amber: #f7d982;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", "Helvetica Neue", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(197, 138, 97, 0.36), transparent 22%),
    radial-gradient(circle at top right, rgba(51, 71, 255, 0.18), transparent 28%),
    linear-gradient(180deg, #1a0f0b 0%, #08090c 24%, #030406 100%);
  color: var(--text);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

.shell,
.react-shell {
  position: relative;
  overflow: hidden;
}

.shell::before,
.react-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 75% 24%, rgba(255, 255, 255, 0.1), transparent 18%),
    radial-gradient(circle at 74% 24%, rgba(255, 255, 255, 0.045) 0, transparent 28%),
    radial-gradient(circle at 72% 25%, rgba(51, 71, 255, 0.08), transparent 40%);
  pointer-events: none;
}

.eyebrow {
  display: inline-flex;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  color: #d8dde7;
  font-weight: 600;
}

.muted {
  color: var(--muted);
  line-height: 1.6;
}

.flash-stack,
.project-list,
.sidebar-stack,
.content-stack,
.form-grid {
  display: grid;
  gap: 16px;
}

.flash {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
}

.flash.success {
  background: rgba(53, 208, 127, 0.12);
  border-color: rgba(53, 208, 127, 0.22);
}

.flash.error {
  background: rgba(244, 90, 99, 0.1);
  border-color: rgba(244, 90, 99, 0.24);
}

.flash.info {
  background: rgba(51, 71, 255, 0.1);
  border-color: rgba(51, 71, 255, 0.24);
}

.ghost-button,
.primary-button,
.sidebar-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 18px;
  transition: 0.2s ease;
}

.ghost-button,
.primary-button {
  padding: 14px 22px;
  cursor: pointer;
}

.primary-button {
  background: #f6f3ef;
  color: #0a0b0d;
  font-weight: 700;
}

.ghost-button {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line);
  color: var(--text);
}

.ghost-button:disabled,
.primary-button:disabled {
  opacity: 0.65;
  cursor: wait;
}

.brand-mark {
  width: 18px;
  height: 58px;
  border-radius: 999px;
  transform: rotate(30deg);
  background: linear-gradient(180deg, #3850ff, #1823b5);
  box-shadow: 0 0 40px rgba(51, 71, 255, 0.35);
}

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

.login-card,
.hero-copy,
.hero-orb,
.sidebar-card,
.panel,
.calendar-panel,
.app-sidebar {
  background: linear-gradient(180deg, rgba(17, 20, 27, 0.9), rgba(7, 9, 12, 0.96));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.login-card {
  width: min(620px, 100%);
  border-radius: 34px;
  padding: 34px;
}

.login-card h1,
.hero h1 {
  margin: 20px 0 16px;
  font-size: clamp(2.5rem, 5vw, 4.8rem);
  line-height: 0.94;
  font-weight: 400;
  letter-spacing: -0.08em;
}

.login-card form {
  display: grid;
  gap: 14px;
  margin-top: 26px;
}

.hint {
  margin-top: 18px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line-soft);
}

.react-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}

.app-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 28px 22px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 24px;
  border-radius: 0 28px 28px 0;
  background:
    linear-gradient(180deg, rgba(15, 18, 24, 0.98), rgba(6, 8, 12, 0.98)),
    radial-gradient(circle at top left, rgba(255, 177, 124, 0.08), transparent 35%);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.sidebar-brand strong {
  font-size: 2rem;
  font-weight: 400;
  letter-spacing: -0.06em;
}

.sidebar-brand p {
  margin: 2px 0 0;
  color: var(--muted);
}

.sidebar-section {
  display: grid;
  gap: 12px;
  align-content: start;
}

.sidebar-label {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.sidebar-nav {
  display: grid;
  gap: 10px;
}

.sidebar-link {
  width: 100%;
  text-align: left;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--line-soft);
  color: var(--text);
  flex-direction: column;
  align-items: flex-start;
  cursor: pointer;
}

.sidebar-link small {
  color: var(--muted);
}

.sidebar-link.is-active,
.sidebar-link:hover,
.project-card.is-active,
.project-card:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
}

.sidebar-footer {
  display: grid;
  gap: 16px;
}

.sidebar-note {
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line-soft);
}

.sidebar-note strong {
  display: block;
  margin-bottom: 8px;
}

.sidebar-note p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.sidebar-logout {
  width: 100%;
}

.react-main {
  padding: 28px;
}

.react-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.topbar-caption {
  margin: 0 0 6px;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.react-title {
  margin: 0;
  font-size: clamp(1.9rem, 3vw, 3rem);
  letter-spacing: -0.06em;
  font-weight: 500;
}

.nav-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  color: var(--muted);
}

.nav-pill.is-active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.7fr);
  gap: 24px;
  margin-bottom: 24px;
}

.hero-copy,
.hero-orb {
  border-radius: 30px;
  min-height: 320px;
  position: relative;
  overflow: hidden;
}

.hero-copy {
  padding: 34px;
  background:
    linear-gradient(135deg, rgba(255, 177, 124, 0.15), rgba(255, 255, 255, 0.03)),
    linear-gradient(180deg, rgba(13, 16, 22, 0.94), rgba(5, 7, 10, 0.98));
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
}

.stat {
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line-soft);
}

.stat strong {
  display: block;
  font-size: 1.6rem;
  margin-bottom: 6px;
}

.hero-orb {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-orb::before,
.hero-orb::after {
  content: "";
  position: absolute;
  border-radius: 999px;
}

.hero-orb::before {
  width: 84%;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.03) inset, 0 0 120px rgba(255, 255, 255, 0.03) inset;
}

.hero-orb::after {
  width: 68%;
  aspect-ratio: 1;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.01) 55%, transparent 72%),
    radial-gradient(circle, rgba(51, 71, 255, 0.12), transparent 60%);
  filter: blur(4px);
}

.orb-points {
  width: 80%;
  aspect-ratio: 1;
  border-radius: 999px;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.9) 1.2px, transparent 1.6px),
    radial-gradient(circle, rgba(255, 255, 255, 0.45) 0.9px, transparent 1.2px);
  background-size: 28px 28px, 22px 22px;
  background-position: 0 0, 10px 12px;
  opacity: 0.88;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(320px, 380px) minmax(0, 1fr);
  gap: 24px;
}

.sidebar-card,
.calendar-panel,
.panel {
  border-radius: 22px;
  padding: 24px;
}

.panel-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-title {
  margin: 0 0 8px;
  font-size: 1.5rem;
  letter-spacing: -0.04em;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.detail-grid-spaced {
  margin-top: 18px;
}

.detail-item {
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line-soft);
}

.detail-item strong {
  display: block;
  margin-bottom: 8px;
}

.section-copy,
.compact-note {
  margin: 0;
}

.project-card {
  width: 100%;
  text-align: left;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  cursor: pointer;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  border: 1px solid transparent;
}

.badge.preview {
  background: rgba(239, 198, 91, 0.12);
  border-color: rgba(239, 198, 91, 0.24);
  color: var(--amber);
}

.badge.approved {
  background: rgba(53, 208, 127, 0.12);
  border-color: rgba(53, 208, 127, 0.24);
  color: #b8f3d2;
}

.badge.unit {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--line-soft);
  color: var(--muted);
}

label {
  display: grid;
  gap: 8px;
  color: #dde3ef;
  font-size: 0.96rem;
}

input,
select {
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  outline: none;
}

input:focus,
select:focus {
  border-color: rgba(51, 71, 255, 0.75);
  box-shadow: 0 0 0 4px rgba(51, 71, 255, 0.12);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.calendar-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.calendar-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}

.weekday {
  padding: 10px 12px;
  color: var(--muted);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.day-card {
  min-height: 150px;
  padding: 14px;
  border-radius: 20px;
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.day-card.is-outside {
  opacity: 0.42;
}

.day-card.is-weekend {
  background: rgba(255, 255, 255, 0.02);
}

.day-card.can-fit {
  box-shadow: inset 0 0 0 1px rgba(53, 208, 127, 0.24);
}

.day-card.is-full {
  box-shadow: inset 0 0 0 1px rgba(244, 90, 99, 0.24);
}

.day-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.day-status {
  width: 12px;
  height: 12px;
  border-radius: 999px;
}

.day-status.green {
  background: var(--green);
  box-shadow: 0 0 18px rgba(53, 208, 127, 0.4);
}

.day-status.red {
  background: var(--red);
  box-shadow: 0 0 18px rgba(244, 90, 99, 0.4);
}

.day-status.gray {
  background: rgba(255, 255, 255, 0.18);
}

.hours-bar {
  position: relative;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
}

.hours-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--fill, 0%);
  border-radius: 999px;
  background: linear-gradient(90deg, #3347ff, #6b7bff);
}

.mini-projects {
  display: grid;
  gap: 6px;
}

.mini-project {
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.86rem;
  color: #dce2ef;
}

.mini-project small {
  color: var(--muted);
}

@media (max-width: 1220px) {
  .react-shell {
    grid-template-columns: 1fr;
  }

  .app-sidebar {
    position: relative;
    height: auto;
    border-radius: 0 0 28px 28px;
  }

  .hero,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .react-main {
    padding: 18px;
  }

  .react-topbar,
  .panel-header,
  .calendar-toolbar,
  .form-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hero-stats,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .calendar-grid {
    gap: 8px;
  }

  .day-card {
    min-height: 128px;
    padding: 10px;
  }
}
