/* Reset some default styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* General styles */
body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
    display: flex;
    min-height: 100vh;
    overflow-y: auto; /* Allow vertical scrolling */
}

/* Sidebar styles */
.sidebar {
    width: 250px;
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 20px;
    height: 100vh;
    position: fixed;
    display: flex;
    flex-direction: column;
    align-items: center;
    top: 0;
    left: 0;
}

.sidebar h2 {
    margin-bottom: 20px;
    text-align: center;
}

.sidebar ul {
    list-style-type: none;
    padding: 0;
    width: 100%;
    text-align: center;
}

.sidebar ul li {
    margin-bottom: 10px;
}

.sidebar ul li a {
    color: #ecf0f1;
    text-decoration: none;
    display: block;
    padding: 10px;
    border-radius: 4px;
}

.sidebar ul li a.active,
.sidebar ul li a:hover {
    background-color: #34495e;
}

/* Main content styles for other pages */
.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column; /* Stacks form and results vertically */
    align-items: center;
    justify-content: flex-start; /* Align items at the top */
    padding-left: 270px; /* Offset by the sidebar width */
    padding-top: 20px;
    width: 100%;
    box-sizing: border-box;
    overflow: visible; /* Ensure content is visible and can overflow */
}

/* Container for centralizing content */
.container {
    max-width: 400px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px; /* Space between form and results */
}

/* Headings */
h1, h2, h3 {
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

/* Form styles */
form {
    display: flex;
    flex-direction: column;
    width: 100%;
}

label {
    font-weight: bold;
    margin-bottom: 5px;
}

input[type="text"], input[type="password"], input[type="date"], input[type="number"], select, textarea {
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
}

input[type="submit"] {
    background: #5cb85c;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
}

input[type="submit"]:hover {
    background: #4cae4c;
}

/* Error and success message styles */
p.error, p.success {
    font-weight: bold;
    text-align: center;
    margin-bottom: 15px;
}

p.error {
    color: red;
}

p.success {
    color: green;
}

/* Dashboard container - only for dashboard */
#dashboard-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-left: 270px; /* Adjusted for sidebar */
    padding-top: 20px;
    width: 100%;
    box-sizing: border-box;
}

/* Dashboard container - filling both width and height */
#dashboard-container {
    display: grid;
    grid-template-columns: 1fr 1.5fr 1.5fr; /* Make the first column thinner and others larger */
    grid-template-rows: repeat(3, 1fr); /* Three rows with equal height */
    grid-gap: 20px;
    width: calc(100% - 40px); /* Full width minus padding */
    padding: 20px;
    box-sizing: border-box;
}

/* Individual dashboard boxes */
#dashboard-box1, #dashboard-box2, #dashboard-box3, #dashboard-box4, #dashboard-box5, #dashboard-box6, #dashboard-box7 {
    width: 100%;
    height: 100%; /* Full height of the grid area */
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

#dashboard-box2 {
    background-color: #e74c3c; /* Red */
}

#dashboard-box3 {
    position: relative; /* Ensure that this is added to keep the filter inside the box */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#dashboard-box5 {
    background-color: #9b59b6; /* Purple */
}



#dashboard-box7 {
    background-color: #d35400; /* Dark Orange */
    grid-column: span 3; /* Makes the top box span across all three columns */
    height: 100%; /* Full height of the row */
}

/* Ensure the chart canvas takes full width and height */
#earningsChart {
    width: 100% !important;
    height: 100% !important;
}

/* Filter dropdown styles */
.chart-filter {
    position: absolute;
    top: 10px;
    right: 10px;
}

/* New styles for printout container */
#printout-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    width: 100%;
}

#printout-result {
    max-width: 800px;
    width: 100%;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
    overflow-x: auto; /* Allows horizontal scrolling on small screens */
    text-align: center;
}

/* Table styles */
.printout-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.printout-table th, .printout-table td {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: left;
}

.printout-table tr:nth-child(even) {
    background-color: #f2f2f2;
}

/* Responsive styles */
@media (max-width: 768px) {
    .main-content {
        padding-left: 20px; /* Reduce left padding for small screens */
        padding-right: 20px; /* Add right padding for small screens */
    }

    .container, #printout-result, #dashboard-container {
        max-width: 100%;
        margin: 0 auto;
    }

    #dashboard-container {
        grid-template-columns: 1fr; /* Stack all divs in a single column on smaller screens */
        grid-template-rows: repeat(7, 1fr); /* Seven rows with equal height */
    }
}

/* Background style for earnings rows in savings */
.printout-table tr.earnings-row {
    background-color: #e0f7e0;
}

/* Centering and bolding sum */
.summary.centered {
    text-align: center;
    font-size: 1.5em;
    font-weight: bold;
}

/* Styles for the login page */

#login-body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
    overflow-y: auto; /* Allow scrolling */
}

#login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 20px; /* Padding around the content */
    box-sizing: border-box;
}

#login-box {
    max-width: 400px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    padding: 30px;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
}

#login-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

#login-form label {
    font-weight: bold;
    margin-bottom: 5px;
    width: 100%;
    text-align: left;
}

#login-form input[type="text"],
#login-form input[type="password"] {
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    width: 100%;
    box-sizing: border-box;
}

#login-form input[type="submit"] {
    background: #5cb85c;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    width: 100%;
    margin-top: 10px;
}

#login-form input[type="submit"]:hover {
    background: #4cae4c;
}

#dashboard-box1 {
    position: relative;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* Box 6 styles */
#dashboard-box6 {
    position: relative; /* Ensure this is positioned relative to position filter correctly */
    padding: 20px; /* Optional: Add padding if needed */
}

#dashboard-box4 {
    position: relative;
    padding: 20px;
    box-sizing: border-box;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    height: 100%; /* Full height of the grid area */
}

#dashboard-box4 .chart-filter {
    position: absolute;
    bottom: 10px;
    right: 10px;
    display: inline-block;
}

/*novo*/
/* Styling the top content container */
.top-section {
    display: flex;
    justify-content: space-between;
    align-items: flex-start; /* Align content to the top */
    padding: 10px;
    background-color: #f9f9f9; /* Light background for top content */
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* Fact section styling */
.fact-section {
    flex: 1; /* Take up equal space */
    padding-right: 20px; /* Add some space between sections */
}

/* Savings section styling */
.savings-section {
    flex: 1; /* Take up equal space */
    text-align: center; /* Center align the savings content */
    padding-right: 20px;
}

/* Bitcoin section styling */
.bitcoin-section {
    flex: 1; /* Take up equal space */
    text-align: right; /* Align text to the right */
}

/* Additional text formatting */
#factText, #savingsText, #bitcoinUpdate {
    margin-top: 5px;
    font-size: 16px;
}

#userName {
    color: #333;
    font-weight: bold;
}
