/* Variáveis de cores */
:root {
    --primary-color: #4CAF50;
    --secondary-color: #2196F3;
    --danger-color: #f44336;
    --success-color: #4CAF50;
    --warning-color: #ff9800;
    --info-color: #2196F3;
    --light-gray: #f5f5f5;
    --dark-gray: #333;
    --white: #fff;
    --black: #000;
    --gradient-start: #4CAF50;
    --gradient-end: #66BB6A;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #f5f5f5, #ffffff);
    color: #777;
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Navbar */
.navbar {
    background: linear-gradient(135deg, #ffffff, #f5f5f5);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    padding: 1.5rem 0;
    border-radius: 10px;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.navbar-brand img {
    height: 40px;
    width: auto;
}

.nav-link {
    color: #333 !important;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-link:hover {
    color: var(--primary-color) !important;
    transform: translateY(-2px);
}

/* Cards */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.2));
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.card-img-top {
    border-radius: 15px 15px 0 0;
    transition: transform 0.3s ease;
}

.card:hover .card-img-top {
    transform: scale(1.02);
}

.card-body {
    padding: 2rem;
}

/* Buttons */
.btn {
    padding: 1rem 2rem;
    border-radius: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 1.1rem;
    height: 100%;
    justify-content: center;
    align-items: center;
    display: flex;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--gradient-end));
    border: none;
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(76, 175, 80, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, #FFD700, #FFA000);
    border: none;
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.3);
}

.btn-warning:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(255, 215, 0, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #98FB98, #66CDAA);
    border: none;
    box-shadow: 0 5px 15px rgba(152, 251, 152, 0.3);
}

.btn-success:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(152, 251, 152, 0.4);
}

.btn-info {
    background: linear-gradient(135deg, #FFB6C1, #FF69B4);
    border: none;
    box-shadow: 0 5px 15px rgba(255, 182, 193, 0.3);
}

.btn-info:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(255, 182, 193, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    border: none;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #5a6268, #4a5258);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

/* Forms */
.form-control {
    border-radius: 10px;
    padding: 1rem;
    border: 1px solid var(--light-gray);
    transition: all 0.3s ease;
    background: white;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(76, 175, 80, 0.25);
    transform: scale(1.02);
}

/* Alerts */
.alert {
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    background: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.alert-success {
    background: linear-gradient(135deg, #d4edda, #c8e6c9);
    border-color: #c3e6cb;
    color: #155724;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    border-color: #f5c6cb;
    color: #721c24;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #333, #222);
    color: #fff;
    padding: 3rem 0;
    margin-top: 3rem;
    border-radius: 15px 15px 0 0;
}

.footer a {
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.footer a:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* Custom styles */
.activity-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--gradient-end));
    color: white;
    border: none;
    padding: 1.25rem 2.5rem;
    border-radius: 30px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.3);
    transition: all 0.3s ease;
}

.activity-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(76, 175, 80, 0.4);
}

.progresso-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    padding-top: 8px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    min-height: 400px;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.progress-chart {
    height: 350px;
    margin-top: 2rem;
}

/* ===== Progresso ===== */
.progresso-grid {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) 420px; /* esquerda cresce, direita fixa */
  gap: 1.6rem;
  align-items: center;           /* centraliza VERTICALMENTE os itens na linha */
}
@media (max-width: 900px) {
  .progresso-grid{
    grid-template-columns: 1fr;
    justify-items: center;
  }
  .donut-wrap, .card-metrica{
    justify-self: center;
    max-width: 520px;
  }
}

.card-metrica {
  background:#fafafa;
  border:1px solid #eee;
  border-radius:16px;
  padding:1rem 1.25rem;
  box-shadow:0 6px 22px rgba(0,0,0,.05);
  width:100%;
  max-width:420px;
  justify-self: center;          /* centraliza DENTRO da coluna direita */
  text-align: center;
}
.card-metrica h4 {
  margin:0 0 .75rem; 
  font-size:1.05rem; 
  color:#374151;
}
.card-metrica .grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(140px,1fr));
  gap: .75rem;
}
.card-metrica .item {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: .9rem;
  text-align: center;
}
.card-metrica .item strong {
  display: block;
  margin-bottom: .25rem;
  color: #111827;
}

/* Donut container */
.donut-wrap {
  background:#fff;
  border:1px solid #eee;
  border-radius:16px;
  padding:1rem;
  box-shadow:0 6px 22px rgba(0,0,0,.05);
  max-width: 560px;
  width: 100%;
  justify-self: end;             /* termina encostado perto do resumo */
}

.donut-wrap > div{ height: 320px; }  /* era 360px */

/* Painel de Atividades */
.painel-atividades {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    padding-top: 1.25rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    margin-top: 0.4rem;
    border: 1px solid var(--light-gray);
}

.painel-atividades > h3{ margin-top: .25rem; }

/* Botões de Atividade */
.btn-atividade {
    width: 100%;
    height: 120px;
    border-radius: 15px;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-atividade::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-atividade:hover::before {
    opacity: 1;
}

.btn-atividade:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Cores das Atividades */
.btn-quebra-cabeca {
    background: linear-gradient(135deg, #87CEEB, #6495ED);
    color: white;
}

.btn-pintura {
    background: linear-gradient(135deg, #FFD700, #FFA000);
    color: #333;
}

.btn-memoria {
    background: linear-gradient(135deg, #98FB98, #66CDAA);
    color: white;
}

.btn-caca-palavras {
    background: linear-gradient(135deg, #FFB6C1, #FF69B4);
    color: white;
}

/* Nome da Criança */
.nome-crianca.wrapper {
    display: flex;
    min-height: 100vh;
    background-color: #f8f9fa;
    overflow-x: hidden;
}

.content {
    flex: 1;
    padding: 2rem;
    margin-left: 250px;
    transition: margin-left 0.3s ease;
}

.sidebar {
    width: 250px;
    background: linear-gradient(135deg, #f5f5f5, #ffffff);
    padding: 1rem;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1000;
    overflow-y: auto;
}

.sidebar-collapsed {
    width: 70px;
}

.sidebar-header {
    text-align: center;
    padding: 1.5rem;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--gradient-end));
    color: white;
    border-radius: 10px;
}

/* Ajuste fino do tamanho da logo na sidebar (Progresso) */
.sidebar-header img {
  width: 55px !important;
  height: 55px !important;
  margin-bottom: 0.75rem;
}


.sidebar-header h2 {
    font-size: 1.5rem;
    color: white;
    margin: 0;
    font-weight: 600;
}

.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-item {
    margin-bottom: 0.5rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: #333;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s ease;
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.sidebar-link:hover {
    background: rgba(76, 175, 80, 0.1);
    color: var(--primary-color);
    transform: translateX(5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.sidebar-link i {
    margin-right: 1rem;
    font-size: 1.2rem;
}

.sidebar-link.active {
    background: rgba(76, 175, 80, 0.2);
    color: var(--primary-color);
    box-shadow: 0 4px 8px rgba(76, 175, 80, 0.2);
}

.sidebar-toggle {
    position: fixed;
    top: 1rem;
    right: 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: 50%;
    cursor: pointer;
    z-index: 1001;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    display: none;
}

.nome-crianca {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nome-crianca img {
    height: 60px;
    width: auto;
    margin-right: 1rem;
}

/* Botão de Sair */
.btn-sair {
    background: linear-gradient(135deg, #F44336, #E53935);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.btn-sair:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(244, 67, 54, 0.3);
}

/* Modal */
.modal-content {
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: none;
}

/* Feedback */
.feedback-sucesso {
    background: linear-gradient(135deg, #d4edda, #c8e6c9);
    color: #155724;
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    text-align: center;
    font-weight: 600;
    box-shadow: 0 5px 15px rgba(21, 87, 36, 0.1);
}

.tabs-container {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 1rem 0 0.5rem;
}

/* Centraliza e destaca o título “Progresso de [nome]” */
.titulo-progresso {
  color: #374151;           /* cinza escuro elegante */
  font-weight: 700;
  font-size: 2rem;
  text-align: center;
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.tab-btn {
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 0.6rem 1.2rem;
  font-size: 1rem;
  font-weight: 600;
  color: #0f172a;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}

.metricas {
  display: grid;
  grid-template-columns: repeat(2,1fr);
  gap: 1rem;
  text-align: center;
  margin-bottom: 1.5rem;
}

/* Responsividade */
@media (max-width: 768px) {
    .wrapper {
        position: relative;
    }
    
    .sidebar {
        position: fixed;
        top: 0;
        left: -250px;
        width: 250px;
        height: 100vh;
        transition: left 0.3s ease;
        z-index: 1000;
    }
    
    .sidebar.active {
        left: 0;
    }
    
    .sidebar-toggle {
        display: block;
        position: fixed;
        top: 1rem;
        right: 1rem;
        z-index: 1001;
    }
    
    .content {
        margin-left: 0;
        width: 100%;
        padding: 1rem;
        transition: margin-left 0.3s ease;
    }
    
    .content.active {
        margin-left: 250px;
    }
    
    .nome-crianca {
        font-size: 2rem;
    }
    
    .painel-atividades {
        padding: 2rem 1rem;
    }
}
