body {
    font-family: Verdana, Arial, sans-serif;
    margin: 0;
    padding: 0 20px 44px 20px;
    background-color: #f9f9f9;
  }

  .app-header {
    align-items: center;
    background-color: #050505;
    border-bottom: 1px solid #222;
    box-sizing: border-box;
    display: flex;
    height: 55px;
    justify-content: space-between;
    margin: 0 -20px 20px -20px;
    padding: 0 20px;
  }

  .app-brand {
    align-items: center;
    color: #f4f4f0;
    display: inline-flex;
    gap: 10px;
    height: 55px;
    min-width: 0;
    text-decoration: none;
  }

  .app-brand:hover,
  .app-brand:focus {
    color: #fff;
    text-decoration: none;
  }

  .app-logo {
    display: block;
    flex: 0 0 auto;
    height: 34px;
    width: 34px;
  }

  .app-title {
    color: inherit;
    font-family: Impact, "Arial Black", "Arial Narrow", sans-serif;
    font-size: 24px;
    font-style: italic;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1;
    text-decoration: none;
    transform: skew(-8deg);
  }

  .app-nav {
    align-items: center;
    display: flex;
    gap: 8px;
  }

  .logout-button {
    align-items: center;
    background-color: transparent;
    border: 1px solid #4a4a4a;
    color: #f4f4f0;
    display: inline-flex;
    font-size: 18px;
    height: 34px;
    justify-content: center;
    line-height: 1;
    padding: 0;
    text-decoration: none;
    width: 34px;
  }

  .logout-button:hover,
  .logout-button:focus {
    background-color: #982436;
    border-color: #982436;
    color: #fff;
    text-decoration: none;
  }

  .revision-footer {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 900;
    border-top: 1px solid #bababa;
    background-color: #eef1f2;
    color: #555;
    font-size: 10px;
    line-height: 24px;
    padding: 0 12px;
    text-align: right;
  }
  
  table {
    border-collapse: collapse;
    width: 100%;
    border: 1px solid #ccc;
  }
  
  th, td {
    padding: 1px 1px;
    text-align: center;
    font-size: 11px;
  }
  
  th {
    background-color: #f0f0f0;
  }
  
  tr:nth-child(odd) {
    background-color: #e0f7fa;
  }

  td.l {
    text-align: left;
    padding-left: 10px;
    padding-top: 5px;
    padding-bottom: 5px;
    font-weight: bold;
  }
  td.r {
    text-align: right;
    padding-right: 10px;
  }
  td.tl {
    text-align: center;
    padding-right: 10px;
    padding-left: 3px;
  }

  #loadingSpinner {
    display: flex;
    position: fixed;
    top: 50%;
    left: 50%;
    width: 80%;
    height: 80%;
    transform: translate(-50%, -50%);
    background-color: rgba(255, 255, 255, 0.8); /* white overlay with transparency */
    border: 4px solid #982436;
    border-radius: 10px;
    z-index: 9999; /* make sure it's on top */
    text-align: center;
    align-items: center;
    justify-content: center;
    padding-top: 20%;
    font-size: 1.5em;
    color: #982436;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  }	

  .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.4);
  }

  .modal-header {
    color: #982436;
    text-transform: uppercase;
    font-size: 13px;
  }

  .modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 30px;
    border: 2px solid #982436;
    width: 50%;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    border-radius: 8px;
  }

  .modal-content label {
    text-transform: uppercase;
    font-size: 10px;
    text-transform: uppercase;
  }

  .modal-content button {
    font-size: 12px;
    text-transform: uppercase;
    background-color: #982436;
    color: #bababa;
  }

  #activityChart {
    max-height: 200px;
  }

  .repeat-segments {
    margin-left: 20px;
    margin-right: 20px;
  }

  .segment-row, .repeat-block {
    position: relative;
    padding: 15px;
    border: 1px dashed #982436;
    margin: 15px 0;
    background-color: #fdf7f7;
  }

  .remove-segment, .remove-repeat {
    position: absolute;
    top: 5px;
    right: 5px;
    background: transparent;
    border: none;
    color: #982436;
    font-size: 16px;
    cursor: pointer;
    transition: color 0.3s;
  }

  .remove-segment:hover, .remove-repeat:hover {
    color: #c40000;
}

  .segment-row label, .repeat-block label {
    display: inline-block;
    min-width: 80px;
    font-weight: bold;
    margin-right: 5px;
  }

  .segment-row input, .segment-row select, .segment-row textarea {
    font-size: 10px;
    margin: 5px 8px 10px 0;
    padding: 3px;
  }

  .segment-input-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
  }

  .repeat-header {
    gap: 10px;
    margin-bottom: 10px;
    font-weight: bold;
  }

  .close-button {
    float: right;
    font-size: 28px;
    font-weight: bold;
    color: #982436;
    cursor: pointer;
  }

  .status-indicator {
    border-radius: 50%;
    border-style: solid;
    border-width: 3px;
    box-sizing: content-box;
    display: inline-block;
    font-size: 0;
    height: 5px;
    overflow: hidden;
    position: relative;
    top: 1px;
    width: 5px;
  }

.status-indicator-good {
    background: #6ab54e;
    border-color: #cce3c4;
}
.status-indicator-high {
    background: #dc143c;
    border-color: #e098a6;
}
.status-indicator-optimal {
    background: #6ab54e;
    border-color: #cce3c4;
}
.status-indicator-gray {
    background: #999;
    border-color: #dadada;
}
.status-indicator-fresh {
    background: #79baec;
    border-color: #cce2f2;
}

  #oldloadingSpinner {
    font-weight: bold;
    color: #982436;
    text-align: center;
    margin-top: 1em;
  }  

  .panel-title {
    padding-left: 5;
  }

  .panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    font-size: 12px;
    margin-bottom: 10px;
    border: 1px solid #bababa;
    color: 982436;
    text-transform: uppercase;
    line-height: 18px;
    background-color: #eef1f2;
    padding: 0;
    margin: 0;
    padding-top: 5;
    padding-bottom: 5;
  }

  .panel-actions {
    display: flex;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 11px;
  }

  .panel-actions li {
    cursor: pointer !important;
    text-decoration: none;
    color: #982436;
    font-weight: normal;
    border-left: 1px solid #bababa;
    padding: 5;
  } 

  .panel-actions li:hover {
     text-decoration: underline;
     background-color: #bababa;
   }

   .week-separator-row {
    background-color: #f5f0eb;
    font-weight: bold;
    font-size: 14px;
    text-align: left;
    padding: 8px;
    border-top: 2px solid #ccc;
  }

  #activity-summary {
    width: 100%;
    padding: 0;
    margin: 0 auto 20px auto;
  }

  .activity-summary {
    display: flex;
    flex-wrap: wrap;
    padding: 0;
    list-style: none;
    margin: 0;
    justify-content: space-between;
  }
  
  .activity-summary li {
    flex: 1 1 auto;
    min-width: 70px;
    background: #f9f9f9;
    padding: 6px 10px;
    font-size: 11px;
    box-sizing: border-box;
    border: 0.5px solid #ccc;
    margin: 2px;
  }

  .range-selector {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #982436;
  }

  .sidebar {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 30%;
  }

  .flex-container {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 40px;
  }
  .activity-table {
    flex: 1;
    max-width: 70%;
  }
  .chart-container {
    flex: 1;
    max-width: 100%;
    text-align: center;
  }
  #ctlChart.fullscreen {
    width: 100%;
    height: 600px;
  }
