/* --- GERAL & VARIÁVEIS DE TEMA (MODO CLARO PADRÃO) --- */
:root {
    --primary-color: #1565c0;
    --primary-dark-color: #0d47a1;
    --accent-color: #29b6f6;
    --danger-color: #d32f2f;
    --success-color: #2ecc71;
    --warning-color: #f39c12;
    --background-color: #f4f6f8;
    --surface-color: #ffffff;
    --header-footer-bg: #ffffff;
    --text-color: #212121;
    --text-light-color: #757575;
    --text-on-primary-color: #ffffff;
    --border-color: #e0e0e0;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --border-radius: 12px;
    --border-radius-round: 50%;
    --transition-speed: 0.2s;
}

body.light-purple-mode {
    --primary-color: #9b59b6; /* Roxo principal */
    --primary-dark-color: #8e44ad;
    --accent-color: #be90d4;
    --background-color: #f5eef8; /* Fundo roxo claro */
    --surface-color: #ffffff;
    --header-footer-bg: #ffffff;
    --text-color: #3d2a45; /* Cor de texto escura */
    --text-light-color: #9b59b6;
    --text-on-primary-color: #ffffff;
    --border-color: #e8daef;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

body.dark-purple-mode {
    --primary-color: #bb86fc;         /* Roxo claro para destaque no fundo escuro */
    --primary-dark-color: #a775d9;    /* Um roxo um pouco mais escuro para o hover */
    --accent-color: #d1b1f2;

    /* Cores principais para o tema escuro */
    --background-color: #121212;      /* Fundo quase preto, padrão em dark modes */
    --surface-color: #1e1e1e;         /* Cor das "cartas" e secções, um pouco mais clara */
    
    /* Cores de texto para contraste */
    --text-color: #e0e0e0;            /* Texto principal claro */
    --text-light-color: #9e9e9e;      /* Texto secundário um pouco mais cinzento */
    --text-on-primary-color: #000000;  /* Texto sobre os botões roxos (preto) */
    
    /* Cores de bordas e sombras */
    --border-color: #424242;          /* Borda escura, mas visível */
    --shadow-color: rgba(0, 0, 0, 0.5); /* Sombra mais forte para o modo escuro */
}

/* --- TEMAS ADICIONAIS --- */
body.dark-mode {
    --primary-color: #29b6f6;
    --primary-dark-color: #0288d1;
    --accent-color: #4fc3f7;
    --background-color: #121212;
    --surface-color: #1e1e1e;
    --header-footer-bg: #1e1e1e;
    --text-color: #e0e0e0;
    --text-light-color: #9e9e9e;
    --text-on-primary-color: #000000;
    --border-color: #424242;
    --shadow-color: rgba(0, 0, 0, 0.4);
}

body.dark-warm-mode {
    --primary-color: #ff8a65;
    --primary-dark-color: #e64a19;
    --accent-color: #ffb74d;
    --background-color: #212121;
    --surface-color: #303030;
    --header-footer-bg: #303030;
    --text-color: #f5f5f5;
    --text-light-color: #bdbdbd;
    --text-on-primary-color: #000000;
    --border-color: #515151;
    --shadow-color: rgba(0, 0, 0, 0.5);
}

body.dark-grey-mode {
    --primary-color: #90a4ae;
    --primary-dark-color: #546e7a;
    --accent-color: #b0bec5;
    --background-color: #263238;
    --surface-color: #37474f;
    --header-footer-bg: #37474f;
    --text-color: #eceff1;
    --text-light-color: #b0bec5;
    --text-on-primary-color: #000000;
    --border-color: #546e7a;
    --shadow-color: rgba(0, 0, 0, 0.5);
}

body.light-mode { /* This is the default */
    --primary-color: #1565c0;
    --primary-dark-color: #0d47a1;
    --accent-color: #29b6f6;
    --background-color: #f4f6f8;
    --surface-color: #ffffff;
    --header-footer-bg: #ffffff;
    --text-color: #212121;
    --text-light-color: #757575;
    --text-on-primary-color: #ffffff;
    --border-color: #e0e0e0;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

body.light-blue-mode {
    --primary-color: #03a9f4;
    --primary-dark-color: #0288d1;
    --accent-color: #81d4fa;
    --background-color: #e3f2fd;
    --surface-color: #ffffff;
    --header-footer-bg: #ffffff;
    --text-color: #263238;
    --text-light-color: #546e7a;
    --text-on-primary-color: #ffffff;
    --border-color: #bbdefb;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

body.light-green-mode {
    --primary-color: #4caf50;
    --primary-dark-color: #388e3c;
    --accent-color: #81c784;
    --background-color: #e8f5e9;
    --surface-color: #ffffff;
    --header-footer-bg: #ffffff;
    --text-color: #1b5e20;
    --text-light-color: #4caf50;
    --text-on-primary-color: #ffffff;
    --border-color: #c8e6c9;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

body.light-pink-mode {
    --primary-color: #ec407a;
    --primary-dark-color: #c2185b;
    --accent-color: #f48fb1;
    --background-color: #fce4ec;
    --surface-color: #ffffff;
    --header-footer-bg: #ffffff;
    --text-color: #880e4f;
    --text-light-color: #c2185b;
    --text-on-primary-color: #ffffff;
    --border-color: #f8bbd0;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

body.light-orange-mode {
    --primary-color: #ff9800;
    --primary-dark-color: #f57c00;
    --accent-color: #ffb74d;
    --background-color: #fff3e0;
    --surface-color: #ffffff;
    --header-footer-bg: #ffffff;
    --text-color: #e65100;
    --text-light-color: #f57c00;
    --text-on-primary-color: #ffffff;
    --border-color: #ffe0b2;
    --shadow-color: rgba(0, 0, 0, 0.1);
}


/* --- ESTILOS DE BASE --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-family);
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    overscroll-behavior-y: contain;
}

/* --- LAYOUT PRINCIPAL DA APLICAÇÃO --- */
#app {
    display: flex;
    flex-direction: column;
    height: 100vh;
    max-width: 600px;
    margin: 0 auto;
    background-color: var(--surface-color);
    box-shadow: 0 0 20px var(--shadow-color);
    position: relative;
}

header {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 16px;
    background-color: var(--header-footer-bg);
    border-bottom: 1px solid var(--border-color);
    z-index: 100;
}

main {
    flex-grow: 1;
    position: relative;
    overflow-x: hidden;
}

footer {
    /* Alterações para tornar o rodapé fixo */
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: 600px; /* Para alinhar com a largura do #app */
    margin: 0 auto;   /* Para centrar o rodapé */
    
    /* Estilos existentes */
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
    background-color: var(--header-footer-bg);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -2px 8px var(--shadow-color);
    z-index: 100;
}

/* --- ECRÃS (TELAS) --- */
.screen {
    /* Layout e posicionamento */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    /* Comportamento de rolagem */
    overflow-y: auto;

    /* Espaçamento interno (padding) */
    /* ALTERAÇÃO: Adicionado 90px de padding no fundo para compensar o rodapé fixo */
    padding: 20px 15px 90px 15px;

    /* Animações e outros */
    display: none; /* Escondido por defeito */
    text-align: center;
}

.screen.active {
    /* ALTERAÇÃO: Alterado de 'flex' para 'block' para garantir que a rolagem funcione corretamente */
    display: block; 
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* --- ELEMENTOS DE UI COMUNS --- */
h2, h3, h4 {
    color: var(--primary-color);
    text-align: center;
}

h2 { font-size: 1.5em; }
h3 { font-size: 1.2em; }
h4 { font-size: 1.1em; }

p {
    margin-bottom: 10px;
}

.light-text {
    color: var(--text-light-color);
    font-size: 0.9em;
}

.page-section {
    background-color: var(--surface-color);
    padding: 25px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    text-align: center;
}

.divider {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 15px 0;
}

.screen-header {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-bottom: 10px;
}

.screen-header h2 {
    flex-grow: 0;
    text-align: center;
    margin: 0;
    white-space: nowrap;
}

.button-group-vertical {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 10px;
}


/* --- CABEÇALHO --- */
.header-left, .header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-title-container {
    text-align: center;
    flex-grow: 1;
}

.header-title {
    font-size: 1em;
    font-weight: 600;
    color: var(--text-color);
}

.date-display {
    font-size: 0.8em;
    color: var(--text-light-color);
}

.app-icon-button {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

.app-icon-button .app-icon-img {
    width: 50px;
    height: 50px;
    border-radius: var(--border-radius);
}

/* --- RODAPÉ DE NAVEGAÇÃO --- */
.nav-item, .nav-item-header {
    background: none;
    border: none;
    color: var(--text-light-color);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 0.8em;
    padding: 5px 10px;
    border-radius: var(--border-radius);
    transition: background-color var(--transition-speed), color var(--transition-speed);
}

.nav-item .emoji, .nav-item-header .emoji {
    font-size: 1em;
}

.nav-item:hover {
    background-color: var(--background-color);
}

.nav-item.active {
    color: var(--primary-color);
    font-weight: 600;
}

.nav-item-header {
    color: var(--text-color);
    font-size: 1.6em;
}

.theme-toggle {
    font-size: 1.3em !important;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0 5px;
    color: var(--text-color);
}


/* --- BOTÕES --- */
button, .action-button, .link-button {
    padding: 12px 20px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: background-color var(--transition-speed), transform var(--transition-speed);
    width: 100%;
}

button:active, .action-button:active, .link-button:active {
    transform: scale(0.98);
}

.action-button {
    background-color: var(--primary-color);
    color: var(--text-on-primary-color);
}

.action-button:hover {
    background-color: var(--primary-dark-color);
}

.link-button {
    background-color: transparent;
    color: var(--primary-color);
}

.link-button:hover {
    background-color: var(--background-color);
}

.red-button {
    background-color: var(--danger-color);
    color: #fff;
}

.red-button:hover {
    background-color: #b71c1c;
}

.toggle-button {
    background-color: var(--surface-color);
    color: var(--text-light-color);
    border: 2px solid var(--border-color);
}

.toggle-button.active {
    background-color: var(--success-color);
    color: #fff;
    border-color: var(--success-color);
}

#participated-btn:not(.active) {
    background-color: var(--danger-color);
    color: #fff;
    border-color: var(--danger-color);
}


.screen-header .add-button-container {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}

.add-button-round {
    background-color: var(--primary-color);
    color: var(--text-on-primary-color);
    font-size: 2em;
    width: 50px;
    height: 50px;
    padding: 0;
    line-height: 50px;
    border-radius: var(--border-radius-round);
}

/* --- FORMULÁRIOS & ENTRADAS --- */
input[type="text"],
input[type="password"],
input[type="tel"],
input[type="email"],
input[type="number"],
input[type="date"],
input[type="time"],
select,
textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1em;
    background-color: var(--background-color);
    color: var(--text-color);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(21, 101, 192, 0.2);
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--text-light-color);
    text-align: left;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 100%;
}

.inline-inputs {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.inline-inputs > div {
    flex: 1;
}

.day-checkboxes-aligned {
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    text-align: center;
    width: 100%;
    padding: 10px 0;
}
.day-checkbox-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.day-checkbox-item label {
    font-weight: bold;
    margin-bottom: 0;
}
.day-checkbox-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
}

/* --- TELA DE LOGIN PREMIUM --- */
#login-screen.active, #register-screen.active {
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(145deg, var(--background-color) 0%, #eef2f5 100%);
}

body.dark-mode #login-screen.active, body.dark-mode #register-screen.active {
    background: linear-gradient(145deg, var(--background-color) 0%, #1a1a1a 100%);
}

.login-card {
    background-color: var(--surface-color);
    padding: 40px 30px;
    border-radius: 16px;
    box-shadow: 0 10px 30px var(--shadow-color);
    text-align: center;
    max-width: 380px;
    width: 100%;
    border: 1px solid var(--border-color);
    animation: slideUpFadeIn 0.6s ease-out forwards;
}

@keyframes slideUpFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-logo {
    width: 90px;
    height: 90px;
    border-radius: 25px;
    margin-bottom: 30px;
    box-shadow: 0 4px 10px var(--shadow-color);
}

.login-title {
    font-size: 1.8em;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 8px;
}

.login-tagline {
    font-size: 1em;
    color: var(--text-light-color);
    margin-bottom: 30px;
}

.outline-button {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    transition: all 0.2s ease;
}

.outline-button:hover {
    background-color: var(--primary-color);
    color: var(--text-on-primary-color);
}

/* --- CRONÓMETRO (TIMER) --- */
.timer-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.timer-buttons-container {
    display: flex;
    gap: 10px;
}

#play-timer-btn, #pause-timer-btn, #stop-timer-btn {
    border-radius: 50%;
    width: 50px;
    height: 50px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

#play-timer-btn { background-color: var(--success-color); border: none; }
#pause-timer-btn { background-color: var(--warning-color); color: white; border: none; }
#stop-timer-btn { background-color: var(--danger-color); color: white; border: none; }


.total-display {
    font-size: 2em;
    font-weight: bold;
    color: var(--primary-color);
}

/* --- ESTATÍSTICAS E TOTAIS --- */
.total-stats-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background-color: var(--background-color);
    border-radius: var(--border-radius);
    width: 100%;
}

.total-stats-container.centered-stats { justify-content: center; gap: 8px; }
.total-stats-label { font-weight: bold; margin: 0; }
.total-stats-value { font-size: 1.2em; font-weight: bold; color: var(--primary-color); margin: 0; }

/* --- LISTAS --- */
.styled-list {
    list-style-type: none;
    padding: 0;
    width: 100%;
}

.list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 5px;
    border-bottom: 1px solid var(--border-color);
    width: 100%;
}

.list-item:last-child {
    border-bottom: none;
}

.item-details { flex-grow: 1; text-align: left;}
.item-actions { display: flex; align-items: center; gap: 5px; }


/* --- CALENDÁRIO --- */
.calendar-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 50px;
    margin-bottom: 0px;
    width: 100%;
}

.calendar-controls select {
    border: none;
    background-color: transparent;
    font-size: 1.1em;
    font-weight: 600;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    text-align: center;
    color: var(--text-color);
}

#calendar-swipe-area {
    width: 100%;
    overflow-x: hidden;
    touch-action: pan-y;
}

#calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    text-align: center;
    width: 100%;
}

.calendar-day-header {
    font-weight: bold;
    color: var(--text-light-color);
    padding-bottom: 10px;
    font-size: 0.9em;
}

.calendar-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 4px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    aspect-ratio: 1 / 1.5;
    transition: background-color 0.2s;
    overflow: hidden;
}

.calendar-day:hover { background-color: var(--background-color); }
.calendar-day.current-day { border-color: var(--primary-color); border-width: 2px; }

.day-number {
    font-size: 0.9em;
    font-weight: 600;
    margin-bottom: 2px;
}

.planned-hours {
    font-size: 0.65em;
    color: var(--primary-color);
    font-weight: 700;
    margin-top: 2px;
    line-height: 0.6;
}

.event-icon {
    font-size: 0.8em;
    margin-top: 4px;
}

/* --- MODAIS --- */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s;
}

.modal-content {
    background-color: var(--surface-color);
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideIn 0.3s;
}

.modal-flex-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
    text-align: center;
}

.close-button-modal {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    font-size: 1.8em;
    font-weight: bold;
    color: var(--text-light-color);
    background: none;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    line-height: 32px;
    text-align: center;
    padding: 0;
    transition: background-color 0.2s, color 0.2s;
    z-index: 10;
}
.close-button-modal:hover {
    background-color: var(--background-color);
    color: var(--text-color);
}

.modal-button-group {
    display: flex;
    justify-content: flex-start; /* <-- Alterado para alinhar à esquerda */
    align-items: center; /* Adicionado para um bom alinhamento vertical */
    gap: 10px;
    margin-top: 15px;
}

.modal-button-group.single-button-group { justify-content: center; }

@keyframes slideIn {
    from { transform: translateY(-30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* --- REVISITAS E ESTUDANTES --- */

.actions-toolbar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    width: 100%;
    background-color: var(--background-color);
    padding: 10px;
    border-radius: var(--border-radius);
    margin-top: -10px;
}

.toolbar-button {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    color: var(--text-light-color);
    width: 44px;
    height: 44px;
    border-radius: var(--border-radius-round);
    font-size: 1.5em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
    text-decoration: none;
}

.toolbar-button:hover {
    background-color: var(--primary-color);
    color: var(--text-on-primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.toolbar-button img {
    width: 24px;
    height: 24px;
}

.details-section p { margin-bottom: 5px; text-align: left; }
.checklist-item { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; width: 100%; }
.checklist-item input[type="checkbox"], .checklist-item input[type="date"] { width: auto; }

/* --- RELATÓRIO --- */
.report-selectors { display: flex; gap: 15px; justify-content: center; width: 100%; }
.report-results { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.report-item { padding: 10px; background-color: var(--background-color); border-radius: var(--border-radius); display: flex; justify-content: center; align-items: center; text-align: center; }
.report-item-text { margin: 0; font-size: 1.1em; }
.report-item .value { font-weight: bold; color: var(--primary-color); }

.stylish-whatsapp-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background-color: #00A884;
    margin-top: 20px;
    width: 100%;
}

.stylish-whatsapp-button:hover { background-color: #128C7E; }
.whatsapp-icon-button { width: 24px; height: 24px; }

/* --- TOAST (Notificação) --- */
#toast {
    visibility: hidden;
    min-width: 250px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: var(--border-radius);
    padding: 16px;
    position: fixed;
    z-index: 2000;
    left: 50%;
    transform: translateX(-50%);
    bottom: 90px;
    font-size: 1em;
    opacity: 0;
    transition: all 0.5s;
}

#toast.show {
    visibility: visible;
    opacity: 1;
    bottom: 100px;
}

/* --- RESUMO DIÁRIO --- */
.list-container {
    list-style: none;
    padding: 0;
    width: 100%;
}

.list-container .list-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    padding: 10px;
    background-color: var(--background-color);
    border-radius: var(--border-radius);
    margin-bottom: 10px;
}

.event-today {
    border-left: 4px solid var(--accent-color);
}

/* Correção final e forçada para quebra de linha */
.details-section p, .details-section span {
    white-space: normal !important;
    word-break: break-all !important;
    overflow-wrap: break-word !important;
}

/* Estilo específico para o texto "Meta Mensal" na tela Agenda */
#plan-screen-menu .total-display {
    font-size: 1.1em; /* <-- Agora pode ajustar este valor */
    font-weight: 500;
    color: var(--text-light-color);
    margin-bottom: 0;
}

#plan-screen-menu .total-display span {
    font-weight: bold;
    color: var(--primary-color);
}

.centered-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px; /* Aumentado o espaçamento entre os elementos */
    width: 100%;
}

/* =================================================================== */
/* ANIMAÇÕES DE TRANSIÇÃO DE ECRÃ                                    */
/* =================================================================== */

/* Garante que a animação não cria uma barra de scroll horizontal */
main {
    flex-grow: 1;
    position: relative;
    overflow-x: hidden;
}

/* Animação para o ecrã que entra */
@keyframes slideInFromRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

@keyframes slideInFromLeft {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

/* Animação para o ecrã que sai */
@keyframes slideOutToLeft {
    from { transform: translateX(0); }
    to { transform: translateX(-100%); }
}

@keyframes slideOutToRight {
    from { transform: translateX(0); }
    to { transform: translateX(100%); }
}

/* Classes que vamos usar no JavaScript para aplicar as animações */
.slide-in-from-right { animation: slideInFromRight 0.3s ease-out forwards; }
.slide-in-from-left  { animation: slideInFromLeft 0.3s ease-out forwards; }
.slide-out-to-left   { animation: slideOutToLeft 0.3s ease-out forwards; }
.slide-out-to-right  { animation: slideOutToRight 0.3s ease-out forwards; }

/* Estilo para os botões com contorno na tela de Definições */
#settings-screen-menu .link-button {
    border: 1px solid var(--primary-color);
    background-color: transparent;
    color: var(--primary-color);
    transition: all 0.2s ease-in-out;
}

#settings-screen-menu .link-button:hover {
    background-color: var(--primary-color);
    color: var(--text-on-primary-color);
}

/* Espaçamento vertical específico para os itens na tela de Definições */
#settings-screen-menu .page-section {
    gap: 8px; /* <-- Pode ajustar este valor conforme o seu gosto */
}

/* Estilo para os campos de seleção principais (Definições, Revisitas, Estudantes) */
#settings-profile-select,
#revisit-select,
#student-select {
    color: var(--primary-color);
    font-weight: bold;
    text-align: center;
    border-color: var(--primary-color);
    padding: 12px; /* Adiciona um espaçamento interno para um melhor visual */
}

/* Estilo para a contagem de Revisitas e Estudantes */
#revisits-count,
#students-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 2px;
    margin-left: 8px;
    
    font-size: 0.8em;
    font-weight: bold;
    
    background-color: var(--primary-color); /* Fundo circular com a cor do tema */
    color: var(--text-on-primary-color);    /* Cor do número para contraste (branco) */
    border-radius: 100%;                     /* Transforma em círculo */
}

/* Estilo para a contagem de Revisitas e Estudantes */
#revisits-count,
#students-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 35px;   /* <-- Aumente este valor */
    height: 35px;    /* <-- Aumente este valor para ser igual ao de cima */
    padding: 2px;
    margin-left: 8px;
    
    font-size: 0.8em;
    font-weight: bold;
    
    background-color: var(--primary-color);
    color: var(--text-on-primary-color);
    border-radius: 50%;
}

/* Espaçamento específico para os itens na tela de Registo do Publicador */
#publicador-options.page-section {
    gap: 15px; /* <-- Altere este valor para o espaçamento desejado */
}

/* Estilo para o título "Actividade do Mês" na tela do Publicador */
#publicador-options p {
    font-size: 1.2em;  /* Tamanho maior - pode ajustar este valor */
    font-weight: bold; /* Texto a negrito */
    color: var(--text-color); /* Garante uma boa cor de texto */
}

/* Garante que o NÚMERO de estudos fica na cor do tema */
.total-stats-value {
    font-size: 1.2em;
    font-weight: bold;
    color: var(--primary-color); /* Esta linha define a cor do número */
    margin: 0;
}

/* Estilo para alinhar data, horas e botões na mesma linha */
.item-details-row {
    display: flex;
    align-items: center;
    gap: 20px; /* Espaço entre a data e as horas */
}

.hour-entry-date {
    font-weight: bold;
    color: var(--text-color);
}

.hour-entry-time {
    color: var(--text-light-color);
}

/* Reduz o espaçamento dos botões-ícone de editar/apagar nas listas */
.item-actions .link-button {
    padding: 6px; /* Reduz drasticamente o espaçamento interno */
}

/* --- Estilos Compactos com Fundo para os Botões da Tela Agenda --- */

/* 1. Mantém o layout do contentor na horizontal */
#plan-screen-menu .button-group-vertical {
    flex-direction: row;
    gap: 8px;
}

/* 2. Define o estilo de fundo sólido e o tamanho compacto */
#plan-screen-menu .button-group-vertical .action-button {
    background-color: var(--primary-color);   /* Define o fundo com a cor do tema */
    color: var(--text-on-primary-color);      /* Define o texto para cor de contraste (branco) */
    border: none;                             /* Remove o contorno */
    
    /* Mantém o tamanho compacto */
    padding: 8px 10px;
    font-size: 0.8em;
    font-weight: 600;
    transition: background-color 0.2s ease-in-out;
}

/* 3. Ajusta o botão de apagar (vermelho) */
#plan-screen-menu .button-group-vertical .red-button {
    background-color: var(--danger-color);
    color: var(--text-on-primary-color);
}

/* 4. Efeitos ao passar o rato (hover) para escurecer o fundo */
#plan-screen-menu .button-group-vertical .action-button:hover {
    background-color: var(--primary-dark-color); /* Usa a cor escura do tema no hover */
}

#plan-screen-menu .button-group-vertical .red-button:hover {
    background-color: #b71c1c; /* Um tom de vermelho mais escuro */
}

.modal-button-group .action-button {
    margin-left: auto;  /* A mágica acontece aqui: empurra o botão para a direita */
    order: 2;          /* Garante que ele seja o último item visualmente */
    width: auto;       /* Faz o botão ter a largura do seu conteúdo */
    min-width: 120px;  /* Define uma largura mínima para boa aparência */
}

.modal-button-group.single-button-group .action-button {
    margin-left: initial; /* Remove a margem automática para permitir a centralização */
}