:root {
  --bg-dark: #081320;
  --bg-dark-2: #0f1f33;
  --line: rgba(255, 255, 255, 0.14);
  --text: #eef4ff;
  --muted: #b8c3d8;
  --accent: #ff6a00;
  --accent-2: #ffd54a;
  --danger: #ff8e8e;
  --success: #8dffb8;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 106, 0, 0.18), transparent 30%),
    radial-gradient(circle at top right, rgba(255, 213, 74, 0.12), transparent 24%),
    linear-gradient(180deg, var(--bg-dark), var(--bg-dark-2));
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: var(--bg-image);
  background-size: cover;
  background-position: center;
  opacity: 0.22;
  z-index: 0;
}

.bg-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 14, 28, 0.74), rgba(6, 14, 28, 0.88));
  z-index: 0;
}

.glass-card {
  position: relative;
  z-index: 1;
  background: rgba(8, 17, 32, 0.66);
  border: 1px solid var(--line);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}

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

.panel-card {
  width: 100%;
  max-width: 460px;
  padding: 28px;
  border-radius: 24px;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 12px;
  letter-spacing: 1px;
  font-weight: 700;
  margin-bottom: 12px;
}

h1, h2 {
  margin: 0 0 10px;
  line-height: 1.2;
}

h1 { font-size: 32px; }
h2 { font-size: 22px; }

.subtext {
  color: var(--muted);
  margin: 0 0 22px;
  line-height: 1.6;
}

.form-stack {
  display: grid;
  gap: 16px;
}

label span {
  display: block;
  margin-bottom: 8px;
  color: #f6f8ff;
  font-size: 14px;
  font-weight: 700;
}

input[type="text"],
input[type="password"] {
  width: 100%;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
  color: var(--text);
  border-radius: 16px;
  padding: 14px 16px;
  outline: none;
  font-size: 15px;
}

input[type="text"]:focus,
input[type="password"]:focus {
  border-color: rgba(255, 213, 74, 0.65);
  box-shadow: 0 0 0 4px rgba(255, 213, 74, 0.08);
}

.cta-shiny,
.btn-secondary,
.btn-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 16px;
  text-decoration: none;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}

.cta-shiny {
  overflow: hidden;
  padding: 14px 18px;
  color: #1a1203;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  box-shadow: 0 14px 34px rgba(255, 125, 24, 0.28);
}

.cta-shiny::before {
  content: "";
  position: absolute;
  top: -20%;
  left: -40%;
  width: 22%;
  height: 140%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.85), transparent);
  transform: skewX(-22deg);
  animation: skinnyShine 2.2s linear infinite;
}

@keyframes skinnyShine {
  0% { left: -45%; }
  100% { left: 130%; }
}

.cta-shiny:hover,
.btn-secondary:hover,
.btn-link:hover {
  transform: translateY(-1px);
}

.btn-secondary {
  padding: 12px 16px;
  color: var(--text);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
}

.btn-link {
  margin-top: 14px;
  padding: 12px 16px;
  color: var(--text);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
}

.alert {
  padding: 14px 16px;
  border-radius: 16px;
  margin-bottom: 16px;
  border: 1px solid transparent;
}
.alert.error {
  background: rgba(255, 91, 91, 0.12);
  border-color: rgba(255, 91, 91, 0.22);
  color: #ffd6d6;
}
.alert.success {
  background: rgba(59, 214, 126, 0.14);
  border-color: rgba(59, 214, 126, 0.22);
  color: #d7ffe7;
}

.hint-box,
.empty-state {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--muted);
  line-height: 1.6;
}

code {
  color: #fff0b8;
  font-weight: 700;
}

.topbar {
  position: relative;
  z-index: 1;
  margin: 24px auto 0;
  width: min(1180px, calc(100% - 32px));
  padding: 20px 24px;
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

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

.welcome-text {
  color: var(--muted);
  font-size: 14px;
}

.dashboard-grid {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 32px));
  margin: 24px auto 40px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 24px;
}

.form-card,
.result-card {
  padding: 24px;
  border-radius: 24px;
}

.upload-dropzone {
  position: relative;
  display: block;
  padding: 28px 20px;
  text-align: center;
  border-radius: 20px;
  border: 1px dashed rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.04);
}

.upload-dropzone input[type="file"] {
  width: 100%;
  color: var(--muted);
}

.drop-title {
  display: block;
  margin: 12px 0 6px;
  font-size: 16px;
  color: var(--text);
}

.upload-dropzone small {
  color: var(--muted);
}

.preview-wrap {
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  margin-bottom: 16px;
}

.preview-wrap img {
  display: block;
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  background: rgba(255,255,255,0.02);
}

.copy-row {
  display: flex;
  gap: 10px;
}

.copy-row input {
  flex: 1;
}

@media (max-width: 900px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

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

  .topbar-actions {
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 560px) {
  .panel-card,
  .form-card,
  .result-card {
    padding: 20px;
    border-radius: 20px;
  }

  h1 { font-size: 28px; }
  .copy-row { flex-direction: column; }
}
