/* ===== Platform-specific styles (extends style.css) ===== */

.platform-body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ---------- Auth screen ---------- */
.auth-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  position: relative;
  background-image:
    linear-gradient(160deg, rgba(12,5,18,0.85), rgba(22,8,31,0.92)),
    url("../images/platform-cassette.jpg");
  background-size: cover;
  background-position: center;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 40px 34px;
  position: relative;
  z-index: 2;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-en);
  font-weight: 800;
  font-size: 22px;
  margin-bottom: 8px;
}
.auth-logo .logo-icon { width: 32px; height: 32px; }

.auth-card h2 {
  text-align: center;
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 6px;
}
.auth-card .sub {
  text-align: center;
  color: var(--muted-dark);
  font-size: 14px;
  margin-bottom: 28px;
}

.auth-tabs {
  display: flex;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 26px;
}
.auth-tab {
  flex: 1;
  text-align: center;
  padding: 10px;
  border-radius: 9px;
  font-weight: 700;
  font-size: 14px;
  color: var(--muted-dark);
  background: none;
  transition: background 0.2s ease, color 0.2s ease;
}
.auth-tab.active {
  background: linear-gradient(135deg, var(--purple-500), var(--purple-700));
  color: #fff;
}

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

.auth-error {
  display: none;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  font-size: 13.5px;
  padding: 10px 14px;
  border-radius: 10px;
  margin-bottom: 16px;
}
.auth-error.show { display: block; }

.auth-note {
  margin-top: 18px;
  font-size: 12.5px;
  color: var(--muted-dark);
  text-align: center;
  line-height: 1.6;
}

/* ---------- App shell ---------- */
.app-shell { display: none; flex: 1; }
.app-shell.active { display: flex; }

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(12, 5, 18, 0.9);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
}
.app-topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.app-tabs { display: flex; gap: 6px; background: rgba(255,255,255,0.04); padding: 4px; border-radius: 12px; }
.app-tab {
  padding: 9px 18px;
  border-radius: 9px;
  font-weight: 700;
  font-size: 14px;
  color: var(--muted-dark);
  background: none;
  transition: background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}
.app-tab.active { background: linear-gradient(135deg, var(--purple-500), var(--purple-700)); color: #fff; }

.app-user {
  display: flex;
  align-items: center;
  gap: 12px;
}
.points-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255, 106, 61, 0.15);
  border: 1px solid rgba(255, 106, 61, 0.4);
  font-weight: 800;
  font-size: 14px;
  color: #ffb08a;
}
.user-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple-500), var(--purple-700));
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 15px;
}
.logout-btn {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  color: var(--white);
  padding: 9px 16px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 13.5px;
}
.logout-btn:hover { border-color: var(--purple-500); }

.app-main { padding: 46px 0 80px; flex: 1; }

.view { display: none; }
.view.active { display: block; }

.view-header { margin-bottom: 34px; }
.view-header h1 { font-size: 28px; font-weight: 800; margin-bottom: 8px; }
.view-header p { color: var(--muted-dark); font-size: 15px; }

/* ---------- Ideas grid ---------- */
.ideas-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.idea-card {
  border-radius: 20px;
  padding: 26px;
  background: linear-gradient(160deg, rgba(124,47,184,0.08), rgba(255,255,255,0.02));
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}
.idea-card .cat {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: var(--purple-300);
  background: rgba(124,47,184,0.15);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
  width: fit-content;
}
.idea-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 10px; }
.idea-card p { color: var(--muted-dark); font-size: 14px; margin-bottom: 18px; flex: 1; }
.idea-card .meta {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--muted-dark);
}
.idea-card .reward { color: #ffb08a; font-weight: 700; }
.idea-btn {
  width: 100%;
  padding: 11px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
  background: linear-gradient(135deg, var(--purple-500), var(--purple-700));
  color: #fff;
  transition: opacity 0.2s ease;
}
.idea-btn:disabled { background: rgba(255,255,255,0.06); color: var(--muted-dark); cursor: not-allowed; }

.progress-bar {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
  margin-bottom: 8px;
}
.progress-bar .fill {
  height: 100%;
  background: linear-gradient(135deg, var(--purple-500), var(--purple-700));
  border-radius: 999px;
}
.progress-label {
  font-size: 12px;
  color: var(--muted-dark);
  margin-bottom: 16px;
}
.contribute-row {
  display: flex;
  gap: 8px;
}
.contribute-row input {
  flex: 1;
  min-width: 0;
}
.status-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
}
.status-badge.pending { color: #ffb08a; background: rgba(255,176,138,0.15); }
.status-badge.approved { color: #5be08a; background: rgba(91,224,138,0.15); }
.status-badge.rejected { color: #ff6b6b; background: rgba(255,107,107,0.15); }

.user-avatar img,
.admin-avatar-thumb {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.admin-avatar-thumb {
  width: 32px;
  height: 32px;
}

/* ---------- My Account ---------- */
.account-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}
.stat-card {
  padding: 26px;
  border-radius: 18px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
}
.stat-card .label { font-size: 13px; color: var(--muted-dark); margin-bottom: 10px; }
.stat-card .value { font-size: 30px; font-weight: 800; }
.stat-card.highlight { background: linear-gradient(160deg, var(--purple-700), var(--purple-950)); border-color: rgba(124,47,184,0.4); }

.referral-box {
  padding: 28px;
  border-radius: 18px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  margin-bottom: 24px;
}
.referral-box h3 { font-size: 17px; margin-bottom: 6px; }
.referral-box p { color: var(--muted-dark); font-size: 13.5px; margin-bottom: 18px; }
.referral-code-row {
  display: flex;
  gap: 10px;
}
.referral-code-row input {
  flex: 1;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  color: var(--white);
  font-family: var(--font-en);
  font-weight: 700;
  letter-spacing: 1px;
}
.copy-btn {
  padding: 12px 20px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--purple-500), var(--purple-700));
  color: #fff;
  font-weight: 700;
  font-size: 13.5px;
  white-space: nowrap;
}

.marketer-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 999px;
  background: rgba(255,106,61,0.15);
  border: 1px solid rgba(255,106,61,0.4);
  color: #ffb08a;
  font-size: 12.5px;
  font-weight: 700;
  margin-top: 10px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.data-table th {
  text-align: right;
  padding: 12px 16px;
  color: var(--muted-dark);
  font-weight: 700;
  font-size: 12.5px;
  border-bottom: 1px solid var(--border);
}
.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.table-card {
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
  overflow: hidden;
  overflow-x: auto;
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted-dark);
  font-size: 14px;
}

/* ---------- Admin ---------- */
.admin-no-access {
  max-width: 420px;
  margin: 60px auto;
  text-align: center;
  padding: 40px;
  border-radius: 20px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
}
.admin-no-access .icon { font-size: 40px; margin-bottom: 16px; }
.admin-no-access h3 { font-size: 19px; margin-bottom: 8px; }
.admin-no-access p { color: var(--muted-dark); font-size: 14px; }

.admin-subtabs {
  display: flex;
  gap: 8px;
  margin-bottom: 26px;
  border-bottom: 1px solid var(--border);
}
.admin-subtab {
  padding: 12px 20px;
  background: none;
  color: var(--muted-dark);
  font-weight: 700;
  font-size: 14px;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.admin-subtab.active { color: var(--white); border-bottom-color: var(--purple-500); }

.admin-sub { display: none; }
.admin-sub.active { display: block; }

.project-form-card {
  padding: 26px;
  border-radius: 18px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  margin-bottom: 24px;
}
.project-form-card h3 { font-size: 17px; margin-bottom: 18px; }

.role-badge {
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.role-badge.user { background: rgba(255,255,255,0.08); color: var(--muted); }
.role-badge.marketer { background: rgba(255,106,61,0.15); color: #ffb08a; }
.role-badge.admin { background: rgba(124,47,184,0.2); color: var(--purple-300); }

.small-btn {
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 700;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  color: var(--white);
  margin-inline-end: 6px;
}
.small-btn:hover { border-color: var(--purple-500); }
.small-btn.primary { background: linear-gradient(135deg, var(--purple-500), var(--purple-700)); border: none; }

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--purple-700);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  padding: 14px 26px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 500;
  box-shadow: 0 12px 30px rgba(0,0,0,0.4);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 960px) {
  .ideas-grid { grid-template-columns: repeat(2, 1fr); }
  .account-grid { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .ideas-grid { grid-template-columns: 1fr; }
  .app-topbar .container { flex-wrap: wrap; gap: 12px; }
  .app-tabs { order: 3; width: 100%; overflow-x: auto; }
}
