@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg-primary: #0a0a0c;
  --bg-secondary: #111114;
  --bg-card: #16161a;
  --bg-card-hover: #1c1c21;
  --bg-input: #1a1a1f;
  --bg-input-focus: #1e1e24;
  --border: #2a2a30;
  --border-light: #35353d;
  --text-primary: #e8e8ed;
  --text-secondary: #9898a4;
  --text-muted: #606070;
  --accent: #d4a843;
  --accent-hover: #e0b84f;
  --accent-dim: rgba(212, 168, 67, 0.12);
  --accent-glow: rgba(212, 168, 67, 0.25);
  --danger: #e05555;
  --danger-dim: rgba(224, 85, 85, 0.12);
  --success: #4ecb71;
  --success-dim: rgba(78, 203, 113, 0.12);
  --info: #5b9cf5;
  --info-dim: rgba(91, 156, 245, 0.12);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
  --transition: 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 15px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Background pattern */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: 
    radial-gradient(ellipse at 20% 0%, rgba(212,168,67,0.04) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 100%, rgba(212,168,67,0.03) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* ===================== LAYOUT ===================== */

.page-wrapper {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}

.container--wide {
  max-width: 1200px;
}

/* ===================== HEADER ===================== */

.site-header {
  padding: 32px 0 16px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  margin-bottom: 40px;
}

.site-header__logo {
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.site-header__logo span {
  color: var(--accent);
}

.site-header__subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
}

/* ===================== NAV ===================== */

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
}

.nav-bar__brand {
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--accent);
  text-decoration: none;
}

.nav-bar__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-bar__user {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.nav-bar__avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--border);
}

/* ===================== CARDS ===================== */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 20px;
  transition: border-color var(--transition);
}

.card:hover {
  border-color: var(--border-light);
}

.card__title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.card__subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

/* ===================== FORMS ===================== */

.form-group {
  margin-bottom: 22px;
}

.form-label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.form-label .required {
  color: var(--accent);
  margin-left: 2px;
}

.form-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  transition: all var(--transition);
  outline: none;
}

.form-input:focus,
.form-textarea:focus {
  background: var(--bg-input-focus);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-muted);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

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

@media (max-width: 640px) {
  .form-row { grid-template-columns: 1fr; }
}

/* ===================== BUTTONS ===================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  letter-spacing: 0.03em;
}

.btn--primary {
  background: var(--accent);
  color: #0a0a0c;
}

.btn--primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px var(--accent-glow);
}

.btn--secondary {
  background: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn--secondary:hover {
  background: var(--bg-input-focus);
  border-color: var(--border-light);
}

.btn--danger {
  background: var(--danger-dim);
  color: var(--danger);
  border: 1px solid rgba(224,85,85,0.2);
}

.btn--danger:hover {
  background: rgba(224,85,85,0.2);
}

.btn--small {
  padding: 6px 14px;
  font-size: 0.82rem;
}

.btn--discord {
  background: #5865F2;
  color: white;
}

.btn--discord:hover {
  background: #4752C4;
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.5;
  pointer-events: none;
}

/* ===================== FILE UPLOAD ===================== */

.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--bg-input);
}

.upload-zone:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.upload-zone__icon {
  font-size: 2rem;
  margin-bottom: 8px;
}

.upload-zone__text {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.upload-zone__text strong {
  color: var(--accent);
}

.upload-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.upload-preview__item {
  position: relative;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
}

.upload-preview__remove {
  cursor: pointer;
  color: var(--danger);
  font-weight: bold;
  margin-left: 4px;
}

/* ===================== TABLE ===================== */

.report-list {
  width: 100%;
  border-collapse: collapse;
}

.report-list th {
  text-align: left;
  padding: 12px 16px;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

.report-list td {
  padding: 14px 16px;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  white-space: nowrap;
}

.report-list tr {
  cursor: pointer;
  transition: background var(--transition);
}

.report-list tbody tr:hover {
  background: var(--bg-card-hover);
}

.report-list .ticket-id {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500;
  color: var(--accent);
  font-size: 0.88rem;
}

/* ===================== BADGES ===================== */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 999px;
  letter-spacing: 0.03em;
}

.badge--appeal {
  background: var(--info-dim);
  color: var(--info);
}

.badge--success {
  background: var(--success-dim);
  color: var(--success);
}

.badge--danger {
  background: var(--danger-dim);
  color: var(--danger);
}

/* ===================== DETAIL VIEW ===================== */

.detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}

.meta-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 18px;
}

.meta-item__label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 4px;
  font-weight: 600;
}

.meta-item__value {
  font-size: 0.95rem;
  color: var(--text-primary);
  word-break: break-word;
}

/* ===================== MEDIA GRID ===================== */

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.media-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--transition);
}

.media-card:hover {
  border-color: var(--border-light);
}

.media-card video,
.media-card img {
  width: 100%;
  display: block;
  max-height: 200px;
  object-fit: cover;
  background: #000;
}

.media-card__footer {
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.media-card__actions {
  display: flex;
  gap: 6px;
}

.copy-link-btn {
  padding: 4px 10px;
  font-size: 0.72rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}

.copy-link-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ===================== NOTES EDITOR ===================== */

.notes-editor {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-top: 16px;
}

.notes-toolbar {
  display: flex;
  gap: 2px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
  flex-wrap: wrap;
}

.notes-toolbar button {
  padding: 6px 10px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  transition: all var(--transition);
  font-family: inherit;
}

.notes-toolbar button:hover {
  background: var(--bg-input);
  color: var(--text-primary);
}

.notes-content {
  min-height: 200px;
  padding: 18px 20px;
  outline: none;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-primary);
}

.notes-content:empty::before {
  content: 'Escribe las notas del staff aquí...';
  color: var(--text-muted);
}

/* ===================== SECTION DIVIDERS ===================== */

.section-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-top: 32px;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title__icon {
  color: var(--accent);
}

/* ===================== APPEALS LIST ===================== */

.appeal-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-left: 3px solid var(--info);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 14px;
}

.appeal-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 8px;
}

.appeal-card__user {
  font-weight: 600;
  color: var(--text-primary);
}

.appeal-card__date {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.appeal-card__summary {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.6;
}

/* ===================== SEARCH ===================== */

.search-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
}

.search-bar .form-input {
  flex: 1;
}

/* ===================== PAGINATION ===================== */

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.pagination button {
  padding: 8px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
  transition: all var(--transition);
}

.pagination button:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}

.pagination button:disabled {
  opacity: 0.3;
  cursor: default;
}

.pagination__info {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0 8px;
}

/* ===================== LOADING & TOAST ===================== */

.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulse-bar {
  from { opacity: 0.4; }
  to   { opacity: 0.9; }
}

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 14px 22px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 0.9rem;
  color: var(--text-primary);
  z-index: 9999;
  transform: translateY(100px);
  opacity: 0;
  transition: all 300ms ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast--success { border-left: 3px solid var(--success); }
.toast--error { border-left: 3px solid var(--danger); }

/* ===================== STAFF MANAGE ===================== */

.staff-list {
  display: grid;
  gap: 10px;
}

.staff-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.staff-item__info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.staff-item__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
}

.staff-item__name {
  font-weight: 600;
  font-size: 0.92rem;
}

.staff-item__id {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}

/* ===================== PASSWORD MODAL ===================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 420px;
  width: 90%;
  box-shadow: var(--shadow-lg);
}

.modal__title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.modal__text {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

/* ===================== LANDING PAGE ===================== */

.hero {
  text-align: center;
  padding: 80px 24px 60px;
}

.hero__title {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 16px;
}

.hero__title span {
  color: var(--accent);
}

.hero__subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto 36px;
}

.hero__actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  padding: 40px 24px 80px;
  max-width: 900px;
  margin: 0 auto;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
}

.feature-card__icon {
  font-size: 2rem;
  margin-bottom: 12px;
}

.feature-card__title {
  font-weight: 700;
  margin-bottom: 6px;
}

.feature-card__text {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* ===================== MEDIA — VIDEO FULLSCREEN ===================== */

.media-card video {
  object-fit: contain;
  background: #000;
}

video:fullscreen { object-fit: contain; }
video:-webkit-full-screen { object-fit: contain; }
video:-moz-full-screen { object-fit: contain; }

/* ===================== AUTH / COMMUNITY LOGIN ===================== */

.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px 80px;
  gap: 40px;
}

.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  text-align: center;
  max-width: 440px;
  width: 100%;
  box-shadow: var(--shadow-lg);
}

.auth-ticket-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-dim);
  border: 1px solid rgba(212,168,67,0.35);
  border-radius: var(--radius-sm);
  padding: 6px 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 28px;
  letter-spacing: 0.02em;
}

.auth-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.auth-subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 36px;
  line-height: 1.5;
}

.btn--discord {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #5865F2;
  color: #fff;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: background var(--transition), transform var(--transition);
  width: 100%;
}

.btn--discord:hover {
  background: #4752C4;
  transform: translateY(-1px);
}

.auth-info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  max-width: 900px;
  width: 100%;
}

.auth-info-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 18px;
  text-align: left;
}

.auth-info-card__icon {
  font-size: 1.4rem;
  margin-bottom: 10px;
  display: block;
}

.auth-info-card__title {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 5px;
  color: var(--text-primary);
}

.auth-info-card__text {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* User banner in form state */
.user-banner {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 10px 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  position: sticky;
  top: 0;
  z-index: 50;
}

.user-banner__avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
}

.user-banner__name {
  font-weight: 600;
  color: var(--text-primary);
}

.user-banner__logout {
  margin-left: auto;
  font-size: 0.8rem;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}

.user-banner__logout:hover {
  color: var(--text-secondary);
}

/* ===================== RESPONSIVE ===================== */

@media (max-width: 768px) {
  .hero__title { font-size: 2rem; }
  .container { padding: 0 16px; }
  .card { padding: 20px; }
  .detail-meta { grid-template-columns: 1fr; }
  .media-grid { grid-template-columns: 1fr; }
  .nav-bar { padding: 12px 16px; }
  .report-list { font-size: 0.82rem; }
  .report-list th, .report-list td { padding: 10px 10px; }
  .auth-info-grid { grid-template-columns: 1fr; }
  .auth-card { padding: 32px 24px; }
}
