:root {
  --primary-color: #294B63; /* A deep teal */
  --primary-lightened-color: #496B93; /* A deep teal */
  --secondary-color: #E0A45E; /* A muted gold */
  --neutral-color: #F0F0F0;   /* Light gray */
  --text-color-dark: #555;
  --text-color-light: #ccc;
  --border-radius: 0.25rem;
  --box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1); /* Subtle shadow */
}

/* Base Styles */
body {
  font-family: 'Roboto', sans-serif; /* Or 'Open Sans', 'Lato', 'Montserrat' */
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-color-dark);
  margin: 0; /* Reset default margin */
  padding: 0;
}

h1, h2, h3 {
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s ease-in-out;
}

a:hover {
  text-decoration: underline;
  color: darken(var(--primary-color), 10%);
}

img {
  max-width: 100%; /* Responsive images */
  height: auto;
}

/* Layout */
.container { /* Example container */
  max-width: 1267px;
  margin: 0 0;
  padding: 1rem;
}

.row {
  /*display: grid; */
  /*grid-template-columns: repeat(auto-fit, minmax(500px, 1fr)); /* Responsive columns */
}

.col, .col-2, .col-4, .col-10 {
  align-items: center;
  display: flex;
}

.col-first {
  /* Subtle column divider */
  border-right: 1px solid rgba(0, 0, 0, 0.1);
}

/* Cards */
.card {
  background-color: #fff;
  border-radius: var(--border-radius);
  padding: 1.5rem;
  box-shadow: var(--box-shadow);
}

.company-content {
  /* Apply card styles to company content */
  background-color: #fff;
  border-radius: var(--border-radius);
  padding: 1.5rem;
  box-shadow: var(--box-shadow);
  margin-bottom: 1rem;
}

.company-text {
  position: relative;
  margin-top: 1rem;
  margin-bottom: 1rem;
  padding: 0rem;
}

/* Banner */
.banner-content {
  background-image: url("../img/dc_sunrise.jpg");
  background-repeat: no-repeat;
  background-size: cover; /* Or 'contain' */
  background-position: center;
  height: 20rem; /* Use rem */
  position: relative;
  width: 100%;
  margin-top: 1rem; /* Use rem */
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden; /* Prevent image overflow */
}

.banner-content::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.3); /* Semi-transparent black overlay */
}

.banner-title {
  position: relative; /* Important for stacking context */
  z-index: 1; /* Ensure text is above overlay */
  color: white;
  text-align: center;
}

.banner-title-text {
  max-width: 30rem; /* Use rem */
  margin: 0 auto;
  color: white; /* Ensure text is visible */
}

/* Typography */
h3 {
  font-size: 1.25rem; /* Use rem */
}

.task-text {
  margin: 0;
}

/* Tables */
#tasks-table {
  margin: 0;
  width: 100%;
  border-collapse: collapse;
}

#tasks-table th,
#tasks-table td {
  padding: 0.5rem;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

#tasks-table th {
  background-color: var(--neutral-color);
  font-weight: bold;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.25rem;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1.1;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  transition: background-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.btn-primary {
  background-color: var(--primary-color);
  color: var(--text-color-light);
}

.btn-primary:hover {
  /*background-color: darken(var(--primary-color), 10%);
  filter: brightness(75%)*/
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.2);
}

/* Bootstrap Overrides (if needed) */
.btn-primary {
  --bs-btn-bg: var(--primary-color);
  --bs-btn-border-color: var(--primary-lightened-color);
  --bs-btn-hover-bg: var(--primary-lightened-color);
  --bs-btn-hover-border-color: var(--primary-lightened-color);
  --bs-btn-active-bg: darken(var(--primary-color), 15%);
  --bs-btn-active-border-color: darken(var(--primary-color), 15%);
}

.nav-link {
  --bs-nav-pills-link-active-bg: var(--primary-color);
  color: var(--text-color-dark);
}

/* Form Elements */
.hours {
  width: 6rem;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: var(--border-radius);
}

#week-display,
#daterange,
.time_text {
  width: auto; /* Adjust as needed */
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: var(--border-radius);
}

/* Modals */
.modal-body {
  padding: 1rem;
}

/* Reports */
.report-area {
  min-height: 6rem;
  padding: 1rem;
  border: 1px solid #ddd;
  border-radius: var(--border-radius);
  margin-bottom: 1rem;
}

#report_controls {
  justify-content: space-between;
  align-items: center;
}

.inner-container {
  /* Your styles for the inner container, if any */
  width: 100%; /* Ensure the inner container takes full width of its parent */
  padding-left: var(--bs-gutter-x, .75rem); /* Inherit Bootstrap's horizontal padding */
  padding-right: var(--bs-gutter-x, .75rem);
  margin-left: auto; /* Center the inner container horizontally */
  margin-right: auto;
}

.report-btn {
  width: auto;
  margin-right: 0.5rem;
}

.arrows {
  display: flex;
  padding: 0;
}

/* Date controls - keep all on same line */
.date-controls {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center;
  gap: 0;
}

.date-controls .daterange-input,
.date-controls .btn {
  flex-shrink: 0;
}

.date-controls .btn {
  max-width: 56px;
}

/* Alerts */
#alert_container {
  position: fixed;
  z-index: 1050;
  width: 100%;
  top: 0;
  left: 0;
}

/* User Info */
#user_name {
  margin-bottom: 0;
  padding: var(--bs-nav-link-padding-y) var(--bs-nav-link-padding-x);
  color: var(--bs-navbar-brand-color);
}

.dropdown-item {
  color: var(--bs-navbar-color);
}

/* Controls Column */
.controls_col {
  padding: 0;
  align-items: flex-start;
}

/* Alternating Backgrounds */
.bg-odd-header {
  background-color: lighten(var(--secondary-color), 35%); /* Lighter version of secondary */
  color: var(--text-color-dark);
}

.bg-controls {
  background-color: #E8F1F5;
  padding: 0.5rem;
}

.row-not-top {
  border-top: 1px solid #ddd;
}


.timesheet-table {
  max-width: 1200px;
}

.timesheet-table td input {
  display: inline-block;
}

/* Media Queries */

@media (max-width: 870px) {
  .bg-controls .row {
    flex-wrap: wrap !important;
  }

  .admin-buttons {
    flex-basis: 100% !important;
    margin-top: 0.5rem;
  }

  /* Collapse navbar at 870px instead of 768px */
  .navbar-expand-md .navbar-nav {
    flex-direction: column !important;
  }

  .navbar-expand-md .navbar-collapse {
    display: none !important;
  }

  .navbar-expand-md .navbar-collapse.show {
    display: block !important;
  }

  .navbar-expand-md .navbar-toggler {
    display: block !important;
    margin-left: auto !important;
  }
}

@media (max-width: 768px) {
  .row {
    grid-template-columns: 1fr; /* Stack columns on smaller screens */
  }

  #report_controls {
    flex-direction: column;
    align-items: flex-start;
  }

  .report-btn {
    width: 100%;
    max-width: 200px;
    margin-bottom: 0.5rem;
  }

  /* Login page mobile styles */
  .h2-md {
    font-size: 1.25rem; /* Smaller on mobile */
  }

  .container {
    padding: 0.5rem; /* Reduce padding on mobile */
  }

  /* Make input fields more touch-friendly */
  .form-control {
    min-height: 44px; /* Touch target size */
    font-size: 16px; /* Prevent zoom on iOS */
  }

  /* Button improvements for mobile */
  .btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
    min-height: 44px;
  }

  /* Modal improvements for mobile */
  .modal-dialog {
    margin: 0.5rem;
  }

  .modal-content {
    border-radius: 0.5rem;
  }

  /* Improve spacing in login form */
  .bg-odd-content {
    padding: 0.5rem;
  }

  .bg-light {
    padding: 0.75rem !important;
  }

  /* Timesheet mobile improvements */
  .timesheet-table {
    font-size: 0.875rem;
    min-width: 800px; /* Ensure table doesn't get too compressed */
  }

  .timesheet-table th,
  .timesheet-table td {
    padding: 0.5rem 0.25rem;
    vertical-align: middle;
  }

  .sticky-col {
    min-width: 120px;
    max-width: 150px;
    word-wrap: break-word;
  }

  .day-col {
    min-width: 60px;
    width: 80px;
  }

  .total-col,
  .balance-col {
    min-width: 80px;
    width: 90px;
  }

  /* Make input fields touch-friendly in timesheet */
  .timesheet-table input.hours {
    width: 100%;
    min-width: 50px;
    font-size: 14px;
    padding: 0.25rem;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
  }

  /* Responsive table container */
  .table-responsive {
    border-radius: 0.375rem;
    border: 1px solid #dee2e6;
  }

  /* Control buttons responsive layout */
  .report-btn {
    white-space: nowrap;
    font-size: 0.875rem;
  }

  /* Date range input sizing */
  .daterange-input {
    max-width: 200px;
    flex-shrink: 0;
  }


  /* Mobile responsive for date selector and arrows */
  @media (max-width: 768px) {
    .daterange-input {
      max-width: 180px;
      font-size: 0.875rem;
    }
  }

  /* Modal improvements for mobile */
  .modal-dialog {
    margin: 0.5rem;
    max-width: calc(100% - 1rem);
  }

  .modal-lg {
    max-width: calc(100% - 1rem);
  }
}

/* Desktop styles for login labels */
@media (min-width: 769px) {
  .h2-md {
    font-size: 1.5rem; /* H2 size on desktop */
  }
}
