/* style.css */

/* CSS Reset for consistent rendering across browsers */

@font-face {
    font-family: 'Ubuntu';
    font-style: normal;
    font-weight: 400;
    src: local('Ubuntu'), url('Ubuntu-M.ttf') format('truetype');
}

html, body {
    font-family: 'Ubuntu', Arial, sans-serif;
    line-height: 1.0;
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 150vh;
    background-color: #1A202C; /* Dark background */
    color: white; /* Default text color to white */
}

sup {
    vertical-align: super;
    font-size: 14px;
    background: #F431FF;
    background: linear-gradient(to top right, #F431FF 0%, #F40F0F 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

a {
    text-decoration: none;
    position: relative;
    transition: all 0.5s ease-in-out;
    animation-duration: 0.9s;
}

a:hover {
    animation-name: pulse79;
    animation-iteration-count: infinite;
}

a:visited {
    color: #ec4899;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

@keyframes pulse79 {
    0% { transform: scale(1); }
    50% { transform: scale(1.07); }
    100% { transform: scale(1); }
}

@keyframes ripple78 {
    0% { width: 0; height: 0; opacity: 1; }
    100% { width: 200px; height: 200px; opacity: 0; }
}

@keyframes heartbeat116 {
    0%, 100% { width: 100%; }
    50% { width: 60%; }
}

@keyframes expandIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- INÍCIO DA NOVA ANIMAÇÃO --- */
@keyframes fadeOutAndUp {
    0%, 80% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-20px);
    }
}
/* --- FIM DA NOVA ANIMAÇÃO --- */

h2 {
    font-size: 26px;
    margin: 20px 0 30px 0;
    text-align: center;
    color: white;
    padding-left: 20px;
    padding-bottom: 3px;
    background: #F431FF;
    background: linear-gradient(to top right, #F431FF 0%, #F40F0F 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

h3 {
    font-size: 18px;
    margin-top: 10px;
    background: #F431FF;
    background: linear-gradient(to top right, #F431FF 0%, #F40F0F 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.menu {
    padding: 10px 0;
    position: sticky;
    background-color: #1A202C;
    top: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.5);
    z-index: 10;
}

.menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
}

.menu li {
    margin: 0 10px;
}

.menu a {
    background: #F431FF;
    background: linear-gradient(to top right, #F431FF 0%, #F40F0F 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    display: flex;
    align-items: center;
    font-size: 14px;
}

.menu a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.menu .icon {
    width: 10px;
    height: 10px;
    margin-right: 20px;
    margin-bottom: 12px;
}

.menu .home:before {
    content: url("painel.png");
    padding-top: 0;
    margin-left: 5px;
}
.menu .report:before {
    content: url("report.png");
    padding-top: 0;
    margin-left: 5px;
}

.menu .cadastro:before {
    content: url("cadastro.png");
    padding-top: 0;
    margin-left: 5px;
}


.menu .reset:before {
    content: url("reset.png");
    padding-top: 0;
    margin-left: 5px;
}

.menu .logout:before {
    content: url("logout.png");
    padding-top: 0;
    margin-left: 5px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
    height: 80vh;
    display: flex;
    flex-direction: column;
}

.grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    height: 15%;
}

.card {
    height: 205px;
    background-color: #2D3748;
    border: 1px solid #4c5869;
    padding: 5px 7px 16px 7px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.5);
    transition: transform 0.2s ease-in-out;
    margin: 2px;
    opacity: 0;
    animation: expandIn 0.5s ease-out forwards;
}

.status-text {
    display: block;
    margin-bottom: 10px;
    margin-top: -5px;
    padding: 0 0 5px 0;
    text-align: center;
    font-size: 14px;
}

.available { color: #64748b; }
.lunch { color: #50E3C2; }
.short { color: #00D4FF; }
.pre { color: #FFD700; } /* Amarelo para Pre Break */
.short_break { color: #FF69B4; } /* Rosa para Short Break */
.overtime { color: #FF6B6B; }

.timer {
    font-size: 14px;
}

button {
    padding: 8px 5px;
    margin: 5px;
    border: none;
    cursor: pointer;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    font-family: ui-sans-serif, system-ui, sans-serif, Arial, Verdana;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    color: black;
}

button.start-break[data-type="lunch"] {
    padding: 10px 5px 10px 10px;
    width: 110px;
    background-color: #50E3C2;
    background-image: url('lunch.png');
    background-repeat: no-repeat;
    background-size: 20px;
    background-position: 15px center;
}

button.start-break[data-type="lunch"]:hover {
    background-color: #91F2DD;
}

button.start-break[data-type="short"] {
    padding: 10px 15px 10px 30px;
    width: 110px;
    background-color: #00D4FF;
    background-image: url('coffee.png');
    background-repeat: no-repeat;
    background-size: 20px;
    background-position: 10px center;
}

button.start-break[data-type="short"]:hover {
    background-color: #8DE1F2;
}

button.start-break[data-type="pre"] {
    padding: 10px 15px 10px 30px;
    width: 110px;
    background-color: #FFD700;
    background-image: url('pre.png'); /* Substitua por um ícone apropriado */
    background-repeat: no-repeat;
    background-size: 20px;
    background-position: 10px center;
}

button.start-break[data-type="pre"]:hover {
    background-color: #FFEC8B;
}

button.start-break[data-type="short_break"] {
    padding: 10px 15px 10px 30px;
    width: 110px;
    background-color: #FF69B4;
    background-image: url('short_break.png'); /* Substitua por um ícone apropriado */
    background-repeat: no-repeat;
    background-size: 20px;
    background-position: 10px center;
}

button.start-break[data-type="short_break"]:hover {
    background-color: #FF99CC;
}

button.end-break {
    background-color: #E85F5F;
    padding: 10px 15px 10px 30px;
    width: 95px;
    margin-left:10px;
    background-image: url('stop.png');
    background-repeat: no-repeat;
    background-size: 20px;
    background-position: 10px center;
}

button.end-break:hover {
    background-color: #ED8585;
}

.filters {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: 20px;
}

.filters select, .filters input, .filters button {
    border-radius: 5px;
    margin-right: 10px;
    padding: 10px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: #2D3748;
    color: white;
    border: none;
    width: 180px;
}

.filters button {
    background-color: #50E3C2;
    color: #1A202C;
    cursor: pointer;
}

.filters button:hover {
    background-color: #64FFDA;
}

#report-results table {
    width: 100%;
    border-collapse: collapse;
    background-color: #2D3748;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.5);
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

#report-results th, #report-results td {
    border: none;
    padding: 12px 15px 12px 60px;
    text-align: left;
    font-size: 14px;
    font-weight: normal;
}

#report-results th {
    background-color: #50b5c2;
    color: black;
    font-weight: normal;
}

#report-results tr:nth-child(even) {
    background-color: #35445E;
}

.exceeded { color: #db2777; }
.within-limit { color: #50E3C2; }

form {
    max-width: 300px;
    margin: 0 auto;
    background-color: #2D3748;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.5);
    opacity: 0;
    animation: expandIn 0.5s ease-out forwards;
}

form input {
    width: 100%;
    margin: 10px 0;
    padding: 12px;
    border-radius: 5px;
    box-sizing: border-box;
    border: none;
    background-color: #3E4C6A;
    color: white;
}

.enter {
    width: 100%;
    margin: 10px 0;
    padding: 12px;
    border-radius: 6px;
    box-sizing: border-box;
    border: none;
    color: #1A202C;
    background-color: #50E3C2;
    box-shadow: none;
    cursor: pointer;
}

.enter:hover {
    background-color: #64FFDA;
    color: #1A202C;
}

.error {
    color: #FF6B6B;
    text-align: center;
}

.success {
    color: #50E3C2;
    text-align: center;
    margin-bottom: 15px;
}

.remember-container {
    display: flex;
    align-items: center;
    font-size: 14px;
    margin: 8px 0 8px 60px;
    color: #64748b;
    font-weight: 100;
}

.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
    margin-left: 10px;
}

.switch input { display: none; }

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 20px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #50E3C2;
}

input:checked + .slider:before {
    transform: translateX(20px);
}

.error_message {
    color: #FF6B6B;
    vertical-align: middle;
}

.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 4px;
    border: 2px solid #A62B6D;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease-in-out;
}

.menu .profile a {
    display: flex;
    align-items: center;
    color: white;
    font-weight: bold;
}

.menu .profile a:hover .avatar {
    transform: scale(1.1);
}

.profile-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 80vh;
    background-color: #1A202C;
    padding-top: 5px;
    margin-top: 10px;
}

.profile-card {
    background-color: #2D3748;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    text-align: center;
    width: 300px;
    border: 1px solid #4c5869;
    opacity: 0;
    animation: expandIn 0.5s ease-out forwards;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 20px;
    border: 2px solid #A62B6D;
}

.profile-card h2 {
    margin: 0;
    font-size: 24px;
    color: white;
}

.username {
    color: #A0AEC0;
    font-size: 16px;
    margin-top: 8px;
}

/* --- INÍCIO: Estilos para a seção de Preferências no Perfil --- */

.feedback {
    margin-bottom: 25px;
    margin-top: -20px;
    font-size: 16px;
    font-weight: 500;
}

.feedback.success {
    background: #F431FF;
    background: linear-gradient(to top right, #F431FF 0%, #F40F0F 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: center;
    
    /* Aplica a animação */
    animation: fadeOutAndUp 4s ease-out forwards;
}

.profile-card hr {
    border: none;
    border-top: 1px solid #4c5869;
    margin: 25px 0;
}

.preferences {
    text-align: left;
}

.preferences h4 {
    font-size: 16px;
    margin-bottom: 15px;
    color: white;
    text-align: center;
}

.preferences label {
    display: block;
    font-size: 14px;
    color: #A0AEC0;
    margin-bottom: 8px;
}

.preferences select {
    width: 100%;
    padding: 12px;
    border-radius: 5px;
    box-sizing: border-box;
    border: none;
    background-color: #3E4C6A;
    color: white;
    font-size: 14px;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23A0AEC0%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.4-12.8z%22%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: .65em auto;
}

.preferences button.enter {
    margin-top: 15px;
}

/* --- FIM: Estilos para a seção de Preferências no Perfil --- */

.form-container {
    margin-top: 50px;
}

.pagination {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
}

.pagination button {
    padding: 5px 10px 30px;
    cursor: pointer;
    background-color: #2D3748;
    color: white;
    border: none;
    border-radius: 5px;
}

.pagination button:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.pagination-controls {
    margin-top: 30px;
    margin-bottom: 70px;
    display: flex;
    justify-content: center;
}

.pagination-button {
    background-color: #50E3C2;
    color: black;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.pagination-button:disabled {
    background-color: #ededed;
    color: #dbdbdb;
    cursor: not-allowed;
}

.pagination-button:hover:not(:disabled) {
    background-color: #64FFDA;
}

.pagination-info {
    font-weight: 300;
    font-size: 14px;
    color: white;
}

.footer {
    background-color: #1A202C;
    color: #64748b;
    text-align: center;
    padding: 20px 0px;
    font-size: 14px;
    box-shadow: 0 -4px 8px rgba(0, 0, 0, 0.5);
    position: fixed;
    bottom: 0;
    width: 100%;
}

.footer a {
    background: #F431FF;
    background: linear-gradient(to top right, #F431FF 0%, #F40F0F 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

@media (max-width: 768px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .menu ul {
        flex-direction: column;
    }
    .menu li {
        margin: 5px 0;
    }
    .filters {
        flex-direction: column;
        align-items: flex-start;
    }
    .filters select, .filters input, .filters button {
        margin: 5px 0;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .grid {
        grid-template-columns: 1fr;
    }
    form {
        width: 95%;
    }
}

.notification-popup {
    position: fixed;
    bottom: 80px;
    right: 30px;
    background-color: #0B0E1A;
    color: white;
    padding: 16px 20px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.6);
    animation: fadeInUp 0.4s ease, fadeOut 0.4s ease 3s;
    opacity: 0;
    z-index: 1000;
    max-width: 300px;
    font-size: 14px;
    background: #F431FF;
    background: linear-gradient(to top right, #F431FF 0%, #F40F0F 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.notification-popup.show {
    opacity: 1;
}

.notification-popup strong {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
}

@keyframes fadeOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(20px); }
}

.add-changelog-section {
    border: 1px solid #4c5869;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 30px;
}

.add-changelog-section h3 {
    margin-top: 0;
    color: #333;
    border-bottom: 1px solid #4c5869;
    padding-bottom: 10px;
}

.changelog-list {
    margin-top: 30px;
    padding-top: 20px;
}

#changelog-results table {
    width: 100%;
    border-collapse: collapse;
    background-color: #2D3748;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.5);
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

#changelog-results th, #changelog-results td {
    border: none;
    padding: 12px 15px 12px 60px;
    text-align: left;
    font-size: 14px;
    font-weight: normal;
    color: white;
}

#changelog-results th {
    background-color: #50b5c2;
    color: black;
    font-weight: normal;
}

#changelog-results tr:nth-child(even) {
    background-color: #35445E;
}

#changelog-results tr:hover {
    background-color: #4A5568;
}

.description-cell {
    max-width: 300px;
    word-wrap: break-word;
    line-height: 1.4;
}

.type-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: bold;
    text-transform: uppercase;
    display: inline-block;
}

.type-feature {
    background: #48BB78;
    color: white;
}

.type-bugfix {
    background: #F56565;
    color: white;
}

.type-improvement {
    background: #4299E1;
    color: white;
}

.type-security {
    background: #ECC94B;
    color: #2D3748;
}

.type-breaking {
    background: #ED8936;
    color: white;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

textarea {
    width: 92%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    min-height: 40px;
    margin-bottom: 10px;
}

select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    background: white;
    cursor: pointer;
}

select:focus {
    outline: none;
    border-color: #007bff;
}

@media (max-width: 768px) {
    .changelog-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .version, .date, .type {
        margin-bottom: 5px;
    }
}


/* --- INÍCIO: Estilos para o cabeçalho sanfona (toggle) --- */
.toggle-header {
    cursor: pointer;
    user-select: none; /* Previne a seleção de texto ao clicar */
    display: flex;
    /* justify-content: space-between; foi removido para alinhar à esquerda */
    align-items: center;
}

.toggle-header::before { /* Alterado de ::after para ::before */
    content: '[ + ]';
    font-size: 16px;
    background: #F431FF;
    background: linear-gradient(to top right, #F431FF 0%, #F40F0F 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-right: 15px; /* Ajusta o espaço entre o ícone e o texto */
}

.toggle-header.expanded::before { /* Alterado de ::after para ::before */
    content: '[ - ]';
}
/* --- FIM: Estilos para o cabeçalho sanfona (toggle) --- */

/* --- INÍCIO: Animação Sanfona (Accordion) --- */

/* Ajuste na seção principal para controlar o espaçamento corretamente */
.add-changelog-section {
    border: 1px solid #4c5869;
    border-radius: 6px;
    padding: 20px; /* Mantém o espaçamento lateral e superior */
    padding-bottom: 0; /* Removemos o espaçamento inferior que será animado */
    margin-bottom: 30px;
}

/* Garante que o cabeçalho ainda tenha um espaçamento inferior quando o form estiver fechado */
.toggle-header {
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    padding-bottom: 20px; /* Adiciona o espaçamento aqui */
}

/* Nova classe para o container que será animado */
.collapsible {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-in-out;
}

/* Quando o container estiver expandido, definimos uma altura máxima e o espaçamento */
.collapsible.expanded {
    max-height: 600px; /* Um valor alto o suficiente para o seu formulário */
    padding-bottom: 20px; /* Adiciona o espaçamento inferior de volta */
    transition: max-height 0.5s ease-in-out, padding-bottom 0.5s ease-in-out;
}

/* --- FIM: Animação Sanfona (Accordion) --- */
