header {
position: fixed;
top: 0;
left: 0;
right: 0;
height: 60px;
background: white;
box-shadow: 0 1px 4px rgba(0,0,0,0.1);
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 30px;
font-weight: 700;
font-size: 24px;
color: #111827;
z-index: 100;
}

header .title {
display: flex;
align-items: center;
font-size: 24px; /* Adjusted from 100px to a reasonable value */
}

header .title > a {
text-decoration: none;
color: #0275d8;
transition: color 0.3s ease;
font-weight: 700;
font-size: 24px;
}

header .title > a:hover {
color: #01447e; 
}

header .header-left {
flex: 1;
}

header .header-right {
display: flex;
align-items: center;
justify-content: flex-end;
gap: 8px;
overflow-x: auto;
flex: 1;
}

.dropbtn {
background-color: transparent;
color: #111827;
font-size: 24px;
border: none;
cursor: pointer;
padding: 0;
margin-left: 5px;
}

.dropdown {
position: relative;
display: inline-block;
}

.dropdown-content {
display: none;
position: absolute;
background-color: #f9f9f9;
min-width: 180px;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
z-index: 1;
}

.dropdown-content a {
color: black;
padding: 14px 18px; /* Merged from menu.css for consistency */
text-decoration: none;
display: block;
font-size: 18px; /* Merged from menu.css */
font-weight: 500; 
}

.dropdown-content a:hover {
background-color: #f1f1f1;
}

.dropdown:hover .dropdown-content {
display: block;
}

header button, header select {
background-color: #5bc0de;
border: none;
padding: 8px 16px;
border-radius: 12px;
color: white;
font-weight: 600;
cursor: pointer;
font-size: 14px;
transition: background-color 0.3s ease;
margin-left: 8px;
}

header button:hover, header select:hover {
background-color: #31b0d5;
}

header button#logout-btn {
background-color: #d9534f;
border: none;
padding: 8px 16px; /* Reduced padding to make the button smaller */
border-radius: 12px; /* Matched to other buttons */
color: white;
font-weight: 600;
cursor: pointer;
font-size: 16px; /* Kept text size the same */
transition: background-color 0.3s ease;
margin-left: 8px; /* Standardized margin */
}

header button#logout-btn:hover {
background-color: #c9302c;
}

a {
text-decoration: none; /* Ensures no underlines on links */
color: #0275d8;
transition: color 0.3s ease;
}

a:hover {
color: #014f9c;
}

/* Sticky footer buttons */
#footer-buttons {
position: fixed;
bottom: 0;
left: 0; right: 0;
background: white;
box-shadow: 0 -1px 10px rgba(0,0,0,0.08);
padding: 5px 30px;
display: flex;
gap: 12px;
justify-content: center;
z-index: 100;
}

#footer-buttons button {
background-color: #0275d8;
color: white;
border: none;
padding: 12px 26px;
font-weight: 700;
font-size: 16px;
border-radius: 18px;
cursor: pointer;
transition: background-color 0.3s ease;
}

#footer-buttons button.save-btn {
background-color: #5bc0de;
}

#footer-buttons button.print-btn {
background-color: #f0ad4e;
}

#footer-buttons button:disabled {
opacity: 0.5;
cursor: not-allowed;
}

#footer-buttons button:hover:not(:disabled) {
filter: brightness(1.1);
}

  /* Real Footer */

#action-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #e5e7eb;
    padding: 16px 20px;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.08);
    z-index: 1000;
    min-height: 80px;
}

/* Hide footer completely if no buttons inside */
.action-footer:empty,
.action-footer .footer-buttons-container:empty ~ * {
    min-height: 0;
    height: 0;
    padding: 0;
    border: none;
    opacity: 0;
    transform: translateY(100%);
    pointer-events: none;
}

.footer-buttons-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    align-items: center;
}

.footer-buttons-container button {
    background-color: #0275d8;
    color: white;
    border: none;
    padding: 12px 24px;
    font-weight: 700;
    font-size: 15px;
    border-radius: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.footer-buttons-container button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

.footer-buttons-container button.save-btn     { background-color: #5bc0de; }
.footer-buttons-container button.print-btn    { background-color: #f0ad4e; }
.footer-buttons-container button.delete-budget-btn { background-color: #dc3545 !important; }

/* Ensure main content has space when footer is visible */
#container {
    margin-bottom: 100px !important;  /* Always reserve space */
}

@media (max-width: 480px) {
#container {
margin: 80px 10px;
padding: 10px;
}
}

@media (min-width: 768px) {
header {
padding: 0 10px;
height: auto;
}
header .title {
font-size: 20px;
}
header button,
header select {
font-size: 12px;
padding: 6px 10px;
margin-left: 4px;
}
#container { margin-bottom: 120px !important; }
#action-footer { padding: 12px 10px; }
.footer-buttons-container button {
    flex: 1;
    min-width: 100px;
    padding: 11px 12px;
    font-size: 14px;
}
}