/* Base styles */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  background: #f9fafb;
  color: #333;
  margin: 0;
  height: 100vh;
}

aside {
  background: #fff;
  box-shadow: 0 2px 12px rgb(0 0 0 / 0.1);
  border-radius: 0 12px 12px 0;
  width: 260px;
  transition: transform 0.3s ease;
  z-index: 1000;
}

aside nav a {
  font-weight: 600;
  color: #4a5568;
  padding: 12px 20px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  transition: background-color 0.3s ease, color 0.3s ease;
}

aside nav a.nav-link:hover,
aside nav a.nav-link:active {
  background-color: #D3D3D3 !important;
  color: #000 !important;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}


aside nav a .icon {
  font-size: 18px;
  display: inline-block;
  color: inherit;
  margin-right: 8px;
}

aside nav a i {
  color: inherit;
  font-size: 18px;
  display: inline-block;
  margin-right: 8px;
}

/* Default: hide menu toggle button on desktop */
#mobile-menu-toggle {
  display: none;
}

/* Hide sidebar & show button on small screens */
@media (max-width: 768px) {
  aside {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    transform: translateX(-100%);
    border-radius: 0;
  }

  aside.show {
    transform: translateX(0);
  }

  #mobile-menu-toggle {
    display: block;
    position: fixed; /* <-- better for consistent visibility */
    top: 1rem;
    left: 1rem;
    z-index: 1101;
    background: #32a852;
    border: none;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  }

  #sidebar-overlay {
    z-index: 1000;
  }
}



main {
  padding: 2rem;
  max-width: 1400px;
  margin: 0 auto;
  flex-grow: 1;
}

.toast-container {
  bottom: 20px !important;
  right: 20px !important;
  z-index: 1080;
}

/* Alert Box design*/
.alert-box {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 9999;
  padding: 1rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: bold;
  color: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  max-width: 300px;
  transition: opacity 0.3s ease;
}

.alert-success {
  background-color: #28a745;
}

.alert-warning {
  background-color: #ffc107;
  color: #212529;
}

.alert-danger {
  background-color: #dc3545;
}

.hidden {
  display: none;
}

/* Confirm Box design */

.confirm-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.confirm-box {
  background: white;
  padding: 1.5rem;
  border-radius: 0.75rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  text-align: center;
  max-width: 400px;
  width: 90%;
}

.confirm-buttons {
  margin-top: 1rem;
}

.confirm-buttons button {
  margin: 0 0.5rem;
  padding: 0.5rem 1.25rem;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
}

.btn-confirm {
  background-color: #4CAF50;
  color: white;
}

.btn-cancel {
  background-color: #ccc;
  color: #333;
}


/*Manage client table style*/
.manage-title {
  background: linear-gradient(120deg, #11457d, #7BC47F, #11457d);
  background-size: 200% auto;
  color: transparent;
  background-clip: text;
  -webkit-background-clip: text;
  animation: shine 3s linear infinite;
  text-align: center;
  font-weight: 700;
  font-size: 2.5rem;
}

.client-logo {
  max-height: 80px;   /* or smaller, like 30px, adjust as needed */
  width: auto;        /* maintain aspect ratio */
  display: none;      /* hide by default, JS will show it */
  margin-left: 10px;  /* spacing from title */
  vertical-align: middle; /* align nicely with text */
  border-radius: 4px; /* optional: subtle rounding */
  object-fit: contain; /* keep logo crisp and contained */
}


@keyframes shine {
  to {
    background-position: 200% center;
  }
}

.manage-underline {
  width: 120px;
  margin: 0 auto 2rem auto;
  border: 2px solid #7BC47F;
  border-radius: 2px;
}

.table thead th {
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.table-hover tbody tr:hover {
  background-color: #ffe8a1; /* subtle highlight */
  cursor: pointer;
}

.table-responsive {
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.05);
  border-radius: 8px;
  border: 1px solid #dee2e6;
}

.list-group-item {
  background-color: #fff;
  border: none;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
  cursor: pointer;
}

.list-group-item:hover {
  box-shadow: 0 8px 20px rgb(0 0 0 / 0.08);
  transform: translateY(-2px);
  background-color: #f8f9fa;
}

h5.text-primary {
  font-weight: 600;
  font-size: 1.25rem;
  margin-bottom: 0.2rem;
}

#btnAddClient {
    font-size: 0.95rem;
    padding: 0.4em 0.75em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge {
  font-size: 0.95rem;
  padding: 0.4em 0.75em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.btn-outline-primary {
  border-width: 2px;
  padding: 0.25rem 0.5rem;
  font-size: 0.9rem;
  border-radius: 0.4rem;
  transition: all 0.3s ease;
}

.btn-outline-primary:hover {
  background-color: #3b82f6;
  color: #fff;
  border-color: #3b82f6;
}

/* Make the form a flex container in a row */
.logo-upload-row {
  display: flex;
  align-items: center;  /* vertically center items */
  gap: 12px;            /* horizontal space between items */
  flex-wrap: nowrap;    /* keep all on one line */
}

/* Optional: make file input smaller but readable */
.logo-upload-row input[type="file"] {
  flex: 1 1 auto; /* allow file input to grow and fill space */
  min-width: 150px; /* minimum width for file input */
}

/* Buttons get natural size, no margin-top */
.logo-upload-row button {
  margin-top: 0 !important;
}

/* Hide the hidden input, of course */
.logo-upload-row input[type="hidden"] {
  display: none;
}

/* Processing Module Styles */

.qa-timeline {
  position: relative;
  margin-left: 1.5rem;
  border-left: 3px solid #cbd5e1; /* light blue-gray */
  padding-left: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.timeline-event {
  position: relative;
  margin-bottom: 1.0rem;
  padding-left: 1rem;
  padding: .5rem 1.0rem;
  border-radius: 8px;
  background-color: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  transition: box-shadow 0.3s ease;
}

.timeline-event:hover .timeline-marker {
  background-color: #2563eb;
  transform: scale(1.2);
  box-shadow: 0 0 8px rgba(37, 99, 235, 0.6);
}

.timeline-marker {
  position: absolute;
  left: -1.65rem;
  top: 0.5rem;
  width: 1rem;
  height: 1rem;
  background: #3b82f6; /* blue */
  border-radius: 50%;
  border: 3px solid white;
  box-shadow: 0 0 5px rgba(59, 130, 246, 0.6);
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.timeline-content h5 {
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #1e293b; /* darker, crisp */
}

.timeline-content p {
  margin: 0.15rem 0;
  color: #64748b;
  font-size: 0.9rem;
}

.timeline-content .btn-group {
  margin-top: 0.5rem;
  gap: 0.3rem;
  display: flex;
}

.timeline-content .btn-group button {
  border-radius: 5px;
  font-weight: 600;
  padding: 0.4rem 1rem;
  border-width: 2px;
  transition: all 0.25s ease;
}

.qa-timeline .timeline-event:hover,
.qa-timeline .timeline-event:focus-within {
  background-color: #f0f7ff;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* Shared hover/active enhancements for all buttons */
.timeline-content .btn-group button:hover,
.timeline-content .btn-group button:focus,
.timeline-content .btn-group button:active {
  color: white;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.2);
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

@media (max-width: 576px) {
  .timeline-marker {
    display: none;
  }

  .timeline-event {
    padding-left: 0.rem; /* Add some spacing back if needed */
  }
}


/* QA Module*/
  .qa-module {
    background-color: #fff;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
  }
  .qa-meta p {
    margin: 0.25rem 0;
  }
  .qa-controls button {
    margin-right: 0.5rem;
  }

/*  Run Console */
.text-monospace {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    }

.list-group-item .form-label.small {
    min-width: 62px;
    }


/* ===== Simple Loading Overlay ===== */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 1;
  visibility: visible;
  transition: opacity .25s ease, visibility .25s ease;
}

.loading-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Spinner + text */
.loading-content {
  text-align: center;
  font-family: system-ui, sans-serif;
  color: #2c3e50;
}

.loading-spinner {
  width: 2.5rem;
  height: 2.5rem;
  border: 4px solid #ddd;
  border-top: 4px solid #2c3e50;
  border-radius: 50%;
  margin: 0 auto 1rem auto;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}


/* Modal Preview Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 50px;
  z-index: 1000;
}


.modal-content {
  background: white;
  border-radius: 8px;
  padding: 2rem;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
}

.modal-body {
  margin-top: 1rem;
}

.hidden {
  display: none;
}

#filterChips .chip {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .25rem .6rem;
  background: #eef2ff;
  color: #1e40af;
  border: 1px solid #c7d2fe;
  border-radius: 999px;
  font-size: .85rem;
  margin-right: .4rem;
  margin-bottom: .4rem;
  cursor: default;
}
#filterChips .chip button {
  border: 0;
  background: transparent;
  line-height: 1;
}

/* === Priority Pill === */
.priority-pill {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 999px;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
  user-select: none;
  line-height: 1;
}

.priority-pill-high {
  background: #fca5a5; /* soft red */
  color: #7f1d1d;
}

.priority-pill-medium {
  background: #fde68a; /* light amber */
  color: #78350f;
}

.priority-pill-low {
  background: #bbf7d0; /* pale green */
  color: #14532d;
}

/* Optional: subtle hover polish */
.list-group-item:hover .priority-pill {
  filter: brightness(1.05);
}
