/* Global Styles */
body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background: #f2f2f2;
    color: #333;
    font-size: 12px;
}

html {
    font-size: 12px;
}

/* ================== */
/* Header & Navigation */
/* ================== */
.header {
    display: grid;
    grid-template-columns: 300px 1fr 300px;
    align-items: center;
    background: #fff;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    width: 100%;
    box-sizing: border-box;
}

.header-left {
    width: 300px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: 20px;
}

.header-center {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.header-center img {
    max-width: 250px;
    width: 250px;
    height: auto;
    margin-bottom: 5px;
    display: block;
}

.header-center .subtitle {
    font-family: Arial, sans-serif;
    font-size: 18px;
    color: #333;
    margin-top: 0;
    line-height: 1;
    text-align: center;
    width: 250px; /* Match the image width */
}

.header-right {
    width: 300px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding-right: 20px;
}

/* Button styles for header */
.header-btn {
    min-width: 100px;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    background: #007BFF;
    color: #fff;
    border: none;
    font-family: Arial, sans-serif;
}

.header-btn:hover {
    background: #0056b3;
}

/* Remove old header title styles that might conflict */
.header-title {
    display: none;
}

/* Common Container Styles */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 30px auto;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
}

.budget-report-page .container {
    max-width: none;
    margin: 20px;
}

/* Add a full-width container for salary page */
.app-container {
    width: 100%;
    max-width: 100%;
    padding: 0 20px;
    box-sizing: border-box;
}

/* Common Status Message Styles */
.status-message {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 15px;
    text-align: center;
    z-index: 1000;
    display: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.status-message.success {
    background-color: #d4edda;
    color: #155724;
    border-bottom: 1px solid #c3e6cb;
}

.status-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border-bottom: 1px solid #f5c6cb;
}

.create-button {
    background: #28a745;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
}

/* ================== */
/* Login Page Styles  */
/* ================== */
.login-container, .dashboard-container {
    padding: 20px;
}

.login-container h2 {
    margin-bottom: 20px;
    font-size: 24px;
    color: #333;
}

.login-container form {
    display: flex;
    flex-direction: column;
}

.login-container form label {
    margin: 10px 0 5px;
    text-align: left;
    font-size: 14px;
    color: #555;
}

.login-container form input {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

.login-container form button {
    margin-top: 20px;
    padding: 10px;
    font-size: 16px;
    border: none;
    border-radius: 4px;
    background: #007BFF;
    color: #fff;
    cursor: pointer;
    transition: background 0.3s ease;
}

.login-container form button:hover {
    background: #0056b3;
}

/* ================== */
/* User Management Page Styles */
/* ================== */
.content {
    padding: 20px;
}

/* Table styling for users */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

table, th, td {
    border: 1px solid #ddd;
}

th, td {
    padding: 10px;
    text-align: left;
}

th {
    background: #f8f8f8;
}

/* ================== */
/* Modal Styles       */
/* ================== */
.modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5); /* Darker, slightly more opaque overlay */
}

.modal-content, .modal-content-large {
    background-color: #ffffff; /* Solid white background */
    margin: 10% auto; /* Centered vertically */
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    width: 80%;
}

.modal-content {
    max-width: 500px;
}

.modal-content-large {
    max-width: 900px; /* Larger width for more complex modals */
}

.modal-content-medium {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80% !important;
    max-width: 550px !important; /* Reduced width and made more forceful */
    border-radius: 8px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.2rem;
    font-weight: 500;
}

.close-btn {
    color: #aaa;
    float: right;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}

.close-btn:hover {
    color: #666;
}

.btn-group {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

/* Ensure modal buttons have proper styling */
.modal .green-btn,
.modal .grey-btn,
.modal .blue-btn,
.modal .red-btn,
.modal .sand-btn {
    min-width: 80px;
    border-width: 1px;
    border-style: solid;
}

.modal .green-btn {
    border-color: #4CAF50;
}

.modal .grey-btn {
    border-color: rgba(128, 128, 128, 0.449);
}

.modal .blue-btn {
    border-color: #034eff;
}

.modal .red-btn {
    border-color: #f44336;
}

.modal .sand-btn {
    border-color: #7a5b36;
}

/* Navigation Button (used for Dashboard and other navigation links) */
.nav-button {
    background: #007BFF;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s ease;
}

.nav-button:hover {
    background: #0056b3;
}

/* Standard Intle Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fdfcf9;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out;
    margin: 0;
    padding: 0;
    border: none;
}

.loading-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    height: 100%;
    gap: 30px;
}

.loading-spinner-container {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
}

.loading-spinner {
    position: absolute;
    width: 120px;
    height: 120px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #7a5b36;  /* Sand dune color */
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-logo {
    width: 60px;
    height: 60px;
    background: url('https://intle-event.com/assets/images/Intle-T_no.png') no-repeat center center;
    background-size: contain;
    position: absolute;
}

.loading-text {
    margin-top: 0;
    font-size: 18px;
    color: #333;
    text-align: center;
    padding: 0 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Standard Button Classes */
.green-btn {
    background: white;
    color: #4CAF50;
    border: 1px solid #4CAF50;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.green-btn:hover {
    background: #4CAF50;
    color: white;
}

.blue-btn {
    background: white;
    color: #034eff;
    border: 1px solid #034eff;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 100px;
    min-width: 100px;
    margin-right: 10px;
}

.blue-btn:hover {
    background: #034eff;
    color: white;
}

.grey-btn {
    background: white;
    color: rgba(128, 128, 128, 0.449);
    border: 1px solid rgba(128, 128, 128, 0.449);
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.grey-btn:hover {
    background: rgba(128, 128, 128, 0.449);
    color: white;
}
.red-btn {
    background: white;
    color: #f44336;
    border: 1px solid #f44336;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.red-btn:hover {
    background: #f44336;
    color: white;
}

.sand-btn {
    background: white;
    color: #7a5b36;
    border: 1px solid #7a5b36;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.sand-btn:hover {
    background: #c7a783;
}

/* Make sure icons inside buttons inherit the text color */
.green-btn i,
.grey-btn i,
.blue-btn i,
.red-btn i,
.sand-btn i {
    color: inherit;
}

/* ================== */
/* Time Report Styles */
/* ================== */

/* Report Filters */
.report-filters {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.form-group {
    flex: 1;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #2c3e50;
    font-weight: 500;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 8px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 14px;
}

/* Summary Table */
.summary-table {
    width: 100%;
    margin-bottom: 30px;
    border-collapse: collapse;
}

.summary-table th,
.summary-table td {
    padding: 10px;
    border: 1px solid #dee2e6;
    text-align: right;
}

.summary-table th:first-child,
.summary-table td:first-child,
.summary-table th:nth-child(2),
.summary-table td:nth-child(2) {
    text-align: left;
}

/* Detail Table */
.table-wrapper {
    overflow-x: auto;
    margin: 0 -20px;
    padding: 0 20px;
}

.detail-table {
    min-width: 1400px;
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
}

.detail-table th,
.detail-table td {
    padding: 8px;
    border: 1px solid #dee2e6;
    white-space: nowrap;
}

/* Column widths */
.detail-table th:nth-child(1),
.detail-table td:nth-child(1) { width: 120px; } /* Day */

.detail-table th:nth-child(2),
.detail-table td:nth-child(2) { width: 80px; }  /* Weekday */

.detail-table th:nth-child(3),
.detail-table td:nth-child(3) { width: 80px; }  /* Hours Cycle */

.detail-table th:nth-child(4),
.detail-table td:nth-child(4) { width: 70px; }  /* Off Days */

.detail-table th:nth-child(5),
.detail-table td:nth-child(5) { width: 70px; }  /* Shift */

.detail-table th:nth-child(6),
.detail-table td:nth-child(6),
.detail-table th:nth-child(7),
.detail-table td:nth-child(7) { width: 60px; }  /* In/Out */

.detail-table th:nth-child(8),
.detail-table td:nth-child(8) { width: 100px; } /* Notes */

.detail-table th:nth-child(9),
.detail-table td:nth-child(9),
.detail-table th:nth-child(10),
.detail-table td:nth-child(10),
.detail-table th:nth-child(11),
.detail-table td:nth-child(11),
.detail-table th:nth-child(12),
.detail-table td:nth-child(12),
.detail-table th:nth-child(13),
.detail-table td:nth-child(13),
.detail-table th:nth-child(14),
.detail-table td:nth-child(14) { width: 70px; } /* Hours columns */

/* Row styles */
.weekend { background-color: #f8f9fa; }
.public-holiday { background-color: #fff3cd; }
.leave-row { background-color: #fff3cd; }
.shift-row { background-color: #f8f9fa; }

/* Employee Navigation */
.employee-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.employee-navigation h2 {
    margin: 0;
    font-family: 'Playfair Display', serif;
    color: #2c3e50;
}

/* Change Month Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.modal-content {
    background: white;
    margin: 50px auto;
    padding: 30px;
    width: 90%;
    max-width: 500px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.modal-title {
    margin: 0 0 20px 0;
    color: #2c3e50;
    font-size: 20px;
}

.modal-message {
    margin-bottom: 25px;
    color: #666;
    line-height: 1.5;
}

.period-details {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 25px;
}

.period-row {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.period-label {
    width: 150px;
    font-weight: 500;
    color: #2c3e50;
}

.period-value {
    padding: 5px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 14px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.modal-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.modal-btn-cancel {
    background: #f8f9fa;
    color: #2c3e50;
}

.modal-btn-confirm {
    background: #28a745;
    color: white;
}

/* Notification */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    background: #28a745;
    color: white;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1001;
    display: none;
}

/* Utility Classes */
.hidden {
    display: none;
}

/* Update header-right styles */
.header-right {
    grid-column: 3;
    justify-self: end;
    width: 300px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* Logged-in user display styling */
.logged-in-user {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: rgba(0, 123, 255, 0.1);
    border-radius: 6px;
    border: 1px solid rgba(0, 123, 255, 0.2);
}

.logged-in-text {
    color: #007bff;
    font-weight: 500;
    font-size: 14px;
    white-space: nowrap;
}

/* Ensure left column has same minimum width as right */
.header > *:first-child {
    grid-column: 1;
    min-width: 100px;
}

/* Add grey button style to match other button styles */
.grey-btn {
    background: white;
    color: #6c757d;
    border: 1px solid #6c757d;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.grey-btn:hover {
    background: #6c757d;
    color: white;
}

/* Make sure icons inside grey buttons inherit the text color */
.grey-btn i {
    color: inherit;
}

.header-left {
    grid-column: 1;
    justify-self: start;
    width: 300px;
}

/* Small Button Variants */
.sand-small-btn {
  background: white;
  color: #7a5b36;
  border: 1px solid #7a5b36;
  padding: 4px 2px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 10px;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 45px;
}

.sand-small-btn:hover {
  background: #7a5b36;
  color: white;
}

.blue-small-btn {
  background: white;
  color: #034eff;
  border: 1px solid #034eff;
  padding: 4px 2px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 10px;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 45px;
}

.blue-small-btn:hover {
  background: #034eff;
  color: white;
}

.red-small-btn {
  background: white;
  color: #f44336;
  border: 1px solid #f44336;
  padding: 4px 2px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 10px;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 45px;
}

.red-small-btn:hover {
  background: #f44336;
  color: white;
}

.green-small-btn {
  background: white;
  color: #4CAF50;
  border: 1px solid #4CAF50;
  padding: 4px 2px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 10px;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 45px;
}

.green-small-btn:hover {
  background: #4CAF50;
  color: white;
}

.grey-small-btn {
  background: white;
  color: rgba(128, 128, 128, 0.449);
  border: 1px solid rgba(128, 128, 128, 0.449);
  padding: 4px 2px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 10px;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 45px;
}

.grey-small-btn:hover {
  background: rgba(128, 128, 128, 0.449);
  color: white;
}

/* Modal Table for Details */
.details-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.details-table td {
    padding: 8px 4px;
    border-bottom: 1px solid #eee;
}

.details-table tr:last-child td {
    border-bottom: none;
}

.details-table .number-cell {
    text-align: right;
    font-weight: bold;
    font-family: 'Courier New', Courier, monospace;
}

.details-table .total-row td {
    font-weight: bold;
    border-top: 2px solid #ccc;
    font-size: 1.1em;
}

/* Styles for inline details row */
.details-row td {
    padding: 0 !important;
    border-top: 2px solid #7a5b36;
    border-bottom: 2px solid #7a5b36;
    background-color: #fdfcf9;
}

.details-container {
    padding: 15px 25px;
}

.details-container h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #4a3419;
}

.details-inline-table {
    width: 100%;
    border-collapse: collapse;
}

.details-inline-table th, .details-inline-table td {
    padding: 8px;
    text-align: right;
    border-bottom: 1px solid #ddd;
    font-family: 'Courier New', Courier, monospace;
}

.details-inline-table th {
    background-color: #f2f2f2;
    font-weight: bold;
    font-family: inherit;
    text-align: center;
}

.details-inline-table td:first-child, .details-inline-table th:first-child {
     font-family: inherit;
     font-weight: bold;
     text-align: left;
}

.details-inline-table tfoot .total-row td {
    font-weight: bold;
    font-size: 1.1em;
    border-top: 2px solid #aaa;
    background-color: #f2f2f2;
    color: #000;
}

/* App-wide button styles */
.blue-btn, .green-btn, .sand-btn {
  padding: 10px 20px;
}

.modal-content button:hover {
  background-color: #45a049;
}

/* Main content container */
.main-content {
    padding: 20px;
}

/* Styles for inline, aligned details rows */
.details-row {
    background-color: #fdfcf9 !important;
    font-size: 0.9em;
}

.details-row:hover td {
    background-color: #f5f2ed !important;
}

.details-label-cell {
    text-align: right !important;
    padding-right: 20px !important;
    font-weight: bold;
    font-style: italic;
    color: #555;
}

.details-total-row {
    background-color: #f0ebe4 !important;
    font-weight: bold;
}

.details-total-row td {
    border-top: 1px solid #ccc;
    border-bottom: 2px solid #7a5b36;
}

/* Style for the main table footer total row */
.budget-table tfoot .footer-total-row {
    background-color: #f0ebe4; /* Lighter sand color */
    color: #4a3419;      /* Dark brown text */
}

.budget-table tfoot .footer-total-row td {
    padding: 10px 8px; /* Adjusted padding */
    border-top: 2px solid #ddd;
}

/* Align all numeric columns and their headers to the right */
.budget-table th:nth-child(n+4),
.budget-table .month-cell,
.budget-table .total-cell,
.budget-table .footer-total-row td:not(:first-child) {
    text-align: right;
    padding-right: 15px !important;
}

/* Style for the percentage indicator on expense items */
.percentage-indicator {
    color: #7a5b36;
    font-weight: bold;
    font-style: italic;
    cursor: help;
    margin-left: 5px;
    border: 1px solid #7a5b36;
    border-radius: 50%;
    padding: 0px 5px;
    font-size: 0.8em;
}

/* Style for action radio buttons in tables */
.action-radio-label {
    display: block;
    margin-bottom: 5px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: normal;
}

/* Styles for the monthly input modal */
#monthlyInputsContainer.modal-body {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

#monthlyInputsContainer .form-group {
    display: flex;
    align-items: center;
    width: 48% !important; /* Two columns */
    justify-content: space-between;
    margin-bottom: 10px;
}

#monthlyInputsContainer .form-group label {
    flex-basis: auto;
    font-weight: bold;
    text-align: left;
}

#monthlyInputsContainer .form-group input {
    flex-basis: 60%;
    text-align: right;
}

/* --- Table Column Width & Alignment --- */
.budget-table {
    table-layout: fixed;
    width: 100%;
}

/* Salary Tables */
#managementSalaryTable th:nth-child(1), #managementSalaryTable td:nth-child(1),
#generalSalaryTable th:nth-child(1), #generalSalaryTable td:nth-child(1) { width: 12%; } /* Name */

#managementSalaryTable th:nth-child(2), #managementSalaryTable td:nth-child(2),
#generalSalaryTable th:nth-child(2), #generalSalaryTable td:nth-child(2) { width: 10%; } /* Department */

#managementSalaryTable th:nth-child(3), #managementSalaryTable td:nth-child(3),
#generalSalaryTable th:nth-child(3), #generalSalaryTable td:nth-child(3) { width: 8%; }  /* Actions */

/* Other Expenses Table */
#otherExpensesTable th:nth-child(1), #otherExpensesTable td:nth-child(1) {
    width: 5%;
    font-size: 0.9em;
} /* Acc */

#otherExpensesTable th:nth-child(2), #otherExpensesTable td:nth-child(2) {
    width: 17%;
    font-size: 0.9em;
    white-space: normal;
} /* Description */

#otherExpensesTable th:nth-child(3), #otherExpensesTable td:nth-child(3) { width: 8%; }  /* Actions */

/* Shared Month/Total Columns */
.budget-table th:nth-child(n+4), .budget-table td:nth-child(n+4) {
    width: 5.38%; /* (100 - 30) / 13 */
}

/* Hide arrows from number inputs */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type=number] {
    -moz-appearance: textfield;
}

/* New, specific class for the monthly expense modal */
.monthly-expense-modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 600px;
    border-radius: 8px;
}

.monthly-expense-modal-content .modal-body {
    display: block;
}

.monthly-expense-modal-content .modal-body .form-group {
    display: block;
}

.monthly-expense-modal-content .modal-body .form-group label {
    text-align: left;
}

.monthly-expense-modal-content .modal-body .form-group input {
    width: 100%;
}

/* Reduce font size for budget report page */
html, body {
    font-size: 14px;
}

.report-table .num-col, .report-table tfoot td {
    text-align: right;
}

.budget-table thead th {
    background: #f2f2f2;
    color: #333;
}

.action-radio-label {
    margin-right: 15px;
    cursor: pointer;
}

.total-cell {
    text-align: right;
    font-weight: bold;
}

.monthly-inputs-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 20px;
}

.monthly-inputs-container .form-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.monthly-inputs-container .form-group label {
    flex-basis: 40%;
    text-align: left;
}

.monthly-inputs-container .form-group input {
    flex-basis: 55%;
    text-align: right;
}

.monthly-modal-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #ddd;
}
.monthly-modal-total .total-label {
    flex-basis: 40%;
    text-align: left;
    font-weight: bold;
}
.monthly-modal-total .total-amount {
    flex-basis: 55%;
    text-align: right;
    font-weight: bold;
    font-size: 1.1em;
}

/* Fix for monthly expense modal layout */
.monthly-expense-modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 600px;
    border-radius: 8px;
}

.monthly-expense-modal-content .modal-body {
    display: block;
}

.monthly-expense-modal-content .modal-body .form-group {
    display: block;
}

.monthly-expense-modal-content .modal-body .form-group label {
    text-align: left;
}

.monthly-expense-modal-content .modal-body .form-group input {
    width: 100%;
}

/* Intake Medical Checklist Table */
.intake-checklist-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    background: #fff;
    font-size: 13px;
}
.intake-checklist-table th, .intake-checklist-table td {
    border: 1px solid #e0e0e0;
    padding: 8px 6px;
    text-align: left;
}
.intake-checklist-table th {
    background: #f8f9fa;
    color: #7a5b36;
    font-weight: 600;
}
.intake-checklist-table tr:nth-child(even) {
    background: #f9f9f9;
}
.intake-checklist-table input[type="radio"], .intake-checklist-table input[type="number"] {
    margin: 0 2px;
    vertical-align: middle;
}

/* QR Code Generator Styles */
.qr-type-section {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.qr-type-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.qr-type-btn {
    padding: 10px 20px;
    border: 2px solid #007bff;
    background: white;
    color: #007bff;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.qr-type-btn:hover {
    background: #007bff;
    color: white;
}

.qr-type-btn.active {
    background: #007bff;
    color: white;
}

.qr-section {
    margin: 20px 0;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
}

.qr-display {
    margin: 20px 0;
    padding: 20px;
    border: 2px solid #28a745;
    border-radius: 8px;
    background: #f8fff9;
}

.qr-info {
    margin: 15px 0;
    padding: 15px;
    background: #e9ecef;
    border-radius: 5px;
}

.qr-info p {
    margin: 5px 0;
}

.qr-code-container {
    text-align: center;
    margin: 20px 0;
}

.qr-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

.saved-qr-section {
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.qr-filters {
    margin-bottom: 20px;
}

.qr-codes-list {
    display: grid;
    gap: 15px;
}

.qr-code-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.qr-code-info {
    flex: 1;
}

.qr-code-info h4 {
    margin: 0 0 10px 0;
    color: #333;
}

.qr-code-info p {
    margin: 5px 0;
    font-size: 14px;
    color: #666;
}

.qr-code-actions {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.qr-code-actions .blue-btn {
    padding: 5px 10px;
    font-size: 12px;
}

@media (max-width: 768px) {
    .qr-code-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .qr-code-actions {
        margin-top: 10px;
        width: 100%;
        justify-content: flex-start;
    }
    
    .qr-type-buttons {
        flex-direction: column;
    }
    
    .qr-actions {
        flex-direction: column;
    }
}

/* Print-Friendly QR Code Display Styles */
.print-qr-display {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #f8f9fa;
    z-index: 1000;
    overflow-y: auto;
    padding: 20px;
}

.print-qr-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.print-actions {
    display: flex;
    gap: 10px;
}

.print-qr-content {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: calc(100vh - 120px);
}

.qr-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 30px;
    max-width: 500px;
    width: 100%;
    text-align: center;
}

.qr-card-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.qr-card-logo {
    width: 80px;
    height: auto;
}

.qr-card-title h2 {
    margin: 0;
    color: #333;
    font-size: 24px;
}

.qr-card-title p {
    margin: 5px 0 0 0;
    color: #666;
    font-size: 16px;
}

.qr-card-body {
    margin-bottom: 30px;
}

.qr-code-section {
    margin-bottom: 25px;
}

.qr-code-section canvas {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 10px;
    background: white;
}

.qr-details-section {
    text-align: left;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.qr-detail-item {
    margin: 10px 0;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

.qr-detail-item:last-child {
    border-bottom: none;
}

.qr-detail-item strong {
    color: #333;
    min-width: 100px;
    display: inline-block;
}

.qr-card-footer {
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
    color: #666;
    font-size: 14px;
}

.qr-card-footer p {
    margin: 5px 0;
}

/* Print Styles */
@media print {
    .print-qr-header {
        display: none;
    }
    
    .print-qr-display {
        position: static;
        background: white;
        padding: 0;
    }
    
    .qr-card {
        box-shadow: none;
        border: 2px solid #333;
        margin: 0;
        padding: 20px;
    }
    
    .qr-code-section canvas {
        border: 1px solid #333;
    }
    
    body {
        margin: 0;
        padding: 0;
    }
    
    @page {
        margin: 1cm;
        size: A4;
    }
}

/* Mobile Responsive for Print Display */
@media (max-width: 768px) {
    .print-qr-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .print-actions {
        width: 100%;
        justify-content: center;
    }
    
    .qr-card {
        padding: 20px;
        margin: 10px;
    }
    
    .qr-card-header {
        flex-direction: column;
        text-align: center;
    }
    
    .qr-card-logo {
        width: 60px;
    }
}