/* 1. Set a neutral, light background color for clarity */
body {
    margin: 0;
    padding: 0;
    background-color: #fdfdfd;
    /* 2. Use a clean, sans-serif font */
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    /* 3. Set a base text color for readability */
    color: #333;
    /* 4. Use a consistent line-height */
    line-height: 1.6;
    /* 5. Ensure all elements use border-box sizing */
    box-sizing: border-box;
  }
  
  /* 6. Apply a universal box-sizing rule */
  *, *:before, *:after {
    box-sizing: inherit;
  }
  
  /* 7. Define primary, secondary and accent colors using red as primary */
  :root {
    --primary-color: #c62828; /* Strong red */
    --secondary-color: #b71c1c; /* Darker red */
    --accent-color: #e53935; /* Lively red accent */
    --bg-section: #ffffff;
    --border-color: #e0e0e0;
  }
  
  /* 8. Remove default margins and paddings */
  h1, h2, h3, h4, h5, h6, p, ul, ol {
    margin: 0;
    padding: 0;
  }
  
  /* 9. Ensure paragraphs have proper bottom spacing */
  p {
    margin-bottom: 1em;
  }
  
  /* 10. Style links with the primary color and remove underlines */
  a {
    color: var(--primary-color);
    text-decoration: none;
  }
  
  /* 11. Add a subtle hover effect for links */
  a:hover {
    text-decoration: underline;
    color: var(--secondary-color);
  }
  
  /* 12. Center the main title and provide spacing */
  h1 {
    text-align: center;
    margin: 20px 0;
    font-size: 2.5em;
    color: var(--primary-color);
  }
  
  /* 13. Style secondary headings with clear hierarchy */
  h2 {
    font-size: 2em;
    color: var(--primary-color);
    margin-bottom: 10px;
  }
  
  /* 14. Style tertiary headings cleanly */
  h3 {
    font-size: 1.5em;
    color: var(--primary-color);
    margin-bottom: 15px;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 5px;
  }
  
  /* 15. Use a container class for overall layout with proper max-width */
  .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
  }
  
  /* 16. Style the big display section in a clean, organized grid */
  .big-display {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 30px;
    padding: 20px;
    background-color: var(--bg-section);
    border: 1px solid var(--border-color);
  }
  
  /* 17. Ensure each big box has equal width and proper spacing */
  .big-box {
    flex: 1 1 45%;
    margin: 10px;
    padding: 20px;
    background-color: var(--bg-section);
    border: 1px solid var(--border-color);
    text-align: center;
  }
  
  /* 18. Style the headers inside big boxes */
  .big-box h2 {
    margin-bottom: 10px;
    font-size: 1.8em;
    color: var(--primary-color);
    text-transform: uppercase;
  }
  
  /* 19. Make the big numbers prominent yet minimalistic */
  .big-number {
    font-size: 3em;
    font-weight: bold;
    color: var(--primary-color);
    letter-spacing: 0.05em;
  }
  
  /* 20. Remove any flashy effects like shadows for a clean look */
  .big-number, .big-box, .section {
    box-shadow: none;
  }
  
  /* 21. Style the assets & liabilities section with clear separation */
  #assetLiabilitySection {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
  }
  
  /* 22. Each half-section takes equal space on larger screens */
  .half-section {
    flex: 1 1 45%;
    background-color: var(--bg-section);
    padding: 20px;
    border: 1px solid var(--border-color);
  }
  
  /* 23. Style the asset details section headings consistently */
  #assetsSection h3 {
    margin-bottom: 15px;
  }
  
  /* 24. Style the liabilities section headings consistently */
  #liabilitiesSection h3 {
    margin-bottom: 15px;
  }
  
  /* 25. Provide proper spacing between individual information blocks */
  #assetsSection div,
  #liabilitiesSection div {
    margin-bottom: 10px;
  }
  
  /* 26. Style strong labels with consistent width for alignment */
  #assetsSection strong,
  #liabilitiesSection strong {
    display: inline-block;
    width: 150px;
    color: var(--primary-color);
  }
  
  /* 27. Use a clean, monospace font for numbers to aid alignment */
  .number, .big-number {
    font-family: 'Roboto Mono', monospace;
  }
  
  /* ---------------------- Revised Metrics Section ---------------------- */
  /* We isolate and update the metrics section so it doesn't affect other parts */
  
  /* 28. Metrics Section container */
  #metricsSection {
    max-width: 800px;
    margin: 0 auto 30px;
    padding: 20px;
    background-color: var(--bg-section);
    border: 1px solid var(--border-color);
  }
  
  /* 29. Metrics section title styling */
  #metricsSection h3 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.8em;
    color: var(--primary-color);
  }
  
  /* 30. Use a grid layout for metrics to evenly distribute available space */
  .metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  
  /* 31. Each metric item styled as a card */
  .metric-item {
    padding: 15px;
    border: 1px solid var(--border-color);
    background: #f9f9f9;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100px;
  }
  
  /* 32. Metric label: bold and colored */
  .metric-label {
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 8px;
  }
  
  /* 33. Metric value: right-aligned, monospace */
  .metric-value {
    font-family: 'Roboto Mono', monospace;
    text-align: right;
    font-size: 1.2em;
    flex-grow: 1;
  }
  
  /* --------------------------------------------------------------------- */
  
  /* 34. Use a consistent color palette derived from root variables */
  h1, h2, h3, a {
    color: var(--primary-color);
  }
  
  /* 35. Set a consistent base font size for the page */
  html {
    font-size: 16px;
  }
  
  /* 36. Use relative units for scalable typography */
  body {
    font-size: 1rem;
  }
  
  /* 37. Provide ample whitespace around sections for clarity */
  .section {
    margin-bottom: 30px;
    padding: 20px;
    background-color: var(--bg-section);
    border: 1px solid var(--border-color);
  }
  
  /* 38. Use a simple, clean horizontal rule for separation */
  hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 20px 0;
  }
  
  /* 39. Style form elements in a minimalist, clean manner */
  input, select, textarea, button {
    font-family: inherit;
    font-size: 1rem;
    padding: 8px;
    margin: 5px 0;
    border: 1px solid var(--border-color);
    border-radius: 4px;
  }
  
  /* 40. Remove default outlines for a cleaner look, but maintain focus styles */
  input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-color);
  }
  
  /* 41. Style buttons with a simple, flat design */
  button {
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
  }
  
  /* 42. Change button background on hover for subtle feedback */
  button:hover {
    background-color: var(--secondary-color);
  }
  
  /* 43. Ensure navigation elements are clean and simple */
  nav {
    background-color: var(--bg-section);
    border-bottom: 1px solid var(--border-color);
    padding: 10px 20px;
  }
  
  /* 44. Style navigation lists without bullet points */
  nav ul {
    list-style: none;
    display: flex;
    gap: 15px;
  }
  
  /* 45. Style navigation links to be clear and concise */
  nav ul li a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
  }
  
  /* 46. Add subtle hover effect for navigation items */
  nav ul li a:hover {
    color: var(--secondary-color);
  }
  
  /* 47. Use media queries to ensure responsiveness */
  @media (max-width: 768px) {
    /* 48. Stack big display boxes vertically on smaller screens */
    .big-display {
      flex-direction: column;
    }
    /* 49. Ensure half-sections take full width on small screens */
    .half-section {
      flex: 1 1 100%;
    }
    /* 50. Adjust metrics grid to one column on small screens */
    .metrics-grid {
      grid-template-columns: 1fr;
    }
  }
  
  /* 51. Organize the time display to be clear and legible */
  #timeLeft {
    font-family: 'Roboto Mono', monospace;
    font-size: 1.5em;
    letter-spacing: 0.05em;
    text-align: center;
  }
  
  /* 52. Ensure that the net asset value is prominent */
  #netValue {
    font-family: 'Roboto Mono', monospace;
    font-size: 2.5em;
    text-align: center;
  }
  
  /* 53. Use clear, consistent margins for headings in sections */
  .section h3 {
    margin-bottom: 15px;
  }
  
  /* 54. Style inline elements to have consistent spacing */
  span {
    margin-right: 5px;
  }
  
  /* 55. Format numbers with a consistent decimal precision via JavaScript */
  /* (CSS cannot enforce numeric precision; handled in script) */
  
  /* 56. Ensure that all text is left-aligned for readability except in big displays */
  .section, .half-section {
    text-align: left;
  }
  
  /* 57. Use padding inside sections to provide breathing room */
  .section {
    padding: 20px;
  }
  
  /* 58. Use subtle borders to separate content without being distracting */
  .border-separator {
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 10px;
  }
  
  /* 59. Use consistent margin spacing for lists */
  ul, ol {
    margin: 0 0 1em 1.5em;
  }
  
  /* 60. Style list items with clear line spacing */
  li {
    margin-bottom: 0.5em;
  }
  
  /* 61. Style blockquotes with a simple left border and padding */
  blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 10px;
    font-style: italic;
    color: #555;
    margin: 20px 0;
  }
  
  /* 62. Ensure that figure captions are centered and understated */
  figcaption {
    text-align: center;
    font-size: 0.9em;
    color: #777;
  }
  
  /* 63. Use consistent spacing for tables */
  table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
  }
  
  /* 64. Style table headers with a light background */
  th {
    background-color: #fafafa;
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
  }
  
  /* 65. Style table cells with proper padding */
  td {
    padding: 10px;
    border-bottom: 1px solid var(--border-color);
  }
  
  /* 66. Use alternating row colors for table readability */
  tr:nth-child(even) {
    background-color: #f9f9f9;
  }
  
  /* 67. Ensure images are responsive and scale correctly */
  img {
    max-width: 100%;
    height: auto;
    display: block;
  }
  
  /* 68. Style form labels to be clear and prominent */
  label {
    font-weight: bold;
    margin-bottom: 5px;
    display: block;
  }
  
  /* 69. Organize form groups with proper spacing */
  .form-group {
    margin-bottom: 15px;
  }
  
  /* 70. Ensure that input fields have a consistent width */
  input[type="text"],
  input[type="number"],
  select,
  textarea {
    width: 100%;
    max-width: 400px;
  }
  
  /* 71. Use subtle focus styling for inputs */
  input:focus, select:focus, textarea:focus {
    border-color: var(--primary-color);
  }
  
  /* 72. Center forms on the page */
  form {
    max-width: 500px;
    margin: 0 auto;
  }
  
  /* 73. Style error messages clearly but minimally */
  .error {
    color: #d32f2f;
    font-size: 0.9em;
    padding: 5px;
    border: 1px solid #f44336;
    background-color: #ffebee;
  }
  
  /* 74. Style success messages in a clean, simple way */
  .success {
    color: #388e3c;
    font-size: 0.9em;
    padding: 5px;
    border: 1px solid #4caf50;
    background-color: #e8f5e9;
  }
  
  /* 75. Provide spacing for footer content */
  footer {
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
    font-size: 0.9em;
    color: #777;
  }
  
  /* 76. Style navigation breadcrumbs in a simple inline list */
  .breadcrumbs {
    list-style: none;
    padding: 0;
    margin: 10px 0;
  }
  .breadcrumbs li {
    display: inline;
    margin-right: 5px;
  }
  .breadcrumbs li+li:before {
    content: ">";
    margin-right: 5px;
  }
  
  /* 77. Use a minimal style for modal dialogs */
  .modal {
    background-color: var(--bg-section);
    padding: 20px;
    border: 1px solid var(--border-color);
    max-width: 600px;
    margin: 20px auto;
  }
  
  /* 78. Style modal headers with clear typography */
  .modal-header {
    font-size: 1.5em;
    margin-bottom: 10px;
    color: var(--primary-color);
  }
  
  /* 79. Align modal footers to the right */
  .modal-footer {
    text-align: right;
  }
  
  /* 80. Ensure modal close buttons are simple and clear */
  .modal-close {
    background: none;
    border: none;
    font-size: 1.2em;
    cursor: pointer;
    color: var(--primary-color);
  }
  
  /* 81. Use a simple style for alert messages */
  .alert {
    padding: 10px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    background-color: #fff;
  }
  
  /* 82. Style inline code with a subtle background and padding */
  code {
    background-color: #f4f4f4;
    padding: 2px 4px;
    font-family: 'Courier New', Courier, monospace;
  }
  
  /* 83. Style preformatted text blocks for clarity */
  pre {
    background-color: #f4f4f4;
    padding: 10px;
    overflow-x: auto;
    font-family: 'Courier New', Courier, monospace;
  }
  
  /* 84. Ensure modal overlay is simple and non-distracting */
  .modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
  }
  
  /* 85. Use a clean, organized layout for sidebar elements */
  .sidebar {
    background-color: var(--bg-section);
    padding: 20px;
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
  }
  
  /* 86. Style sidebar headings consistently with main headings */
  .sidebar h3 {
    font-size: 1.5em;
    margin-bottom: 15px;
    color: var(--primary-color);
  }
  
  /* 87. Ensure sidebar content has proper spacing */
  .sidebar p {
    margin-bottom: 10px;
  }
  
  /* 88. Use a clear, minimal design for card elements */
  .card {
    background-color: var(--bg-section);
    padding: 15px;
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
  }
  
  /* 89. Style card titles to be prominent */
  .card h4 {
    margin-bottom: 10px;
    color: var(--primary-color);
  }
  
  /* 90. Ensure card content is well spaced */
  .card p {
    margin-bottom: 10px;
  }
  
  /* 91. Use a clean layout for dashboard grids */
  .dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
  }
  
  /* 92. Use a simple style for toggle switches (if needed) */
  .toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
  }
  .toggle-switch input {
    display: none;
  }
  .toggle-slider {
    position: absolute;
    cursor: pointer;
    background-color: #ccc;
    border-radius: 24px;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    transition: 0.2s;
  }
  .toggle-slider:before {
    content: "";
    position: absolute;
    height: 20px;
    width: 20px;
    left: 2px;
    bottom: 2px;
    background-color: #fff;
    border-radius: 50%;
    transition: 0.2s;
  }
  input:checked + .toggle-slider {
    background-color: var(--primary-color);
  }
  input:checked + .toggle-slider:before {
    transform: translateX(26px);
  }
  
  /* 93. Use a clear style for progress bars */
  .progress-bar {
    width: 100%;
    background-color: #e0e0e0;
    height: 10px;
    border-radius: 5px;
    overflow: hidden;
  }
  .progress-bar-inner {
    height: 100%;
    background-color: var(--primary-color);
    width: 0;
    transition: width 0.3s ease;
  }
  
  /* 94. Ensure that tooltips are simple and unobtrusive */
  .tooltip {
    position: relative;
    cursor: help;
  }
  .tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #fff;
    color: #333;
    padding: 5px;
    border: 1px solid var(--border-color);
    font-size: 0.8em;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease;
  }
  .tooltip:hover::after {
    opacity: 1;
    visibility: visible;
  }
  
  /* 95. Use a simple style for pagination elements */
  .pagination {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 0;
  }
  .pagination li {
    margin: 0 5px;
  }
  .pagination a {
    color: var(--primary-color);
    padding: 5px 10px;
    border: 1px solid var(--border-color);
    text-decoration: none;
  }
  .pagination a:hover {
    background-color: var(--primary-color);
    color: #fff;
  }
  
  /* 96. Style the search bar in a minimalist way */
  .search-bar {
    width: 100%;
    max-width: 400px;
    margin: 20px auto;
    display: block;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
  }
  
  /* 97. Ensure form error states are clearly visible */
  input.error, select.error, textarea.error {
    border-color: #d32f2f;
  }
  
  /* 98. Style breadcrumbs for page navigation in a minimal style */
  .breadcrumb {
    font-size: 0.9em;
    margin-bottom: 10px;
  }
  .breadcrumb a {
    color: var(--primary-color);
  }
  .breadcrumb a:hover {
    text-decoration: underline;
  }
  
  /* 99. Use a simple style for tags or labels */
  .tag {
    display: inline-block;
    background-color: #e0e0e0;
    color: #555;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 0.9em;
  }
  
  /* 100. Organize dashboard widgets in a clear, grid-based layout */
  .dashboard-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
  }
  
  /* 101. Provide a clean, organized footer with minimal styling */
  footer {
    background-color: var(--bg-section);
    border-top: 1px solid var(--border-color);
    padding: 20px;
    text-align: center;
    font-size: 0.9em;
    color: #777;
  }
  