.form-floating > label {
  padding-right: .5rem;
}

/* Password toggle */
.pwd-toggle {
  border: none !important;
  background: none !important;
  box-shadow: none !important;
  padding: 0.25rem 0.75rem !important;
  font-size: 1rem;
  opacity: 0.5;
  transition: opacity 0.2s ease;
}
.pwd-toggle:hover {
  opacity: 1;
}

.form-signin {
    width: 100%;
    max-width: 450px;
    padding: 15px;
    margin: auto;
  }
  
  .form-signin .checkbox {
    font-weight: 400;
  }
  
  .form-signin .form-floating:focus-within {
    z-index: 2;
  }
  
  .form-signin input[type="email"] {
    margin-bottom: -1px;
    border-bottom-right-radius: 0;
    border-bottom-left-radius: 0;
  }
  
  .form-signin input[type="password"] {
    margin-bottom: 10px;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
  }

  .form-subscribe {
    width: 100%;
    max-width: 630px;
    padding: 15px;
    margin: auto;
  }
  
  .truncate-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 300px;
  }
  

/* Chrome, Safari, Edge, Opera */
 input::-webkit-outer-spin-button,
 input::-webkit-inner-spin-button {
   -webkit-appearance: none;
   margin: 0;
 }
 
 /* Firefox */
 input[type=number] {
   -moz-appearance: textfield;
   appearance: textfield;
 }
 
.pointer {cursor: pointer;}


.pp-right:after {
  content: "";
  position:absolute;
  margin-top:-6px;
  margin-left:-5px;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-bottom: 12px solid #dee2e6;
  transform:rotate(-45deg);
  right: -17px; 
  top: 10px;
}

.pp-left:before {
  content: "";
  position:absolute;
  margin-top:-6px;
  margin-left:0px;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-bottom: 12px solid #dee2e6;
  transform:rotate(45deg);
  left: -17px; 
  top: 10px;
}

.msgr {
  border-radius: 16px;
  border-bottom-right-radius: 0;
}

.msgl {
  border-radius: 16px;
  border-top-left-radius: 0;
}

#ul1 {
  margin-bottom: 60px;
}

.fade-out {
  opacity: 1;
  transition: opacity 0.5s ease-out;
}

.fade-out.hidden {
  opacity: 0;
}

#results_container {
  border-collapse: separate;
}

#results_container tbody {
  display: block;
  max-height: 500px;
  overflow-y: auto;
}

#results_container thead, 
#results_container tfoot {
  display: table;
  width: 100%;
  table-layout: fixed;
}

#results_container tbody tr {
  display: table;
  width: 100%;
  table-layout: fixed;
}

/* ===== Client dashboard (b.php) — Premium Experience ===== */

/* --- Navbar --- */
#navtop {
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  border-bottom: none !important;
  padding-top: 0.6rem !important;
  padding-bottom: 0.6rem !important;
}
#navtop .navbar-brand img {
  height: 30px;
  transition: opacity 0.2s ease;
}
#navtop .navbar-brand:hover img {
  opacity: 0.85;
}
#navtop .nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.45rem 0.75rem;
  border-radius: var(--app-radius-sm, 0.375rem);
  transition: all 0.2s ease;
}
#navtop .nav-link:hover {
  background: var(--bs-tertiary-bg);
}
#navtop .nav-link.active {
  background: var(--bs-primary);
  color: #fff !important;
}
#navtop .dropdown-toggle::after {
  display: none;
}

/* Theme toggle inline (inside dropdown) */
.theme-toggle-inline {
  font-size: 0.75rem;
  opacity: 0.5;
}
[data-bs-theme="dark"] .theme-toggle-inline .bi-moon-fill { display: none; }
[data-bs-theme="light"] .theme-toggle-inline .bi-sun-fill { display: none; }

/* Hide standalone theme toggle (moved to dropdown) */
.theme-toggle { display: none; }

/* --- Dropdown menu --- */
#navtop .dropdown-menu {
  border: 1px solid var(--bs-border-color);
  border-radius: var(--app-radius, 0.5rem);
  box-shadow: 0 4px 24px rgba(0,0,0,0.1);
  padding: 0.25rem 0;
}
#navtop .dropdown-item {
  font-size: 0.85rem;
  border-radius: 0;
}
#navtop .dropdown-item:hover {
  background: var(--bs-tertiary-bg);
}

/* --- Progress bar --- */
#progressBar {
  border-radius: 0;
  height: 4px !important;
}
#progressBar .progress-bar {
  transition: width 0.4s ease;
}

/* --- Cards --- */
#bd1 .app-card {
  border: none;
  border-radius: var(--app-radius, 0.5rem);
  box-shadow: var(--app-shadow-sm, 0 0.125rem 0.25rem rgba(0,0,0,0.075));
  transition: box-shadow 0.2s ease;
  overflow: hidden;
}
#bd1 .app-card:hover {
  box-shadow: var(--app-shadow, 0 0.25rem 0.75rem rgba(0,0,0,0.1));
}
#bd1 .app-card.border-start {
  border-left-width: 3px !important;
  border-left-style: solid !important;
}

/* Card titles — elegant, not uppercase */
#bd1 .app-card .form-label {
  font-size: 0.95rem;
  letter-spacing: -0.01em;
}

/* --- File chips (attachment style) --- */
.file-chip {
  display: inline-flex;
  align-items: center;
  background: var(--bs-tertiary-bg);
  border: 1px solid var(--bs-border-color-translucent);
  border-radius: 2rem;
  padding: 0.3rem 0.75rem;
  max-width: 100%;
  transition: all 0.2s ease;
  position: relative;
}
.file-chip:hover {
  background: var(--bs-secondary-bg);
  border-color: var(--bs-border-color);
}
.file-chip-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  text-decoration: none;
  color: var(--bs-body-color);
  font-size: 0.8rem;
  min-width: 0;
}
.file-chip-link i {
  color: var(--bs-primary);
  font-size: 0.9rem;
  flex-shrink: 0;
}
.file-chip-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 220px;
}
@media (max-width: 575.98px) {
  .file-chip-name {
    max-width: 150px;
  }
}
.file-chip-badge {
  font-size: 0.65rem;
  color: var(--bs-secondary-color);
  margin-left: 0.35rem;
  white-space: nowrap;
}

/* Delete button — small "x" circle, appears on hover (desktop) */
.file-chip-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--bs-secondary-color);
  font-size: 0.85rem;
  padding: 0;
  margin-left: 0.25rem;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}
.file-chip-remove:hover {
  background: var(--bs-danger);
  color: #fff;
}
/* On desktop: subtle until hover */
@media (min-width: 576px) {
  .file-chip-remove {
    opacity: 0.3;
  }
  .file-chip:hover .file-chip-remove {
    opacity: 1;
  }
}

/* Pending file (not yet saved) */
.file-chip-pending {
  border-style: dashed;
  border-color: var(--bs-primary);
  background: var(--app-primary-light, rgba(13,110,253,0.06));
}
.file-chip-pending .file-chip-link i {
  color: var(--bs-primary);
}
.file-chip-size {
  font-size: 0.7rem;
  color: var(--bs-secondary-color);
  margin-left: 0.35rem;
  flex-shrink: 0;
}
.file-chip-uploading {
  opacity: 0.75;
  animation: fileChipPulse 1.4s ease-in-out infinite;
}
.file-chip-uploading .file-chip-save,
.file-chip-uploading .file-chip-remove {
  pointer-events: none;
}
@keyframes fileChipPulse {
  0%, 100% { opacity: 0.75; }
  50% { opacity: 1; }
}
.file-chip-error {
  border-color: var(--bs-danger);
  background: rgba(220, 53, 69, 0.08);
}
.file-chip-error .file-chip-link i {
  color: var(--bs-danger);
}
.file-chip-save {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  height: 26px;
  padding: 0 0.6rem 0 0.55rem;
  border-radius: 999px;
  border: none;
  background: var(--bs-primary);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 500;
  margin-left: 0.35rem;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(13,110,253,0.25);
}
.file-chip-save i { font-size: 0.85rem; line-height: 1; }
.file-chip-save-label { line-height: 1; letter-spacing: 0.01em; }
.file-chip-save:hover:not(:disabled) {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 3px 6px rgba(13,110,253,0.3);
}
.file-chip-save:active:not(:disabled) {
  transform: translateY(0);
}
.file-chip-save:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

/* --- Dropzone --- */
.dropzone {
  border: 2px dashed var(--bs-border-color);
  border-radius: var(--app-radius, 0.5rem);
  padding: 1.25rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  background: transparent;
}
.dropzone:hover {
  border-color: var(--bs-primary);
  background: var(--app-primary-light, rgba(13,110,253,0.04));
}
.dropzone-active {
  border-color: var(--bs-primary) !important;
  background: var(--app-primary-light, rgba(13,110,253,0.08)) !important;
  transform: scale(1.01);
}
.dropzone:focus-visible {
  outline: none;
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 0.2rem rgba(13,110,253,0.2);
}
.dropzone:active {
  transform: scale(0.995);
}
.dropzone-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.dropzone-content > i {
  font-size: 1.2rem;
  color: var(--bs-primary);
}
.dropzone-text {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--bs-primary);
}
.dropzone-hint {
  font-size: 0.75rem;
  color: var(--bs-secondary-color);
}
@media (max-width: 575.98px) {
  .dropzone {
    padding: 0.75rem;
  }
  .dropzone-content > i {
    font-size: 1rem;
  }
  .dropzone-text {
    font-size: 0.8rem;
  }
}

/* Hide the old upload button (now using dropzone click) */
#bd1 .upload {
  font-size: 0.85rem;
  font-weight: 500;
}

/* --- Textarea --- */
.kptx {
  height: 150px;
  resize: vertical;
  border-radius: var(--app-radius-sm, 0.375rem);
}

/* --- Alert / Banner --- */
#bd1 .alert-success {
  background: linear-gradient(135deg, rgba(25,135,84,0.08) 0%, rgba(25,135,84,0.03) 100%);
  border: 1px solid rgba(25,135,84,0.15);
  border-radius: var(--app-radius, 0.5rem);
}

/* --- Message bubbles --- */
#bd1 .msgs {
  word-break: break-word;
  border-radius: 1rem !important;
}
#bd1 .msgl {
  border-top-left-radius: 0.25rem !important;
}
#bd1 .msgr {
  border-bottom-right-radius: 0.25rem !important;
  background: var(--bs-primary) !important;
  border-color: var(--bs-primary) !important;
  color: #fff;
}

/* --- Chat reply --- */
#chatReply {
  border: none;
  box-shadow: var(--app-shadow-sm, 0 0.125rem 0.25rem rgba(0,0,0,0.075));
}
#chatReply textarea {
  font-size: 0.85rem;
}
#chatReply textarea:focus {
  box-shadow: none;
}

/* --- Profile card --- */
#bd1 .list-group-item {
  border: none;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--bs-border-color-translucent);
}
#bd1 .list-group-item:last-child {
  border-bottom: none;
}

/* --- Toast --- */
.toast-container .toast {
  min-width: 260px;
  border-radius: var(--app-radius, 0.5rem);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

/* --- Confirm modal --- */
#confirmModal .modal-content {
  border-radius: var(--app-radius-lg, 0.75rem);
  border: none;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}

/* --- Very small screens --- */
@media (max-width: 374px) {
  #navtop .navbar-brand img {
    height: 22px;
  }
  #navtop .nav-link {
    padding: 0.3rem 0.4rem;
    font-size: 0.8rem;
  }
}

/* Small phones */
@media (max-width: 575.98px) {
  #bd1 .app-card .card-body {
    padding: 0.75rem !important;
  }
}

/* Tablet and up */
@media (min-width: 768px) {
  .kptx {
    height: 250px;
  }
}
