/* load 300, 400 and 700 */
@import url('https://fonts.googleapis.com/css2?family=Roboto+Condensed:wght@300;400;700&display=swap');
/* Roboto Condensed loaded via Google Fonts import */

:root {
    --background-color: #e2e2e2;
    --font-color: #2d2d2d;
  }

/* Reset some defaults */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

  /* Anchors the content within the layout so only the inner area scrolls */
.body-wrapper {
  position: relative;
  height: calc(100vh - 120px); /* adjust if header/footer sizes differ */
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

/* optional: prevent page-level scroll when body-wrapper exists */
html, body {
  height: 100%;
  overflow: hidden;
}

/* Separator Styling */
.divider {
    border-top: 1px solid #e2e2e2;
    margin: 8px 0px;
  }

  .accordion-divider {
    border-top: 1px solid #e2e2e2;
    margin: 8px auto;
    width: 98%;
  }

/* Body styling */
body {
  margin: 0;
  font-family: 'Roboto Condensed', sans-serif;
  color: #2d2d2d;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px;
  box-sizing: border-box;
}

body.login-page {
    background: #ffffff;
  }

  body.dashboard-page {
    background: color-mix(in srgb, white 75%, var(--background-color)) !important;
  }

  .custom_link {
    font-family: 'Roboto Condensed', sans-serif;
    font-weight: 300;
    text-decoration: none;
    color: #0003b9;
    transition: color 0.2s ease-out, font-weight 0.2s ease-out;
  }

  .custom_link:hover {
    color: #c93737;
    font-weight: bold;
    transition: color 0.2s ease-out, font-weight 0.2s ease-out;
  }

  .custom_link2 {
    font-family: 'Roboto Condensed', sans-serif;
    font-weight: 500;
    text-decoration: none;
    color: #0003b9;
    font-size: 13px;
  }

  .custom_link2:hover {
    color: #c93737;
    font-weight: bold;
    transition: color 0.2s ease-out, font-weight 0.2s ease-out;
  }

  .remove-branch {
    font-family: 'Roboto Condensed', sans-serif;
    font-weight: 300;
    text-decoration: none;
    color: #0003b9;
    transition: color 0.2s ease-out, font-weight 0.2s ease-out;
  }

  .remove-branch:hover {
    color: #c93737;
    font-weight: bold;
    transition: color 0.2s ease-out, font-weight 0.2s ease-out;
  }

  .show-inv-desc {
    font-family: 'Roboto Condensed', sans-serif;
    font-weight: 300;
    text-decoration: none;
    color: #0003b9;
    transition: color 0.2s ease-out, font-weight 0.2s ease-out;
  }

  .show-inv-desc:hover {
    color: #c93737;
    font-weight: bold;
    transition: color 0.2s ease-out, font-weight 0.2s ease-out;
  }

  .custom_link_smaller {
    font-family: 'Roboto Condensed', sans-serif;
    font-size: small;
    font-weight: 300;
    text-decoration: none;
    color: #0003b9;
    transition: color 0.2s ease-out, font-weight 0.2s ease-out;
  }

  .custom_link_smaller:hover {
    color: #c93737;
    font-weight: bold;
    transition: color 0.2s ease-out, font-weight 0.2s ease-out;
  }

  /* Button styling */
  .custom_button {
    font-family: 'Roboto Condensed', sans-serif;
    width: 50px;
    padding: 10px;
    margin-top: 10px;
    border: none;
    border-radius: 5px;
    background-color: var(--background-color);
    color: #fff;
    text-decoration: none;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.3s ease;
  }

  .custom_button:hover {
    background-color: #c93737;
    color: #fff;
  }

  .save_cancel {
    font-family: 'Roboto Condensed', sans-serif;
    width: 100px;
    padding: 10px;
    margin-top: 20px;
    margin-right: 20px;
    border: none;
    border-radius: 5px;
    background-color: var(--background-color);
    color: #fff;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.3s ease;
  }

  .save_cancel:hover {
    background-color: color-mix(in srgb, rgb(65, 65, 65) 50%, var(--background-color)) !important;
    color: #fff;
  }

  /* Page Info List */
  .info {
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 1em;
    color: #2d2d2d;
    margin-bottom: 10px;
  }

  .info p {
    margin-bottom: 10px;
  }

  /*-------- Icons ------------*/
.plus-button {
  width: 32px;
  height: 32px;

  /* Use the solid SVG to avoid semi-transparent PNG edges */
  -webkit-mask-image: url('/assets/images/icons/circle-plus.png');
          mask-image: url('/assets/images/icons/circle-plus.png');
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
  -webkit-mask-position: center;
          mask-position: center;
  -webkit-mask-size: contain;
          mask-size: contain;

  /* Flat color fill for the icon */
  background-color: var(--background-color);

  /* Nuke UA button chrome so it doesn't tint the mask in modals */
  border: 0;
  box-shadow: none;
  outline: none;
  padding: 0;
  background-image: none;
  appearance: none;
  -webkit-appearance: none;
}

/* Hover color (keeps your existing behavior) */
.plus-button:hover { background-color: #b3261e; }

/* Extra safety inside any modal: prevent blending/filters */
.modal .plus-button {
  filter: none;
  mix-blend-mode: normal;
  background-image: none;
}

.plus-overlay {
  width: 32px;
  height: 32px;
  margin-top: 10px;

  /* Use the solid SVG to avoid semi-transparent PNG edges */
  -webkit-mask-image: url('/assets/images/icons/circle-plus.png');
          mask-image: url('/assets/images/icons/circle-plus.png');
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
  -webkit-mask-position: center;
          mask-position: center;
  -webkit-mask-size: contain;
          mask-size: contain;

  /* Flat color fill for the icon */
  background-color: var(--background-color);

  /* Nuke UA button chrome so it doesn't tint the mask in modals */
  border: 0;
  box-shadow: none;
  outline: none;
  padding: 0;
  background-image: none;
  appearance: none;
  -webkit-appearance: none;
}

/* Hover color (keeps your existing behavior) */
.plus-overlay:hover { background-color: #b3261e; }

/* Extra safety inside any modal: prevent blending/filters */
.modal .plus-overlay {
  filter: none;
  mix-blend-mode: normal;
  background-image: none;
}

  .plus-icon {
    width: 22px;
      height: 22px;
      background-color: var(--background-color);
      -webkit-mask:
        url('/assets/images/icons/circle-plus-solid.svg')
        no-repeat center / contain;
              mask:
        url('/assets/images/icons/circle-plus-solid.svg')
        no-repeat center / contain;
  }

  .search-icon {
    display: none;
    width: 32.5px;
    height: 32.5px;
    margin-top: 10px;
    background-color: var(--background-color);
    -webkit-mask:
      url('/assets/images/icons/search-icon.png')
      no-repeat center / contain;
            mask:
      url('/assets/images/icons/search-icon.png')
      no-repeat center / contain;
  }

  .search-close-icon {
    display: none;
    width: 32.5px;
    height: 32.5px;
    margin-top: 10px;
    background-color: var(--background-color);
    -webkit-mask:
      url('/assets/images/icons/search-close-icon.png')
      no-repeat center / contain;
            mask:
      url('/assets/images/icons/search-close-icon.png')
      no-repeat center / contain;
  }

  .upload-icon {
    width: 32px;
    height: 32px;
    margin-top: 10px;
    background-color: var(--background-color);
    -webkit-mask:
      url('/assets/images/icons/upload-icon.png')
      no-repeat center / contain;
            mask:
      url('/assets/images/icons/upload-icon.png')
      no-repeat center / contain;
  }

  .comment-icon {
    width: 32px;
    height: 32px;
    margin-top: 10px;
    background-color: var(--background-color);
    -webkit-mask:
      url('/assets/images/icons/comment-icon.png')
      no-repeat center / contain;
            mask:
      url('/assets/images/icons/comment-icon.png')
      no-repeat center / contain;
  }

  .comments-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 0;
    margin-bottom: 0px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e5e5;
    box-shadow: 0 1px 4px 0 rgba(0,0,0,0.04);
  }

  .comments-header h3 {
    margin: 0;
    font-size: 1.2em;
    font-weight: 700;
    color: #222;
  }

  #commentsBoardModal .modal-content {
    display: flex;
    flex-direction: column;
    height: 80vh;  /* or whatever fits your modal */
    max-height: 95vh;
  }

  #commentsList {
    overflow-y: auto;
    flex: 1 1 0;
  }

  #openAddCommentModal {
    background: none;
    border: none;
    padding: 0;
    margin-left: 0;
    box-shadow: none;
    outline: none;
    cursor: pointer;
    display: flex;
    align-items: center;
  }

  #openAddCommentModal:focus {
    outline: none;
  }

  .add-comment-icon {
    width: 52px;
    height: 52px;
    background-color: var(--background-color, #000000);
    -webkit-mask: url('/assets/images/icons/add_comment.png') no-repeat center/contain;
    mask: url('/assets/images/icons/add_comment.png') no-repeat center/contain;
    display: block;
  }

  .back-icon {
    width: 2em;
    height: 2em;
  }

  .filter-icon {
    width: 32.5px;
    height: 32.5px;
    margin-top: 10px;
    background-color: var(--background-color);
    -webkit-mask:
      url('/assets/images/icons/filter.png')
      no-repeat center / contain;
            mask:
      url('/assets/images/icons/filter.png')
      no-repeat center / contain;
  }

  .filter-clear-icon {
    width: 32.5px;
    height: 32.5px;
    margin-top: 10px;
    background-color: var(--background-color);
    -webkit-mask:
      url('/assets/images/icons/filterX.png')
      no-repeat center / contain;
            mask:
      url('/assets/images/icons/filterX.png')
      no-repeat center / contain;
  }

/* Container for the signup form */
.signup-container {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  text-align: center;
}

/* Logo styling */
.logo {
  width: 150px;
  margin: 20px auto;
  display: block;
}

.company-logo {
    max-width: 100px; /* Change this value as needed */
    height: auto; /* Keep aspect ratio */
    padding: 10px;
  }

/* Headings styling */
h1 {
  font-weight: 500;
  font-size: 2em;
  margin-bottom: 10px;
}

h2 {
  font-weight: bold;
  font-size: 1.5em;
  margin-bottom: 10px;
}

/* Paragraph styling */
.signup-container p {
  margin-bottom: 20px;
}

/* Input fields styling */
.signup-container input[type="text"],
.signup-container input[type="email"],
.signup-container input[type="password"],
.signup-container input[type="tel"],
.login-container input[type="email"],
.login-container input[type="password"] {
  width: 100%;
  max-width: 350px; /* Uniform width */
  padding: 10px;
  margin: 10px 0;
  border: 1px solid #e2e2e2;
  border-radius: 5px;
  font-size: 1em;
  outline: none;
}

/* Placeholder styling: Roboto Condensed Bold and same color as border */
.signup-container input::placeholder {
  font-family: 'Roboto Condensed', sans-serif;
  font-weight: 500;
  color: #9e9e9e;
}

/* Button styling */
.signup-container button,
.login-container button {
  width: 100%;
  max-width: 350px;
  padding: 10px;
  margin: 20px 0;
  border: 1px solid #b4b4b4;
  border-radius: 5px;
  background-color: #e2e2e2;
  color: #2d2d2d;
  font-size: 1em;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.signup-container button:hover,
.login-container button:hover {
  background-color: #c93737;
  color: #fff;
}

/* Make the first (placeholder) option in dropdowns grey */
.signup-container select:required:invalid,
.signup-container select option[disabled] {
  color: #9e9e9e;
}
.signup-container select option[value=""][disabled] {
  color: #9e9e9e;
}

/* When a real option is chosen, use normal text color */
.signup-container select {
  color: #2d2d2d;
}
.signup-container select:focus {
  border-color: var(--background-color);
  box-shadow: 0 0 5px var(--background-color);
}

/* For dropdown-page (used elsewhere, like new_user.ejs) */
.dropdown-page:required:invalid,
.dropdown-page option[disabled] {
  color: #9e9e9e;
}

/* Use the same container style as the signup page */
.login-container {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    text-align: center;
  }

  /* Ensure inputs and button inherit the existing styling from .signup-container styles */
  /* (Assuming your inputs and buttons already have the desired styling from the signup CSS) */

  /* Style the login links to be vertical, no decoration, and matching text color */
  .login-links a {
    display: block;
    text-decoration: none;
    color: #0003b9;
    margin: 5px 0;
  }

  .login-links a:hover {
    color: #c93737;
    font-weight: bold;
    transition: color 0.2s ease-out, font-weight 0.2s ease-out;
  }

  /* Style the error message */
  .error-message {
    color: #d32f2f;  /* A red color */
    font-family: 'Roboto Condensed', sans-serif;
    font-weight: 500;
    margin-bottom: 15px;
  }

  /* MAIN PAGE */

  /* The container now fills the entire available space within body padding */
.container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px; /* space between sections */
  }

  /* Navigation Bar */
  .navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    padding: 10px;
    border-radius: 5px;
    /* The navbar will take up only as much height as its content */
  }

  .menu_button {
    display: flex;
    align-items: center;        /* center the plus-overlay inside the link */
    margin: 0;
    cursor: pointer;
    background-color: transparent;
    transition: background-color 0.3s ease, padding 0.3s ease; /* Smooth transition */
    border: none;
}

.menu_button img {
    width: 40px; /* Adjust icon size */
    height: auto; /* Adjust icon size */
    transition: width 0.3s ease, padding 0.3s ease; /* Smooth transition */
}

.menu_button:hover {
    background-color: #ffffff; /* Change to desired highlight color */
    border-radius: 3px; /* Optional: Add border-radius for rounded corners */
    transition: background-color 0.3s ease, padding 0.3s ease; /* Smooth transition */
}

.menu_button img:hover {
    width: 45px; /* Adjust icon size */
    height: auto; /* Adjust icon size */
    transition: width 0.3s ease, padding 0.3s ease; /* Smooth transition */
}

.menu_button:focus,
.menu_button:active {
  background-color: #ffffff;
  outline: none !important;
  box-shadow: none !important;
}

.menu_button .search-icon {
  background-color: var(--background-color); /* ensures no gray or blue */
}

.menu_button:focus .search-icon,
.menu_button:active .search-icon {
  background-color: var(--background-color) !important;
}

  /* Main Area: expands to fill the remaining vertical space */
  .main-area {
    flex: 1;
    display: flex;
    gap: 10px;
    overflow: auto; /* allows scrolling if content overflows */
  }

  /* Side Menu */
  .side-menu {
    width: 20%;
    background: #fff;
    padding: 10px;
    border-radius: 5px;
    overflow-y: auto; /* Allow vertical scrolling when content overflows */
    max-height: 100%; /* Ensure it doesn't exceed its container height */
  }

  .side-menu a {
    display: block;
    text-decoration: none;
    color: #2d2d2d;
    margin: 10px 0;
    background-color: transparent;
    transition: background-color 0.3s ease, padding 0.3s ease; /* Smooth transition */
  }

  .side-menu a:hover {
    background-color: #f4f4f4; /* Change to desired highlight color */
    padding: 2px 4px; /* Optional: Add some padding for better appearance */
    border-radius: 3px; /* Optional: Add border-radius for rounded corners */
	transition: background-color 0.3s ease, padding 0.3s ease; /* Smooth transition */
  }

  .side-menu ul {
    list-style: none;
    margin: 0 5px;
    padding: 0;
  }

  .content {
    flex: 1;
    width: 100%;
    background: #fff;
    padding: 10px;
    border-radius: 5px;
    transition: width 0.3s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  .close-sidebar-button {
    display: none;
  }

  /* Branch selector above the menu */
.branch-form {
  padding: 0 1rem;
  margin-bottom: 1rem;
}
.branch-dropdown {
  padding: 8px 12px;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 16px;
  color: #2d2d2d;
  background-color: #fff;
  border: 1px solid #e2e2e2;
  border-radius: 4px;
  outline: none;
  /* Remove default styling */
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  /* Add a background arrow (optional) */
  background-image: url('/assets/images/icons/down_grey.png');
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 21px;
  width: 100%;
  font-size: 1rem;
  margin-top: 15px;
}

.branch-information-modal-box {
  background: #f5f5f5;
  border-radius: 3px;
  padding: 15px;
  text-align: left;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.branch-information-modal-box p {
  padding-bottom: 10px;
}

  /* Footer */
  .footer {
    background: #fff;
    text-align: center;
    padding: 10px;
    border-radius: 5px;
    /* Footer height determined by content */
  }

  /* Navigation details */
  .navbar-left, .navbar-right {
    display: flex;
    align-items: center;
  }

  .nav-logo {
    max-height: 80px;
  }

  .nav-icon {
    width: 40px;
    height: 40px;
    margin: 0 5px;
    cursor: pointer;
  }

  /* Container for the Company signup form */
.field-container {
    width: 100%;
    max-width: 400px;
    margin: 0 left;
    text-align: left;
  }
  /* Input fields styling */
.field-container input[type="text"],
.field-container input[type="tel"] {
  width: 100%;
  max-width: 350px; /* Uniform width */
  padding: 10px;
  margin: 10px 0;
  border: 1px solid #e2e2e2;
  border-radius: 5px;
  font-size: 1em;
  outline: none;
}

/* Placeholder styling: Roboto Condensed Bold and same color as border */
.field-container input::placeholder {
  font-family: 'Roboto Condensed', sans-serif;
  font-weight: 500;
  color: #9e9e9e;
}

/* Button styling */
.field-container button {
  width: 100%;
  max-width: 350px;
  padding: 10px;
  margin: 20px 0;
  border: 1px solid #b4b4b4;
  border-radius: 5px;
  background-color: #e2e2e2;
  font-family: 'Roboto Condensed', sans-serif;
  font-weight: 300;
  color: #2d2d2d;
  font-size: 1em;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.field-container button:hover {
  background-color:#c93737;
  color: #fff;
}

/* Hide the actual file input */
input[type="file"] {
    display: none;
}

/* Custom file upload button */
.custom-file-upload {
    display: inline-block;
    padding: 10px 20px;
    background-color: #e2e2e2; /* Button background color */
    font-family: 'Roboto Condensed', sans-serif;
    font-weight: 300;
    color: #2d2d2d;             /* Font color */
    font-size: 1em;          /* Font size */
    text-align: center;
    border-radius: 5px;      /* Rounded edges */
    cursor: pointer;
    transition: background-color 0.3s ease;
    border: 1px solid #b4b4b4;
}

/* Hover state for the custom button */
.custom-file-upload:hover {
    background-color: #c93737;
    color: #fff;
}

/* Color Theme Controller */
/* Container for the radio group */
.radio-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
  }

  /* Each option container */
  .radio-option {
    border: 2px solid transparent;
    border-radius: 5px;
    padding: 5px 10px;
    display: flex;
    align-items: center;
    transition: border 0.2s ease;
  }

  /* Hide the default radio appearance if needed */
  .radio-option input[type="radio"] {
    margin-right: 5px;
  }

  /* Style the label to show a pointer cursor */
  .radio-option label {
    cursor: pointer;
    display: flex;
    align-items: center;
  }

  /* Background colors for each option */
  .black-shadow {
    background-color: #2e2e2e;
    color: #fff;
  }
  .red-shadow {
    background-color: #f83267;
    color: #fff;
  }
  .green-shadow {
    background-color: #9fbf4a;
    color: #fff;
  }
  .orange-shadow {
    background-color: #f9730d;
    color: #fff;
  }
  .blue-shadow {
    background-color: #41a5f3;
    color: #fff;
  }
  .darkblue-shadow {
    background-color: #145787;
    color: #fff;
  }

  .grey-shadow {
    background-color: #A2A2A2;
    color: #fff;
  }

  /* Optional: add a hover effect */
  .radio-option:hover {
    border: 2px solid #c93737;
  }

  /* Optional: indicate the selected option with a border */
  .radio-option input[type="radio"]:checked + span {
    border: 2px solid #000;
    padding: 3px;
  }

/* --------------ACCORDION BUTTONS -------------*/
/* ------------- ----------------- ------------ */

/* -------------------------------
   ACCORDION
----------------------------------- */
.accordion {
    background-color: #f4f4f4;
    cursor: pointer;
    padding: 18px 0px 5px 18px;
    width: 100%;
    border: 1px solid #e2e2e2;
    border-radius: 5px;
    text-align: left;
    outline: none;
    transition: background-color 0.4s;
    position: relative;
    margin-bottom: 0px;

}

.accordion.active {
	border-bottom-left-radius: 0px;
	border-bottom-right-radius: 0px;

}

.active, .accordion:hover {
	background-color: #bcbcbc;
}

.accordion:after {
	content: '\25B2';
	transform: rotate(180deg); /* Rotate the triangle upside down */
	color: var(--background-color);
	font-weight: bold;
	float: right;
	margin-left: 5px;
  margin-right: 10px;
}

.active:after {
	content: "\2212";
}

.panel {
    background-color: white;
    max-height: 0px;
    overflow: hidden;
    transition: max-height 0.2s ease-out, border-color 0.2s ease-out;
    border: 1px solid transparent;
    border-radius: 0 0 5px 5px;
    margin-bottom: 0px;
    padding-top: 10px;
}

.panel p {
    margin: 0;
    padding-left: 10px;
  }

  .panel li {
    margin: 0;
    padding-left: 20px;
    padding-bottom: 10px;
  }

  .panel-content p {
    padding: 5px 0px 5px 0px;
  }

  .panel-content ul li {
    list-style: none;
    padding: 0;
    margin-left: -15px;
  }

  .task-details ul li {
    list-style: disc;
    padding: 5px;
    margin-bottom: 20px;
  }

.accordion.active + .panel {
    border-color: #e2e2e2; /* Change border color when panel is revealed */
}

/* -------------------------------
   ACCORDION CLEAR
----------------------------------- */
.accordion-clear {
    background-color: transparent;
    cursor: pointer;
    padding: 18px 0px 5px 18px;
    width: 100%;
    border: 1px solid #e2e2e2;
    border-radius: 5px;
    text-align: left;
    outline: none;
    transition: background-color 0.4s;
    position: relative;
    margin-bottom: 0px;
  }

/* When active, remove bottom border radius */
.accordion-clear.active {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-color: #d3d3d3;
    background-color: #e2e2e2;
  }

  .active, .accordion-clear:hover {
    background-color: #e2e2e2;
  }


/* Arrow indicator for accordion-clear */
.accordion-clear:after {
    content: '\25B2'; /* down arrow */
    transform: rotate(180deg);
    color: var(--background-color);
    font-weight: bold;
    float: right;
    margin-right: 10px;
  }

/* More specific rule for active state */
.accordion-clear.active:after {
    content: "\2212"; /* minus sign */
  }

/* Panel for accordion-clear */
.panel-clear {
    background-color: white;
    max-height: 0px;
    overflow: hidden;
    transition: max-height 0.2s ease-out, border-color 0.2s ease-out;
    border: 1px solid transparent;
    border-radius: 0 0 5px 5px;
    margin-bottom: 0px;
    padding-top: 10px;
  }

.panel-clear p {
    margin: 0;
    padding-left: 20px;
  }

  .panel-clear li {
    margin: 0;
    padding-left: 20px;
    padding-bottom: 10px;
  }


/* When accordion-clear is active, show border on panel-clear */
.accordion-clear.active + .panel-clear {
    border-color: #d3d3d3;
    margin-bottom: 5px;
  }


  /* -------------------------------
   ACCORDION IMAGE
----------------------------------- */

.accordion-image {
  background-color: transparent;
  cursor: pointer;
  width: 100%;
  border: 1px solid #e2e2e2;
  border-radius: 5px;
  text-align: left;
  outline: none;
  transition: background-color 0.4s;
  position: relative;
  margin-bottom: 0px;
  display: flex;
  align-items: center;        /* centers icon & text-block vertically */
  gap: 1rem;                  /* space between icon and text-block */
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  padding-left: 1rem;
  padding-right: 2.5rem; /* space for the icon */
}

/* When active, remove bottom border radius */
.accordion-image.active {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-color: #d3d3d3;
  background-color: #e2e2e2;
}

.active, .accordion-image:hover {
  background-color: #e2e2e2;
}


/* Arrow indicator for accordion-clear */
.accordion-image:after {
  content: '\25B2';               /* your arrow */
  position: absolute;             /* take it out of the flow */
  top: 50%;                       /* vertically center */
  right: 0.75rem;                 /* distance from the right edge */
  transform: translateY(-50%)     /* perfect vertical centering */
             rotate(180deg);      /* flip if you need the “down” state */
  transition: transform 0.3s;
  color: var(--background-color);
  font-weight: bold;
}

/* More specific rule for active state */
.accordion-image.active:after {
  content: "\2212"; /* minus sign */
}

/* Panel for accordion-clear */
.panel-image {
  background-color: white;
  max-height: 0px;
  overflow: hidden;
  transition: max-height 0.2s ease-out, border-color 0.2s ease-out;
  border: 1px solid transparent;
  border-radius: 0 0 5px 5px;
  margin-bottom: 0px;
  padding-top: 10px;
}

.panel-image p {
  margin: 0;
  padding-left: 20px;
}

/* When accordion-clear is active, show border on panel-clear */
.accordion-image.active + .panel-image {
  border-color: #d3d3d3;
  margin-bottom: 5px;
}

.leads-icon {
  width: 72px;
    height: 72px;
    background-color: color-mix(in srgb, rgb(255, 255, 255) 25%, var(--background-color));
    -webkit-mask:
      url('/assets/images/icons/leads_white.png')
      no-repeat center / contain;
            mask:
      url('/assets/images/icons/leads_white.png')
      no-repeat center / contain;

}

.leads-icon:hover {
    background-color: var(--background-color);
}

.sites-icon {
  width: 72px;
    height: 72px;
    background-color: color-mix(in srgb, rgb(255, 255, 255) 25%, var(--background-color));
    -webkit-mask:
      url('/assets/images/icons/sites_white.png')
      no-repeat center / contain;
            mask:
      url('/assets/images/icons/sites_white.png')
      no-repeat center / contain;

}

.sites-icon:hover {
    background-color: var(--background-color);
}

.products-icon {
  width: 72px;
    height: 72px;
    background-color: color-mix(in srgb, rgb(255, 255, 255) 25%, var(--background-color));
    -webkit-mask:
      url('/assets/images/icons/products_white.png')
      no-repeat center / contain;
            mask:
      url('/assets/images/icons/products_white.png')
      no-repeat center / contain;
}

.products-icon:hover {
    background-color: var(--background-color);
}

.stock-icon {
  width: 72px;
    height: 72px;
    background-color: color-mix(in srgb, rgb(255, 255, 255) 25%, var(--background-color));
    -webkit-mask:
      url('/assets/images/icons/stock_white.png')
      no-repeat center / contain;
            mask:
      url('/assets/images/icons/stock_white.png')
      no-repeat center / contain;

}

.stock-icon:hover {
    background-color: var(--background-color);
}

.user-icon {
  width: 72px;
    height: 72px;
    background-color: color-mix(in srgb, rgb(255, 255, 255) 25%, var(--background-color));
    -webkit-mask:
      url('/assets/images/icons/user_white.png')
      no-repeat center / contain;
            mask:
      url('/assets/images/icons/user_white.png')
      no-repeat center / contain;
}

.user-icon:hover {
    background-color: var(--background-color);
}

.supplier-icon {
  width: 72px;
    height: 72px;
    background-color: color-mix(in srgb, rgb(255, 255, 255) 25%, var(--background-color));
    -webkit-mask:
      url('/assets/images/icons/supplier_white.png')
      no-repeat center / contain;
            mask:
      url('/assets/images/icons/supplier_white.png')
      no-repeat center / contain;
}

.supplier-icon:hover {
    background-color: var(--background-color);
}

.inventory-icon {
  width: 72px;
    height: 72px;
    background-color: color-mix(in srgb, rgb(255, 255, 255) 25%, var(--background-color));
    -webkit-mask:
      url('/assets/images/icons/inventory_white.png')
      no-repeat center / contain;
            mask:
      url('/assets/images/icons/inventory_white.png')
      no-repeat center / contain;
}

.inventory-icon:hover {
    background-color: var(--background-color);
}

.payment-icon {
  width: 72px;
    height: 72px;
    background-color: color-mix(in srgb, rgb(255, 255, 255) 25%, var(--background-color));
    -webkit-mask:
      url('/assets/images/icons/payment_white.png')
      no-repeat center / contain;
            mask:
      url('/assets/images/icons/payment_white.png')
      no-repeat center / contain;
}

.payment-icon:hover {
    background-color: var(--background-color);
}

.projects-icon {
  width: 72px;
    height: 72px;
    background-color: color-mix(in srgb, rgb(255, 255, 255) 25%, var(--background-color));
    -webkit-mask:
      url('/assets/images/icons/projects_white.png')
      no-repeat center / contain;
            mask:
      url('/assets/images/icons/projects_white.png')
      no-repeat center / contain;
}

.projects-icon:hover {
    background-color: var(--background-color);
}

.pto-icon {
  width: 72px;
    height: 72px;
    background-color: color-mix(in srgb, rgb(255, 255, 255) 25%, var(--background-color));
    -webkit-mask:
      url('/assets/images/icons/pto_white.png')
      no-repeat center / contain;
            mask:
      url('/assets/images/icons/pto_white.png')
      no-repeat center / contain;
}

.pto-icon:hover {
    background-color: var(--background-color);
}

.deductions-icon {
  width: 72px;
    height: 72px;
    background-color: color-mix(in srgb, rgb(255, 255, 255) 25%, var(--background-color));
    -webkit-mask:
      url('/assets/images/icons/deduction_white.png')
      no-repeat center / contain;
            mask:
      url('/assets/images/icons/deduction_white.png')
      no-repeat center / contain;
}

.deductions-icon:hover {
    background-color: var(--background-color);
}

.employee-icon {
  width: 72px;
    height: 72px;
    background-color: color-mix(in srgb, rgb(255, 255, 255) 25%, var(--background-color));
    -webkit-mask:
      url('/assets/images/icons/employee_white.png')
      no-repeat center / contain;
            mask:
      url('/assets/images/icons/employee_white.png')
      no-repeat center / contain;
}

.employee-icon:hover {
    background-color: var(--background-color);
}

.policy-icon {
  width: 72px;
  height: 72px;
  background-color: color-mix(in srgb, rgb(255, 255, 255) 25%, var(--background-color));
  -webkit-mask:
    url('/assets/images/icons/policy_white.png')
    no-repeat center / contain;
          mask:
    url('/assets/images/icons/policy_white.png')
    no-repeat center / contain;
}

.policy-icon:hover {
    background-color: var(--background-color);
}

.lead-sort-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px;
  background-color: #f4f4f4;
  border-radius: 5px;
  margin-bottom: 10px;
}

/* -------------------------------
   ACCORDION STREAMS
----------------------------------- */

.accordion-stream {
  background-color: #e2e2e2;
  color: #2e2e2e;
  cursor: pointer;
  width: 100%;
  border: 1px solid #fff;
  border-radius: 5px;
  text-align: left;
  outline: none;
  transition: background-color 0.4s;
  position: relative;
  margin-bottom: 0px;
  display: flex;
  align-items: center;        /* centers icon & text-block vertically */
  gap: 1rem;                  /* space between icon and text-block */
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  padding-left: 1rem;
  padding-right: 2.5rem; /* space for the icon */
}

/* When active, remove bottom border radius */
.accordion-stream.active {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-color: #d3d3d3;
  background-color: color-mix(in srgb, white 40%, var(--background-color));
  color: #2e2e2e;
}

.accordion-stream.active,
.accordion-stream:hover {
  background-color: color-mix(in srgb, white 40%, var(--background-color));
  color: #2e2e2e;
}

/* Arrow indicator for accordion-clear */
.accordion-stream:after {
  content: '\25B2';               /* your arrow */
  position: absolute;             /* take it out of the flow */
  top: 50%;                       /* vertically center */
  right: 0.75rem;                 /* distance from the right edge */
  transform: translateY(-50%)     /* perfect vertical centering */
             rotate(180deg);      /* flip if you need the “down” state */
  transition: transform 0.3s;
  color: #2e2e2e;
  font-weight: bold;
}

/* More specific rule for active state */
.accordion-stream.active:after {
  content: "\2212"; /* minus sign */
}

.accordion-stream-title {
  font-family: 'Roboto Condensed', sans-serif;
	font-size: 15px;
	padding-right: 20px;
	font-weight: bold;
  display: inline-flex;    /* or `flex` if you want it to grow */
  align-items: center;     /* vertical centering */
  gap: 0.5rem;
}

.accordion-stream-title .menu_button {
  margin-left: auto;
  display: flex;           /* center the plus-icon inside */
  align-items: center;
}

.accordion-date {
  font-family: 'Roboto Condensed', sans-serif;
}

/* Panel for accordion-clear */
.panel-stream {
  background: #fff;
  border: 1px solid transparent;
  border-top: none;
  border-radius: 0 0 5px 5px;
  max-height: 0;
  overflow: hidden;
  margin-bottom: 0px;
  padding: 0px 15px;
  transition:
    max-height    0.2s ease,
    border-color  0.2s ease,
    margin-bottom 0.2s ease;
  padding-top: 5px; /* Add padding to the top */
}

.panel-stream p {
  margin-top: 0;
  padding-left: 0px;
}

.panel-stream li {
  margin: 0;
  padding-left: 0px;
  padding-bottom: 0px;
}


/* When accordion-clear is active, show border on panel-clear */
.accordion-stream.active + .panel-stream {
  border-color: #d3d3d3;
  max-height: 1000px;
  padding-bottom: 15px;
  padding-top: 5px;
  margin-bottom: 7.5px;
}

/* -------------------------------
   ACCORDION STREAMS INACTIVE
----------------------------------- */
.accordion-stream-complete {
  background-color: #ffffff;
  color: #6e6e6e;
  cursor: pointer;
  width: 100%;
  border: 1px solid #e2e2e2;
  border-radius: 5px;
  text-align: left;
  outline: none;
  transition: background-color 0.4s;
  position: relative;
  margin-bottom: 0px;
  display: flex;
  align-items: center;        /* centers icon & text-block vertically */
  gap: 1rem;                  /* space between icon and text-block */
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  padding-left: 1rem;
  padding-right: 2.5rem; /* space for the icon */
}

/* When active, remove bottom border radius */
.accordion-stream-complete.active {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-color: #d3d3d3;
  background-color: color-mix(in srgb, white 90%, var(--background-color));
  color: #2e2e2e;
}

.accordion-stream-complete.active,
.accordion-stream-complete:hover {
  background-color: color-mix(in srgb, white 90%, var(--background-color));
  color: #2e2e2e;
}

/* Arrow indicator for accordion-clear */
.accordion-stream-complete:after {
  content: '\25B2';               /* your arrow */
  position: absolute;             /* take it out of the flow */
  top: 50%;                       /* vertically center */
  right: 0.75rem;                 /* distance from the right edge */
  transform: translateY(-50%)     /* perfect vertical centering */
             rotate(180deg);      /* flip if you need the “down” state */
  transition: transform 0.3s;
  color: #2e2e2e;
  font-weight: bold;
}

/* More specific rule for active state */
.accordion-stream-complete.active:after {
  content: "\2212"; /* minus sign */
}

.accordion-stream-complete-title {
  font-family: 'Roboto Condensed', sans-serif;
	font-size: 15px;
	padding-right: 20px;
	font-weight: bold;
  display: inline-flex;    /* or `flex` if you want it to grow */
  align-items: center;     /* vertical centering */
  gap: 0.5rem;
}

.accordion-stream-complete-title .menu_button {
  margin-left: auto;
  display: flex;           /* center the plus-icon inside */
  align-items: center;
}

/* Panel for accordion-clear */
.panel-stream-complete {
  background: #fff;
  border: 1px solid transparent;
  border-top: none;
  border-radius: 0 0 5px 5px;
  max-height: 0;
  overflow: hidden;
  margin-bottom: 0px;
  padding: 0px 15px;
  transition:
    max-height    0.2s ease,
    border-color  0.2s ease,
    margin-bottom 0.2s ease;
  padding-top: 5px; /* Add padding to the top */
}

.panel-stream-complete p {
  margin-top: 0;
  padding-left: 0px;
}

.panel-stream-complete li {
  margin: 0;
  padding-left: 0px;
  padding-bottom: 0px;
}

/* When accordion-clear is active, show border on panel-clear */
.accordion-stream-complete.active + .panel-stream-complete {
  border-color: #d3d3d3;
  max-height: 1000px;
  padding-bottom: 15px;
  padding-top: 5px;
  margin-bottom: 7.5px;
}


/* --------------- ICONS - STREAM -----------------------*/
/* --- NOTES --- */
.icon-note {
  width: 42px;
    height: 42px;
    background-color: var(--background-color);
    -webkit-mask:
      url('/assets/images/icons/note_white.png')
      no-repeat center / contain;
            mask:
      url('/assets/images/icons/note_white.png')
      no-repeat center / contain;

}

.accordion-stream:hover .icon-note,
.accordion-stream.active .icon-note {
  background-color: #fff;
}

.icon-note:hover,
.icon-note:focus {
  background-color: var(--background-color);
}

/* --- MILESTONES --- */
.icon-milestone {
  width: 82px;
    height: 82px;
    background-color: var(--background-color);
    -webkit-mask:
      url('/assets/images/icons/milestone_white.png')
      no-repeat center / contain;
            mask:
      url('/assets/images/icons/milestone_white.png')
      no-repeat center / contain;

}

.accordion-stream:hover .icon-milestone,
.accordion-stream.active .icon-milestone {
  background-color: #fff;
}

.icon-milestone:hover,
.icon-milestone:focus {
  background-color: var(--background-color);
}

.icon-milestone-complete {
  width: 82px;
    height: 82px;
    background-color: color-mix(in srgb, white 50%, var(--background-color));
    -webkit-mask:
      url('/assets/images/icons/milestone_white.png')
      no-repeat center / contain;
            mask:
      url('/assets/images/icons/milestone_white.png')
      no-repeat center / contain;

}

.accordion-stream-complete:hover .icon-milestone,
.accordion-stream-complete.active .icon-milestone {
  background-color: #fff;
}

.icon-milestone-complete:hover,
.icon-milestone-complete:focus {
  background-color: color-mix(in srgb, white 30%, var(--background-color));
}



.milestone_button {
    border-radius: 3px; /* Optional: Add border-radius for rounded corners */
    transition: background-color 0.3s ease, padding 0.3s ease; /* Smooth transition */
}

/* --- VIDEO --- */
.icon-video {
  width: 42px;
    height: 42px;
    background-color: var(--background-color);
    -webkit-mask:
      url('/assets/images/icons/video_white.png')
      no-repeat center / contain;
            mask:
      url('/assets/images/icons/video_white.png')
      no-repeat center / contain;

}

.accordion-stream:hover .icon-video,
.accordion-stream.active .icon-video {
  background-color: #fff;
}

.icon-video:hover,
.icon-video:focus {
  background-color: var(--background-color);
}

/* --- VIDEO2 --- */
.icon-video2 {
  width: 90px;
    height: 90px;
    background-color: var(--background-color);
    -webkit-mask:
      url('/assets/images/icons/video.png')
      no-repeat center / contain;
            mask:
      url('/assets/images/icons/video.png')
      no-repeat center / contain;

}

/* --- DOCUMENT --- */
.icon-document {
  width: 42px;
    height: 42px;
    background-color: var(--background-color);
    -webkit-mask:
      url('/assets/images/icons/document_white.png')
      no-repeat center / contain;
            mask:
      url('/assets/images/icons/document_white.png')
      no-repeat center / contain;

}

.accordion-stream:hover .icon-document,
.accordion-stream.active .icon-document {
  background-color: #fff;
}

.icon-document:hover,
.icon-document:focus {
  background-color: var(--background-color);
}

/* --- DOCUMENT 2 --- */
.icon-document2 {
  width: 90px;
    height: 90px;
    background-color: var(--background-color);
    -webkit-mask:
      url('/assets/images/icons/document_white.png')
      no-repeat center / contain;
            mask:
      url('/assets/images/icons/document_white.png')
      no-repeat center / contain;

}

/* --- TASK --- */
.icon-task {
  width: 42px;
    height: 42px;
    background-color: var(--background-color);
    -webkit-mask:
      url('/assets/images/icons/task_white.png')
      no-repeat center / contain;
            mask:
      url('/assets/images/icons/task_white.png')
      no-repeat center / contain;

}

.accordion-stream:hover .icon-task,
.accordion-stream.active .icon-task {
  background-color: #fff;
}

.icon-task:hover,
.icon-task:focus {
  background-color: var(--background-color);
}

.icon-task-complete {
  width: 42px;
    height: 42px;
    background-color: color-mix(in srgb, white 50%, var(--background-color));
    -webkit-mask:
      url('/assets/images/icons/task_white.png')
      no-repeat center / contain;
            mask:
      url('/assets/images/icons/task_white.png')
      no-repeat center / contain;

}

.accordion-stream-complete:hover .icon-task-complete,
.accordion-stream-complete.active .icon-task-complete {
  background-color: color-mix(in srgb, white 50%, var(--background-color));
}

.icon-task-complete:hover,
.icon-task-complete:focus {
  background-color: color-mix(in srgb, white 30%, var(--background-color));
}



.accordion-content {
  display: flex;
  flex-direction: column;     /* stack title, actions, assigned in three lines */
  justify-content: center;    /* center that stack vertically relative to the button */
  line-height: 1.4;           /* adjust spacing between lines */
}

/* note body */
.note-body {
  margin-bottom: 1rem;
  line-height: 1.5;
  color: #333;
}

/* metadata */
.note-meta {
  font-size: 0.85em;
  color: #2e2e2e;
  margin: 0.15em 0;
}

.char-count {
  font-size: 0.9em;
  color: #666;
  text-align: right;
  margin: 0.25em 5%;
}

.video-thumb {
  width: 50%;
  height: 200px;
  background-color: #f0f0f0;
  border: 1px solid #e2e2e2;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color .2s, box-shadow .2s;
  position: relative;
  margin: 0 auto 1em;
  flex-direction: column;
}

.video-thumb:hover {
  background-color: color-mix(in srgb, white 40%, var(--background-color));;
}

.video-thumb:hover .icon-video2 {
  color: #fff;
  background-color: #fff;
}

.video-thumb span {
  margin-top: 0.5em;
  font-family: 'Roboto Condensed', sans-serif;
  /* match the icon’s default color */
  color: var(--background-color);
  transition: color 0.2s ease;
}

.video-thumb:hover span {
  color: #fff;
}

.doc-thumb {
  width: 50%;
  height: 200px;
  background-color: #f0f0f0;
  border: 1px solid #e2e2e2;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color .2s, box-shadow .2s;
  position: relative;
  margin: 0 auto 1em;
  flex-direction: column;
}

.doc-thumb:hover {
  background-color: color-mix(in srgb, white 40%, var(--background-color));;
}

.doc-thumb:hover .icon-document2 {
  color: #fff;
  background-color: #fff;
}

.doc-thumb span {
  margin-top: 0.5em;
  font-family: 'Roboto Condensed', sans-serif;
  /* match the icon’s default color */
  color: var(--background-color);
  transition: color 0.2s ease;
}

.doc-thumb:hover span {
  color: #fff;
}

/* ────────────────────────────────────────────────
   Make UL/OL bullets align with normal text
──────────────────────────────────────────────── */
.panel-stream .panel-content ul,
.panel-stream .panel-content ol,
.panel-image .panel-content ul,
.panel-image .panel-content ol {
  display: block;
  padding-left: 20px;
  list-style-position: outside;
}

/* tighten up list items a bit */
.panel-stream .panel-content li,
.panel-image .panel-content li {
  margin: 0.25em 0;           /* small gap between items */
}

/* -------------------------------
   ACCORDION INVISIBLE
----------------------------------- */
.accordion-invisible {
    background-color: white;
    cursor: pointer;
    padding: 18px 0px 5px 18px;
    width: 100%;
	border-top: none;
	border-right: none;
	border-left: none;
	border-bottom: 1px solid var(--background-color); /* Change border color when panel is revealed */
    text-align: left;
    outline: none;
	position: relative;
}

.accordion-invisible.active {
	border-bottom-left-radius: 0px;
	border-bottom-right-radius: 0px;
}

.accordion-invisible:after {
	content: '\25B2';
	transform: rotate(180deg); /* Rotate the triangle upside down */
	color: var(--background-color);
	font-weight: bold;
	float: right;
	margin-left: 5px;
}

.active:after {
	content: "\2212";
}

.panel-invisible {
    padding: 0 18px;
    background-color: transparent;
	max-height: 0;
    overflow: hidden;
    transition: max-height 0.2s ease-out, border-color 0.2s ease-out; /* Add border-color transition */
    border: 1px solid transparent; /* Initially set border color to transparent */
    border-radius: 0px; /* Optional: Add border-radius for rounded corners */
	margin-bottom: 5px;
}

.accordion-invisible.active + .panel-invisible {
    border-bottom-color: #f4f4f4; /* Change border color when panel is revealed */
}

/* -------------------------------
   ACCORDION INVISIBLE (WITH IMAGE)
----------------------------------- */
.accordion-invisible-image {
  /* same base look as invisible, but with flex + icon */
  background-color: white;
  cursor: pointer;
  padding: 18px 0px 5px 18px;
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--background-color);
  text-align: left;
  outline: none;
  position: relative;

  display: flex;
  align-items: center;
  gap: 12px;
}
.accordion-invisible-image.active {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}
/* keep the chevron using the same pseudo-element trick */
.accordion-invisible-image::after {
  content: '\25B2';
  transform: rotate(180deg);
  color: var(--background-color);
  font-weight: bold;
  margin-left: auto; /* pushes chevron to the far right in flex */
  padding-right: 12px;
}
.accordion-invisible-image.active::after {
  content: "\2212";
}

.accordion-invisible-image .accordion-invisible-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 48px;
}

/* Base icon class used inside the button. Do NOT force size here. */
.accordion-invisible-image .accordion-icon {
  display: inline-block;
  flex-shrink: 0;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

/* ------------- Accordion Buttons Content ------------ */

.accordion-title {
  font-family: 'Roboto Condensed', sans-serif;
	font-size: 15px;
	color: #2d2d2d;
	padding-right: 20px;
	font-weight: bold;
  display: inline-flex;    /* or `flex` if you want it to grow */
  align-items: center;     /* vertical centering */
  gap: 0.5rem;
}

.accordion-title .menu_button {
  margin-left: auto;
  display: flex;           /* center the plus-icon inside */
  align-items: center;
}

.accordion-status {
  font-family: 'Roboto Condensed', sans-serif;
    display: block;
    width: 100%;
    margin-top: 5px; /* adjust spacing as needed */
    color: #2d2d2d;
  }

.accordion-status a {
    font-family: 'Roboto Condensed', sans-serif;
	font-size: 13px;
	color: #0003b9;
	text-decoration: none;
}

.status_divider {
    padding: 0px 20px 0px 20px;
}

.accordion-status a:hover {
	color: #c93737;
	font-weight: bold;
	transition: color 0.2s ease-out, font-weight 0.2s ease-out;
}

.accordion-link {
  display: block;
  width: 100%;
  margin-top: 0px; /* adjust spacing as needed */
}

.accordion-link a {
  font-family: 'Roboto Condensed', sans-serif;
font-size: 13px;
color: #0003b9;
text-decoration: none;
margin-left: 20px;
}

.accordion-link a:hover {
color: #c93737;
font-weight: bold;
transition: color 0.2s ease-out, font-weight 0.2s ease-out;
}

/* Toggle Button */
.switch {
    position: relative;
    display: inline-block;
    width: 30px;  /* Reduced width */
    height: 14px; /* Reduced height */
    margin-right: 20px;
  }

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

  .slider:before {
    position: absolute;
    content: "";
    height: 7px;  /* Adjusted height */
    width: 7px;   /* Adjusted width */
    left: 4px;     /* Adjusted spacing */
    bottom: 4px;   /* Adjusted spacing */
    background-color: white;
    transition: .4s;
  }

  input:checked + .slider {
    background-color: var(--background-color);
  }

  input:focus + .slider {
    box-shadow: 0 0 1px var(--background-color);
  }

  input:checked + .slider:before {
    transform: translateX(16px); /* Adjust according to new width */
  }

  /* Rounded sliders */
  .slider.round {
    border-radius: 24px;
  }

  .slider.round:before {
    border-radius: 50%;
  }


.subscription-description {
    white-space: pre-line;
  }

.header-wrapper {
    display: flex;
    justify-content: space-between;  /* space between title and controls */
    align-items: center;
    margin-bottom: 5px;
  }

  .header-title {
    flex: 1;  /* title takes left side */
  }

  .header-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .header-controls label{
    display: row;
  }

  .header-controls-buttons {
    display: flex;
    flex-direction: row;
    gap: 14px;
    align-items: center;
    justify-content: flex-end;
  }

  .nav-icon {
    border: none;
    outline: none;
  }

/* Settings Page */
.settings-section {
    margin: 20px 0;
  }

  .settings-section h2 {
    font-size: 1.5em;
    margin-bottom: 10px;
  }

  .settings-section p {
    font-size: 1em;
    margin-bottom: 10px;
  }

.title-wrapper {
  display: flex;
  justify-content: space-between; /* title left, controls right */
  align-items: center;
  flex-wrap: nowrap;              /* never wrap onto a new line */
  width: 100%;
  padding: 0;                /* optional side padding */
  box-sizing: border-box;
}

.page-title {
  flex: 1 1 auto;                 /* grow/shrink as needed */
  overflow: hidden;
  white-space: nowrap;            /* keep on one line */
  text-overflow: ellipsis;        /* truncate with “…” if it overflows */
}

.page-controls {
  flex: 0 0 auto;                 /* only as wide as its contents */
  margin-left: 1rem;              /* small gap from the title */
}

/* ========== BACK BUTTON STYLE (right side) ========== */
.back-button {
  width: 100%;
  text-align: right;
  margin: 12px 0 24px 0; /* adjust as needed for spacing */
}

.back-button .back-icon {
  width: 32px;
  height: 32px;
  vertical-align: middle;
  border-radius: 50%;
  transition: filter 0.17s, box-shadow 0.13s;
  cursor: pointer;
}

.back-button a:hover .back-icon,
.back-button a:focus .back-icon {
  filter: brightness(0.92) drop-shadow(0 2px 8px #bfd7f7);
  box-shadow: 0 2px 10px 0 #e3e7ee;
}

/* -------------------------------
   Modal General Styles
----------------------------------- */
.modal-content h3,
.modal-content-left h3 {
  text-align: center;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed !important;
    z-index: 1000;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    background-color: rgba(0,0,0,0.4);
    transition: opacity 0.15s;
}

.modal-content,
.modal-content-left-borderless {
    position: fixed; /* Key change: always fixed in viewport */
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    box-shadow: 0 4px 40px 0 rgba(33, 40, 62, 0.17);
    border-radius: 5px;
    padding: 20px;
    width: 98vw;
    max-width: 440px;
    min-width: 320px;
    box-sizing: border-box;
    font-family: 'Roboto Condensed', Arial, sans-serif;
    background-color: #fefefe;
    border: 1px solid #888;
    text-align: center;
    max-height: 95vh;
    overflow-y: auto;
}

/* Left-aligned variations */
.modal-content-left {
    text-align: left;
    width: 500px;
    max-width: 90vw;
    background-color: #fff;
    margin: auto;
    padding: 20px;
    border-radius: 8px;
}

.modal-content label {
    text-align: left;
    display: block;
    margin-bottom: 0.5em;
}

.modal-content-left-borderless {
    text-align: left;
    border: none;
    box-shadow: none;
    background: transparent;
    padding: 20px;
}

/* Labels and form containers */
.modal-content .form-container label,
.modal-content-left .form-container label {
    display: block;
    text-align: left;
    margin-bottom: 0.5em;
}

.modal-content .form-container,
.modal-content-left .form-container {
    text-align: left;
}

.modal-content .form-container input,
.modal-content .form-container select,
.modal-content .form-container textarea,
.modal-content .main-editor-content,
.modal-content-left .form-container input,
.modal-content-left .form-container select,
.modal-content-left .form-container textarea,
.modal-content-left .main-editor-content {
    width: 100%;
    max-width: none;
    margin: 0.5em auto;
}

/* Input style */
.modal-input {
    border: 1px solid #e2e2e2;
    border-radius: 5px;
    font-family: 'Roboto Condensed', sans-serif;
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    font-size: 1em;
}

/* your existing button-container stays centered */
.modal-buttons {
  text-align: center;
  margin-top: 5px;
}

/* ============================================================= */
/* UNIVERSAL CLOSE BUTTON FOR MODALS (safe "new-modal" namespace) */
/* ============================================================= */

.new-modal-close-btn {
  position: absolute;
  top: 10px;
  right: 12px;
  appearance: none;
  border: none;
  background: transparent;
  cursor: pointer;
  line-height: 0;
  padding: 0;
  z-index: 5;
}

.new-modal-close-btn i.fa-circle-xmark {
  font-size: 26px;
  color: #7b8a8f;
  transition: transform .12s ease-out, color .12s ease-out;
  text-shadow: 0 1px 0 rgba(255,255,255,.65);
}

.new-modal-close-btn:hover i.fa-circle-xmark {
  transform: scale(1.06);
  color: #145787; /* brand accent */
}

/* -------------------------------
   Milestone Modals & Task Modal Styles
----------------------------------- */
#newMilestoneModal .form-container input[type="datetime-local"] {
  width: 100%;                   /* match the width of your other inputs */
  padding: 10px;                /* same padding as your text inputs */
  margin: 8px 0;                /* some vertical spacing */
  box-sizing: border-box;       /* include padding/border in the width */
  border: 1px solid #e2e2e2;    /* light gray border */
  border-radius: 5px;           /* match your other inputs’ rounding */
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 1em;
}

#newTaskModal .form-container input[type="datetime-local"] {
  width: 100%;                   /* match the width of your other inputs */
  padding: 10px;                /* same padding as your text inputs */
  margin: 8px 0;                /* some vertical spacing */
  box-sizing: border-box;       /* include padding/border in the width */
  border: 1px solid #e2e2e2;    /* light gray border */
  border-radius: 5px;           /* match your other inputs’ rounding */
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 1em;
}

  #passwordError {
    color: #d32f2f !important;
  }

  .close {
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    color: var(--background-color);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    margin-top: -10px;
  }

  .close:hover {
    color: #c93737;
  }


  .medium_button {
    width: 70%;
    max-width: 350px;
    padding: 10px;
    margin: 20px 0;
    border-radius: 5px;
    background-color: var(--background-color);
    border: none;
    color: #fff;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.3s ease;
  }

  .medium_button:hover {
  background-color: #c93737;
  color: #fff;
}

/*Stream Modal Stype*/
/* Modal form fields: 90% width, 5% padding each side, 1px border, rounded corners */
.activity-stream-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

/* Pagination */
.pagination-stream {
  margin-top: 10px;
  text-align: center;
}

.pagination-stream a {
  margin: 0 5px;
  padding: 5px 10px;
  background: none;
  color: var(--background-color);
  font-size: small;
  text-decoration: none;
  border-radius: 3px;
  transition: color 0.3s ease;
}
.pagination-stream a:hover {
  color: #7e7e7e;
  transition: color 0.3s ease;
}
.pagination-stream span {
  margin: 0 5px;
}

.pagination-stream select {
  padding: 5px 10px;
  font-size: small;
  border-radius: 3px;
  border: 1px solid #e2e2e2;
  background-color: #fff;
  color: var(--background-color);
}
.activity-stream-title .pagination-stream {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.activity-stream-title .pagination-stream .pagination-stream-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.activity-stream-title .pagination-stream form {
  margin: 0;
}

/* Rich-text Editor in Modal */
.main-editor-content {
  width: 90%;               /* 90% width inside modal */
  margin: 0 auto;           /* center within form */
}

.text-editor-header {
  background-color: var(--background-color);
  padding: 5px;
  border-radius: 4px 4px 0 0;
}

.text-editor-header .btn {
  border: none;
  background: transparent;
  outline: none;
  margin-right: 5px;
  cursor: pointer;
  font-size: 1.1em;
}

/* highlight any active formatting button */
.text-editor-header .btn.active {
  background-color: rgba(255,255,255,0.2);
  border-radius: 3px;
  padding: 3px 7.5px;
}

.text-editor-header .btn.active::after {
  content: none !important;
}

.text-content {
  min-height: 150px;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 16px;
  color: #2d2d2d;
  border: 1px solid #e2e2e2;
  border-radius: 0 0 5px 5px;
  padding: 10px;
  overflow-y: auto;
  white-space: pre-wrap;
}

.text-content ul {
  list-style-type: disc;      /* default bullets */
  margin-left: 1.5em;         /* indent so you can see the bullets */
}

.text-content ol {
  list-style-type: decimal;   /* default numbering */
  margin-left: 1.5em;         /* indent so you can see the numbers */
}

.fa-solid {
   color: #ffffff;
}

.notification-modal-content .fa-mug-hot {
  color: #999 !important;
}

/* Style for the dropdown select */
.dropdown {
    width: 100%;
    padding: 8px 12px;
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 16px;
    color: #2d2d2d;
    background-color: #fff;
    border: 1px solid #e2e2e2;
    border-radius: 5px;
    outline: none;
    /* Remove default styling */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    /* Add a background arrow (optional) */
    background-image: url('/assets/images/icons/down_grey.png');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 20px;
  }

  /* Optionally, add focus styling */
  .dropdown:focus {
    border-color: var(--background-color);
    box-shadow: 0 0 5px var(--background-color);
  }

  /* Style for the dropdown select */
.dropdown-page {
  width: 100%;
  max-width: 350px;
  padding: 8px 12px;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 16px;
  color: #2d2d2d;
  background-color: #fff;
  border: 1px solid #e2e2e2;
  border-radius: 5px;
  outline: none;
  /* Remove default styling */
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  /* Add a background arrow (optional) */
  background-image: url('/assets/images/icons/down_grey.png');
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 20px;
}

/* Optionally, add focus styling */
.dropdown-page:focus {
  border-color: var(--background-color);
  box-shadow: 0 0 5px var(--background-color);
}

/* Style for the second dropdown select */
.dropdown2 {
  width: 15em;
  padding: 12px;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 16px;
  color: #2d2d2d;
  background-color: #fff;
  border: 1px solid #e2e2e2;
  border-radius: 5px;
  outline: none;
  /* Remove default styling */
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  /* Add a background arrow (optional) */
  background-image: url('/assets/images/icons/down_grey.png');
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 20px;
  margin-right: 20px;
}

/* Optionally, add focus styling */
.dropdown2:focus {
  border-color: var(--background-color);
  box-shadow: 0 0 5px var(--background-color);
}

/* Container for the forms */
.form-container {
    display: block;
    text-align: left;
    margin-bottom: 0.5em;
    margin-top: 10px;
  }

  /* Paragraph styling */
.form-container p {
    margin-bottom: 20px;
  }

  /* Input fields styling */
  .form-container input[type="text"],
  .form-container input[type="url"],
  .form-container input[type="email"],
  .form-container input[type="password"],
  .form-container input[type="tel"],
  .form-container input[type="number"] {
    font-family: 'Roboto Condensed', sans-serif;
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #e2e2e2;
    border-radius: 5px;
    font-size: 1em;
    outline: none;
  }

  .form-container textarea {
    font-family: 'Roboto Condensed', sans-serif;
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #e2e2e2;
    border-radius: 5px;
    font-size: 1em;
    outline: none;
    resize: vertical; /* Allows vertical resizing only */
  }

  .form-container textarea ::placeholder {
    color: #9e9e9e;
    font-family: 'Roboto Condensed', sans-serif;
  }

  /* Input fields styling */
  .form-container-page input[type="text"],
  .form-container-page input[type="url"],
  .form-container-page input[type="email"],
  .form-container-page input[type="password"],
  .form-container-page input[type="tel"],
  .form-container-page input[type="number"] {
    font-family: 'Roboto Condensed', sans-serif;
    width: 100%;
    max-width: 350px; /* Uniform width */
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #e2e2e2;
    border-radius: 5px;
    font-size: 1em;
    outline: none;
  }

  /* -------------- checkbox styling ---------------- */

  /* Hide the native checkbox */
.custom-checkbox {
    position: absolute;
    opacity: 0;
    pointer-events: none;
  }

  /* Style the label to look like a checkbox */
  .custom-checkbox-label {
    position: relative;
    padding-left: 30px; /* space for the custom checkbox */
    cursor: pointer;
    user-select: none;
    font-size: 16px;
    color: #2d2d2d;
    margin-left: 10px;
  }

  /* Create a custom checkbox using a pseudo-element */
  .custom-checkbox-label::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;    /* size of checkbox */
    height: 20px;
    border: 1px solid #e2e2e2;  /* border color */
    border-radius: 4px;      /* rounded corners */
    background-color: #fff;  /* background color */
    box-sizing: border-box;
  }

  /* Change appearance when the checkbox is checked */
  .custom-checkbox:checked + .custom-checkbox-label::before {
    background-color: var(--background-color); /* or any color you want for the checked state */
    border-color: var(--background-color);
  }

  /* Optional: Add a checkmark when checked */
  .custom-checkbox:checked + .custom-checkbox-label::after {
    content: "\2713"; /* Unicode check mark */
    position: absolute;
    left: 4px;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 16px;
  }

  .checkbox-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }
  .checkbox-item {
    display: flex;
    align-items: center;
  }
  .checkbox-item input[type="checkbox"] {
    margin-right: 5px;
  }

  /* ------------------- END CHECKBOX STYLING --------------------- */

  /* Placeholder styling: Roboto Condensed Bold and same color as border */
  .form-container input::placeholder {
    font-family: 'Roboto Condensed', sans-serif;
    font-weight: 500;
    color: #9e9e9e;
  }

    /* Pagination */
    .pagination {
        margin-top: 10px;
        text-align: center;
      }

      .pagination a {
        margin: 0 5px;
        padding: 5px 10px;
        background: none;
        color: var(--background-color);
        font-size: small;
        text-decoration: none;
        border-radius: 3px;
        transition: color 0.3s ease;
      }
      .pagination a:hover {
        color: #7e7e7e;
        transition: color 0.3s ease;
      }
      .pagination span {
        margin: 0 5px;
      }

      .pagination select {
        padding: 5px 10px;
        font-size: small;
        border-radius: 3px;
        border: 1px solid #e2e2e2;
        background-color: #fff;
        color: var(--background-color);
      }

/* --- Search form styling --- */
.search-form {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0; /* No extra space between input and button */
  margin: 0;
  margin-top: 10px;
}

.search-form-mobile {
  position: relative;
  display: none;
  align-items: center;
  gap: 0; /* No extra space between input and button */
  margin: 0;
  margin-top: 10px;
}

.search-input {
  flex: 1 1 auto;
  padding: 8px 34px 8px 10px; /* right: space for the X button */
  height: 38px;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 15px;
  color: #2d2d2d;
  background-color: #fff;
  border: 1px solid #e2e2e2;
  border-radius: 5px;
  outline: none;
  margin: 0;
  box-sizing: border-box;
}

.clear-search-btn {
  position: absolute;
  right: 98px; /* will look correct with most "Search" buttons */
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  background: transparent;
  border: none;
  color: #999;
  font-size: 20px;
  cursor: pointer;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0;
  transition: color 0.2s;
}

.clear-search-btn:hover {
  color: #c93737;
}

.search-submit-btn {
  margin-left: 8px;
  height: 36px;
  font-size: 15px;
  padding: 0 16px;
  background: var(--background-color, #235bb2);
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.search-submit-btn:hover {
  background: #235bb2;
}

/* ------------------- Top Navigation Bar --------------------- */

/* --------------------------
   Desktop Header Styles
--------------------------- */
.desktop-only {
    display: flex;
  }
  .navbar-desktop {
    display: flex;
    justify-content: space-between;  /* Push first child (logo) to left and second child (nav buttons) to right */
    align-items: center;
    width: 100%;
    padding: 10px 20px;
  }
  .navbar-desktop .nav-logo {
    max-height: 50px;
  }
  .navbar-buttons {
    display: flex;
    align-items: center;
  }
  .navbar-buttons .menu_button {
    margin-left: 10px;
  }

  /* --------------------------
     Mobile Header Styles
  --------------------------- */
  .mobile-only {
    display: none;
  }
  .navbar-mobile {
    display: none; /* default hidden; shown in mobile media query */
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0 10px;
  }
  .navbar-mobile .nav-logo {
    max-height: 50px;
  }



  /* --------------------------
     Top Navigation Modal Styles (Mobile)
  --------------------------- */

  /* Top nav links inside modal */
.top-nav-links a {
    display: block;
    text-align: center;
    padding: 10px 0;
    font-family: 'Roboto Condensed', sans-serif;
    text-decoration: none;
    color: var(--font-color);
    border-bottom: 1px solid #e2e2e2;
  }
  .top-nav-links a:last-child {
    border-bottom: none;
  }

/* -------------------------------
   Top Navigation Modal (nav_modal)
----------------------------------- */
.nav_modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 1100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
  }

  .nav_modal-content {
    background-color: #fff;
    margin: 20% auto;
    padding: 20px;
    width: 80%;
    max-width: 400px;
    border: 1px solid #888;
    border-radius: 5px;
    text-align: center;
  }

  .nav_modal-close {
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    color: var(--background-color);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
  }

  /* Grid layout for nav items */
  .nav_modal-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0px;
    justify-items: center;
    align-items: center;
    margin-top: 20px;
  }

  /* Style for each nav item */
  .nav_modal-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--font-color);
    font-family: 'Roboto Condensed', sans-serif;
    padding: 10px;
    background-color: none;
    transition: background-color 0.3s ease;
  }

  /* Icon style within modal items */
  .nav_modal-icon {
    width: 60px;
    height: max;
    margin-bottom: 5px;
  }

/* -------------------------------
   Activity Stream Navbar
----------------------------------- */
  /* container for the 6 navbar buttons, 3 per row */
.navbar-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

/* each button centered, icon above label (if you re-enable labels later) */
.nav-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: .5rem;
  text-decoration: none;
}

/* size your icons consistently */
.nav-icon {
  width: 4.5rem;
  height: 4.5rem;
}

/* optional hover state */
.nav-button:hover .nav-icon {
  transform: scale(1.1);
}

  /* -------------------------------
   My Subscription Page
----------------------------------- */
/* Subscriptions grid container */
.subscription-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

/* Individual subscription card */
.subscription-card {
  border: 1px solid #e2e2e2;
  border-radius: 5px;
  padding: 1.25rem;
  background-color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease;
  position: relative;
}
.subscription-card:hover {
  transform: translateY(-4px);
}

/* Title */
.subscription-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  color: #333;
}

/* Amount */
.subscription-card .amount {
  font-size: 1.1rem;
  font-weight: bold;
  color: #444;
  margin: 0.5rem 0;
}

/* Type badge */
.subscription-card .type {
  text-transform: uppercase;
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 1rem;
}

/* Description title */
.subscription-card .description-title {
  font-weight: 600;
  color: #555;
  margin-bottom: 0.25rem;
}

/* Description text */
.subscription-card .description {
  font-size: 0.95rem;
  color: #555;
  line-height: 1.4;
  margin-bottom: 1rem;
}

/* Optional Select button (if you add one) */
.select-sub-btn {
  align-self: flex-start;
  padding: 0.5rem 1rem;
  background-color: var(--background-color);
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  transition: color 0.2s ease;
}
.select-sub-btn:hover {
  background-color: color-mix(in srgb, white 65%, var(--background-color));
  color:var(--background-color);
  transition: background-color 0.2s ease;
  transition: color 0.2s ease;
}

.reactivate-sub-btn {
  align-self: flex-start;
  padding: 0.5rem 1rem;
  background-color: var(--background-color);
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  transition: color 0.2s ease;
}
.reactivate-sub-btn:hover {
  background-color: color-mix(in srgb, white 65%, var(--background-color));
  color:var(--background-color);
  transition: background-color 0.2s ease;
  transition: color 0.2s ease;
}

.cancel-sub-btn {
  align-self: flex-start;
  padding: 0.5rem 1rem;
  background-color: #b20000;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  transition: color 0.2s ease;
}

.cancel-sub-btn:hover {
  background-color: color-mix(in srgb, white 65%, #b20000);
  color:#fff;
  transition: background-color 0.2s ease;
  transition: color 0.2s ease;
}

.current-badge {
  position: absolute;
  top: 0;
  right: 0;
  background: #41a5f3;
  color: #fff;
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0 4px 0 4px;
}

.current-badge.expired {
  background-color: #b91c1c;
  color: #fee2e2;
  border-radius: 0 4px 0 4px;
  padding: .25rem .5rem;
}

 /* -------------------------------
   Admin Billing Page
----------------------------------- */

/* Header */
.header-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.header-wrapper h2 {
  margin: 0;
  font-size: 1.5rem;
  color: #333;
}

.header-controls .dropdown2 {
  padding: 8px 12px;                   /* same as .search-form input */
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 16px;                     /* same as .search-form input */
  height: 38px;                        /* roughly: 8px top + 8px bottom padding + ~22px text */
  line-height: 1;                      /* ensure no extra line-height tripping you up */
  border: 1px solid #e2e2e2;           /* same border */
  border-radius: 5px;
  background-color: #fff;
  margin: 0;                           /* remove any pesky default margins */
}

.header-controls > form:not(.search-form) {
  display: inline-flex !important;
  align-items: center;
  gap: 0.5rem;        /* space between label & select */
  margin: 0;          /* remove any default form margins */
}

.header-controls input,
.header-controls select {
  box-sizing: border-box;
}

.header-controls label {
  font-size: 0.95rem;
  font-weight: 600;
  color: #555;
}

.header-controls a {
  margin-left: 10px;
}

.header-controls select {
  font-family: 'Roboto Condensed', sans-serif;
  padding: 0.4rem 0.6rem;
  font-size: 0.9rem;
  border: 1px solid #e2e2e2;
  border-radius: 5px;
  background-color: #fff;
  transition: border-color 0.2s ease;
}

.header-controls select:focus {
  outline: none;
  border-color: var(--background-color);
}

/* Table */
.settings-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  background-color: #fff;
}

.settings-table th,
.settings-table td {
  border: 1px solid #e2e2e2;
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.9rem;
  color: #333;
}

.settings-table th {
  background-color: #f9f9f9;
  font-weight: 600;
}

.settings-table tbody tr:nth-child(even) {
  background-color: #fcfcfc;
}

.settings-table tbody tr:hover {
  background-color: #f1f1f1;
}

.pay-status-canceled {
  color: #bbb !important;
}
.pay-status-past-due {
  color: #c93737 !important;
}
.pay-status-current {
  color: #759e0e !important;
}

.table-scroll-x {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch; /* smooth on iOS */
  background: transparent;
}

.table-scroll-x .settings-table {
  min-width: 650px;  /* adjust to your needs, ensures horizontal scroll */
  /* or even higher if you want! */
}

/* Pagination */
#billingPagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

#billingPagination .page-btn {
  padding: 0.4rem 0.8rem;
  background-color: #fff;
  border: 1px solid #e2e2e2;
  border-radius: 4px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

#billingPagination .page-btn:hover {
  background-color: #f9f9f9;
  border-color: #ccc;
}

#billingPagination span {
  font-size: 0.95rem;
  color: #555;
}

/* ---- Lead Form ---- */
.form-field {
  margin-bottom: 1rem;
}

.form-field label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.form-field input,
.form-field textarea {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
}

.form-field textarea {
  min-height: 100px;
}

.submit-button {
  background-color: var(--background-color);
  color: #fff;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color .2s ease;
}

.submit-button:hover {
  filter: brightness(0.9);
}

 /* -------------------------------
   Lead Modal
----------------------------------- */
/* New-Lead Modal */
.new-lead-modal {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}
.new-lead-modal.show {
  display: flex;
}

/* Overlay */
.new-lead-modal__overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
}

/* Content box */
.new-lead-modal__content {
  position: relative;
  background: #fff;
  padding: 2rem;
  border-radius: 8px;
  max-width: 500px;
  width: 90%;
  max-height: 90%;
  overflow-y: auto;
  z-index: 1001;
}

/* Close button */
.new-lead-modal__close {
  position: absolute;
  top: 0.5rem; right: 0.5rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

/* form styles—optionally tweak to match your theme */
.new-lead-form .form-group {
  margin-bottom: 1rem;
}
.new-lead-form .form-group label {
  display: block;
  margin-bottom: 0.25rem;
  font-family: 'Roboto Condensed', sans-serif;
}
.new-lead-form .form-group input,
.new-lead-form .form-group select {
  width: 100%;
  padding: 0.5rem;
  font-family: 'Roboto Condensed', sans-serif;
  border: 1px solid #e2e2e2;
  border-radius: 4px;
}
.new-lead-form .btn-submit {
  padding: 0.5rem 1rem;
  font-family: 'Roboto Condensed', sans-serif;
  background: var(--background-color);
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

/* -------------------------------
   Delete Confirmation Modal
----------------------------------- */
.delete-lead-modal {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.delete-lead-modal__content {
  background: #fff;
  padding: 1.5rem;
  border-radius: 6px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  position: relative;
}

.delete-lead-modal__content .close {
  position: absolute;
  top: 0.5rem; right: 0.5rem;
  font-size: 1.4rem;
  cursor: pointer;
}

.delete-lead-modal__content h3 {
  margin-top: 0;
  font-family: 'Roboto Condensed', sans-serif;
}

.delete-lead-modal__content p {
  margin: 1rem 0;
  font-family: 'Roboto Condensed', sans-serif;
}

.delete-lead-modal__content .save_cancel {
  margin: 0.5rem;
}

/* ——————————————————————————————————————————————
   Permissions on new_role page: two columns
—————————————————————————————————————————————— */
.form-container-page .permissions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

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

.form-container-page .permissions-column h4 {
  margin-bottom: 0.75rem;
  font-size: 1.1em;
  font-weight: 700;
  color: #2d2d2d;
  /* optional underline */
  border-bottom: 1px solid #e2e2e2;
  padding-bottom: 0.25rem;
}

.form-container-page .checkbox-item {
  margin-bottom: 0.5em;
  display: flex;
  align-items: center;
}

.form-container-page .checkbox-item .custom-checkbox-label {
  margin-left: 0.5em;
}
/* ——————————————————————————————————————————————
   ------- Reminder Row -----------------------
—————————————————————————————————————————————— */
.reminder-row {
  display: flex;
  align-items: center;
  gap:   0.5em;
  width: 100%;
  margin-bottom: 0.5em;
}

.reminder-row .reminder-value {
  flex: 0 0 4em;
  height: 2.5em;
  padding: 0 0.5em;
  box-sizing: border-box;
}

.reminder-row .reminder-unit {
  flex: 1 1 auto;
  min-width: 6em;
  height: 2.5em;
  padding: 0 0.75em;
  box-sizing: border-box;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 16px;
  color: #2d2d2d;
  background-color: #fff;
  border: 1px solid #e2e2e2;
  border-radius: 5px;
  outline: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url('/assets/images/icons/down_grey.png');
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 20px;
}

.reminder-row .remove-reminder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2em;
  height: 2.2em;
  min-width: 2.2em;
  min-height: 2.2em;
  max-width: 2.2em;
  max-height: 2.2em;
  padding: 0;
  margin-left: 0.25em;
  font-size: 1em;
  line-height: 1;
  color: #fff;
  background-color: var(--background-color, #7e7e7e);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.18s;
  box-shadow: 0 1px 3px rgba(50,50,70,0.06);
  vertical-align: middle;
}

.reminder-row .remove-reminder i.fa-solid {
  font-size: 1em;
  line-height: 1;
  width: 1em;
  height: 1em;
  display: block;
  text-align: center;
}

.reminder-row .remove-reminder:hover {
  background: #c93737;
}

/* ====================== Task/Comment Pills ====================== */

/* Container to allow pill wrap on multiple lines if needed */
.pills-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em;
  margin-top: 2px;
  margin-bottom: 10px;
}

/* Used for both assignees and referenced streams */
.assignee-item {
  display: flex;
  align-items: center;
  margin-bottom: 0.25em;
  margin-right: 0.5em;
  background: none;
  border: none;
  box-shadow: none;
}

/* The pill itself, for both names and stream titles */
.assignee-item .assignee-name,
.assignee-item .stream-name {
  display: inline-block;
  padding: 0.47em 1.15em 0.47em 1em;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 1em;
  background-color: #f6f6fa;
  color: #232323;
  border: 1px solid #e2e2e2;
  border-radius: 22px;
  box-sizing: border-box;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.1;
}

/* Remove button for both assignees and streams */
.remove-assignee,
.remove-stream,
.remove-attachment {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  margin-left: 10px;
  font-size: 16px;
  color: var(--background-color);
  background-color: var(--background-color, #7e7e7e);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.18s;
  box-shadow: 0 1px 3px rgba(50,50,70,0.05);
}
.remove-assignee:hover,
.remove-stream:hover,
.remove-attachment:hover {
  background: #c93737;
}
.remove-assignee i,
.remove-stream i,
.remove-attachment i {
  pointer-events: none;
}

/* ——— “Add” buttons (task & comments modals) ——— */
.single-button {
  font-family: 'Roboto Condensed', sans-serif;
  width: 100%;
  padding: 10px;
  border: none;
  border-radius: 5px;
  background-color: var(--background-color);
  color: #fff;
  font-size: 1em;
  cursor: pointer;
  transition: background-color 0.3s ease;
}
.single-button:hover {
  background-color: #c93737;
  color: #fff;
}
#newCommentModal #addCommentAssigneeButton,
#newCommentModal #addCommentStreamButton {
  padding: 5px 10px;
  height: 36px;
  line-height: 1.2;
  border: none;
  border-radius: 5px;
  background-color: var(--background-color);
  color: #fff;
  font-size: .9em;
  margin-left: 0;
  margin-right: 0;
  margin-top: 8px;
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
#newCommentModal #addCommentAssigneeButton:hover,
#newCommentModal #addCommentStreamButton:hover {
  background-color: #c93737;
  color: #fff;
}

/* space below the dropdown and add-button */
#taskAssigneeSelect,
#addAssigneeButton {
  margin-bottom: 0.5em;
}

/* ------------ Notification Modal Specific Styles ----------------- */
.notification-modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
  overflow: auto;
}

.notification-modal.show {
  display: block;
}

.notification-modal-content {
  position: relative;
  margin: 5% auto;
  padding: 20px;
  width: 60%;
  max-width: 90%;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.notification-header h3 {
  font-size: 1.5em;
  margin: 0;
  padding: 10px 0;
  text-align: center;
}

.notification-close {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 1.5em;
  font-weight: bold;
  cursor: pointer;
  color: #555;
}

.notification-close:hover {
  color: #c93737;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .notification-modal-content {
    width: 90%;
    margin: 20% auto;
    padding: 15px;
  }

  .notification-header h3 {
    font-size: 1.2em;
  }

  .notification-table th, .notification-table td {
    font-size: 0.9em;
    padding: 8px;
  }

  .notification-table button {
    padding: 6px 10px;
    font-size: 0.9em;
  }

  .notification-table th {
    padding: 8px;
  }

  .notification-table {
    font-size: 0.9em;
  }

  /* Hide the description column on mobile */
  .notification-table .mobile-hide {
    display: none;
  }
}

/* Table styling */
.notification-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
}

.notification-table th, .notification-table td {
  padding: 12px 16px;
  text-align: left;
}

.notification-table th {
  background-color: #f4f4f4;
  font-weight: bold;
  font-size: 1.1em;
  border-bottom: 2px solid #ddd;
}

.notification-table tr {
  margin-bottom: 8px;
  border-bottom: 1px solid #ddd;
}

.notification-table tr:hover {
  background-color: #f1f1f1;
}

.notification-table td {
  vertical-align: middle;
  font-size: 1em;
}

.notification-table td a {
  color: #007bff;
  text-decoration: none;
}

.notification-table td a:hover {
  text-decoration: underline;
}

/* Button cell adjustments */
.notification-table .button-cell {
  width: 45px; /* Fixed width, slightly larger than button */
  text-align: center;
}

/* Button styling */
.notification-table button {
  padding: 10px;
  margin: 2px;
  background-color: var(--background-color);
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notification-table button:hover {
  background-color: color-mix(in srgb, white 25%, var(--background-color));;
}

.notification-table .open-task {
  background-color: var(--background-color);
}

.notification-table .open-task:hover {
  background-color: color-mix(in srgb, black 25%, var(--background-color));
}

.notification-table .complete-task {
  background-color: var(--background-color);
}

.notification-table .complete-task:hover {
  background-color: color-mix(in srgb, black 25%, var(--background-color));
}

/* Icon adjustments */
.notification-table button i {
  font-size: 20px;
}

.notification-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  background-color: #f8f8f8;
  border-bottom: 1px solid #ddd;
}

.notification-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
}

.notification-toggle span {
  font-size: 0.9em;
  color: #555;
}

.modal-task-title {
  text-align: center;
  margin-bottom: 1em;
}

#taskDetailsModal .modal-buttons {
  display: flex;
  justify-content: center;
  margin-top: 10px;
}

#taskDetailsModal ul {
  margin-left: 1.2em;
}

#complete-link {
  text-decoration: none;
  background-color: transparent;
}

#complete-milestone-link {
  text-decoration: none;
  background-color: transparent;
}

.complete-task-btn {
  background-color: none;
  color: white;
  padding: 15px 10px;
  border-style: none;
  border-radius: 5px;
}

.complete-task-btn:hover {
  background-color: none;
}


/* ——————————————————————————————————————————————
   ------- Payment Method -----------------------
—————————————————————————————————————————————— */
.payment-method-choice {
  margin: 2em 0 1em 0;
  text-align: center;
}
.method-options {
  display: flex;
  justify-content: center;
  gap: 2em;
  margin-top: 1em;
}
.choose-method-btn {
  background: #fff;
  border: 1px solid var(--background-color);
  color: #222;
  padding: 2em 2em 1.5em 2em;
  border-radius: 1em;
  cursor: pointer;
  font-size: 1.15em;
  min-width: 150px;
  transition: box-shadow 0.18s, border-color 0.18s, background 0.18s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6em;
}
.choose-method-btn i {
  font-size: 2em;
  color: var(--background-color);
  margin-bottom: 0.25em;
}
.choose-method-btn:hover,
.choose-method-btn.selected {
  background: color-mix(in srgb, white 95%, var(--background-color));
  border-color: var(--background-color);
  box-shadow: 0 2px 8px color-mix(in srgb, white 15%, var(--background-color));
}

/* Payment Forms Styling */
.payment-form {
  max-width: 340px;
  margin: 0 auto;
}
.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.35em;
  margin-bottom: 1em;
}
.form-row label {
  display: flex;
  flex-direction: column;  /* stack label text and field */
  gap: 4px;                /* small space between them */
}
.form-row label select {
  margin-top: 0;
}
.payment-form label {
  font-weight: 600;
  font-size: 1em;
  margin-bottom: 0.2em;
}
.payment-form input[type="text"],
.payment-form input[type="password"] {
  padding: .8em 0.8em;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 1em;
  background: #f9f9f9;
  transition: border 0.2s;
}
.payment-form input[type="text"]:focus,
.payment-form input[type="password"]:focus {
  outline: none;
}
.checkbox-row {
  flex-direction: row;
  align-items: center;
  margin-bottom: 1em;
}
.checkbox-row label {
  font-weight: 400;
  color: #333;
  margin: 0;
}
.primary-btn {
  width: 100%;
  padding: 0.7em 0;
  font-size: 1.05em;
  font-weight: 700;
  color: #fff;
  background: var(--background-color);
  border: none;
  border-radius: 7px;
  box-shadow: 0 1px 4px 0 #eee;
  cursor: pointer;
  transition: background 0.18s;
}
.primary-btn:hover, .primary-btn:focus {
  background: color-mix(in srgb, white 15%, var(--background-color));
}

/* Stripe Elements Styling */
.stripe-input {
  background: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 12px 14px;
  width: 100%;
  margin-bottom: 10px;
  font-size: 1rem;
  box-sizing: border-box;
  transition: border-color 0.2s;
}

.stripe-input::placeholder {
  color: #9e9e9e;      /* Your desired color */
  opacity: 1;       /* Make sure it's not faded */
}

.stripe-label {
  display: block;
  font-weight: 500;
  margin-bottom: 4px;
  color: #333;
  text-align: left;
}

/* Make sure Stripe iframe fills the input */
#card-element {
  min-height: 46px;
  padding: 0;
  margin-bottom: 10px;
}

/* ——————————————————————————————————————————————
   ------- Phantom Jum Fix ---------------------
—————————————————————————————————————————————— */
.form-container-page {
  overflow-anchor: none !important;
  min-height: 0 !important;
  height: auto !important;
}
.content {
  overscroll-behavior: none !important;
}

/* ——————————————————————————————————————————————
   ------- Milestone Gantt Bar -----------------
—————————————————————————————————————————————— */
.milestone-gantt-bar {
  position: relative;
  width: 100%;
  height: 2px;
  margin: 6px 0 2px 0;
  background: none;
}
.gantt-bar-bg {
  position: absolute;
  width: 100%;
  height: 6px;
  top: 3px;
  background: #c8c8c8;
  border-radius: 3px;
}
.gantt-bar-progress {
  position: absolute;
  height: 6px;
  top: 3px;
  background: #41a5f3;
  border-radius: 3px 0 0 3px;
  transition: width 0.3s;
}
.milestone-gantt-bar.overdue .gantt-bar-progress {
  background: #f83267;
}
.gantt-bar-today {
  position: absolute;
  top: 0;
  width: 2px;
  height: 12px;
  background: #9fbf4a;
  border-radius: 2px;
  transform: translateX(-1px);
}
.milestone-gantt-labels {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  margin-top: 14px;
}

/* ——————————————————————————————————————————————
   ------- Milestone Page Gantt Bar ------------
—————————————————————————————————————————————— */
.milestone-page-gantt {
    max-width: 100%;
    padding: 10px 0 10px 0;
    background: #f6f6fb;
    border-radius: 12px;
}

.milestone-page-gantt .milestone-gantt-bar {
    height: 42px;
    margin: 10px 0 4px 0;
}
.milestone-page-gantt .gantt-bar-bg,
.milestone-page-gantt .gantt-bar-progress {
    height: 22px;
    border-radius: 6px;
}
.milestone-page-gantt .gantt-bar-today {
    height: 28px;
}
.milestone-page-gantt .milestone-gantt-labels {
    font-size: 13px;
    font-weight: 500;
    margin-top: 4px;
}

.milestone-page-wrapper {
    padding: 10px;
    background: #f6f6fb;
    border-radius: 5px;
    margin-top: 10px;
    box-shadow: 0 2px 8px 0 rgba(60,65,120,.04);
}

/* ——————————————————————————————————————————————
   ------- Milestone Progress Donut ------------
—————————————————————————————————————————————— */
.milestone-donuts-row {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 12px;
  margin-top: 4px;
  margin-bottom: 2px;
}

.milestone-donuts-row .milestone-task-count-circle,
.milestone-donuts-row .milestone-progress-donut,
.milestone-donuts-row .milestone-overdue-donut {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 32px;
}

.milestone-donuts-row .milestone-task-count-circle svg,
.milestone-donuts-row .milestone-progress-donut svg,
.milestone-donuts-row .milestone-overdue-donut svg {
  width: 32px;
  height: 32px;
  display: block;
}

.milestone-donuts-row .milestone-donut-label {
  margin-top: 2px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 1px;
  text-align: center;
  line-height: 1.1;
  text-transform: uppercase;
  user-select: none;
  color: #41a5f3;
}

.milestone-donuts-row .milestone-task-count-circle .milestone-donut-label {
  color: #A2A2A2;
}
.milestone-donuts-row .milestone-overdue-donut .milestone-donut-label {
  color: #f83267;
}
.milestone-donuts-row .milestone-progress-donut .milestone-donut-label {
  color: #41a5f3;
}

/* ——————————————————————————————————————————————
   ------- Milestone Page Progress Donut -------
—————————————————————————————————————————————— */
.milestone-page-donuts-row {
  width: 100%; /* Edge to edge! */
  margin-left: 50%;
  margin-top: 10px;
  transform: translateX(-50%);
  background: #f6f6fb;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 48px;
  padding: 0 0 12px 0;
  border-radius: 0;
  max-width: 100%;
  min-width: 320px;
  /* If you want a slight soft edge on desktop, use border-radius: 12px; and max-width: 100%; */
}

.milestone-page-donuts-row > * {
  /* 3x size, assuming original SVG was 32px */
  --donut-size: 96px;
}

.milestone-page-donuts-row svg text {
  font-size: 8px !important;
  fill: #222;
}

.milestone-task-count-circle,
.milestone-progress-donut,
.milestone-overdue-donut {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: var(--donut-size, 90px);
}

.milestone-task-count-circle svg,
.milestone-progress-donut svg,
.milestone-overdue-donut svg {
  width: var(--donut-size, 90px);
  height: var(--donut-size, 90px);
  display: block;
}

.milestone-donut-label {
  margin-top: 7px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-align: center;
  line-height: 1.2;
  text-transform: uppercase;
  user-select: none;
  color: #41a5f3;
}
.milestone-task-count-circle .milestone-donut-label {
  color: #A2A2A2;
}
.milestone-overdue-donut .milestone-donut-label {
  color: #f83267;
}
.milestone-progress-donut .milestone-donut-label {
  color: #41a5f3;
}

/* ——————————————————————————————————————————————
   ------- Milestone Page Info Box -------------
—————————————————————————————————————————————— */
.milestone-info-block {
  background: #fff;
  border-radius: 10px;
  margin: 0px auto 0px auto;
  padding: 24px 30px 14px 30px;
  font-size: 15px;
}

.milestone-info-row {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
  align-items: baseline;
}

.milestone-info-label {
  font-family: 'Roboto Condensed', sans-serif;
  font-weight: 700;
  min-width: 116px;
  text-align: left;
  letter-spacing: .5px;
  flex-shrink: 0;
}

.milestone-info-value {
  color: #222;
  font-weight: 400;
  flex: 1;
  word-break: break-word;
  text-align: left;
}

#milestone-edit {
  font-family: 'Roboto Condensed', sans-serif;
	font-size: 13px;
	color: #0003b9;
	text-decoration: none;
}

#milestone-edit:hover {
	color: #c93737;
	font-weight: bold;
	transition: color 0.2s ease-out, font-weight 0.2s ease-out;
}

/* ================== STREAM FILTER MODAL STYLES ================== */
#streamFilterModal .modal-content {
  font-family: 'Roboto Condensed', Arial, sans-serif;
  background: #fff;
  color: #23272e;
  border-radius: 5px;
  padding: 36px 28px 30px 28px;
  max-width: 460px;
  min-width: 320px;
  box-shadow: 0 6px 42px 0 rgba(33, 40, 62, 0.15);
  border: 1px solid #e2e2e2;
  margin: 0 auto;
}

#streamFilterModal h3 {
  font-size: 1.2em;
  font-weight: 700;
  letter-spacing: 0.01em;
  margin-bottom: 24px;
}

#streamFilterModal label,
#streamFilterModal select,
#streamFilterModal input[type="date"] {
  font-family: inherit;
  font-size: 1em;
}

#streamFilterModal select,
#streamFilterModal input[type="date"] {
  padding: 8px 10px;
  border-radius: 5px;
  border: 1px solid #e2e2e2;
  background: #f8fafc;
  width: 100%;
  margin-top: 5px;
  margin-bottom: 13px;
  font-size: 1em;
}

#streamFilterModal input[type="date"] {
  min-width: 0;
}

#streamFilterModal .modal-buttons {
  display: flex;
  gap: 14px;
  justify-content: center;
}

#streamFilterModal .menu_button {
  background: var(--background-color);
  color: #fff;
  padding: 11px 32px;
  font-size: 1em;
  border-radius: 6px;
  border: none;
  font-family: inherit;
  font-weight: 600;
  transition: background 0.2s;
  cursor: pointer;
  margin: 0 4px;
}

#streamFilterModal .menu_button:hover,
#streamFilterModal .menu_button:focus {
  background: color-mix(in srgb, white 15%, var(--background-color));
}

/* Grid for Stream Type checkboxes */
#streamFilterModal #streamTypeCheckboxes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px 16px;
  justify-content: center;
  margin-top: 10px;
  margin-bottom: 10px;
  width: 100%;
}

#streamFilterModal #streamTypeCheckboxes label {
  font-size: 1em;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 7px;
  background: #ffffff;
  border-radius: 3px;
  padding: 6px 12px;
  border: #e2e2e2 1px solid;
  cursor: pointer;
  justify-content: left;
}

#streamFilterModal input[type="checkbox"] {
  accent-color: var(--background-color);
  width: 1.1em;
  height: 1.1em;
}

/* Field groups */
#streamFilterModal > .modal-content > form > div {
  margin-bottom: 16px;
}

#streamFilterModal #dueDateSection,
#streamFilterModal #milestoneDateSection {
  background: #ffffff;
  border-radius: 8px;
  padding: 12px 14px 10px 14px;
  margin-bottom: 15px;
}

#streamFilterModal #dueDateSection label,
#streamFilterModal #milestoneDateSection label {
  font-weight: 600;
}

#streamFilterModal #dueDateInputs,
#streamFilterModal #milestoneDateInputs {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

/* For accessibility: Focus on fields */
#streamFilterModal input:focus,
#streamFilterModal select:focus {
  outline: 2px solid #b2b2b2;
  outline-offset: 2px;
}

.date-range-row {
  margin-bottom: 1em;
  text-align: left;
}

.date-inputs-flex {
  display: flex;
  gap: 18px;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 8px;
  background-color: #fff;
}

.date-inputs-flex > div {
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
}

.date-inputs-flex label {
  font-weight: 500;
  font-size: 1em;
  margin-bottom: 3px;
}

/* ========== MILESTONES ACCORDION & DONUT ========== */
.milestone-timeline-accordion {
  margin-bottom: 10px;
  border-radius: 5px;
  background: #e2e2e2;
}
.milestone-timeline-accordion:hover {
  background: color-mix(in srgb, white 40%, var(--background-color));
}
.milestone-timeline-toggle {
  font-family: 'Roboto Condensed', sans-serif;
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  padding: 18px 28px 18px 18px;
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  cursor: pointer;
  border-radius: 5px 5px 0 0;
  color: #2e2e2e;
}
.milestone-timeline-arrow {
  margin-left: auto;
  font-size: 20px;
  transition: transform 0.3s;
}
.milestone-timeline-body {
  background: color-mix(in srgb, white 92.5%, var(--background-color));
  padding: 26px 0 18px 0;
  border-radius: 0 0 5px 5px;
}
.milestone-timeline-row {
  margin-bottom: 38px;
  overflow-x: auto;
  padding: 0 18px 0 18px;
  position: relative;
}
.milestone-timeline-scroll {
  display: flex;
  align-items: center;
  gap: 0px;
  overflow-x: auto;
  position: relative;
}
.milestone-timeline-item {
  text-align: center;
  min-width: 90px;
  margin: 0 8px;
  position: relative;
}
.milestone-circle {
  background: color-mix(in srgb, white 80%, var(--background-color));
  color: #2e2e2e;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 4px solid color-mix(in srgb, white 50%, var(--background-color));
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 10px;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  transition: background 0.2s, box-shadow 0.2s;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  box-shadow: none;
}

.milestone-donut-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin: 0 auto 10px auto;
  outline: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.milestone-donut-svg {
  display: block;
  width: 56px;
  height: 56px;
  background: none;
  pointer-events: none;
}
.milestone-center-icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}
.icon-milestone-timeline {
  width: 25px;
  height: 25px;
  background: var(--background-color);
  -webkit-mask-image: url('/assets/images/icons/milestone_white.png');
  mask-image: url('/assets/images/icons/milestone_white.png');
  mask-repeat: no-repeat;
  mask-size: contain;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  -webkit-mask-position: center;
  display: inline-block;
  margin: 0 auto;
}
.milestone-title {
  font-size: 14px;
  color: #2e2e2e;
  margin-bottom: 4px;
  font-weight: 600;
  margin-top: -4px;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  max-width: 110px;
  margin-left: auto;
  margin-right: auto;
}
.milestone-dates {
  font-size: 12px;
  color: #5c5c5c;
  opacity: 0.7;
  display: flex;
  justify-content: center;
  gap: 1px;
}
.milestone-timeline-line {
  width: 100%;
  height: 5px;
  background: color-mix(in srgb, white 50%, var(--background-color));
  border-radius: 4px;
  align-self: center;
  margin: 0 0 35px 0;
}
.milestone-timeline-scroll::-webkit-scrollbar {
  height: 10px;
}
.milestone-timeline-scroll::-webkit-scrollbar-thumb {
  background: #e5e9ef;
  border-radius: 5px;
}

/* ================== ARROW INDICATORS: DESKTOP + MOBILE ================== */
.milestone-timeline-arrow-indicator {
  display: none;
  position: absolute;
  top: 50%;
  z-index: 10;
  width: 34px;
  height: 48px;
  background: linear-gradient(to left, #e2e2e2cc 75%, #e2e2e200 100%);
  border-radius: 0 22px 22px 0;
  pointer-events: none;
  transform: translateY(-50%);
  animation: arrow-bounce 1.2s infinite;
}
.milestone-timeline-arrow-indicator.left {
  left: 0;
  right: auto;
  background: linear-gradient(to right, #e2e2e2cc 75%, #e2e2e200 100%);
  border-radius: 22px 0 0 22px;
}
.milestone-timeline-arrow-indicator.right {
  right: 0;
  left: auto;
}
.milestone-timeline-arrow-indicator svg {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 22px; height: 22px;
  fill: #bababa;
  opacity: 0.9;
  pointer-events: none;
}
.milestone-timeline-arrow-indicator.left svg {
  transform: translate(-50%, -50%) scaleX(-1);
}
@keyframes arrow-bounce {
  0%, 100% { transform: translateY(-50%) translateX(0); }
  60%      { transform: translateY(-50%) translateX(7px);}
}

.milestone-modal-info {
  margin-top: 10px;
  margin-bottom: 16px;
}
.milestone-modal-info .milestone-info-row {
  display: flex;
  gap:10px;
  margin-bottom: 6px;
}
.milestone-modal-info .milestone-info-label {
  font-weight: 600;
  width: 110px;
  color: #444;
}
.milestone-modal-info .milestone-info-value {
  color: #2a3642;
}
.milestone-donut-svg {
  display:block;
  margin:auto;
}
.milestone-center-icon {
  width:22px;
  height:22px;
  display:flex;
  align-items:center;
  justify-content:center;
}

/* ================== COMMENTS ================== */
.comment-bubble {
  margin-bottom: 10px;
  padding: 8px 8px 8px 8px;
  border-radius: 7.5px;
  max-width: 80%;
  font-family: 'Inter', 'SF Pro Text', 'Segoe UI', Arial, sans-serif;
  font-size: 12px;
  position: relative;
  box-shadow: 0 2px 10px 0 var(--background-color)(22,30,50,0.07);
  border: none;
  transition: box-shadow 0.14s;
  word-break: break-word;
}

/* YOUR BUBBLE: greenish, right side */
.comment-bubble.mine {
  margin-left: auto;
  background: linear-gradient(135deg, #78b2f8 92.5%, #2884F6 100%);
  border-bottom-right-radius: 0px;
  color: #ffffff;
}

/* OTHER USER BUBBLE: blueish/gray, left side */
.comment-bubble.other {
  margin-right: auto;
  background: linear-gradient(225deg, #d6d6d6 92.5%, #8d8d8d 100%);
  border-bottom-left-radius: 0px;
  border: none;
  color: #2e2e2e;
}

/* UNREAD BUBBLE: light yellow highlight, left side */
.comment-bubble.unread {
  margin-right: auto;
  background: linear-gradient(225deg, #c075c9 92.5%, #b800cc 100%);
  border-bottom-left-radius: 0px;
  border: none;
  color: #ffffff;
}

.comment-bubble-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 2px;
  font-weight: 600;
  font-size: .99em;
}
.bubble-author {
  color: #2d2d2d;
  font-weight: 700;
}
.bubble-date {
  font-size: .92em;
  color: #2d2d2d;
  margin-left: 9px;
  font-weight: 300;
}

/* The message text itself */
.comment-bubble-body {
  margin-bottom: 4px;
  white-space: pre-wrap;
  color: inherit;
  font-size: 1.08em;
  letter-spacing: 0.01em;
  line-height: 1.56;
  padding-left: 2px;
  padding-right: 2px;
  /* Default left align, but will be overridden below */
  text-align: left;
}

.comment-bubble.mine .comment-bubble-body {
  text-align: right;
  padding-right: 0;
}

.comment-bubble.other .comment-bubble-body,
.comment-bubble.unread .comment-bubble-body {
  text-align: left;
  padding-left: 0;
}

/* Action bar at the bottom */
.comment-bubble-actions {
  font-size: .97em;
  margin-top: 5px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: #2d2d2d;
}

.comment-bubble-actions .bubble-icon-btn {
  background: #fff;
  border: 1.5px solid #d5d9d9;
  border-radius: 50%;
  box-shadow: rgba(213, 217, 217, .11) 0 1.5px 4px 0;
  color: #6e7d90;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  padding: 0;
  font-size: 18px;
  vertical-align: middle;
  transition: background 0.13s, border 0.13s, box-shadow 0.13s, color 0.13s;
  text-align: center;
  outline: none;
  margin-right: 3px;
}

.comment-bubble-actions .bubble-icon-btn i {
  display: inline-block;
  margin: 0;
  font-size: 17px;
  line-height: 1;
  color: inherit;
  vertical-align: middle;
  /* Ensures icon is centered and not clipped */
}

.comment-bubble-actions .bubble-icon-btn:hover,
.comment-bubble-actions .bubble-icon-btn:focus {
  background: #f7fafa;
  border-color: var(--background-color);
  color: var(--background-color);
}

/* Stylish links inside comment body */
.comment-bubble-body a {
  color: #3978e6;
  font-weight: 500;
  border-bottom: 1.5px solid #a9cdfc;
  transition: color .14s, border .14s;
  text-decoration: none;
  border-radius: 3.5px;
  padding: 0 1.5px;
}
.comment-bubble-body a:hover,
.comment-bubble-body a:focus {
  color: #2356ac;
  border-bottom-color: #2356ac;
  background: #f4f9ff;
}

/* Popover tweaks for premium look */
.popover {
  background: #fff;
  border: 1.5px solid #d8e2f3;
  border-radius: 8px;
  box-shadow: 0 4px 16px 0 rgba(32,44,92,0.13);
  padding: 11px 16px;
  position: absolute;
  z-index: 101;
  left: 12px;
  top: 45px;
  min-width: 175px;
  font-size: 0.97em;
  color: #293247;
}

/* -------- NEW: Assignees Pop Bubble (expands inside bubble) -------- */
.assignees-bubble {
  background: #fff;
  border-radius: 5px;
  box-shadow: 0 2px 12px 0 rgba(30,35,90,0.07);
  border: 1px solid #e7eaf2;
  padding: 10px 18px 8px 16px;
  margin: 9px 0 0 4px;
  min-width: 95%;
  max-width: 95%;
  font-size: 1em;
  color: #252b3a;
  z-index: 10;
  position: static;
  display: none;
  transition: all 0.18s cubic-bezier(.33,1.5,.8,1.07);
  animation: popAssigneeBubble 0.22s cubic-bezier(.5,1.2,.8,1.02);
  border-top: 0px solid var(--background-color);
}
@keyframes popAssigneeBubble {
  0%   { opacity: 0; transform: translateY(-10px) scale(0.98);}
  100% { opacity: 1; transform: translateY(0) scale(1);}
}
.assignee-name-pop {
  padding: 4px 0;
  font-weight: 500;
  color: #686868;
  border-bottom: 1px solid #ecf2f9;
}
.assignee-name-pop:last-child {
  border-bottom: none;
}
.assignee-name-pop.empty {
  color: #959db0;
  font-style: italic;
  text-align: center;
}

#newCommentModal[data-editing="1"] .modal-title::after {
  content: " (Editing)";
  color: #e0902b;
  font-weight: 700;
}

.attachments-bubble {
  background: #fff;
  border-radius: 5px;
  box-shadow: 0 2px 12px 0 rgba(30,35,90,0.07);
  border: 1px solid #e7eaf2;
  padding: 10px 18px 8px 16px;
  margin: 9px 0 0 4px;
  min-width: 95%;
  max-width: 95%;
  font-size: 1em;
  color: #252b3a;
  z-index: 10;
  position: static;
  display: none;
  transition: all 0.18s cubic-bezier(.33,1.5,.8,1.07);
  animation: popAssigneeBubble 0.22s cubic-bezier(.5,1.2,.8,1.02);
  border-top: 0px solid var(--background-color);
}
.attachment-name-pop {
  padding: 4px 0;
  font-weight: 500;
  color: #004bcc;
  text-decoration: none;
  border-bottom: 1px solid #ecf2f9;
}

.attachment-name-pop:hover {
  color:#c93737;
}

.attachment-name-pop:last-child {
  border-bottom: none;
}
.attachment-name-pop.empty {
  color: #959db0;
  font-style: italic;
  text-align: center;
}

.comments-unread-badge {
  position: absolute;
  bottom: -5px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  background: #c93737;
  color: #fff;
  font-size: 13px;
  font-weight: bold;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  box-shadow: 0 1px 4px rgba(0,0,0,0.18);
  pointer-events: none;
  user-select: none;
}

/* -------- Suppliers Page -------- */
.alert-danger {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #c93737;
}

.comments-view {
  padding: 5px 0px;
  margin-left: 20px;
}

.comments-view li {
  margin-bottom: 0px;
}

.comments-view ul,
.comments-view ol {
  padding-top: 10px;
  margin-left: 10px;
  padding-left: 10px;
}

.other-reps-list {
   padding: 5px 0px;
}

.other-reps-list ul li {
  list-style: none;
}

.panel-info-module {
  padding: 5px 0px;
}

.panel-info-module ul li {
  list-style: none;
  padding-right: 10px;
}

.panel-info-module ul li ul li {
  list-style: disc;
  padding-right: 10px;
}

.panel-info-image {
  margin-left: 0px;
}

.panel-info-image ul li {
  list-style: none;
}

.accordion-panel-title {
  margin: 0px 10px 10px 20px;
}

.accordion-panel-footer {
  margin: 0px 0px 10px 0px;
}

/* ================= CATALOG TABLE =================== */
.catalog-table-container {
  width: 100%;
  overflow-x: auto;
  padding: 0;
  margin: 0 0 24px 0;
}

.catalog-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  background: #fff;
  font-family: 'Roboto Condensed', sans-serif;
  color: #2d2d2d;
  box-shadow: 0 2px 14px 0 rgba(40,50,60,0.07);
  border-radius: 14px;
  margin-bottom: 0;
}

.catalog-table th, .catalog-table td {
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 100;
  border-bottom: 1px solid #f0f0f0;
  background: transparent;
  vertical-align: middle;
}

.catalog-table th {
  background: #e2e2e2;
  font-weight: 700;
  letter-spacing: 0.02em;
  font-size: 15px;
  color: #2d2d2d;
  border-top: none;
}

.catalog-table th.catalog-th,
.catalog-table td.catalog-th {
  text-align: left !important;
}

.catalog-table th.catalog-unit-th,
.catalog-table th.cost-unit-th,
.catalog-table th.min-order-th,
.catalog-table th:last-child,
.catalog-table td.catalog-unit-th,
.catalog-table td.cost-unit-th,
.catalog-table td.min-order-th,
.catalog-table td.catalog-actions {
  text-align: center !important;
}

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

.catalog-table .catalog-desc {
  max-width: 260px;
  white-space: pre-line;
  word-break: break-word;
  font-size: 14px;
  font-weight: 100;
  color: #454545;
}

.catalog-table .catalog-unit,
.catalog-table .catalog-cost,
.catalog-table .catalog-minqty {
  text-align: center;
  font-weight: 500;
  font-size: 14px;
  font-weight: 100;
}

.catalog-table .catalog-actions {
  text-align: center;
  white-space: nowrap;
  min-width: 90px;
}

.catalog-table .catalog-empty {
  text-align: center;
  color: #9da5ad;
  padding: 20px 0;
  font-size: 15px;
  letter-spacing: 0.01em;
  font-style: italic;
  font-weight: 100;
}

.catalog-table .bubble-icon-btn {
  background: #fff;
  border: 1.5px solid #d5d9d9;
  border-radius: 50%;
  box-shadow: rgba(213, 217, 217, .13) 0 1.5px 4px 0;
  color: #6e7d90;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  font-size: 18px;
  margin-right: 4px;
  transition: background 0.14s, border 0.14s, box-shadow 0.14s, color 0.13s;
  text-align: center;
  outline: none;
}

.catalog-table .bubble-icon-btn:last-child {
  margin-right: 0;
}

.catalog-table .bubble-icon-btn:hover,
.catalog-table .bubble-icon-btn:focus {
  background: #f6faff;
  border-color: var(--background-color);
  color: var(--background-color);
}

/* ============= MOBILE & RESPONSIVE ============== */
@media (max-width: 900px) {
  .catalog-table-container {
    margin: 0 -10px 24px -10px;
  }
  .catalog-table th, .catalog-table td {
    padding: 10px 8px;
    font-size: 0.98em;
  }
  .catalog-table {
    min-width: 540px;
    font-size: 0.97em;
  }
  .catalog-table .catalog-desc {
    max-width: 120px;
    font-size: 0.95em;
  }
}

/* Horizontal scroll for narrow screens */
@media (max-width: 650px) {
  .catalog-table-container {
    overflow-x: auto;
    margin: 0 -3vw 22px -3vw;
    border-radius: 0;
  }
  .catalog-table {
    min-width: 470px;
    font-size: 0.92em;
  }
}

.upload-drop-zone {
  border: 2px dashed #aaa;
  border-radius: 10px;
  padding: 24px 18px;
  text-align: center;
  background: #f7fafa;
  color: #555;
  cursor: pointer;
  transition: border 0.22s;
}
.upload-drop-zone.dragover {
  border-color: #145787;
  background: #e8f1fb;
  color: #145787;
}
.upload-btn {
  display: inline-block;
  margin-left: 8px;
  color: #145787;
  text-decoration: underline;
  cursor: pointer;
  font-weight: 500;
  border: none;
  background: transparent;
}
/* ============= SUBSCRIPTION COUNTDOWN ============== */
.subscription-countdown-notification {
  width: 100%;
  position: fixed;
  bottom: 50px; /* Just above the footer */
  left: 0;
  z-index: 1001;
  display: flex;
  justify-content: center;
  animation: slideUpNotification 0.4s ease;
}

.subscription-countdown-message {
  background: var(--background-color);
  color: #333;
  padding: 18px 32px;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 0 16px rgba(0,0,0,0.12);
  font-size: 1.1rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  min-width: 350px;
  color: #fff;
}

/* Close button sits inside and top-right of the notification */
.close-notification-btn {
  position: absolute;
  top: 8px;
  right: 12px;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.8rem;
  font-weight: bold;
  cursor: pointer;
  z-index: 2;
  line-height: 1;
  padding: 0;
}

.manage-subscription-btn {
  background: #c93737;
  color: #fff !important;
  padding: 8px 20px;
  border-radius: 7px;
  border: #fff 1px solid;
  margin-left: 10px;
  margin-right: 10px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s;
}
.manage-subscription-btn:hover {
  background: color-mix(in srgb, white 50%, #c93737);
}

@keyframes slideUpNotification {
  from { transform: translateY(80px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
/* ============= TERMS OF USE ================= */
/* ===== Terms of Use layout & typography ===== */
.terms-wrapper {
  /* kill any site-wide row flex/grid that might place siblings side-by-side */
  display: block;                     /* safest default */
}

/* If a parent forces flex rows, override to a stacked column on just this page */
.terms-wrapper,
.terms-wrapper:where([style*="display:flex"], [class*="flex"]) {
  display: flex;
  flex-direction: column;
}

/* Make the content read nicely and stay centered */
.terms-content {
  max-width: 900px;
  margin: 0 auto;
}

/* Ensure the accept form occupies its own full row under the content */
.terms-accept-form {
  display: block;
  width: 100%;
  clear: both;                        /* beats stray floats */
  grid-column: 1 / -1;                /* beats 2-col grids */
  margin: 24px 0 0;
}

/* Style + center the controls block */
.terms-accept-controls {
  max-width: 900px;
  margin: 0 auto;
  padding: 16px 18px;
  border: 1px solid #e6e6e6;
  border-radius: 10px;
  background: #fff;
  text-align: center;
}

/* Keep the checkbox label and button stacked nicely on narrow screens */
.terms-accept-controls label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0 14px;
}

.terms-accept-controls .save_cancel {
  display: inline-block;
}

/* Optional: give the terms body comfortable reading line-height */
.terms-body {
  line-height: 1.65;
}

.terms-body p {
  margin-bottom: 1em;
}

.terms-body ul,
.terms-body ol {
  margin-left: 0;           /* reset browser default */
  padding-left: 1.5em;      /* align with paragraph start */
}

.terms-body li {
  margin-bottom: 0.6em;     /* spacing between list items */
  line-height: 1.6;
}

/* ============= SITES ============== */
/* Keep the modal centered & above everything */
#addSiteModal.modal {
  position: fixed !important;
  inset: 0 !important;
  z-index: 20000 !important;
  display: none;
  align-items: center;
  justify-content: center;
}
#addSiteModal[style*="display: block"] {
  display: flex !important;
}
#addSiteModal .modal-content-left {
  position: relative;            /* local stacking context */
  max-height: 90vh;
  overflow-y: auto;
  transform: none !important;    /* don't inherit other transforms */
  z-index: 20001;
}

/* Inside this modal, force native selects (no fancy arrow / no suppression) */
#addSiteModal select,
#addSiteModal .dropdown {
  -webkit-appearance: menulist !important;
          appearance: auto !important;
  background-image: none !important;
  pointer-events: auto !important;
  position: relative;
  z-index: 20002;                /* above any inner overlay */
}

/* Make sure the lead block can’t be covered by anything inside */
#addSiteModal #siteLeadWrap { position: relative; z-index: 20003; }
#addSiteModal #siteLeadSelect { position: relative; z-index: 20004; }

/* Never let labels overlap inputs inside this modal */
#addSiteModal label { pointer-events: none; }
#addSiteModal label + * { pointer-events: auto; }

/* Prevent any ancestor overflow or transforms from trapping taps/clicks */
html, body { -webkit-overflow-scrolling: touch; }

/* Center ONLY the Add Department modal */
#addDepartmentModal.modal{
  position: fixed !important;
  inset: 0 !important;            /* full-screen overlay */
  display: none;                   /* JS flips to flex on open */
  justify-content: center !important;
  align-items: center !important;
  z-index: 2147483500;             /* above any overlays */
}
#addDepartmentModal .modal-content{
  margin: 0 !important;            /* avoid auto margins pushing to a corner */
  position: relative;
  z-index: 2147483600;
}

/* ============= PRODUCTS ============== */
.thumbnail-wrapper {
  width: 80px;              /* fixed thumbnail size */
  height: 80px;
  overflow: hidden;         /* crop anything outside the box */
  border: 1px solid #ddd;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f9f9f9;
  margin-left: 20px;
}

.thumbnail-wrapper img.thumbnail {
  width: 100%;              /* fill width */
  height: 100%;             /* fill height */
  object-fit: cover;        /* crop while keeping aspect ratio */
  cursor: pointer;
  display: block;
}

.thumbnail-wrapper .thumbnail.placeholder {
  font-size: 0.75em;
  color: #9e9e9e;
  text-align: center;
  cursor: pointer;
  padding: 4px;
}

.modal.modal-open {
  display: block;
}
/* ——— Modal/Carousel sizing ——— */
.modal-lg { max-width: 860px; width: 95%; }

/* Frame with fixed height; adjust to taste */
.carousel-viewport {
  overflow: hidden;
  width: 100%;
  height: 62vh;             /* visible area */
  max-height: 720px;
  min-height: 320px;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  background: #e5e5e5;
}

.carousel { position: relative; width: 100%; margin-top: 8px; }
.carousel-track { display: flex; transition: transform 0.25s ease; height: 100%; }
.carousel-slide { min-width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: #e5e5e5; }
.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;        /* "cover" will fill frame, keep aspect, crop if needed */
  display: block;
}

/* ——— Nav buttons (always on top & clickable) ——— */
.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  height: 44px;
  width: 44px;
  border-radius: 50%;
  border: 1px solid #ddd;
  background: rgba(255,255,255,0.95);
  cursor: pointer;
  font-size: 18px;
  line-height: 42px;
  text-align: center;
  user-select: none;
  z-index: 10;              /* ⬅ ensure above images/track */
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.carousel-prev { left: 10px; }
.carousel-next { right: 10px; }

/* Optional hover feedback */
.carousel-nav:hover { background: #fff; }

/* ——— Dots ——— */
.carousel-dots {
  display: flex; gap: 6px; justify-content: center; margin-top: 10px;
}
.carousel-dot {
  width: 10px; height: 10px; border-radius: 50%;
  border: 1px solid #aaa; background: #e9e9e9; cursor: pointer;
}
.carousel-dot.active { background: #333; border-color: #333; }

/* BOM styles */
.bom-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.bom-toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.bom-table-wrap {
  overflow-x: auto;
}
.bom-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
}
.bom-table thead th {
  text-align: left;
  padding: 10px;
  background: #f7f7f7;
  border-bottom: 1px solid #e0e0e0;
  font-weight: 600;
}
.bom-table tbody td {
  padding: 8px 10px;
  border-top: 1px solid #f0f0f0;
  vertical-align: middle;
}
.bom-sku-cell .dropdown,
.bom-table input[type="text"],
.bom-table input[type="number"] {
  width: 100%;
}
.search-input.small {
  height: 30px;
  padding: 4px 8px;
  font-size: 0.95em;
}
button.small {
  padding: 6px 10px;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 0.95em;
  border: none;
  border-radius: 5px;
  background-color: var(--background-color);
  color: #fff;
  cursor: pointer;
  transition: background-color 0.3s ease;
}
button.small.danger {
  background: #c93737;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}
button.small.danger:hover {
  opacity: 0.9;
}

.bom-selector {
  display: flex;
  justify-content: center;   /* centers horizontally */
  align-items: center;       /* keeps labels aligned */
  gap: 24px;                 /* spacing between options */
  margin: 12px 0;            /* some breathing room */
}
.bom-selector label {
  font-weight: 500;
  cursor: pointer;
}

.bom-qty {
  padding: 8px;
  font-family: 'Roboto Condensed', sans-serif;
  border: 1px solid #e2e2e2;
  border-radius: 5px;
  color: #2d2d2d;
  display: flex;
  align-items: center;
  gap: 8px;
}

.bom-notes {
  padding: 8px;
  font-family: 'Roboto Condensed', sans-serif;
  border: 1px solid #e2e2e2;
  border-radius: 5px;
  color: #2d2d2d;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ============= STOCK ============== */
.row-shortage { color: #b3261e; }
.alert { padding: 8px 10px; border-radius: 6px; }
.alert-danger { background: #ffe9e9; color: #9f1d1d; border: 1px solid #f2b8b5; }
.alert-success { background: #e8f5e9; color: #1b5e20; border: 1px solid #c8e6c9; }

.transfer-qty {
    font-family: 'Roboto Condensed', sans-serif;
    padding: 5px;
    border: 1px solid #e2e2e2;
    border-radius: 5px;
    font-size: 1em;
    outline: none;
  }

  /* ====================== Stock Removal Modal (scoped) ====================== */
.stock-modal-removal {
  position: fixed;
  inset: 0;
  display: none;                 /* shown via JS */
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.45);
  z-index: 1300;
  padding: 16px;                 /* breathing room on tiny screens */
}

/* Center the stock-removal modal when shown (no other changes) */
.stock-modal-removal[style*="display:block"],
.stock-modal-removal[style*="display: block"] {
  display: flex !important; /* enables align/justify centering already in your CSS */
}

.stock-modal-removal__dialog {
  position: relative;
  width: min(560px, 92vw);
  max-height: 90vh;              /* mobile-safe height */
  background: #fff;
  border-radius: 5px;
  box-shadow: 0 20px 40px rgba(0,0,0,.18);
  overflow: hidden;              /* keeps corners rounded */
  display: flex;
  flex-direction: column;
}

/* internal scrolling only */
.stock-modal-removal__dialog > .stock-modal-removal__header,
.stock-modal-removal__dialog > .stock-modal-removal__product,
.stock-modal-removal__dialog > .stock-modal-removal__form {
  padding: 16px 18px;
}

.stock-modal-removal__form {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-top: 0;
  padding-bottom: 18px;
}

/* close button */
.stock-modal-removal__close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 5px;
  background: transparent;
  color: #777;
  font-size: 24px;
  line-height: 36px;
  text-align: center;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
.stock-modal-removal__close:hover { background: #f1f1f1; color: #333; }
.stock-modal-removal__close:focus-visible { outline: 2px solid #6aa9ff; outline-offset: 2px; }

/* header */
.stock-modal-removal__title {
  margin: 6px 0 2px 0;
  font-size: 1.25rem;
  line-height: 1.2;
  color: #2d2d2d;
}
.stock-modal-removal__hint {
  margin: 6px 0 0 0;
  color: #6b7280;
  font-size: .9rem;
}

/* separators */
.stock-modal-removal__divider {
  height: 1px;
  background: #ececec;
  margin: 0 18px;
}

/* product name block */
.stock-modal-removal__product {
  font-size: 0.95rem;
  color: #374151;
}

/* fields */
.stock-modal-removal__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 14px;
}
.stock-modal-removal__label {
  font-size: .9rem;
  color: #374151;
}

/* inputs */
.stock-modal-removal__input,
.stock-modal-removal__select,
.stock-modal-removal__textarea {
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  color: #2d2d2d;
  background: #fff;
  border: 1px solid #e2e2e2;
  border-radius: 5px;
  padding: 10px 12px;
  transition: border-color .2s ease, box-shadow .2s ease;
  box-sizing: border-box;
}
.stock-modal-removal__textarea { resize: vertical; min-height: 90px; }
.stock-modal-removal__select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #9aa0a6 50%),
    linear-gradient(135deg, #9aa0a6 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 3px),
    calc(100% - 12px) calc(50% - 3px);
  background-size: 6px 6px;
  background-repeat: no-repeat;
}
.stock-modal-removal__input:focus,
.stock-modal-removal__select:focus,
.stock-modal-removal__textarea:focus {
  border-color: #9ec5ff;
  box-shadow: 0 0 0 3px rgba(100, 149, 237, .25);
  outline: none;
}

/* small grid area (reason + notes) */
.stock-modal-removal__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 6px;
}

/* actions */
.stock-modal-removal__actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 16px 18px 18px 18px;
  border-top: 1px solid #f0f0f0;
}

/* buttons */
.stock-modal-removal__btn {
  appearance: none;
  border: none;
  border-radius: 5px;
  padding: 10px 14px;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform .02s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
  box-shadow: 0 1px 0 rgba(0,0,0,.06);
}
.stock-modal-removal__btn:active { transform: translateY(1px); }

.stock-modal-removal__btn--danger {
  color: #fff;
  background: #be2a2a;                /* refined red */
}
.stock-modal-removal__btn--danger:hover { background: #a22323; }

.stock-modal-removal__btn--ghost {
  color: #374151;
  background: #f5f6f8;
}
.stock-modal-removal__btn--ghost:hover { background: #eceff3; }

/* responsive tweaks */
@media (max-width: 520px) {
  .stock-modal-removal__dialog { width: 94vw; }
}

/* ====================== Management Controls — Tabs ====================== */

#mgmtTabs { margin-top: 8px; }

/* Top nav: pill tabs with soft shadow and scrollable on small screens */
#mgmtTabs .tabs-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0 10px;
  border-bottom: 1px solid #e5e7eb;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scroll-snap-type: x mandatory;
}
#mgmtTabs .tabs-nav::-webkit-scrollbar { height: 6px; }
#mgmtTabs .tabs-nav::-webkit-scrollbar-thumb {
  background: #d1d5db; border-radius: 999px;
}
#mgmtTabs .tabs-nav::-webkit-scrollbar-track { background: transparent; }

/* Tab button (8px corners) */
#mgmtTabs .tab-btn {
  appearance: none;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  color: #374151;
  padding: 8px 12px;
  border-radius: 5px;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .2px;
  cursor: pointer;
  transition: box-shadow .18s ease, transform .06s ease, border-color .18s ease, color .18s ease, background .18s ease;
  scroll-snap-align: start;
  white-space: nowrap;
}
#mgmtTabs .tab-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0,0,0,.06);
  border-color: #d1d5db;
}
#mgmtTabs .tab-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(59,130,246,.25);
}

/* Active tab */
#mgmtTabs .tab-btn.active {
  background: linear-gradient(180deg, #ffffff 0%, #f3f4f6 100%);
  color: #111827;
  border-color: var(--background-color);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,1),
    0 8px 22px rgba(0,0,0,.08);
  position: relative;
  border-radius: 5px;
}
#mgmtTabs .tab-btn.active::after {
  content: "";
  position: absolute;
  left: 18px; right: 18px; bottom: -11px;
  height: 3px; border-radius: 3px;
  background: var(--background-color);
  opacity: .85;
}

/* Panels */
#mgmtTabs .tabs-panels { padding-top: 12px; }
#mgmtTabs .tab-content { animation: mgmtFadeIn .14s ease-in; }
@keyframes mgmtFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: none; }
}

/* Simple table polish inside mgmt tabs only */
#mgmtTabs .simple-table { width: 100%; border-collapse: collapse; }
#mgmtTabs .simple-table th,
#mgmtTabs .simple-table td {
  padding: 10px 8px;
  border-bottom: 1px solid #eee;
}
#mgmtTabs .simple-table th {
  background: #fafafa;
  text-align: left;
  font-weight: 700;
  color: #374151;
}

/* Code tag badge (scoped) */
#mgmtTabs code {
  background: #f3f4f6;
  padding: 2px 6px;
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: .95em;
}

/* ===== Management Controls: Tabs Responsive ===== */

/* Layout wrapper for tabs */
.tab-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  position: relative;
}

/* Desktop horizontal tabs stay as-is */
.tab-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Hamburger trigger (hidden on desktop) */
.tabmenu-trigger {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--border-color, #ddd);
  border-radius: 8px;
  background: var(--panel-bg, #fff);
  cursor: pointer;
  user-select: none;
}
.tabmenu-trigger:focus {
  outline: 2px solid var(--accent-color, #2b7cff);
  outline-offset: 2px;
}
.tabmenu-trigger .tabmenu-label {
  font-size: 14px;
  line-height: 1;
}

/* Hamburger icon */
.hamburger {
  width: 20px;
  height: 20px;
  position: relative;
  display: inline-block;
}
.hamburger::before,
.hamburger::after,
.hamburger span {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--text-color, #333);
  border-radius: 2px;
}
.hamburger::before { top: 0; }
.hamburger::after  { bottom: 0; }
.hamburger span    { top: 50%; transform: translateY(-50%); }

/* Hidden checkbox that toggles the dropdown */
.tabmenu-toggle {
  display: none;
}

/* Dropdown panel */
.tabmenu-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: min(320px, 90vw);
  max-height: 70vh;
  overflow: auto;
  background: var(--panel-bg, #fff);
  border: 1px solid var(--border-color, #ddd);
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(0,0,0,.12);
  z-index: 50;
  padding: 8px;
}

/* Show dropdown when hamburger is toggled */
.tabmenu-toggle:checked + .tabmenu-trigger + .tabmenu-dropdown {
  display: block;
}

/* Dropdown list items */
.tabmenu-list {
  display: flex;
  flex-direction: column;
}
.tabmenu-link {
  display: block;
  padding: 10px 12px;
  border-radius: 6px;
  text-decoration: none;
  color: var(--text-color, #222);
  font-size: 14px;
}
.tabmenu-link:hover {
  background: rgba(0,0,0,0.05);
}
.tabmenu-link.active {
  background: var(--accent-bg, rgba(43,124,255,0.1));
  border: 1px solid var(--accent-color, #2b7cff);
}

/* Responsive behavior */
@media (max-width: 768px) {
  /* Hide desktop tabs; show hamburger on mobile */
  .tab-nav {
    display: none;
  }
  .tabmenu-trigger {
    display: inline-flex;
  }

  /* Ensure the tab bar doesn't wrap oddly */
  .tab-bar {
    align-items: stretch;
  }
}

/* ===== Employee Onboarding Wizard footer ===== */
#employeeOnboardingWizardModal .eow-footer{
  position: sticky;       /* stays visible while content scrolls */
  bottom: 0;
  background: #fff;
  padding: 12px 72px;     /* leave room for left/right buttons */
  min-height: 56px;
  z-index: 10;
}

/* Anchor children left/center/right */
#employeeOnboardingWizardModal .eow-footer{ position: sticky; } /* ensures positioned ancestor */
#employeeOnboardingWizardModal .eow-footer .eow-back{
  position: absolute; left: 16px; bottom: 12px;
}
#employeeOnboardingWizardModal .eow-footer .eow-save-exit{
  position: absolute; left: 50%; transform: translateX(-50%); bottom: 12px;
}
#employeeOnboardingWizardModal .eow-footer .eow-next,
#employeeOnboardingWizardModal .eow-footer .eow-submit{
  position: absolute; right: 16px; bottom: 12px;
}

/* Base date field */
input[type="date"].employee-dob{
  font-family: 'Roboto Condensed', sans-serif;
  height: 45px;
  padding: 8px 10px;
  margin: 10px 0 13px;
  border: 1px solid #e2e2e2;
  border-radius: 5px;
  font-size: 16px;         /* prevents iOS zoom */
  box-sizing: border-box;
  width: 100%;             /* was 90% — make it full width */
  max-width: 100%;
  min-width: 0;
}

/* Normal placeholder color (for non-date inputs) */
.employee-dob::placeholder { color: #e2e2e2; opacity: 1; }

/* WebKit date input: tint the grey hint (e.g., mm/dd/yyyy) when empty */
input[type="date"].employee-dob:not(:focus):invalid::-webkit-datetime-edit { color: #e2e2e2; }

/* Use normal text color once focused or valid */
input[type="date"].employee-dob:focus::-webkit-datetime-edit,
input[type="date"].employee-dob:valid::-webkit-datetime-edit { color: #959db0; }

/* Mobile: compact footer + icon-only nav already OK above */
/* Date input wrapper + fake placeholder behavior */
#employeeOnboardingWizardModal .input-date-wrap {
  position: relative;
}

#employeeOnboardingWizardModal .input-date-wrap .fake-placeholder {
  position: absolute;
  left: 12px;
  top: 10px;                 /* aligns visually with your 45px input */
  color: #9aa1b4;
  pointer-events: none;
  background: #fff;          /* avoids overlap “ghosting” on white inputs */
  padding: 0 4px;
  transition: opacity .15s ease, transform .15s ease;
}

/* Hide placeholder immediately on focus OR once the input has a value */
#employeeOnboardingWizardModal .input-date-wrap.is-focused .fake-placeholder,
#employeeOnboardingWizardModal .input-date-wrap.has-value .fake-placeholder {
  opacity: 0;
  transform: translateY(-4px);
}

/* ===== Employee Onboarding: stack fields on mobile ===== */
@media (max-width: 520px){

  /* Footer tweaks (keeps what you had) */
  #employeeOnboardingWizardModal .eow-footer{
    padding: 12px 56px;
    min-height: 64px;
  }
  #employeeOnboardingWizardModal .eow-footer .eow-back .btn-text,
  #employeeOnboardingWizardModal .eow-footer .eow-next .btn-text{ display:none; }
  #employeeOnboardingWizardModal .eow-footer .eow-back,
  #employeeOnboardingWizardModal .eow-footer .eow-next{
    width:40px; height:36px; display:flex; align-items:center; justify-content:center;
  }
  #employeeOnboardingWizardModal .eow-footer .eow-back i,
  #employeeOnboardingWizardModal .eow-footer .eow-next i{ font-size:18px; margin:0; }

  /* 1) Force any inline grid groups to a single column */
  #employeeOnboardingWizardModal .eow-step [style*="grid-template-columns"]{
    grid-template-columns: 1fr !important;
  }

  /* 2) If any container uses inline display:grid, keep it grid but 1 col */
  #employeeOnboardingWizardModal .eow-step [style*="display:grid"]{
    display: grid !important;
  }

  /* 3) Dynamic rows created by JS (emergency/medical/site/department/deposit) */
  #employeeOnboardingWizardModal .eow-step [data-row] > div{
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  /* 4) Make all controls full-width */
  #employeeOnboardingWizardModal .eow-step input[type="text"],
  #employeeOnboardingWizardModal .eow-step input[type="password"],
  #employeeOnboardingWizardModal .eow-step input[type="date"],
  #employeeOnboardingWizardModal .eow-step input[type="tel"],
  #employeeOnboardingWizardModal .eow-step input[type="email"],
  #employeeOnboardingWizardModal .eow-step select,
  #employeeOnboardingWizardModal .eow-step select.dropdown,
  #employeeOnboardingWizardModal .eow-step textarea{
    width: 100% !important;
    display: block !important;
    box-sizing: border-box !important;
  }

  /* 5) If any helper classes use grid/flex rows, stack them */
  #employeeOnboardingWizardModal .eow-step .grid,
  #employeeOnboardingWizardModal .eow-step .form-row{
    display: block !important;
  }

  /* Ensure any inline grid groups collapse cleanly and children don’t overflow */
  #employeeOnboardingWizardModal .eow-step [style*="grid-template-columns"]{
    grid-template-columns: 1fr !important;
  }
  #employeeOnboardingWizardModal .eow-step [style*="grid-template-columns"] > *{
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Force the date control to stay within the viewport */
  input[type="date"].employee-dob{
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Make dropdowns full width too */
  #employeeOnboardingWizardModal .eow-step select,
  #employeeOnboardingWizardModal .eow-step select.dropdown{
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* ——— Onboarding Step 1 ——— */
.eow-intro{
  border: 1px solid #e2e2e2;
  border-radius: 5px;
  background: #fff;
  padding: 12px 14px;
  margin: 6px 0 14px;
  color: #333;
  font-size: 0.95rem;
  line-height: 1.45;
}

#employeeOnboardingWizardModal .eow-step[data-step="1"] .eow-mode-question{
  display: block;
  width: 100%;
  text-align: center !important;
  margin: 20px auto 20px;
  font-weight: 600;
  color: #333;
}

/* Group */
.eow-mode-buttons{
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 16px;
  flex-wrap: wrap;
}

/* Visually hide the real radios but keep them accessible */
.eow-mode-radio{
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  border: 0;
  padding: 0;
}

/* The “button” labels */
.eow-mode-btn{
  cursor: pointer;
  user-select: none;
  border: 1px solid #e2e2e2;
  border-radius: 5px;
  background: #fff;
  padding: 14px 16px;
  min-width: 280px;
  max-width: 100%;
  text-align: center;
  line-height: 1.25;
  color: #222;
  transition: border-color 120ms ease, box-shadow 120ms ease, transform 60ms ease;
}

.eow-mode-btn:hover{ border-color: var(--background-color); }
.eow-mode-btn:active{ transform: translateY(1px); }

/* Selected state (via :checked + label) */
.eow-mode-radio:checked + .eow-mode-btn{
  border-color: var(--background-color);
  box-shadow: inset 0 0 0 2px rgba(201, 55, 55, 0.12);
}

/* Keyboard focus ring (when the hidden radio gets focus) */
.eow-mode-radio:focus + .eow-mode-btn{
  outline: 2px solid var(--background-color);
  outline-offset: 2px;
}

.onboarding-icon{
  width: 70px;
  height: 70px;
  display: inline-block;
  margin: 8px auto 12px;
  background-color: var(--background-color);

  /* Mask the image so the background color becomes the icon color */
  -webkit-mask-image: url('/assets/images/icons/onboarding_white.png');
          mask-image: url('/assets/images/icons/onboarding_white.png');
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
  -webkit-mask-position: center;
          mask-position: center;
  -webkit-mask-size: contain;
          mask-size: contain;
}

/* (optional) center everything in the intro box */
.eow-intro{
  text-align: center;
}

/* Style for the second dropdown select */
.dropdown-onboarding {
  width: 15em;
  padding: 10px;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 16px;
  color: #2d2d2d;
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 5px;
  outline: none;
  /* Remove default styling */
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  /* Add a background arrow (optional) */
  background-image: url('/assets/images/icons/down_grey.png');
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 20px;
  margin-right: 20px;
}

/* Optionally, add focus styling */
.dropdown-onboarding:focus {
  border-color: var(--background-color);
  box-shadow: 0 0 5px var(--background-color);
}

.badge {
  color: #c93737;
}

/* Mobile: stack the buttons full-width with 10px gap */
@media (max-width: 520px){
  .eow-mode-buttons{
    flex-direction: column;
    gap: 10px;
    align-items: center;
  }
  .eow-mode-btn{
    width: 100%;
  }
}

/* ——— Google Address ——— */
.pac-container {
  z-index: 100000 !important;
}

/* ===== EOW Step 6: field+help layout (scoped) ===== */
.eow-field-help {
  position: relative;
  background: #f5f5f5;            /* light grey */
  border-radius: 5px;
  padding: 8px 42px 8px 8px;      /* right padding for the help icon */
  display: flex;
  align-items: center;
}

.eow-field-help > .eow-help-target,
.eow-field-help > .input-date-wrap {
  width: 100%;
  margin: 0;                      /* override default input margins inside wrapper */
}

.eow-help-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid #d0d0d0;
  background: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.eow-help-btn i {
  color: #777;                    /* subtle question mark color */
}

/* popover */
.eow-help-box {
  position: absolute;
  right: 8px;
  top: calc(100% + 6px);
  z-index: 10;
  display: none;
  min-width: 260px;
  max-width: 320px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 10px;
  box-shadow: 0 6px 18px rgba(0,0,0,.08);
}

.eow-help-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  margin-bottom: 6px;
}

.eow-help-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 4px;
  color: #666;
}

/* keep popover above modal content scroll */
#employeeOnboardingWizardModal .modal-content {
  position: relative;
  max-height: 90vh;       /* never taller than viewport */
  max-width: 90vw;        /* never wider than viewport */
  transition: max-height 0.3s ease, max-width 0.3s ease;
  overflow: visible !important;  /* allow popovers to show without clipping */
}

/* ===== EOW wizard modal centering ===== */
#employeeOnboardingWizardModal.modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,.5);
  display: none;                 /* JS will switch to flex when opening */
  align-items: center;           /* vertical center */
  justify-content: center;       /* horizontal center */
  padding: 24px;                 /* breathing room on small screens */
}

#employeeOnboardingWizardModal .modal-content {
  margin: 0;                     /* no auto margins (flex centers it) */
  top: auto; left: auto;         /* kill any previous offsets */
  transform: none;               /* kill previous translateY */
  max-width: 820px;
  width: min(820px, 96vw);
  max-height: calc(100vh - 48px);
  overflow: auto;
  border-radius: 5px;
  background: #fff;
  box-shadow: 0 6px 24px rgba(0,0,0,0.2);
  box-sizing: border-box;
}

#employeeOnboardingWizardModal .eow-field-help { position: relative; z-index: 1; }
#employeeOnboardingWizardModal .eow-field-help.open { z-index: 10050; }

#employeeOnboardingWizardModal .eow-help-box {
  z-index: 10060;               /* above rows, footer, etc. */
  pointer-events: auto;         /* make sure it's clickable */
}
#employeeOnboardingWizardModal .eow-help-row {
  background: #f5f5f7;
  border-radius: 5px;
}

/* ===== Help Icons and Labels ===== */
/* Help row container: match Hire Date cell height and keep icon OUTSIDE the field */
.eow-help-row {
  display: flex;
  align-items: center;          /* vertically center the select and the icon */
  gap: 10px;                    /* breathing room so ? doesn’t touch the field */
  background: #f5f5f7;
  border-radius: 5px;
  padding: 10px 12px;           /* a touch more padding balances the grey box */
  align-self: stretch;          /* fill the grid track height like Hire Date */
  height: 100%;
  box-sizing: border-box;
}

/* Floating-label wrapper inside the help row (the select sits in here) */
.eow-help-row--floating .input-date-wrap {
  position: relative;
  flex: 1 1 auto;               /* field takes the left side */
  width: 100%;
  margin: 0;                    /* keep heights equal to neighbor */
}

/* Ensure the select matches input height and is perfectly aligned */
.eow-help-row--floating .input-date-wrap select.dropdown-onboarding,
.eow-help-row--floating .input-date-wrap input {
  height: 42px;
  line-height: 42px;
  margin-top: 0 !important;
  margin-bottom: 0 !important;  /* prevents being pushed down vs Hire Date */
  width: 100%;
}

/* Floating label inside the grey help row (aligned like DOB) */
.eow-help-row--floating .fake-placeholder {
  position: absolute;
  margin-top: -8px;                    /* raise label higher over the border */
  left: 14px;
  padding: 0 8px;
  background: #f5f5f7;          /* match the grey row background */
  font-size: 13px;
  color: #666;
  line-height: 1;
  pointer-events: none;
  z-index: 1;
}

/* The help “?” button: lock its width so it never invades the field */
.eow-help-btn {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;               /* fixed column for the icon */
  border-radius: 50%;
  border: 1px solid #d0d0d0;
  background: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 10px;             /* keep it comfortably away from the field */
}

/* Keep the popover above everything */
.eow-help-row .eow-help-box { z-index: 10060; }

/* Close icon visible on white background */
.eow-help-box .eow-help-close { color: #555; }

/* ===== Onboarding small icon buttons (match help icon look) ===== */
.eow-icon-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid #d0d0d0;
  background: #f2f2f2;
  color: var(--background-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  line-height: 1;
}
.eow-icon-btn:hover { background: #e8e8e8; }

/* X icon sizing */
.eow-mini-remove i {
  font-size: 12px;
  color: var(--background-color);
}

/* Grid rows for contacts: keep aligned with the button column */
#eowEmergencyContacts .ec-row,
#eowMedicalContacts .mc-row {
  display: grid;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

/* Explicit column templates for tidy alignment */
#eowEmergencyContacts .ec-row { grid-template-columns: 1fr 1fr 1fr 32px; }
#eowMedicalContacts .mc-row   { grid-template-columns: 1fr 1fr 32px; }

/* ===== Floating Labels (general) ===== */
.input-text-wrap,
.input-select-wrap { position: relative; width: 100%; }

.input-text-wrap input,
.input-select-wrap select {
  width: 100%;
  padding: 10px 8px;
  font-size: 1em;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #fff;
}

.input-text-wrap .fake-placeholder,
.input-select-wrap .fake-placeholder {
  position: absolute;
  top: -9px;
  left: 8px;
  background: #fff;
  padding: 0 4px;
  font-size: 0.8em;
  color: #777;
  pointer-events: none;
}

/* Global select alignment helper (keeps selects level with inputs) */
.input-date-wrap select.dropdown-onboarding {
  height: 40px;
  line-height: 40px;
  padding: 0 8px;
  font-size: 14px;
  font-family: inherit;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #fff;
}

/* Dropdown Border Color Control */
#eowGender.dropdown-onboarding {
  border-color: #DEDEDE;
  margin-top: 10px;
}

#statutory_employee.dropdown-onboarding {
  border-color: #DEDEDE;
}

#company_paid_pension.dropdown-onboarding {
  border-color: #DEDEDE;
}

#payroll.dropdown-onboarding {
  border-color: #DEDEDE;
}

#eowIdentityGender.dropdown-onboarding {
  border-color: #DEDEDE;
}

#eowPronouns.dropdown-onboarding {
  border-color: #DEDEDE;
}

#eowBranchSelect.dropdown-onboarding {
  border-color: #DEDEDE;
}

#eowSiteSelect.dropdown-onboarding {
  border-color: #DEDEDE;
}

#eowDeptSelect.dropdown-onboarding {
  border-color: #DEDEDE;
}

#eowPtoSelect.dropdown-onboarding {
  border-color: #DEDEDE;
}

/* -------- Onboarding: Branch Pills -------- */
.eow-pill-list {
  list-style: none;
  margin: 10px 0 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;       /* one per line */
  gap: 8px;
}

.eow-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #EFEFEF;
  border: 1px solid #E5E5E5;
  border-radius: 5px;
  padding: 10px 12px;
  box-shadow: 0 1px 2px rgba(0,0,0,.05);
}

.eow-pill-text {
  font-weight: 600;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.eow-pill-remove {
  appearance: none;
  border: 0;
  background: #e0e0e0;
  border-radius: 999px;
  width: 26px;
  height: 26px;
  font-size: 18px;
  line-height: 26px;
  text-align: center;
  cursor: pointer;
  transition: background .15s ease-in-out, transform .05s ease-in-out;
}

.eow-pill-remove:hover { background: #d4d4d4; }
.eow-pill-remove:active { transform: scale(0.95); }

/* ===== Direct Deposit grid (2 cols desktop → 1 col mobile) ===== */
.dep-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: auto;
  gap: 10px 12px;
  margin: 12px 0;
}
.dep-span-2 { grid-column: 1 / -1; }

@media (max-width: 640px) {
  .dep-grid {
    grid-template-columns: 1fr;
  }
}

/* Inline field error */
.inline-error {
  margin-top: 4px;
  font-size: 12px;
  color: #c0392b; /* red-ish */
}

/* Remove link row */
.dep-remove-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 2px;
}
.dep-remove-link {
  font-size: 13px;
  color: #a33;
  text-decoration: none;
  padding: 6px 10px;
  border: 1px solid #e0b4b4;
  border-radius: 6px;
  background: #fff5f5;
}
.dep-remove-link:hover {
  background: #ffecec;
  border-color: #d99;
}

/* Ensure onboarding modal can grow and scroll */
.modal .modal-content {
  max-height: 90vh;
  overflow-y: auto;
}

/* Onboarding modal sizing hardeners */
#employeeOnboardingWizardModal .modal-content {
  height: auto !important;
  max-height: 90vh !important;
  overflow-y: auto !important;
}

/* ---------------- AI Credits (Settings) ---------------- */

.settings-section .muted {
  color: #6b7280; /* Tailwind slate-500 vibe */
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.ai-credits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 12px;
}

.ai-credit-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;           /* light gray */
  border-radius: 5px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.ai-credit-row {
  display: grid;
  grid-template-columns: auto 24px 1fr;
  align-items: center;
  gap: 10px;
}

.ai-dollar {
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.2px;
  color: #111827; /* gray-900 */
}

.ai-equals {
  font-weight: 700;
  text-align: center;
  color: #6b7280;
}

.ai-credits {
  font-weight: 800;
  font-size: 1.15rem;
  color: #0f766e; /* teal-700 */
}

.ai-credits .ai-credits-label {
  font-weight: 600;
  font-size: 0.95rem;
  margin-left: 4px;
  color: #115e59; /* teal-800 */
}

.ai-credit-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  font-size: 0.85rem;
  color: #6b7280;
}

.ai-credit-meta .ai-updated {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ai-credit-meta .ai-id {
  background: #f1f5f9;     /* slate-100 */
  color: #475569;          /* slate-600 */
  border-radius: 999px;
  padding: 2px 8px;
  font-weight: 700;
  letter-spacing: 0.2px;
  font-size: 0.8rem;
}

/* Responsive fine-tuning */
@media (max-width: 480px) {
  .ai-credit-row { grid-template-columns: auto 20px 1fr; }
  .ai-dollar { font-size: 1.15rem; }
  .ai-credits { font-size: 1.05rem; }
}

/* AI Credits edit button (single, consolidated) */
.ai-credits-edit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #f8f9fb;
  color: #374151;
  border: 1px solid #e5e7eb;
  text-decoration: none;
  font-size: 14px;
  cursor: pointer;
}

/* AI Usage Monitor */
.ai-usage-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.ai-usage-table th,
.ai-usage-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #eee;
  font-size: 14px;
}
.ai-usage-table thead th {
  background: #f7f7f7;
  text-align: left;
  font-weight: 600;
}
.ai-usage-table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.status-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
}
.status-pill.ok  { background: #e8f7ee; color: #197a3a; }
.status-pill.err { background: #fdeaea; color: #b62424; }

/* AI Model Prices card */
.ai-prices-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 5px;
  padding: 16px;
  margin-bottom: 18px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.ai-prices-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 16px;
  align-items: center;
}
.ai-prices-row .label { font-size: 12px; color: #6b7280; margin-bottom: 4px; }
.ai-prices-row .value { font-weight: 600; }
.ai-prices-actions { display: flex; gap: 10px; align-items: center; justify-content: flex-end; }

/* Small modal size to fit two inputs nicely */
.small-modal { max-width: 520px; }

/* === Unified circular icon buttons (Edit + Refresh) === */
.icon-circle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-color: #f5f5f5;
  color: #444;
  border: 1px solid #ccc;
  transition: all 0.2s ease-in-out;
  text-decoration: none;
  font-size: 14px;
  cursor: pointer;
}
.icon-circle-btn i {
  font-size: 14px;
  color: #444;
}
.icon-circle-btn:hover {
  background-color: #e9f0ff;
  color: #145787;
  border-color: #145787;
}

/* Inline notice area for refresh results */
.ai-prices-notice {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.92rem;
  line-height: 1.35;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  color: #374151;
}
.ai-prices-notice.error {
  border-color: #fca5a5;
  background: #fef2f2;
  color: #991b1b;
}
.ai-prices-notice.success {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #14532d;
}

/* Keep action containers aligned */
.ai-prices-actions,
.ai-credits-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.ai-icon {
  width: 42px;
  height: 42px;
  display: inline-block;
  margin: auto;
  background-color: var(--background-color);
  -webkit-mask:
    url('/assets/images/icons/ai_white.png')
    no-repeat center / contain;
          mask:
    url('/assets/images/icons/ai_white.png')
    no-repeat center / contain;
}

.ai-icon:hover {
  background-color: #b3261e;
}

.ai-icon-menu {
  width: 32px;
  height: 32px;
  display: inline-block;
  margin-top: 10px;
  background-color: var(--background-color);
  -webkit-mask:
    url('/assets/images/icons/ai_white_menu.png')
    no-repeat center / contain;
          mask:
    url('/assets/images/icons/ai_white_menu.png')
    no-repeat center / contain;
}

.ai-icon-menu:hover {
  background-color: #b3261e;
}

/* == Policy AI Loader == */
.ai-loader {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin: 12px 0; padding: 10px;
  border: 1px solid #e5e7eb; background: #f9fafb; border-radius: 8px;
}
.ai-loader .spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 3px solid #e5e7eb; border-top-color: #145787; /* matches darkblue theme nicely */
  animation: leadhaw-spin 0.8s linear infinite;
}
@keyframes leadhaw-spin { to { transform: rotate(360deg); } }
.ai-loader .ai-loader-text {
  font-size: 0.95rem; color: #374151; letter-spacing: 0.2px;
}

/* Optional: closer to Notes look */
.policy-html { font-size: 14px; color:#222; margin-left: 20px;}
.policy-html p { margin: .6em 0; }
.policy-html ul, .policy-html ol { margin:.5em 1.25em; padding-left: 1.1em; }
.policy-html h1,.policy-html h2,.policy-html h3 { margin:.6em 0 .4em; line-height:1.25; }
.policy-html strong,b { font-weight:600; }
.policy-html a { color:#145787; text-decoration: underline; }

.branch-item {
  padding: 10px;
  border: none;
  border-radius: 5px;
  background: #f3f3f3;
}

/* ====================== Trainings Page ========================== */
.training-icon {
  width: 72px;
    height: 72px;
    background-color: color-mix(in srgb, rgb(255, 255, 255) 25%, var(--background-color));
    -webkit-mask:
      url('/assets/images/icons/training_white.png')
      no-repeat center / contain;
            mask:
      url('/assets/images/icons/training_white.png')
      no-repeat center / contain;

}

.training-icon:hover {
    background-color: var(--background-color);
}

/* Create Training modal: tighten label → textarea spacing only */
#createTrainingModal .form-row label[for="trainingDescription"] {
  display: block;        /* ensure block flow */
  margin-bottom: 4px;    /* reduce the gap */
}

#createTrainingModal #trainingDescription {
  margin-top: 0;         /* in case any global rule adds top margin */
}

.js-open-training-elements {
  cursor: pointer;
  font-family: 'Roboto Condensed', sans-serif;
  font-weight: 300;
  text-decoration: none;
  color: #0003b9;
  transition: color 0.2s ease-out, font-weight 0.2s ease-out;
}

.js-open-training-elements:hover {
  color: #c93737;
  font-weight: bold;
  transition: color 0.2s ease-out, font-weight 0.2s ease-out;
}

.training-description {
  margin-left: 20px;
  display: block;
  line-height: 1.5;
}

/* ====================== Trainings Content (merged) ========================== */
.stream-palette { display:flex; align-items:center; gap:10px; margin:10px 0 16px; }
.stream-palette .palette-title { font-weight:600; opacity:.8; margin-right:8px; }

.chip { padding:15px 10px; border:1px dashed #e2e2e2; border-radius:5px; background:#fff; cursor:pointer; }
.chip-page { background:#f5f7fb; border:2px dashed #b6c3d4; }

.training-view { margin-top:10px; }
.page-lane { display:flex; flex-direction:column; gap:12px; }

/* Keep position/overflow to allow top/bottom overlay controls to sit above borders */
.page-card {
  border:1px solid #ddd;
  border-radius:10px;
  background:#fff;
  box-shadow:0 1px 2px rgba(0,0,0,.05);
  position: relative;
  overflow: visible;
  margin-bottom: 20px;
}

.page-card-header { display:flex; align-items:center; justify-content:space-between; padding:8px 12px; border-bottom:1px solid #eee; }
.page-title { display:flex; align-items:center; gap:3px; font-weight:600; }
.icon-btn { background:none; border:none; cursor:pointer; padding:6px; }

/* Page body uses flex-wrap so narrower blocks can sit side-by-side */
.page-dropzone {
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  padding:18px;
  min-height:80px;
  justify-content:center;
  align-content:flex-start;
}
.page-dropzone .empty-drop-hint { opacity:.6; text-align:center; width:100%; }
.page-dropzone.dz-over { outline:2px dashed #8aa8c7; outline-offset:-6px; }

/* Forces a line break inside the flex dropzone layout */
.page-dropzone .row-break {
  flex-basis:100%;
  width:100%;
  height:0;
  margin:0;
  padding:0;
}

.drag-placeholder {
  flex:0 0 auto;
  border:1px dashed #bfbfbf;
  border-radius:10px;
  background:#fafafa;
  box-shadow:inset 0 0 0 1px rgba(0,0,0,.03);
  /* width/height set dynamically to match dragged item */
}

.empty-state { padding:20px; text-align:center; border:1px dashed #ddd; border-radius:10px; background:#fafafa; }
/* --------- NEW: + Add Page overlays (top/bottom border) --------- */
.page-insert {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border: 2px solid #b6c3d4;
  border-radius: 16px;
  padding: 6px 7px;
  cursor: pointer;
  line-height: 1;
  z-index: 2;
  box-shadow: 0 1px 2px rgba(0,0,0,.05);
}
.page-insert-above { top: -15px; }   /* centered above the top border */
.page-insert-below { bottom: -15px; }/* centered above the bottom border */

.page-insert i { font-size: 14px; }
.page-insert:hover { background:#f5f7fb; }

/* --------- Move Up/Down icons sizing harmony --------- */
.page-actions .icon-btn i { font-size: 18px; }

/* ----------------- icons ----------------------------- */
.ai-icon-main {
  width: 42px;
  height: 42px;
  display: inline-block;
  margin: auto;
  background-color: var(--background-color);
  -webkit-mask:
    url('/assets/images/icons/ai_white_main.png')
    no-repeat center / contain;
          mask:
    url('/assets/images/icons/ai_white_main.png')
    no-repeat center / contain;
}
.ai-icon-main:hover {
  background-color: color-mix(in srgb, rgb(255, 255, 255) 25%, var(--background-color));
}

.eye-icon {
  width: 42px;
  height: 42px;
  display: inline-block;
  margin: auto;
  background-color: var(--background-color);
  -webkit-mask:
    url('/assets/images/icons/preview_white_main.png')
    no-repeat center / contain;
          mask:
    url('/assets/images/icons/preview_white_main.png')
    no-repeat center / contain;
}
.eye-icon:hover {
  background-color: color-mix(in srgb, rgb(255, 255, 255) 25%, var(--background-color));
}
.eye-icon:active,
.eye-icon:focus {
  background-color: color-mix(in srgb, rgb(255, 255, 255) 75%, var(--background-color));
}

.edit-icon {
  width: 42px;
  height: 42px;
  display: inline-block;
  margin: auto;
  background-color: var(--background-color);
  -webkit-mask:
    url('/assets/images/icons/edit_white_main.png')
    no-repeat center / contain;
          mask:
    url('/assets/images/icons/edit_white_main.png')
    no-repeat center / contain;
}
.edit-icon:hover {
  background-color: color-mix(in srgb, rgb(255, 255, 255) 25%, var(--background-color));
}
.edit-icon:active,
.edit-icon:focus {
  background-color: color-mix(in srgb, rgb(255, 255, 255) 75%, var(--background-color));
}

/* ---------------- Training Tabs ---------------- */
.menu_button.js-training-tab,
.menu_button.js-open-ai {
  position: relative;
  border: none;
  background: none;
  padding: 6px 10px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}
.menu_button.js-training-tab.active {
  border-bottom: 3px solid var(--background-color); /* underline highlight */
  border-radius: 0px;                 /* make underline crisp */
  text-indent: 0;
}
.menu_button.js-training-tab:focus,
.menu_button.js-training-tab:active {
  outline: none;
  box-shadow: none;
}
.menu_button.js-training-tab.active::after,
.menu_button.js-training-tab.active::before  {
  content: none !important;
}
.menu_button.js-open-ai  {
  border-bottom: 3px solid #ffffff; /* underline highlight */
  border-radius: 0px;                 /* make underline crisp */
  text-indent: 0;
}

/* ========== BACK BUTTON TRAINING ========== */
.back-button-training {
  width: 100%;
  text-align: right;
}
.back-button-training .back-icon {
  width: 32px;
  height: 32px;
  vertical-align: top;
  border-radius: 50%;
  transition: filter 0.17s, box-shadow 0.13s;
  cursor: pointer;
}
.back-button-training a:hover .back-icon,
.back-button-training a:focus .back-icon {
  filter: brightness(0.92) drop-shadow(0 2px 8px #bfd7f7);
  box-shadow: 0 2px 10px 0 #e3e7ee;
}
.page-controls-training {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

/* ====================== Stream Blocks (Unified) ====================== */
/* Text containers are full-width by default; can shrink when resized */
.stream-text {
  flex: 1 1 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

/* Host that can be resized/dragged (applies to text & media wrappers) */
.resizable-host {
  position: relative;
  flex: 0 0 auto;         /* let manual width override flex */
  max-width: 100%;
  min-width: 260px;
  min-height: 80px;
  overflow: visible;
}

/* Inner visual frame for ALL saved blocks (text & media) */
.resizable-box {
  position: relative;
  width: 100%;
  min-width: 260px;
  min-height: 160px;
  height: 100%;            /* critical so children can fill */
  box-sizing: border-box;
  border: 1px dashed #bfbfbf;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.05);
  padding: 10px;
}

/* While editing text inline: force full width and no resize */
.stream-text.editing {
  flex: 1 1 100%;
  max-width: 100%;
  resize: none;
  overflow: visible;
}

/* ---------- Saved Text Block ---------- */
.stream-text-saved-header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  margin-bottom:6px;
}
.stream-text-saved .saved-title { font-weight:600; opacity:.85; }
.stream-text-saved .stream-text-saved-body { line-height:1.45; }

/* ---------- Text Editor Box (same frame as saved) ---------- */
.stream-text-editor {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  border: 1px dashed #bfbfbf;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.05);
  padding: 10px;
}

.stream-text-header {
  display:flex;
  align-items:center;
  gap:8px;
  margin-bottom:6px;
}
.stream-text-editor .text-title {
  flex:1;
  font-weight:600;
  padding:6px 8px;
  border:1px solid #ddd;
  border-radius:6px;
  max-width: 100%;
  box-sizing: border-box;
}

/* WYSIWYG toolbar (active state included) */
.text-editor-header { background-color: var(--background-color); padding: 5px; border-radius: 4px 4px 0 0; }
.text-editor-header .btn { border: none; background: transparent; outline: none; margin-right: 5px; cursor: pointer; font-size: 1.1em; }
.text-editor-header .btn.active { background-color: rgba(255,255,255,0.2); border-radius: 3px; padding: 3px 7.5px; }
.text-editor-header .btn.active::after { content: none !important; }

/* Editable surface */
.wysi-surface {
  min-height: 120px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-wrap: anywhere;
}

/* Bullets/numbers alignment (editor & saved) */
.training-view .wysi-surface ul,
.training-view .wysi-surface ol,
.training-view .stream-text-saved-body ul,
.training-view .stream-text-saved-body ol {
  margin: 0 0 0.75em 1.25em;
  padding-left: 1.25em;
  list-style-position: outside;
}
.training-view .wysi-surface li,
.training-view .stream-text-saved-body li {
  margin: 0.25em 0;
  text-indent: 0;
}
.training-view .wysi-surface li ul,
.training-view .wysi-surface li ol,
.training-view .stream-text-saved-body li ul,
.training-view .stream-text-saved-body li ol {
  margin-left: 1.25em;
  padding-left: 1.25em;
}

/* Ensure saved text content always wraps and fits */
.stream-text-saved-body { overflow-wrap: anywhere; word-break: break-word; }
.stream-text-saved-body img,
.stream-text-saved-body video,
.stream-text-saved-body iframe { max-width: 100%; height: auto; display: block; }

/* ---------- Media Block (shares the same unified frame) ---------- */
.stream-media-saved { display:flex; flex-direction:column; height: 100%; }

/* Body expands to fill box height and centers its child (image or video) */
.stream-media .stream-media-body {
  padding: 6px;
  flex: 1 1 auto;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  height: 100%;             /* fill vertical space */
}

/* Image fills the body box, keeps aspect within it */
.media-preview-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 6px;
}

/* Video: wrapper fills the body; min-height keeps it visible */
.media-embed-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 180px;
  border-radius: 6px;
  overflow: hidden;
}
.media-embed-wrap iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* ---------- Resize Grip (single definition used by both) ---------- */
.resize-grip {
  position:absolute;
  right:6px;
  bottom:6px;
  width:14px;
  height:14px;
  cursor:nwse-resize;
  opacity:.85;
  border-right:2px solid #bfbfbf;
  border-bottom:2px solid #bfbfbf;
  border-radius:2px;
  background: transparent;
}

/* Dragging feedback (shared) */
.stream-text.dragging,
.stream-media.dragging { opacity: .6; transform: scale(.98); }

/* Inputs */
.form-row input[type="text"] {
  width: 100%;
  padding: 10px;
  border: 1px solid #e2e2e2;
  border-radius: 5px;
}

/* Mobile: force full width; restrict resize to vertical for text */
@media (max-width: 640px) {
  .stream-text,
  .stream-text.editing,
  .stream-text.resizable-host,
  .stream-media.resizable-host {
    max-width: 100%;
    flex-basis: 100%;
  }
  .stream-text.resizable-host { resize: vertical; }
}

.stream-query {
  width: 100% !important;
  min-width: 100% !important;
  flex: 0 0 100% !important; /* make sure it always occupies full row */
  margin: 6px 0;
  position: relative;
}

.stream-query-saved {
  border: 1px dashed #bfbfbf;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.05);
  padding: 10px;
}

.stream-query-header {
  display: flex;
  align-items: center;
  gap: 8px;
}
.stream-query-header .saved-title {
  font-weight: 600;
  flex: 1;
}
.stream-query-header .flag-chip {
  background: #eef5ff;
  border: 1px solid #cfe1ff;
  color: #2a5bd7;
  border-radius: 9999px;
  padding: 2px 8px;
  font-size: 12px;
  margin-left: 4px;
}

.stream-query-body .query-desc {
  opacity: .85;
  margin: 8px 0 6px;
}
.stream-query-body .query-options {
  list-style: none;
  padding: 0;
  margin: 0;
}
.stream-query-body .query-option {
  margin: 4px 0;
}
.stream-query-body .correct-tag {
  font-style: normal;
  font-weight: 600;
  margin-left: 6px;
  opacity: .75;
}

#cqOptionsWrap .cq-option {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 6px 0;
}
#cqOptionsWrap .cq-opt-correct {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.toggles-line {
  display: grid;
  grid-template-columns: 1fr 1fr;   /* two equal halves */
  column-gap: 14px;
  row-gap: 12px;
  align-items: center;

  /* center the whole grid block in the modal */
  justify-content: center;
  width: 100%;
  max-width: 500px; /* optional: limit width if modal is wide */
  margin: 0 auto;

  background-color: #F2F2F2;
  padding: 10px;
}
.toggles-line .toggle-item { display: contents; }
.toggles-line .toggle-item > span:first-child {
  justify-self: end;
  text-align: right;
  white-space: nowrap;
}
.toggles-line .toggle-item .accordion-status { justify-self: start; }

#cqTitle { font-family: 'Roboto Condensed', sans-serif; }
#cqDescription {
  font-family: 'Roboto Condensed', sans-serif;
  border: 1px solid #e2e2e2;
  border-radius: 5px;
  padding: 10px;
}
#cqOptionsWrap {
  background-color: #F2F2F2;
  padding: 10px;
  border-radius: 5px;
}
.cq-opt-correct {
  font-family: 'Roboto Condensed', sans-serif;
  font-size: small;
}
.cq-remove-opt {
  font-size: 16px;
  color: var(--background-color);
  background-color: #ffffff;
  border-color: var(--background-color);
  width: 26px;
  height: 26px;
  border-radius: 50%;
}
.cq-opt-input { font-family: 'Roboto Condensed', sans-serif; }

#cqAddOption {
  padding:15px;
  border:1px solid #e2e2e2;
  border-radius:25px;
  background:#fff;
  cursor:pointer;
}

#eqDescription {
  font-family: 'Roboto Condensed', sans-serif;
  border: 1px solid #e2e2e2;
  border-radius: 5px;
  padding: 10px;
}
#eqAddOption {
  padding:15px;
  border:1px solid #e2e2e2;
  border-radius:25px;
  background:#fff;
  cursor:pointer;
}
#eqOptionsWrap {
  background-color: #F2F2F2;
  padding: 10px;
  border-radius: 5px;
}

/* Keep the option input and "Correct" checkbox on the same row */
#cqOptionsWrap .cq-option,
#eqOptionsWrap .cq-option {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Make the text input take remaining space on the row */
#cqOptionsWrap .cq-option .cq-opt-input,
#eqOptionsWrap .cq-option .cq-opt-input {
  flex: 1 1 auto;
  min-width: 0; /* prevent overflow on narrow modals */
}

/* Keep "Correct" and its checkbox inline and tidy */
#cqOptionsWrap .cq-option .cq-opt-correct,
#eqOptionsWrap .cq-option .cq-opt-correct {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  margin: 0;
}

/* Ensure the "Options" label is visible and spaced nicely */
#cqOptionsWrap > label,
#eqOptionsWrap > label {
  display: block;
  margin-bottom: 8px;
  font-family: 'Roboto Condensed', sans-serif;
  font-weight: 600;
}

/* Keep the wrap styling consistent across create/edit */
#eqOptionsWrap,
#cqOptionsWrap {
  background-color: #F2F2F2;
  padding: 10px;
  border-radius: 5px;
}

.media_save_cancel {
    font-family: 'Roboto Condensed', sans-serif;
    width: 100px;
    padding: 10px;
    margin-top: 20px;
    margin-right: 20px;
    border: none;
    border-radius: 5px;
    background: color-mix(in srgb, white 50%, var(--background-color));
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.3s ease;
  }

  .media_save_cancel:hover {
    background-color: color-mix(in srgb, rgb(65, 65, 65) 50%, var(--background-color)) !important;
    color: #fff;
  }

/* ===================== EDIT QUERY OPTIONS SPACING ===================== */
#eqOptionsWrap .cq-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px; /* ← controls vertical space between options */
}
#eqOptionsWrap .cq-option:last-child { margin-bottom: 0; }

/* ===================== PREVIEW ===================== */
.pv-container { position: relative; }
.pv-page { position: relative; min-height: 68vh; padding-bottom: 64px; }
.pv-page-header { margin-bottom: 12px; }
.pv-page-title { font-size: 18px; font-weight: 700; display:flex; align-items:center; gap:8px; }

/* Canvas: absolute layout on desktop; stacked on mobile */
.pv-canvas { position: relative; border: 1px solid #e9e9ee; background: #fff; border-radius: 12px; padding: 12px; min-height: 540px; overflow: hidden; }
.pv-block { position: absolute; box-sizing: border-box; border-radius: 12px; padding: 12px; backdrop-filter: saturate(110%); }
.pv-block[data-type="text"]  { background: linear-gradient(180deg, #ffffff 0%, #fbfbff 100%); border: 1px solid #e7e9f3; box-shadow: 0 6px 20px rgba(24,39,75,.06); }
.pv-block[data-type="media"] { background: linear-gradient(180deg, #ffffff 0%, #f9fcff 100%); border: 1px solid #e6eef9; box-shadow: 0 6px 22px rgba(20,42,87,.08); }
.pv-block[data-type="query"] { background: linear-gradient(180deg, #ffffff 0%, #fffaf7 100%); border: 1px solid #f0e6df; box-shadow: 0 8px 26px rgba(102,51,0,.08); }

.pv-text-title { margin: 0 0 6px 0; font-weight: 700; font-size: 16px; }
.pv-text-body { line-height: 1.55; color: #1f2937; }

.pv-media-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 6px;
}
.pv-media-embed { position: relative; width: 100%; height: 100%; }
.pv-media-embed > iframe { position:absolute; inset:0; width:100%; height:100%; border:0; border-radius:10px; }
.pv-media-link { display:inline-flex; align-items:center; gap:8px; }

/* Beautiful queries */
.pv-query-head { margin-bottom: 10px; }
.pv-query-title { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.pv-query-desc  { color:#6b7280; font-size: 13px; }
.pv-query-flags { display:flex; gap:6px; margin-top:6px; flex-wrap: wrap; }
.flag { display:inline-block; font-size:11px; padding:2px 8px; border-radius:999px; background:#eef2ff; color:#374151; border:1px solid #e6eaff; }
.flag.mandatory { background:#ffe9e6; color:#8a2c20; border-color:#ffd7d2; }
.flag.must-right { background:#fff5cc; color:#7a5a00; border-color:#ffeaa3; }
.flag.graded { background:#e8fff3; color:#1b6b3a; border-color:#c9f7df; }

.pv-query-options { list-style:none; margin:8px 0 0 0; padding:0; display:grid; gap:8px; }
.pv-query-option label { display:flex; align-items:center; gap:10px; padding:10px 12px; border-radius:10px; border:1px solid #ececec; background:#fff; transition: box-shadow .15s ease, border-color .15s ease; cursor: pointer; }
.pv-query-option input[type="radio"] { transform: scale(1.1); }
.pv-query-option:hover { border-color:#d9e2ff; box-shadow: 0 6px 18px rgba(42,76,200,.10); }
.pv-query-option input[type="radio"]:checked + span { font-weight: 600; }

/* ===== PREVIEW Paginator ===== */
.pv-paginator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
  user-select: none;
  font-family: inherit;
}
.pv-paginator .pv-nav {
  border: none;
  outline: none;
  padding: 8px 12px;
  border-radius: 999px;
  background: #f0f0f0;
  color: #444;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}
.pv-paginator .pv-nav:hover:not([disabled]) {
  background: #c93737;
  color: #fff;
  box-shadow: 0 6px 16px rgba(201, 55, 55, .2);
}
.pv-paginator .pv-nav[disabled] {
  opacity: .45;
  cursor: not-allowed;
}
.pv-paginator .pv-pages { display: flex; gap: 6px; }
.pv-paginator .pv-page-dot {
  min-width: 32px;
  height: 32px;
  padding: 0 10px;
  border: none;
  outline: none;
  border-radius: 8px;
  background: #f7f7f7;
  color: #333;
  font-size: 14px;
  line-height: 32px;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}
/* Active page (NO dash/separator) */
.pv-paginator .pv-page-dot.active {
  background: #c93737;
  color: #fff;
  font-weight: 600;
  cursor: default;
  box-shadow: 0 6px 16px rgba(201, 55, 55, .18);
}
.pv-paginator .pv-page-dot.active::before,
.pv-paginator .pv-page-dot.active::after { content: none !important; }
/* Hover for inactive dots */
.pv-paginator .pv-page-dot:not(.active):hover { background: #e8e8e8; }
/* Focus ring (keyboard navigation) */
.pv-paginator .pv-nav:focus-visible,
.pv-paginator .pv-page-dot:focus-visible {
  outline: 2px solid #c93737;
  outline-offset: 2px;
  border-radius: 10px;
}

/* PREVIEW: keep blocks at their exact pixel size & center them */
#trainingPreviewView .preview-zone { justify-content: center; }
#trainingPreviewView .preview-zone .stream-text,
#trainingPreviewView .preview-zone .stream-media,
#trainingPreviewView .preview-zone .stream-query {
  flex: 0 0 auto !important;
}
/* Ensure preview card leaves room for paginator */
#trainingPreviewView .page-card.preview {
  position: relative;
  padding-bottom: 72px;
}
/* Extra breathing room under preview zones too */
#trainingPreviewView .page-card.preview .page-dropzone.preview-zone { padding-bottom: 24px; }

/* Query feedback styling */
.pv-query-option { position: relative; }
.pv-ans-badge {
  font-size: 11px;
  font-weight: 700;
  margin-right: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #ffe6e6;     /* default (wrong) */
  color: #7a1e1e;
}
.pv-ans-badge.pv-corr { background: #fff6cc; color: #735d00; }
.pv-ans-badge.pv-your-correct { background: #d9fbe3; color: #126c33; }
.pv-ans-badge.pv-ans-correct { background: #e0f7e9; color: #145a32; }

/* color states on the option rows */
.pv-query-option.pv-correct label {
  border-color: #b8efc9;
  box-shadow: 0 6px 16px rgba(40, 167, 69, .12);
  background: #f4fff7;
}
.pv-query-option.pv-wrong label {
  border-color: #ffc7c7;
  box-shadow: 0 6px 16px rgba(220, 53, 69, .10);
  background: #fff7f7;
}
.pv-query-option.pv-right-answer label {
  border-color: #ffea9a;
  background: #fffbe3;
  box-shadow: 0 6px 16px rgba(255, 193, 7, .12);
}

/* --- Fix list alignment in PREVIEW text blocks --- */
#trainingPreviewView .pv-text-body {
  overflow: visible;
  word-wrap: break-word;
}
/* Base lists */
#trainingPreviewView .pv-text-body ul,
#trainingPreviewView .pv-text-body ol {
  margin: 8px 0 8px 0;
  padding-left: 1.25rem;
  list-style-position: inside;
}
/* Ensure default marker types look right */
#trainingPreviewView .pv-text-body ul { list-style-type: disc; }
#trainingPreviewView .pv-text-body ol { list-style-type: decimal; }
/* Nested lists */
#trainingPreviewView .pv-text-body ul ul,
#trainingPreviewView .pv-text-body ul ol,
#trainingPreviewView .pv-text-body ol ul,
#trainingPreviewView .pv-text-body ol ol {
  margin-top: 4px;
  margin-bottom: 4px;
  padding-left: 1.25rem;
}
/* List items themselves */
#trainingPreviewView .pv-text-body li {
  display: list-item;
  line-height: 1.5;
}

/* ===== Sticky Stream Palette ===== */
:root { --palette-offset: 0px; }

.title-wrapper {
  position: sticky;
  top: 0;
  z-index: 2000;
  width: 100%;
  box-sizing: border-box;
  background: var(--page-bg, #fff);
  border-bottom: 1px solid #eee;
  box-shadow: 0 0 0 rgba(0,0,0,0);
  transition: box-shadow .15s ease;
}
.stream-palette { padding: 10px 12px; }
.stream-palette .palette-items { display: flex; flex-wrap: wrap; gap: 8px; }
.title-wrapper.is-stuck { box-shadow: 0 6px 14px rgba(0,0,0,.06); }
.title-wrapper::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: -12px;
  height: 12px;
  background: var(--page-bg, #fff);
  pointer-events: none;
}

/* Prevent the page from scrolling while a touch-drag is active */
.no-scroll-during-drag { overflow: hidden; touch-action: none; }
/* Floating chip that follows the finger during touch-drag */
.mobile-drag-ghost {
  position: fixed;
  z-index: 4000;
  pointer-events: none;
  padding: 6px 10px;
  border-radius: 14px;
  background: #f7f7f7;
  border: 1px solid #ddd;
  font-size: 12px;
  line-height: 1.2;
  box-shadow: 0 6px 16px rgba(0,0,0,.12);
  transform: translate(-9999px, -9999px);
}
/* Let the page scroll vertically by default; we’ll only lock during drag */
.stream-palette .palette-items { touch-action: pan-y; }
.page-dropzone { touch-action: pan-y; }

/* Hide the stream palette when the container is in PREVIEW mode */
.training-views[data-active="PREVIEW"] #paletteWrapper,
.training-views[data-active="PREVIEW"] .stream-palette { display: none !important; }

/* Mobile: stack all blocks, 100% width, natural height */
@media (max-width: 768px){
  .pv-canvas { min-height: unset; padding: 8px; }
  .pv-block { position: relative !important; left: auto !important; top: auto !important; width: 100% !important; height: auto !important; margin-bottom: 10px; }
  .pv-media-embed { aspect-ratio: 16/9; }
}

/* ==================================================== */
/* ============= AI Create Training Modal ============= */
/* ==================================================== */
#aiCreateTrainingModal .ai-training-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 12px;
}

#aiCreateTrainingModal .ai-training-input { display:flex; flex-direction:column; }
#aiCreateTrainingModal .ai-training-label {
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 13px; margin-bottom: 6px; color: #333;
}
#aiCreateTrainingModal .ai-training-input-badges {
  display:flex; flex-direction:column; background-color:#f3f3f3;
  padding:8px; border-radius:5px;
}
#aiCreateTrainingModal .ai-training-field {
  font-family:'Roboto Condensed', sans-serif;
  border:1px solid #e2e2e2; border-radius:5px; padding:10px; width:100%;
  background:#fff; outline:none;
}
#aiCreateTrainingModal .ai-training-field:focus {
  border-color:#c2c2c2; box-shadow:0 0 0 2px rgba(20,87,135,.08);
}

#aiCreateTrainingModal .ai-expected-large {
  min-height:260px; max-height:60vh; resize:vertical; line-height:1.45;
  overflow:auto; word-break:break-word;
}

#aiCreateTrainingModal .ai-training-flags {
  display:grid; grid-template-columns:1fr 1fr; gap:8px;
}
@media (max-width: 520px){
  #aiCreateTrainingModal .ai-training-flags { grid-template-columns:1fr; }
}
#aiCreateTrainingModal .ai-training-flag {
  display:flex; align-items:center; gap:6px; font-family:'Roboto Condensed', sans-serif;
}

/* Media block */
#aiCreateTrainingModal .ai-training-media-block {
  display:flex; flex-direction:column; gap:12px; background:#f3f3f3;
  padding:12px; border-radius:5px; margin-top:12px; align-items:stretch;
}
#aiCreateTrainingModal .ai-training-media-header {
  display:flex; flex-direction:column; align-items:center; gap:8px; text-align:center;
}
#aiCreateTrainingModal .ai-training-media-title { margin:0; font-family:'Roboto Condensed', sans-serif; }
#aiCreateTrainingModal .ai-training-media-actions { display:flex; gap:8px; justify-content:center; flex-wrap:wrap; }
#aiCreateTrainingModal .ai-media-list { display:grid; grid-template-columns:1fr; width:100%; }

#aiCreateTrainingModal .ai-media-row {
  border:1px solid #e5e7eb; border-radius:10px; padding:10px; display:block;
  margin-bottom:8px; background:#fff; width:100% !important; max-width:none !important; justify-self:center;
}
#aiCreateTrainingModal .ai-media-header { display:flex; align-items:center; justify-content:space-between; gap:8px; }
#aiCreateTrainingModal .ai-media-title {
  font-family:'Roboto Condensed', sans-serif; font-size:14px; line-height:1.2; margin:0;
}
#aiCreateTrainingModal .ai-media-context {
  margin-top:8px; font-family:'Roboto Condensed', sans-serif;
  border:1px solid #e2e2e2; border-radius:5px; padding:10px; width:100%;
  background:#fff; outline:none; resize:vertical;
}
#aiCreateTrainingModal .ai-media-context:focus {
  border-color:#c2c2c2; box-shadow:0 0 0 2px rgba(20,87,135,.08);
}

#aiCreateTrainingModal .icon-btn { background:transparent; border:0; padding:6px; cursor:pointer; display:inline-flex; align-items:center; justify-content:center; }
#aiCreateTrainingModal .icon-btn i { font-size:16px; line-height:1; }

#aiCreateTrainingModal .ai-training-footer { display:flex; gap:10px; justify-content:center; margin-top:14px; }
#aiCreateTrainingModal .ai-loader,
#aiCreateTrainingModal #aiCreateError { margin-top:10px; }

/* Optional */
.ai_save_cancel {
  font-family:'Roboto Condensed', sans-serif; width:100px; padding:10px;
  margin-top:20px; margin-right:20px; border:2px solid #a7a7a7; border-radius:5px;
  background:#e2e2e2; color:#2e2e2e; font-size:1em; cursor:pointer; transition:background-color .3s ease;
}
.ai_save_cancel:hover { background-color: color-mix(in srgb, white 75%, var(--background-color)) !important; }

/* Add-link modal consistency */
#aiLinkModal .ai-link-form .ai-training-field { width:100%; }
#aiLinkModal .modal-buttons.ai-training-footer { justify-content:center; }

/* ================= Repository Picker (AI + Manual) ================ */

/* Correct input selectors (ID + class on same element) */
#repoSearch.text_box,
#chooseRepoSearch.text_box {
  font-family:'Roboto Condensed', sans-serif;
  border:1px solid #e2e2e2; border-radius:5px; padding:10px; width:100%;
  background:#fff; outline:none;
}

/* Media type icons (keep these) */
.photo-icon {
  width:52px; height:52px;
  background-color: color-mix(in srgb, rgb(255,255,255) 25%, var(--background-color));
  -webkit-mask: url('/assets/images/icons/photo_white.png') no-repeat center / contain;
          mask: url('/assets/images/icons/photo_white.png') no-repeat center / contain;
}
.photo-icon:hover { background-color: var(--background-color); }
.video-icon {
  width:52px; height:52px;
  background-color: color-mix(in srgb, rgb(255,255,255) 25%, var(--background-color));
  -webkit-mask: url('/assets/images/icons/video_white.png') no-repeat center / contain;
          mask: url('/assets/images/icons/video_white.png') no-repeat center / contain;
}
.video-icon:hover { background-color: var(--background-color); }

.hilighted-text-box {
  background:#f3f3f3; padding:12px; border-radius:5px; margin-top:12px; align-items:stretch;
}

/* Shared row layout */
.repo-row { border-bottom:1px solid #eee; cursor:pointer; transition:background .2s ease; }
.repo-row:hover { background:#f9fafc; }

.repo-row-head {
  display:flex; align-items:center; justify-content:space-between; gap:10px; padding:10px;
}
.repo-row-left { display:flex; align-items:center; gap:10px; flex:1; }
.repo-row-title {
  font-weight:600; font-size:14px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}

/* Preview (collapsed by default; toggled via JS) */
.repo-row-preview {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  padding: 0 10px 0 44px;        /* closed: no bottom pad */
  transition: max-height .25s ease, opacity .25s ease, padding .25s ease;
}
.repo-row-preview iframe,
.repo-row-preview img {
  max-width:100%; max-height:320px; border-radius:10px; border:0;
}

.repo-row.open .repo-row-preview {
  max-height: 480px;             /* enough space for iframe/img */
  opacity: 1;
  padding: 0 10px 10px 44px;      /* open: restore bottom pad */
}

/* ADD button vertically centered */
.repo-row-head .save_cancel { margin:0; align-self:center; }

/* ---------- Pagination (unified for AI + Manual) ---------- */
#repoPagination,
#chooseRepoPagination {
  display:flex; align-items:center; gap:6px; flex-wrap:wrap; margin-top:10px;
}

/* Prev/Next buttons */
.pv-nav {
  padding:6px 10px;
  border:1px solid #e2e2e2;
  background:#fff;
  border-radius:6px;
  cursor:pointer;
  font-family:'Roboto Condensed', sans-serif;
}
.pv-nav[disabled] { opacity:.5; cursor:not-allowed; }

/* Page dots container */
.pv-pages { display:flex; align-items:center; gap:6px; }

/* Page dot */
.pv-page-dot {
  min-width:32px; height:32px;
  padding:0 10px;
  border:1px solid #e2e2e2;
  background:#fff;
  border-radius:16px;
  cursor:pointer;
  display:inline-flex; align-items:center; justify-content:center;
  font-family:'Roboto Condensed', sans-serif;
}
.pv-page-dot.active {
  background: color-mix(in srgb, var(--background-color) 12%, white);
  border-color: color-mix(in srgb, var(--background-color) 30%, #e2e2e2);
  font-weight:600;
}
/* ====================== Employee Home Page ========================== */
.personal-info-icon {
  width: 52px;
  height: 52px;
  background-color: color-mix(in srgb, rgb(255, 255, 255) 25%, var(--background-color));
  -webkit-mask: url('/assets/images/icons/personal_info.png') no-repeat center / contain;
          mask: url('/assets/images/icons/personal_info.png') no-repeat center / contain;
}
.personal-info-icon:hover { background-color: var(--background-color); }

.employment-info-icon {
  width: 52px;
  height: 52px;
  background-color: color-mix(in srgb, rgb(255, 255, 255) 25%, var(--background-color));
  -webkit-mask: url('/assets/images/icons/employment_info.png') no-repeat center / contain;
          mask: url('/assets/images/icons/employment_info.png') no-repeat center / contain;
}
.employment-info-icon:hover { background-color: var(--background-color); }

.payroll-info-icon {
  width: 52px;
  height: 52px;
  background-color: color-mix(in srgb, rgb(255, 255, 255) 25%, var(--background-color));
  -webkit-mask: url('/assets/images/icons/payroll_info.png') no-repeat center / contain;
          mask: url('/assets/images/icons/payroll_info.png') no-repeat center / contain;
}
.payroll-info-icon:hover { background-color: var(--background-color); }

.bank-info-icon {
  width: 52px;
  height: 52px;
  background-color: color-mix(in srgb, rgb(255, 255, 255) 25%, var(--background-color));
  -webkit-mask: url('/assets/images/icons/bank_info.png') no-repeat center / contain;
          mask: url('/assets/images/icons/bank_info.png') no-repeat center / contain;
}
.bank-info-icon:hover { background-color: var(--background-color); }

.tax-info-icon {
  width: 52px;
  height: 52px;
  background-color: color-mix(in srgb, rgb(255, 255, 255) 25%, var(--background-color));
  -webkit-mask: url('/assets/images/icons/tax_info.png') no-repeat center / contain;
          mask: url('/assets/images/icons/tax_info.png') no-repeat center / contain;
}
.tax-info-icon:hover { background-color: var(--background-color); }

.ptos-icon {
  width: 52px;
  height: 52px;
  background-color: color-mix(in srgb, rgb(255, 255, 255) 25%, var(--background-color));
  -webkit-mask: url('/assets/images/icons/pto_info.png') no-repeat center / contain;
          mask: url('/assets/images/icons/pto_info.png') no-repeat center / contain;
}
.ptos-icon:hover { background-color: var(--background-color); }

.employee-deductions-icon {
  width: 52px;
  height: 52px;
  background-color: color-mix(in srgb, rgb(255, 255, 255) 25%, var(--background-color));
  -webkit-mask: url('/assets/images/icons/deduction_white.png') no-repeat center / contain;
          mask: url('/assets/images/icons/deduction_white.png') no-repeat center / contain;
}

.employee-deductions-icon:hover { background-color: var(--background-color); }

.policy-info-icon {
  width: 52px;
  height: 52px;
  background-color: color-mix(in srgb, rgb(255, 255, 255) 25%, var(--background-color));
  -webkit-mask:
    url('/assets/images/icons/policy_white.png')
    no-repeat center / contain;
          mask:
    url('/assets/images/icons/policy_white.png')
    no-repeat center / contain;
}

.policy-info-icon:hover {
    background-color: var(--background-color);
}

.employee-trainings-icon {
  width: 52px;
  height: 52px;
  background-color: color-mix(in srgb, rgb(255, 255, 255) 25%, var(--background-color));
  -webkit-mask:
    url('/assets/images/icons/training_white.png')
      no-repeat center / contain;
            mask:
      url('/assets/images/icons/training_white.png')
      no-repeat center / contain;
}

.employee-trainings-icon:hover {
    background-color: var(--background-color);
}

.employee-project-icon {
  width: 52px;
  height: 52px;
  background-color: color-mix(in srgb, rgb(255, 255, 255) 25%, var(--background-color));
  -webkit-mask:
    url('/assets/images/icons/project.png')
      no-repeat center / contain;
            mask:
      url('/assets/images/icons/project.png')
      no-repeat center / contain;
}

.employee-project-icon:hover {
    background-color: var(--background-color);
}

/* ================================
   Employee Home — Personal Info
   ================================ */
.employee_home_personal_info {
  display: grid;
  gap: 14px; /* space between boxes */
  font-family: 'Roboto Condensed', sans-serif;
}

/* Box */
.employee_home_personal_info .eh-box {
  border: 1px solid #e2e2e2;
  border-radius: 5px;
  background: #fff;
  overflow: hidden;
}

/* Header */
.employee_home_personal_info .eh-box-header {
  padding: 10px 14px;
  background: #fafafa;
  border-bottom: 1px solid #eaeaea;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.employee_home_personal_info .eh-box-header h4 {
  margin: 0;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .2px;
}

/* Body */
.employee_home_personal_info .eh-box-body {
  padding: 8px 10px;
}

/* Rows: label | value | (optional actions/icons) */
.employee_home_personal_info .eh-row {
  display: grid;
  grid-template-columns: 180px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 8px 4px;
  border-bottom: 1px dashed #eee;
}
.employee_home_personal_info .eh-row:last-child {
  border-bottom: 0;
}

/* Optional label/value helpers (if used) */
.employee_home_personal_info .eh-label {
  color: #666;
  font-weight: 600;
  white-space: nowrap;
}
.employee_home_personal_info .eh-value {
  color: #222;
  min-height: 20px;
}

/* Actions (e.g., EDIT icon in header) */
.employee_home_personal_info .eh-box-actions i {
  margin-left: 10px;
  cursor: pointer;
}

/* Right-aligned inline icons (e.g., SSN eye) */
.employee_home_personal_info .eh-right-icons {
  margin-left: auto;
  display: inline-flex;
  gap: 10px;
}

/* Simple list + pill styles (e.g., emergency contacts) */
.employee_home_personal_info .eh-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.employee_home_personal_info .eh-pill {
  margin-left: 8px;
  padding: 2px 6px;
  border: 1px solid #e2e2e2;
  border-radius: 999px;
  font-size: 12px;
}

/* ----- Emergency contacts: fluid single-line layout (wrap only if needed) ----- */
.employee_home_personal_info .eh-list .eh-row {
  /* override the 3-column grid for list items */
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 4px;
  border-bottom: 1px dashed #eee;
}
.employee_home_personal_info .eh-list .eh-row > span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap; /* will wrap only if viewport forces it */
}

/* Emergency contacts: align to the same 180px label column */
.employee_home_personal_info .eh-list .eh-row.eh-row--contacts {
  display: grid;
  grid-template-columns: 180px 1fr; /* match standard rows */
  align-items: center;
  gap: 8px;
  padding: 8px 4px;
  border-bottom: 1px dashed #eee;
}

.employee_home_personal_info .eh-list .eh-row.eh-row--contacts:last-child {
  border-bottom: 0;
}

.employee_home_personal_info .eh-list .eh-row.eh-row--contacts .eh-name {
  white-space: nowrap; /* keep name aligned like other labels */
}

.employee_home_personal_info .eh-list .eh-row.eh-row--contacts .eh-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;      /* stay on one line; wrap only if viewport forces it */
  min-width: 0;
}

/* Remove extra left padding inside Emergency Contacts list */
.employee_home_personal_info .eh-box-body .eh-list {
  margin: 0;
  padding-left: 0;       /* removes browser default list indentation */
}

/* Align contact rows flush with other boxes */
.employee_home_personal_info .eh-list .eh-row.eh-row--contacts {
  margin-left: -4px;     /* fine-tune to align perfectly with Address/Contact rows */
}

/* ================================
   Employee Home — Employment Info
   ================================ */
.employee_home_employment_info {
  display: grid;
  gap: 14px; /* space between boxes */
  font-family: 'Roboto Condensed', sans-serif;
}

/* Box */
.employee_home_employment_info .eh-box {
  border: 1px solid #e2e2e2;
  border-radius: 5px;
  background: #fff;
  overflow: hidden;
}

/* Header */
.employee_home_employment_info .eh-box-header {
  padding: 10px 14px;
  background: #fafafa;
  border-bottom: 1px solid #eaeaea;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.employee_home_employment_info .eh-box-header h4 {
  margin: 0;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .2px;
}

/* Body */
.employee_home_employment_info .eh-box-body {
  padding: 8px 10px;
}

/* Rows: label | value | (optional actions/icons) */
.employee_home_employment_info .eh-row {
  display: grid;
  grid-template-columns: 180px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 8px 4px;
  border-bottom: 1px dashed #eee;
}
.employee_home_employment_info .eh-row:last-child {
  border-bottom: 0;
}

/* Right-aligned inline icons (if ever needed) */
.employee_home_employment_info .eh-right-icons {
  margin-left: auto;
  display: inline-flex;
  gap: 10px;
}

/* Simple pill (e.g., Primary) */
.employee_home_employment_info .eh-pill {
  margin-left: 8px;
  padding: 2px 6px;
  border: 1px solid #e2e2e2;
  border-radius: 999px;
  font-size: 12px;
}

/* ================================
   Employee Home — Bank Info
   ================================ */
/* Employee Home — Bank Info */
.employee_home_bank_info {
  font-family: 'Roboto Condensed', sans-serif;
  display: grid;
  gap: 14px;                /* space between each bank account box */
}

/* Reusable box (same visual as Personal Info) */
.employee_home_bank_info .eh-box {
  border: 1px solid #e2e2e2;
  border-radius: 5px;
  background: #fff;
  overflow: hidden;
}

.employee_home_bank_info .eh-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #fafafa;
  border-bottom: 1px solid #eaeaea;
}

.employee_home_bank_info .eh-box-header h4 {
  margin: 0;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .2px;
}

.employee_home_bank_info .eh-box-actions i {
  margin-left: 10px;
  cursor: pointer;
}

.employee_home_bank_info .eh-box-body {
  padding: 8px 10px;
}

/* Rows: label | value | right icons  */
.employee_home_bank_info .eh-row {
  display: grid;
  grid-template-columns: 180px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 8px 4px;
  border-bottom: 1px dashed #eee;   /* dashed separators like Personal Info */
}
.employee_home_bank_info .eh-row:last-child {
  border-bottom: 0;
}

/* Right-side icon cluster (eye icon) */
.employee_home_bank_info .eh-right-icons {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

/* Small pill labels (Nickname, Primary) */
.employee_home_bank_info .eh-pill {
  margin-left: 8px;
  padding: 2px 6px;
  border: 1px solid #e2e2e2;
  border-radius: 999px;
  font-size: 12px;
}

/* ================================
   Employee Home — Tax Info
   ================================ */
.employee_home_tax_info {
  display: grid;
  gap: 14px; /* space between boxes */
  font-family: 'Roboto Condensed', sans-serif;
}

/* Box */
.employee_home_tax_info .eh-box {
  border: 1px solid #e2e2e2;
  border-radius: 5px;
  background: #fff;
  overflow: hidden;
}

/* Header */
.employee_home_tax_info .eh-box-header {
  padding: 10px 14px;
  background: #fafafa;
  border-bottom: 1px solid #eaeaea;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.employee_home_tax_info .eh-box-header h4 {
  margin: 0;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .2px;
}

/* Body */
.employee_home_tax_info .eh-box-body {
  padding: 8px 10px;
}

/* Rows: label | value | (optional actions/icons) */
.employee_home_tax_info .eh-row {
  display: grid;
  grid-template-columns: 180px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 8px 4px;
  border-bottom: 1px dashed #eee;
}
.employee_home_tax_info .eh-row:last-child {
  border-bottom: 0;
}

/* Optional label/value helpers (match other blocks) */
.employee_home_tax_info .eh-label {
  color: #666;
  font-weight: 600;
  white-space: nowrap;
}
.employee_home_tax_info .eh-value {
  color: #222;
  min-height: 20px;
}

/* Actions (e.g., EDIT icon in header) */
.employee_home_tax_info .eh-box-actions i {
  margin-left: 10px;
  cursor: pointer;
}

/* Inline right-aligned icon holder (kept for parity) */
.employee_home_tax_info .eh-right-icons {
  margin-left: auto;
  display: inline-flex;
  gap: 10px;
}

/* Pills (if you ever need them here) */
.employee_home_tax_info .eh-pill {
  margin-left: 8px;
  padding: 2px 6px;
  border: 1px solid #e2e2e2;
  border-radius: 999px;
  font-size: 12px;
}

/* Responsive tweak to keep layout tidy on narrow screens */
@media (max-width: 640px) {
  .employee_home_tax_info .eh-row {
    grid-template-columns: 130px 1fr auto;
  }
}

/* ================================
   Employee Home — PTOs
   ================================ */
.employee_home_ptos {
  display: grid;
  gap: 14px;
  font-family: 'Roboto Condensed', sans-serif;
}

.employee_home_ptos .eh-box {
  border: 1px solid #e2e2e2;
  border-radius: 5px;
  background: #fff;
  overflow: hidden;
}

.employee_home_ptos .eh-box-header {
  padding: 10px 14px;
  background: #fafafa;
  border-bottom: 1px solid #eaeaea;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.employee_home_ptos .eh-box-header h4 {
  margin: 0;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .2px;
}

.employee_home_ptos .eh-box-actions i {
  margin-left: 10px;
  cursor: pointer;
}

.employee_home_ptos .eh-box-body {
  padding: 8px 10px;
}

.employee_home_ptos .eh-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  align-items: center;
  gap: 8px;
  padding: 8px 4px;
  border-bottom: 1px dashed #eee;
}
.employee_home_ptos .eh-row:last-child {
  border-bottom: 0;
}

.employee_home_ptos .eh-pill {
  margin-left: 8px;
  padding: 2px 6px;
  border: 1px solid #e2e2e2;
  border-radius: 999px;
  font-size: 12px;
}

/* ================================
   Employee Home — Policies
   ================================ */
.employee_home_policies {
  display: grid;
  font-family: 'Roboto Condensed', sans-serif;
}

/* Policy row “card” */
.employee_home_policies .eh-doc {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  background: #f1f1f3;
  border: none;
  border-radius: 5px;
  padding: 12px 14px;
  margin-bottom: 5px;
  margin-left: 10px;
  margin-right: 10px;
}

/* Left side: title + status */
.employee_home_policies .eh-doc-main {
  min-width: 0;
}
.employee_home_policies .eh-doc-title {
  font-weight: 700;
  margin: 0 0 4px 0;
  color: #222;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.employee_home_policies .eh-doc-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
}
.employee_home_policies .eh-doc-status.status-signed {
  color: #216e39;                  /* green */
}
.employee_home_policies .eh-doc-status.status-pending {
  color: #b00020;                  /* red */
}
.employee_home_policies .eh-doc-signed-at {
  opacity: .7;
  font-weight: 400;
}

/* Right side: actions */
.employee_home_policies .eh-doc-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
}

/* VIEW button */
.employee_home_policies .btn-view-policy {
  padding: 6px 12px;
  border: 1px solid #cfcfd5;
  background: #fff;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  line-height: 1.2;
  transition: background .15s ease, border-color .15s ease, transform .05s ease;
}
.employee_home_policies .btn-view-policy:hover {
  background: #f8f8fb;
  border-color: #bbbcc4;
}
.employee_home_policies .btn-view-policy:active {
  transform: scale(0.98);
}

/* Empty state */
.employee_home_policies .eh-doc-empty {
  background: #fafafa;
  border: 1px dashed #e1e1e6;
  border-radius: 6px;
  padding: 14px;
  color: #666;
}

.employee_home_policies .btn-view-policy {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 6px;
  color: #444;
  font-size: 16px;
  transition: color .2s ease, transform .1s ease;
}
.employee_home_policies .btn-view-policy:hover {
  color: var(--company-color); /* matches theme */
  transform: scale(1.1);
}
.employee_home_policies .btn-view-policy i {
  pointer-events: none;
}

/* Responsive */
@media (max-width: 640px) {
  .employee_home_policies .eh-doc {
    grid-template-columns: 1fr; /* stack button below */
    row-gap: 10px;
  }
  .employee_home_policies .eh-doc-actions {
    justify-content: flex-start;
  }
}

/* ==========================================
   Employee Home — Policy View Modal
   ========================================== */

.policy-view-modal {
  max-width: 820px;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.1);
}

.policy-view-title {
  text-align: center;
  margin-bottom: 16px;
  font-size: 20px;
  font-weight: 700;
  color: #222;
}

.policy-view-body {
  max-height: 380px;
  overflow: auto;
  border: 1px solid #ddd;
  padding: 16px 18px;
  background: #fff;
  text-align: left;
  line-height: 1.6;
  font-size: 15px;
  color: #222;
  border-radius: 4px;
}

.policy-affirm-label {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin: 16px 0 10px;
  line-height: 1.4;
  font-size: 14px;
  color: #333;
}

.policy-affirm-checkbox {
  margin-top: 3px;
  cursor: pointer;
}

.signature-input {
  margin: 12px 0 6px;
}

.signature-input-field {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 17px;
  color: #333;
  background: #fafafa;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.signature-input-field::placeholder {
  color: #999;
}

.policy-sign-error {
  color: #b00020;
  margin: 8px 0;
  font-weight: 600;
}

.policy-modal-buttons {
  margin-top: 12px;
  display: flex;
  gap: 10px;
}

.policy-sign-btn {
  background: #2b7a3d;
  color: #fff;
}

.policy-cancel-btn {
  background: #ccc;
  color: #000;
}

/* Policy modal visual tweaks */
.policy-modal__title { text-align:center; margin: 0 0 10px; }
.policy-modal__body {
  max-height: 380px;
  overflow: auto;
  border: 1px solid #eee;
  padding: 12px;
  background: #fff;
  text-align: left; /* left-align content */
}

/* Unsigned controls */
.policy-modal__controls { margin-top: 12px; }
.policy-modal__affirm {
  display: flex; gap: 8px; align-items: flex-start;
  margin: 8px 0 10px;
}
.policy-modal__affirm input { margin-top: 3px; }

.policy-modal__name input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #cfd3d9;
  border-radius: 6px;
  font-size: 15px;
  outline: none;
}
.policy-modal__name input:focus {
  border-color: #9bb5d4;
  box-shadow: 0 0 0 3px rgba(64, 128, 255, 0.12);
}

/* Signed receipt */
.policy-modal__signed { margin-top: 12px; }
.policy-modal__receipt {
  border: 1px dashed #dcdcdc;
  border-radius: 6px;
  padding: 10px 12px;
  background: #fafafa;
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
}

.policies-header-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:8px;
}

.ep-admin-selector .ep-row{
  display:flex;
  gap:8px;
  align-items:center;
  margin-bottom:10px;
}

/* ===== Policy Selector (modal) width/padding + alignment fixes ===== */
#ehAddPolicyModal .ep-admin-selector,
#ehAddPolicyModal .ep-admin-selector * {
  box-sizing: border-box;
}

#ehAddPolicyModal .ep-admin-selector {
  width: 100%;
}

/* ---- Left alignment consistency (dropdown, checkbox, pills) ---- */
#ehAddPolicyModal .ep-admin-selector .ep-row,
#ehAddPolicyModal .ep-admin-selector label,
#ehAddPolicyModal .ep-admin-selector #epChosenList {
  margin-left: 0 !important;
  padding-left: 0 !important;
}

/* Checkbox label row */
#ehAddPolicyModal .ep-admin-selector label {
  display: flex;
  align-items: center;
  gap: 8px;
  position: static;
}

#ehAddPolicyModal .ep-admin-selector label input[type="checkbox"] {
  margin: 0;
  position: static;
}

/* ---- Row with dropdown + plus button ---- */
#ehAddPolicyModal .ep-admin-selector .ep-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

#ehAddPolicyModal .ep-admin-selector .ep-row select {
  flex: 1 1 auto;     /* take all remaining space */
  min-width: 0;       /* allow shrinking so it doesn't force overflow */
}

#ehAddPolicyModal .ep-admin-selector .ep-row .plus-overlay {
  flex: 0 0 32px;     /* fixed size */
}

/* ---- Pill list (full width, aligned) ---- */
#ehAddPolicyModal .eow-pill-list {
  width: 100%;
  list-style: none;
  padding: 0 !important;
  margin: 10px 0 0 0 !important;
  display: grid;
  grid-template-columns: 1fr;   /* one per line, full width */
  gap: 0px;
}

/* ---- Pill appearance ---- */
#ehAddPolicyModal .eow-pill {
  width: 100%;
  padding: 10px 12px; /* match onboarding */
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #EFEFEF;
  border: 1px solid #E5E5E5;
  border-radius: 5px;
  box-shadow: 0 1px 2px rgba(0,0,0,.05);
}

#ehAddPolicyModal .eow-pill-text {
  font-weight: 600;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---- Remove button ---- */
#ehAddPolicyModal .eow-pill-remove {
  appearance: none;
  border: 0;
  background: #e0e0e0;
  border-radius: 999px;
  width: 26px;
  height: 26px;
  font-size: 18px;
  line-height: 26px;
  text-align: center;
  cursor: pointer;
  transition: background .15s ease-in-out, transform .05s ease-in-out;
}

#ehAddPolicyModal .eow-pill-remove:hover {
  background: #d4d4d4;
}

#ehAddPolicyModal .eow-pill-remove:active {
  transform: scale(0.95);
}

/* ==========================================
   Employee Home — Policy View Modal
   ========================================== */
/* Assign Policy selector layout inside modal */
#assignPolicyModal .ep-admin-selector,
#assignPolicyModal .ep-admin-selector * { box-sizing: border-box; }
#assignPolicyModal .ep-admin-selector { width: 100%; }
#assignPolicyModal .ep-admin-selector .ep-row {
  display: flex; align-items: center; gap: 8px; width: 100%;
}
#assignPolicyModal .ep-admin-selector .ep-row select {
  flex: 1 1 auto; min-width: 0;
}
#assignPolicyModal .ep-admin-selector .ep-row .plus-overlay {
  flex: 0 0 32px;
}
#assignPolicyModal .eow-pill-list {
  width: 100%; display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 10px;
}
#assignPolicyModal .eow-pill {
  width: 100%; padding: 10px 12px; display: flex; align-items: center; justify-content: space-between;
}

/* ===========================
   Employee Home — Trainings
   =========================== */

.trainings-list { margin-top: 8px; }

.trainings-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
}

.trainings-table thead th {
  text-align: left;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .02em;
  color: #374151;
  background: #f8fafc;
  padding: 10px 12px;
  border-bottom: 1px solid #e5e7eb;
}

.trainings-table tbody td {
  padding: 12px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
  color: #111827;
  font-size: 14px;
}

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

.trainings-table tbody tr:hover {
  background: #f9fbff;
}

.t-name {
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: 4px;
  color: #0f172a;
}

.t-desc {
  color: #6b7280;
  font-size: 12.5px;
  line-height: 1.35;
  max-width: 52ch;
}

/* Badges (scoped so we don't clash globally) */
.trainings-list .badge {
  display: inline-block;
  padding: 10px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
  line-height: 1;
  border: 1px solid transparent;
}

.trainings-list .badge-success { background: #e8f7ee; color: #146c43; border-color: #c9ecd7; }
.trainings-list .badge-info    { background: #eaf6ff; color: #0b5ed7; border-color: #cfe8ff; }
.trainings-list .badge-danger  { background: #fde8e8; color: #b91c1c; border-color: #f7caca; }
.trainings-list .badge-warning { background: #fff7e6; color: #a16207; border-color: #ffe7b7; }

/* Progress */
.progress {
  width: 100%;
  background: #eef2f7;
  border-radius: 9999px;
  height: 8px;
  overflow: hidden;
}

.progress-thin { height: 6px; }

.progress-bar {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #60a5fa, #22d3ee);
  transition: width .28s ease-in-out;
}

.progress-label {
  margin-top: 6px;
  font-size: 12px;
  color: #6b7280;
}

/* Actions */
.text-right { text-align: right; }

.trainings-list .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid transparent;
  border-radius: 5px;
  cursor: pointer;
  user-select: none;
  transition: transform .06s ease, box-shadow .2s ease, background-color .2s ease, border-color .2s ease;
}

.trainings-list .btn-primary {
  background: var(--background-color);
  color: #fff;
  border-color: none;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}

.trainings-list .btn-primary:hover { background: color-mix(in srgb, rgb(255, 255, 255) 25%, var(--background-color));; }
.trainings-list .btn-primary:active { transform: translateY(1px); }

.trainings-list .btn-xs {
  font-size: 12px;
  padding: 8px 10px;
}

/* Empty state */
.empty-hint {
  padding: 14px 12px;
  font-size: 13px;
  color: #6b7280;
  background: #f8fafc;
  border: 1px dashed #e5e7eb;
  border-radius: 12px;
}

/* --- Training details toggle --- */
.t-details { margin-top: 6px; }
.t-details-toggle {
  display: inline-block;
  font-size: 12px;
  color: #2563eb;
  text-decoration: none;
  cursor: pointer;
}
.t-details-toggle:hover { text-decoration: underline; }

.t-details-box {
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fafafb;
}

.t-details-inner {
  font-size: 13px;
  line-height: 1.45;
  color: #414b57;
}

.t-details-inner b, .t-details-inner strong { color: #0f172a; }
.t-details-inner i, .t-details-inner em { color: #374151; }
.t-details-inner ul, .t-details-inner ol { margin: 6px 0 6px 18px; }
.t-details-inner br { line-height: 180%; }

/* Employee training modal should fill 95% of viewport width */
#employeeTrainingModal .modal-dialog.modal-xl {
  max-width: 95vw !important;
  width: 95vw !important;
}

/* Responsive tweaks */
@media (max-width: 720px) {
  .trainings-table thead { display: none; }
  .trainings-table, .trainings-table tbody, .trainings-table tr, .trainings-table td {
    display: block;
    width: 100%;
  }
  .trainings-table tbody tr {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    margin-bottom: 10px;
    padding: 10px 10px 8px;
    background: #fff;
  }
  .trainings-table tbody td {
    border: none;
    padding: 6px 0;
  }
  .trainings-table tbody td.text-right {
    margin-top: 8px;
  }
  .progress-label { text-align: right; }
}

/* ================= Employee Training Modal (Final Preview Layout) ================= */

/* Modal body fills viewport, with paginator at bottom */
#employeeTrainingModal .modal-content {
  display: flex;
  flex-direction: column;
  height: 90vh;
  width: 95vw;
  max-width: 95vw;
  overflow-y: auto;
  position: center;
  padding-top: 0;
  padding-bottom: 0;
}

#employeeTrainingModalBody {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* Root and viewport containers */
#employeeTrainingPreviewRoot {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

#trainingPreviewViewport.pv-viewport {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding-right: 6px;
}

/* Global paginator pinned to bottom, matching site style */
#pvGlobalPaginator.pv-paginator {
  flex: 0 0 auto;
  padding-top: 10px;
  background: #fff;
  border-top: 1px solid #eee;
}

/* ================= Content Styling (flow layout identical to PREVIEW) ================= */

/* Page cards: simple white background, no frame */
#employeeTrainingModal .page-card.preview {
  position: relative;
  border: none;
  box-shadow: none;
  background: #fff;
  padding-bottom: 80px;
  padding-top: 20px;
  padding-left: 14px;
  padding-right: 14px;
  max-width: 880px;
  margin: 0 auto 20px auto;
}

/* The preview page's zone: center blocks, wrap, keep spacing identical to editor preview */
#employeeTrainingModal .page-card.preview .preview-zone {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;    /* blocks centered as a group */
  align-items: flex-start;
  gap: 16px;
  margin-left: auto;
  margin-right: auto;
  padding-bottom: 72px;       /* space for paginator */
  max-width: 100%;
  text-align: left;           /* prevent inherited centering on children */
}

/* Sticky paginator bar at the bottom of the scrolling modal */
#employeeTrainingModal .page-card.preview .pv-paginator {
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;

  z-index: 10;                 /* same layer as top bar */
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;

  height: 64px;                /* height of the bar */
  width: 100%;
  padding: 0 14px;
  margin: 0;

  background: #fff;            /* solid so content can't show through */
  border-top: 1px solid #eee;  /* subtle separator */
}

/* Keep nav buttons and dots tidy inside the bar */
#employeeTrainingModal .pv-paginator .pv-pages {
  display: flex;
  gap: 6px;
  align-items: center;
}

#employeeTrainingModal .pv-paginator .pv-nav,
#employeeTrainingModal .pv-paginator .pv-page-dot {
  height: 36px;
  min-width: 36px;
  padding: 0 10px;
}

/* Stream blocks follow preview flow; width/height come from inline styles (w/h columns) */
#employeeTrainingModal .stream-text,
#employeeTrainingModal .stream-media,
#employeeTrainingModal .stream-query {
  box-sizing: border-box;
  margin: 0;                  /* spacing handled by .preview-zone gap */
  overflow: visible;
  text-align: left;           /* FORCE left text alignment inside each block */
  max-width: 100%;
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* ---- TEXT ---- */
#employeeTrainingModal .pv-text-title {
  font-weight: 600;
  margin-bottom: 8px;
  text-align: left !important;
}

#employeeTrainingModal .pv-text-body {
  line-height: 1.6;
  color: #333;
  text-align: left !important; /* ensure no global centering leaks in */
}

/* ---- MEDIA ---- */

/* Body of a media block always fills its container; children handle aspect */
#employeeTrainingModal .pv-media-body {
  width: 100%;
  height: 100%;
}

/* Default responsive 16:9 wrapper when no explicit height is set */
#employeeTrainingModal .media-embed-wrap {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  border-radius: 10px;
  overflow: hidden;
  background: #000;
}

/* If container has explicit height (inline style with height), use full-height embed */
#employeeTrainingModal .stream-media[style*="height"] .media-embed-wrap {
  padding-top: 0;
  height: 100%;
}

#employeeTrainingModal .media-embed-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Images scale to width; no distortion */
#employeeTrainingModal .pv-media-img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 520px;
  border-radius: 10px;
}

/* ---- QUERY ---- */
#employeeTrainingModal .pv-query-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
}

#employeeTrainingModal .pv-query-option {
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 8px;
  background: #fff;
}

/* Badges used by feedback JS */
#employeeTrainingModal .pv-ans-badge {
  font-size: 11px;
  font-weight: 700;
  display: inline-block;
  margin-right: 8px;
  padding: 2px 6px;
  border-radius: 4px;
  background: #eee;
}

#employeeTrainingModal .pv-your-correct { background: #cfe8d5; }
#employeeTrainingModal .pv-corr         { background: #d7ecff; }

/* Correct/wrong highlighting */
#employeeTrainingModal .pv-query-option.pv-correct { border-color: #7bcf91; background: #e7f7ea; }
#employeeTrainingModal .pv-query-option.pv-wrong   { border-color: #e6b1b1; background: #ffe9e9; }
#employeeTrainingModal .pv-query-option.pv-right-answer { outline: 2px solid #7bcf91; }

/* ---- Paginator (per-page) ---- */
#employeeTrainingModal .pv-paginator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #eee;
  background: #fff;
  position: relative;
  z-index: 1; /* ensure it's above any content overlaps */
}

#employeeTrainingModal .pv-pages {
  display: flex;
  gap: 6px;
}

#employeeTrainingModal .pv-page-dot,
#employeeTrainingModal .pv-nav {
  appearance: none;
  border: 1px solid #ccc;
  background: #fff;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  line-height: 1;
}

#employeeTrainingModal .pv-page-dot.active {
  background: #145787;
  color: #fff;
  border-color: #145787;
}

#employeeTrainingModal .pv-nav:disabled {
  opacity: 0.5;
  cursor: default;
}

/* ===== Sticky close control (top-right), visible while scrolling ===== */
#employeeTrainingModal .modal-close-wrap {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;

  z-index: 10;
  flex: 0 0 auto;

  display: flex;
  align-items: center;
  justify-content: flex-end;

  height: 56px;
  width: 100%;
  padding: 5px 14px 0px 14px;

  margin: 0;

  background: #fff;
  border-bottom: 1px solid #eee;
}

#employeeTrainingModal .modal-close-btn {
  appearance: none;
  border: none;
  background: transparent;
  cursor: pointer;
  line-height: 0;
  padding: 0;
}

#employeeTrainingModal .modal-close-btn i.fa-circle-xmark {
  font-size: 26px;
  color: #7b8a8f;            /* neutral */
  transition: transform .12s ease-out, color .12s ease-out;
}

#employeeTrainingModal .modal-close-btn:hover i.fa-circle-xmark {
  transform: scale(1.06);
  color: #145787;            /* brand accent on hover */
}

/* optional: if your modal has a dark backdrop and content can scroll under the icon,
   give the icon a subtle white halo to improve contrast on media */
#employeeTrainingModal .modal-close-btn i.fa-circle-xmark {
  text-shadow: 0 1px 0 rgba(255,255,255,.65);
}

/* ===== Finish button (top-left, hidden until 100%) ===== */
#employeeTrainingModal .finish-training-btn {
  margin-right: auto;
  appearance: none;
  border: none;
  background: var(--background-color);
  color: #fff;
  font-size: 14px;
  font-weight: 100;
  border-radius: 5px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background 0.15s ease-out, transform 0.12s ease-out;
}

#employeeTrainingModal .finish-training-btn:hover {
  background: #0f456b;
  transform: scale(1.03);
}

/* --------- REDO CONFIRM MODAL CLOSE (Top-Right Corner) --------- */
#redoTrainingModal {
  position: fixed;
  inset: 0;
  display: none;
  justify-content: center;
  align-items: center;
  background-color: rgba(0,0,0,0.4);
  z-index: 1000;
}

/* Make it behave like employeeTrainingModal */
#redoTrainingModal .modal-content {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 95vw;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  padding-top: 0;
  padding-bottom: 20px;
}

/* Match the top strip with the close button */
#redoTrainingModal .modal-close-wrap {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  height: 56px;
  padding: 5px 0 0 14px;
  background: #fff;
}

/* Close button style (same as main modal) */
#redoTrainingModal .modal-close-btn {
  appearance: none;
  border: none;
  background: transparent;
  cursor: pointer;
  line-height: 0;
  padding: 0;
}

#redoTrainingModal .modal-close-btn i.fa-circle-xmark {
  font-size: 26px;
  color: #7b8a8f;
  text-shadow: 0 1px 0 rgba(255,255,255,.65);
  transition: transform .12s ease-out, color .12s ease-out;
}

#redoTrainingModal .modal-close-btn:hover i.fa-circle-xmark {
  transform: scale(1.06);
  color: #145787;
}



















/* ================================================================ */
/* =========================== MOBILE ============================= */
/* ================================================================ */
@media (max-width: 768px) {
  /* hide desktop header / show mobile header */
  .desktop-only { display: none; }
  .navbar-mobile {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0 10px;
  }
  .mobile-only { display: inline-flex; }

  /* stack main area under header and lock its height */
  .main-area {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 60px); /* adjust if your header is taller/shorter */
    overflow: hidden;           /* force scrolling into children */
  }

  /* off-canvas sidebar: full-height, its own scroll, contained overscroll */
  .side-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 75%;
    max-width: 300px;
    bottom: 0;                  /* use bottom instead of height */
    background: var(--background-color);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 1000;

    display: flex;
    flex-direction: column;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    color: #fff;
  }
  .side-menu.open {
    transform: translateX(0);
  }

  /* sidebar list items */
  .side-menu ul li {
    padding: 5px 10px;
    border: 1px solid #e2e2e2;
    border-radius: 5px;
    margin-bottom: 5px;
    transition: background-color 0.3s ease, padding 0.3s ease;
    color: #fff;
  }
  .side-menu ul li a {
    color: #fff;
  }
  .side-menu ul li:hover {
    background-color: #f4f4f4;
  }
  .side-menu ul li:hover a {
    color: var(--background-color);
  }
  .side-menu h4 {
    padding: 10px 0;
  }

  /* nav icons & buttons */
  .nav-icon {
    width: 50px;
    height: 50px;
    margin: 0 5px;
  }
  .menu_button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
  }

  /* header wrapper */
  .header-wrapper {
    display: flex;
    flex-direction: column;    /* stack title + controls vertically */
    align-items: center;       /* center them horizontally */
    text-align: center;        /* center text inside */
    gap: 0.5rem;
  }
  .header-controls {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }
  .header-controls-buttons {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 12px;
    margin-bottom: 12px;
  }

  /* search form tweaks */
  .search-icon,
  .search-close-icon {
    display: flex;
  }
  .search-form {
    display: none !important;
  }
  .search-form-container {
    width: 100%;
    display: block;
    margin: 0;
    padding: 0 8px;
    box-sizing: border-box;
  }
  .hidden {
    display: none !important;
  }
  .search-form-mobile {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
  }
  .search-form-mobile .clear-search-btn {
    position: absolute;
    right: 96px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #aaa;
    font-size: 1.5em;
    line-height: 1;
    padding: 0;
    cursor: pointer;
    z-index: 10;
    outline: none;
  }
  .search-form-mobile .search-submit-btn {
    margin-left: 8px;
  }
  .search-form-mobile .search-input {
    flex: 1 1 auto;
    padding-right: 2.5em; /* space for clear button */
  }

  /* close button in sidebar */
  .close-sidebar-button {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: #fff;
    cursor: pointer;
    z-index: 1100;
    margin-top: -5px;
  }

  /* tables & horizontal scroll */
  .settings-table th,
  .settings-table td {
    padding: 0.5rem;
    font-size: 0.85rem;
  }
  .table-scroll-x {
    margin-bottom: 18px;
  }
  .table-scroll-x .settings-table {
    min-width: 700px;
    font-size: 0.9em;
  }

  /* branch dropdown */
  .branch-dropdown {
    font-size: 0.9rem;
    padding: 10px;
    width: 100%;
    background-color: var(--background-color);
    color: #fff;
    background-image: url('/assets/images/icons/down_white.png');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 20px;
  }
  .form-container-page {
    overflow-anchor: none;
  }
  .form-container-page .permissions-grid {
    max-width: 800px;
    margin: 0 auto;
  }

  /* compact pagination */
  .activity-stream-title {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  .activity-stream-title h3 {
    width: 100%;
    margin-bottom: 0.5rem;
  }
  .pagination-stream {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
  }
  .pagination-stream .pagination-stream-controls {
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  #perPageForm {
    margin: 0;
    margin-top: 0.75rem;
    justify-content: center;
  }

  /* milestone pages */
  .milestone-page-gantt {
    max-width: 80%;
    margin: 0 auto;
    padding: 20px 30px 16px 30px;
    background: #f6f6fb;
    border-radius: 12px;
  }
  .milestone-page-wrapper {
    margin-bottom: 15px;
  }
  .milestone-page-donuts-row {
    gap: 18px;
    padding: 22px 0 18px 0;
  }
  .milestone-page-donuts-row > * {
    --donut-size: 50px;
  }
  .milestone-donut-label {
    font-size: 10px;
    margin-top: 2px;
  }

  /* === MODAL CONTENT SCROLL FIX === */
  /* keep your existing widths/paddings but cap height to 90% of viewport */
  .modal-content,
  .modal-content-left,
  .modal-content-left-borderless {
    padding: 0.7em 0.7em 1.2em 0.7em;
    width: 85vw;
    max-width: 85vw;
    max-height: 80vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overflow-x: hidden !important;
    overscroll-behavior-x: none;
    overscroll-behavior: contain;
    touch-action: pan-y;
    font-size: 1em;
    border-radius: 10px;
    margin: 0 auto;
    box-sizing: border-box;
  }

  /* special case for your filter modal */
  #streamFilterModal .modal-content {
    max-width: 98vw;
    padding: 18px 6vw;
    max-height: 90vh;               /* <-- normalized to 90vh */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
  #streamFilterModal .close {
    top: 7px;
    right: 10px;
    font-size: 1.4em;
  }

  /* smaller date-input overrides you already had */
  #newMilestoneModal .form-container input[type="datetime-local"],
  #newTaskModal    .form-container input[type="datetime-local"] {
    width: 90%;
  }

  .date-inputs-flex {
    width: 95%;
    display: column;
    gap: 12.5%;
  }

  .terms-body {
    border-radius: 5px;
    padding: 15px;
    width: 100%;
  }
  .terms-wrapper {
    padding: 5px;
    max-width: 100%;
    margin: 0 auto;
  }
  .milestone-dates {
    font-size: 10px;
    color: #5c5c5c;
    opacity: 0.7;
    display: flex;
    justify-content: center;
    gap: 1px;
  }

  /* training palette chips */
  .palette-items {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      margin: auto;
      gap: 10px; /* keeps spacing between chips */
      margin-bottom: 10px;
  }

}

input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
input[type="datetime-local"],
input[type="date"],
textarea,
select {
  font-size: 16px !important;
}

/* FORCE ALL .modal to be on top and full viewport regardless of parent scroll/flex */
body > .modal, html > .modal {
  position: fixed !important;
  left: 0 !important; top: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 20000 !important;
  pointer-events: auto !important;
}

body > .modal[style*="display: block"], html > .modal[style*="display: block"] {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* iOS Safari: prevent native date control from overflowing grid cells */
@supports (-webkit-touch-callout: none) {
  /* allow grid children to shrink */
  #employeeOnboardingWizardModal .eow-step [style*="grid-template-columns"] > * {
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* neutralize iOS date input’s intrinsic width */
  #employeeOnboardingWizardModal input[type="date"].employee-dob{
    -webkit-appearance: none !important;
    appearance: none !important;
    inline-size: 100% !important;     /* logical 100% width */
    max-inline-size: 100% !important;
    min-inline-size: 0 !important;
    overflow: hidden !important;       /* belt & suspenders */
  }
  /* hide the calendar button to remove extra width pressure */
  #employeeOnboardingWizardModal input[type="date"].employee-dob::-webkit-calendar-picker-indicator{
    display: none !important;
    -webkit-appearance: none !important;
  }
}

/* === Date input wrapper + fake placeholder (always show our label) === */
.input-date-wrap{ position: relative; }
.input-date-wrap .fake-placeholder{
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #9aa3af;
  pointer-events: none;
  font-size: 1em;
  line-height: 1;
  transition: opacity .12s ease;
  display: block; /* show on all platforms */
}
/* hide only when the input has a value (set by JS with .has-value) */
.input-date-wrap.has-value .fake-placeholder{ opacity: 0; }

/* WebKit/Blink (Chrome/Safari/iOS): hide mm/dd/yyyy when empty */
.input-date-wrap:not(.has-value) input[type="date"].employee-dob::-webkit-datetime-edit { color: transparent; }

/* Once the user has selected/typed a date, show the real text color */
.input-date-wrap.has-value input[type="date"].employee-dob::-webkit-datetime-edit { color: #111827; }

/* iOS: keep our styling + no calendar indicator width */
@supports (-webkit-touch-callout: none) {
  #employeeOnboardingWizardModal input[type="date"].employee-dob{
    -webkit-appearance: none !important;
    appearance: none !important;
    inline-size: 100% !important;
    max-inline-size: 100% !important;
    min-inline-size: 0 !important;
    background-color: #fff !important;
    border: 1px solid #e2e2e2 !important;
    border-radius: 5px !important;
  }
  #employeeOnboardingWizardModal input[type="date"].employee-dob::-webkit-calendar-picker-indicator{
    display: none !important;
    -webkit-appearance: none !important;
  }
}

/* Ensure consistent styling for the date input itself */
#employeeOnboardingWizardModal input[type="date"].employee-dob{
  background-color: #fff;
  border: 1px solid #e2e2e2;
  border-radius: 5px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 40px;
  padding: 8px 10px;
  margin: 10px 0 13px;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 16px; /* prevents iOS zoom */
  box-sizing: border-box;
}

/* iOS Safari: neutralize native widget width, but KEEP our styling */
@supports (-webkit-touch-callout: none) {
  #employeeOnboardingWizardModal input[type="date"].employee-dob{
    -webkit-appearance: none !important;
    appearance: none !important;
    inline-size: 100% !important;
    max-inline-size: 100% !important;
    min-inline-size: 0 !important;
    background-color: #fff !important;       /* restore styling */
    border: 1px solid #e2e2e2 !important;    /* restore styling */
    border-radius: 5px !important;
  }
  #employeeOnboardingWizardModal input[type="date"].employee-dob::-webkit-calendar-picker-indicator{
    display: none !important; /* removes extra width pressure */
  }
}

/* Employee Onboarding: show typed date text while editing (even before full validity) */
#employeeOnboardingWizardModal .input-date-wrap.is-focused input[type="date"].employee-dob::-webkit-datetime-edit,
#employeeOnboardingWizardModal .input-date-wrap.has-value input[type="date"].employee-dob::-webkit-datetime-edit {
  color: #111827 !important; /* overrides the global 'transparent when empty' rule */
}

/* Hide the fake label while the field is focused */
#employeeOnboardingWizardModal .input-date-wrap.is-focused .fake-placeholder { opacity: 0; }

/* ============================
   PTO modal: date inputs + fake placeholders
   Mirrors Employee Onboarding styles, but scoped to #ptoPolicyModal
   ============================ */
#ptoPolicyModal .input-date-wrap { position: relative; }

#ptoPolicyModal .input-date-wrap .fake-placeholder{
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #9aa3af;
  pointer-events: none;
  font-size: 1em;
  line-height: 1;
  transition: opacity .12s ease;
  display: block; /* always show our label until there's a value */
}

/* hide only when the input actually has a value (toggled by JS) */
#ptoPolicyModal .input-date-wrap.has-value .fake-placeholder{ opacity: 0; }

/* WebKit/Blink: hide native mm/dd/yyyy when empty */
#ptoPolicyModal .input-date-wrap:not(.has-value) input[type="date"].employee-dob::-webkit-datetime-edit { color: transparent; }

/* Once user typed/selected a date, show the real text color */
#ptoPolicyModal .input-date-wrap.has-value input[type="date"].employee-dob::-webkit-datetime-edit { color: #111827; }

/* PTO modal: date input box visuals to match employee wizard */
#ptoPolicyModal input[type="date"].employee-dob{
  background-color: #fff;
  border: 1px solid #e2e2e2;
  border-radius: 5px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 40px;
  padding: 8px 10px;
  margin: 10px 0 13px;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 16px; /* prevents iOS zoom */
  box-sizing: border-box;
}

/* iOS Safari: neutralize native widget width, keep styling */
@supports (-webkit-touch-callout: none) {
  #ptoPolicyModal input[type="date"].employee-dob{
    -webkit-appearance: none !important;
    appearance: none !important;
    inline-size: 100% !important;
    max-inline-size: 100% !important;
    min-inline-size: 0 !important;
    background-color: #fff !important;
    border: 1px solid #e2e2e2 !important;
    border-radius: 5px !important;
  }
  #ptoPolicyModal input[type="date"].employee-dob::-webkit-calendar-picker-indicator{
    display: none !important; /* remove extra width pressure */
  }
}

/* ============================
   PTO modal: checkbox row layout
   ============================ */
#ptoPolicyModal .form-row-checks{
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap; /* wrap on small screens */
  margin: 8px 0 4px;
}

#ptoPolicyModal .form-row-checks .checkbox-inline{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  line-height: 1.2;
  white-space: nowrap;
}

#ptoPolicyModal .form-row-checks .checkbox-inline input[type="checkbox"]{
  width: 16px; height: 16px;
  margin: 0;
}

/* PTO modal: show the typed date text while editing, even before it's a valid date */
#ptoPolicyModal .input-date-wrap.is-focused input[type="date"].employee-dob::-webkit-datetime-edit,
#ptoPolicyModal .input-date-wrap.has-value input[type="date"].employee-dob::-webkit-datetime-edit {
  color: #111827 !important;
}

/* Keep the fake placeholder hidden while editing (you already have this) */
#ptoPolicyModal .input-date-wrap.is-focused .fake-placeholder { opacity: 0; }

/* If the date input is disabled, keep the label visible */
#ptoPolicyModal .input-date-wrap input[type="date"].employee-dob:disabled + .fake-placeholder { opacity: 1; }

.pto-chip { padding: 5px 10px; border:1px solid #ccc; border-radius:5px; background:#fff; cursor:pointer; margin-bottom: 15px;}
.selected-chips { margin-bottom: 10px; }
