/* ===== ADMIN LAYOUT ===== */
.admin-layout {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 24px;
  min-height: calc(100vh - 60px);
}

/* ===== AUTH SCREEN ===== */
.auth-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 70vh;
}

.auth-card {
  background: var(--cream);
  border-radius: 20px;
  border: 1px solid rgba(232, 148, 90, 0.15);
  padding: 48px 40px;
  width: 100%;
  max-width: 420px;
  text-align: center;
}

.auth-card h2 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.auth-card p {
  color: var(--fg-muted);
  font-size: 0.95rem;
  margin-bottom: 28px;
}

.auth-card input {
  width: 100%;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1.5px solid rgba(232, 148, 90, 0.25);
  background: var(--bg);
  font-size: 1rem;
  font-family: var(--font-body);
  color: var(--fg);
  margin-bottom: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.auth-card input:focus { border-color: var(--accent); }

/* ===== BUTTONS ===== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 24px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 700;
  font-family: var(--font-body);
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}
.btn-primary:hover { background: var(--accent-deep); transform: translateY(-1px); }

.btn-secondary {
  padding: 12px 24px;
  background: transparent;
  color: var(--fg-muted);
  border: 1.5px solid rgba(232, 148, 90, 0.25);
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: border-color 0.2s;
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

/* ===== ADMIN HEADER ===== */
.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.admin-header h1 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
}

/* ===== TABLE ===== */
.products-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--cream);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(232, 148, 90, 0.12);
}

.products-table th {
  background: var(--bg-warm);
  padding: 14px 16px;
  text-align: left;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--fg-muted);
  border-bottom: 1px solid rgba(232, 148, 90, 0.12);
}

.products-table td {
  padding: 14px 16px;
  font-size: 0.92rem;
  color: var(--fg);
  border-bottom: 1px solid rgba(232, 148, 90, 0.07);
  vertical-align: middle;
}

.products-table tr:last-child td { border-bottom: none; }

.products-table tr:hover td { background: rgba(232, 148, 90, 0.04); }

.td-title { font-weight: 600; max-width: 240px; }

.loading-cell { text-align: center; color: var(--fg-muted); padding: 40px; }

/* ===== BADGES ===== */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
  background: var(--bg-warm);
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-right: 4px;
}
.badge--etsy    { background: rgba(245,100,0,0.12); color: #b84c00; }
.badge--gumroad { background: rgba(255,144,232,0.2); color: #a0006b; }
.badge--shopify { background: rgba(150,191,72,0.15); color: #4a6b1a; }

/* ===== STATUS DOTS ===== */
.dot {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
}
.dot--green { background: #5cb85c; }
.dot--grey  { background: #ccc; }

/* ===== ROW ACTIONS ===== */
.td-actions { white-space: nowrap; }

.btn-icon {
  padding: 6px 12px;
  border: 1.5px solid rgba(232, 148, 90, 0.3);
  border-radius: 8px;
  background: transparent;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: var(--font-body);
  color: var(--fg-muted);
  cursor: pointer;
  transition: all 0.15s;
  margin-left: 6px;
}
.btn-icon:hover { border-color: var(--accent); color: var(--accent); }
.btn-icon--danger:hover { border-color: #e05c5c; color: #e05c5c; }

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(45, 36, 32, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
  backdrop-filter: blur(4px);
}

.modal-card {
  background: var(--bg);
  border-radius: 20px;
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 36px 36px 32px;
  position: relative;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.modal-header h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.1rem;
  color: var(--fg-muted);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
}
.modal-close:hover { background: var(--bg-warm); }

/* ===== FORM ===== */
.form-row {
  margin-bottom: 18px;
}

.form-row label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--fg-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.form-row input[type="text"],
.form-row input[type="url"],
.form-row input[type="number"],
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1.5px solid rgba(232, 148, 90, 0.2);
  background: var(--cream);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--fg);
  outline: none;
  transition: border-color 0.2s;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus { border-color: var(--accent); }

.form-row textarea { resize: vertical; }

.form-row.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-row-check {
  display: flex;
  align-items: flex-end;
  padding-bottom: 12px;
}

.form-row-check label {
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--fg);
  cursor: pointer;
}

/* ===== PLATFORM FIELDS ===== */
.platform-fields { display: flex; flex-direction: column; gap: 10px; }

.platform-field {
  display: flex;
  align-items: center;
  gap: 10px;
}

.platform-field input { flex: 1; margin: 0; }

.platform-tag {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  min-width: 72px;
  text-align: center;
}

.platform-tag--etsy    { background: rgba(245,100,0,0.12); color: #b84c00; }
.platform-tag--gumroad { background: rgba(255,144,232,0.2); color: #a0006b; }
.platform-tag--shopify { background: rgba(150,191,72,0.15); color: #4a6b1a; }

/* ===== FORM ACTIONS ===== */
.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(232, 148, 90, 0.12);
}

/* ===== ERROR MSG ===== */
.error-msg { color: #e05c5c; font-size: 0.88rem; margin-top: 8px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
  .admin-layout { padding: 28px 16px; }
  .modal-card { padding: 24px 20px; }
  .form-row.two-col { grid-template-columns: 1fr; }
}
