:root {
  --bg-color: #0d1117;
  --bg-surface: #161b22;
  --bg-surface-elevated: #21262d;
  --text-primary: #e6edf3;
  --text-secondary: #848d97;
  --accent-primary: #58a6ff;
  --accent-hover: #3182ce;
  --accent-danger: #f85149;
  --accent-success: #2ea043;
  --border-color: #30363d;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  
  /* Gradientes premium */
  --bg-gradient: linear-gradient(135deg, #0d1117 0%, #161b22 100%);
  --glow: 0 0 20px rgba(88, 166, 255, 0.15);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-color);
  background: var(--bg-gradient);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
}

/* Base Layout (APP) */
#app {
  display: flex;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

/* Nav & Sidebar */
.sidebar {
  width: 260px;
  background-color: var(--bg-surface);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  transition: all 0.3s;
}

.sidebar .logo {
  display: flex;
  align-items: center;
  margin-bottom: 40px;
  padding: 0 8px;
}

/* App Logo Styles */
.app-logo {
  object-fit: contain;
  display: block;
  mix-blend-mode: normal;
}
.login-logo {
  width: 100%;
  max-width: 180px; 
  height: auto;
  margin: 0 auto;
  filter: drop-shadow(0 0 10px rgba(0,0,0,0.5));
}
.sidebar-logo {
  width: 100%;
  max-width: 160px;
  height: auto;
  margin: 0 auto;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.3));
}
.mobile-logo {
  height: 40px;
  width: auto;
  max-width: 200px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}
.sidebar .logo i {
  font-size: 28px;
  color: var(--accent-primary);
  filter: drop-shadow(0 0 8px rgba(88, 166, 255, 0.4));
}
.sidebar .logo h2 {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.nav-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-links li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-links li:hover {
  background-color: rgba(255,255,255,0.05);
  color: var(--text-primary);
}

.nav-links li.active {
  background-color: var(--accent-primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(88, 166, 255, 0.3);
}

.nav-links li i {
  font-size: 20px;
}

/* Bottom Nav para Mobile */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: rgba(22, 27, 34, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-color);
  justify-content: space-around;
  padding: 12px 0;
  z-index: 100;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
}

.bottom-nav .nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-secondary);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
}

.bottom-nav .nav-item i {
  font-size: 24px;
}

.bottom-nav .nav-item.active {
  color: var(--accent-primary);
}

/* Área Principal */
#main-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding-bottom: 2rem;
}

.mobile-header {
  display: none;
  padding: 20px;
  background: rgba(13, 17, 23, 0.9);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 90;
  border-bottom: 1px solid var(--border-color);
}
.mobile-header h2 {
  font-size: 1.2rem;
  font-weight: 600;
}

#view-content {
  padding: 32px;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  animation: fadeIn 0.4s ease-out;
}

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

/* Responsividade Mobile */
@media (max-width: 768px) {
  .sidebar { display: none; }
  .bottom-nav { display: flex; }
  .mobile-header { display: block; }
  #view-content { padding: 20px; padding-bottom: 80px; }
}

/* Componentes Genéricos: Cards */
.card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}

/* Glassmorphism Classes */
.glass {
  background: rgba(33, 38, 45, 0.6);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.08);
}

.card:hover {
  border-color: rgba(88, 166, 255, 0.3);
  box-shadow: var(--glow);
}

.card-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Grid Layoouts */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
@media (max-width: 768px) {
  .grid-2 { grid-template-columns: 1fr; }
}

/* Typografia e Labels */
.text-muted { color: var(--text-secondary); font-size: 0.9rem; }
.badge {
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.badge.success { background-color: rgba(46, 160, 67, 0.15); color: var(--accent-success); border: 1px solid rgba(46, 160, 67, 0.3); }
.badge.danger { background-color: rgba(248, 81, 73, 0.15); color: var(--accent-danger); border: 1px solid rgba(248, 81, 73, 0.3); }
.badge.info { background-color: rgba(88, 166, 255, 0.15); color: var(--accent-primary); border: 1px solid rgba(88, 166, 255, 0.3); }

/* Buttons */
.btn {
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}
.btn:hover { background-color: var(--border-color); }
.btn-primary {
  background-color: var(--accent-primary);
  color: #fff;
  border: none;
}
.btn-primary:hover {
  background-color: var(--accent-hover);
  box-shadow: 0 4px 12px rgba(88, 166, 255, 0.4);
  transform: translateY(-1px);
}
.btn-danger {
  background-color: var(--accent-danger);
  color: #fff;
  border: none;
}

/* Inputs */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}
.input-group label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}
.input-group input, .input-group select {
  background-color: #010409;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 12px;
  border-radius: var(--radius-md);
  font-family: 'Inter', sans-serif;
  transition: border-color 0.2s;
}
.input-group input:focus, .input-group select:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px rgba(88, 166, 255, 0.2);
}

/* Modals */
.hidden { display: none !important; }
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}
.modal-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 500px;
  padding: 24px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
  animation: zoomIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes zoomIn {
  0% { transform: scale(0.9); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.modal-header.sticky {
  position: sticky;
  top: 0;
  background: var(--bg-surface);
  z-index: 10;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
  margin-left: -24px;
  margin-right: -24px;
  margin-top: -24px;
  padding: 24px 24px 10px 24px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.modal-header h3 { font-size: 1.2rem; }
.modal-close {
  background: none; border: none; color: var(--text-secondary); cursor: pointer;
  font-size: 24px; transition: color 0.2s;
}
.modal-close:hover { color: var(--accent-danger); }

/* Repertoire Pre tag format (Visualizador da Cifra) */
.cifra-viewer {
  background: #010409;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  overflow-x: auto;
  overflow-y: auto;
  max-height: 65vh;
  white-space: pre-wrap; /* Mágica para não perder a arrumação de espaços e enters originais da cifra. */
  word-wrap: break-word; /* Para não bugar responsividade no mobile */
  font-family: 'Courier New', Courier, monospace;
  font-size: 14px;
  line-height: 1.5;
  color: #c9d1d9; /* Cor da letra */
  margin-top: 10px;
}
.cifra-viewer b {
  color: var(--accent-primary); /* Cor do acorde - Azul da marca Bola Plan */
  font-weight: bold;
}

/* Utility */
.mb-4 { margin-bottom: 1rem; }
.mt-4 { margin-top: 1rem; }
.flex-row { display: flex; align-items: center; gap: 8px; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }

/* Controles de Transposição (Cifra) */
.cifra-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  background: rgba(33, 38, 45, 0.4);
  padding: 8px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  justify-content: center;
}
.cifra-controls .btn {
  padding: 6px 12px;
  font-size: 0.85rem;
}

/* Dashboard Calendar Row */
.date-row {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 12px;
}
.date-box {
  background: rgba(33, 38, 45, 0.4);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 20px;
  text-align: center;
  min-width: 80px;
  cursor: pointer;
}
.date-box.active {
  background: rgba(88, 166, 255, 0.1);
  border-color: var(--accent-primary);
}
.date-box .day { font-size: 1.5rem; font-weight: 700; color: var(--text-primary); }
.date-box .month { font-size: 0.8rem; color: var(--accent-primary); font-weight: 600; text-transform: uppercase; }

/* List Row */
.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  border-bottom: 1px solid var(--border-color);
  transition: background 0.2s;
}
.list-row:last-child { border-bottom: none; }

/* Login View */
.login-wrapper {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  background: var(--bg-gradient);
}
.login-box {
  width: 90%;
  max-width: 400px;
  padding: 40px 32px;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}
