/* === General & Typography === */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    background-color: #f8f9fa;
    color: #343a40;
}

h1, h2, h3 {
    margin-top: 0;
    color: #2c3e50;
    border-bottom: 2px solid #eef;
    padding-bottom: 10px;
}

/* === Layout Containers === */
/* Base container for padding and centering */
.container {
    padding: 2rem;
    margin: auto;
}

/* Modifier for pages needing a narrower, fixed-width layout */
.container-sm {
    max-width: 800px;
}

.content-box {
    background-color: #ffffff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
}

/* For login, forgot password, etc. */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #e9ecef;
}

.auth-box {
    background-color: #ffffff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

/* === Navigation Bar === */
.navbar {
    background-color: #ffffff;
    padding: 1rem 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.navbar-brand a {
    font-size: 1.5rem;
    font-weight: 700;
    color: #007bff;
    text-decoration: none;
}
.navbar-links a {
    color: #007bff;
    text-decoration: none;
    font-weight: 600;
    margin-left: 1.5rem;
}

/* === Forms & Inputs === */
.form-group {
    margin-bottom: 1rem;
    text-align: left;
    flex: 1; /* For reports.html filter layout */
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

input, select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 1em;
}

/* === Buttons === */
button {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    border: none;
}
.btn:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

/* General Button Colors */
.btn-primary { background-color: #6c757d; color: white; }
.btn-primary:hover { background-color: #5a6268; }
.btn-success { background-color: #28a745; color: white; }
.btn-success:hover { background-color: #218838; }
.btn-delete { background-color: #dc3545; color: white; }
.btn-delete:hover { background-color: #c82333; }
.btn-paid { background-color: #28a745; color: white; }
.btn-paid:hover { background-color: #218838; }
.delete-btn { background-color: #dc3545; color: white; padding: 0.5rem 1rem; font-size: 0.9rem; }
.delete-btn:hover { background-color: #c82333; }

/* Special Button Styles */
.btn-info { /* For User Management */
    background-color: #ffc107;
    color: #343a40;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
}
.btn-info:hover { background-color: #e0a800; }
.cleanup-btn { color: #343a40; width: 100%; }

/* Individual Cleanup Button Colors */
#cleanup-files-btn { background-color: #ffc107; }
#cleanup-files-btn:hover { background-color: #e0a800; }
#cleanup-db-btn { background-color: #fd7e14; }
#cleanup-db-btn:hover { background-color: #e36500; }

/* Report Page Button Colors */
.filter-btn { background-color: #007bff; color: white; }
.filter-btn:hover { background-color: #0069d9; }
.reset-btn { background-color: #6c757d; color: white; }
.reset-btn:hover { background-color: #5a6268; }
.download-btn { background-color: #17a2b8; color: white; }
.download-btn:hover { background-color: #138496; }

/* === Page-Specific Layouts === */

/* Titles like "Previous Uploads" */
.container > h2 {
    color: #007bff;
    margin-bottom: 1.5rem;
    text-align: center;
    border-bottom: none;
}

/* Dashboard Page */
.top-buttons-container { display: flex; align-items: center; margin-bottom: 1rem; gap: 10px; }
.left-buttons { display: flex; gap: 10px; justify-content: flex-start; }
.right-buttons { display: flex; gap: 10px; justify-content: flex-end; margin-left: auto; align-items: center; }
.right-buttons .btn, .left-buttons .btn { padding: 0.5rem 1rem; font-size: 0.85rem; white-space: nowrap; flex-shrink: 0; }
.dash-btn { min-width: 90px; max-width: 120px; text-align: center; box-sizing: border-box; }
.dash-btn .badge { background: #dc3545; color: white; border-radius: 10px; padding: 2px 6px; font-size: 0.75rem; margin-left: 4px; }
.practice-filter-row { margin-bottom: 1rem; }
.practice-filter-row .filter-inline { display: flex; gap: 0.5rem; align-items: center; }
.practice-filter-row .filter-inline label { white-space: nowrap; }
.practice-filter-row select { padding: 8px 12px; font-size: 0.9rem; min-width: 250px; border: 1px solid #ccc; border-radius: 6px; }
.maintenance-forms { display: flex; flex-direction: column; gap: 10px; margin-top: 1.5rem; }

/* Reports Page */
.filter-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.5rem; align-items: flex-end; }
.filter-form .btn { height: 50px; }

/* Staff Statement View Page */
.action-buttons { display: flex; gap: 1rem; }

/* Patient Statement Page */
.statement-container { background-color: #ffffff; border-radius: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.08); padding: 20px; }
.info-section p { margin: 5px 0; line-height: 1.6; }
.info-section p strong { display: inline-block; width: 140px; color: #555; }
.billing-details p { margin: 2px 0; font-size: 0.9em; font-family: monospace; }
.amount-due { background-color: #e8f4fd; border: 1px solid #bde0fe; border-radius: 8px; padding: 15px; text-align: center; margin: 20px 0; }
.amount-due strong { font-size: 1.2em; color: #1d3557; }
.amount-due span { font-size: 1.6em; font-weight: 700; color: #0077b6; }
.footer-note { font-size: 0.9em; color: #777; margin-top: 10px; }

/* === Tables === */
table { width: 100%; border-collapse: collapse; margin-top: 1rem; }
th, td { text-align: left; padding: 1rem; border-bottom: 1px solid #dee2e6; vertical-align: top; }
th { font-weight: 700; background-color: #f0f2f5; }
.text-right { text-align: right; }
table tbody tr:nth-child(even) { background-color: #f8f9fa; }
table tbody tr:hover { background-color: #e2e6ea; }
.aging-table th, .aging-table td { text-align: right; border-bottom: 1px solid #eee; }
.logs-table { font-size: 0.9em; }
.logs-table th, .logs-table td { border-bottom: 1px solid #eee;}
.filename-link { 
    color: #007bff; 
    text-decoration: underline; 
font-size: 14px; 
}
.filename-link:hover { color: #0056b3; }

/* For sortable links on reports.html */
.sortable a { color: #343a40; text-decoration: none; }
.sortable a:hover { color: #007bff; }
.sort-arrow { margin-left: 5px; font-size: 0.8em; }


/* === Misc Components === */
.flash-messages { list-style: none; padding: 0; margin-bottom: 1.5rem; }
.flash-messages li, .error, .success, .info { padding: 0.75rem 1.25rem; margin-bottom: 1rem; border: 1px solid transparent; border-radius: 8px; font-weight: 500; }
.error { color: #721c24; background-color: #f8d7da; border-color: #f5c6cb; }
.success { color: #155724; background-color: #d4edda; border-color: #c3e6cb; }
.info { color: #0c5460; background-color: #d1ecf1; border-color: #bee5eb; }

.status-badge { display: inline-block; padding: 0.3em 0.6em; border-radius: 0.5em; font-size: 0.8em; font-weight: 700; color: #fff; }
.status-success { background-color: #28a745; }
.status-partial { background-color: #ffc107; color: #343a40; }
.status-fail { background-color: #dc3545; }

.switch { position: relative; display: inline-block; width: 46px; height: 24px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #ccc; transition: .4s; border-radius: 24px; }
.slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px; background-color: white; transition: .4s; border-radius: 50%; }
input:checked + .slider { background-color: #28a745; }
input:checked + .slider:before { transform: translateX(22px); }

/* === Responsive Media Queries === */
@media (max-width: 768px) {
    .navbar { flex-direction: column; align-items: flex-start; padding: 1rem; }
    .navbar-links { margin-top: 1rem; margin-left: 0; width: 100%; justify-content: space-around; }
}

/* === Minimalist List Style === */

/* Target the list container itself for spacing adjustments */
.content-box ul {
  padding-inline-start: 25px; /* Reduces the default indent for a tighter look */
  margin-block-start: 0;      /* Removes extra space above the list */
}

/* Style the actual list items for the minimal feel */
.content-box li {
  /* Use a clean, thin system font. 'Inter' is also a great choice. */
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  
  /* Slightly smaller than body text, but very readable */
  font-size: 10px;
  
  /* Use a lighter weight; avoid bold for a minimal feel */
  font-weight: 400; /* 400 is 'normal', 300 is 'light' if available */
  
  /* Give lines room to breathe. This is key for minimalism. */
  line-height: 1.3; 
  
  /* Use a softer text color instead of harsh black */
  color: #555; 
}


/* Container for the uploader info to manage spacing */
.uploader-info {
  margin-top: 5px; /* A little space above, replacing the <br> */
}

/* Styles the "Uploaded by:" text */
.upload-label {
  font-size: 13px;    /* Makes the label text smaller */
  color: #6c757d;     /* Sets a subtle gray color */
}

/* Styles the uploader's actual name */
.uploader-name {
  color: #2c3e50;      /* A different color for the name */
  font-weight: 600;     /* Makes the name slightly bolder to stand out */
}
