:root {
  --bg: #eef1f5;
  --panel: #ffffff;
  --panel-soft: #f7f8fa;
  --border: #d8dee8;
  --text: #142033;
  --muted: #65748b;
  --primary: #0f62fe;
  --primary-dark: #0a4bd1;
  --success: #0f9d58;
  --danger: #d93025;
  --warning: #d97706;
  --shadow: 0 22px 48px rgba(15, 23, 42, 0.08);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(15, 98, 254, 0.14), transparent 28%),
    radial-gradient(circle at bottom right, rgba(15, 157, 88, 0.12), transparent 24%),
    var(--bg);
}

button,
input,
textarea {
  font: inherit;
}

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

.hero-panel {
  padding: 44px 34px;
  background:
    linear-gradient(160deg, rgba(4, 27, 76, 0.96), rgba(17, 57, 129, 0.94)),
    #0b1220;
  color: #f5f8ff;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.hero-panel h1 {
  margin: 0;
  font-size: 2rem;
  line-height: 1.1;
}

.hero-panel p {
  margin: 0;
  color: rgba(245, 248, 255, 0.78);
  line-height: 1.7;
}

.hero-badge {
  width: fit-content;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.hero-points {
  display: grid;
  gap: 14px;
  margin-top: auto;
}

.hero-point {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
}

.point-title {
  display: block;
  font-weight: 800;
  margin-bottom: 6px;
}

.point-text {
  color: rgba(245, 248, 255, 0.7);
  font-size: 0.95rem;
  line-height: 1.6;
}

.workspace-shell {
  padding: 30px;
}

.hidden {
  display: none !important;
}

.panel {
  background: var(--panel);
  border: 1px solid rgba(216, 222, 232, 0.8);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  padding: 24px;
}

.auth-hub-panel {
  max-width: 920px;
  width: 100%;
}

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

.auth-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 248, 250, 0.98));
}

.auth-card-primary {
  background:
    radial-gradient(circle at top right, rgba(15, 98, 254, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 248, 250, 0.98));
}

.auth-card-label {
  display: inline-flex;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(15, 98, 254, 0.08);
  color: var(--primary-dark);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.auth-card h3 {
  margin: 16px 0 10px;
  font-size: 1.45rem;
}

.auth-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.auth-card-actions {
  margin-top: 22px;
}

.primary-link-button,
.secondary-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 20px;
  border-radius: 16px;
  text-decoration: none;
  font-weight: 800;
}

.primary-link-button {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 18px 26px rgba(15, 98, 254, 0.2);
}

.secondary-link-button {
  background: #eff4ff;
  color: var(--primary-dark);
  border: 1px solid rgba(15, 98, 254, 0.18);
}

.panel-header,
.topbar,
.release-history-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.topbar {
  margin-bottom: 24px;
}

.topbar h2,
.panel-header h2,
.panel-header h3,
.release-history-header h3 {
  margin: 4px 0 0;
  font-size: 1.35rem;
}

.eyebrow {
  margin: 0;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.74rem;
  font-weight: 800;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.signed-user {
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--panel-soft);
  color: var(--muted);
  font-weight: 700;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 248, 250, 0.98));
  border: 1px solid rgba(216, 222, 232, 0.85);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow);
}

.stat-card strong {
  display: block;
  margin-top: 8px;
  font-size: 1.7rem;
}

.stat-card small,
.stat-label {
  color: var(--muted);
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr);
  gap: 18px;
}

.company-panel {
  margin-top: 18px;
}

.form-grid {
  display: grid;
  gap: 14px;
}

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

.field {
  display: grid;
  gap: 8px;
}

.field span {
  font-size: 0.92rem;
  font-weight: 700;
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 13px 15px;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: rgba(15, 98, 254, 0.6);
  box-shadow: 0 0 0 4px rgba(15, 98, 254, 0.12);
}

.file-field input {
  padding: 10px 12px;
}

.switch-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--panel-soft);
}

.switch-row strong {
  display: block;
  margin-bottom: 6px;
}

.switch-row p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.switch-row input {
  width: 22px;
  height: 22px;
}

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

.primary-button,
.secondary-button,
.ghost-button {
  border: none;
  border-radius: 16px;
  padding: 14px 18px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover {
  transform: translateY(-1px);
}

.primary-button {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 18px 26px rgba(15, 98, 254, 0.2);
}

.primary-button.muted {
  background: linear-gradient(135deg, #0f766e, #0f9d58);
  box-shadow: 0 18px 26px rgba(15, 157, 88, 0.18);
}

.secondary-button {
  background: #eff4ff;
  color: var(--primary-dark);
  border: 1px solid rgba(15, 98, 254, 0.18);
}

.ghost-button {
  background: var(--panel-soft);
  color: var(--text);
}

.ghost-button.danger {
  color: var(--danger);
}

.divider {
  height: 1px;
  background: var(--border);
  margin: 18px 0;
}

.list-shell {
  display: grid;
  gap: 10px;
}

.history-item,
.company-item {
  display: grid;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px;
  background: var(--panel-soft);
}

.history-head,
.company-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.history-tags,
.company-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  background: #fff;
  border: 1px solid rgba(15, 98, 254, 0.14);
  color: var(--primary-dark);
}

.tag.success {
  color: var(--success);
  border-color: rgba(15, 157, 88, 0.16);
}

.tag.danger {
  color: var(--danger);
  border-color: rgba(217, 48, 37, 0.16);
}

.company-meta,
.history-note {
  color: var(--muted);
  line-height: 1.7;
  font-size: 0.92rem;
}

.company-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.empty-state {
  color: var(--muted);
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  min-width: 260px;
  max-width: 420px;
  padding: 14px 18px;
  border-radius: 16px;
  background: rgba(20, 32, 51, 0.96);
  color: #fff;
  box-shadow: var(--shadow);
  z-index: 10;
}

.toast.error {
  background: rgba(185, 28, 28, 0.96);
}

.toast.success {
  background: rgba(9, 95, 54, 0.96);
}

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

  .hero-panel {
    min-height: auto;
  }
}

@media (max-width: 900px) {
  .workspace-shell {
    padding: 18px;
  }

  .auth-hub-grid,
  .workspace-grid,
  .stats-grid,
  .field-row,
  .button-stack {
    grid-template-columns: 1fr;
  }

  .topbar,
  .panel-header,
  .release-history-header,
  .history-head,
  .company-head {
    flex-direction: column;
  }
}
