/* Trehan Luxury Floors — Channel Partner Tracker */

:root {
  --bg: #1a0f1f;
  --bg-card: #241531;
  --gold: #d4a94a;
  --gold-light: #f0d27a;
  --text: #f2e6c9;
  --text-muted: #c9b8a8;
  --error: #ff8080;
  --success: #8ce0a0;
  --border: #3a2a44;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  min-height: 100vh;
}

.page {
  max-width: 480px;
  margin: 0 auto;
  padding: 40px 20px 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.brand {
  text-align: center;
  margin-bottom: 28px;
}

.brand h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
  margin: 0 0 6px;
  color: var(--text);
}

.brand p {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.divider {
  width: 100%;
  height: 1px;
  background: var(--border);
  margin: 20px 0 28px;
}

h2.section-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  width: 100%;
  margin: 0 0 18px;
  color: var(--text);
}

.card {
  width: 100%;
  background: var(--bg-card);
  border-radius: 18px;
  padding: 26px 22px;
  border: 1px solid var(--border);
}

.field {
  margin-bottom: 22px;
}

.field label {
  display: block;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 8px;
}

.field label .req {
  color: var(--gold-light);
}

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="number"],
.field select,
.field textarea {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-size: 15px;
  padding: 8px 2px;
  font-family: inherit;
}

.field select option { color: #000; }

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-bottom-color: var(--gold);
}

.field textarea { resize: vertical; min-height: 70px; }

.row-2 {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 14px;
}

.field .hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

.file-upload {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  padding: 8px 2px;
}

.file-upload label.trigger {
  color: var(--gold-light);
  cursor: pointer;
  font-size: 20px;
}

.file-upload input[type="file"] { display: none; }

.file-upload .filename {
  font-size: 12px;
  color: var(--text-muted);
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conditional { display: none; }
.conditional.show { display: block; }

.btn {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin: 14px 0;
  padding: 16px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: bold;
  font-size: 15px;
  text-align: center;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.btn.primary {
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  color: var(--bg);
}

.btn.primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn.secondary {
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold-light);
}

.btn.link-back {
  background: transparent;
  color: var(--text-muted);
  text-decoration: underline;
  font-weight: normal;
}

.shared-by {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 24px;
  text-align: center;
}

.status-msg {
  font-size: 13px;
  margin-top: 10px;
  min-height: 18px;
  text-align: center;
}

.status-msg.error { color: var(--error); }
.status-msg.success { color: var(--success); }

.thankyou-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.center-text { text-align: center; }

/* ── Admin Dashboard ──────────────────────────────────────────────── */

.page-wide {
  max-width: 1000px;
  margin: 0 auto;
  padding: 32px 20px 60px;
}

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: flex-end;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 24px;
}

.admin-toolbar .field { margin-bottom: 0; min-width: 200px; flex: 1; }

.admin-toolbar .btn { width: auto; margin: 0; padding: 12px 22px; white-space: nowrap; }

.inline-add {
  display: flex;
  gap: 8px;
  align-items: center;
}

.inline-add input { flex: 1; }

.result-card {
  background: var(--bg-card);
  border: 1px solid var(--gold);
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 24px;
  display: none;
}

.result-card.show { display: block; }

.result-card .rc-id { font-size: 20px; font-weight: bold; color: var(--gold-light); }

.result-card .rc-link {
  font-size: 13px;
  color: var(--text-muted);
  word-break: break-all;
  margin: 8px 0 12px;
}

.result-card .rc-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.result-card .rc-actions .btn { width: auto; margin: 0; padding: 10px 16px; font-size: 13px; }

.data-table-wrap { overflow-x: auto; }

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

table.data-table th, table.data-table td {
  border-bottom: 1px solid var(--border);
  padding: 10px 8px;
  text-align: left;
  white-space: nowrap;
}

table.data-table th {
  color: var(--gold-light);
  font-weight: bold;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.4px;
}

table.data-table td.link-cell { max-width: 220px; overflow: hidden; text-overflow: ellipsis; }

.gate {
  max-width: 380px;
  margin: 80px auto;
  text-align: center;
}

.gate .card { text-align: left; }

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