html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

@font-face {
  font-family: "griffith-gothic";
  src: url("../fonts/GriffithGothic-Bold.otf") format("opentype");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "griffith-gothic";
  src: url("../fonts/GriffithGothic-BoldItalic.otf") format("opentype");
  font-weight: 900;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "griffith-gothic";
  src: url("../fonts/GriffithGothic-CondensedUltra.otf") format("opentype");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "neue-haas-unica";
  src: url("../fonts/NeueHaasUnicaPro-Bold.otf") format("opentype");
  font-weight: 700;
  font-style: bold;
  font-display: swap;
}

@font-face {
  font-family: "neue-haas-unica";
  src: url("../fonts/NeueHaasUnicaPro-Italic.otf") format("opentype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "neue-haas-unica";
  src: url("../fonts/NeueHaasUnicaPro-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Add after your existing font definitions */

/* Header styling */
.header-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: #33245f;
  height: 150px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 15px 40px;
  -webkit-font-smoothing: antialiased;
  z-index: 100;
}

.header-logo {
  max-height: 50px;
  width: auto;
  margin-bottom: 5px;
}

.header-divider {
  width: 300px;
  height: 2px;
  background-color: white;
  margin: 12px 0;
  border: none;
  display: block;
  opacity: 1;
}

.header-banner h1 {
  font-family: "griffith-gothic", sans-serif;
  color: white;
  font-size: 32px;
  font-weight: 400;
  margin: 0;
  padding: 0;
  line-height: 36px;
  text-align: center;
}

.header-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: white;
  width: 100%;
}

.header-link:hover,
.header-link:focus,
.header-link:active {
  text-decoration: none;
  color: white;
}

/* Navbar styling */
.navbar-below-banner {
  position: fixed !important;
  top: 150px;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 99;
  padding: 10px 0;
  border-bottom: 2px solid #33245f !important;
  background-color: white;
  margin-bottom: 0 !important;
}

.navbar-nav .nav-item .nav-link {
  font-family: "griffith-gothic", sans-serif;
  color: #33245f !important;
  font-size: 24px;
  font-weight: 400;
  text-transform: uppercase;
  margin: 0 15px;
  -webkit-font-smoothing: antialiased;
  transition: all 0.2s ease;
  padding: 5px 15px;
  box-sizing: border-box;
  border-radius: 4px;
  position: relative;
}

.navbar-nav .nav-item .nav-link:hover {
  color: white !important;
  background-color: #33245f;
  text-decoration: none;
}

.navbar-nav .nav-item .nav-link.active {
  color: white !important;
  background-color: #33245f;
  box-shadow: 0 2px 4px rgba(51, 36, 95, 0.2);
}

/* Layout styling */
body:not(.home-page) .container {
  padding-top: 20px;
  margin-top: 210px;
}

body.home-page .container {
  margin-top: 170px;
}

/* Button styling */
.signature-button {
  font-family: "griffith-gothic", sans-serif;
  font-size: 40px;
  font-weight: 900;
  line-height: 1.3;
  color: #33245f;
  background-color: transparent;
  text-transform: uppercase;
  border: 2px solid #33245f;
  border-radius: 4px;
  cursor: pointer;
  padding: 20px;
  width: 350px;
  height: 180px;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  -webkit-font-smoothing: antialiased;
  white-space: normal;
  margin: 0 auto;
  transition: all 0.3s ease;
}

.signature-button:hover {
  background-color: #33245f;
  color: white;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(51, 36, 95, 0.3);
}

.page-button {
  font-family: "griffith-gothic", sans-serif;
  font-size: 21px;
  font-weight: 900;
  line-height: 1.3;
  color: #33245f;
  background-color: transparent;
  text-transform: uppercase;
  border: 2px solid #33245f;
  border-radius: 4px;
  cursor: pointer;
  padding: 12px 20px;
  width: auto;
  min-width: 200px;
  text-align: center;
  display: inline-block;
  -webkit-font-smoothing: antialiased;
  margin: 20px 0;
  transition: all 0.3s ease;
}

.page-button:hover {
  background-color: #33245f;
  color: white;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(51, 36, 95, 0.3);
}

/* Grid layout */
.column {
  flex: 50%;
  padding: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.row {
  display: flex;
  min-height: 220px;
}

/* Typography styles */
h1,
h2,
h3 {
  font-family: "griffith-gothic", sans-serif;
  font-weight: 900;
  text-transform: uppercase;
  color: #33245f;
  -webkit-font-smoothing: antialiased;
}

p,
li,
td,
th,
label,
input,
select,
textarea {
  font-family: "neue-haas-unica", sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

/* Card and form styling */
.card {
  border-radius: 4px;
  border: 1px solid #e0e0e0;
  margin-bottom: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.card-header {
  background-color: #f8f9fa;
  border-bottom: 1px solid #e0e0e0;
  padding: 12px 15px;
}

.card-header h4,
.card-header h5,
.card-header h6 {
  margin-bottom: 0;
  color: #33245f;
}

.form-control {
  border-radius: 4px;
  border: 1px solid #ced4da;
  padding: 8px 12px;
  font-family: "neue-haas-unica", sans-serif;
}

.form-control:focus {
  border-color: #33245f;
  box-shadow: 0 0 0 0.2rem rgba(51, 36, 95, 0.25);
}

/* Form layout fixes */
.form-group.row {
  margin-bottom: 1rem; /* Reduce from Bootstrap's default */
}

.card-body .row {
  margin-bottom: 0.5rem; /* Tighten spacing between rows in cards */
}
/* Form layout fixes - CONSOLIDATED VERSION */
/* Reset conflicting rules */
.row {
  display: flex;
  flex-wrap: wrap;
  margin-right: calc(var(--bs-gutter-x) * -0.5);
  margin-left: calc(var(--bs-gutter-x) * -0.5);
}

/* Home page rows */
body.home-page .row {
  min-height: 220px;
}

/* Form rows */
body:not(.home-page) .row {
  min-height: auto;
}

/* Form group spacing */
.form-group {
  margin-bottom: 1rem;
}

/* Fix form layout in cards */
.card-body .form-group {
  margin-bottom: 0.75rem;
}

/* Form labels */
.col-form-label {
  padding-top: calc(0.375rem + 1px);
  padding-bottom: calc(0.375rem + 1px);
  font-family: "neue-haas-unica", sans-serif;
}

/* Input container vertical spacing */
.form-group.row > [class*="col-"] {
  margin-bottom: 0.5rem;
}

/* Right-align labels in forms */
.container-fluid .form-group.row .col-form-label {
  text-align: right;
  padding-right: 10px;
}

/* Welcome message styling */
.welcome-message {
  max-width: 900px;
  margin: 3rem auto;
  padding-top: 50px;
}

.welcome-message .card {
  border: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.welcome-message .card-title {
  color: #33245f;
  font-family: "griffith-gothic", sans-serif;
  font-weight: 900;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
}

.welcome-message .card-text {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

/* Specific override for the welcome message button */
.welcome-message .signature-button {
  font-size: 24px;
  padding: 15px 25px;
  width: auto;
  min-width: 280px;
  height: auto;
  margin: 0 auto;
}

/* Remove underlines from button links */
.signature-button,
.signature-button:hover,
.signature-button:focus,
.signature-button:active {
  text-decoration: none;
}

/* Also fix any other button links */
a.btn,
a.btn:hover,
a.btn:focus,
a.btn:active {
  text-decoration: none;
}

/* Navbar user dropdown menu */
.navbar-user-dropdown {
  position: relative;
  display: inline-block;
  margin-left: auto;
}

.navbar-user-dropdown .dropbtn {
  background-color: transparent;
  color: #33245f;
  padding: 8px 12px;
  font-size: 16px;
  border: none;
  cursor: pointer;
  font-family: "neue-haas-unica", sans-serif;
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 4px;
}

.navbar-user-dropdown .dropbtn i {
  margin-right: 5px;
}

.navbar-user-dropdown .dropdown-content {
  display: none;
  position: absolute;
  right: 0;
  background-color: #f9f9f9;
  min-width: 180px;
  box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
  z-index: 1;
  border-radius: 4px;
}

.navbar-user-dropdown .dropdown-content a {
  color: #333;
  padding: 12px 16px;
  text-decoration: none;
  display: flex;
  align-items: center;
  transition: background-color 0.2s;
}

.navbar-user-dropdown .dropdown-content a i {
  margin-right: 10px;
  width: 16px;
  text-align: center;
}

.navbar-user-dropdown .dropdown-content a:hover {
  background-color: #f1f1f1;
  color: #e31837;
}

.navbar-user-dropdown:hover .dropdown-content {
  display: block;
}

.navbar-user-dropdown:hover .dropbtn {
  background-color: rgba(51, 36, 95, 0.1);
}

/* Responsive adjustments for navbar dropdown */
@media (max-width: 768px) {
  .navbar-user-dropdown {
    position: static;
    display: block;
    margin: 10px 0;
    text-align: center;
  }

  .navbar-user-dropdown .dropdown-content {
    position: static;
    width: 100%;
  }

  .navbar-user-dropdown .dropbtn {
    width: 100%;
    justify-content: center;
  }
}

/* Small signature button variant */
.signature-button-sm {
  font-size: 14px !important;
  padding: 8px 15px !important;
  min-width: 120px !important;
  height: auto !important;
  margin: 0 !important;
}

.bg-purple-light {
  background-color: #c6b5e0;
  color: #4d2c91;
}

.badge.bg-purple-light {
  font-weight: 500;
}

/* Mode indicator styles */
.mode-indicator .badge {
  font-size: 0.85rem;
  padding: 0.4rem 0.7rem;
}

.mode-indicator .badge.bg-danger {
  animation: pulse-live 2s infinite;
}

@keyframes pulse-live {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
  100% {
    opacity: 1;
  }
}

.multi-selected {
  stroke: #e91e63 !important;
  stroke-width: 3px !important;
}

#selection-count {
  margin-left: 10px;
}

.selection-actions {
  margin-top: 10px;
  display: none;
}

.selection-actions.active {
  display: block;
}

.user-roles-section {
    font-size: 0.9rem;
    background-color: #f8f9fa;
}

.dropdown-header {
    font-weight: 600;
    color: #495057;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid #e9ecef;
}

.roles-list {
    max-width: 200px;
}

.role-badge {
    margin: 3px 0;
    font-size: 0.85rem;
}

.role-badge i {
    margin-right: 5px;
}

/* Add this to your stylesheet */
@keyframes highlight {
    0% { background-color: transparent; }
    50% { background-color: rgba(255, 255, 150, 0.5); }
    100% { background-color: transparent; }
}

.highlight-change {
    animation: highlight 1.5s ease-out;
}

/* Styling for button groups */
.btn-group-sm .btn {
  padding: 0.25rem 0.5rem;
  font-size: 0.765rem;
}

/* Add spacing utility */
.gap-2 {
    gap: 0.5rem;
}

/* Ensure small text is readable */
small.text-muted {
    font-size: 80%;
}

/* Add after your existing button group styles */

/* Responsive controls for report panel */
@media (max-width: 768px) {
  /* Stack the view controls and auto-refresh on mobile */
  #reportPanel .d-flex.justify-content-between {
      flex-direction: column;
      align-items: flex-start;
  }
  
  /* Add spacing between the stacked elements */
  #reportPanel .d-flex.justify-content-between > div:first-child {
      margin-bottom: 1rem;
  }
  
  /* Make button groups take full width on small screens */
  #reportPanel .btn-group {
      display: flex;
      width: 100%;
  }
  
  #reportPanel .btn-group .btn {
      flex: 1;
  }
}

/* CONSOLIDATED TABLE STYLING - Replace all existing #dailySalesTable related styles with this */

/* Basic table structure */
#dailySalesTable {
  width: 100% !important;
  margin: 0 !important;
  table-layout: auto;
  border-collapse: collapse;
}

/* Table header styling */
#dailySalesTable thead {
  background: linear-gradient(to bottom, #33245f 0%, #33245f 100%);
  color: white;
  font-weight: bold;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
  border-radius: 4px 4px 0 0;
}

#dailySalesTable th {
  padding: 8px 10px !important;
  border-bottom: 2px solid #4a1e6e;
  font-family: var(--bs-font-sans-serif);
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  position: relative;
  white-space: normal;
  word-break: break-word;
  padding-right: 50px !important; /* Space for icons */
}

/* Column separators */
#dailySalesTable th:after {
  content: '';
  position: absolute;
  right: 0;
  top: 25%;
  height: 50%;
  width: 1px;
  background-color: rgba(255, 255, 255, 0.3);
}

#dailySalesTable th:last-child:after {
  display: none;
}

/* Column widths for better fit */
#dailySalesTable th:nth-child(1) {
  width: 18%; /* Production column */
}

#dailySalesTable th:nth-child(2) {
  width: 15%; /* Sales Type column */
}

#dailySalesTable th:nth-child(3),
#dailySalesTable th:nth-child(4),
#dailySalesTable th:nth-child(5),
#dailySalesTable th:nth-child(6),
#dailySalesTable th:nth-child(7),
#dailySalesTable th:nth-child(8) {
  width: 11%; /* Equal width for numeric columns */
}

/* Table body styling */
#dailySalesTable tbody tr:hover {
  background-color: rgba(41, 128, 185, 0.05);
}

#dailySalesTable td {
  padding: 8px 10px !important;
  border-bottom: 1px solid #dee2e6;
  white-space: normal;
  word-break: break-word;
}

/* Right align numeric columns */
#dailySalesTable td:nth-child(n+3):nth-child(-n+8) {
  text-align: right;
}

/* Separator rows styling */
tr.separator td {
  height: 5px;
  padding: 0 !important;
  background-color: #f8f9fa;
  border-top: 1px solid #e9ecef;
  border-bottom: 1px solid #e9ecef;
}

/* Sorting indicators */
table.dataTable thead .sorting:after,
table.dataTable thead .sorting_asc:after,
table.dataTable thead .sorting_desc:after {
  position: absolute;
  right: 8px; 
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.7;
}

/* Filter icons */
.filter-icon {
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.3s;
  position: absolute;
  right: 28px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.8rem;
}

.filter-icon:hover {
  opacity: 1;
}

.filter-active {
  color: #33245f;
  opacity: 1;
  font-weight: bold;
}

/* Filter popover */
.filter-popover {
  position: absolute;
  background: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 10px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  z-index: 1000;
  top: 100%;
  right: 0;
  left: auto;
  margin-top: 5px;
  min-width: 180px;
  width: auto;
  display: none;
}

.filter-popover input {
  width: 100%;
  padding: 5px;
  border: 1px solid #ccc;
  border-radius: 3px;
}

/* DataTables controls styling */
.dataTables_filter input {
  border: 1px solid #ced4da;
  border-radius: 4px;
  padding: 6px 12px;
  font-size: 0.9rem;
  width: 150px;
  margin-left: 0.5em;
}

.dataTables_wrapper .dataTables_length select {
  width: 60px;
}

.dataTables_info, .dataTables_paginate {
  margin-top: 15px;
  font-size: 0.9rem;
}

.dataTables_paginate .paginate_button {
  padding: 5px 10px;
  border-radius: 4px;
  border: 1px solid #dee2e6;
  margin: 0 3px;
}

.dataTables_paginate .paginate_button.current {
  background: linear-gradient(to bottom, #33245f 0%, #33245f 100%);
  color: white !important;
  border-color: #1a3662;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
  background: #f0e6f8;
  color: #33245f !important;
}

/* Responsive behavior */
@media (min-width: 992px) {
  .table-responsive {
      overflow-x: visible;
  }
}

@media (max-width: 991px) {
  #dailySalesTable th,
  #dailySalesTable td {
      min-width: 110px;
  }
  
  #dailySalesTable th:first-child,
  #dailySalesTable td:first-child {
      min-width: 150px;
  }
  
  #dailySalesTable th {
      white-space: normal;
      font-size: 0.85rem;
  }
}


/* Multi-level header styling */
#dailySalesTable .header-group-row th {
  background: linear-gradient(to bottom, #251d47 0%, #2e215a 100%);
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.85rem;
  text-align: center;
  padding: 12px 8px !important;
  border-bottom: 0;
}

#dailySalesTable thead tr:not(.header-group-row) th {
  background: linear-gradient(to bottom, #33245f 0%, #33245f 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Update the filter icon positioning for the second header row */
#dailySalesTable thead tr:nth-child(2) .filter-icon {
  right: 28px;
}

/* Styling for repeated production names in detailed view */
.repeated-production-name {
  color: #6c757d;
  font-style: italic;
  opacity: 0.8;
}

/* Add a subtle top border to the first row of each production group */
.production-group-start {
  border-top: 2px solid #e9ecef;
}

/* Production group visual separator */
tr.separator td {
  height: 8px;
  padding: 0 !important;
  background-color: #f8f9fa;
  border-top: 1px solid #e9ecef;
  border-bottom: 1px solid #e9ecef;
}

/* Replace separator rows with better visual grouping */
.production-group-start {
  border-top: 2px solid #ccc;
  background-color: rgba(51, 36, 95, 0.03);
}

.production-group-end {
  border-bottom: 1px solid #ccc;
  margin-bottom: 8px;
}

.repeated-production-name {
  color: #6c757d;
  font-style: italic;
  opacity: 0.7;
  font-weight: 300;
}

/* Add spacing between groups */
.production-group-end + tr:not(.production-group-start) td {
  padding-top: 20px !important;
}

/* Loading overlay styles */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  backdrop-filter: blur(2px);
}

.loading-content {
  text-align: center;
  background-color: rgba(51, 36, 95, 0.8);
  border-radius: 8px;
  padding: 30px 50px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.loading-content .spinner-border {
  width: 3rem;
  height: 3rem;
}

/* Smaller refresh indicator */
#refreshStatus {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: rgba(0, 0, 0, 0.7);
  color: white !important;
  padding: 8px 15px;
  border-radius: 4px;
  z-index: 1000;
  font-style: normal !important;
}

/* Reports dashboard specific styling */
.reports-dashboard .card .signature-button {
  width: auto !important;
  min-width: 150px !important;
  height: auto !important;
  padding: 10px 15px !important;
  font-size: 18px !important;
  margin: 0 !important;
}

/* Add this at the end of your site.css file */
/* Compact navbar styling for better fit */
.navbar-nav .nav-item .nav-link {
  font-size: 20px !important; /* Reduced from 24px */
  margin: 0 5px !important; /* Reduced from 0 15px */
  padding: 3px 8px !important; /* Reduced from 5px 15px */
}

/* Ensure compact navbar on all screen sizes */
@media (min-width: 768px) {
  .navbar-nav .nav-item .nav-link {
    font-size: 20px !important;
  }
}

/* Also reduce the navbar height slightly */
.navbar-below-banner {
  padding: 5px 0 !important;
}

/* Ensure dropdown elements match the new size */
.navbar-user-dropdown .dropbtn,
.mode-indicator .badge {
  font-size: 14px !important;
}