:root {
  color-scheme: light;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: #201c35;
  background: #f5f3f8;
  --ink: #201c35;
  --night: #1c1933;
  --muted: #646078;
  --line: #ebe7f1;
  --purple: #5939bd;
  --mint: #bdf4d4;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
:focus-visible { outline: 3px solid #9775f5; outline-offset: 3px; }
h1, h2, p, figure { margin: 0; }
h1, h2 { line-height: 1.08; letter-spacing: -.045em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.55rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
.muted { color: var(--muted); line-height: 1.6; }
.eyebrow, .nav-label, .panel-caption {
  font-size: .69rem;
  font-weight: 750;
  letter-spacing: .17em;
  text-transform: uppercase;
}
.eyebrow { margin-bottom: 12px; color: var(--purple); }
.brand { display: inline-flex; align-items: center; gap: 11px; width: fit-content; font-size: 1.28rem; font-weight: 800; letter-spacing: -.055em; }
.brand-mark { position: relative; width: 32px; height: 32px; border-radius: 10px; background: var(--purple); }
.brand-mark::before { content: ""; position: absolute; inset: 7px; border: 1.5px solid #fff; border-radius: 50%; }
.brand-mark::after { content: ""; position: absolute; width: 5px; height: 6px; left: 15px; top: 10px; border-left: 1.5px solid #fff; border-bottom: 1.5px solid #fff; }
.status-dot { display: inline-block; width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 4px #bdf4d421; }
.error { padding: 11px 13px; border-radius: 9px; background: #fff0f2; color: #8a253c; font-size: .89rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.login-page {
  display: grid;
  min-height: 100svh;
  place-items: center;
  padding: clamp(18px, 5vw, 64px);
  background: radial-gradient(ellipse at 87% 5%, #e6ddf9, transparent 54%), #f5f3f8;
}
.login-shell {
  display: grid;
  grid-template-columns: 1.06fr 1fr;
  width: min(100%, 1050px);
  min-height: 630px;
  padding: 10px;
  background: #fff;
  border: 1px solid #fff;
  border-radius: 28px;
  box-shadow: 0 30px 90px #30234c1a, 0 3px 14px #30234c0b;
}
.login-panel { display: grid; grid-template-rows: auto 1fr auto; align-items: center; gap: 30px; padding: clamp(24px, 5vw, 54px); }
.login-content h1 { font-size: clamp(2.25rem, 4.5vw, 3.25rem); }
.login-content .muted { margin-top: 14px; max-width: 30ch; }
.panel-caption { color: var(--muted); }
#login-form { display: grid; gap: 8px; margin-top: 27px; }
#login-form label { font-size: .86rem; font-weight: 650; }
#login-form label:not(:first-child) { margin-top: 7px; }
#login-form input { width: 100%; min-height: 48px; border: 1px solid #ded9e8; border-radius: 10px; padding: 10px 13px; color: var(--ink); background: #faf9fc; }
.password-field { position: relative; }
.password-field input { padding-right: 85px !important; }
.text-button { position: absolute; right: 6px; top: 5px; bottom: 5px; padding: 0 8px; border: 0; border-radius: 5px; background: transparent; color: var(--purple); font-size: .78rem; font-weight: 700; }
.primary-button, .secondary-button { display: inline-flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 44px; padding: 10px 15px; border-radius: 10px; font-weight: 700; }
.primary-button { margin-top: 12px; min-height: 49px; border: 0; color: #fff; background: var(--purple); }
.primary-button:hover { background: #4a2da8; }
.primary-button span { font-size: 1.2rem; }
.secondary-button { border: 1px solid #ded9e8; color: var(--ink); background: #fff; font-size: .88rem; }
.secondary-button:hover { background: #ede8f8; }
.secondary-button span { color: var(--purple); }

.login-art {
  display: flex;
  position: relative;
  isolation: isolate;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 31px;
  border-radius: 20px;
  color: #e0d8fa;
  background: radial-gradient(circle at 62% 56%, #503a87, transparent 62%), linear-gradient(145deg, #201936, #272045);
}
.login-art::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: repeating-linear-gradient(90deg, #c6b7ec12 0 1px, transparent 1px 32px), repeating-linear-gradient(#c6b7ec12 0 1px, transparent 1px 32px);
  mask-image: radial-gradient(ellipse, black, transparent 85%);
}
.art-top, .art-bottom { display: flex; align-items: center; gap: 12px; font-size: .67rem; font-weight: 700; letter-spacing: .18em; }
.art-bottom span:nth-child(2) { flex: 1; border-top: 1px solid #b3a5d752; }
.clock-art { position: absolute; width: 64%; aspect-ratio: 1; top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(-24deg); border: 1px solid #d4bbff85; border-radius: 50%; box-shadow: 0 0 55px #a477ff30, inset 0 0 55px #a477ff24; }
.clock-art i { position: absolute; inset: 12%; border: 1px solid #d4bbff50; border-radius: 50%; }
.clock-art i:nth-child(2) { inset: 24%; }
.clock-art i:nth-child(3) { inset: -13%; border-style: dashed; opacity: .55; }
.clock-art span { position: absolute; left: 50%; top: 50%; width: 25%; height: 31%; border-left: 2px solid var(--mint); border-bottom: 2px solid var(--mint); transform: translateY(-100%); filter: drop-shadow(0 0 8px #bdf4d477); }
.clock-art span::after { content: ""; position: absolute; left: -5px; bottom: -5px; width: 8px; height: 8px; border-radius: 50%; background: var(--mint); }

.dashboard-page { display: grid; grid-template-columns: 228px minmax(0, 1fr); min-height: 100svh; }
.sidebar { display: flex; flex-direction: column; gap: 10px; padding: 28px 18px; color: #fff; background: var(--night); }
.sidebar .brand { margin: 0 10px 40px; }
.sidebar .brand-mark { background: #6b4bd3; }
.nav-label { padding-left: 12px; color: #b7adce; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 10px; background: #342a55; font-size: .9rem; font-weight: 650; }
.nav-item span { color: #cfbcff; }
.sidebar-footer { display: flex; align-items: center; gap: 10px; margin-top: auto; padding: 14px 10px 0; border-top: 1px solid #ffffff22; color: #c4bcd7; font-size: .8rem; }
.dashboard-main { width: 100%; max-width: 1380px; margin-inline: auto; padding: clamp(24px, 5vw, 64px); }
.dashboard-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 30px; }
.dashboard-header .muted { margin-top: 10px; }
#dashboard-error { margin-bottom: 16px; }
.overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(16px, 4vw, 48px);
  min-height: 260px;
  padding: clamp(23px, 4vw, 42px);
  border-radius: 21px;
  background: radial-gradient(ellipse at 100% 0%, #554087 0%, transparent 70%), #272040;
  color: #fff;
}
.overview .eyebrow { display: flex; align-items: center; gap: 10px; color: var(--mint); }
.overview-caption { margin-top: 10px; color: #d0c5e4; line-height: 1.5; }
.metrics { display: flex; flex-wrap: wrap; gap: 17px clamp(20px, 3vw, 40px); margin: 25px 0 0; padding-top: 18px; border-top: 1px solid #ddd0f443; }
.metrics dt { margin-bottom: 5px; color: #d8cfe7; font-size: .79rem; }
.metrics dd { margin: 0; font-size: clamp(1rem, 2vw, 1.46rem); font-weight: 750; letter-spacing: -.03em; }
.chart-ring { --used: 0%; display: grid; place-items: center; width: clamp(132px, 16vw, 183px); aspect-ratio: 1; padding: 12px; border-radius: 50%; background: conic-gradient(var(--mint) 0 var(--used), #665587 var(--used) 100%); }
.chart-ring div { display: grid; align-content: center; justify-items: center; width: 100%; height: 100%; padding: 5px; border-radius: 50%; background: #30264a; text-align: center; }
.chart-ring strong { max-width: 100%; overflow-wrap: anywhere; font-size: clamp(1.1rem, 2.55vw, 2rem); line-height: 1.05; letter-spacing: -.06em; }
.chart-ring span { margin-top: 5px; color: #d8cfe7; font-size: .76rem; }

.activity-card { margin-top: 24px; overflow: hidden; border: 1px solid var(--line); border-radius: 19px; background: #fff; }
.activity-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: clamp(17px, 3vw, 27px); }
.activity-header h2 { font-size: clamp(1.35rem, 3vw, 1.75rem); }
.activity-header .eyebrow { margin-bottom: 6px; }
.count { flex-shrink: 0; padding: 5px 10px; border-radius: 999px; background: #f1ebfd; color: #5135a8; font-size: .77rem; font-weight: 700; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: 13px clamp(12px, 2.5vw, 26px); border-top: 1px solid var(--line); }
th { background: #faf9fc; color: var(--muted); font-size: .76rem; font-weight: 700; }
td { font-size: .89rem; }
td:first-child { width: 65%; overflow-wrap: anywhere; }
td:nth-child(2), td:nth-child(3) { white-space: nowrap; }
td:nth-child(3) { font-weight: 700; }
.empty-state { padding-block: 30px; color: var(--muted); text-align: center; }

@media (max-width: 850px) {
  .dashboard-page { grid-template-columns: minmax(0, 1fr); }
  .sidebar { flex-direction: row; align-items: center; justify-content: space-between; padding: 14px clamp(17px, 5vw, 42px); }
  .sidebar .brand { margin: 0; }
  .nav-label, .sidebar-footer { display: none; }
}

@media (max-width: 660px) {
  .login-shell { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .login-art { display: none; }
  .login-panel { gap: 34px; }
}

@media (max-width: 480px) {
  .dashboard-main { padding: 23px 14px; }
  .dashboard-header { gap: 8px; }
  .dashboard-header h1 { font-size: 2rem; }
  .dashboard-header .muted { font-size: .9rem; }
  .overview { grid-template-columns: minmax(0, 1fr); }
  .chart { justify-self: center; }
  .metrics { gap: 12px 18px; }
  .secondary-button { gap: 6px; padding-inline: 10px; }
  th, td { padding-inline: 9px; }
  td { font-size: .79rem; }
}
