:root {
  --slateMain: #0F172A;
  --slateCard: #1E293B;
  --textMain: #F8FAFC;
  --textSec: #E2E8F0;
  --silver: #CBD5E1;
  --premium: #D95407;
  --premiumDark: #B45309;
  --positive: #0DC619;
  --positiveDark: #0D9488;
  --border: rgba(203, 213, 225, 0.18);
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, Segoe UI, Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(13, 198, 25, 0.14), transparent 34%),
    radial-gradient(circle at top right, rgba(217, 84, 7, 0.17), transparent 32%),
    var(--slateMain);
  color: var(--textMain);
}

.app-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0;
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  align-items: center;
  padding: 28px;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.92));
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.brand {
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand-logo {
  width: 145px;
  height: 145px;
  object-fit: contain;
  border-radius: 24px;
  background: rgba(0, 0, 0, 0.24);
  padding: 8px;
  border: 1px solid rgba(203, 213, 225, 0.22);
}

.eyebrow,
.section-kicker {
  margin: 0 0 8px;
  color: var(--premium);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 800;
  font-size: 0.76rem;
}

h1,
h2 {
  margin: 0;
  line-height: 1.05;
}

h1 {
  font-size: clamp(2rem, 4vw, 3.4rem);
}

h2 {
  font-size: clamp(1.25rem, 2vw, 1.65rem);
}

.subtitle,
.hint {
  color: var(--textSec);
  margin: 12px 0 0;
  line-height: 1.55;
}

.privacy-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  color: var(--textMain);
  background: rgba(13, 198, 25, 0.12);
  border: 1px solid rgba(13, 198, 25, 0.34);
  padding: 12px 16px;
  border-radius: 999px;
  font-weight: 800;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 99px;
  background: var(--positive);
  box-shadow: 0 0 18px var(--positive);
}

main {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.panel,
.stat-card {
  background: rgba(30, 41, 59, 0.94);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 22px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.22);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 18px;
}

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

.upload-card {
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px dashed rgba(203, 213, 225, 0.38);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.58);
  cursor: pointer;
}

.upload-title {
  font-weight: 900;
  font-size: 1.08rem;
}

.upload-desc,
.file-status {
  color: var(--silver);
  font-size: 0.92rem;
}

input[type="file"] {
  width: 100%;
  color: var(--textSec);
}

.action-row,
.table-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.btn {
  border: 0;
  color: var(--textMain);
  border-radius: 14px;
  padding: 12px 16px;
  font-weight: 900;
  cursor: pointer;
  transition: 0.2s ease;
}

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

.btn-premium {
  background: var(--premium);
}

.btn-premium:hover {
  background: var(--premiumDark);
}

.btn-positive {
  background: var(--positiveDark);
}

.btn-positive:hover {
  background: var(--positive);
}

.btn-ghost {
  background: transparent;
  border: 1px solid rgba(203, 213, 225, 0.26);
}

.messages {
  margin-top: 16px;
  display: grid;
  gap: 8px;
}

.message {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--border);
  color: var(--textSec);
}

.message.ok {
  border-color: rgba(13, 198, 25, 0.36);
}

.message.error {
  border-color: rgba(217, 84, 7, 0.58);
}

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

.stat-card {
  display: grid;
  gap: 8px;
}

.stat-label {
  color: var(--silver);
  font-size: 0.9rem;
}

.stat-card strong {
  font-size: 2rem;
}

.manual-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr auto;
  gap: 10px;
}

input[type="text"],
input[type="search"] {
  width: 100%;
  color: var(--textMain);
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(203, 213, 225, 0.22);
  border-radius: 14px;
  padding: 12px 14px;
  outline: none;
}

input[type="text"]:focus,
input[type="search"]:focus {
  border-color: var(--positiveDark);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.18);
}

.table-wrap {
  overflow: auto;
  max-height: 560px;
  border-radius: 18px;
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
  background: rgba(15, 23, 42, 0.38);
}

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid rgba(203, 213, 225, 0.12);
  text-align: left;
  vertical-align: middle;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #111c33;
  color: var(--silver);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
}

td input {
  width: 100%;
  color: var(--textMain);
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 9px 10px;
}

td input:focus {
  outline: none;
  border-color: var(--premium);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 0.78rem;
}

.badge.new {
  background: rgba(217, 84, 7, 0.18);
  color: #FDBA74;
}

.badge.saved {
  background: rgba(13, 198, 25, 0.14);
  color: #86EFAC;
}

.empty-state {
  text-align: center;
  color: var(--silver);
  padding: 28px;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--silver);
  padding: 22px 4px 0;
  font-size: 0.92rem;
}

@media (max-width: 850px) {
  .hero,
  .panel-header,
  .brand,
  footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .upload-grid,
  .stats-grid,
  .manual-grid {
    grid-template-columns: 1fr;
  }

  .brand-logo {
    width: 120px;
    height: 120px;
  }

  .privacy-badge {
    white-space: normal;
  }
}
