/* ===================================================================
   FILMCUT STUDIO PRO - CINEMA DARKROOM DESIGN SYSTEM
   Bespoke UI/UX for automated video cutting, hardsub, & social media
   =================================================================== */

:root {
  /* Color Palette: Charcoal Slate Darkroom & Cinema Amber */
  --bg-core: #070a10;
  --bg-sidebar: #0b0f17;
  --bg-panel: #0e131d;
  --bg-card: rgba(18, 24, 38, 0.72);
  --bg-card-hover: rgba(26, 35, 54, 0.85);
  --bg-surface: #141c2b;
  --bg-input: #0a0e16;

  /* Borders & Glass */
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-card: rgba(255, 255, 255, 0.1);
  --border-gold: rgba(245, 158, 11, 0.35);
  --border-gold-bright: #f59e0b;

  /* Brand Cinema Amber */
  --gold-50: #fffbeb;
  --gold-400: #fbbf24;
  --gold-500: #f59e0b;
  --gold-600: #d97706;
  --gold-glow: rgba(245, 158, 11, 0.28);

  /* Status Accents */
  --emerald: #10b981;
  --emerald-glow: rgba(16, 185, 129, 0.25);
  --cyan: #06b6d4;
  --ruby: #f43f5e;
  --indigo: #6366f1;

  /* Typography Colors */
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-sub: #64748b;
  --text-dim: #475569;

  /* Radii */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-card: 0 12px 36px -10px rgba(0, 0, 0, 0.65);
  --shadow-gold: 0 6px 24px -4px var(--gold-glow);
  --shadow-modal: 0 25px 60px -15px rgba(0, 0, 0, 0.85);

  /* Fonts */
  --font-brand: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

/* Reset & Box Sizing */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body.studio-app {
  font-family: var(--font-ui);
  background-color: var(--bg-core);
  color: var(--text-main);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: var(--bg-core);
}
::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: #334155;
}

/* App Master Shell */
.app-layout {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* ===================================================================
   LEFT SIDEBAR NAVIGATION RAIL
   =================================================================== */
.sidebar {
  width: 275px;
  min-width: 275px;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 50;
}

/* Brand Banner */
.sidebar-brand {
  padding: 26px 22px 22px 22px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.brand-logo-mark {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #1e2638, #0f1420);
  border: 1px solid var(--border-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-500);
  font-size: 1.35rem;
  box-shadow: var(--shadow-gold);
  flex-shrink: 0;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.sidebar-brand:hover .brand-logo-mark {
  transform: rotate(-6deg) scale(1.05);
  border-color: var(--gold-400);
}

.brand-title-wrap {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--font-brand);
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #ffffff;
  line-height: 1.1;
}

.brand-name span {
  color: var(--gold-500);
  text-shadow: 0 0 16px var(--gold-glow);
}

.brand-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--text-sub);
  margin-top: 3px;
}

/* Sidebar Nav Links */
.sidebar-nav {
  padding: 20px 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav-section-title {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-sub);
  letter-spacing: 0.12em;
  padding: 0 12px;
  margin-bottom: 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-family: var(--font-ui);
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  width: 100%;
}

.nav-item i {
  font-size: 1.05rem;
  width: 20px;
  text-align: center;
  color: var(--text-sub);
  transition: color 0.2s ease;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
}

.nav-item:hover i {
  color: var(--gold-400);
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.12) 0%, rgba(245, 158, 11, 0.03) 100%);
  border-color: rgba(245, 158, 11, 0.25);
  color: var(--gold-400);
  font-weight: 600;
}

.nav-item.active i {
  color: var(--gold-500);
}

.nav-counter {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
}

.nav-item.active .nav-counter {
  background: rgba(245, 158, 11, 0.2);
  color: var(--gold-400);
}

/* Sidebar Footer & Telemetry */
.sidebar-footer {
  padding: 16px 14px;
  border-top: 1px solid var(--border-subtle);
  background: #090c14;
}

.server-health-box {
  background: rgba(14, 19, 29, 0.85);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 14px;
}

.health-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  margin-bottom: 10px;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--emerald);
  box-shadow: 0 0 8px var(--emerald);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { opacity: 0.5; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.15); }
  100% { opacity: 0.5; transform: scale(0.9); }
}

.metric-row {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-sub);
}

.metric-row span:last-child {
  color: var(--text-main);
  font-weight: 600;
}

.metric-meter {
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: 4px;
}

.meter-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-600), var(--gold-400));
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}

/* User Profile Strip */
.user-profile-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 4px;
}

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #1b2333;
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-400);
  font-size: 0.85rem;
}

.user-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.username {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.role {
  font-size: 0.7rem;
  color: var(--text-sub);
}

.logout-icon-btn {
  margin-left: auto;
  background: transparent;
  border: none;
  color: var(--text-sub);
  font-size: 0.95rem;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-xs);
  transition: all 0.2s ease;
}

.logout-icon-btn:hover {
  background: rgba(244, 63, 94, 0.12);
  color: var(--ruby);
}

/* ===================================================================
   RIGHT MAIN CONTENT WORKSPACE
   =================================================================== */
.main-workspace {
  flex: 1;
  min-width: 0;
  padding: 32px 40px;
  overflow-y: auto;
  max-width: 1540px;
}

/* View Header */
.view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 28px;
}

.view-header h2 {
  font-family: var(--font-brand);
  font-size: 1.75rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.view-header p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 4px;
}

/* Segmented Control (Source Pills) */
.segmented-control {
  display: inline-flex;
  background: rgba(14, 19, 29, 0.85);
  padding: 4px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  gap: 4px;
}

.segment-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-ui);
  font-size: 0.86rem;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.segment-btn:hover {
  color: var(--text-main);
}

.segment-btn.active {
  background: var(--bg-surface);
  color: var(--gold-400);
  border: 1px solid rgba(245, 158, 11, 0.25);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* View Panels Tabs Switcher */
.view-panel {
  display: none;
  animation: fadeIn 0.25s ease-out;
}

.view-panel.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===================================================================
   VIEW 1: STUDIO PEMOTONG (TWO-COLUMN ARCHITECTURE)
   =================================================================== */
.studio-two-col {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 28px;
  align-items: start;
}

@media (max-width: 1200px) {
  .studio-two-col {
    grid-template-columns: 1fr;
  }
}

.source-content-col {
  min-width: 0;
}

.source-pane {
  display: none;
}

.source-pane.active {
  display: block;
}

/* Search Command Bar */
.search-command-bar {
  display: flex;
  align-items: center;
  background: var(--bg-panel);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 6px 8px 6px 18px;
  gap: 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-command-bar:focus-within {
  border-color: var(--border-gold-bright);
  box-shadow: 0 0 0 3px var(--gold-glow);
}

.search-command-bar i {
  color: var(--gold-500);
  font-size: 1.15rem;
}

.search-command-bar input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-main);
  font-family: var(--font-ui);
  font-size: 0.98rem;
}

.search-command-bar input::placeholder {
  color: var(--text-sub);
}

.action-submit-btn {
  background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
  color: #0b0f17;
  border: none;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.action-submit-btn:hover {
  background: linear-gradient(135deg, var(--gold-400), var(--gold-500));
  transform: translateY(-1px);
  box-shadow: var(--shadow-gold);
}

/* Recommendation Chips */
.search-recommendations {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.search-recommendations span {
  font-size: 0.78rem;
  color: var(--text-sub);
  font-weight: 500;
}

.rec-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-muted);
  font-size: 0.78rem;
  padding: 4px 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.rec-chip:hover {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.3);
  color: var(--gold-400);
}

.search-status-bar {
  margin-top: 16px;
  font-size: 0.85rem;
  color: var(--text-sub);
  padding: 6px 12px;
  border-left: 2px solid var(--gold-500);
  background: rgba(245, 158, 11, 0.04);
  border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
}

/* Movie Posters Grid */
.posters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
  margin-top: 22px;
}

/* Individual Poster Card */
.poster-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  position: relative;
}

.poster-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.4);
  box-shadow: 0 16px 36px -8px rgba(0, 0, 0, 0.7), 0 0 20px var(--gold-glow);
}

.poster-card.selected {
  border-color: var(--gold-400);
  box-shadow: 0 0 0 2px var(--gold-500), 0 16px 36px -8px rgba(0, 0, 0, 0.8);
}

.poster-card-img-wrap {
  aspect-ratio: 2 / 3;
  width: 100%;
  position: relative;
  overflow: hidden;
  background: #111724;
}

.poster-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.poster-card:hover .poster-card-img-wrap img {
  transform: scale(1.06);
}

/* Badges on Poster */
.badge-rating {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(11, 15, 23, 0.85);
  border: 1px solid rgba(245, 158, 11, 0.3);
  backdrop-filter: blur(8px);
  color: var(--gold-400);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  gap: 4px;
}

.badge-year {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(11, 15, 23, 0.85);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(8px);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: var(--radius-xs);
}

.poster-card-body {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.poster-card-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 6px;
}

.poster-card-meta {
  font-size: 0.75rem;
  color: var(--text-sub);
  margin-top: auto;
  display: flex;
  justify-content: space-between;
}

.poster-select-action {
  margin-top: 10px;
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 0;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.poster-card:hover .poster-select-action,
.poster-card.selected .poster-select-action {
  background: var(--gold-500);
  border-color: var(--gold-400);
  color: #090d16;
}

/* Empty Placeholder */
.empty-placeholder {
  text-align: center;
  padding: 60px 20px;
  background: var(--bg-card);
  border: 1px dashed var(--border-card);
  border-radius: var(--radius-lg);
  margin-top: 22px;
}

.placeholder-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-sub);
  font-size: 1.5rem;
  margin-bottom: 16px;
}

.empty-placeholder h3 {
  font-family: var(--font-brand);
  font-size: 1.25rem;
  color: var(--text-main);
  font-weight: 700;
}

.empty-placeholder p {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-top: 6px;
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
}

/* Direct & Upload Forms */
.custom-card-form {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 28px;
}

.custom-card-form h3 {
  font-family: var(--font-brand);
  font-size: 1.2rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 10px;
}

.custom-card-form h3 i {
  color: var(--gold-500);
}

.custom-card-form p {
  color: var(--text-muted);
  font-size: 0.86rem;
  margin-top: 4px;
  margin-bottom: 22px;
}

.field-wrap {
  margin-bottom: 16px;
}

.field-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.field-wrap label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.field-wrap input[type="text"],
.field-wrap input[type="password"],
.field-wrap input[type="file"],
.field-wrap select,
.inspector-group select,
.inspector-group input[type="text"] {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-family: var(--font-ui);
  font-size: 0.9rem;
  padding: 10px 14px;
  outline: none;
  transition: all 0.2s ease;
}

.field-wrap input:focus,
.inspector-group select:focus,
.inspector-group input[type="text"]:focus {
  border-color: var(--gold-400);
  box-shadow: 0 0 0 2px var(--gold-glow);
}

.field-help {
  display: block;
  font-size: 0.74rem;
  color: var(--text-sub);
  margin-top: 5px;
}

/* ===================================================================
   STUDIO INSPECTOR COLUMN (RIGHT SIDEBAR PARAMETERS)
   =================================================================== */
.studio-inspector-col {
  position: sticky;
  top: 24px;
}

.inspector-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-card);
}

.inspector-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.inspector-header h4 {
  font-family: var(--font-brand);
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.inspector-header h4 i {
  color: var(--gold-500);
}

.mode-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  background: rgba(245, 158, 11, 0.15);
  color: var(--gold-400);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

/* Selected Movie Preview Box */
.selected-movie-box {
  display: flex;
  gap: 14px;
  background: rgba(10, 14, 22, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 20px;
}

.preview-poster {
  width: 55px;
  height: 80px;
  border-radius: var(--radius-xs);
  overflow: hidden;
  background: #192132;
  flex-shrink: 0;
}

.preview-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-meta {
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

.preview-meta h5 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.meta-badges {
  display: flex;
  gap: 6px;
  margin-bottom: 4px;
}

.meta-pill {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 1px 6px;
  border-radius: var(--radius-xs);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
}

.meta-pill.rating {
  color: var(--gold-400);
}

.source-status {
  font-size: 0.72rem;
  color: var(--text-sub);
}

.inspector-group {
  margin-bottom: 18px;
}

.inspector-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.label-with-val {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.label-with-val label {
  margin-bottom: 0;
}

.badge-accent {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--gold-400);
}

/* Aspect Ratio Wireframe Cards */
.aspect-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.aspect-card {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.aspect-card:hover {
  border-color: rgba(245, 158, 11, 0.3);
}

.aspect-card.active {
  border-color: var(--gold-400);
  background: rgba(245, 158, 11, 0.08);
  box-shadow: 0 0 0 1px var(--gold-500);
}

.aspect-wireframe {
  width: 44px;
  border-radius: 4px;
  border: 1.5px solid var(--text-sub);
  display: flex;
  flex-direction: column;
  margin-bottom: 8px;
  overflow: hidden;
}

.aspect-card.active .aspect-wireframe {
  border-color: var(--gold-400);
}

.aspect-wireframe.vertical {
  height: 64px;
}

.wire-top, .wire-bottom {
  height: 14px;
  background: rgba(245, 158, 11, 0.25);
}

.wire-center {
  flex: 1;
  background: rgba(255, 255, 255, 0.1);
}

.aspect-wireframe.horizontal {
  height: 32px;
  justify-content: center;
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
}

.wire-badge {
  width: 14px;
  height: 10px;
  background: var(--gold-400);
  border-radius: 2px;
}

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

.aspect-label strong {
  display: block;
  font-size: 0.8rem;
  color: var(--text-main);
}

.aspect-label span {
  display: block;
  font-size: 0.68rem;
  color: var(--text-sub);
}

/* Duration Pills */
.duration-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.duration-pill {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  padding: 7px 0;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.duration-pill:hover {
  border-color: rgba(245, 158, 11, 0.3);
  color: var(--text-main);
}

.duration-pill.active {
  background: var(--gold-500);
  border-color: var(--gold-400);
  color: #0b0f17;
  font-weight: 700;
  box-shadow: var(--shadow-gold);
}

/* Toggle Controls */
.toggle-control {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}

.toggle-control input {
  display: none;
}

.toggle-track {
  width: 38px;
  height: 22px;
  border-radius: var(--radius-full);
  background: #1a2233;
  border: 1px solid var(--border-subtle);
  position: relative;
  transition: all 0.2s ease;
  flex-shrink: 0;
  margin-top: 2px;
}

.toggle-track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--text-sub);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.toggle-control input:checked + .toggle-track {
  background: var(--gold-500);
  border-color: var(--gold-400);
}

.toggle-control input:checked + .toggle-track::after {
  transform: translateX(16px);
  background: #0b0f17;
}

.toggle-text strong {
  display: block;
  font-size: 0.82rem;
  color: var(--text-main);
  line-height: 1.25;
}

.toggle-text small {
  display: block;
  font-size: 0.72rem;
  color: var(--text-sub);
  margin-top: 2px;
}

/* Watermark Row */
.watermark-pos-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.watermark-pos-row span {
  font-size: 0.76rem;
  color: var(--text-sub);
  flex-shrink: 0;
}

/* Big Launch Button */
.launch-btn {
  width: 100%;
  padding: 14px 20px;
  font-size: 1rem;
  font-weight: 700;
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 8px 24px -4px var(--gold-glow);
}

/* ===================================================================
   BUTTON UTILITIES
   =================================================================== */
.primary-btn {
  background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
  color: #0b0f17;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 10px 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}

.primary-btn:hover {
  background: linear-gradient(135deg, var(--gold-400), var(--gold-500));
  transform: translateY(-1px);
  box-shadow: var(--shadow-gold);
}

.secondary-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  border-radius: var(--radius-sm);
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.88rem;
  padding: 9px 18px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.secondary-btn:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: var(--border-card);
}

/* ===================================================================
   VIEW 2: ANTRIAN & STATUS RENDER
   =================================================================== */
.jobs-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.job-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 22px 26px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: border-color 0.2s ease;
}

.job-card.processing {
  border-color: rgba(245, 158, 11, 0.35);
  box-shadow: 0 8px 30px -10px rgba(0, 0, 0, 0.6);
}

.job-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.job-title-strip {
  display: flex;
  align-items: center;
  gap: 14px;
}

.job-status-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.job-status-indicator.queued { background: #94a3b8; }
.job-status-indicator.downloading { background: var(--cyan); box-shadow: 0 0 10px var(--cyan); animation: pulse 1.5s infinite; }
.job-status-indicator.processing { background: var(--gold-400); box-shadow: 0 0 10px var(--gold-400); animation: pulse 1.5s infinite; }
.job-status-indicator.completed { background: var(--emerald); box-shadow: 0 0 8px var(--emerald); }
.job-status-indicator.failed { background: var(--ruby); }

.job-title-strip h3 {
  font-family: var(--font-brand);
  font-size: 1.18rem;
  font-weight: 700;
  color: #ffffff;
}

.job-specs-pills {
  display: flex;
  gap: 6px;
}

.spec-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: var(--radius-xs);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
}

.job-progress-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.progress-track {
  height: 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-600), var(--gold-400));
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

.job-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
}

.step-narrative {
  font-size: 0.84rem;
  color: var(--text-sub);
}

/* ===================================================================
   VIEW 3: KOLEKSI FILM (MOVIE SHELF ARCHITECTURE)
   =================================================================== */
.search-library-wrap {
  display: flex;
  align-items: center;
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 6px 14px;
  gap: 10px;
  width: 280px;
}

.search-library-wrap input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-main);
  font-size: 0.88rem;
  width: 100%;
}

/* Shelf Grid (Level 1: Movie Folders) */
.shelf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 24px;
}

/* Movie Shelf Card */
.shelf-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-card);
}

.shelf-card:hover {
  transform: translateY(-5px);
  border-color: rgba(245, 158, 11, 0.35);
  box-shadow: 0 18px 40px -10px rgba(0, 0, 0, 0.75);
}

.shelf-card-banner {
  height: 140px;
  width: 100%;
  position: relative;
  background: #111723;
  overflow: hidden;
}

.shelf-card-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(2px) brightness(0.65);
  transform: scale(1.08);
}

.shelf-parts-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(11, 15, 23, 0.85);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: var(--gold-400);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--radius-xs);
  backdrop-filter: blur(8px);
}

.shelf-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.shelf-card-title {
  font-family: var(--font-brand);
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.3;
  margin-bottom: 8px;
}

.shelf-card-meta-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.shelf-meta-tag {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  padding: 2px 7px;
  border-radius: var(--radius-xs);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
}

.shelf-card-actions {
  display: flex;
  gap: 10px;
  margin-top: auto;
}

.open-movie-btn {
  flex: 1;
  background: var(--gold-500);
  color: #0b0f17;
  border: none;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.open-movie-btn:hover {
  background: var(--gold-400);
  box-shadow: var(--shadow-gold);
}

.shelf-zip-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.9rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  text-decoration: none;
}

.shelf-zip-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-main);
}

/* ===================================================================
   VIEW 3B: MOVIE DETAIL & PARTS CINEMA PLAYER
   =================================================================== */
.detail-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.back-link-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color 0.2s ease;
}

.back-link-btn:hover {
  color: var(--gold-400);
}

.download-all-btn {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: var(--gold-400);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.download-all-btn:hover {
  background: var(--gold-500);
  color: #0b0f17;
  box-shadow: var(--shadow-gold);
}

.detail-content-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 28px;
}

@media (max-width: 1100px) {
  .detail-content-layout {
    grid-template-columns: 1fr;
  }
}

.cinema-player-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.video-stage {
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  max-height: 540px;
}

.video-stage video {
  width: 100%;
  max-height: 540px;
  background: #000;
  outline: none;
}

.cinema-now-playing {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  background: var(--bg-card);
  border-top: 1px solid var(--border-subtle);
}

.now-playing-meta h3 {
  font-family: var(--font-brand);
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
}

.now-playing-meta p {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-sub);
  margin-top: 3px;
}

/* Caption Station */
.caption-station-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-top: 24px;
}

.station-header {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-sub);
  margin-bottom: 14px;
}

.caption-platform-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.platform-pill {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 8px 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.platform-pill:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.08);
}

.platform-pill.active {
  background: var(--bg-surface);
  border-color: var(--gold-400);
  color: var(--gold-400);
  box-shadow: 0 0 10px var(--gold-glow);
}

.caption-display-area {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-family: var(--font-ui);
  font-size: 0.88rem;
  line-height: 1.6;
  padding: 14px;
  resize: vertical;
  outline: none;
}

.caption-copy-action {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}

.copy-platform-btn {
  background: var(--gold-500);
  color: #0b0f17;
  border: none;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.copy-platform-btn:hover {
  background: var(--gold-400);
  box-shadow: var(--shadow-gold);
}

/* Playlist Column */
.playlist-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.playlist-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.playlist-header h4 {
  font-family: var(--font-brand);
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

.playlist-header span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-xs);
  background: rgba(245, 158, 11, 0.15);
  color: var(--gold-400);
}

.playlist-items-scroll {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 600px;
  overflow-y: auto;
}

.playlist-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.playlist-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-subtle);
}

.playlist-item.active {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.35);
}

.item-thumb-box {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-xs);
  background: #121824;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-sub);
  flex-shrink: 0;
}

.item-thumb-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.item-info-meta {
  flex: 1;
  overflow: hidden;
}

.item-info-meta strong {
  display: block;
  font-size: 0.88rem;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.playlist-item.active .item-info-meta strong {
  color: var(--gold-400);
}

.item-info-meta span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-sub);
}

.item-download-icon {
  color: var(--text-sub);
  padding: 6px;
  border-radius: var(--radius-xs);
  transition: all 0.2s ease;
}

.item-download-icon:hover {
  color: var(--gold-400);
  background: rgba(245, 158, 11, 0.15);
}

/* ===================================================================
   VIEW 4: PENGATURAN & AKUN
   =================================================================== */
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

@media (max-width: 900px) {
  .settings-grid {
    grid-template-columns: 1fr;
  }
}

.settings-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 28px;
}

.card-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.card-title i {
  color: var(--gold-500);
  font-size: 1.2rem;
}

.card-title h3 {
  font-family: var(--font-brand);
  font-size: 1.2rem;
  color: #ffffff;
}

.server-specs-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.spec-item {
  display: flex;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.88rem;
}

.spec-item span {
  color: var(--text-sub);
}

.spec-item strong {
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

/* ===================================================================
   TOAST NOTIFICATION SHELF
   =================================================================== */
.toast-shelf {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
  pointer-events: none;
}

.toast {
  background: #111724;
  border: 1px solid var(--border-card);
  border-left: 4px solid var(--gold-500);
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-main);
  font-size: 0.88rem;
  pointer-events: auto;
  animation: slideInToast 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  max-width: 360px;
}

.toast.error {
  border-left-color: var(--ruby);
}

.toast.success {
  border-left-color: var(--emerald);
}

@keyframes slideInToast {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}
