/* SEAMOU EDITORIAL STUDIO - STYLESHEET (DUAL-THEME CYBER MINIMALIST) */

:root {
  --font-family: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  /* DARK THEME TOKENS */
  --bg-app: #0d0d0d;
  --bg-panel: #141414;
  --bg-panel-header: #181818;
  --bg-card: #1c1c1c;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: #38bdf8;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-faint: #64748b;
  
  --emerald-primary: #047857;
  --emerald-text: #34d399;
  --emerald-bg: rgba(16, 185, 129, 0.15);
  
  --sky-primary: #0284c7;
  --sky-text: #38bdf8;
  --sky-bg: rgba(56, 189, 248, 0.15);

  --purple-primary: #9333ea;
  --purple-text: #c084fc;
  --purple-bg: rgba(168, 85, 247, 0.15);

  --amber-primary: #d97706;
  --amber-text: #fbbf24;
  --amber-bg: rgba(245, 158, 11, 0.15);

  --red-primary: #dc2626;
  --red-text: #f87171;
  --red-bg: rgba(239, 68, 68, 0.15);
}

body.theme-light {
  --bg-app: #f8fafc;
  --bg-panel: #ffffff;
  --bg-panel-header: #f1f5f9;
  --bg-card: #f8fafc;
  --border-color: #e2e8f0;
  --border-focus: #0284c7;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-faint: #64748b;
  --emerald-bg: rgba(16, 185, 129, 0.12);
  --emerald-text: #047857;
  --sky-bg: rgba(2, 132, 199, 0.12);
  --sky-text: #0369a1;
  --purple-bg: rgba(147, 51, 234, 0.12);
  --purple-text: #7e22ce;
}

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

body {
  font-family: var(--font-family);
  background: var(--bg-app);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

.app-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 24px;
}

/* HEADER */
.app-header {
  max-width: 1440px;
  width: 100%;
  margin: 0 auto 20px auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 16px;
  flex-wrap: wrap;
  gap: 16px;
}

.brand-badge-group {
  display: flex;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.02em;
}

.badge-emerald { background: var(--emerald-bg); color: var(--emerald-text); border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-sky { background: var(--sky-bg); color: var(--sky-text); border: 1px solid rgba(56, 189, 248, 0.3); }
.badge-purple { background: var(--purple-bg); color: var(--purple-text); border: 1px solid rgba(168, 85, 247, 0.3); }
.badge-amber { background: var(--amber-bg); color: var(--amber-text); border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-gray { background: rgba(255, 255, 255, 0.08); color: var(--text-secondary); }

.app-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.app-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.header-right {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* BUTTONS */
.btn {
  font-family: var(--font-family);
  font-size: 12px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  border: none;
  min-height: 36px;
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
}

.btn-emerald {
  background: var(--emerald-primary);
  color: #ffffff;
}
.btn-emerald:hover {
  background: #059669;
}

.btn-primary {
  background: #2563eb;
  color: #ffffff;
}
.btn-primary:hover {
  background: #1d4ed8;
}

.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}
.btn-outline:hover {
  color: var(--text-primary);
  border-color: var(--text-secondary);
}

/* WORKSPACE GRID */
.workspace-grid {
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 440px;
  gap: 24px;
  flex: 1;
}

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

/* PANELS */
.panel {
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.panel-header {
  padding: 12px 18px;
  background: var(--bg-panel-header);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.panel-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.panel-meta {
  font-size: 12px;
  color: var(--text-secondary);
  margin-left: 6px;
}

.panel-actions {
  display: flex;
  gap: 8px;
}

/* EDITOR BODY */
.editor-body {
  padding: 18px;
  flex: 1;
  display: flex;
}

#editor-input {
  width: 100%;
  min-height: 440px;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1.7;
  font-family: var(--font-family);
  resize: vertical;
}

.editor-footer {
  padding: 12px 18px;
  background: var(--bg-panel-header);
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.status-tip {
  font-size: 12px;
  color: var(--text-secondary);
}

/* DASHBOARD CARDS */
.score-card, .issues-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 18px;
}

.score-header, .issues-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.card-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.score-overall-val {
  font-size: 24px;
  font-weight: 800;
  color: var(--emerald-text);
}

.pillars-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pillar-label-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 4px;
}

.pillar-name { color: var(--text-secondary); }
.pillar-val { font-weight: 700; color: var(--text-primary); }

.progress-track {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
}
body.theme-light .progress-track {
  background: #e2e8f0;
}

.progress-fill {
  height: 100%;
  transition: width 0.3s ease;
}

.fill-emerald { background: #10b981; }
.fill-sky { background: #0284c7; }
.fill-purple { background: #9333ea; }
.fill-amber { background: #d97706; }

/* ISSUES LIST */
.issues-scroll {
  max-height: 400px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 4px;
}

.issue-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px;
  font-size: 12px;
}

.issue-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.issue-type-badge {
  font-weight: 700;
  font-size: 11px;
}

.btn-fix-single {
  background: var(--emerald-bg);
  color: var(--emerald-text);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}
.btn-fix-single:hover {
  background: rgba(16, 185, 129, 0.25);
}

.issue-diff {
  margin-bottom: 4px;
  color: var(--text-primary);
}

.issue-del {
  text-decoration: line-through;
  color: var(--red-text);
  font-weight: 600;
}

.issue-ins {
  color: var(--emerald-text);
  font-weight: 700;
}

.issue-reason {
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.4;
}

.empty-state {
  text-align: center;
  color: var(--text-secondary);
  font-size: 13px;
  padding: 40px 0;
}

/* MODAL */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-dialog {
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  width: 100%;
  max-width: 720px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.modal-header {
  padding: 16px 20px;
  background: var(--bg-panel-header);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.btn-close {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 20px;
  cursor: pointer;
}

.modal-body {
  padding: 20px;
  flex: 1;
  overflow-y: auto;
}

.modal-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

.modal-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
  margin-bottom: 14px;
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 12px;
  cursor: pointer;
  border-radius: 4px;
}
.tab-btn.active {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.tab-content-area {
  max-height: 380px;
  overflow-y: auto;
  font-size: 13px;
}

.rule-row {
  display: grid;
  grid-template-columns: 1fr 1fr 40px;
  gap: 8px;
  margin-bottom: 8px;
  align-items: center;
}

.input-rule {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 12px;
}

.modal-footer {
  padding: 14px 20px;
  background: var(--bg-panel-header);
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
}

/* FOOTER */
.app-footer {
  max-width: 1440px;
  width: 100%;
  margin: 30px auto 0 auto;
  border-top: 1px solid var(--border-color);
  padding-top: 16px;
  font-size: 12px;
  color: var(--text-secondary);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-links {
  display: flex;
  gap: 8px;
  align-items: center;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
}
.footer-links a:hover {
  color: var(--text-primary);
}
