:root {
  --bg-dark: #0b0f17;
  --bg-card: rgba(18, 24, 38, 0.85);
  --bg-card-hover: rgba(26, 34, 52, 0.95);
  --border-color: rgba(223, 168, 74, 0.2);
  --border-glow: rgba(223, 168, 74, 0.5);
  --gold: #dfa84a;
  --gold-light: #fef08a;
  --gold-gradient: linear-gradient(135deg, #dfa84a 0%, #fef08a 100%);
  --emerald: #10b981;
  --cyan: #38bdf8;
  --purple: #a855f7;
  --red: #ef4444;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-full: 9999px;
  --shadow-lg: 0 10px 30px -10px rgba(0, 0, 0, 0.6);
}

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

body {
  background-color: var(--bg-dark);
  background-image: 
    radial-gradient(at 0% 0%, rgba(223, 168, 74, 0.08) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(16, 185, 129, 0.06) 0px, transparent 50%);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.5;
  min-height: 100vh;
}

/* SOP Top Bar */
.sop-top-bar {
  background: linear-gradient(90deg, #1e1b10 0%, #17202a 100%);
  border-bottom: 1px solid var(--border-color);
  padding: 6px 1.5rem;
  font-size: 0.8rem;
  color: var(--gold-light);
}

.sop-top-content {
  max-width: 1360px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sop-top-content code {
  background: rgba(0,0,0,0.5);
  padding: 2px 6px;
  border-radius: 4px;
  color: #fff;
  border: 1px solid rgba(223, 168, 74, 0.3);
}

.btn-sop-link {
  background: transparent;
  border: none;
  color: var(--gold);
  font-weight: 700;
  cursor: pointer;
  font-size: 0.8rem;
  text-decoration: underline;
}

/* Header */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: rgba(11, 15, 23, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
}

.logo-box {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  font-size: 28px;
  background: rgba(223, 168, 74, 0.15);
  padding: 8px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.logo-title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 1px;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.nav-tabs {
  display: flex;
  gap: 6px;
  background: rgba(0, 0, 0, 0.4);
  padding: 4px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.nav-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s ease;
}

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

.nav-btn.active {
  background: var(--gold);
  color: #000;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(223, 168, 74, 0.35);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-sop {
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: var(--cyan);
  padding: 8px 14px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-sop:hover {
  background: var(--cyan);
  color: #000;
}

.btn-primary {
  background: var(--gold-gradient);
  color: #0b0f17;
  border: none;
  padding: 9px 20px;
  border-radius: var(--radius-full);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 15px rgba(223, 168, 74, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(223, 168, 74, 0.5);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 9px 16px;
  border-radius: var(--radius-full);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Main Content */
.main-content {
  max-width: 1360px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

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

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  backdrop-filter: blur(10px);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.stat-icon.gold { background: rgba(223, 168, 74, 0.15); border: 1px solid rgba(223, 168, 74, 0.3); }
.stat-icon.green { background: rgba(16, 185, 129, 0.15); border: 1px solid rgba(16, 185, 129, 0.3); }
.stat-icon.blue { background: rgba(56, 189, 248, 0.15); border: 1px solid rgba(56, 189, 248, 0.3); }
.stat-icon.purple { background: rgba(168, 85, 247, 0.15); border: 1px solid rgba(168, 85, 247, 0.3); }

.stat-val {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Toolbar */
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.filter-group {
  display: flex;
  gap: 8px;
}

.filter-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-chip.active, .filter-chip:hover {
  background: rgba(223, 168, 74, 0.2);
  color: var(--gold-light);
  border-color: var(--gold);
}

.search-box input {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-main);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  width: 280px;
  outline: none;
  transition: border-color 0.2s;
}

.search-box input:focus {
  border-color: var(--gold);
}

/* Video Grid */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.video-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.video-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-glow);
  box-shadow: var(--shadow-lg);
}

.video-thumb-wrap {
  position: relative;
  height: 220px;
  background: #1e293b;
  overflow: hidden;
  cursor: pointer;
}

.video-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.video-card:hover .video-thumb-wrap img {
  transform: scale(1.05);
}

.badge-status {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-status.ready { color: var(--emerald); border: 1px solid rgba(16, 185, 129, 0.4); }
.badge-status.scheduled { color: var(--gold-light); border: 1px solid rgba(223, 168, 74, 0.4); }

.badge-date {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.7);
  padding: 3px 8px;
  border-radius: var(--radius-md);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gold-light);
}

.video-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.video-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-main);
  line-height: 1.4;
}

.video-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-card-actions {
  margin-top: auto;
  display: flex;
  gap: 8px;
}

.btn-card-action {
  flex: 1;
  background: rgba(223, 168, 74, 0.12);
  border: 1px solid var(--border-color);
  color: var(--gold-light);
  padding: 8px;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.btn-card-action:hover {
  background: var(--gold);
  color: #000;
}

.btn-card-copy {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-main);
  padding: 8px 12px;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  cursor: pointer;
}

.btn-card-copy:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Glass Card */
.card.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  backdrop-filter: blur(12px);
}

.section-title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: var(--gold-light);
}

.section-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.badge-gold {
  background: rgba(223, 168, 74, 0.15);
  border: 1px solid var(--border-color);
  color: var(--gold-light);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

/* DUAL-TIER SCRIPT VIEW TOGGLE */
.script-view-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-toggle-view {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-muted);
  padding: 7px 14px;
  border-radius: var(--radius-full);
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-toggle-view.active {
  background: rgba(223, 168, 74, 0.25);
  border-color: var(--gold);
  color: var(--gold-light);
}

.script-tier-container {
  display: none;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.script-tier-container.active {
  display: block;
  animation: fadeIn 0.25s ease;
}

.script-editor-textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(223, 168, 74, 0.3);
  color: #fff;
  padding: 1rem;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.88rem;
  line-height: 1.6;
  outline: none;
  resize: vertical;
}

.script-editor-textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 10px rgba(223, 168, 74, 0.3);
}

.btn-sync-action {
  background: var(--gold-gradient);
  color: #000;
  border: none;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-sync-action.secondary {
  background: rgba(56, 189, 248, 0.2);
  border: 1px solid rgba(56, 189, 248, 0.5);
  color: var(--cyan);
}

.btn-sync-action:hover {
  transform: translateY(-1px);
  filter: brightness(1.15);
}

.editor-note {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* Full Script Rich Editor */
.full-script-rich-editor {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: 480px;
  overflow-y: auto;
  padding-right: 4px;
}

.scene-block {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.scene-header {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gold-light);
}

.scene-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.scene-field label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--cyan);
}

.scene-field input {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  padding: 6px 10px;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 0.8rem;
  outline: none;
}

.scene-field input:focus {
  border-color: var(--gold);
}

/* INLINE AI SCORING BUTTON */
.btn-ai-inline-score {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  border: 1px solid rgba(16, 185, 129, 0.5);
  padding: 7px 14px;
  border-radius: var(--radius-full);
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
  transition: all 0.25s ease;
  animation: pulseGreen 2s infinite;
}

@keyframes pulseGreen {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6); }
  70% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.btn-ai-inline-score:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
  color: #000;
}

/* AI REVISION COPILOT STUDIO */
.ai-revision-studio {
  margin-top: 1.25rem;
  background: linear-gradient(180deg, rgba(223, 168, 74, 0.08) 0%, rgba(0, 0, 0, 0.6) 100%);
  border: 1px solid var(--border-color);
  padding: 1.25rem;
  border-radius: var(--radius-md);
}

.revision-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0.35rem;
}

.copilot-icon {
  font-size: 1.2rem;
  color: var(--gold);
}

.revision-header h4 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gold-light);
}

.revision-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.85rem;
}

.quick-prompt-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 1rem;
}

.prompt-chip {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(223, 168, 74, 0.25);
  color: var(--text-main);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.prompt-chip:hover {
  background: var(--gold);
  color: #000;
  border-color: var(--gold);
}

.custom-prompt-row {
  display: flex;
  gap: 8px;
}

.custom-prompt-row input {
  flex: 1;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  outline: none;
}

.custom-prompt-row input:focus {
  border-color: var(--gold);
}

.btn-ai-rewrite {
  background: var(--gold-gradient);
  color: #000;
  border: none;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.85rem;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  box-shadow: 0 4px 15px rgba(223, 168, 74, 0.3);
}

.btn-ai-rewrite:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(223, 168, 74, 0.5);
}

.script-status-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.version-badge {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--emerald);
}

.duration-badge {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* AI Skill Validation Report */
.ai-skill-report {
  margin-top: 1rem;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 1rem;
  border-radius: var(--radius-md);
}

.ai-skill-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.badge-skill-active {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--emerald);
}

.ai-total-score {
  font-size: 0.85rem;
  color: var(--gold-light);
}

.skill-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 0.75rem;
}

.skill-tag {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 600;
}

.ai-inline-feedback p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.skills-matrix {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.matrix-card {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-color);
  padding: 1rem;
  border-radius: var(--radius-md);
}

.matrix-card h4 {
  font-family: var(--font-heading);
  color: var(--gold-light);
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.matrix-card p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Digital Checklist */
.checklist-container {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}

.check-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.check-item:hover {
  background: rgba(223, 168, 74, 0.08);
  border-color: var(--gold);
}

.check-item input[type="checkbox"] {
  display: none;
}

.check-box-custom {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-color);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
  transition: all 0.2s;
}

.check-item input:checked + .check-box-custom {
  background: var(--gold);
  border-color: var(--gold);
}

.check-item input:checked + .check-box-custom::after {
  content: '✓';
  color: #000;
  font-weight: 900;
  font-size: 14px;
}

.score-box {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-color);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.score-title {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.score-val {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--emerald);
}

/* AI Scorer */
.scorer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

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

.label-bold {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--gold-light);
  margin-bottom: 0.5rem;
}

.scorer-input-col textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 1rem;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.85rem;
  margin-bottom: 1rem;
  outline: none;
}

.ai-score-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: rgba(223, 168, 74, 0.08);
  border: 1px solid var(--border-color);
  padding: 1rem;
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
}

.ai-score-circle {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  border: 3px solid var(--gold);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #000;
}

.ai-score-number {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--gold-light);
  line-height: 1;
}

.ai-score-unit {
  font-size: 0.65rem;
  color: var(--text-muted);
}

.ai-score-details h4 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  color: var(--gold-light);
  margin-bottom: 0.25rem;
}

.ai-score-details p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.ai-suggestions {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1rem;
  border-radius: var(--radius-md);
}

.ai-suggestions h4 {
  font-size: 0.9rem;
  color: var(--gold-light);
  margin-bottom: 0.5rem;
}

.ai-suggestions ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Analytics & Deadline Grid */
.analytics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

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

.deadline-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.deadline-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1rem;
  border-radius: var(--radius-md);
}

.deadline-item.alert { border-left: 4px solid var(--emerald); }
.deadline-item.warning { border-left: 4px solid var(--gold); }
.deadline-item.normal { border-left: 4px solid var(--cyan); }

.deadline-time {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--gold-light);
  width: 90px;
}

.deadline-info h4 {
  font-size: 0.9rem;
  margin-bottom: 0.2rem;
}

.deadline-info p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.badge-done { color: var(--emerald); font-weight: 700; }
.badge-wait { color: var(--gold-light); font-weight: 700; }

.btn-alert-send {
  background: rgba(223, 168, 74, 0.15);
  border: 1px solid var(--border-color);
  color: var(--gold-light);
  padding: 6px 12px;
  border-radius: var(--radius-md);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-alert-send:hover {
  background: var(--gold);
  color: #000;
}

.stats-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}

.mini-stat {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.85rem;
  border-radius: var(--radius-md);
  text-align: center;
}

.mini-val {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--gold-light);
}

.mini-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.chart-mockup {
  height: 140px;
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 1rem 0.5rem 0.5rem 0.5rem;
}

.chart-bar {
  width: 40px;
  background: var(--gold-gradient);
  border-radius: 6px 6px 0 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 4px;
  transition: all 0.3s;
  cursor: pointer;
}

.chart-bar:hover {
  filter: brightness(1.2);
  transform: scaleY(1.05);
}

.chart-bar span {
  font-size: 0.7rem;
  font-weight: 800;
  color: #000;
}

/* SOP Modal */
.sop-modal-box {
  max-width: 780px !important;
}

.sop-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.5rem;
}

.sop-card {
  background: rgba(0, 0, 0, 0.4);
  border-left: 3px solid var(--gold);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding: 1rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.sop-card h4 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  color: var(--gold-light);
  margin-bottom: 0.35rem;
}

.sop-card p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.sop-card a {
  color: var(--cyan);
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal.show {
  display: flex;
  animation: fadeIn 0.25s ease;
}

.modal-content {
  background: #131a29;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  max-width: 860px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-header h3 {
  font-family: var(--font-heading);
  color: var(--gold-light);
}

.close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
}

.modal-body {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 1.5rem;
  padding: 1.5rem;
}

@media (max-width: 700px) {
  .modal-body { grid-template-columns: 1fr; }
}

.mockup-phone {
  background: #000;
  border: 4px solid #334155;
  border-radius: 28px;
  overflow: hidden;
  height: 440px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.mockup-screen {
  height: 100%;
  background: url('https://images.unsplash.com/photo-1573496359142-b8d87734a5a2?w=600&auto=format&fit=crop&q=80') center/cover no-repeat;
  position: relative;
}

.mockup-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(0,0,0,0.3) 0%, transparent 40%, rgba(0,0,0,0.85) 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px;
}

.brand-pill {
  align-self: flex-start;
  background: rgba(0,0,0,0.7);
  color: var(--gold-light);
  font-size: 0.65rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
}

.mockup-bottom h4 {
  font-size: 0.85rem;
  color: #fff;
  margin-bottom: 4px;
}

.mockup-bottom p {
  font-size: 0.7rem;
  color: #cbd5e1;
  margin-bottom: 6px;
}

.addr-pill {
  display: inline-block;
  background: var(--gold);
  color: #000;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-full);
}

.info-group {
  margin-bottom: 1.25rem;
}

.info-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gold-light);
  margin-bottom: 0.35rem;
}

.info-group textarea, .info-group input {
  width: 100%;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-main);
  padding: 0.75rem;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
  outline: none;
}

.btn-copy {
  background: rgba(223, 168, 74, 0.15);
  border: 1px solid var(--border-color);
  color: var(--gold-light);
  padding: 6px 14px;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-copy:hover {
  background: var(--gold);
  color: #000;
}

.file-action-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.file-badge {
  background: rgba(255,255,255,0.06);
  padding: 6px 12px;
  border-radius: var(--radius-md);
  font-family: monospace;
  font-size: 0.8rem;
  color: var(--emerald);
}

.btn-download {
  background: var(--emerald);
  color: #000;
  border: none;
  padding: 7px 16px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
}

/* Toast */
.toast {
  visibility: hidden;
  min-width: 250px;
  background: var(--gold);
  color: #000;
  text-align: center;
  border-radius: var(--radius-full);
  padding: 12px 24px;
  position: fixed;
  z-index: 2000;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 10px 25px rgba(0,0,0,0.6);
}

.toast.show {
  visibility: visible;
  animation: fadein 0.3s, fadeout 0.5s 2.5s;
}

@keyframes fadein {
  from { bottom: 0; opacity: 0; }
  to { bottom: 30px; opacity: 1; }
}

@keyframes fadeout {
  from { bottom: 30px; opacity: 1; }
  to { bottom: 0; opacity: 0; }
}
