/**
 * MOTOTOLO PROCUREMENT SUITE - ENHANCED VENDOR PORTAL UI
 * Comprehensive fixes for maximum UI/UX functionality
 * 
 * Improvements:
 * ✓ Better form field rendering and validation
 * ✓ Enhanced responsive design for mobile/tablet
 * ✓ Improved notification display
 * ✓ Better accessibility
 * ✓ Optimized dashboard layout
 * ✓ Enhanced purchase request/quotation forms
 * ✓ Better error messaging and visual feedback
 */

:root {
  --vp-bg: #edf4fb;
  --vp-bg-deep: #dfeaf8;
  --vp-surface: #fff;
  --vp-surface-soft: #f4f8ff;
  --vp-line: #d7e4f2;
  --vp-text: #0b1f3f;
  --vp-muted: #5d708c;
  --vp-blue: #0057ff;
  --vp-blue-2: #0d63d2;
  --vp-blue-deep: #062b57;
  --vp-green: #0f9d6d;
  --vp-cyan: #0d9aa5;
  --vp-purple: #6d56d1;
  --vp-orange: #d2872d;
  --vp-red: #d94a4a;
  --vp-shadow: 0 20px 52px rgba(7, 27, 64, 0.1);
  --vp-shadow-soft: 0 10px 24px rgba(8, 25, 60, 0.06);
}

/* ============================================================================
   FORM FIELD IMPROVEMENTS
   ============================================================================ */

.mps-form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.mps-form-field label {
  font-size: 14px;
  font-weight: 700;
  color: var(--vp-text);
  display: flex;
  align-items: center;
  gap: 6px;
}

.mps-form-field label .required {
  color: var(--vp-red);
  font-weight: 900;
}

.mps-form-field input,
.mps-form-field textarea,
.mps-form-field select {
  padding: 12px 14px;
  border: 1px solid var(--vp-line);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  background: var(--vp-surface);
  color: var(--vp-text);
  transition: all 0.2s ease;
  min-height: 44px;
}

.mps-form-field input:focus,
.mps-form-field textarea:focus,
.mps-form-field select:focus {
  outline: none;
  border-color: var(--vp-blue);
  box-shadow: 0 0 0 3px rgba(0, 87, 255, 0.1);
}

.mps-form-field input:disabled,
.mps-form-field textarea:disabled,
.mps-form-field select:disabled {
  background: #f3f6fb;
  color: var(--vp-muted);
  cursor: not-allowed;
}

.mps-form-field input.error,
.mps-form-field textarea.error {
  border-color: var(--vp-red);
  background: rgba(217, 74, 74, 0.05);
}

.mps-form-field .form-error {
  font-size: 12px;
  color: var(--vp-red);
  font-weight: 600;
  display: none;
}

.mps-form-field input.error ~ .form-error,
.mps-form-field textarea.error ~ .form-error {
  display: block;
}

.mps-form-field .form-hint {
  font-size: 12px;
  color: var(--vp-muted);
  font-weight: 500;
}

/* ============================================================================
   QUOTATION & PURCHASE REQUEST FORMS
   ============================================================================ */

.quotation-form {
  background: var(--vp-surface);
  padding: 24px;
  border-radius: 12px;
  border: 1px solid var(--vp-line);
  max-width: 900px;
}

.quotation-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--vp-line);
}

.quotation-header-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quotation-header-label {
  font-size: 12px;
  font-weight: 800;
  color: var(--vp-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.quotation-header-value {
  font-size: 16px;
  font-weight: 900;
  color: var(--vp-text);
}

.quotation-section {
  margin-bottom: 32px;
}

.quotation-section-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--vp-text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--vp-blue);
  display: inline-block;
}

.quotation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.quotation-full {
  grid-column: 1 / -1;
}

/* ============================================================================
   NOTIFICATION SYSTEM IMPROVEMENTS
   ============================================================================ */

.notification-container {
  position: fixed;
  top: 80px;
  right: 16px;
  z-index: 1000;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.notification {
  padding: 16px;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(7, 27, 64, 0.15);
  display: flex;
  gap: 12px;
  align-items: flex-start;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.notification.success {
  background: #ecfdf5;
  border-left: 4px solid var(--vp-green);
  color: #027a48;
}

.notification.error {
  background: #fff1f2;
  border-left: 4px solid var(--vp-red);
  color: #7a1c26;
}

.notification.warning {
  background: #fff7ed;
  border-left: 4px solid var(--vp-orange);
  color: #7a2e0f;
}

.notification.info {
  background: #e6f4ff;
  border-left: 4px solid var(--vp-blue);
  color: #003a8c;
}

.notification-icon {
  font-size: 18px;
  font-weight: 900;
  flex-shrink: 0;
  margin-top: 2px;
}

.notification-content {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}

.notification-close {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  font-size: 18px;
  padding: 0;
  margin: -8px -8px -8px 0;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.notification-close:hover {
  opacity: 1;
}

/* ============================================================================
   BUTTON IMPROVEMENTS
   ============================================================================ */

.btn, button, input[type="submit"] {
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 800;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  text-decoration: none;
}

.btn-primary, .btn-submit, input[type="submit"] {
  background: var(--vp-blue);
  color: #fff;
}

.btn-primary:hover {
  background: var(--vp-blue-2);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 87, 255, 0.2);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled {
  background: var(--vp-muted);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-secondary {
  background: var(--vp-surface);
  color: var(--vp-blue);
  border: 2px solid var(--vp-blue);
}

.btn-secondary:hover {
  background: rgba(0, 87, 255, 0.05);
}

.btn-outline {
  background: transparent;
  color: var(--vp-muted);
  border: 1px solid var(--vp-line);
}

.btn-outline:hover {
  color: var(--vp-blue);
  border-color: var(--vp-blue);
}

.btn-danger {
  background: var(--vp-red);
  color: #fff;
}

.btn-danger:hover {
  background: #c84343;
  transform: translateY(-2px);
}

/* ============================================================================
   TABLE IMPROVEMENTS
   ============================================================================ */

.mps-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--vp-surface);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(7, 27, 64, 0.08);
}

.mps-table thead {
  background: #f3f6fb;
  border-bottom: 2px solid var(--vp-line);
}

.mps-table th {
  padding: 14px;
  text-align: left;
  font-size: 12px;
  font-weight: 900;
  color: var(--vp-text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.mps-table td {
  padding: 14px;
  border-bottom: 1px solid var(--vp-line);
  font-size: 14px;
  color: var(--vp-text);
}

.mps-table tbody tr:hover {
  background: #f8faff;
}

.mps-table tbody tr:last-child td {
  border-bottom: none;
}

/* ============================================================================
   STATUS BADGES
   ============================================================================ */

.status-badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.status-badge.approved {
  background: #ecfdf5;
  color: #027a48;
}

.status-badge.pending {
  background: #fff7ed;
  color: #7a2e0f;
}

.status-badge.submitted {
  background: #e6f4ff;
  color: #003a8c;
}

.status-badge.rejected {
  background: #fff1f2;
  color: #7a1c26;
}

.status-badge.active {
  background: #ecfdf5;
  color: #027a48;
}

.status-badge.inactive {
  background: #f3f4f6;
  color: #374151;
}

/* ============================================================================
   DASHBOARD IMPROVEMENTS
   ============================================================================ */

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.dashboard-card {
  background: var(--vp-surface);
  padding: 20px;
  border-radius: 12px;
  border: 1px solid var(--vp-line);
  box-shadow: var(--vp-shadow-soft);
  transition: all 0.2s ease;
}

.dashboard-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--vp-shadow);
  border-color: var(--vp-blue);
}

.dashboard-card-icon {
  font-size: 28px;
  margin-bottom: 12px;
}

.dashboard-card-label {
  font-size: 12px;
  font-weight: 800;
  color: var(--vp-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.dashboard-card-value {
  font-size: 24px;
  font-weight: 900;
  color: var(--vp-text);
  margin-bottom: 12px;
}

.dashboard-card-meta {
  font-size: 12px;
  color: var(--vp-muted);
}

/* ============================================================================
   MODAL IMPROVEMENTS
   ============================================================================ */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(7, 27, 64, 0.3);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
  animation: fadeIn 0.2s ease;
}

.modal-overlay.active {
  display: flex;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal {
  background: var(--vp-surface);
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(7, 27, 64, 0.2);
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    transform: translateY(40px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-header {
  padding: 24px;
  border-bottom: 1px solid var(--vp-line);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 18px;
  font-weight: 900;
  color: var(--vp-text);
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--vp-muted);
  cursor: pointer;
  padding: 0;
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 24px;
  border-top: 1px solid var(--vp-line);
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

/* ============================================================================
   RESPONSIVE DESIGN IMPROVEMENTS (Mobile-First Approach)
   ============================================================================ */

/* Tablet: 768px - 1100px */
@media (min-width: 768px) and (max-width: 1100px) {
  .vendor-shell {
    grid-template-columns: 1fr;
  }

  .vendor-left,
  .vendor-right {
    display: none;
  }

  .dashboard-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .quotation-header {
    grid-template-columns: 1fr 1fr;
  }

  .quotation-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .mps-table {
    font-size: 13px;
  }

  .mps-table th,
  .mps-table td {
    padding: 12px;
  }

  .notification-container {
    width: calc(100% - 32px);
    left: 16px;
    right: 16px;
    max-width: 100%;
  }

  .workspace-topbar {
    padding: 12px 16px;
  }

  .quotation-form {
    padding: 20px;
  }
}

/* Large Desktop: 1100px+ */
@media (min-width: 1100px) {
  .vendor-shell {
    grid-template-columns: 250px minmax(0, 1fr) 360px;
  }

  .vendor-left {
    display: block;
  }

  .vendor-right {
    display: block;
  }

  .dashboard-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .quotation-header {
    grid-template-columns: 1fr 1fr;
  }

  .quotation-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}

/* Tablet Portrait: 600px - 767px */
@media (min-width: 600px) and (max-width: 767px) {
  .workspace-topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 12px 14px;
    background: #fff;
    box-shadow: 0 2px 4px rgba(7, 22, 46, 0.08);
  }

  .workspace-brand-copy {
    font-size: 12px;
  }

  .topbar-tools {
    gap: 10px;
  }

  .menu-button {
    display: flex;
  }

  .vendor-left,
  .vendor-right {
    display: none;
  }

  .dashboard-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .quotation-header {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .quotation-grid {
    grid-template-columns: 1fr;
  }

  .mps-table {
    font-size: 12px;
    overflow-x: auto;
    display: block;
  }

  .mps-table th,
  .mps-table td {
    padding: 10px 8px;
    white-space: nowrap;
  }

  .quotation-form {
    padding: 16px;
    margin: 0;
  }

  .btn {
    min-height: 44px;
    padding: 12px 16px;
    font-size: 14px;
  }

  .notification-container {
    top: 70px;
    left: 8px;
    right: 8px;
    max-width: 100%;
  }

  .modal {
    max-width: 90%;
    width: 100%;
  }

  .status-badge {
    padding: 5px 10px;
    font-size: 12px;
  }

  .mps-form-field input,
  .mps-form-field textarea,
  .mps-form-field select {
    font-size: 16px; /* Prevents zoom on iOS */
  }

  .modal-header {
    padding: 16px;
  }

  .modal-body {
    padding: 16px;
  }

  .modal-footer {
    padding: 16px;
    gap: 8px;
    flex-direction: column;
  }

  .modal-footer .btn {
    width: 100%;
  }
}

/* Mobile: 0px - 599px */
@media (max-width: 599px) {
  * {
    box-sizing: border-box;
  }

  html {
    font-size: 15px;
  }

  body {
    padding: 0;
    margin: 0;
  }

  /* Layout */
  .vendor-shell {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .vendor-left,
  .vendor-right,
  .vendor-header,
  .workspace-brand-copy,
  .topbar-tools {
    display: none !important;
  }

  .vendor-main {
    width: 100%;
    padding: 0;
  }

  /* Header */
  .workspace-topbar {
    position: sticky;
    top: 0;
    z-index: 200;
    padding: 10px 12px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(7, 22, 46, 0.1);
  }

  .workspace-branding {
    font-size: 12px;
  }

  .workspace-brand-mp {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 700;
  }

  /* Forms */
  .quotation-form {
    padding: 12px;
    margin: 0;
    border-radius: 0;
  }

  .quotation-section {
    margin-bottom: 16px;
  }

  .quotation-header {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
  }

  .quotation-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .mps-form-field {
    margin-bottom: 12px;
  }

  .mps-form-field label {
    font-size: 13px;
    gap: 4px;
  }

  .mps-form-field input,
  .mps-form-field textarea,
  .mps-form-field select {
    font-size: 16px; /* Prevents auto-zoom on iOS */
    padding: 10px 12px;
    min-height: 44px;
    border-radius: 6px;
  }

  .form-error {
    font-size: 11px;
  }

  .form-hint {
    font-size: 11px;
  }

  /* Buttons */
  .btn,
  button,
  input[type="submit"] {
    width: 100%;
    min-height: 44px;
    padding: 12px 16px;
    font-size: 14px;
    border-radius: 8px;
  }

  .btn-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .btn-group .btn {
    width: 100%;
  }

  /* Tables */
  .mps-table {
    font-size: 11px;
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .mps-table thead {
    display: none;
  }

  .mps-table tr {
    display: block;
    border: 1px solid var(--vp-line);
    border-radius: 6px;
    margin-bottom: 8px;
    overflow: hidden;
  }

  .mps-table td {
    display: block;
    padding: 8px 12px;
    border: none;
    border-bottom: 1px solid #f0f0f0;
    text-align: left;
    word-wrap: break-word;
  }

  .mps-table td:last-child {
    border-bottom: none;
  }

  .mps-table td:before {
    content: attr(data-label);
    font-weight: 700;
    display: block;
    font-size: 11px;
    color: var(--vp-muted);
    text-transform: uppercase;
    margin-bottom: 4px;
  }

  /* Dashboard */
  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 16px;
  }

  .dashboard-card {
    padding: 16px;
    margin-bottom: 0;
  }

  .dashboard-card-value {
    font-size: 20px;
  }

  .dashboard-card-label {
    font-size: 11px;
  }

  /* Status badges */
  .status-badge {
    display: inline-block;
    padding: 4px 8px;
    font-size: 10px;
    border-radius: 4px;
  }

  /* Notifications */
  .notification-container {
    position: fixed;
    top: 50px;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    padding: 8px;
    z-index: 1000;
    border-radius: 0;
  }

  .notification {
    padding: 12px;
    font-size: 12px;
    border-radius: 6px;
    margin: 0 auto;
  }

  .notification-icon {
    font-size: 16px;
  }

  .notification-content {
    font-size: 12px;
  }

  /* Modals */
  .modal-overlay {
    padding: 0;
  }

  .modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    border-radius: 0;
    overflow-y: auto;
  }

  .modal-header {
    padding: 14px 12px;
    position: sticky;
    top: 0;
    background: #fff;
    border-bottom: 1px solid var(--vp-line);
  }

  .modal-title {
    font-size: 16px;
  }

  .modal-body {
    padding: 12px;
  }

  .modal-footer {
    padding: 12px;
    gap: 8px;
    flex-direction: column;
  }

  .modal-footer .btn {
    width: 100%;
  }

  /* Links */
  a {
    -webkit-touch-callout: none;
  }

  /* Ensure touch targets are 44x44 minimum */
  button, a.btn, input[type="submit"], input[type="button"] {
    min-height: 44px;
    min-width: 44px;
  }
}

/* ============================================================================
   ACCESSIBILITY IMPROVEMENTS
   ============================================================================ */

:focus-visible {
  outline: 2px solid var(--vp-blue);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ============================================================================
   LOADING STATES
   ============================================================================ */

.is-loading {
  position: relative;
  opacity: 0.6;
  pointer-events: none;
}

.is-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid var(--vp-line);
  border-top-color: var(--vp-blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ============================================================================
   UTILITY CLASSES
   ============================================================================ */

.text-center {
  text-align: center;
}

.text-muted {
  color: var(--vp-muted);
}

.text-error {
  color: var(--vp-red);
}

.text-success {
  color: var(--vp-green);
}

.mt-16 {
  margin-top: 16px;
}

.mb-16 {
  margin-bottom: 16px;
}

.gap-8 {
  gap: 8px;
}

.gap-16 {
  gap: 16px;
}
body.mps-body.mps-public {
  background-color: #eef4fb;
  background-image: linear-gradient(rgba(238, 244, 251, 0.90), rgba(238, 244, 251, 0.96)), url('../img/admin-parallax.webp');
  background-position: center;
  background-size: cover;
  background-attachment: fixed;
}

body.mps-body.mps-public .vendor-main {
  background-color: rgba(248, 251, 255, 0.82);
}

@media (max-width: 700px), (prefers-reduced-motion: reduce) {
  body.mps-body.mps-public {
    background-attachment: scroll;
  }
}

/* Stable vendor workspace: panels never steal the working area and each menu remains usable with long content. */
.vendor-navigation-toggle,
.vendor-pane-toggle {
  min-height: 36px;
  padding: 7px 11px;
  border: 1px solid var(--vp-line);
  border-radius: 7px;
  background: #fff;
  color: var(--vp-text);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.vendor-navigation-toggle:hover,
.vendor-pane-toggle:hover {
  border-color: #9fbae0;
  background: var(--vp-surface-soft);
}

.vendor-shell {
  grid-template-columns: 250px minmax(0, 1fr) 340px;
  align-items: start;
}

.vendor-main,
.vendor-content {
  min-width: 0;
}

.vendor-content .workspace-inner,
.vendor-content .mps-table-wrap,
.vendor-content .mps-card {
  max-width: 100%;
}

.vendor-content .mps-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Launchpad shell: keep working content inside the available desktop column. */
body.mps-public {
  overflow-x: hidden;
}

.workspace-main,
.workspace-content,
.vendor-content {
  min-width: 0;
  width: 100%;
}

.vendor-content .workspace-inner {
  width: 100%;
  max-width: none;
  padding: 18px;
}

.launchpad-art,
.launch-hero,
.stats-grid,
.launch-grid,
.workspace-bottom {
  min-width: 0;
}

/* Functional launchpad hero and Mototolo-only top bar. */
.vendor-portal-header {
  display: none;
}

.workspace-topbar {
  min-height: 86px;
  padding: 12px 22px;
  gap: 18px;
  background: #fff;
  position: sticky;
  overflow: hidden;
  border-radius: 14px;
  margin: 10px 12px 0;
  box-shadow: 0 4px 16px rgba(8, 34, 76, .10);
}

.workspace-topbar::after {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 178px;
  height: 82px;
  background: url('../ui/vendor-launchpad/header-right-element.png') right bottom / contain no-repeat;
  content: '';
  pointer-events: none;
}

.workspace-topbar > * {
  position: relative;
  z-index: 1;
}

.workspace-brand-lockup {
  min-width: 180px;
}

.workspace-brand-logo {
  height: 52px;
  max-width: 210px;
}

.workspace-system-logo {
  max-width: 170px;
}

.topbar-tools {
  gap: 0;
}

.topbar-tools .tool-button {
  min-width: 88px;
  height: 48px;
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  padding: 3px 13px;
  border: 0;
  border-left: 1px solid #d8e2ef;
  border-radius: 0;
  background: transparent;
  color: #09285a;
  font-size: 11px;
  text-decoration: none;
}

.topbar-tools .tool-button:first-child {
  border-left: 0;
}

.topbar-tools .tool-button > span:first-child {
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
}

.topbar-tools .tool-button:hover,
.topbar-tools .tool-button:focus-visible {
  background: #f1f7ff;
  outline: none;
}

.vendor-chip {
  min-height: 56px;
  margin-left: 12px;
  padding: 4px 10px 4px 6px;
  border: 0;
  border-left: 1px solid #d8e2ef;
  border-radius: 0;
  font-size: 11px;
  line-height: 1.25;
}

.vendor-chip strong {
  display: block;
  font-size: 13px;
}

.vendor-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 14px;
}

.launch-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin-bottom: 18px;
}

.hero-card {
  position: relative;
  isolation: isolate;
  min-height: 430px;
  padding: 42px;
  overflow: hidden;
  border: 1px solid #0b407a;
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(2, 31, 75, .96) 0%, rgba(2, 40, 89, .78) 42%, rgba(2, 31, 75, .06) 68%), var(--launchpad-hero-bg, #062b57) center / cover;
  color: #fff;
}

.hero-top,
.hero-summary-margin {
  position: relative;
  z-index: 1;
  max-width: 58%;
}

.hero-eyebrow {
  margin: 0 0 12px;
  color: #b9dbff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.hero-card h2 {
  margin: 0 0 12px;
  color: #fff;
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1.06;
}

.hero-card .hero-top > p:not(.hero-eyebrow) {
  margin: 0;
  color: #e6f2ff;
  font-size: 16px;
  line-height: 1.55;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.hero-badges .badge {
  padding: 6px 9px;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 999px;
  background: rgba(2, 29, 66, .38);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.hero-summary-margin {
  margin-top: 34px;
}

.hero-card .mps-btn {
  min-height: 38px;
  border-radius: 7px;
  background: #006ee6;
}

.hero-card .mps-btn.secondary {
  background: rgba(255, 255, 255, .94);
  color: #062b57;
}

.rfq-scope-preview {
  display: block;
  max-width: 34rem;
  margin-top: 6px;
  color: #52657d;
  font-size: 12px;
  line-height: 1.45;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 22px;
}

.stat-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
  min-height: 126px;
  padding: 14px;
  border: 1px solid #dce6f2;
  border-radius: 10px;
  background: #fff;
  color: #0b2550;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(13, 43, 91, .05);
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.stat-card:hover,
.stat-card:focus-visible {
  border-color: #8db6e3;
  box-shadow: 0 10px 22px rgba(13, 65, 131, .12);
  outline: none;
  transform: translateY(-2px);
}

.stat-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 10px;
  background: #eaf3ff;
}

.stat-card.tone-green .stat-icon { background: #eaf8f0; }
.stat-card.tone-purple .stat-icon { background: #f2edff; }
.stat-card.tone-orange .stat-icon { background: #fff4e8; }
.stat-card.tone-cyan .stat-icon { background: #e8f8fb; }

.stat-card-copy {
  display: grid;
  align-content: start;
  gap: 5px;
  min-width: 0;
}

.stat-card-label {
  color: #4b6280;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
}

.stat-card-copy strong {
  color: #062b57;
  font-size: 21px;
  line-height: 1.1;
}

.stat-card-link {
  grid-column: 1 / -1;
  align-self: end;
  color: #0565ca;
  font-size: 12px;
  font-weight: 800;
}

/* Lower launchpad workspace. */
.workspace-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, .85fr);
  gap: 18px;
  align-items: start;
  padding-bottom: 24px;
}

.workspace-bottom .workspace-panel {
  overflow: hidden;
  border: 1px solid #dce6f2;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 5px 16px rgba(13, 43, 91, .05);
}

.workspace-bottom .panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  padding: 14px 16px;
  border-bottom: 1px solid #e4ecf5;
}

.workspace-bottom .panel-head h3 {
  margin: 0;
  color: #082856;
  font-size: 15px;
}

.workspace-bottom .panel-head a {
  color: #0669cf;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.workspace-bottom .panel-head a:hover,
.workspace-bottom .panel-head a:focus-visible {
  color: #034a9c;
  text-decoration: underline;
}

.workspace-bottom .recent-table th {
  padding: 11px 14px;
  border-bottom: 1px solid #e4ecf5;
  background: #f7faff;
  color: #58708e;
  font-size: 11px;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.workspace-bottom .recent-table td {
  padding: 15px 14px;
  color: #38516e;
  font-size: 13px;
}

.workspace-bottom .recent-table td[colspan] {
  padding: 28px 16px;
  color: #687e98;
  text-align: center;
}

.workspace-bottom .sidebar-grid {
  display: grid;
  gap: 14px;
}

.workspace-bottom .panel-inner-padding {
  padding: 16px;
}

.workspace-bottom .perf-header {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 10px;
  align-items: center;
}

.workspace-bottom .perf-score {
  color: #092d62;
  font-size: 16px;
}

.workspace-bottom .perf-label-secondary {
  grid-column: 2;
  margin: 0;
  color: #6d8097;
  font-size: 12px;
}

.workspace-bottom .perf-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 10px;
}

.workspace-bottom .perf-label {
  width: auto;
  color: #526a86;
  font-size: 12px;
  line-height: 1.25;
}

.workspace-bottom .perf-track {
  height: 7px;
  background: #e8f0f9;
}

.workspace-bottom .perf-fill {
  background: linear-gradient(90deg, #0878df, #005cc7);
}

.workspace-bottom .notify-list,
.workspace-bottom .docs-list {
  gap: 0;
  padding: 0;
}

.workspace-bottom .notify-row,
.workspace-bottom .doc-row {
  padding: 15px 16px;
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid #edf2f7;
  background: transparent;
}

.workspace-bottom .notify-row:last-child,
.workspace-bottom .doc-row:last-child {
  border-bottom: 0;
}

.workspace-bottom .notify-row strong,
.workspace-bottom .doc-row strong {
  color: #102e58;
  font-size: 13px;
}

.workspace-bottom .notify-copy,
.workspace-bottom .doc-meta {
  margin-top: 4px;
  color: #6b8098;
  font-size: 12px;
  line-height: 1.4;
}

.workspace-bottom .notify-time {
  margin-top: 7px;
  color: #8ba0b7;
  font-size: 11px;
}

@media (max-width: 1050px) {
  .workspace-bottom {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .workspace-bottom {
    gap: 12px;
    padding-bottom: 16px;
  }

  .workspace-bottom .panel-head {
    min-height: 52px;
    padding: 12px 14px;
  }

  .workspace-bottom .recent-table th:nth-child(3),
  .workspace-bottom .recent-table td:nth-child(3),
  .workspace-bottom .recent-table th:nth-child(5),
  .workspace-bottom .recent-table td:nth-child(5) {
    display: none;
  }

  .workspace-bottom .perf-row {
    grid-template-columns: 100px minmax(0, 1fr);
  }
}

@media (max-width: 1500px) {
  .stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.vendor-shell.vendor-third-pane-hidden {
  grid-template-columns: 250px minmax(0, 1fr);
}

.vendor-shell.vendor-third-pane-hidden .vendor-right {
  display: none;
}

.vendor-shell.vendor-navigation-collapsed {
  grid-template-columns: 76px minmax(0, 1fr) 340px;
}

.vendor-shell.vendor-navigation-collapsed.vendor-third-pane-hidden {
  grid-template-columns: 76px minmax(0, 1fr);
}

.vendor-navigation-collapsed .vendor-left {
  padding-inline: 10px;
}

.vendor-navigation-collapsed .vendor-logo {
  justify-content: center;
  padding-inline: 0;
}

.vendor-navigation-collapsed .vendor-logo img {
  width: 42px;
}

.vendor-navigation-collapsed .vendor-sidebar-nav a,
.vendor-navigation-collapsed .sidebar-logout {
  grid-template-columns: 24px;
  justify-content: center;
  padding-inline: 8px;
}

.vendor-navigation-collapsed .vendor-sidebar-nav a > span:not(.side-arrow),
.vendor-navigation-collapsed .sidebar-logout > span {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.vendor-navigation-collapsed .side-arrow {
  display: none;
}

@media (max-width: 1500px) {
  .vendor-shell {
    grid-template-columns: 250px minmax(0, 1fr);
  }

  .vendor-shell .vendor-right {
    display: none;
  }

  .vendor-shell.vendor-navigation-collapsed,
  .vendor-shell.vendor-navigation-collapsed.vendor-third-pane-hidden {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .vendor-pane-toggle {
    display: none;
  }
}

@media (max-width: 1100px) {
  .vendor-portal-header {
    display: block;
  }

  .vendor-portal-header {
    position: sticky;
  }

  .vendor-header-container {
    gap: 8px;
  }

  .vendor-portal-name {
    font-size: 12px;
  }

  .vendor-shell,
  .vendor-shell.vendor-navigation-collapsed,
  .vendor-shell.vendor-navigation-collapsed.vendor-third-pane-hidden {
    grid-template-columns: 1fr;
    padding: 8px;
  }

  .vendor-left,
  .vendor-right {
    display: none !important;
  }

  .vendor-navigation-toggle {
    display: none;
  }
}

@media (max-width: 700px) {
  .vendor-content .workspace-inner {
    padding: 10px;
  }

  .launchpad-art {
    border-radius: 8px;
  }

  .launchpad-art-brand {
    top: 10px;
    left: 10px;
    width: min(128px, 34%);
    padding: 5px 7px;
  }

  .workspace-topbar {
    min-height: 64px;
    padding: 8px 12px;
    margin: 0;
    border-radius: 0;
  }

  .workspace-topbar::after {
    display: none;
  }

  .workspace-brand-logo {
    height: 36px;
    max-width: 150px;
  }

  .topbar-tools .tool-button,
  .vendor-chip {
    display: none;
  }

  .launch-hero {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .stat-card {
    grid-template-columns: 36px minmax(0, 1fr);
    min-height: 114px;
    padding: 12px;
  }

  .stat-icon {
    width: 36px;
    height: 36px;
  }

  .stat-card-copy strong {
    font-size: 18px;
  }

  .hero-card {
    min-height: 500px;
    padding: 28px 20px;
    background-position: 63% center;
  }

  .hero-top,
  .hero-summary-margin {
    max-width: 100%;
  }
}

@media (max-width: 560px) {
  .vendor-portal-name {
    display: none;
  }

  .vendor-header-container {
    justify-content: space-between;
  }

  .header-logo-img {
    height: 32px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .vendor-sidebar-nav a,
  .vendor-navigation-toggle,
  .vendor-pane-toggle {
    transition: none;
  }
}

/* Codex additive vendor portal hardening: sticky shell, cropped icons, alerts, and compact mobile nav. */
.vendor-portal-header,
.workspace-topbar,
.mps-top {
  position: sticky;
  top: 0;
  z-index: 80;
}

.vendor-portal-header {
  backdrop-filter: blur(14px);
}

.vendor-shell {
  align-items: start;
}

.vendor-left {
  position: sticky;
  top: 92px;
  max-height: calc(100vh - 104px);
  overflow: auto;
  scrollbar-width: thin;
}

.vendor-sidebar-nav a,
.sidebar-logout,
.qa-item {
  align-items: center;
}

.vendor-nav-icon-img,
.qa-icon-img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  object-position: center;
  padding: 2px;
  border-radius: 6px;
  background: #071c31;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
  transition: transform .16s ease, filter .16s ease, box-shadow .16s ease;
}

.vendor-sidebar-nav a:hover .vendor-nav-icon-img,
.vendor-sidebar-nav a:focus-visible .vendor-nav-icon-img,
.sidebar-logout:hover .vendor-nav-icon-img,
.qa-item:hover .qa-icon-img,
.qa-item:focus-visible .qa-icon-img {
  filter: drop-shadow(0 0 8px rgba(31, 132, 255, .9));
  box-shadow: 0 0 0 1px rgba(89, 166, 255, .6), 0 0 18px rgba(31, 132, 255, .45);
  transform: translateY(-1px) scale(1.04);
}

.commercial-confirmation-alert {
  display: grid;
  gap: 5px;
  max-width: 590px;
  margin-top: 16px;
  padding: 11px 13px;
  border: 1px solid rgba(255, 212, 110, .78);
  border-radius: 8px;
  background: rgba(84, 48, 1, .62);
  color: #fff7dd;
  font-size: 12px;
  line-height: 1.4;
}

.commercial-confirmation-alert strong {
  color: #fff;
  font-size: 13px;
}

.commercial-confirmation-alert a,
.notify-link {
  width: max-content;
  color: #005fc5;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.commercial-confirmation-alert a {
  color: #fff;
  text-decoration: underline;
}

.notify-link {
  display: inline-flex;
  margin-top: 8px;
}

.notify-link:hover,
.notify-link:focus-visible {
  text-decoration: underline;
}

.mps-form-section-title {
  padding: 10px 0 2px;
  color: #062b57;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
  border-bottom: 1px solid #dce6f2;
}

@media (max-width: 900px) {
  .vendor-shell {
    display: block;
  }

  .vendor-left {
    position: sticky;
    top: 74px;
    z-index: 70;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 8px;
    border-radius: 0;
  }

  .vendor-logo,
  .vendor-logout-wrap {
    display: none;
  }

  .vendor-sidebar-nav {
    display: flex;
    gap: 8px;
    min-width: max-content;
  }

  .vendor-sidebar-nav a {
    width: 48px;
    height: 48px;
    padding: 8px;
    justify-content: center;
  }

  .vendor-sidebar-nav a span:not(.side-arrow) {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .vendor-sidebar-nav .side-arrow {
    display: none;
  }

  .vendor-nav-icon-img {
    width: 31px;
    height: 31px;
  }
}