* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(37,99,235,0.18), transparent 25%),
    radial-gradient(circle at top right, rgba(34,197,94,0.10), transparent 20%),
    linear-gradient(180deg, #09101d 0%, #0b1220 100%);
  color: #ffffff;
  min-height: 100vh;
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 28px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: rgba(10, 16, 30, 0.7);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.brand-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.brand-subtitle {
  font-size: 13px;
  color: #9fb0d1;
}

.top-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  padding: 12px 18px;
  border-radius: 10px;
  border: 1px solid #2a3b5f;
  background: #16223a;
  color: white;
  cursor: pointer;
  font-weight: 700;
  transition: 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
  opacity: 0.95;
}

.btn-primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border: 1px solid #2563eb;
}

.btn-secondary {
  background: #101a2d;
}

.hero-section {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 28px;
  padding: 40px 28px 32px;
  align-items: stretch;
}

.hero-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
}

.hero-badge {
  display: inline-flex;
  width: fit-content;
  padding: 8px 12px;
  border: 1px solid rgba(125,211,252,0.2);
  border-radius: 999px;
  color: #7dd3fc;
  background: rgba(125,211,252,0.08);
  font-size: 13px;
  font-weight: 700;
}

.hero-title {
  font-size: 48px;
  line-height: 1.05;
  margin: 0;
  max-width: 700px;
}

.hero-text {
  color: #b9c7e2;
  font-size: 18px;
  line-height: 1.6;
  max-width: 720px;
  margin: 0;
}

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

.point {
  padding: 16px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  background: rgba(255,255,255,0.03);
}

.point strong {
  display: block;
  margin-bottom: 6px;
  color: #ffffff;
}

.point span {
  color: #9fb0d1;
  font-size: 14px;
  line-height: 1.5;
}

.hero-right {
  position: relative;
  min-height: 620px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dashboard-preview {
  position: absolute;
  inset: 20px 0 20px 0;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(180deg, rgba(17,26,46,0.95), rgba(11,18,32,0.98));
  box-shadow: 0 30px 80px rgba(0,0,0,0.4);
  filter: blur(3px);
  opacity: 0.65;
  transform: scale(0.98);
}

.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.preview-title {
  font-size: 20px;
  font-weight: 700;
}

.preview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 18px;
}

.preview-card {
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 16px;
  background: rgba(255,255,255,0.03);
  min-height: 160px;
  padding: 14px;
}

.preview-card h3 {
  margin-top: 0;
  color: #7dd3fc;
  font-size: 16px;
}

.preview-line {
  height: 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  margin-bottom: 10px;
}

.auth-card {
  position: relative;
  z-index: 2;
  width: min(440px, 100%);
  background: rgba(12, 19, 34, 0.92);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 24px;
  box-shadow: 0 25px 70px rgba(0,0,0,0.45);
  padding: 24px;
  backdrop-filter: blur(14px);
}

.auth-card h2 {
  margin-top: 0;
  margin-bottom: 8px;
  font-size: 28px;
}

.auth-sub {
  margin: 0 0 18px;
  color: #9fb0d1;
  line-height: 1.5;
}

.auth-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}

.tab-btn {
  flex: 1;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #2a3b5f;
  background: #101a2d;
  color: white;
  cursor: pointer;
  font-weight: 700;
}

.tab-btn.active {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border-color: #2563eb;
}

.auth-form {
  display: none;
}

.auth-form.active {
  display: block;
}

.field-label {
  display: block;
  margin-bottom: 8px;
  color: #c8d4ea;
  font-size: 14px;
  font-weight: 700;
}

.input {
  width: 100%;
  padding: 13px 14px;
  margin-bottom: 14px;
  border-radius: 12px;
  border: 1px solid #22304d;
  background: #0b1220;
  color: white;
  outline: none;
  font-size: 15px;
}

.input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.2);
}

.form-status {
  min-height: 22px;
  margin-bottom: 12px;
  color: #9fb0d1;
  font-size: 14px;
}

.form-status.error {
  color: #fda4af;
}

.form-status.success {
  color: #86efac;
}

.dashboard-hidden {
  display: none;
}

.dashboard-area {
  padding: 28px;
}

.dashboard-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.dashboard-title {
  margin: 0 0 6px;
  font-size: 28px;
}

.dashboard-user {
  color: #9fb0d1;
  font-size: 14px;
}

.status-bar {
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid #22304d;
  background: rgba(255,255,255,0.03);
  color: #9fb0d1;
}

.grid {
  display: grid;
  gap: 18px;
}

.market-card {
  background: #111a2e;
  border: 1px solid #22304d;
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.22);
}

.market-card h3 {
  margin-top: 0;
  color: #7dd3fc;
  font-size: 20px;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

th, td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid #22304d;
  font-size: 14px;
}

th {
  color: #9fb0d1;
}

.empty {
  color: #6b7b9c;
  font-style: italic;
  margin-top: 8px;
  display: none;
}

.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 10, 20, 0.88);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.loading-overlay.active {
  opacity: 1;
  visibility: visible;
}

.loading-box {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.logo-loader {
  position: relative;
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-core {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: radial-gradient(circle at top left, #2563eb, #0f172a 72%);
  border: 1px solid rgba(125, 211, 252, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 1px;
  box-shadow: 0 0 35px rgba(37, 99, 235, 0.35);
}

.logo-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 4px solid rgba(125, 211, 252, 0.12);
  border-top: 4px solid #7dd3fc;
  border-right: 4px solid #2563eb;
  animation: spin 1.2s linear infinite;
  box-shadow: 0 0 30px rgba(125, 211, 252, 0.1);
}

.loading-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.4px;
}

.loading-text {
  color: #9fb0d1;
  font-size: 15px;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@media (max-width: 1000px) {
  .hero-section {
    grid-template-columns: 1fr;
  }

  .hero-title {
    font-size: 38px;
  }

  .hero-right {
    min-height: 540px;
  }
}

@media (max-width: 700px) {
  .topbar,
  .hero-section,
  .dashboard-area {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-title {
    font-size: 32px;
  }

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

  .auth-card {
    padding: 18px;
  }

  .dashboard-title {
    font-size: 24px;
  }
}
