/* SAM-1 Enterprise AI Portal Styling */
:root {
  --font-sans: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, 'Helvetica Neue', 'Segoe UI', 'Apple SD Gothic Neo', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --font-display: 'Outfit', var(--font-sans);

  /* Color Palette - Dark Theme Default */
  --bg-primary: #0a0e17;
  --bg-secondary: #111827;
  --bg-tertiary: #1a2234;
  --bg-glass: rgba(17, 24, 39, 0.75);
  --bg-glass-card: rgba(26, 34, 52, 0.65);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --border-highlight: rgba(56, 189, 248, 0.35);

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --accent-cyan: #38bdf8;
  --accent-cyan-glow: rgba(56, 189, 248, 0.25);
  --accent-emerald: #10b981;
  --accent-purple: #a855f7;
  --accent-blue: #3b82f6;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 0 30px rgba(56, 189, 248, 0.18);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;
  --transition-fast: 0.18s ease;
  --transition-normal: 0.26s cubic-bezier(0.16, 1, 0.3, 1);
}

body.theme-light {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f1f5f9;
  --bg-glass: rgba(255, 255, 255, 0.85);
  --bg-glass-card: rgba(255, 255, 255, 0.75);
  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.14);
  --border-highlight: rgba(2, 132, 199, 0.3);
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;
  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-glow: 0 0 20px rgba(2, 132, 199, 0.12);
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background-image: 
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(56, 189, 248, 0.12), transparent),
    radial-gradient(ellipse 60% 40% at 90% 80%, rgba(168, 85, 247, 0.08), transparent);
  background-attachment: fixed;
}

/* ==================== HEADER ==================== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 28px;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  transition: background var(--transition-normal);
}

.header-left, .header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  text-decoration: none;
  user-select: none;
}

.brand-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #0284c7, #38bdf8);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.4);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.28rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, #fff, #93c5fd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
body.theme-light .brand-name {
  background: linear-gradient(90deg, #0f172a, #0284c7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-tag {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent-cyan);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.header-divider {
  width: 1px;
  height: 24px;
  background: var(--border-subtle);
}

.header-status-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 0.76rem;
}

.pulse-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
  animation: pulse-ring 2s infinite;
}
@keyframes pulse-ring {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 12px var(--accent-emerald); }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.status-sub {
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.7rem;
}

.telemetry-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid var(--border-highlight);
  font-size: 0.76rem;
}

.tel-label {
  color: var(--text-muted);
}
.tel-val {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--accent-cyan);
}
.tel-status {
  padding: 1px 6px;
  background: rgba(16, 185, 129, 0.2);
  color: var(--accent-emerald);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.7rem;
}

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

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 6px 10px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.btn-ghost:hover {
  background: var(--bg-tertiary);
  border-color: var(--border-strong);
}

.lang-switch {
  display: flex;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 2px;
}
.lang-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 0.74rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.lang-btn.active {
  background: var(--accent-cyan);
  color: #041221;
}

.btn-primary-glow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #0284c7, #38bdf8);
  color: #041221;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 7px 15px;
  border-radius: var(--radius-md);
  text-decoration: none;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.35);
  transition: all var(--transition-fast);
}
.btn-primary-glow:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 24px rgba(56, 189, 248, 0.55);
}

/* ==================== NAVIGATION TABS ==================== */
.app-nav {
  position: sticky;
  top: 65px;
  z-index: 90;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0 28px;
}

.nav-scroll-container {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-scroll-container::-webkit-scrollbar {
  display: none;
}

.nav-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

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

.nav-tab.active {
  color: var(--accent-cyan);
  border-bottom-color: var(--accent-cyan);
}

.nav-chip {
  padding: 2px 7px;
  border-radius: var(--radius-full);
  font-size: 0.68rem;
  font-weight: 700;
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-cyan);
}
.nav-chip.green {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
}

/* ==================== MAIN CONTENT WRAPPER ==================== */
.app-main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px 28px 80px;
}

.tab-view {
  display: none;
  animation: fadeIn 0.25s ease-out;
}
.tab-view.active {
  display: block;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Common Section Headers */
.section-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 20px;
  flex-wrap: wrap;
}

.section-tag {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent-cyan);
  text-transform: uppercase;
  margin-bottom: 4px;
  display: block;
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
}

.section-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 800px;
}

.engine-badge-box {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.engine-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid var(--border-highlight);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--accent-cyan);
}
.engine-pill.green {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
  color: var(--accent-emerald);
}
.engine-pill.purple {
  background: rgba(168, 85, 247, 0.1);
  border-color: rgba(168, 85, 247, 0.3);
  color: var(--accent-purple);
}
.engine-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 6px var(--accent-cyan);
}
.engine-dot.green { background: var(--accent-emerald); box-shadow: 0 0 6px var(--accent-emerald); }
.engine-dot.purple { background: var(--accent-purple); box-shadow: 0 0 6px var(--accent-purple); }
.engine-info {
  font-size: 0.72rem;
  color: var(--text-dim);
}

/* ==================== HERO CARD (DASHBOARD) ==================== */
.hero-card {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 32px;
  padding: 36px 40px;
  background: linear-gradient(135deg, rgba(26, 34, 52, 0.8), rgba(17, 24, 39, 0.9));
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
}
.hero-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.12), transparent 70%);
  pointer-events: none;
}

.hero-badge-wrap {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.badge-chip {
  padding: 4px 10px;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-cyan);
}
.badge-chip.outline {
  background: transparent;
  border-color: var(--border-subtle);
  color: var(--text-muted);
}
.badge-chip.yellow {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.3);
  color: var(--accent-amber);
}

.hero-headline {
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 16px;
  background: linear-gradient(120deg, #ffffff 40%, #bae6fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
body.theme-light .hero-headline {
  background: linear-gradient(120deg, #0f172a 40%, #0284c7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtext {
  font-size: 0.96rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 28px;
}

.hero-cta-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-hero-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #0284c7, #38bdf8);
  color: #041221;
  font-size: 0.92rem;
  font-weight: 700;
  padding: 12px 22px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(56, 189, 248, 0.4);
  transition: all var(--transition-fast);
}
.btn-hero-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(56, 189, 248, 0.6);
}

.btn-hero-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-highlight);
  color: var(--accent-cyan);
  font-size: 0.92rem;
  font-weight: 700;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.btn-hero-secondary:hover {
  background: rgba(56, 189, 248, 0.15);
}

.btn-hero-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text-main);
  font-size: 0.92rem;
  font-weight: 600;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.btn-hero-outline:hover {
  background: var(--bg-tertiary);
}

.hero-stats-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.stat-box {
  background: var(--bg-glass-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.stat-name {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
}
.stat-trend {
  font-size: 0.72rem;
  font-weight: 700;
}
.stat-trend.up { color: var(--accent-emerald); }
.stat-trend.neutral { color: var(--accent-purple); }
.stat-status-dot.online {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
}

.stat-number {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 4px;
}
.stat-unit {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-dim);
}
.stat-desc {
  font-size: 0.74rem;
  color: var(--text-dim);
}

/* Feature Grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.feature-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px;
  cursor: pointer;
  transition: all var(--transition-normal);
}
.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-highlight);
  box-shadow: var(--shadow-glow);
}
.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.icon-cyan { background: rgba(56, 189, 248, 0.15); color: var(--accent-cyan); }
.icon-emerald { background: rgba(16, 185, 129, 0.15); color: var(--accent-emerald); }
.icon-purple { background: rgba(168, 85, 247, 0.15); color: var(--accent-purple); }

.feature-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.feature-card p {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 18px;
}
.feature-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.feature-tags span {
  font-size: 0.7rem;
  padding: 3px 8px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  font-weight: 600;
}

/* ==================== WORKSPACE (TAB 2) ==================== */
.sample-preset-banner {
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.12), rgba(168, 85, 247, 0.1));
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-lg);
  padding: 16px 24px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.preset-lead {
  display: flex;
  align-items: center;
  gap: 12px;
}
.preset-icon {
  font-size: 1.8rem;
}
.preset-lead strong {
  display: block;
  font-size: 0.95rem;
  color: var(--text-main);
}
.preset-lead small {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.preset-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.btn-preset {
  background: var(--bg-secondary);
  border: 1px solid var(--border-strong);
  color: var(--text-main);
  padding: 7px 12px;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.btn-preset:hover {
  background: var(--accent-cyan);
  color: #041221;
  border-color: var(--accent-cyan);
  transform: translateY(-1px);
}

.workspace-grid {
  display: grid;
  grid-template-columns: 460px 1fr;
  gap: 24px;
  align-items: start;
}

.workspace-form-card, .workspace-result-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.form-group {
  margin-bottom: 20px;
}
.form-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
}
.step-num {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-cyan);
  color: #041221;
  font-size: 0.72rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}
.label-opt {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-dim);
}

.form-select, .form-input, .form-textarea {
  width: 100%;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  transition: border-color var(--transition-fast);
}
.form-select:focus, .form-input:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--accent-cyan);
}

/* Drop Zone */
.drop-zone {
  position: relative;
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-md);
  padding: 28px 16px;
  text-align: center;
  background: rgba(255, 255, 255, 0.01);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.drop-zone:hover, .drop-zone.dragover {
  border-color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.05);
}
.drop-zone input[type="file"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.drop-icon {
  color: var(--accent-cyan);
  margin-bottom: 8px;
}
.drop-title {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}
.drop-sub {
  display: block;
  font-size: 0.74rem;
  color: var(--text-dim);
}

.file-badges-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
}
.file-badge-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
}
.file-badge-name {
  font-weight: 600;
  color: var(--accent-cyan);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 320px;
}
.file-badge-remove {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 1rem;
}
.file-badge-remove:hover { color: var(--accent-rose); }

.paste-toggle-row {
  margin-top: 10px;
}
.btn-text-link {
  background: transparent;
  border: none;
  color: var(--accent-cyan);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}

.form-action-row {
  display: flex;
  gap: 10px;
  margin-top: 24px;
}
.btn-submit-task {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #0284c7, #38bdf8);
  color: #041221;
  font-size: 0.95rem;
  font-weight: 800;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(56, 189, 248, 0.35);
  transition: all var(--transition-fast);
}
.btn-submit-task:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(56, 189, 248, 0.55);
}
.btn-submit-task:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-reset {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  cursor: pointer;
}
.btn-reset:hover { background: rgba(255, 255, 255, 0.05); }

.error-banner {
  margin-top: 12px;
  padding: 10px 14px;
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.3);
  border-radius: var(--radius-md);
  color: #fda4af;
  font-size: 0.8rem;
}

/* Result Panel States */
.workspace-result-card {
  min-height: 580px;
}

.result-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 520px;
  text-align: center;
  color: var(--text-dim);
}
.placeholder-icon {
  font-size: 3.5rem;
  margin-bottom: 16px;
  opacity: 0.6;
}
.result-placeholder h3 {
  font-size: 1.3rem;
  color: var(--text-main);
  margin-bottom: 8px;
}
.result-placeholder p {
  font-size: 0.9rem;
  max-width: 480px;
  line-height: 1.6;
  margin-bottom: 24px;
}
.placeholder-chips {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}
.placeholder-chips span {
  padding: 5px 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 0.76rem;
  color: var(--accent-cyan);
  font-weight: 600;
}

.result-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 520px;
  text-align: center;
}
.spinner-ring {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(56, 189, 248, 0.2);
  border-top-color: var(--accent-cyan);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
  margin-bottom: 20px;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.result-loading h4 {
  font-size: 1.15rem;
  margin-bottom: 6px;
}
.result-loading p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.progress-bar-container {
  width: 320px;
  height: 6px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #0284c7, #38bdf8);
  width: 30%;
  animation: progressPulse 1.8s infinite ease-in-out;
}
@keyframes progressPulse {
  0% { width: 10%; }
  50% { width: 85%; }
  100% { width: 95%; }
}

/* Result Content */
.result-content-wrap {
  animation: fadeIn 0.3s ease-out;
}

.result-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}
.result-badge-completed {
  padding: 3px 8px;
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: var(--accent-emerald);
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 700;
  display: inline-block;
  margin-bottom: 4px;
}
.result-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-main);
}
.result-meta {
  font-size: 0.76rem;
  color: var(--text-dim);
}

.result-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-highlight);
  color: var(--accent-cyan);
  padding: 7px 14px;
  border-radius: var(--radius-md);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-fast);
}
.btn-download:hover {
  background: var(--accent-cyan);
  color: #041221;
}

/* KPI Strip */
.kpi-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.kpi-item {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 16px;
}
.kpi-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 4px;
}
.kpi-val {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--accent-cyan);
}

/* Insight Block */
.insight-block {
  background: rgba(56, 189, 248, 0.05);
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin-bottom: 24px;
}
.insight-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.insight-header h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}
.insight-body {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.7;
}
.insight-body ul {
  padding-left: 20px;
  margin-top: 8px;
}
.insight-body li {
  margin-bottom: 4px;
}
.insight-body strong {
  color: var(--text-main);
}

/* Table Section */
.table-section {
  border-top: 1px solid var(--border-subtle);
  padding-top: 18px;
}
.table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.table-header h4 {
  font-size: 0.95rem;
  font-weight: 700;
}
.table-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}
#table-search-input {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 5px 10px;
  font-size: 0.76rem;
  color: var(--text-main);
}
.table-row-count {
  font-size: 0.74rem;
  color: var(--text-dim);
}

.table-scroll-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  text-align: left;
}
.data-table th {
  background: var(--bg-tertiary);
  padding: 10px 14px;
  font-weight: 700;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-strong);
  white-space: nowrap;
}
.data-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-main);
}
.data-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* ==================== TAB 3: NETWORK ==================== */
.circuit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

.circuit-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  transition: all var(--transition-fast);
}
.circuit-card:hover {
  border-color: var(--border-highlight);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.circuit-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.circuit-id {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--accent-cyan);
}
.badge-status-online {
  padding: 2px 7px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--accent-emerald);
  border-radius: var(--radius-sm);
  font-size: 0.68rem;
  font-weight: 700;
}

.circuit-name {
  font-size: 0.96rem;
  font-weight: 700;
  margin-bottom: 2px;
}
.circuit-route {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-bottom: 14px;
}

.circuit-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.cm-label {
  display: block;
  font-size: 0.66rem;
  color: var(--text-dim);
}
.cm-val {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
}
.cm-val.highlight {
  color: var(--accent-cyan);
}

.circuit-chart-bar {
  height: 4px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.chart-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #38bdf8);
}

.card-panel {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.card-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 12px;
}
.card-panel-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
}
.subtle-text {
  font-size: 0.78rem;
  color: var(--text-dim);
}

.btn-secondary {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 6px 14px;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}
.btn-secondary:hover { background: rgba(255, 255, 255, 0.05); }

.btn-table-action {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  color: var(--accent-cyan);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
}
.btn-table-action:hover {
  background: var(--accent-cyan);
  color: #041221;
}

/* ==================== TAB 4: MARKET ==================== */
.market-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.input-with-btn {
  display: flex;
  gap: 8px;
}
.btn-primary {
  background: linear-gradient(135deg, #0284c7, #38bdf8);
  color: #041221;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

.hs-result-card {
  margin-top: 16px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-md);
  padding: 18px;
}
.hs-code-tag {
  font-size: 0.85rem;
  color: var(--accent-cyan);
  margin-bottom: 6px;
}
.hs-result-card h4 {
  font-size: 1.05rem;
  margin-bottom: 12px;
}
.hs-details {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.hs-details strong { color: var(--text-main); }

.brief-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.brief-item {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
}
.brief-item:last-child { border-bottom: none; }
.brief-date {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-right: 8px;
}
.brief-tag {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}
.brief-tag.red { background: rgba(244, 63, 94, 0.15); color: var(--accent-rose); }
.brief-tag.blue { background: rgba(56, 189, 248, 0.15); color: var(--accent-cyan); }
.brief-tag.green { background: rgba(16, 185, 129, 0.15); color: var(--accent-emerald); }

.brief-item h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 6px 0 4px;
}
.brief-item p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ==================== TAB 5: VIDEO STUDIO ==================== */
.video-studio-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.video-container {
  width: 100%;
  max-width: 380px;
  margin: 0 auto 16px;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
  border: 1px solid var(--border-subtle);
  background: #000;
}
.main-video-player {
  width: 100%;
  height: auto;
  display: block;
}

.video-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.78rem;
  color: var(--text-dim);
}
.video-meta-bar strong { color: var(--text-main); }

.script-scroll-box {
  max-height: 480px;
  overflow-y: auto;
  padding-right: 8px;
}
.script-paragraph {
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 12px;
  border: 1px solid var(--border-subtle);
}
.p-num {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-purple);
  margin-bottom: 6px;
}
.script-paragraph p {
  font-size: 0.84rem;
  line-height: 1.6;
  color: var(--text-muted);
}

/* ==================== TAB 6: PROPOSALS ==================== */
.proposal-doc-header {
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 20px;
  margin-bottom: 24px;
}
.doc-badge {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--accent-cyan);
  margin-bottom: 8px;
}
.proposal-doc-header h2 {
  font-size: 1.4rem;
  margin-bottom: 12px;
}
.doc-meta-info {
  display: flex;
  gap: 20px;
  font-size: 0.82rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.clause-box {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  margin-bottom: 16px;
}
.clause-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.clause-header h4 {
  font-size: 0.98rem;
  font-weight: 700;
}
.comment-count {
  font-size: 0.74rem;
  color: var(--accent-cyan);
  font-weight: 600;
}
.clause-box p {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.comment-thread {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}
.comment-item {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.comment-author {
  font-weight: 700;
  color: var(--text-main);
  margin-right: 6px;
}

/* ==================== TAB 7: TICKETS ==================== */
.ticket-layout {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 24px;
}
.chip-cat {
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 700;
}
.chip-cat.data { background: rgba(56, 189, 248, 0.15); color: var(--accent-cyan); }
.chip-cat.net { background: rgba(16, 185, 129, 0.15); color: var(--accent-emerald); }
.chip-cat.media { background: rgba(168, 85, 247, 0.15); color: var(--accent-purple); }

/* ==================== FOOTER ==================== */
.app-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  padding: 32px 28px;
}
.footer-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-left strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 4px;
}
.footer-left p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.footer-left small {
  font-size: 0.72rem;
  color: var(--text-dim);
}
.footer-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.76rem;
  color: var(--text-dim);
  text-align: right;
}

/* Toast */
.toast-box {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-highlight);
  color: var(--text-main);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  box-shadow: var(--shadow-md);
  z-index: 9999;
  animation: slideUp 0.25s ease-out;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Real-time Economic Newsroom & Dashboard Widget */
.live-dot-pulse {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 10px #10b981, 0 0 20px #10b981;
  animation: pulseLive 1.8s infinite ease-in-out;
}
@keyframes pulseLive {
  0%, 100% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.35); opacity: 1; }
}

/* Dashboard News Banner */
.dashboard-news-banner {
  margin: 28px 0;
  background: var(--bg-glass-card);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  transition: border-color var(--transition-fast);
}
.dashboard-news-banner:hover {
  border-color: var(--border-highlight);
}
.dash-news-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
}
.dash-news-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.dash-news-title-wrap h3 {
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
}
.dash-news-badge {
  font-size: 0.76rem;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent-cyan);
  border: 1px solid rgba(56, 189, 248, 0.25);
  font-weight: 600;
}
.btn-text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  color: var(--accent-cyan);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: gap var(--transition-fast), color var(--transition-fast);
}
.btn-text-link:hover {
  color: #7dd3fc;
  gap: 9px;
}
.dash-news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}
.dash-news-card {
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  cursor: pointer;
  transition: transform var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.dash-news-card:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.4);
  background: rgba(15, 23, 42, 0.7);
}
.dash-news-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.dash-news-card h4 {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.5;
  margin-bottom: 8px;
}
.dash-news-card p {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.dash-news-card-meta {
  font-size: 0.78rem;
  color: var(--text-dim);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* ==================== DEDICATED NEWS ROOM VIEW ==================== */
.news-room-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.news-room-title-area {
  flex: 1;
  min-width: 320px;
}
.news-room-title-area h2 {
  font-size: 1.7rem;
  font-weight: 800;
  margin: 10px 0 8px;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.news-room-desc {
  font-size: 0.94rem;
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 800px;
}
.news-room-meta-card {
  background: var(--bg-glass-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  text-align: right;
  min-width: 240px;
}
.news-meta-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 4px;
}
.news-meta-time {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent-cyan);
  margin-bottom: 2px;
}
.news-meta-sub {
  font-size: 0.76rem;
  color: var(--text-dim);
  margin-bottom: 10px;
}
.btn-refresh-news {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  border-radius: var(--radius-full);
  padding: 5px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.btn-refresh-news:hover {
  background: rgba(56, 189, 248, 0.15);
  color: #7dd3fc;
  border-color: rgba(56, 189, 248, 0.3);
}

/* News Controls Bar */
.news-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
  padding: 12px 18px;
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}
.news-mode-group {
  display: flex;
  gap: 8px;
}
.news-mode-btn {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 7px 16px;
  border-radius: var(--radius-full);
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.news-mode-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
}
.news-mode-btn.active {
  background: rgba(56, 189, 248, 0.16);
  border-color: var(--accent-cyan);
  color: #7dd3fc;
}
.news-filter-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.filter-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-dim);
}
.news-filters-list {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.news-filter-btn {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.news-filter-btn:hover {
  border-color: rgba(255, 255, 255, 0.25);
  color: var(--text-main);
}
.news-filter-btn.active {
  background: rgba(56, 189, 248, 0.2);
  border-color: var(--accent-cyan);
  color: #7dd3fc;
}

/* News Item Cards Stack */
.news-card-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 28px;
}
.news-item-card {
  background: var(--bg-glass-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 22px 24px;
  transition: border-color var(--transition-fast), transform var(--transition-fast);
}
.news-item-card:hover {
  border-color: var(--border-highlight);
}
.news-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.news-tag-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  color: #ffffff;
}
.tag-policy { background: #dc2626; }
.tag-industry { background: #2563eb; }
.tag-logistics { background: #0891b2; }
.tag-consumption { background: #d97706; }
.tag-finance { background: #7c3aed; }
.tag-statistics { background: #059669; }
.tag-general { background: #64748b; }

.news-rel-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: rgba(244, 63, 94, 0.15);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.35);
}
.news-source-date {
  font-size: 0.8rem;
  color: var(--text-dim);
}
.news-item-card h3 {
  font-size: 1.16rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.5;
  margin-bottom: 12px;
}
.news-body-flex {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.news-thumb-col {
  flex: 0 0 240px;
  max-width: 240px;
}
.news-thumb-col img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  display: block;
  border: 1px solid var(--border-subtle);
  object-fit: cover;
}
.news-content-col {
  flex: 1;
  min-width: 280px;
}
.news-summary-list {
  margin: 0 0 12px 18px;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.7;
}
.news-summary-list li {
  margin: 6px 0;
}
.news-impact-box {
  background: rgba(16, 185, 129, 0.08);
  border-left: 3px solid #10b981;
  border-radius: 0 8px 8px 0;
  padding: 12px 16px;
  margin: 14px 0 10px;
}
.impact-head {
  font-size: 0.78rem;
  font-weight: 700;
  color: #34d399;
  text-transform: uppercase;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.impact-body {
  font-size: 0.91rem;
  color: #e2e8f0;
  line-height: 1.65;
}
.news-card-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.btn-fetch-detail {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #7dd3fc;
  border-radius: var(--radius-full);
  padding: 6px 16px;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.btn-fetch-detail:hover {
  background: rgba(56, 189, 248, 0.22);
  border-color: var(--accent-cyan);
}
.btn-fetch-detail:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Detail Translation Container */
.news-detail-container {
  margin-top: 14px;
  padding: 18px 20px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  animation: fadeIn 0.2s ease-out;
}
.news-detail-container h4 {
  font-size: 1.08rem;
  color: var(--text-main);
  margin-bottom: 10px;
  line-height: 1.5;
}
.news-detail-body p {
  margin: 10px 0;
  color: var(--text-muted);
  font-size: 0.91rem;
  line-height: 1.8;
}

/* Accordion for Chinese Original */
.news-original-details {
  margin-top: 12px;
}
.news-original-details summary {
  cursor: pointer;
  font-size: 0.84rem;
  color: var(--accent-cyan);
  user-select: none;
}
.news-original-details summary:hover {
  text-decoration: underline;
}
.news-original-box {
  margin-top: 10px;
  padding: 14px 18px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.orig-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.orig-body p {
  font-size: 0.84rem;
  color: var(--text-dim);
  line-height: 1.75;
  margin: 6px 0;
}
.orig-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 10px;
  font-size: 0.82rem;
  color: var(--accent-cyan);
  text-decoration: none;
}
.orig-link:hover {
  text-decoration: underline;
}

/* News Briefs Section */
.news-briefs-section {
  margin-top: 32px;
}
.briefs-card {
  background: var(--bg-glass-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.briefs-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.02);
}
.briefs-header h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}
.briefs-header p {
  font-size: 0.82rem;
  color: var(--text-dim);
}
.brief-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  flex-wrap: wrap;
  transition: background var(--transition-fast);
}
.brief-row:hover {
  background: rgba(255, 255, 255, 0.02);
}
.brief-row:last-child {
  border-bottom: none;
}
.brief-title {
  flex: 1;
  min-width: 240px;
  font-size: 0.92rem;
  color: var(--text-main);
  line-height: 1.5;
}
.brief-src {
  font-size: 0.78rem;
  color: var(--text-dim);
  flex: 0 0 auto;
}
.btn-brief-get {
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #7dd3fc;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.btn-brief-get:hover {
  background: rgba(56, 189, 248, 0.22);
}

/* Compliance Disclaimer Box */
.news-disclaimer-box {
  margin-top: 30px;
  padding: 16px 20px;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-size: 0.83rem;
  color: var(--text-dim);
  line-height: 1.7;
}
.disclaimer-icon {
  font-size: 1.2rem;
  line-height: 1;
}

/* Spinner */
.news-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--accent-cyan);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}

/* Responsive */
@media (max-width: 1024px) {
  .hero-card { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
  .workspace-grid { grid-template-columns: 1fr; }
  .market-grid, .video-studio-grid, .ticket-layout { grid-template-columns: 1fr; }
  .dash-news-grid { grid-template-columns: 1fr; }
  .news-thumb-col { flex: 1 1 100%; max-width: 100%; }
  .footer-meta { text-align: left; }
}

