/* Portal-specific styles — extends theme.css design tokens */

/* ---- NAV ---- */
.portal-body {
  background: var(--bg);
  min-height: 100vh;
}

.portal-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.portal-nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 32px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 40px;
}

.nav-brand {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: var(--fg);
  text-decoration: none;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  gap: 4px;
  flex: 1;
}

.nav-links a {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-muted);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
  letter-spacing: 0.3px;
}

.nav-links a:hover { color: var(--fg); background: rgba(255,255,255,0.05); }
.nav-links a.active { color: var(--accent); background: var(--accent-glow); }

.nav-user {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.nav-username {
  font-size: 13px;
  color: var(--fg-muted);
}

.btn-ghost-sm {
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px;
  color: var(--fg-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-ghost-sm:hover { border-color: rgba(255,255,255,0.3); color: var(--fg); }

/* ---- MAIN AREA ---- */
.portal-main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 40px 32px 80px;
}

/* ---- PAGE HEADER ---- */
.page-header {
  margin-bottom: 40px;
}

.page-header h1 {
  font-size: 32px;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.page-header p {
  color: var(--fg-muted);
  font-size: 15px;
}

/* ---- STATS ROW ---- */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 40px;
}

.stat-card {
  background: var(--bg-elevated);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 14px;
  padding: 24px;
  transition: border-color 0.3s;
}

.stat-card:hover { border-color: rgba(255,77,42,0.2); }

.stat-label {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 10px;
}

.stat-value {
  font-family: var(--font-heading);
  font-size: 34px;
  font-weight: 700;
  color: var(--fg);
  letter-spacing: -1px;
  line-height: 1;
}

.stat-value.accent { color: var(--accent); }

/* ---- SECTION HEADING ---- */
.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 20px;
}

.section-heading h2 {
  font-size: 20px;
  letter-spacing: -0.3px;
}

.section-heading a {
  font-size: 13px;
  color: var(--accent);
  text-decoration: none;
}

.section-heading a:hover { text-decoration: underline; }

/* ---- CARDS GRID ---- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 40px;
}

.clip-card {
  background: var(--bg-elevated);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 14px;
  overflow: hidden;
  transition: transform 0.2s, border-color 0.3s;
}

.clip-card:hover { transform: translateY(-2px); border-color: rgba(255,77,42,0.15); }

.clip-thumb {
  aspect-ratio: 9/16;
  max-height: 160px;
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.clip-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.clip-thumb .thumb-icon {
  font-size: 36px;
  opacity: 0.3;
}

.clip-info {
  padding: 16px;
}

.clip-title {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.clip-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.clip-platform {
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-heading);
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.clip-stats {
  font-size: 12px;
  color: var(--fg-muted);
}

/* ---- STATUS BADGES ---- */
.badge {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 100px;
}

.badge-processing { background: rgba(255,200,60,0.12); color: #ffc83c; }
.badge-ready      { background: rgba(60,210,100,0.12); color: #3cd264; }
.badge-pending    { background: rgba(140,140,200,0.12); color: #9999cc; }
.badge-scheduled  { background: rgba(60,150,255,0.12); color: #3c96ff; }
.badge-posted     { background: rgba(60,210,100,0.12); color: #3cd264; }
.badge-done       { background: rgba(60,210,100,0.12); color: #3cd264; }

/* ---- VIDEO LIST ---- */
.video-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 40px;
}

.video-row {
  background: var(--bg-elevated);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 12px;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  transition: border-color 0.3s;
}

.video-row:hover { border-color: rgba(255,77,42,0.12); }

.video-icon {
  font-size: 24px;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-glow);
  border-radius: 10px;
}

.video-info { flex: 1; min-width: 0; }

.video-title {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.video-sub {
  font-size: 12px;
  color: var(--fg-muted);
}

.video-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* ---- SCHEDULE TABLE ---- */
.schedule-table {
  width: 100%;
  border-collapse: collapse;
}

.schedule-table th {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--fg-muted);
  text-align: left;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.schedule-table td {
  padding: 14px 16px;
  font-size: 14px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  vertical-align: middle;
}

.schedule-table tr:last-child td { border-bottom: none; }
.schedule-table tr:hover td { background: rgba(255,255,255,0.02); }

/* ---- METRICS ---- */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.metric-row {
  background: var(--bg-elevated);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 12px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.metric-clip { font-size: 14px; font-weight: 500; min-width: 0; }
.metric-clip-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 2px; }
.metric-clip-platform { font-size: 11px; color: var(--fg-muted); font-family: var(--font-heading); text-transform: uppercase; letter-spacing: 1px; }
.metric-numbers { display: flex; gap: 16px; flex-shrink: 0; }
.metric-num { text-align: center; }
.metric-num-val { font-family: var(--font-heading); font-size: 20px; font-weight: 700; color: var(--accent); }
.metric-num-label { font-size: 10px; color: var(--fg-muted); text-transform: uppercase; letter-spacing: 1px; font-family: var(--font-heading); }

/* ---- UPLOAD ZONE ---- */
.upload-zone {
  background: var(--bg-elevated);
  border: 2px dashed rgba(255,77,42,0.25);
  border-radius: 16px;
  padding: 60px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.3s, background 0.3s;
  margin-bottom: 32px;
}

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

.upload-zone h3 { font-size: 22px; margin-bottom: 8px; }
.upload-zone p { color: var(--fg-muted); font-size: 14px; }
.upload-icon { font-size: 48px; margin-bottom: 20px; }

/* ---- FORM ELEMENTS ---- */
.form-group { margin-bottom: 20px; }

.form-label {
  display: block;
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 8px;
}

.form-input, .form-textarea, .form-select {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 12px 16px;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 15px;
  transition: border-color 0.2s;
  outline: none;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: rgba(255,77,42,0.5);
}

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

.form-select option { background: var(--bg-elevated); }

/* ---- BUTTONS ---- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  padding: 12px 24px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.15s;
}

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

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  background: transparent;
  color: var(--fg-muted);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-secondary:hover { color: var(--fg); border-color: rgba(255,255,255,0.25); }

/* ---- ALERTS ---- */
.alert {
  padding: 14px 18px;
  border-radius: 10px;
  margin-bottom: 24px;
  font-size: 14px;
}

.alert-success { background: rgba(60,210,100,0.1); border: 1px solid rgba(60,210,100,0.2); color: #3cd264; }
.alert-error   { background: rgba(255,77,42,0.1);  border: 1px solid rgba(255,77,42,0.25);  color: var(--accent); }

/* ---- EMPTY STATE ---- */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--fg-muted);
}

.empty-state-icon { font-size: 48px; margin-bottom: 16px; opacity: 0.4; }
.empty-state h3 { font-size: 18px; color: var(--fg); margin-bottom: 8px; }
.empty-state p { font-size: 14px; margin-bottom: 24px; }

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  .portal-nav-inner { padding: 0 20px; gap: 20px; }
  .nav-links { display: none; }
  .portal-main { padding: 24px 20px 60px; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .cards-grid { grid-template-columns: 1fr; }
  .metrics-grid { grid-template-columns: 1fr; }
  .upload-zone { padding: 40px 24px; }
}
