/* ============================================
   Modern UI — extracted from inline <style> blocks
   ============================================ */

/* --- General Layout --- */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.content-wrapper {
  background-image: url("public/vendors/dist/img/dashboardbg.png");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

/* --- Horizontal Rules --- */
hr {
  border: 1px solid #FF5722;
  width: 100%;
  margin-top: 0;
  margin-bottom: 5pt;
}

/* --- Form Background Colors (Sidebar) --- */
.form-bg-color {
  background-color: rgb(50 120 221 / 50%);
}

.form-bg-color-2 {
  background-color: #d1fffc4f;
}

/* --- Span Icon Left Padding --- */
.spanIcon-pd-left {
  padding-left: 5px;
}

/* --- Fullname Text (Top Menu) --- */
.fullname-text {
  color: #17a2b8;
  font-weight: 800;
}

/* --- Back Button --- */
.back-btn {
  color: #fff;
  background-color: #ff7c5f;
  border-color: #ff7c5f;
}

.back-btn:hover {
  color: white;
  background-color: #cb5237;
  border-color: #cb5237;
}

/* --- File Selector Button --- */
::file-selector-button {
  border: none;
  padding: 5px 10px;
  border-radius: 5px;
  background-color: #8081a9;
  color: white;
  transition: color 0.25s ease-in-out, background-color 0.25s ease-in-out, border-color 0.25s ease-in-out, box-shadow 0.25s ease-in-out;
}

::file-selector-button:hover {
  background-color: #001f3f;
  color: white;
  cursor: pointer;
}

/* --- Tooltip (Legacy) --- */
.tooltip {
  display: inline-block;
  opacity: 1;
}

.tooltip .tooltiptext {
  visibility: hidden;
  width: 18.375rem;
  height: 5.313rem;
  background-color: #000000ba;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 5px 0;
  position: absolute;
  z-index: 1;
  top: 100%;
  left: 50%;
  margin-left: -60px;
}

.tooltip:hover .tooltiptext {
  visibility: visible;
}

/* --- Quotation Display --- */
.div_quotation {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
}

/* --- Dashboard Cards --- */
.card {
  border: 1px solid #999999;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1), 0 6px 20px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s;
}

.card:hover {
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15), 0 8px 24px rgba(0, 0, 0, 0.15);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* --- Step Wizard (Form Tracking Progress) --- */
.step-wizard {
  background-color: #21d4fd;
  background-image: linear-gradient(19deg, #21d4fd 0%, #b721ff 100%);
  height: 100vh;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.step-wizard-list {
  background: #f2ff7b;
  box-shadow: 0 15px 25px rgba(0, 0, 0, 0.1);
  color: #333;
  list-style-type: none;
  border-radius: 10px;
  display: flex;
  padding: 20px 10px;
  position: relative;
  z-index: 10;
  width: 100%;
}

.step-wizard-item {
  padding: 0 20px;
  flex-basis: 0;
  -webkit-box-flex: 1;
  -ms-flex-positive: 1;
  flex-grow: 1;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  text-align: center;
  min-width: 170px;
  position: relative;
}

.step-wizard-item+.step-wizard-item:after {
  content: "";
  position: absolute;
  left: 0;
  top: 19px;
  background: #21d4fd;
  width: 100%;
  height: 2px;
  transform: translateX(-50%);
  z-index: -10;
}

.progress-count {
  height: 40px;
  width: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: 600;
  margin: 0 auto;
  position: relative;
  z-index: 10;
  color: transparent;
}

.progress-count:after {
  content: "";
  height: 40px;
  width: 40px;
  background: #21d4fd;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  z-index: -10;
}

.progress-count:before {
  content: "";
  height: 10px;
  width: 20px;
  border-left: 3px solid #fff;
  border-bottom: 3px solid #fff;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -60%) rotate(-45deg);
  transform-origin: center center;
}

.progress-label {
  font-size: 14px;
  font-weight: 600;
  margin-top: 10px;
}

.current-item .progress-count:before,
.current-item~.step-wizard-item .progress-count:before {
  display: none;
}

.current-item~.step-wizard-item .progress-count:after {
  height: 40px;
  width: 40px;
}

.current-item~.step-wizard-item .progress-label {
  opacity: 0.5;
}

.current-item .progress-count:after {
  background: #fff;
  border: 2px solid #21d4fd;
}

.current-item .progress-count {
  color: #21d4fd;
}

/* --- Login Page --- */
.login-page {
  background: #0a1628;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  font-family: 'Inter', 'Source Sans Pro', sans-serif;
}

.login-container {
  width: 100%;
  max-width: 440px;
  animation: loginFadeIn 0.6s ease-out;
}

@keyframes loginFadeIn {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.login-card {
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.05);
  overflow: hidden;
  position: relative;
}

.login-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #3b82f6, #6366f1, #8b5cf6, #3b82f6);
  background-size: 300% 100%;
  animation: gradientSweep 3s ease infinite;
}

@keyframes gradientSweep {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

.login-brand {
  text-align: center;
  padding: 40px 40px 0 40px;
}

.login-logo {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #1e3a5f 0%, #2d5a87 100%);
  padding: 10px;
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.2);
}

.login-title {
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 4px 0;
  letter-spacing: -0.3px;
}

.login-subtitle {
  font-size: 13px;
  color: #64748b;
  margin: 0;
  font-weight: 400;
}

.login-form-wrapper {
  padding: 32px 40px 40px 40px;
}

.login-welcome {
  margin-bottom: 28px;
}

.login-greeting {
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 4px 0;
  letter-spacing: -0.3px;
}

.login-description {
  font-size: 14px;
  color: #64748b;
  margin: 0;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.login-field {
  position: relative;
}

.login-input {
  width: 100%;
  height: 52px;
  padding: 16px 44px 0 16px;
  font-size: 15px;
  font-weight: 400;
  color: #0f172a;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  outline: none;
  transition: all 0.2s ease;
  font-family: inherit;
  box-sizing: border-box;
}

.login-input:focus {
  background: #ffffff;
  border-color: #3b82f6;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.login-input.has-value {
  border-color: #cbd5e1;
}

.login-label {
  position: absolute;
  top: 50%;
  left: 16px;
  transform: translateY(-50%);
  font-size: 14px;
  font-weight: 400;
  color: #94a3b8;
  pointer-events: none;
  transition: all 0.2s ease;
  background: transparent;
  padding: 0 4px;
  line-height: 1;
}

.login-input:focus ~ .login-label,
.login-input:not(:placeholder-shown) ~ .login-label {
  top: 14px;
  transform: translateY(0);
  font-size: 11px;
  font-weight: 500;
  color: #3b82f6;
}

.login-input.has-value ~ .login-label {
  top: 14px;
  transform: translateY(0);
  font-size: 11px;
  font-weight: 500;
  color: #64748b;
}

.login-input:focus.has-value ~ .login-label {
  color: #3b82f6;
}

.login-password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 6px;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.login-password-toggle:hover {
  color: #64748b;
}

.login-error {
  display: block;
  font-size: 12px;
  color: #ef4444;
  margin-top: 4px;
  padding-left: 4px;
  font-weight: 500;
}

.login-error-banner {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  font-size: 13px;
  font-weight: 500;
  padding: 10px 14px;
  border-radius: 10px;
  text-align: center;
}

.login-button {
  width: 100%;
  height: 48px;
  background: linear-gradient(135deg, #1e3a5f 0%, #2d5a87 100%);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  letter-spacing: 0.2px;
}

.login-button:hover {
  background: linear-gradient(135deg, #162d4a 0%, #1e4a73 100%);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(30, 58, 95, 0.3);
}

.login-button:active {
  transform: translateY(0);
}

.login-button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.login-button-loader {
  font-size: 18px;
}

.login-footer-text {
  text-align: center;
  font-size: 12px;
  color: #94a3b8;
  margin-top: 4px;
}

.login-footer-text i {
  margin-right: 4px;
}

/* --- Login: Company Logos --- */
.login-companies {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid #e2e8f0;
  text-align: center;
}

.login-companies-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 14px;
}

.login-companies-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px 16px;
  align-items: center;
  justify-items: center;
}

.login-companies-grid img {
  height: 30px;
  width: auto;
  transition: transform 0.25s ease;
}

.login-companies-grid img:hover {
  transform: scale(1.08);
}

@media (max-width: 480px) {
  .login-page {
    padding: 16px;
    align-items: flex-start;
    padding-top: 48px;
  }

  .login-brand {
    padding: 32px 24px 0 24px;
  }

  .login-form-wrapper {
    padding: 24px 24px 32px 24px;
  }

  .login-logo {
    width: 60px;
    height: 60px;
  }

  .login-card {
    border-radius: 20px;
  }
}

/* --- Sidebar Treeview Highlight --- */
.sidebar-treeview-highlight {
  background-color: rgba(107, 65, 157, 0.73);
}

/* --- Header (Top Navbar) --- */
.navbar-navy {
  background-color: #0c1d3a !important;
}

.navbar-navy .nav-link {
  color: rgba(255, 255, 255, 0.85) !important;
}

.navbar-navy .nav-link:hover {
  color: #fff !important;
}

.navbar-navy .user-header {
  background-color: #0c1d3a !important;
}

.navbar-navy .user-header p {
  color: #fff !important;
}

/* Sidebar body and brand */
.main-sidebar,
.sidebar-dark-primary {
  background-color: #0a1628 !important;
}

/* Brand link */
.main-sidebar .brand-link,
.layout-navbar-fixed .wrapper .sidebar-dark-primary .brand-link:not([class*="navbar"]),
.sidebar-dark-primary .brand-link,
.bg-faded-navy {
  background-color: #0c1d3a !important;
}

/* Sidebar nav items */
.sidebar-dark-primary .nav-sidebar > .nav-item > .nav-link.active {
  background-color: #1e3a5f !important;
  color: #fff !important;
}

.sidebar-dark-primary .nav-sidebar > .nav-item > .nav-link:hover {
  background-color: rgba(30, 58, 95, 0.6) !important;
  color: #fff !important;
}

.sidebar-dark-primary .nav-sidebar .nav-item > .nav-link:focus {
  color: #fff !important;
}

/* Treeview sub-items */
.sidebar-dark-primary .nav-sidebar .nav-treeview > .nav-item > .nav-link.active,
.sidebar-dark-primary .nav-sidebar .nav-treeview > .nav-item > .nav-link:hover {
  background-color: rgba(30, 58, 95, 0.5) !important;
  color: #fff !important;
}

/* Nav header / section labels */
.sidebar-dark-primary .nav-sidebar > .nav-header {
  color: rgba(148, 163, 184, 0.7) !important;
}

/* Icon and text colors */
.sidebar-dark-primary .nav-sidebar .nav-link .nav-icon {
  color: rgba(255, 255, 255, 0.7) !important;
}

.sidebar-dark-primary .nav-sidebar .nav-link p {
  color: rgba(255, 255, 255, 0.75) !important;
}

/* Footer */
.main-footer {
  background-color: #0c1d3a !important;
  border-top-color: #1e3a5f !important;
  color: rgba(255, 255, 255, 0.6) !important;
}

.main-footer .text-dark {
  color: rgba(255, 255, 255, 0.85) !important;
}

.main-footer .text-muted {
  color: rgba(255, 255, 255, 0.5) !important;
}

.main-footer a {
  color: rgba(148, 163, 184, 0.9) !important;
}

.main-footer a:hover {
  color: #fff !important;
}

/* --- Star Rating Widget --- */
.star-rating-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1050;
  font-family: 'Source Sans Pro', sans-serif;
}

.star-rating-toggle {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 50px;
  padding: 10px 15px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
}

.star-rating-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.star-rating-toggle i {
  font-size: 16px;
}

.star-rating-panel {
  display: none;
  background: white;
  border-radius: 15px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  padding: 25px;
  margin-top: 10px;
  width: 320px;
  animation: slideDown 0.3s ease;
}

.star-rating-panel.active {
  display: block;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.star-rating-header {
  text-align: center;
  margin-bottom: 20px;
}

.star-rating-header h5 {
  margin: 0 0 5px 0;
  color: #333;
  font-weight: 700;
}

.star-rating-header p {
  margin: 0;
  color: #666;
  font-size: 13px;
}

.stars-container {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
}

.star {
  font-size: 32px;
  color: #ddd;
  cursor: pointer;
  transition: all 0.2s ease;
}

.star:hover,
.star.active {
  color: #ffc107;
  transform: scale(1.1);
}

.star.hover {
  color: #ffdb58;
}

.rating-stats {
  text-align: center;
  margin-bottom: 15px;
  padding: 10px;
  background: #f8f9fa;
  border-radius: 8px;
}

.rating-stats .average {
  font-size: 24px;
  font-weight: 700;
  color: #333;
}

.rating-stats .count {
  font-size: 12px;
  color: #666;
}

.rating-comment {
  width: 100%;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 10px;
  font-size: 13px;
  resize: vertical;
  min-height: 60px;
  margin-bottom: 15px;
  font-family: inherit;
}

.rating-comment:focus {
  outline: none;
  border-color: #667eea;
}

.submit-rating {
  width: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.submit-rating:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.submit-rating:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.rating-message {
  text-align: center;
  padding: 10px;
  border-radius: 8px;
  margin-top: 10px;
  font-size: 13px;
  display: none;
}

.rating-message.success {
  background: #d4edda;
  color: #155724;
  display: block;
}

.rating-message.error {
  background: #f8d7da;
  color: #721c24;
  display: block;
}

@media (max-width: 768px) {
  .star-rating-widget {
    right: 10px;
    bottom: 70px;
  }

  .star-rating-panel {
    width: 280px;
    padding: 20px;
  }

  .star {
    font-size: 28px;
  }
}

/* --- Sidebar: remove non-breaking space alignment hacks --- */
.nav-sidebar .nav-treeview .nav-link p {
  padding-left: 12px;
}
