/* ============================================
   Estúdio Acadêmico — Design Tokens
   Fonte: DESIGN.md v1.0
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,300..800;1,6..72,300..800&family=Inter:wght@400;500;600&display=swap');

:root {
  /* --- Superfícies --- */
  --surface:               #FCF9F3;
  --surface-low:           #F6F3ED;
  --surface-high:          #EBE8E2;
  --surface-white:         #FFFFFF;

  /* --- Tinta & Autoridade --- */
  --primary:               #041525;
  --primary-navy:          #1A2A3A;
  --shadow-tint:           rgba(28, 28, 24, 0.06);

  /* --- Ouro & Destaque --- */
  --gold-highlight:        rgba(212, 175, 55, 0.30);
  --gold-amber:            #735C00;
  --gold-leaf:             #FED65B;
  --gold-bright:           #D4AF37;

  /* --- Tipografia --- */
  --font-academic:         'Newsreader', Georgia, serif;
  --font-precision:        'Inter', system-ui, sans-serif;

  --text-display:          3.5rem;
  --text-headline:         1.75rem;
  --text-body:             1.0rem;
  --text-label:            0.75rem;
  --text-label-sm:         0.65rem;

  /* --- Raios --- */
  --radius-none:           0px;
  --radius-btn:            4px;
  --radius-player:         12px;

  /* --- Espaçamento --- */
  --space-1:               4px;
  --space-2:               8px;
  --space-3:               16px;
  --space-4:               24px;
  --space-5:               48px;
  --space-6:               80px;

  /* --- Layout --- */
  --sidebar-width:         240px;
  --meta-width:            200px;
  --canvas-max:            720px;

  /* --- Transições --- */
  --transition-fast:       150ms ease;
  --transition-base:       250ms ease;

  /* --- Sombra Ambiente --- */
  --shadow-ambient:        0 8px 32px -4px rgba(28, 28, 24, 0.06);

  /* --- Glassmorphism (player Focus View) --- */
  --glass-bg:              rgba(252, 249, 243, 0.85);
  --glass-blur:            blur(16px);
  --glass-border:          1px solid rgba(196, 198, 204, 0.15);
}

/* ============================================
   Reset & Base
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--surface);
  color: var(--primary);
  font-family: var(--font-academic);
  font-size: var(--text-body);
  line-height: 1.8;
}

/* ============================================
   Tipografia Base
   ============================================ */
.display-lg {
  font-family: var(--font-academic);
  font-size: var(--text-display);
  font-weight: 400;
  line-height: 1.15;
}

.headline-md {
  font-family: var(--font-academic);
  font-size: var(--text-headline);
  font-weight: 500;
  line-height: 1.3;
}

.body-lg {
  font-family: var(--font-academic);
  font-size: var(--text-body);
  font-weight: 400;
  line-height: 1.8;
}

.label-md {
  font-family: var(--font-precision);
  font-size: var(--text-label);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.label-sm {
  font-family: var(--font-precision);
  font-size: var(--text-label-sm);
  font-weight: 400;
  letter-spacing: 0.04em;
}

/* ============================================
   Botões
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-family: var(--font-precision);
  font-size: var(--text-label);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: none;
  cursor: pointer;
  padding: 10px 20px;
  border-radius: var(--radius-btn);
  transition: opacity var(--transition-fast);
  text-decoration: none;
}

.btn:hover { opacity: 0.80; }
.btn:active { opacity: 0.70; }

.btn-primary {
  background: var(--primary);
  color: var(--surface-white);
}

.btn-secondary {
  background: var(--gold-leaf);
  color: var(--primary);
}

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

.btn-outline:hover {
  background: var(--surface-high);
  opacity: 1;
}

/* ============================================
   Navbar
   ============================================ */
.navbar {
  background: var(--surface);
  padding: 0 var(--space-5);
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: none;
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--primary);
  text-decoration: none;
  min-width: 0;
}

.navbar-brand-mark {
  width: auto;
  height: 42px;
  max-width: 56px;
  object-fit: contain;
  flex-shrink: 0;
}

.navbar-brand-text {
  font-family: var(--font-academic);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--primary);
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  list-style: none;
}

.navbar-nav a {
  font-family: var(--font-precision);
  font-size: var(--text-label);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  text-decoration: none;
  opacity: 0.6;
  transition: opacity var(--transition-fast);
}

.navbar-nav a:hover,
.navbar-nav a.active { opacity: 1; }

.navbar-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.navbar-logout-form {
  display: inline-flex;
  align-items: center;
}

.navbar-logout-form .btn {
  padding-inline: 16px;
}

.language-picker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.language-picker-label {
  font-family: var(--font-precision);
  font-size: var(--text-label-sm);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  opacity: 0.6;
}

.language-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  min-width: 92px;
  padding: 9px 34px 9px 12px;
  border: 1px solid rgba(4, 21, 37, 0.12);
  border-radius: 999px;
  background:
    linear-gradient(45deg, transparent 50%, var(--primary) 50%) calc(100% - 18px) calc(50% - 2px) / 6px 6px no-repeat,
    linear-gradient(135deg, var(--primary) 50%, transparent 50%) calc(100% - 13px) calc(50% - 2px) / 6px 6px no-repeat,
    var(--surface-white);
  color: var(--primary);
  font-family: var(--font-precision);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.language-select:focus {
  outline: none;
  border-color: rgba(4, 21, 37, 0.35);
  box-shadow: 0 0 0 3px rgba(4, 21, 37, 0.08);
}

/* ============================================
   Sidebar
   ============================================ */
.sidebar {
  width: var(--sidebar-width);
  background: var(--surface-low);
  height: calc(100vh - 56px);
  position: sticky;
  top: 56px;
  overflow-y: auto;
  flex-shrink: 0;
  padding: var(--space-4) 0;
}

.sidebar-nav {
  list-style: none;
}

.sidebar-nav li a {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 10px var(--space-4);
  font-family: var(--font-precision);
  font-size: var(--text-label);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary);
  text-decoration: none;
  opacity: 0.55;
  transition: opacity var(--transition-fast), background var(--transition-fast);
  border-left: 2px solid transparent;
}

.sidebar-nav li a:hover { opacity: 0.85; }

.sidebar-nav li a.active {
  opacity: 1;
  background: var(--surface-high);
  border-left-color: var(--gold-amber);
}

/* ============================================
   Layout Principal
   ============================================ */
.app-layout {
  display: flex;
  min-height: calc(100vh - 56px);
}

.main-content {
  flex: 1;
  padding: var(--space-5);
  min-width: 0;
}

@media (max-width: 860px) {
  .navbar {
    padding: 0 var(--space-3);
    gap: var(--space-2);
    flex-wrap: wrap;
    height: auto;
    min-height: 56px;
  }

  .navbar-nav {
    gap: var(--space-2);
  }

  .navbar-actions {
    width: 100%;
    justify-content: flex-end;
    padding-bottom: var(--space-2);
  }

  .navbar-brand {
    gap: 10px;
  }

  .navbar-brand-mark {
    height: 36px;
    max-width: 48px;
  }

  .navbar-brand-text {
    font-size: 1rem;
  }
}
