body {
  font-family: Arial, sans-serif;
  background-color: #f5f5f5;
  margin: 0;
  padding: 10px; 
}

/* Only apply centering on login page */
body.login-page {
  display: flex;
  justify-content: center;     /* center horizontally */
  align-items: center;         /* center vertically */
  min-height: 80vh;            /* fill most of screen */
  flex-direction: column;      /* stack children vertically */
  max-width: 100%;   /* image will shrink on small screens */
  height: auto;
}

.login-form {
    width: 90%;          /* takes most of screen on mobile */
    max-width: 350px;    /* won’t exceed 350px on desktop */
    padding: 20px;
    margin: 40px auto;
}

.welcome-card {
    animation: slideFadeIn 1s ease forwards;
}

@keyframes slideFadeIn {
    0% { opacity: 0; transform: translateY(-20px); }
    100% { opacity: 1; transform: translateY(0); }
}

h2 {
  color: #333;
  text-align: center;
  font-size: 2rem;
}

a {
  color: #007BFF;
  text-decoration: none;
}

a:hover {
  text-decoration: none;
}


@keyframes fadeIn {
    from { 
        opacity: 0; 
    }
    to { 
        opacity: 1; 
    }
}

.fade-in {
  opacity: 0; /* start invisible */
  animation: fadeIn 1.5s ease forwards;
  animation-delay: 0.2s; /* optional */
}

.login-form {
  max-width: 350px;      /* Limit form width */
  margin: 40px auto;        /* Center form horizontally */
  text-align: left;      /* Align labels & inputs left */
  background: white;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);

  /* animation */
  animation: fadeIn 1.5s ease forwards;
  animation-delay: 0.5s;
  opacity: 0; /* start invisible */
}


/* Basic reset */
input {
  outline: none;
  border: none;
  font-size: 1rem;
  padding: 12px 8px;
  background: transparent;
  width: 100%;
}


.login-form h2 {
  margin-top: 0;
  margin-bottom: 20px; /* adjust as you want */
}

/* Style form groups */
.form-group {
  position: relative;
  margin: 20px 22px 20px 0px;
  
}

/* Inputs full width inside limited form */
.form-group input {
    width: 100%;
    padding: 10px 0px 10px 18px;
    border: 2px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group select {
  background-color: white;
  width: 100%;
  padding: 12px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 5px;
}

.form-group-disc select {
  background-color: #79baff;
  width: 100%;
  padding: 12px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 5px;
}

/* Floating label effect */
.form-group label {
  position: absolute;
  top: 12px;
  left: 12px;
  color: #999;
  transition: 0.2s ease all;
  background: white;
  padding: 0 4px;
  pointer-events: auto;
}

/* When input focused or has value, move label up */
.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label {
  top: -10px;
  left: 8px;
  font-size: 0.8rem;
  color: #007bff;
  font-weight: bold;
}

/* Input focus styling */
.form-group input:focus {
  border-color: #007bff;
  box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
}

/* Submit button full width */
.login-form input[type="submit"] {
  width: 100%;
  padding: 12px 20px;
  font-size: 1rem;
  border-radius: 5px;
  border: none;
  background-color: #007bff;
  color: white;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.login-form input[type="submit"]:hover {
  background-color: #0056b3;
}

.file-upload label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
}

.file-upload input[type="file"] {
  border: 1px solid #ccc;
  padding: 8px;
  border-radius: 5px;
  background: white;
  width: 100%;
  font-size: 14px;
}

/* Labels for select and file inputs - normal position */
.form-group.no-float label {
  position: static;
  display: block;
  margin-bottom: 6px;
  margin-top: 0px;
  color: #0056b3;
  font-weight: 500;
}

/*TABLES*/

/* Container to center and limit table width */
.table-container {
    max-width: 90%;           /* limit width */
    margin: 40px auto;          /* center horizontally with top/bottom spacing */
    padding: 20px;
    background-color: #ffffff;  /* white background */
    border-radius: 10px;        /* rounded corners */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); /* soft shadow */
}

/* Make table fill container */
.table-container table {
    width: 100%;
    border-collapse: collapse;
    font-family: Arial, sans-serif;
    font-size: 14px;
}

/* Header styling */
.table-container thead tr {
    background-color: #007bff;  /* green header */
    color: white;
    font-weight: bold;
}

/* Table rows */
.table-container tr {
    background-color: rgb(200, 248, 255);
    transition: background-color 0.2s ease;
}

/* Zebra striping */
.table-container tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* Hover effect */
.table-container tr:hover {
    background-color: #e0f7fa;
}

/* Table cells */
.table-container th,
.table-container td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

/* Rounded corners for first/last header cells */
.table-container thead th:first-child {
    border-top-left-radius: 10px;
}
.table-container thead th:last-child {
    border-top-right-radius: 10px;
}

/* === POPUP BLOQUEANTE === */

/* Fundo escuro para bloquear interações abaixo do popup */
#popup-overlay {
    display: none; /* Invisível por padrão */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Fundo escurecido */
    z-index: 999; /* Fica acima de tudo */
    pointer-events: auto; /* Bloqueia cliques no conteúdo abaixo */
}

/* Caixa central do popup */
#popup {
    display: none; /* Invisível até ser ativado */
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 20px;
    width: 380px;
    max-width: 90%;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    z-index: 1000; /* Fica acima do overlay */
    text-align: left;
    font-family: Arial, sans-serif;
}

/* Título do popup */
#popup h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
    text-align: center;
    color: #333;
}

/* Labels */
#popup label {
    display: block;
    margin: 8px 0 5px;
    font-weight: bold;
    font-size: 14px;
    color: #444;
}

/* Campos de input e textarea */
#popup input[type="date"],
#popup input[type="time"],
#popup textarea {
    width: 95%;
    padding: 8px;
    margin-bottom: 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s ease-in-out;
}

#popup input[type="date"]:focus,
#popup input[type="time"]:focus,
#popup textarea:focus {
    border-color: #007bff;
}

#popup .popup-checkbox {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Alinha à esquerda */
    gap: 8px; /* Espaço entre o checkbox e o texto */
    margin: 10px 0;
}

/* Estilo do checkbox */
#popup .popup-checkbox input[type="checkbox"] {
    cursor: pointer;
    width: 18px;
    height: 18px;
    accent-color: #007bff; /* Deixa a cor azul*/
}

/* Botões do popup */
#popup button {
    padding: 8px 15px;
    margin: 5px;
    font-size: 14px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
}

/* Botão Salvar */
#popup-save {
    background-color: #007bff;
    color: white;
}

#popup-save:hover {
    background-color: #0056b3;
}

/* Botão Cancelar */
#popup-close {
    background-color: #e02020;
    color: white;
}

#popup-close:hover {
    background-color: #b51515;
}

/* Botão para abrir o popup */
#open-popup {
    background-color: #28a745;
    color: white;
    padding: 8px 15px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
}

#open-popup:hover {
    background-color: #1e7e34;
}

/* Tables inside any popup */
#popup table,
#popup-tentativas table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 14px;
    font-family: Arial, sans-serif;
}

#popup thead tr,
#popup-tentativas thead tr {
    background-color: #007BFF;
    color: white;
    font-weight: bold;
}

#popup tbody tr,
#popup-tentativas tbody tr {
    background-color: #f9f9f9;
    transition: background-color 0.2s ease;
}

#popup tbody tr:nth-child(even),
#popup-tentativas tbody tr:nth-child(even) {
    background-color: #e0f7fa;
}

#popup tbody tr:hover,
#popup-tentativas tbody tr:hover {
    background-color: #d0eefb;
}

#popup th, #popup td,
#popup-tentativas th, #popup-tentativas td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid #ddd;
    word-break: break-word;
    vertical-align: middle;
}

/* Optional: scroll if table is too tall */
#popup .table-wrapper,
#popup-tentativas .table-wrapper {
    max-height: 300px;
    overflow-y: auto;
}

#popup-tentativas {
    display: none; /* hide by default */
    position: fixed; /* overlay on top of everything */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 20px;
    width: 400px;
    max-width: 90%;
    box-shadow: 0 0 15px rgba(0,0,0,0.3);
    border-radius: 10px;
    z-index: 1000;
    text-align: left;
    font-family: Arial, sans-serif;
}

/* overlay */
#popup-overlay-tentativas {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}


/*POPUPS AVISOS DE CONFIRMAÇÃO*/
/* overlay */
#popup-overlay-aviso {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}

.popup-aviso {
    display: none; /* hide by default */
    position: fixed; /* overlay on top of everything */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 20px;
    width: 400px;
    max-width: 90%;
    box-shadow: 0 0 15px rgba(0,0,0,0.3);
    border-radius: 10px;
    z-index: 1000;
    text-align: left;
    font-family: Arial, sans-serif;
}

.popup-aviso .popup-buttons {
    display: flex;
    justify-content: center;
    gap: 100px;
    margin-top: 15px;
}

.popup-aviso .popup-buttons button {
    padding: 8px 15px;
    border: 1px solid #ccc; /* now border will show */
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s ease-in-out;
}

/* Botão Sim */
.popup-sim {
    background-color: #007bff;
    color: white;
}

.popup-sim:hover {
    background-color: #0056b3;
}

/* Botão Não */
.popup-nao {
    background-color: #e02020;
    color: white;
}

.popup-nao:hover {
    background-color: #b51515;
}




/* Wrapper para organizar o checkbox e o label */
.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 8px; /* espaço entre checkbox e texto */
}

/* Estilo do checkbox */
.checkbox-wrapper input[type="checkbox"] {
    margin-top: 30px;
    cursor: pointer;
    width: 30px;
    height: 30px;
    accent-color: #007bff; /* azul */
}

/* Opcional: aumentar área clicável do label */
.checkbox-wrapper label {
    margin-top: 30px;
    cursor: pointer;
}

/* Dashboard grid */
.dashboard-container {
    display: flex;            /* Use flex layout */
    flex-wrap: wrap;          /* Allow multiple rows */
    gap: 20px;                /* Space between cards */
    justify-content: center;  /* Center cards horizontally */
}

.dashboard-card {
    flex: 0 1 200px;          /* Fixed minimum width, flexible */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;  /* Center content vertically */
    gap: 8px;
    padding: 25px 15px;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    text-align: center;
    text-decoration: none;
    color: #007bff;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    font-size: 2rem;
    opacity: 0;               /* start invisible */
    transform: translateY(20px); /* slide up effect */
    animation: fadeInUp 0.5s forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dashboard-card:nth-child(1) {
    animation-delay: 0.2s;
}
.dashboard-card:nth-child(2) {
    animation-delay: 0.4s;
}
.dashboard-card:nth-child(3) {
    animation-delay: 0.6s;
}
.dashboard-card:nth-child(4) {
    animation-delay: 0.8s;
}
.dashboard-card:nth-child(5) {
    animation-delay: 1s;
}
.dashboard-card:nth-child(6) {
    animation-delay: 1.2s;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
    background-color: #007BFF;
    color: #ffffff;
}

/* Make all cards same height */
.dashboard-card {
    height: 180px; /* adjust as needed */
}


/* Logout card */
.dashboard-card.logout {
    background-color: #ffffff;
    color: #e02020;
}
.dashboard-card.logout:hover {
    background-color: #e02020;
    color: #ffffff;
}

.page-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: Arial, sans-serif;
}

.back-link {
    text-decoration: none;
    color: #007BFF;
    font-weight: 500;
    margin-bottom: 20px;
    display: inline-block;
}

.back-link:hover {
    text-decoration: underline;
}

h2 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
}

/* Student cards */
.student-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    max-width: 100%;
    margin: 20px auto;
}

.student-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    text-decoration: none;
    color: #007BFF;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}

.student-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
    background-color: #007BFF;
    color: #fff;
}

.student-card span {
    font-size: 2rem; /* smaller emoji/icon */
}

.student-info p {
    margin: 0;
}
.student-name {
    font-weight: 600;
    font-size: 1rem; /* smaller */
}
.student-year {
    font-size: 0.85rem;
    color: #555;
}
.student-card:hover .student-year {
    color: #e0f2ff;
}

/* Back link */
.back-link {
    font-size: 0.95rem;
}

/* Media queries for mobile responsiveness */
@media (max-width: 600px) {
    h2 {
        font-size: 1.6rem;
        margin-bottom: 20px;
    }
    .dashboard-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .dashboard-card {
        font-size: 2rem;
        padding: 15px 10px;
    }

    .student-card {
        flex-direction: column;
        align-items: flex-start;
        padding: 12px;
        gap: 5px;
    }

    .student-card span {
        font-size: 1.8rem;
    }

    .student-name {
        font-size: 0.95rem;
    }

    .student-year {
        font-size: 0.8rem;
    }
}
@media (max-width: 600px) {
    body.login-page {
        padding: 10px;           /* less padding on small screens */
    }

    .login-page img {
        max-width: 100%;         /* make logo responsive */
        height: auto;            /* maintain aspect ratio */
    }

    .login-form {
        width: 90%;              /* fit smaller screens */
        max-width: 350px;        /* keep desktop max width */
        padding: 15px;           /* reduce padding */
    }

    .login-form h2 {
        font-size: 1.5rem;       /* smaller heading */
        text-align: center;
    }

    input[type="submit"] {
        font-size: 1rem;         /* ensure button fits */
        padding: 10px 15px;
    }
}
.horario-wrapper {
    display: flex;
    justify-content: center; /* centers the wrapper horizontally */
    align-items: flex-start; /* top-aligned */
    gap: 40px;               /* space between box and image */
}

.horario-info-box {
    background-color: #f9f9f9;      /* light gray background */
    padding: 20px 25px;             /* spacing inside the box */
    border-radius: 12px;            /* rounded corners */
    box-shadow: 0 4px 12px rgba(0,0,0,0.1); /* subtle shadow */
    min-width: 220px;               /* minimum width */
    font-size: 1rem;
    color: #333;
}

.horario-info-box p {
    margin: 8px 0;                  /* spacing between lines */
}

.horario-info-box strong {
    color: #444;                    /* slightly darker for labels */
}

.horario-img {
    max-width: 600px;  
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
@media (max-width: 768px) {
    .horario-wrapper {
        flex-direction: column;
        align-items: center;
    }

    .horario-info-box {
        width: 90%;  /* box takes most of screen */
        text-align: center;
    }

    .horario-img {
        max-width: 100%;
    }
}


.form-container {
    max-width: 500px;
    margin: 30px auto;
    padding: 25px 20px;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    text-align: center;
    font-family: Arial, sans-serif;
}

.form-container h3 {
    margin-bottom: 20px;
    color: #007BFF;
    font-size: 1.8rem;
}

.badge-row h4 {
    margin-top: 20px;
    margin-bottom: 20px;
    font-weight: 500;
    font-size: 1.5rem;
}

.badge-row span#horas-badge {
    background-color: #007BFF;
    color: white;
    padding: 3px 8px;
    border-radius: 8px;
    font-weight: bold;
}

.form-group {
    display: flex;
    flex-direction: column;
    text-align: left;
    margin-bottom: 15px;
}

.form-group label {
    margin-bottom: 6px;
    font-weight: 500;
    color: #333;
}

.form-group select,
.form-group input[type="time"] {
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group select:focus,
.form-group input[type="time"]:focus {
    border-color: #007BFF;
    box-shadow: 0 0 5px rgba(0,123,255,0.3);
    outline: none;
}

.submit-btn {
    width: 100%;
    padding: 12px 0;
    background-color: #007BFF;
    color: white;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.submit-btn:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

/* Responsive for mobile */
@media (max-width: 600px) {
    .form-container {
        padding: 20px 15px;
    }
    .form-container h3 {
        font-size: 1.5rem;
    }
    .form-group select,
    .form-group input[type="time"] {
        font-size: 0.95rem;
    }
    .submit-btn {
        font-size: 0.95rem;
    }
}

.table-container button {
    padding: 6px 12px;
    font-size: 0.85rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

/* Marcar button - green */
.table-container .marcar-btn {
    background-color: #28a745;
    color: white;
}

.table-container .marcar-btn:hover {
    background-color: #218838;
}

.table-container .falta-btn {
    background-color: #e02020;
    color: white;
}

.table-container .falta-btn:hover {
    background-color: #b51515;
}

.table-container .tentativa-btn {
    background-color: rgb(224, 173, 32);
    color: white;
}

.table-container .tentativa-btn:hover {
    background-color: #b59815;
}

/* Remover button - red */
.table-container .remove-btn {
    background-color: #e02020;
    color: white;
}

.table-container .remove-btn:hover {
    background-color: #b51515;
}
