:root {
  color-scheme: dark;
  --bg: #101114;
  --panel: #181a1f;
  --panel-strong: #20242a;
  --line: #30343b;
  --text: #f4f1ea;
  --muted: #a8adb7;
  --soft: #737b88;
  --green: #6ad29a;
  --blue: #77a7ff;
  --amber: #e6b86a;
  --red: #e87979;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(32, 36, 42, 0.92), rgba(16, 17, 20, 1)),
    var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

button,
input {
  font: inherit;
}

.login-shell {
  width: min(1040px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  align-items: center;
  gap: 48px;
}

.intro-pane h1,
.topbar h1,
.dashboard-head h2 {
  margin: 0;
  font-weight: 700;
}

.intro-pane h1 {
  max-width: 680px;
  font-size: 56px;
  line-height: 1.02;
}

.intro-copy {
  max-width: 560px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.service-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.service-row span {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
}

.login-pane {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(24, 26, 31, 0.92);
  padding: 28px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

.login-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}

.brand-mark,
.app-mark {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  color: #111317;
  background: var(--green);
  font-weight: 800;
}

.login-header h2 {
  margin: 0 0 4px;
  font-size: 24px;
}

.login-header p,
.dashboard-head p,
.app-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.login-form {
  display: grid;
  gap: 12px;
}

.login-form label {
  color: var(--muted);
  font-size: 14px;
}

.login-form input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 14px;
  color: var(--text);
  background: #111317;
  outline: none;
}

.login-form input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(106, 210, 154, 0.15);
}

.login-form button,
.secondary-button {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  color: #111317;
  background: var(--green);
  font-weight: 800;
}

.login-form button {
  margin-top: 8px;
  padding: 13px 16px;
}

.secondary-button {
  padding: 10px 14px;
}

.form-error {
  margin: 0;
  color: var(--red);
  font-size: 14px;
}

.topbar {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.topbar h1 {
  font-size: 24px;
}

.dashboard-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0 80px;
}

.dashboard-head {
  margin-bottom: 24px;
}

.dashboard-head h2 {
  font-size: 40px;
  line-height: 1.12;
}

.dashboard-head p {
  margin-top: 8px;
}

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

.app-card {
  min-height: 230px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 20px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 18px;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.app-card:hover,
.app-card:focus-visible {
  transform: translateY(-2px);
  border-color: #596170;
  background: var(--panel-strong);
  outline: none;
}

.app-card h3 {
  margin: 0 0 8px;
  font-size: 22px;
}

.app-card.files .app-mark {
  background: var(--amber);
}

.app-card.free .app-mark {
  background: var(--blue);
}

.status-pill {
  width: fit-content;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--soft);
  font-size: 13px;
  font-weight: 700;
}

.status-pill.online {
  color: var(--green);
  border-color: rgba(106, 210, 154, 0.48);
}

.status-pill.offline {
  color: var(--red);
  border-color: rgba(232, 121, 121, 0.48);
}

@media (max-width: 840px) {
  .login-shell {
    min-height: auto;
    padding: 48px 0;
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .intro-pane h1 {
    font-size: 42px;
  }

  .app-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .intro-pane h1 {
    font-size: 34px;
  }

  .login-pane,
  .app-card {
    padding: 18px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-head h2 {
    font-size: 32px;
  }
}
