/* ==========================================================================
   Ultra Academy Cloud - Design System (Grafite & Amarelo Dourado)
   Full Width 100vw Layout with Bootstrap Icons & Premium Graphite Theme
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
  /* Color Palette - Graphite Charcoal & Golden Yellow */
  --bg-dark: #0b0d10;
  --bg-graphite-900: #121418;
  --bg-graphite-800: #181b22;
  --bg-graphite-700: #212630;
  --bg-graphite-600: #2b3240;
  
  --border-graphite: #323a4a;
  --border-graphite-light: #444f65;
  
  --gold-500: #f5b800;
  --gold-400: #ffcb2b;
  --gold-600: #d49b00;
  --gold-glow: rgba(245, 184, 0, 0.25);
  --gold-glow-subtle: rgba(245, 184, 0, 0.08);

  --text-primary: #ffffff;
  --text-secondary: #9da8b9;
  --text-muted: #6b778c;
  
  --success: #10b981;
  --success-glow: rgba(16, 185, 129, 0.2);

  /* Typography */
  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Transitions & Shadows */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  --shadow-gold: 0 0 25px -5px rgba(245, 184, 0, 0.3);
}

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

body {
  font-family: var(--font-main);
  background-color: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  width: 100vw;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 10% 10%, rgba(245, 184, 0, 0.04) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(245, 184, 0, 0.03) 0%, transparent 45%),
    linear-gradient(to bottom, #0b0d10, #121418);
  background-attachment: fixed;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-graphite-600);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--gold-600);
}

/* 100vw Full Width Container */
.app-container {
  width: 100%;
  max-width: 100%;
  padding: 0 3.5rem 4rem;
}

@media (max-width: 768px) {
  .app-container {
    padding: 0 1.25rem 3rem;
  }
}

/* Header Navbar */
.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.75rem 0;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--border-graphite);
}

.brand-container {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  cursor: pointer;
  background: transparent;
  padding: 0;
  border: none;
  box-shadow: none;
}

.header-logo-img {
  height: 48px;
  width: auto;
  object-fit: contain;
  display: block;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.brand-container:hover .header-logo-img {
  transform: scale(1.04);
  opacity: 0.95;
}

.header-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  background: var(--bg-graphite-800);
  border: 1px solid var(--border-graphite);
  padding: 0.6rem 1.2rem;
  border-radius: 9999px;
  font-size: 0.9rem;
  font-weight: 600;
}

.pulse-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background-color: var(--success);
  box-shadow: 0 0 12px var(--success);
  animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

/* Views Management */
.view-section {
  display: none;
  animation: fadeIn 0.35s ease-out forwards;
}

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

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

/* Section Headlines */
.section-intro {
  margin-bottom: 2.5rem;
}

.section-tag {
  display: inline-block;
  color: var(--gold-500);
  background: var(--gold-glow-subtle);
  border: 1px solid rgba(245, 184, 0, 0.35);
  padding: 0.3rem 0.9rem;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.75rem;
}

.section-intro h2 {
  font-size: 2.4rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  letter-spacing: -0.5px;
}

.section-intro p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 800px;
}

/* Hub Grid (Full Width 2 columns) */
.hub-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 1.5rem;
}

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

.platform-card {
  background: var(--bg-graphite-800);
  border: 1px solid var(--border-graphite);
  border-radius: 16px;
  padding: 2.25rem;
  position: relative;
  overflow: hidden;
  transition: var(--transition-normal);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-card);
}

.platform-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: transparent;
  transition: var(--transition-fast);
}

.platform-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold-500);
  box-shadow: var(--shadow-gold);
}

.platform-card:hover::before {
  background: linear-gradient(90deg, var(--gold-500), var(--gold-400));
}

.card-header-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.card-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--bg-graphite-700);
  border: 1px solid var(--border-graphite-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  color: var(--gold-500);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  background: rgba(16, 185, 129, 0.12);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.platform-title {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 0.6rem;
}

.platform-desc {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.card-metrics-summary {
  display: flex;
  gap: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-graphite);
  margin-bottom: 1.75rem;
}

.mini-metric {
  display: flex;
  flex-direction: column;
}

.mini-metric-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
}

.mini-metric-value {
  font-size: 1.1rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-primary);
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  width: 100%;
}

@media (max-width: 550px) {
  .card-actions {
    grid-template-columns: 1fr;
  }
}

.btn-select {
  width: 100%;
  padding: 0.9rem;
  background: var(--bg-graphite-700);
  color: var(--text-primary);
  border: 1px solid var(--border-graphite-light);
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: var(--transition-fast);
}

.platform-card:hover .btn-select {
  background: var(--gold-500);
  color: #0b0d10;
  border-color: var(--gold-400);
}

.btn-site {
  padding: 0.9rem;
  background: rgba(245, 184, 0, 0.1);
  color: var(--gold-400);
  border: 1px solid rgba(245, 184, 0, 0.35);
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: var(--transition-fast);
}

.btn-site:hover {
  background: var(--gold-500);
  color: #0b0d10;
  border-color: var(--gold-400);
  box-shadow: 0 4px 15px rgba(245, 184, 0, 0.3);
}

/* View Navigation Breadcrumb & Header Buttons */
.view-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.btn-back {
  background: var(--bg-graphite-800);
  color: var(--text-secondary);
  border: 1px solid var(--border-graphite);
  padding: 0.65rem 1.25rem;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  transition: var(--transition-fast);
}

.btn-back:hover {
  background: var(--bg-graphite-700);
  color: var(--gold-500);
  border-color: var(--gold-500);
}

.breadcrumb-path {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.breadcrumb-path span {
  color: var(--gold-500);
  font-weight: 700;
}

.btn-visit-site {
  background: rgba(245, 184, 0, 0.12);
  color: var(--gold-400);
  border: 1px solid rgba(245, 184, 0, 0.35);
  padding: 0.65rem 1.25rem;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  transition: var(--transition-fast);
}

.btn-visit-site:hover {
  background: var(--gold-500);
  color: #0b0d10;
  border-color: var(--gold-400);
  box-shadow: 0 4px 15px rgba(245, 184, 0, 0.3);
}

.section-intro-flex {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.btn-site-banner {
  background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
  color: #0b0d10;
  padding: 0.85rem 1.6rem;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 800;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  box-shadow: var(--shadow-gold);
  transition: var(--transition-fast);
  margin-bottom: 0.5rem;
}

.btn-site-banner:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, var(--gold-400), var(--gold-500));
  box-shadow: 0 6px 20px rgba(245, 184, 0, 0.45);
}

/* Dashboard Metric Cards (4 Columns Full Width) */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

@media (max-width: 1100px) {
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  .metrics-grid {
    grid-template-columns: 1fr;
  }
}

.metric-card {
  background: var(--bg-graphite-800);
  border: 1px solid var(--border-graphite);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  position: relative;
  box-shadow: var(--shadow-card);
}

.metric-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
}

.metric-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.metric-icon-small {
  color: var(--gold-500);
  font-size: 1.3rem;
}

.metric-main-val {
  font-size: 1.95rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--text-primary);
  display: flex;
  align-items: baseline;
  gap: 0.3rem;
  line-height: 1.1;
}

.metric-unit {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gold-500);
}

.metric-footer {
  margin-top: 0.45rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Latency Live Card */
.latency-card {
  border-color: rgba(245, 184, 0, 0.4);
  background: linear-gradient(145deg, var(--bg-graphite-800), #1e222c);
}

.live-pulse-gold {
  width: 9px;
  height: 9px;
  background-color: var(--gold-500);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 10px var(--gold-500);
  animation: gold-pulse 1.2s infinite alternate;
}

@keyframes gold-pulse {
  from { opacity: 0.4; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1.2); }
}

.latency-sparkline {
  width: 100%;
  height: 24px;
  margin-top: 0.35rem;
}

/* Changelog Header & List */
.changelog-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 1.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-graphite);
}

.changelog-title h3 {
  font-size: 1.6rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.changelog-title h3 i {
  color: var(--gold-500);
  font-size: 1.5rem;
}

.changelog-title p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

.changelog-feed {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Changelog Item Card (Single Horizontal Line across 100vw) */
.changelog-item {
  background: var(--bg-graphite-800);
  border: 1px solid var(--border-graphite);
  border-radius: 12px;
  padding: 1.1rem 1.75rem;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  width: 100%;
}

.changelog-item:hover {
  border-color: var(--border-graphite-light);
  background: var(--bg-graphite-700);
}

/* Highlighted Latest Item */
.changelog-item.latest {
  border: 1.5px solid var(--gold-500);
  background: linear-gradient(135deg, rgba(245, 184, 0, 0.08), var(--bg-graphite-800));
  box-shadow: 0 4px 20px -5px rgba(245, 184, 0, 0.2);
}

.tag-latest {
  background: var(--gold-500);
  color: #0b0d10;
  border: 1px solid var(--gold-400);
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.item-date {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
  min-width: 100px;
  flex-shrink: 0;
}

.item-main-content {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1.25rem;
  flex: 1;
}

.item-tags {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-shrink: 0;
}

.tag-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  text-transform: uppercase;
}

.tag-crm {
  background: rgba(245, 184, 0, 0.15);
  color: var(--gold-400);
  border: 1px solid rgba(245, 184, 0, 0.35);
}

.tag-academy {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.35);
}

.tag-feat {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.item-description {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.35;
}

.item-meta-people {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1.25rem;
  flex-shrink: 0;
  white-space: nowrap;
}

.person-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
}

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

.person-name {
  font-weight: 600;
  color: var(--text-primary);
  background: var(--bg-graphite-700);
  padding: 0.2rem 0.65rem;
  border-radius: 6px;
  border: 1px solid var(--border-graphite);
}

.person-name.gold-highlight {
  color: #0b0d10;
  background: var(--gold-500);
  border-color: var(--gold-400);
  font-weight: 700;
}

.person-name.empty-person {
  color: var(--text-muted);
  background: transparent;
  border: none;
  font-weight: 400;
}

/* Footer */
.footer-bar {
  margin-top: 4.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-graphite);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.footer-copy span {
  color: var(--gold-500);
  font-weight: 600;
}

/* ==========================================================================
   Responsividade Geral (Mobile, Tablet, Desktop & 4K)
   ========================================================================== */

/* Breakpoint: Notebooks & Screens <= 1200px */
@media (max-width: 1200px) {
  .app-container {
    padding: 0 2.5rem 3.5rem;
  }
}

/* Breakpoint: Tablets <= 900px */
@media (max-width: 900px) {
  .app-container {
    padding: 0 1.75rem 3rem;
  }

  .hub-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .section-intro h2 {
    font-size: 2rem;
  }

  .section-intro-flex {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .btn-site-banner {
    width: 100%;
    justify-content: center;
    margin-bottom: 0;
  }

  .changelog-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem 1.35rem;
  }

  .item-main-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.65rem;
    width: 100%;
  }

  .item-meta-people {
    width: 100%;
    align-items: flex-start;
    flex-wrap: wrap;
    justify-content: space-between;
    border-top: 1px solid var(--border-graphite);
    padding-top: 0.85rem;
    gap: 0.75rem;
  }
}

/* Breakpoint: Mobile Standard <= 768px */
@media (max-width: 768px) {
  .app-container {
    padding: 0 1.25rem 2.5rem;
  }

  .main-header {
    justify-content: center;
    align-items: center;
    padding: 1.25rem 0;
    margin-bottom: 2rem;
  }

  .header-status-pill {
    display: none !important;
  }

  .brand-container {
    margin: 0 auto;
    display: flex;
    justify-content: center;
  }

  .header-logo-img {
    height: 42px;
  }

  .view-nav {
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
  }

  .btn-back,
  .btn-visit-site {
    width: 100%;
    justify-content: center;
  }

  .breadcrumb-path {
    text-align: center;
    order: -1;
    font-size: 0.88rem;
  }

  .section-intro h2 {
    font-size: 1.75rem;
  }

  .section-intro p {
    font-size: 0.98rem;
  }

  .platform-card {
    padding: 1.5rem;
  }

  .platform-title {
    font-size: 1.5rem;
  }

  .card-metrics-summary {
    flex-wrap: wrap;
    gap: 1.25rem;
  }

  .card-actions {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

  .footer-bar {
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
    margin-top: 3.5rem;
  }
}

/* Breakpoint: Small Mobile Devices <= 480px */
@media (max-width: 480px) {
  .app-container {
    padding: 0 0.85rem 2rem;
  }

  .main-header {
    justify-content: center;
    align-items: center;
    padding: 1rem 0;
  }

  .header-status-pill {
    display: none !important;
  }

  .brand-container {
    margin: 0 auto;
    display: flex;
    justify-content: center;
  }

  .header-logo-img {
    height: 38px;
  }

  .section-intro h2 {
    font-size: 1.5rem;
  }

  .section-tag {
    font-size: 0.72rem;
    padding: 0.25rem 0.75rem;
  }

  .item-tags {
    flex-wrap: wrap;
    gap: 0.35rem;
  }

  .person-row {
    flex-wrap: wrap;
    gap: 0.35rem;
  }

  .person-name {
    font-size: 0.8rem;
  }

  .metric-main-val {
    font-size: 1.7rem;
  }
}
