@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,wght@0,600;0,700;1,400&family=DM+Sans:wght@300;400;500;600&display=swap');

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

:root {
  /* Base neutra */
  --white:        #FFFFFF;
  --gray-50:      #F7F8FA;
  --gray-100:     #EFF1F5;
  --gray-200:     #E2E5EC;
  --gray-400:     #9AA3B2;
  --gray-600:     #5C6678;
  --gray-900:     #0F1623;

  /* Cores estruturais */
  --navy:         #14285C;
  --navy-mid:     #1E3A7A;
  --navy-light:   #EBF0FB;
  --teal:         #07A8B5;
  --teal-mid:     #059AA6;
  --teal-light:   #E3F6F8;
  --teal-dark:    #046E78;

  /* Feedback */
  --success:      #166534;
  --success-bg:   #F0FDF4;
  --warning:      #C2590A;
  --warning-bg:   #FFF7ED;
  --danger:       #DC2626;
  --danger-bg:    #FEF2F2;

  /* Sombras */
  --sh-sm:  0 1px 3px rgba(15,22,35,.05), 0 1px 2px rgba(15,22,35,.04);
  --sh-md:  0 4px 14px rgba(15,22,35,.07), 0 1px 4px rgba(15,22,35,.04);
  --sh-lg:  0 12px 36px rgba(15,22,35,.09), 0 2px 8px rgba(15,22,35,.05);

  /* Bordas */
  --bd:     rgba(15,22,35,.07);
  --bd-md:  rgba(15,22,35,.13);

  /* Raios */
  --r4:  4px;
  --r8:  8px;
  --r12: 12px;
  --r20: 20px;

  /* Theming por conta */
  --acc-primary:       #14285C;
  --acc-primary-hover: #1E3A7A;
  --acc-primary-light: #EBF0FB;
  --acc-primary-text:  #FFFFFF;
  --acc-accent:        #07A8B5;
  --acc-font:          'DM Sans', 'Segoe UI Variable', system-ui, sans-serif;
  --acc-header-bg:     rgba(255,255,255,0.90);
  --acc-sidebar-bg:    rgba(247,248,250,0.94);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--acc-font);
  background: var(--gray-50);
  color: var(--gray-900);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
}

a { color: var(--teal-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* ===== LAYOUT APP ===== */
.app-layout { display: flex; flex-direction: column; min-height: 100vh; }
.app-body { display: flex; flex: 1; min-height: 0; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  height: 48px;
  background: var(--acc-header-bg);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--bd);
  display: flex; align-items: center;
  padding: 0 20px; gap: 16px;
}
.header-left { display: flex; align-items: center; gap: 16px; flex: 1; }
.header-right { display: flex; align-items: center; gap: 12px; }
.header-user-name { font-size: 13px; color: var(--gray-600); }
.hamburger { background: none; border: none; cursor: pointer; padding: 4px; color: var(--gray-600); font-size: 20px; }

/* Sidebar — open by default */
.sidebar {
  width: 240px;
  background: var(--acc-sidebar-bg);
  backdrop-filter: blur(12px);
  border-right: 1px solid var(--bd);
  padding: 12px 8px;
  position: sticky; top: 48px;
  height: calc(100vh - 48px);
  overflow-y: auto;
  flex-shrink: 0;
  display: flex; flex-direction: column; gap: 2px;
  transition: width 200ms ease;
}
.sidebar.collapsed { width: 52px; padding: 12px 4px; overflow: hidden; }
.sidebar-section {
  margin-top: 16px; padding: 0 12px 6px; font-size: 10px; font-weight: 600;
  color: var(--gray-400); text-transform: uppercase; letter-spacing: 1px;
  white-space: nowrap; transition: opacity 200ms;
}
.sidebar.collapsed .sidebar-section { opacity: 0; }
.sidebar-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-radius: var(--r8);
  cursor: pointer; color: var(--gray-600);
  font-size: 13px; font-weight: 500;
  transition: all 150ms; text-decoration: none;
  white-space: nowrap; overflow: hidden;
  min-height: 36px; justify-content: flex-start;
}
.sidebar.collapsed .sidebar-nav-item { justify-content: center; }
.sidebar-nav-item:hover { background: rgba(0,0,0,.04); color: var(--gray-900); text-decoration: none; }
.sidebar-nav-item.active { background: var(--navy-light); color: var(--navy); }
.sidebar-nav-item .nav-icon { font-size: 16px; width: 20px; text-align: center; flex-shrink: 0; }
.sidebar-nav-item .nav-label { display: inline; }
.sidebar.collapsed .sidebar-nav-item .nav-label { display: none; }

/* Content */
.page-content { flex: 1; padding: 24px; overflow-y: auto; min-width: 0; }
.page-title { margin-bottom: 20px; }
.page-title h1 { margin-bottom: 4px; }
.page-title p { color: var(--gray-400); font-size: 13px; }

/* ===== TIPOGRAFIA ===== */
h1 { font-family: 'Fraunces', serif; font-size: 22px; font-weight: 700; color: var(--navy); letter-spacing: -.3px; }
h2 { font-size: 16px; font-weight: 600; color: var(--gray-900); }
h3 { font-size: 14px; font-weight: 600; }
h4 { font-size: 13px; font-weight: 600; }

/* ===== GRID ===== */
.grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; }

/* ===== TABS ===== */
.tabs-nav { display: flex; border-bottom: 1px solid var(--bd); margin-bottom: 20px; overflow-x: auto; }
.tab-btn {
  padding: 10px 16px; background: none; border: none;
  border-bottom: 2px solid transparent;
  color: var(--gray-600); font-size: 13px; font-weight: 500;
  cursor: pointer; transition: all 150ms; font-family: inherit;
  white-space: nowrap;
}
.tab-btn:hover { color: var(--gray-900); }
.tab-btn.active { color: var(--navy); border-bottom-color: var(--teal); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ===== TABELA ===== */
.table-container { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead th {
  text-align: left; font-size: 11px; font-weight: 600;
  color: var(--gray-400); text-transform: uppercase;
  letter-spacing: .5px; padding: 10px 12px;
  border-bottom: 1px solid var(--bd-md);
}
tbody td { padding: 10px 12px; border-bottom: 1px solid var(--bd); font-size: 13px; vertical-align: middle; }
tbody tr:hover { background: var(--gray-50); }

/* ===== UTILITÁRIOS ===== */
.flex { display: flex; }
.flex-center { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col { display: flex; flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.gap-4 { gap: 4px; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-20 { gap: 20px; }
.mt-4 { margin-top: 4px; } .mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }
.text-muted { color: var(--gray-600); }
.text-secondary { color: var(--gray-400); }
.text-center { text-align: center; }
.text-sm { font-size: 12px; }
.text-xs { font-size: 11px; }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.breadcrumb { font-size: 12px; color: var(--gray-400); margin-bottom: 0; display: flex; align-items: center; }
.breadcrumb a { color: var(--teal-dark); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .sep { margin: 0 6px; }
.hidden { display: none !important; }

/* ===== LANDING ===== */
.landing-nav {
  position: sticky; top: 0; z-index: 100;
  height: 52px; background: rgba(255,255,255,.90);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--bd);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 40px;
}
.landing-nav-links { display: flex; align-items: center; gap: 24px; }
.landing-nav-links a { font-size: 13px; font-weight: 500; color: var(--gray-600); }
.landing-nav-links a:hover { color: var(--navy); text-decoration: none; }
.landing-nav-actions { display: flex; align-items: center; gap: 12px; }

.hero {
  padding: 80px 40px;
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center;
}
.hero-text .eyebrow {
  display: inline-block; padding: 4px 14px;
  background: var(--teal-light); color: var(--teal-dark);
  border-radius: 20px; font-size: 12px; font-weight: 500;
  margin-bottom: 16px;
}
.hero-text h1 {
  font-family: 'Fraunces', serif; font-size: 48px; font-weight: 700;
  color: var(--navy); line-height: 1.1; margin-bottom: 8px; letter-spacing: -1px;
}
.hero-text h1 em { color: var(--teal); font-style: normal; }
/* Hero logo multicolor */
.logo-name-hero { font-family: 'Fraunces', serif; font-size: 48px; font-weight: 700; line-height: 1.1; letter-spacing: -1px; margin-bottom: 8px; }
.hero-turma { color: var(--navy); }
.hero-o { color: #6B3FA0; }
.hero-r { color: #D4A017; }
.hero-g { color: #C42B6B; }
.hero-anizada { color: var(--navy); }
.hero-org { /* keeps inline */ }
.hero-text .tagline {
  font-family: 'Fraunces', serif; font-style: italic;
  font-size: 18px; color: var(--gray-400); margin-bottom: 20px;
}
.hero-text p { font-size: 15px; color: var(--gray-600); margin-bottom: 28px; line-height: 1.6; }
.hero-actions { display: flex; gap: 12px; }
.hero-mockup {
  background: var(--white); border: 1px solid var(--bd);
  border-radius: var(--r12); box-shadow: var(--sh-lg);
  padding: 20px; min-height: 340px;
  display: flex; align-items: center; justify-content: center;
  color: var(--gray-400); font-size: 13px;
}

.landing-section {
  padding: 60px 40px; max-width: 1100px; margin: 0 auto;
}
.landing-section h2 {
  font-family: 'Fraunces', serif; font-size: 28px; font-weight: 700;
  color: var(--navy); text-align: center; margin-bottom: 12px;
}
.landing-section .section-sub {
  text-align: center; color: var(--gray-400); font-size: 14px; margin-bottom: 40px;
}

.feature-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; }
.feature-card {
  background: var(--white); border: 1px solid var(--bd);
  border-radius: var(--r12); padding: 24px; text-align: center;
  transition: box-shadow 150ms;
}
.feature-card:hover { box-shadow: var(--sh-md); }
.feature-icon { font-size: 32px; margin-bottom: 12px; }
.feature-card h3 { font-size: 14px; margin-bottom: 8px; }
.feature-card p { font-size: 13px; color: var(--gray-600); }

.homenagem-section {
  background: var(--navy); color: var(--white);
  padding: 80px 40px;
}
.homenagem-inner {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center;
}
.homenagem-text h2 {
  font-family: 'Fraunces', serif; font-size: 36px; font-weight: 700;
  color: var(--white); text-align: left; margin-bottom: 4px;
}
.homenagem-text .anos { font-size: 14px; color: var(--teal); margin-bottom: 20px; }
.homenagem-text blockquote {
  font-family: 'Fraunces', serif; font-style: italic;
  font-size: 16px; color: rgba(255,255,255,.7);
  border-left: 3px solid var(--teal); padding-left: 16px;
  margin-bottom: 20px;
}
.homenagem-text p { font-size: 14px; color: rgba(255,255,255,.6); line-height: 1.7; }
.homenagem-cards { display: flex; flex-direction: column; gap: 12px; }
.homenagem-card {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--r12); padding: 20px;
}
.homenagem-card h4 { color: var(--teal); font-size: 13px; margin-bottom: 4px; }
.homenagem-card p { font-size: 13px; color: rgba(255,255,255,.6); }

.landing-footer {
  text-align: center; padding: 24px;
  font-size: 12px; color: var(--gray-400);
  border-top: 1px solid var(--bd);
}

/* ===== RESPONSIVE ===== */
@media(max-width: 900px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: repeat(2,1fr); }
  .hero { grid-template-columns: 1fr; padding: 40px 20px; }
  .hero-mockup { display: none; }
  .homenagem-inner { grid-template-columns: 1fr; }
  .landing-nav { padding: 0 16px; }
  .landing-section { padding: 40px 16px; }
}

@media(max-width: 768px) {
  .sidebar { display: none; }
  .sidebar.mobile-open {
    display: flex; position: fixed; top: 48px; left: 0;
    height: calc(100vh - 48px); z-index: 50; width: 240px;
    box-shadow: var(--sh-lg);
  }
  .page-content { padding: 16px; }
  .feature-grid { grid-template-columns: 1fr; }
  .hero-text h1 { font-size: 32px; }
  .landing-nav-links { display: none; }
}

/* ===== LOGIN PAGE ===== */
.login-page {
  display: flex;
  justify-content: center;
  min-height: 100vh;
  background: var(--white);
}

.login-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  width: 100%;
  max-width: 420px;
  min-height: 100vh;
}

/* Frases embaixo do login */
.login-quotes {
  margin-top: 40px;
  position: relative;
  min-height: 50px;
  text-align: center;
  width: 100%;
}

.login-quote {
  position: absolute;
  left: 0;
  right: 0;
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 13px;
  line-height: 1.5;
  color: var(--gray-300);
  opacity: 0;
  transition: opacity 1.5s ease;
}

.login-quote.active {
  opacity: 1;
}

.login-quote-author {
  font-style: normal;
  font-family: var(--font);
  font-size: 11px;
  color: var(--gray-200);
  margin-left: 6px;
}

.login-box {
  width: 100%;
  max-width: 380px;
}

.login-top-link {
  display: block;
  text-align: center;
  font-size: 12px;
  color: var(--teal-dark);
  font-weight: 500;
  margin-bottom: 32px;
  padding: 8px 16px;
  background: var(--teal-light);
  border-radius: 20px;
  text-decoration: none;
  transition: background 150ms;
}

.login-top-link:hover {
  background: #d0f0f3;
  text-decoration: none;
}

.login-welcome {
  font-family: 'Fraunces', serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 20px;
}

.login-switch a {
  color: var(--teal-dark);
  font-weight: 500;
}

.login-options {
  margin-top: 8px;
}

.login-footer {
  margin-top: 40px;
}

.login-redirect-msg {
  background: var(--teal-light);
  border: 1px solid var(--teal);
  border-radius: var(--r8);
  padding: 8px 12px;
  color: var(--teal-dark);
  font-size: 12px;
  margin-bottom: 12px;
}

.password-wrap {
  position: relative;
}

.password-wrap input {
  padding-right: 40px;
}

.password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  padding: 4px;
  color: var(--gray-400);
  width: auto;
}

@media(max-width: 768px) {
  .login-panel { padding: 24px; }
}

/* ===== PUBLIC DISCIPLINE PAGE ===== */
.public-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--gray-50);
}
.public-header {
  display: flex;
  align-items: center;
  padding: 16px 32px;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 100;
}
.public-main {
  flex: 1;
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
  padding: 0 24px 48px;
}
.public-hero {
  text-align: center;
  padding: 48px 0 32px;
  border-bottom: 1px solid var(--gray-200);
  margin-bottom: 32px;
}
.public-hero h1 {
  font-family: 'Fraunces', serif;
  font-size: 28px;
  color: var(--navy);
}
.public-section {
  margin-bottom: 32px;
}
.public-section h2 {
  font-size: 20px;
  color: var(--navy);
}
.public-footer {
  padding: 24px;
  border-top: 1px solid var(--gray-200);
  background: var(--white);
}

/* Link público copiável */
.link-publico-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--r8);
  padding: 8px 12px;
  margin-top: 8px;
}
.link-publico-wrap input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 13px;
  color: var(--gray-600);
  outline: none;
}
.link-publico-wrap button {
  white-space: nowrap;
}

/* Disciplinas disponíveis no dashboard do aluno */
.discovery-section {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--gray-200);
}

@media(max-width: 600px) {
  .public-main { padding: 0 16px 32px; }
  .public-hero h1 { font-size: 22px; }
  .public-header { padding: 12px 16px; }
}
