* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, Helvetica, sans-serif;
}

html, body {
  width: 100%;
  min-height: 100%;
}


.auth-page {
  background: linear-gradient(to right, rgba(198,218,234,0.2) 50%, #ef1d24 50%);
}

.auth-wrapper {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.auth-left {
  background:
    linear-gradient(rgba(210, 225, 238, 0.35), rgba(210, 225, 238, 0.35)),
    url('background.png') center/cover no-repeat;
  display: flex;
  align-items: center;
  padding: 40px 50px;
}

.left-content {
  max-width: 520px;
  width: 100%;
}

.brand-title {
  font-size: 72px;
  font-weight: 900;
  color: #f6f0f0;
  text-shadow: 5px 5px 0 #e4202b;
  margin-bottom: 8px;
}

.tagline {
  font-size: 22px;
  font-weight: 700;
  color: white;
  line-height: 1.35;
  margin-bottom: 28px;
  text-shadow: 2px 2px 0 rgba(0,0,0,0.15);
}

.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.feature-card {
  background: rgba(255,255,255,0.50);
  border-radius: 26px;
  padding: 24px 26px;
  min-height: 128px;
  backdrop-filter: blur(4px);
}

.feature-card h3 {
  font-size: 16px;
  margin-bottom: 6px;
  color: #cf1f1f;
}

.feature-card p {
  font-size: 15px;
  color: #b13232;
  line-height: 1.3;
}

.feature-icon {
  font-size: 32px;
  margin-bottom: 10px;
}

.feature-icon.blue { color: #274ff7; }
.feature-icon.green { color: #3c8e1f; }
.feature-icon.orange { color: #df8c00; }

.auth-right {
  background: linear-gradient(180deg, #8f1111 0%, #ef1d24 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 30px;
}

.auth-panel {
  width: 100%;
  max-width: 460px;
  background: #f3efef;
  border-radius: 34px;
  padding: 38px 34px;
  box-shadow: 0 20px 35px rgba(0,0,0,0.28);
}

.signup-panel {
  max-width: 600px;
}

.auth-panel h2 {
  text-align: center;
  font-size: 28px;
  margin-bottom: 24px;
  font-weight: 900;
}

.auth-panel form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-panel input,
.auth-panel select,
.dashboard-form input,
.dashboard-form textarea,
.dashboard-form select,
.manufacturer-bid-form input,
.manufacturer-bid-form textarea,
.profile-grid-form input,
.profile-grid-form select,
.design-quantity-form input,
.design-quantity-form select,
.design-quantity-form textarea,
.admin-form-grid input,
.admin-form-grid select,
.admin-form-grid textarea {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #222;
  border-radius: 14px;
  outline: none;
  font-size: 14px;
  background: #f3efef;
}

.auth-panel textarea,
.profile-grid-form textarea,
.admin-form-grid textarea,
.manufacturer-bid-form textarea {
  min-height: 110px;
  resize: vertical;
}

.signup-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: 18px 20px;
}

.signup-bottom {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-top: 8px;
}

.signup-bottom a {
  color: #1026d8;
}

.main-btn {
  border: none;
  border-radius: 999px;
  background: linear-gradient(180deg, #f4f4f4, #cfd3d7);
  padding: 14px 20px;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease, color 0.22s ease;
}

.main-btn:hover {
  transform: translateY(-2px);
  background: linear-gradient(180deg, #ffffff, #d8dde2);
  color: #b51218;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.16);
}

.role-toggle-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.role-toggle-label {
  font-size: 14px;
  font-weight: 700;
  color: #333;
}

.role-toggle {
  display: flex;
  gap: 10px;
  background: #e7e2e2;
  padding: 6px;
  border-radius: 999px;
}

.role-toggle-btn {
  flex: 1;
  border: none;
  background: transparent;
  color: #333;
  font-size: 14px;
  font-weight: 700;
  padding: 12px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease, color 0.22s ease;
}

.role-toggle-btn:hover {
  transform: translateY(-1px);
  background: rgba(255,255,255,0.65);
}

.role-toggle-btn.active {
  background: linear-gradient(180deg, #ffffff, #d8dde2);
  color: #b51218;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.14);
}

.password-wrap {
  position: relative;
  width: 100%;
}

.password-wrap input {
  width: 100%;
  padding-right: 48px;
}

.toggle-password {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 18px;
  user-select: none;
  color: #555;
  z-index: 2;
}

.toggle-password:hover {
  color: #b51218;
}

.login-bottom-link {
  text-align: center;
  margin-top: 8px;
}

.login-bottom-link p {
  font-size: 14px;
  color: #333;
  margin-top: 6px;
}

.login-bottom-link a {
  color: #1026d8;
  font-weight: 700;
  text-decoration: none;
}

.login-bottom-link a:hover {
  text-decoration: underline;
}

.manufacturer-requirements-box {
  background: rgba(255,255,255,0.7);
  border: 2px solid #d8dde2;
  border-radius: 18px;
  padding: 18px;
  display: grid;
  gap: 12px;
}

.manufacturer-requirements-box h3 {
  font-size: 18px;
  color: #b31317;
  margin-bottom: 6px;
}

.manufacturer-requirements-box label {
  font-size: 14px;
  font-weight: 700;
  color: #333;
}

.manufacturer-requirements-box input[type="file"] {
  width: 100%;
  padding: 12px;
  border: 2px solid #222;
  border-radius: 12px;
  background: #f3efef;
}

.roof-dashboard-body {
  min-height: 100vh;
  background:
    linear-gradient(rgba(205, 220, 235, 0.28), rgba(205, 220, 235, 0.28)),
    url('background.png') center center / cover no-repeat;
}

/* UPDATED NAVBAR */
.roof-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 14px 18px;
  background: linear-gradient(180deg, #b31317 0%, #ef1d24 100%);
  box-shadow: 0 6px 18px rgba(0,0,0,0.14);
}

.roof-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  font-size: 20px;
  font-weight: 800;
}

.roof-brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.roof-brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.roof-top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.roof-nav-pill {
  text-decoration: none;
  color: #111;
  background: #f3f3f3;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease, color 0.22s ease;
}

.roof-nav-pill:hover {
  transform: translateY(-2px);
  background: #ffffff;
  color: #b51218;
  box-shadow: 0 8px 18px rgba(0,0,0,0.18);
}

.roof-nav-pill.active {
  background: #ffffff;
  color: #b51218;
  box-shadow: 0 8px 18px rgba(0,0,0,0.16);
}

.roof-nav-icon {
  font-size: 16px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.roof-nav-text {
  line-height: 1;
  white-space: nowrap;
}

.notifications-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.notif-count-badge {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: #ef1d24;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.18);
}

.roof-search-form input {
  width: 180px;
  padding: 10px 16px;
  border: none;
  border-radius: 999px;
  outline: none;
  background: #d9e2e3;
  font-size: 14px;
}

.roof-user-badge {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #ffffff;
  color: #b51218;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.user-badge-link {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.user-badge-link .roof-user-badge {
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.user-badge-link .roof-user-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0,0,0,0.18);
}

.roof-dashboard-main {
  position: relative;
  min-height: calc(100vh - 74px);
}

.roof-dashboard-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.03);
}

.roof-dashboard-content {
  position: relative;
  z-index: 2;
  padding: 26px 30px 50px;
}

.roof-page-title {
  font-size: 24px;
  font-weight: 900;
  color: #111;
  margin-bottom: 26px;
}

.roof-subtitle {
  font-size: 22px;
  font-weight: 900;
  color: #111;
  margin: 40px 0 18px;
}

.roof-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(260px, 1fr));
  gap: 18px;
}

.roof-design-card {
  background: rgba(255,255,255,0.96);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 12px 26px rgba(0,0,0,0.16);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
  border: 1px solid rgba(255,255,255,0.35);
}

.roof-design-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 34px rgba(0,0,0,0.20);
}

.roof-design-image {
  width: 100%;
  height: 190px;
  overflow: hidden;
}

.roof-design-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.roof-design-body {
  padding: 18px 18px 16px;
}

.roof-design-body h3 {
  font-size: 20px;
  margin-bottom: 8px;
  color: #3b3b4c;
}

.roof-design-desc {
  font-size: 14px;
  color: #4e4e5a;
  margin-bottom: 12px;
  line-height: 1.5;
  min-height: 38px;
}

.roof-design-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  font-size: 13px;
  color: #555;
}

.roof-design-meta-stack {
  display: grid;
  gap: 8px;
  justify-content: start;
}

.roof-select-btn,
.roof-post-btn,
.view-post-link,
.profile-primary-btn,
.profile-secondary-btn,
.admin-btn-neutral,
.admin-btn-red,
.client-approve-btn,
.client-bids-back-btn,
.manufacturer-bid-back-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  appearance: none;
  -webkit-appearance: none;
  border: none;
  outline: none;
  border-radius: 14px;
  padding: 14px 18px;
  background: linear-gradient(180deg, #ffffff 0%, #d9e0e5 100%);
  color: #8f1111;
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.10);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.roof-select-btn:hover,
.roof-post-btn:hover,
.view-post-link:hover,
.profile-primary-btn:hover,
.profile-secondary-btn:hover,
.admin-btn-neutral:hover,
.admin-btn-red:hover,
.client-approve-btn:hover,
.client-bids-back-btn:hover,
.manufacturer-bid-back-btn:hover {
  transform: translateY(-2px);
  background: linear-gradient(180deg, #ffffff 0%, #eef3f6 100%);
  color: #b51218;
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.14);
}

.admin-btn-red {
  background: linear-gradient(180deg, #e23a3a, #c51f1f);
  color: #fff;
}

.admin-btn-red:hover {
  background: linear-gradient(180deg, #ef4c4c, #d62929);
  color: #fff;
}

.roof-remove-btn {
  width: 100%;
  text-align: center;
  text-decoration: none;
  border-radius: 12px;
  padding: 12px 16px;
  background: linear-gradient(180deg, #e23a3a, #c51f1f);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  box-shadow: 0 8px 16px rgba(0,0,0,0.12);
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.roof-remove-btn:hover {
  transform: translateY(-2px);
  background: linear-gradient(180deg, #ef4c4c, #d62929);
}

.roof-bid-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.post-bid-form,
.manufacturer-bid-form,
.design-quantity-form,
.admin-form-grid {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.admin-form-grid {
  grid-template-columns: 1fr 1fr;
  gap: 18px 20px;
}

.admin-form-grid .full-row,
.profile-grid-form .full-row {
  grid-column: 1 / -1;
}

.card,
.dashboard-section-card,
.admin-section-card,
.client-bids-table-card,
.request-summary-card,
.bid-status-list-card {
  background: rgba(255,255,255,0.97);
  border-radius: 22px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
}

table th,
table td {
  padding: 14px;
  border-bottom: 1px solid #ddd;
  text-align: left;
  vertical-align: top;
}

table th {
  background: #f3f4f8;
}

.alert {
  padding: 14px 18px;
  border-radius: 12px;
  margin-bottom: 20px;
  font-weight: 700;
}

.alert.success {
  background: #daf5df;
  color: #136d2e;
}

.alert.error {
  background: #ffe0e0;
  color: #b31212;
}

.action-btn {
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 10px;
  color: white;
  font-weight: 700;
  margin-right: 8px;
  display: inline-block;
}

.action-btn.approve {
  background: #1d9c45;
}

.action-btn.reject {
  background: #d21f1f;
}

.empty-design-box {
  grid-column: 1 / -1;
  background: rgba(255,255,255,0.92);
  border-radius: 16px;
  padding: 24px;
  font-size: 16px;
  font-weight: 700;
  color: #444;
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.design-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 9999;
}

.design-modal-overlay.show {
  display: flex;
}

.design-modal-box {
  width: 100%;
  max-width: 900px;
  background: #ffffff;
  border-radius: 24px;
  padding: 24px;
  position: relative;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.25);
}

.design-modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  border: none;
  background: transparent;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  color: #b51218;
}

.design-modal-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: center;
}

.design-modal-image {
  width: 100%;
  height: 320px;
  overflow: hidden;
  border-radius: 18px;
  background: #f5f5f5;
}

.design-modal-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.design-spec-list {
  display: grid;
  gap: 12px;
  margin-bottom: 24px;
}

.design-spec-item {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  background: #f6f7f9;
  border-radius: 12px;
}

.quantity-label,
.spec-label,
.profile-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
  color: #333;
}

.spec-value {
  font-weight: 800;
  color: #b31317;
}

.request-summary-grid,
.client-bids-summary {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 22px;
  align-items: start;
}

.request-summary-image,
.client-bids-image {
  width: 100%;
  height: 220px;
  overflow: hidden;
  border-radius: 18px;
  background: #f4f4f4;
  box-shadow: 0 10px 22px rgba(0,0,0,0.10);
}

.request-summary-image img,
.client-bids-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.request-summary-details h3,
.client-bids-info h2 {
  font-size: 24px;
  margin-bottom: 10px;
  color: #2f2f3a;
}

.request-summary-desc,
.client-bids-info p {
  font-size: 15px;
  color: #4c4c58;
  margin-bottom: 16px;
  line-height: 1.5;
}

.request-summary-actions {
  margin-top: 18px;
  max-width: 240px;
}

.manufacturer-bid-top,
.admin-page-toolbar,
.dashboard-section-header,
.overview-action-header,
.admin-bid-monitor-header,
.manufacturer-bid-detail-top,
.admin-bidder-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.bid-status-badge,
.profile-bid-status-badge,
.client-bid-status,
.admin-status-badge,
.manufacturer-detail-status,
.client-approved-label,
.client-disabled-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 6px 12px rgba(0,0,0,0.10);
}

.bid-status-badge.status-approved,
.profile-bid-status-badge.approved,
.client-bid-status.status-accepted,
.admin-status-badge.post-awarded,
.manufacturer-detail-status.approved,
.client-approved-label {
  background: linear-gradient(180deg, #dff7e4, #bce9c7);
  color: #156b2f;
}

.bid-status-badge.status-declined,
.profile-bid-status-badge.cancelled,
.client-bid-status.status-rejected,
.manufacturer-detail-status.declined,
.client-disabled-label {
  background: linear-gradient(180deg, #ffe1e1, #ffc2c2);
  color: #a31818;
}

.bid-status-badge.status-pending,
.profile-bid-status-badge.pending,
.client-bid-status.status-pending,
.admin-status-badge.post-open,
.admin-status-badge.post-under_review,
.manufacturer-detail-status.pending,
.admin-status-badge {
  background: linear-gradient(180deg, #eef2f5, #d9e0e5);
  color: #44525f;
}

.bid-detail-message,
.manufacturer-bid-message-box {
  margin-bottom: 16px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255,255,255,0.82);
  box-shadow: 0 8px 18px rgba(0,0,0,0.08);
  font-size: 15px;
  font-weight: 700;
  color: #3c4650;
}

.notifications-list,
.notification-list,
.bid-status-list,
.admin-bidder-list,
.admin-design-list,
.admin-bids-grid {
  display: grid;
  gap: 18px;
}

.notification-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.notification-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: center;
  background: rgba(255,255,255,0.96);
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 12px 26px rgba(0,0,0,0.14);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  cursor: pointer;
}

.notification-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 28px rgba(0,0,0,0.16);
}

.notification-card.unread {
  border-left: 6px solid #ef1d24;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(255,245,245,0.98));
}

.notification-card.read {
  border-left: 6px solid #cfd7dd;
}

.notification-content h3 {
  font-size: 20px;
  margin-bottom: 8px;
  color: #2f2f3a;
}

.notification-content p {
  font-size: 15px;
  color: #4d5660;
  line-height: 1.45;
  margin-bottom: 8px;
}

.notification-time,
.bid-status-time {
  font-size: 13px;
  font-weight: 700;
  color: #7a7f87;
}

.notification-date-separator {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 6px 0 2px;
}

.notification-date-separator span {
  display: inline-flex;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.92);
  font-size: 13px;
  font-weight: 800;
  color: #a31818;
  box-shadow: 0 6px 16px rgba(0,0,0,0.10);
}

.profile-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
  align-items: start;
}

.profile-summary-card {
  background: rgba(255,255,255,0.96);
  border-radius: 20px;
  padding: 28px 22px;
  box-shadow: 0 12px 26px rgba(0,0,0,0.16);
  text-align: center;
}

.profile-avatar {
  width: 110px;
  height: 110px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: linear-gradient(180deg, #b31317 0%, #ef1d24 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(0,0,0,0.18);
}

.profile-summary-card h2 {
  font-size: 24px;
  color: #2f2f3a;
  margin-bottom: 6px;
}

.profile-username {
  color: #666;
  font-size: 14px;
  margin-bottom: 16px;
}

.profile-badges {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.profile-badge {
  padding: 8px 14px;
  border-radius: 999px;
  background: #eef2f5;
  color: #37424d;
  font-size: 13px;
  font-weight: 800;
}

.profile-badge.status {
  background: #ffe7e7;
  color: #b31317;
}

.profile-form-card {
  padding-top: 18px;
}

.profile-subtitle-fix {
  margin-top: 0;
}

.profile-grid-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 20px;
}

.profile-grid-form input:disabled {
  background: #e8e8e8;
  color: #555;
}

.admin-stat-number {
  font-size: 34px;
  font-weight: 900;
  color: #b31317;
  margin-top: 10px;
}

.view-file-btn {
  padding: 10px 14px;
  font-size: 13px;
}

.section-spacer {
  margin-top: 30px;
}

.overview-stats-grid {
  margin-bottom: 26px;
}

.overview-links-grid-admin-style,
.boxed-admin-grid,
.boxed-admin-links-grid,
.dashboard-preview-grid,
.small-preview-grid,
.client-profile-stats-row,
.admin-overview-grid {
  display: grid;
  gap: 18px;
}

.boxed-admin-grid {
  grid-template-columns: repeat(5, minmax(180px, 1fr));
}

.boxed-admin-links-grid {
  grid-template-columns: repeat(3, minmax(260px, 1fr));
}

.overview-links-grid-admin-style {
  grid-template-columns: repeat(2, minmax(320px, 1fr));
  align-items: stretch;
  margin-top: 18px;
  max-width: 1120px;
}

.dashboard-preview-grid {
  grid-template-columns: repeat(3, minmax(240px, 1fr));
}

.small-preview-grid {
  grid-template-columns: repeat(2, minmax(240px, 1fr));
}

.overview-action-card,
.admin-overview-box,
.admin-bid-monitor-card,
.admin-bidder-card,
.bid-status-item {
  background: rgba(255, 255, 255, 0.97);
  border-radius: 22px;
  box-shadow: 0 12px 26px rgba(0,0,0,0.16);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.40);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.overview-action-card:hover,
.admin-overview-box:hover,
.admin-bid-monitor-card:hover,
.admin-bidder-card:hover,
.bid-status-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 34px rgba(0,0,0,0.20);
}

.overview-action-body,
.admin-overview-box,
.bid-status-item,
.admin-bid-monitor-body,
.admin-bidder-card {
  padding: 18px 16px 14px;
}

.overview-action-header h3,
.admin-overview-box h3,
.admin-bid-monitor-header h3,
.admin-bidder-name-wrap h3,
.bid-status-main h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 900;
  color: #2f2f3a;
  line-height: 1.2;
}

.overview-view-link {
  text-decoration: none;
  color: #b31317;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  line-height: 1;
  padding: 0;
  background: transparent;
  border-radius: 0;
  transition: color 0.18s ease, transform 0.18s ease;
}

.overview-view-link:hover {
  color: #8f1111;
  transform: translateY(-1px);
}

.overview-feature-desc,
.admin-bid-monitor-desc {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: #4e4e5a;
}

.profile-photo {
  width: 110px;
  height: 110px;
  margin: 0 auto 18px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  box-shadow: 0 12px 24px rgba(0,0,0,0.18);
  border: 4px solid rgba(255,255,255,0.95);
}

.profile-action-wrap {
  margin-top: 18px;
}

.profile-button-row {
  grid-column: 1 / -1;
  display: flex;
  gap: 12px;
  align-items: center;
}

.profile-button-row .roof-post-btn,
.profile-button-row .profile-cancel-btn {
  width: auto;
  min-width: 160px;
}

.profile-view-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 20px;
}

.profile-view-item {
  background: #f6f7f9;
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.profile-view-item.full-row {
  grid-column: 1 / -1;
}

.profile-view-label {
  font-size: 13px;
  font-weight: 800;
  color: #7a7f87;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.profile-view-value {
  font-size: 15px;
  color: #2f2f3a;
  font-weight: 700;
  line-height: 1.4;
}

.client-profile-shell {
  max-width: 1200px;
}

.polished-profile-layout {
  gap: 28px;
  margin-bottom: 34px;
}

.polished-profile-summary {
  padding: 34px 24px 28px;
  border-radius: 24px;
}

.polished-profile-summary h2 {
  font-size: 26px;
  margin-bottom: 8px;
}

.profile-status-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.profile-online-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #1bb34a;
}

.profile-online-text {
  font-size: 13px;
  font-weight: 700;
  color: #4d5660;
}

.admin-mini-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.admin-mini-stat-card,
.admin-bid-stat-card,
.admin-bid-meta-box {
  background: rgba(255,255,255,0.96);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.10);
}

.admin-mini-stat-card span,
.admin-bid-stat-card span,
.admin-bid-meta-label,
.admin-bidder-meta-box span {
  display: block;
  font-size: 13px;
  color: #6a727a;
  font-weight: 700;
  margin-bottom: 8px;
}

.admin-mini-stat-card strong,
.admin-bid-stat-card strong,
.admin-bid-meta-value,
.admin-bidder-meta-box strong {
  font-size: 24px;
  color: #b31317;
  font-weight: 900;
}

.spec-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 12px;
}

.spec-check-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f6f7f9;
  border-radius: 12px;
  padding: 12px 14px;
}

.spec-check-item input {
  width: auto;
}

.admin-action-stack {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.client-bids-container,
.manufacturer-bid-detail-container {
  display: grid;
  gap: 24px;
}

.client-bids-meta,
.manufacturer-bid-detail-meta {
  display: grid;
  gap: 10px;
  margin: 18px 0;
  font-size: 14px;
  color: #4d5660;
}

.client-bids-back-btn,
.manufacturer-bid-back-btn {
  max-width: 220px;
}

.client-bid-price-wrap {
  display: grid;
  gap: 8px;
}

.client-bid-price {
  font-weight: 900;
  color: #8f1111;
}

.client-bid-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.client-bid-tag {
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.client-bid-tag.tag-low {
  background: #dff7e4;
  color: #156b2f;
}

.client-bid-tag.tag-high {
  background: #ffe1e1;
  color: #a31818;
}

.lowest-bid-row {
  background: rgba(223, 247, 228, 0.35);
}

.highest-bid-row {
  background: rgba(255, 225, 225, 0.35);
}

.admin-bid-monitor-image,
.manufacturer-bid-detail-image {
  width: 100%;
  height: 220px;
  overflow: hidden;
}

.admin-bid-monitor-image img,
.manufacturer-bid-detail-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-bid-monitor-meta,
.admin-bid-stats-row,
.admin-bidder-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.admin-bidder-note {
  margin-top: 14px;
  background: #f6f7f9;
  border-radius: 14px;
  padding: 14px 16px;
}

.admin-bidder-note span {
  display: block;
  font-size: 13px;
  font-weight: 800;
  color: #7a7f87;
  margin-bottom: 8px;
}

.admin-bidder-note p {
  font-size: 14px;
  color: #3d4650;
  line-height: 1.5;
}

.admin-file-link {
  color: #b31317;
  font-weight: 800;
  text-decoration: none;
}

.admin-file-link:hover {
  text-decoration: underline;
}

@media (max-width: 1100px) {
  .auth-wrapper {
    grid-template-columns: 1fr;
  }

  .auth-left,
  .auth-right {
    padding: 30px 20px;
  }

  .boxed-admin-grid,
  .boxed-admin-links-grid,
  .roof-card-grid,
  .dashboard-preview-grid,
  .spec-checkbox-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }
}

@media (max-width: 900px) {
  .roof-card-grid,
  .profile-layout,
  .profile-grid-form,
  .design-modal-content,
  .request-summary-grid,
  .client-bids-summary,
  .admin-form-grid,
  .boxed-admin-grid,
  .boxed-admin-links-grid,
  .dashboard-preview-grid,
  .small-preview-grid,
  .profile-view-grid,
  .spec-checkbox-grid,
  .admin-mini-stats,
  .admin-bid-monitor-meta,
  .admin-bid-stats-row,
  .admin-bidder-meta {
    grid-template-columns: 1fr;
  }

  .roof-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .roof-top-actions {
    width: 100%;
  }

  .roof-nav-pill {
    padding: 10px 14px;
    font-size: 13px;
  }

  .roof-search-form input {
    width: 100%;
  }

  .brand-title {
    font-size: 54px;
  }

}

@media (max-width: 768px) {
  .overview-column-links {
    gap: 22px;
    margin-top: 30px;
  }

  .overview-feature-body {
    padding: 24px 20px 22px;
  }

  .overview-link-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 14px;
  }

  .overview-link-header h3 {
    font-size: 20px;
  }

  .overview-feature-desc {
    font-size: 15px;
    line-height: 1.6;
  }

  .profile-button-row,
  .admin-action-stack,
  .roof-bid-actions {
    flex-direction: column;
  }
}

@media (max-width: 700px) {
  .signup-grid,
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .roof-dashboard-content {
    padding: 20px 16px 40px;
  }

  .auth-panel {
    padding: 28px 22px;
  }
}

/* =========================================
   ADMIN DASHBOARD FIX
   Ilagay ito sa pinakadulo ng style.css
========================================= */

.admin-dashboard-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(180px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.admin-stat-card {
  background: rgba(255, 255, 255, 0.96);
  border-radius: 20px;
  padding: 20px 18px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
  min-height: 110px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.admin-stat-label {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: #333;
  margin-bottom: 12px;
  line-height: 1.3;
}

.admin-stat-value {
  display: block;
  font-size: 32px;
  font-weight: 900;
  color: #b31317;
  line-height: 1;
}

.admin-dashboard-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(280px, 1fr));
  gap: 18px;
  align-items: stretch;
}

.admin-action-card {
  background: rgba(255, 255, 255, 0.97);
  border-radius: 22px;
  padding: 22px 20px;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.14);
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.admin-action-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.admin-action-card-top h3 {
  margin: 0;
  font-size: 28px;
  font-weight: 900;
  color: #2f2f3a;
  line-height: 1.1;
}

.admin-action-link {
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
  color: #b31317;
  white-space: nowrap;
}

.admin-action-link:hover {
  text-decoration: underline;
}

.admin-action-card p {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
  color: #444;
}

.roof-dashboard-content {
  position: relative;
  z-index: 2;
  padding: 26px 24px 50px;
}

.roof-page-title {
  font-size: 24px;
  font-weight: 900;
  color: #111;
  margin-bottom: 22px;
}

/* Responsive */
@media (max-width: 1400px) {
  .admin-dashboard-stats {
    grid-template-columns: repeat(3, minmax(200px, 1fr));
  }
}

@media (max-width: 1000px) {
  .admin-dashboard-stats {
    grid-template-columns: repeat(2, minmax(200px, 1fr));
  }

  .admin-dashboard-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .admin-dashboard-stats {
    grid-template-columns: 1fr;
  }

  .admin-action-card-top {
    flex-direction: column;
    align-items: flex-start;
  }
}

.admin-section-card {
  background: rgba(255, 255, 255, 0.96);
  border-radius: 24px;
  padding: 28px 26px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
  margin-bottom: 26px;
}

.admin-section-title {
  margin: 0 0 20px;
  font-size: 32px;
  font-weight: 900;
  color: #1f1f1f;
  line-height: 1.1;
}

.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 18px;
  align-items: start;
}

.admin-form-grid .full-row {
  grid-column: 1 / -1;
}

.admin-form-grid input[type="text"],
.admin-form-grid input[type="file"],
.admin-form-grid textarea,
.admin-form-grid select {
  width: 100%;
  border: 1.5px solid #d9d9d9;
  background: #fff;
  border-radius: 16px;
  padding: 14px 16px;
  font-size: 15px;
  color: #222;
  outline: none;
  transition: 0.2s ease;
  box-sizing: border-box;
}

.admin-form-grid input[type="text"]:focus,
.admin-form-grid input[type="file"]:focus,
.admin-form-grid textarea:focus,
.admin-form-grid select:focus {
  border-color: #c5161d;
  box-shadow: 0 0 0 4px rgba(197, 22, 29, 0.10);
}

.admin-form-grid textarea {
  min-height: 130px;
  resize: vertical;
  line-height: 1.5;
}

.admin-form-grid input[disabled] {
  background: #f5f5f5;
  color: #444;
  cursor: not-allowed;
}

.profile-label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 800;
  color: #2d2d2d;
}

.spec-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 12px;
  background: #fafafa;
  border: 1px solid #ececec;
  border-radius: 18px;
  padding: 16px;
}

.spec-check-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid #ececec;
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 600;
  color: #333;
  transition: 0.2s ease;
}

.spec-check-item:hover {
  border-color: #c5161d;
  box-shadow: 0 6px 14px rgba(197, 22, 29, 0.08);
}

.spec-check-item input[type="checkbox"] {
  transform: scale(1.15);
  accent-color: #c5161d;
}

.admin-action-stack {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.roof-post-btn,
.admin-btn-neutral,
.admin-btn-red {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 14px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
  border: none;
  cursor: pointer;
  transition: 0.2s ease;
}

.roof-post-btn {
  background: linear-gradient(135deg, #c5161d, #e1262d);
  color: #fff;
  box-shadow: 0 10px 18px rgba(197, 22, 29, 0.22);
}

.roof-post-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 22px rgba(197, 22, 29, 0.26);
}

.admin-btn-neutral {
  background: #f3f3f3;
  color: #333;
  border: 1px solid #ddd;
}

.admin-btn-neutral:hover {
  background: #ebebeb;
}

.admin-btn-red {
  background: #fff0f0;
  color: #c5161d;
  border: 1px solid #f2b8bb;
}

.admin-btn-red:hover {
  background: #ffe4e6;
}

@media (max-width: 1100px) {
  .admin-form-grid {
    grid-template-columns: 1fr;
  }

  .spec-checkbox-grid {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }
}

@media (max-width: 640px) {
  .admin-section-card {
    padding: 20px 16px;
  }

  .admin-section-title {
    font-size: 24px;
  }

  .spec-checkbox-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================================
   PROFILE PAGE SPACING FIX
   For admin, client, manufacturer profile
========================================= */

.full-profile-content {
  padding: 28px 24px 50px;
}

.client-profile-page-layout,
.client-profile-new-layout {
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.client-profile-top-row,
.client-profile-bottom-row {
  display: grid;
  grid-template-columns: 1.05fr 1.35fr;
  gap: 24px;
  align-items: stretch;
}

.client-profile-left-column,
.client-profile-right-column {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.client-profile-top-card,
.full-profile-summary,
.profile-details-under-card,
.bid-status-list-card,
.merged-profile-details-card {
  margin: 0;
}

.profile-summary-card {
  padding: 34px 28px;
  min-height: 320px;
  border-radius: 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
}

.profile-avatar,
.profile-photo {
  margin-bottom: 6px;
}

.profile-status-line {
  margin-bottom: 2px;
}

.profile-badges {
  margin-top: 2px;
  margin-bottom: 8px;
}

.profile-action-wrap {
  width: 100%;
  margin-top: 10px;
  padding-top: 14px;
}

.profile-action-wrap .profile-primary-btn {
  width: 100%;
  justify-content: center;
}

.top-profile-overview-wrap,
.profile-stats-wrap {
  margin: 0;
}

.overview-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 16px;
}

.client-overview-stat-card,
.overview-stats-grid .roof-design-card {
  min-height: 140px;
  border-radius: 22px;
}

.profile-details-under-card,
.bid-status-list-card,
.merged-profile-details-card {
  padding: 26px 22px;
  border-radius: 24px;
}

.profile-subtitle-fix {
  margin: 0 0 18px;
}

.profile-view-grid.two-per-line-profile-view {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 16px;
}

.profile-view-item {
  background: rgba(255, 255, 255, 0.72);
  border-radius: 18px;
  padding: 16px 14px;
  min-height: 78px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.profile-view-label {
  margin-bottom: 8px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.profile-view-value {
  font-size: 16px;
  line-height: 1.4;
  word-break: break-word;
}

.bid-status-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.bid-status-item {
  padding: 16px 16px;
  border-radius: 18px;
  min-height: 90px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.bid-status-main h3 {
  margin: 0 0 8px;
}

.bid-status-main p {
  margin: 0 0 6px;
}

.bid-status-time {
  display: inline-block;
  margin-top: 4px;
}

.edit-profile-single-card {
  padding: 28px 24px;
  border-radius: 24px;
}

.profile-grid-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 18px;
}

.profile-grid-form .full-row {
  grid-column: 1 / -1;
}

.profile-button-row {
  grid-column: 1 / -1;
  display: flex;
  gap: 12px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.profile-button-row .profile-primary-btn,
.profile-button-row .profile-secondary-btn {
  min-width: 160px;
  justify-content: center;
}

/* Better spacing for admin profile left-right layout */
.client-profile-new-layout {
  display: grid;
  grid-template-columns: 1.02fr 1.28fr;
  gap: 24px;
  align-items: start;
}

/* Responsive */
@media (max-width: 1200px) {
  .client-profile-top-row,
  .client-profile-bottom-row,
  .client-profile-new-layout {
    grid-template-columns: 1fr;
  }

  .overview-stats-grid {
    grid-template-columns: repeat(3, minmax(120px, 1fr));
  }
}

@media (max-width: 820px) {
  .profile-view-grid.two-per-line-profile-view,
  .profile-grid-form {
    grid-template-columns: 1fr;
  }

  .overview-stats-grid {
    grid-template-columns: 1fr;
  }

  .bid-status-item {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .full-profile-content {
    padding: 20px 14px 36px;
  }

  .profile-summary-card,
  .profile-details-under-card,
  .bid-status-list-card,
  .merged-profile-details-card,
  .edit-profile-single-card {
    padding: 20px 16px;
  }
}

.register-page-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
}

.register-card {
  width: 100%;
  max-width: 980px;
  background: rgba(255,255,255,0.97);
  border-radius: 26px;
  padding: 30px 26px;
  box-shadow: 0 16px 36px rgba(0,0,0,0.14);
}

.register-header {
  margin-bottom: 22px;
}

.register-header h1 {
  margin: 0 0 8px;
  font-size: 34px;
  font-weight: 900;
}

.register-header p {
  margin: 0;
  color: #555;
}

.modern-register-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 16px;
}

.modern-register-form .full-row {
  grid-column: 1 / -1;
}

.modern-register-form label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 800;
  color: #2c2c2c;
}

.modern-register-form input,
.modern-register-form select {
  width: 100%;
  box-sizing: border-box;
  border: 1.5px solid #d8d8d8;
  border-radius: 16px;
  padding: 14px 15px;
  font-size: 15px;
  outline: none;
  background: #fff;
}

.modern-register-form input:focus,
.modern-register-form select:focus {
  border-color: #c5161d;
  box-shadow: 0 0 0 4px rgba(197,22,29,0.10);
}

.role-toggle-wrap {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.role-toggle-option {
  position: relative;
}

.role-toggle-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.role-toggle-option span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 150px;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 14px;
  background: #f3f3f3;
  border: 1px solid #ddd;
  font-weight: 800;
  cursor: pointer;
  transition: 0.2s ease;
}

.role-toggle-option input:checked + span {
  background: linear-gradient(135deg, #c5161d, #e1262d);
  color: #fff;
  border-color: #c5161d;
  box-shadow: 0 10px 18px rgba(197,22,29,0.22);
}

.register-submit-btn {
  width: 100%;
  min-height: 52px;
  border: none;
  border-radius: 16px;
  background: linear-gradient(135deg, #c5161d, #e1262d);
  color: #fff;
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 12px 22px rgba(197,22,29,0.22);
}

.register-submit-btn:hover {
  transform: translateY(-1px);
}

@media (max-width: 900px) {
  .modern-register-form {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }
}

@media (max-width: 640px) {
  .modern-register-form {
    grid-template-columns: 1fr;
  }

  .register-card {
    padding: 22px 16px;
  }
}

/* =========================================
   FINAL SIGNUP / AUTH FIX
   Ilagay ito sa PINAKADULO ng style.css
========================================= */

/* Force old auth page layout back */
body.auth-page {
  min-height: 100vh;
  background: linear-gradient(to right, rgba(198,218,234,0.2) 50%, #ef1d24 50%) !important;
}

.auth-wrapper {
  min-height: 100vh !important;
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
}

.auth-left {
  background:
    linear-gradient(rgba(210, 225, 238, 0.35), rgba(210, 225, 238, 0.35)),
    url('background.png') center/cover no-repeat !important;
  display: flex !important;
  align-items: center !important;
  padding: 40px 50px !important;
}

.auth-right {
  background: linear-gradient(180deg, #8f1111 0%, #ef1d24 100%) !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  padding: 30px !important;
}

.auth-panel {
  width: 100% !important;
  max-width: 460px !important;
  background: #f3efef !important;
  border-radius: 34px !important;
  padding: 38px 34px !important;
  box-shadow: 0 20px 35px rgba(0,0,0,0.28) !important;
}

.signup-panel {
  max-width: 600px !important;
}

/* Disable the newer register-page system visually */
.register-page-wrap,
.register-card,
.register-header,
.modern-register-form {
  all: unset;
}

/* Signup grid restored */
.signup-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 18px 20px !important;
}

.signup-grid input,
.signup-grid select,
.signup-grid textarea {
  width: 100% !important;
  padding: 14px 16px !important;
  border: 2px solid #222 !important;
  border-radius: 14px !important;
  outline: none !important;
  font-size: 14px !important;
  background: #f3efef !important;
  box-sizing: border-box !important;
}

.signup-grid input:focus,
.signup-grid select:focus,
.signup-grid textarea:focus {
  border-color: #b51218 !important;
  box-shadow: 0 0 0 4px rgba(181,18,24,0.10) !important;
}

.signup-grid input[readonly] {
  background: #e8e8e8 !important;
  color: #555 !important;
}

.signup-grid input[name="username"] {
  grid-column: 1 / -1 !important;
}

/* Role toggle: keep original clean style */
.signup-grid .role-toggle-wrap {
  grid-column: 1 / -1 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
}

.role-toggle-label {
  font-size: 14px !important;
  font-weight: 700 !important;
  color: #333 !important;
}

.role-toggle {
  display: flex !important;
  gap: 10px !important;
  background: #e7e2e2 !important;
  padding: 6px !important;
  border-radius: 999px !important;
}

.role-toggle-btn {
  flex: 1 !important;
  border: none !important;
  background: transparent !important;
  color: #333 !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  padding: 12px 18px !important;
  border-radius: 999px !important;
  cursor: pointer !important;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease, color 0.22s ease !important;
}

.role-toggle-btn:hover {
  transform: translateY(-1px) !important;
  background: rgba(255,255,255,0.65) !important;
}

.role-toggle-btn.active {
  background: linear-gradient(180deg, #ffffff, #d8dde2) !important;
  color: #b51218 !important;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.14) !important;
}

/* Password fields */
.signup-grid .password-wrap {
  position: relative !important;
  width: 100% !important;
}

.signup-grid .password-wrap input {
  width: 100% !important;
  padding-right: 48px !important;
}

.toggle-password {
  position: absolute !important;
  right: 14px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  cursor: pointer !important;
  font-size: 18px !important;
  user-select: none !important;
  color: #555 !important;
  z-index: 2 !important;
}

.toggle-password:hover {
  color: #b51218 !important;
}

/* Manufacturer requirements box */
#manufacturerRequirements.manufacturer-requirements-box {
  grid-column: 1 / -1 !important;
  background: rgba(255,255,255,0.7) !important;
  border: 2px solid #d8dde2 !important;
  border-radius: 18px !important;
  padding: 18px !important;
  display: grid;
  gap: 12px !important;
}

#manufacturerRequirements.manufacturer-requirements-box h3 {
  font-size: 18px !important;
  color: #b31317 !important;
  margin-bottom: 6px !important;
}

#manufacturerRequirements.manufacturer-requirements-box label {
  font-size: 14px !important;
  font-weight: 700 !important;
  color: #333 !important;
}

#manufacturerRequirements.manufacturer-requirements-box input[type="file"] {
  width: 100% !important;
  padding: 12px !important;
  border: 2px solid #222 !important;
  border-radius: 12px !important;
  background: #f3efef !important;
}

/* Bottom buttons / links */
.signup-bottom {
  grid-column: 1 / -1 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 14px !important;
  margin-top: 8px !important;
}

.signup-bottom .main-btn {
  width: 100% !important;
}

.signup-bottom p {
  font-size: 14px !important;
  color: #333 !important;
}

.signup-bottom a {
  color: #1026d8 !important;
  font-weight: 700 !important;
  text-decoration: none !important;
}

.signup-bottom a:hover {
  text-decoration: underline !important;
}

/* Alerts inside auth panel */
.auth-panel .alert {
  margin-bottom: 16px !important;
}

/* Responsive */
@media (max-width: 1100px) {
  .auth-wrapper {
    grid-template-columns: 1fr !important;
  }

  .auth-left,
  .auth-right {
    padding: 30px 20px !important;
  }
}

@media (max-width: 700px) {
  .signup-grid {
    grid-template-columns: 1fr !important;
  }

  .auth-panel {
    padding: 28px 22px !important;
  }

  .role-toggle {
    flex-direction: column !important;
  }
}
/* Safe POST action forms used by client pages */
.inline-action-form{display:inline-block;margin:0;}
.inline-action-form button{font:inherit;}
.inline-action-form .roof-remove-btn{border:0;cursor:pointer;}

/* =========================================================
   PHASE 1: SHARED CLIENT / SUPPLIER PORTAL
   ========================================================= */
.app-icon {
  width: 20px;
  height: 20px;
  display: block;
  flex: 0 0 auto;
}

.portal-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  background: rgba(241, 245, 249, 0.78);
}

.portal-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 90;
  display: flex;
  flex-direction: column;
  padding: 22px 18px;
  background: #111827;
  color: #fff;
  box-shadow: 8px 0 26px rgba(15, 23, 42, 0.14);
}

.portal-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 28px;
}

.portal-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
  min-width: 0;
}

.portal-brand-logo {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: #fff;
  flex: 0 0 auto;
}

.portal-brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portal-brand strong,
.portal-account-copy strong {
  display: block;
  font-size: 16px;
  line-height: 1.2;
}

.portal-brand small,
.portal-account-copy small,
.portal-security-note small {
  display: block;
  margin-top: 4px;
  color: #9ca3af;
  font-size: 12px;
  line-height: 1.3;
}

.portal-menu {
  display: grid;
  gap: 7px;
}

.portal-menu-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 11px 13px;
  border-radius: 12px;
  color: #d1d5db;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.portal-menu-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  transform: translateX(2px);
}

.portal-menu-link.active {
  background: #c51f26;
  color: #fff;
  box-shadow: 0 10px 24px rgba(197, 31, 38, 0.28);
}

.portal-menu-icon {
  width: 24px;
  display: grid;
  place-items: center;
}

.portal-menu-label {
  min-width: 0;
  flex: 1;
}

.portal-menu-badge {
  min-width: 23px;
  height: 23px;
  padding: 0 6px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: #b51218;
  font-size: 11px;
  font-weight: 900;
}

.portal-security-note {
  margin-top: auto;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 13px;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 14px;
  background: rgba(255,255,255,0.05);
  color: #f3f4f6;
  font-size: 12px;
}

.portal-security-note .app-icon {
  width: 19px;
  height: 19px;
  color: #86efac;
}

.portal-account-card {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.10);
  display: flex;
  align-items: center;
  gap: 8px;
}

.portal-account-link {
  min-width: 0;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
}

.portal-avatar,
.portal-mobile-avatar {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #c51f26;
  color: #fff;
  font-weight: 900;
  text-decoration: none;
}

.portal-account-copy {
  min-width: 0;
}

.portal-account-copy strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.portal-logout {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #d1d5db;
  text-decoration: none;
}

.portal-logout:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}

.portal-main {
  min-width: 0;
  min-height: 100vh;
}

.portal-mobile-bar,
.portal-mobile-close,
.portal-sidebar-backdrop {
  display: none;
}

.portal-page-heading {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.portal-page-heading .roof-page-title {
  margin-bottom: 7px;
}

.portal-page-heading p {
  color: #5b6470;
  line-height: 1.5;
}

.security-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 999px;
  background: #e6f7ec;
  color: #176b37;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.security-chip .app-icon {
  width: 17px;
  height: 17px;
}

.verification-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px;
  margin-bottom: 22px;
  border-radius: 15px;
  border: 1px solid #d8dee8;
  background: #fff;
}

.verification-banner.verified {
  border-color: #b8e2c4;
  background: #edf9f0;
  color: #145d2e;
}

.verification-banner.pending {
  border-color: #ead39c;
  background: #fff9e9;
  color: #75520a;
}

.verification-banner .app-icon {
  width: 22px;
  height: 22px;
  margin-top: 1px;
}

.verification-banner p {
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.45;
}

.roof-post-btn:disabled,
.roof-post-btn[disabled] {
  cursor: not-allowed;
  opacity: 0.5;
  transform: none;
  box-shadow: none;
}

/* Authentication and document sections */
.feature-icon .app-icon {
  width: 32px;
  height: 32px;
}

.toggle-password {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: transparent;
}

.toggle-password .app-icon {
  width: 20px;
  height: 20px;
}

.signup-panel-wide {
  max-width: 760px;
  max-height: calc(100vh - 50px);
  overflow-y: auto;
}

.signup-heading {
  margin-bottom: 22px;
  text-align: center;
}

.signup-heading h2 {
  margin-bottom: 7px;
}

.signup-heading p {
  color: #5f6368;
  line-height: 1.45;
  font-size: 14px;
}

.full-span {
  grid-column: 1 / -1;
}

.signup-section-title {
  margin-top: 4px;
  padding-bottom: 8px;
  border-bottom: 1px solid #d5d9df;
  color: #2f3742;
  font-size: 16px;
}

.password-strength {
  margin-top: -8px;
  color: #5f6368;
  font-size: 13px;
}

.signup-requirements-box {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid #d6dce5;
  border-radius: 18px;
  background: #fff;
}

.signup-requirements-box[hidden],
.conditional-document-grid[hidden] {
  display: none !important;
}

.signup-requirements-box > h3 {
  color: #b51218;
  font-size: 18px;
}

.signup-requirements-box > p {
  color: #5b6470;
  font-size: 13px;
  line-height: 1.5;
}

.signup-requirements-box label {
  display: grid;
  gap: 7px;
  color: #303844;
  font-size: 13px;
  font-weight: 700;
}

.document-upload-grid,
.conditional-document-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}

.document-upload-grid label,
.conditional-document-grid label {
  padding: 13px;
  border: 1px solid #dce1e7;
  border-radius: 13px;
  background: #f8fafc;
}

.document-upload-grid input[type="file"],
.conditional-document-grid input[type="file"],
.signup-requirements-box input[type="file"] {
  padding: 10px;
  border: 1px dashed #aeb7c2;
  border-radius: 10px;
  background: #fff;
  font-size: 12px;
}

.required-mark {
  display: inline-flex;
  width: fit-content;
  padding: 3px 7px;
  border-radius: 999px;
  background: #fee2e2;
  color: #991b1b;
  font-size: 10px;
  font-weight: 800;
}

.nested-signup-grid {
  gap: 12px;
}

/* 3D roof visualizer */
.visualizer-layout {
  display: grid;
  grid-template-columns: minmax(300px, 390px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.visualizer-control-panel,
.visualizer-preview-panel {
  background: rgba(255,255,255,0.98);
  border-radius: 20px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.10);
}

.visualizer-control-panel {
  padding: 22px;
}

.visualizer-control-panel h2 {
  margin-bottom: 18px;
  font-size: 20px;
}

.visualizer-form {
  display: grid;
  gap: 15px;
}

.visualizer-form label {
  display: grid;
  gap: 7px;
  color: #374151;
  font-size: 13px;
  font-weight: 800;
}

.visualizer-form input[type="text"],
.visualizer-form select {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid #cfd6df;
  border-radius: 11px;
  background: #fff;
  font-size: 14px;
}

.visualizer-form input[type="range"] {
  width: 100%;
  accent-color: #c51f26;
}

.visualizer-two-column {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.color-fieldset {
  padding: 13px;
  border: 1px solid #d7dde5;
  border-radius: 13px;
}

.color-fieldset legend {
  padding: 0 7px;
  color: #374151;
  font-size: 13px;
  font-weight: 800;
}

.color-swatch-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.color-swatch-button {
  min-width: 0;
  padding: 8px;
  border: 2px solid transparent;
  border-radius: 11px;
  background: #f4f6f8;
  cursor: pointer;
  text-align: center;
}

.color-swatch-button span {
  display: block;
  height: 30px;
  border-radius: 7px;
  background: var(--swatch-color);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.16);
}

.color-swatch-button small {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #303844;
  font-size: 10px;
}

.color-swatch-button.active {
  border-color: #c51f26;
  background: #fff;
}

.selected-color-copy {
  margin-top: 10px;
  color: #555e69;
  font-size: 12px;
}

.visualizer-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.visualizer-preview-panel {
  overflow: hidden;
}

.visualizer-stage {
  position: relative;
  min-height: 570px;
  overflow: hidden;
  display: grid;
  place-items: center;
  perspective: 1100px;
  background: linear-gradient(#9ec9ed 0 58%, #b7c99d 58% 100%);
  transition: background 0.25s ease, filter 0.25s ease;
}

.visualizer-stage.overcast {
  background: linear-gradient(#bac3cc 0 58%, #aeb9a0 58% 100%);
  filter: saturate(0.82);
}

.visualizer-stage.warm {
  background: linear-gradient(#e5b785 0 58%, #b6bd8a 58% 100%);
  filter: sepia(0.12) saturate(1.08);
}

.visualizer-horizon {
  position: absolute;
  left: 0;
  right: 0;
  top: 58%;
  height: 2px;
  background: rgba(255,255,255,0.35);
}

.roof-model {
  --roof-color: #5C6670;
  position: relative;
  width: 360px;
  height: 300px;
  transform-style: preserve-3d;
  transform: rotateX(18deg) rotateY(-28deg) scale(1);
  transition: transform 0.12s linear;
}

.house-box,
.roof-shape {
  position: absolute;
  left: 50%;
  top: 50%;
  transform-style: preserve-3d;
}

.house-box {
  width: 230px;
  height: 145px;
  transform: translate3d(-50%, -18%, 0);
}

.house-face {
  position: absolute;
  background: #eee8dd;
  border: 1px solid rgba(62, 51, 40, 0.22);
}

.house-front {
  width: 230px;
  height: 145px;
  transform: translateZ(72px);
}

.house-side {
  width: 145px;
  height: 145px;
  right: -72px;
  transform: rotateY(90deg);
  background: #ddd5c8;
}

.house-base {
  width: 230px;
  height: 145px;
  transform: rotateX(90deg) translateZ(-72px);
}

.house-window,
.house-door {
  position: absolute;
  bottom: 28px;
  border: 4px solid #f7f5ef;
  background: #7da4bb;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.16);
}

.house-window {
  left: 35px;
  width: 52px;
  height: 48px;
}

.house-door {
  right: 45px;
  width: 42px;
  height: 76px;
  background: #8a654d;
}

.roof-shape {
  width: 270px;
  height: 150px;
  transform: translate3d(-50%, -60%, 0);
}

.roof-plane {
  position: absolute;
  top: 25px;
  width: 215px;
  height: 150px;
  background-color: var(--roof-color);
  background-image: repeating-linear-gradient(90deg, rgba(255,255,255,0.16) 0 3px, rgba(0,0,0,0.08) 3px 6px, transparent 6px 18px);
  border: 1px solid rgba(0,0,0,0.26);
  transform-origin: center top;
  box-shadow: 0 10px 22px rgba(0,0,0,0.18);
}

.roof-plane-left {
  left: -5px;
  transform: rotateZ(-34deg) rotateY(-5deg) translateZ(35px);
}

.roof-plane-right {
  right: -5px;
  transform: rotateZ(34deg) rotateY(5deg) translateZ(35px);
}

.roof-gable-end {
  position: absolute;
  left: 50%;
  top: 17px;
  width: 0;
  height: 0;
  border-left: 112px solid transparent;
  border-right: 112px solid transparent;
  border-bottom: 78px solid #e7e0d4;
  transform: translateX(-50%) translateZ(73px);
}

.roof-model.profile-corrugated .roof-plane {
  background-image: repeating-linear-gradient(90deg, rgba(255,255,255,0.22) 0 2px, rgba(0,0,0,0.10) 2px 5px, transparent 5px 12px);
}

.roof-model.profile-tile-span .roof-plane {
  background-image: repeating-linear-gradient(0deg, rgba(255,255,255,0.16) 0 2px, transparent 2px 18px), repeating-linear-gradient(90deg, rgba(0,0,0,0.08) 0 2px, transparent 2px 34px);
}

.roof-model.profile-standing-seam .roof-plane {
  background-image: repeating-linear-gradient(90deg, rgba(255,255,255,0.22) 0 3px, transparent 3px 28px);
}

.roof-model.roof-shed .roof-plane-right,
.roof-model.roof-shed .roof-gable-end {
  display: none;
}

.roof-model.roof-shed .roof-plane-left {
  left: 28px;
  width: 255px;
  transform: rotateZ(-13deg) translateZ(45px);
}

.roof-model.roof-hip .roof-gable-end {
  border-left-width: 75px;
  border-right-width: 75px;
  border-bottom-color: var(--roof-color);
}

.visualizer-caption {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 18px;
  padding: 13px 15px;
  border-radius: 13px;
  background: rgba(17, 24, 39, 0.76);
  color: #fff;
  backdrop-filter: blur(8px);
}

.visualizer-caption strong,
.visualizer-caption span {
  display: block;
}

.visualizer-caption span {
  margin-top: 4px;
  color: #dbe2ea;
  font-size: 12px;
}

.visualizer-disclaimer {
  padding: 15px 18px;
  color: #515a66;
  font-size: 12px;
  line-height: 1.5;
}

.saved-visualizer-section {
  margin-top: 24px;
}

.saved-visualizer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.saved-visualizer-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 15px;
  border: 1px solid #dde2e8;
  border-radius: 14px;
  background: #fff;
}

.saved-color-chip {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 11px;
  background: var(--saved-color);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.16);
}

.saved-visualizer-card h3 {
  margin-bottom: 4px;
  font-size: 15px;
}

.saved-visualizer-card p,
.saved-visualizer-card small {
  color: #69727e;
  font-size: 11px;
  line-height: 1.45;
}

@media (max-width: 1100px) {
  .portal-layout {
    grid-template-columns: 230px minmax(0, 1fr);
  }
  .visualizer-layout {
    grid-template-columns: 1fr;
  }
  .visualizer-control-panel {
    order: 2;
  }
  .visualizer-preview-panel {
    order: 1;
  }
}

@media (max-width: 820px) {
  .portal-layout {
    display: block;
    padding-top: 64px;
  }
  .portal-mobile-bar {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 80;
    height: 64px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: #111827;
    color: #fff;
    box-shadow: 0 5px 16px rgba(0,0,0,0.18);
  }
  .portal-menu-button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 10px;
    border: 0;
    border-radius: 9px;
    background: rgba(255,255,255,0.08);
    color: #fff;
    font-weight: 800;
  }
  .portal-mobile-title {
    font-size: 14px;
    font-weight: 800;
  }
  .portal-mobile-avatar {
    width: 36px;
    height: 36px;
  }
  .portal-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: min(88vw, 300px);
    height: 100vh;
    transform: translateX(-105%);
    transition: transform 0.22s ease;
  }
  .portal-sidebar.is-open {
    transform: translateX(0);
  }
  .portal-mobile-close {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 9px;
    background: rgba(255,255,255,0.08);
    color: #fff;
  }
  .portal-sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 85;
    display: block;
    visibility: hidden;
    opacity: 0;
    background: rgba(15, 23, 42, 0.58);
    transition: opacity 0.22s ease, visibility 0.22s ease;
  }
  .portal-sidebar-backdrop.is-open {
    visibility: visible;
    opacity: 1;
  }
  body.portal-menu-open {
    overflow: hidden;
  }
  .roof-dashboard-content {
    padding: 22px 16px 40px;
  }
  .portal-page-heading {
    display: grid;
  }
  .security-chip {
    width: fit-content;
    white-space: normal;
  }
  .document-upload-grid,
  .conditional-document-grid,
  .saved-visualizer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .signup-grid,
  .nested-signup-grid,
  .visualizer-two-column,
  .visualizer-actions {
    grid-template-columns: 1fr !important;
  }
  .signup-panel-wide {
    max-height: none;
  }
  .visualizer-stage {
    min-height: 430px;
  }
  .roof-model {
    width: 300px;
    transform-origin: center;
  }
  .color-swatch-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.dashboard-primary-actions,
.catalogue-card-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.dashboard-primary-actions .roof-post-btn,
.dashboard-primary-actions .admin-btn-neutral,
.catalogue-card-actions .roof-select-btn,
.catalogue-card-actions .admin-btn-neutral {
  width: auto;
  margin: 0;
}

.catalogue-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 14px;
}

.catalogue-card-actions .roof-select-btn,
.catalogue-card-actions .admin-btn-neutral {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.catalogue-heading {
  align-items: center;
}

.portal-search-form {
  min-width: min(100%, 300px);
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 13px;
  border: 1px solid #d5dce4;
  border-radius: 12px;
  background: #fff;
}

.portal-search-form span {
  color: #697480;
}

.portal-search-form .app-icon {
  width: 18px;
  height: 18px;
}

.portal-search-form input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 14px;
}

@media (max-width: 600px) {
  .dashboard-primary-actions,
  .catalogue-card-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }
  .dashboard-primary-actions .roof-post-btn,
  .dashboard-primary-actions .admin-btn-neutral,
  .catalogue-card-actions .roof-select-btn,
  .catalogue-card-actions .admin-btn-neutral,
  .portal-search-form {
    width: 100%;
  }
}

/* ================= FINAL SUPPLIER INVENTORY & QUOTATION WORKFLOW ================= */
.inventory-editor-card {
  margin-bottom: 24px;
}

.inventory-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.inventory-form label,
.quotation-detail-form label {
  display: grid;
  gap: 7px;
  color: #374151;
  font-weight: 700;
  font-size: 13px;
}

.inventory-form input,
.inventory-form select,
.inventory-form textarea,
.quotation-detail-form input,
.quotation-detail-form select,
.quotation-detail-form textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #d7dde5;
  border-radius: 10px;
  background: #fff;
  padding: 11px 12px;
  color: #111827;
  font: inherit;
}

.inventory-form input:focus,
.inventory-form select:focus,
.inventory-form textarea:focus,
.quotation-detail-form input:focus,
.quotation-detail-form select:focus,
.quotation-detail-form textarea:focus {
  outline: 2px solid rgba(180, 34, 47, 0.18);
  border-color: #b4222f;
}

.inventory-wide-field {
  grid-column: 1 / -1;
}

.inventory-form-actions {
  display: flex;
  justify-content: flex-end;
}

.inventory-form-actions .roof-post-btn {
  width: auto;
  min-width: 180px;
  margin: 0;
}

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

.inventory-card {
  overflow: hidden;
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  border: 1px solid #e0e5eb;
  border-radius: 14px;
  background: #fff;
}

.inventory-card > img {
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: cover;
}

.inventory-card-body {
  padding: 18px;
}

.inventory-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.inventory-title-row h3 {
  margin: 0;
}

.inventory-card-body > p {
  margin: 7px 0 14px;
  color: #6b7280;
}

.inventory-card-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}

.inventory-card-actions form {
  margin: 0;
}

.inventory-card-actions .admin-btn-neutral,
.inventory-card-actions .admin-btn-danger {
  min-width: 95px;
  margin: 0;
  text-align: center;
}

.admin-btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 14px;
  border: 0;
  border-radius: 10px;
  background: #8f1d2c;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.matching-request-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.quotation-detail-form {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #e5e7eb;
}

.quotation-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.quotation-detail-form small {
  color: #6b7280;
  font-weight: 500;
}

.quotation-total-note {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f7f8fa;
  color: #4b5563;
  font-size: 13px;
}

.client-bid-price-wrap {
  display: grid;
  gap: 4px;
}

.client-bid-price-wrap small {
  display: block;
  color: #6b7280;
  line-height: 1.35;
}

@media (max-width: 1180px) {
  .inventory-grid,
  .matching-request-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .inventory-form,
  .quotation-field-grid {
    grid-template-columns: 1fr;
  }

  .inventory-wide-field {
    grid-column: 1;
  }

  .inventory-card {
    grid-template-columns: 1fr;
  }

  .inventory-card > img {
    min-height: 220px;
    max-height: 260px;
  }

  .inventory-card-actions,
  .inventory-form-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .inventory-card-actions .admin-btn-neutral,
  .inventory-card-actions .admin-btn-danger,
  .inventory-form-actions .roof-post-btn {
    width: 100%;
  }
}

/* Verification resubmission */
.verification-resubmit-card {
  margin-bottom: 24px;
}

.verification-current-files {
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
}

.verification-current-files > strong {
  display: block;
  margin-bottom: 10px;
}

.verification-resubmit-card input[type="file"] {
  width: 100%;
}

/* Client/Supplier portal navigation: text-only controls (no emoji or embedded icons). */
.portal-menu-link {
    grid-template-columns: minmax(0, 1fr) auto;
}

.portal-menu-icon {
    display: none !important;
}

.portal-mobile-close,
.portal-menu-button,
.portal-logout {
    white-space: nowrap;
}

.portal-mobile-close,
.portal-logout {
    width: auto;
    min-width: 0;
    padding-left: 10px;
    padding-right: 10px;
    font-size: 0.82rem;
    font-weight: 700;
}

.portal-security-note {
    grid-template-columns: 1fr;
}

/* =========================================================
   CLIENT / SUPPLIER TOP NAVIGATION
   Admin keeps its own sidebar layout.
   ========================================================= */
.portal-layout {
  min-height: 100vh;
  display: flex !important;
  flex-direction: column;
  background: rgba(241, 245, 249, 0.78);
}

.portal-main {
  width: 100%;
  min-width: 0;
  min-height: calc(100vh - 76px);
}

.portal-topbar {
  position: sticky;
  top: 0;
  z-index: 120;
  width: 100%;
  background: rgba(255, 255, 255, 0.97);
  border-top: 4px solid #c51f26;
  border-bottom: 1px solid #e5e7eb;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.10);
  backdrop-filter: blur(12px);
}

.portal-topbar-inner {
  min-height: 72px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 24px;
  padding: 10px 28px;
}

.portal-top-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: max-content;
  color: #111827;
  text-decoration: none;
}

.portal-top-brand-logo {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #e5e7eb;
}

.portal-top-brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portal-top-brand-copy strong,
.portal-top-user-copy strong {
  display: block;
  line-height: 1.2;
}

.portal-top-brand-copy strong {
  font-size: 17px;
  font-weight: 900;
}

.portal-top-brand-copy small {
  display: block;
  margin-top: 3px;
  color: #6b7280;
  font-size: 11px;
  font-weight: 700;
}

.portal-nav-panel {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.portal-top-menu {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: 1;
}

.portal-top-menu-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 9px 12px;
  border-radius: 10px;
  color: #374151;
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  transition: background 0.18s ease, color 0.18s ease;
}

.portal-top-menu-link:hover {
  background: #f3f4f6;
  color: #b51218;
}

.portal-top-menu-link.active {
  background: #fcebec;
  color: #b51218;
}

.portal-top-menu-link.active::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 3px;
  height: 2px;
  border-radius: 999px;
  background: #c51f26;
}

.portal-top-menu-badge {
  min-width: 21px;
  height: 21px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #c51f26;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
}

.portal-top-account {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 16px;
  border-left: 1px solid #e5e7eb;
}

.portal-top-user {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  color: #111827;
  text-decoration: none;
}

.portal-top-avatar {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #c51f26;
  color: #fff;
  font-weight: 900;
}

.portal-top-user-copy {
  max-width: 145px;
  min-width: 0;
}

.portal-top-user-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 900;
}

.portal-top-user-copy small {
  display: block;
  margin-top: 2px;
  color: #6b7280;
  font-size: 10px;
  font-weight: 700;
}

.portal-top-logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 11px;
  border-radius: 9px;
  color: #b51218;
  background: #fff;
  border: 1px solid #efc9cb;
  text-decoration: none;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.portal-top-logout:hover {
  background: #fcebec;
}

.portal-nav-toggle {
  display: none;
  min-height: 40px;
  padding: 8px 13px;
  border: 1px solid #d1d5db;
  border-radius: 9px;
  background: #fff;
  color: #111827;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

@media (max-width: 1220px) {
  .portal-topbar-inner {
    gap: 14px;
    padding-left: 18px;
    padding-right: 18px;
  }

  .portal-top-menu-link {
    padding-left: 8px;
    padding-right: 8px;
    font-size: 12px;
  }

  .portal-top-user-copy {
    display: none;
  }

  .portal-top-account {
    padding-left: 10px;
  }
}

@media (max-width: 1100px) {
  .portal-layout {
    display: flex !important;
    padding-top: 0 !important;
  }

  .portal-topbar-inner {
    position: relative;
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 68px;
    padding: 9px 16px;
  }

  .portal-nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .portal-nav-panel {
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    display: none;
    padding: 12px 16px 16px;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 14px 24px rgba(15, 23, 42, 0.12);
  }

  .portal-nav-panel.is-open {
    display: grid;
    gap: 12px;
  }

  .portal-top-menu {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .portal-top-menu-link {
    justify-content: flex-start;
    width: 100%;
    padding: 10px 11px;
    border: 1px solid #eceff3;
  }

  .portal-top-menu-link.active::after {
    display: none;
  }

  .portal-top-account {
    justify-content: space-between;
    padding: 11px 0 0;
    border-left: 0;
    border-top: 1px solid #e5e7eb;
  }

  .portal-top-user-copy {
    display: block;
    max-width: 210px;
  }

  .roof-dashboard-content {
    padding-top: 22px;
  }
}

@media (max-width: 560px) {
  .portal-top-brand-copy small {
    display: none;
  }

  .portal-top-brand-logo {
    width: 40px;
    height: 40px;
  }

  .portal-top-menu {
    grid-template-columns: 1fr;
  }

  .portal-top-account {
    align-items: center;
  }

  .portal-top-user-copy {
    max-width: 170px;
  }
}

/* =========================================================
   FINAL WEBGL 3D ROOF VISUALIZER
   ========================================================= */
.visualizer-layout-3d {
  grid-template-columns: minmax(330px, 410px) minmax(0, 1fr);
}

.visualizer-helper {
  margin: -8px 0 18px;
  color: #69737f;
  font-size: 12px;
  line-height: 1.55;
}

.catalogue-reference-box {
  min-height: 96px;
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 1px solid #dce2e9;
  border-radius: 13px;
  background: #f7f9fb;
  color: #7a838e;
  font-size: 12px;
  text-align: center;
}

.catalogue-reference-box img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
}

.catalogue-reference-box div {
  padding: 18px;
}

.visualizer-view-presets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.visualizer-view-presets .admin-btn-neutral {
  width: 100%;
  margin: 0;
  cursor: pointer;
}

.visualizer-preview-panel-3d {
  min-width: 0;
}

.visualizer-stage-3d {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background: #e8edf0;
}

#roof3dCanvas {
  width: 100%;
  height: 620px;
  display: block;
  cursor: grab;
  touch-action: none;
  user-select: none;
  outline: none;
}

#roof3dCanvas.is-dragging {
  cursor: grabbing;
}

.visualizer-3d-help {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100% - 32px);
  padding: 8px 12px;
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 999px;
  background: rgba(17,24,39,.70);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  backdrop-filter: blur(8px);
  pointer-events: none;
}

.visualizer-caption-3d {
  pointer-events: none;
}

.saved-roof-miniature {
  position: relative;
  width: 58px;
  height: 48px;
  flex: 0 0 58px;
  perspective: 100px;
}

.saved-roof-miniature::after {
  content: '';
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 2px;
  height: 24px;
  border: 1px solid #c8c2b8;
  border-radius: 2px;
  background: #e7e0d5;
}

.saved-roof-miniature span {
  position: absolute;
  z-index: 2;
  top: 8px;
  width: 34px;
  height: 25px;
  border: 1px solid rgba(0,0,0,.18);
  background: var(--saved-color);
}

.saved-roof-miniature span:first-child {
  left: 4px;
  transform: skewY(-24deg) rotate(-10deg);
}

.saved-roof-miniature span:last-child {
  right: 4px;
  transform: skewY(24deg) rotate(10deg);
  filter: brightness(.86);
}

@media (max-width: 1100px) {
  .visualizer-layout-3d { grid-template-columns: 1fr; }
  .visualizer-preview-panel-3d { order: 1; }
  .visualizer-control-panel { order: 2; }
}

@media (max-width: 700px) {
  .visualizer-stage-3d { min-height: 440px; }
  #roof3dCanvas { height: 440px; }
  .visualizer-3d-help {
    top: 10px;
    width: calc(100% - 24px);
    max-width: none;
    border-radius: 10px;
    white-space: normal;
    text-align: center;
  }
  .visualizer-view-presets { grid-template-columns: 1fr; }
}


.visualizer-webgl-unavailable {
  min-height: 360px;
  display: grid;
  place-content: center;
  gap: 8px;
  padding: 32px;
  text-align: center;
  color: #374151;
  background: #eef1f3;
}
.visualizer-webgl-unavailable strong { font-size: 1.05rem; }
.visualizer-webgl-unavailable span { color: #667085; max-width: 520px; }

/* =========================================================
   BIDSMART PUBLISH-READY NEOMORPHIC DESIGN SYSTEM — 2026
   Hybrid neomorphism: tactile depth + strong contrast/accessibility.
   ========================================================= */
:root {
  --neo-bg: #e9edf3;
  --neo-bg-2: #eef2f7;
  --neo-surface: #e9edf3;
  --neo-surface-strong: #f0f3f8;
  --neo-text: #1f2937;
  --neo-muted: #667085;
  --neo-border: rgba(255,255,255,.72);
  --neo-red: #b4232d;
  --neo-red-dark: #8f1720;
  --neo-red-soft: #f7dde0;
  --neo-green: #18794e;
  --neo-amber: #9a6700;
  --neo-shadow-raised: 10px 10px 24px rgba(166,174,186,.46), -10px -10px 24px rgba(255,255,255,.92);
  --neo-shadow-raised-sm: 5px 5px 12px rgba(166,174,186,.42), -5px -5px 12px rgba(255,255,255,.90);
  --neo-shadow-inset: inset 4px 4px 9px rgba(166,174,186,.34), inset -4px -4px 9px rgba(255,255,255,.84);
  --neo-shadow-pressed: inset 3px 3px 7px rgba(149,157,170,.34), inset -3px -3px 7px rgba(255,255,255,.78);
  --neo-radius: 22px;
  --neo-radius-sm: 14px;
  --neo-focus: 0 0 0 3px rgba(180,35,45,.18), 0 0 0 1px rgba(180,35,45,.60);
}

html { scroll-behavior: smooth; }

body,
button,
input,
select,
textarea {
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

body { color: var(--neo-text); }

a { text-underline-offset: 3px; }

button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none !important;
  box-shadow: var(--neo-focus) !important;
}

/* ---------- Authentication ---------- */
.auth-page {
  min-height: 100vh;
  background: var(--neo-bg);
}

.auth-wrapper {
  min-height: 100vh;
  background: var(--neo-bg);
}

.auth-left {
  position: relative;
  isolation: isolate;
  background:
    linear-gradient(135deg, rgba(23,31,43,.52), rgba(180,35,45,.28)),
    url('background.png') center/cover no-repeat;
  padding: clamp(34px, 5vw, 72px);
}

.auth-left::after {
  content: "";
  position: absolute;
  inset: 22px;
  z-index: -1;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 34px;
  box-shadow: inset 0 0 0 1px rgba(17,24,39,.08);
  pointer-events: none;
}

.brand-title {
  margin-bottom: 12px;
  color: #fff;
  font-size: clamp(46px, 6vw, 76px);
  letter-spacing: -.045em;
  text-shadow: 0 8px 28px rgba(0,0,0,.22);
}

.tagline {
  color: rgba(255,255,255,.95);
  text-shadow: 0 3px 12px rgba(0,0,0,.22);
}

.feature-grid { gap: 16px; }

.feature-card {
  min-height: 132px;
  padding: 22px;
  border: 1px solid rgba(255,255,255,.34);
  border-radius: 22px;
  background: rgba(240,244,249,.83);
  box-shadow: 8px 8px 22px rgba(24,31,42,.23), -6px -6px 18px rgba(255,255,255,.12);
  backdrop-filter: blur(14px);
}

.feature-card h3 { color: #8f1720; font-size: 15px; }
.feature-card p { color: #46515f; font-size: 13px; line-height: 1.55; }
.feature-icon { width: 34px; height: 34px; display: grid; place-items: center; margin-bottom: 12px; }
.feature-icon .app-icon { width: 26px; height: 26px; }

.auth-right {
  background: var(--neo-bg);
  padding: clamp(22px, 4vw, 52px);
}

.auth-panel {
  width: min(100%, 500px);
  border: 1px solid var(--neo-border);
  border-radius: 30px;
  background: var(--neo-surface);
  box-shadow: var(--neo-shadow-raised);
  padding: clamp(28px, 4vw, 42px);
}

.signup-panel { width: min(100%, 760px); max-width: 760px; }
.auth-panel h2 { color: var(--neo-text); letter-spacing: -.025em; }

.auth-panel input,
.auth-panel select,
.auth-panel textarea,
.dashboard-form input,
.dashboard-form textarea,
.dashboard-form select,
.manufacturer-bid-form input,
.manufacturer-bid-form textarea,
.profile-grid-form input,
.profile-grid-form select,
.profile-grid-form textarea,
.design-quantity-form input,
.design-quantity-form select,
.design-quantity-form textarea,
.admin-form-grid input,
.admin-form-grid select,
.admin-form-grid textarea,
.inventory-form input,
.inventory-form select,
.inventory-form textarea,
.quotation-detail-form input,
.quotation-detail-form select,
.quotation-detail-form textarea,
.manufacturer-requirements-box input[type="file"],
.verification-resubmit-card input[type="file"] {
  min-height: 48px;
  padding: 13px 15px;
  border: 1px solid rgba(255,255,255,.76);
  border-radius: 14px;
  background: var(--neo-bg);
  color: var(--neo-text);
  box-shadow: var(--neo-shadow-inset);
  transition: box-shadow .18s ease, border-color .18s ease, transform .18s ease;
}

textarea { line-height: 1.55; }
input::placeholder, textarea::placeholder { color: #8a94a3; }

.role-toggle {
  padding: 7px;
  background: var(--neo-bg);
  border: 1px solid rgba(255,255,255,.72);
  box-shadow: var(--neo-shadow-inset);
}

.role-toggle-btn {
  min-height: 42px;
  color: #475467;
}

.role-toggle-btn:hover { background: rgba(255,255,255,.26); transform: none; }
.role-toggle-btn.active {
  background: var(--neo-bg);
  color: var(--neo-red);
  box-shadow: var(--neo-shadow-raised-sm);
}

.main-btn {
  min-height: 48px;
  border: 1px solid rgba(255,255,255,.78);
  background: var(--neo-bg);
  color: var(--neo-red);
  box-shadow: var(--neo-shadow-raised-sm);
}
.main-btn:hover { transform: translateY(-1px); background: var(--neo-bg-2); box-shadow: 7px 7px 16px rgba(166,174,186,.42), -7px -7px 16px rgba(255,255,255,.92); }
.main-btn:active { transform: translateY(0); box-shadow: var(--neo-shadow-pressed); }

.toggle-password {
  width: 36px;
  height: 36px;
  right: 8px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: #667085;
}
.toggle-password .app-icon { width: 18px; height: 18px; }

.signup-section-title {
  color: var(--neo-red-dark);
  border-bottom-color: rgba(180,35,45,.15) !important;
}

.signup-requirements-box,
.manufacturer-requirements-box {
  border: 1px solid var(--neo-border) !important;
  border-radius: 18px !important;
  background: var(--neo-bg) !important;
  box-shadow: var(--neo-shadow-inset);
}

/* ---------- Client / Supplier portal shell ---------- */
.roof-dashboard-body,
.portal-layout {
  background: var(--neo-bg) !important;
  background-image: none !important;
}

.roof-dashboard-overlay { display: none; }
.portal-main { min-height: calc(100vh - 88px); }

.portal-topbar {
  top: 0;
  padding: 12px 16px 0;
  border: 0;
  background: var(--neo-bg);
  box-shadow: none;
  backdrop-filter: none;
}

.portal-topbar-inner {
  max-width: 1540px;
  min-height: 70px;
  margin: 0 auto;
  padding: 10px 16px;
  border: 1px solid var(--neo-border);
  border-radius: 20px;
  background: var(--neo-bg);
  box-shadow: var(--neo-shadow-raised-sm);
}

.portal-top-brand-logo {
  border: 1px solid var(--neo-border);
  border-radius: 13px;
  background: var(--neo-bg);
  box-shadow: var(--neo-shadow-raised-sm);
}
.portal-top-brand-copy strong { color: #222b38; }
.portal-top-brand-copy small { color: var(--neo-muted); }

.portal-top-menu { gap: 7px; }
.portal-top-menu-link {
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: #475467;
}
.portal-top-menu-link:hover {
  color: var(--neo-red);
  background: var(--neo-bg);
  border-color: rgba(255,255,255,.55);
  box-shadow: var(--neo-shadow-raised-sm);
}
.portal-top-menu-link.active {
  color: var(--neo-red-dark);
  background: var(--neo-bg);
  border-color: rgba(255,255,255,.60);
  box-shadow: var(--neo-shadow-pressed);
}
.portal-top-menu-link.active::after { display: none; }
.portal-top-menu-badge {
  background: var(--neo-red);
  box-shadow: 2px 2px 6px rgba(143,23,32,.22), -2px -2px 6px rgba(255,255,255,.65);
}

.portal-top-account { border-left-color: rgba(148,163,184,.24); }
.portal-top-avatar {
  color: #fff;
  background: var(--neo-red);
  border: 2px solid rgba(255,255,255,.72);
  box-shadow: var(--neo-shadow-raised-sm);
}

.portal-top-logout,
.portal-nav-toggle {
  border: 1px solid var(--neo-border);
  background: var(--neo-bg);
  color: var(--neo-red-dark);
  box-shadow: var(--neo-shadow-raised-sm);
}
.portal-top-logout:hover,
.portal-nav-toggle:hover { background: var(--neo-bg-2); color: var(--neo-red); }
.portal-top-logout:active,
.portal-nav-toggle:active { box-shadow: var(--neo-shadow-pressed); }

.roof-dashboard-content {
  width: min(100%, 1540px);
  margin: 0 auto;
  padding: 38px clamp(18px, 3vw, 42px) 64px;
}

.portal-page-heading {
  gap: 24px;
  margin-bottom: 30px;
  padding: 4px 2px;
}
.portal-page-heading .roof-page-title,
.roof-page-title {
  margin: 0 0 8px;
  color: #202936;
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.12;
  letter-spacing: -.035em;
}
.portal-page-heading p { color: var(--neo-muted); line-height: 1.6; }
.roof-subtitle { color: #27313f; letter-spacing: -.02em; }
.dashboard-section-header .roof-subtitle { margin: 0; }

/* ---------- Raised cards / sections ---------- */
.card,
.dashboard-section-card,
.admin-section-card,
.client-bids-table-card,
.request-summary-card,
.bid-status-list-card,
.profile-summary-card,
.profile-details-under-card,
.edit-profile-single-card,
.verification-resubmit-card,
.visualizer-control-panel,
.visualizer-preview-panel,
.inventory-editor-card {
  border: 1px solid var(--neo-border) !important;
  border-radius: var(--neo-radius) !important;
  background: var(--neo-surface) !important;
  box-shadow: var(--neo-shadow-raised) !important;
}

.dashboard-section-card,
.admin-section-card,
.client-bids-table-card,
.request-summary-card,
.bid-status-list-card { padding: clamp(20px, 3vw, 30px); }

.roof-card-grid { gap: 22px; }
.roof-design-card,
.client-overview-stat-card,
.overview-action-card,
.saved-visualizer-card,
.inventory-card,
.notification-card,
.profile-view-item {
  border: 1px solid var(--neo-border) !important;
  background: var(--neo-surface) !important;
  box-shadow: var(--neo-shadow-raised-sm) !important;
}

.roof-design-card {
  border-radius: 20px;
  overflow: hidden;
}
.roof-design-card:hover {
  transform: translateY(-2px);
  box-shadow: 8px 8px 18px rgba(166,174,186,.48), -8px -8px 18px rgba(255,255,255,.93) !important;
}
.roof-design-image {
  height: 205px;
  margin: 10px 10px 0;
  width: calc(100% - 20px);
  border-radius: 15px;
  background: #dbe1e9;
  box-shadow: var(--neo-shadow-inset);
}
.roof-design-image img { border-radius: 15px; }
.roof-design-body { padding: 20px; }
.roof-design-body h3 { color: #27313f; letter-spacing: -.015em; }
.roof-design-desc,
.overview-feature-desc { color: var(--neo-muted); }

.overview-stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 30px;
}
.overview-stats-grid .roof-design-card,
.client-overview-stat-card { min-height: 128px; }
.overview-stats-grid .roof-design-card .roof-design-body { height: 100%; display: flex; flex-direction: column; justify-content: space-between; }
.overview-stats-grid h3 { color: #667085; font-size: 13px; font-weight: 800; }
.admin-stat-number { color: var(--neo-red) !important; font-size: clamp(28px, 3vw, 38px) !important; letter-spacing: -.04em; }

/* ---------- Buttons ---------- */
.roof-select-btn,
.profile-secondary-btn,
.admin-btn-neutral,
.view-post-link,
.client-bids-back-btn,
.manufacturer-bid-back-btn,
.overview-view-link,
.profile-primary-btn,
.roof-post-btn,
.admin-btn-red,
.client-approve-btn,
.admin-btn-danger {
  border-radius: 13px !important;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
}

.roof-select-btn,
.profile-secondary-btn,
.admin-btn-neutral,
.view-post-link,
.client-bids-back-btn,
.manufacturer-bid-back-btn,
.overview-view-link {
  border: 1px solid var(--neo-border) !important;
  background: var(--neo-bg) !important;
  color: #394456 !important;
  box-shadow: var(--neo-shadow-raised-sm) !important;
}

.roof-select-btn:hover,
.profile-secondary-btn:hover,
.admin-btn-neutral:hover,
.view-post-link:hover,
.client-bids-back-btn:hover,
.manufacturer-bid-back-btn:hover,
.overview-view-link:hover {
  color: var(--neo-red) !important;
  transform: translateY(-1px);
}

.roof-select-btn:active,
.profile-secondary-btn:active,
.admin-btn-neutral:active,
.view-post-link:active,
.client-bids-back-btn:active,
.manufacturer-bid-back-btn:active,
.overview-view-link:active { transform: none; box-shadow: var(--neo-shadow-pressed) !important; }

.roof-post-btn,
.profile-primary-btn,
.admin-btn-red,
.client-approve-btn {
  border: 1px solid rgba(117,15,23,.18) !important;
  background: var(--neo-red) !important;
  color: #fff !important;
  box-shadow: 6px 6px 14px rgba(143,23,32,.22), -5px -5px 12px rgba(255,255,255,.78) !important;
}
.roof-post-btn:hover,
.profile-primary-btn:hover,
.admin-btn-red:hover,
.client-approve-btn:hover {
  background: var(--neo-red-dark) !important;
  color: #fff !important;
  transform: translateY(-1px);
}
.roof-post-btn:active,
.profile-primary-btn:active,
.admin-btn-red:active,
.client-approve-btn:active { transform: none; box-shadow: inset 3px 3px 8px rgba(77,6,12,.32), inset -2px -2px 6px rgba(255,255,255,.14) !important; }

.admin-btn-danger,
.roof-remove-btn {
  background: #a61f2b !important;
  color: #fff !important;
  box-shadow: 5px 5px 12px rgba(122,27,35,.22), -5px -5px 12px rgba(255,255,255,.76) !important;
}

button:disabled,
.roof-post-btn:disabled,
.roof-post-btn[disabled] {
  opacity: .55;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: var(--neo-shadow-inset) !important;
}

/* ---------- Forms, filters, search ---------- */
.portal-search-form,
.admin-filter-bar input:not([type="hidden"]),
.admin-filter-bar select {
  border: 1px solid var(--neo-border) !important;
  background: var(--neo-bg) !important;
  box-shadow: var(--neo-shadow-inset) !important;
}

.portal-search-form { border-radius: 14px; }
.portal-search-form input { color: var(--neo-text); }

.spec-checkbox-grid,
.document-upload-grid,
.conditional-document-grid { gap: 14px; }
.spec-check-item {
  border: 1px solid var(--neo-border) !important;
  background: var(--neo-bg) !important;
  box-shadow: var(--neo-shadow-raised-sm);
}
.spec-check-item:has(input:checked) { box-shadow: var(--neo-shadow-pressed); color: var(--neo-red-dark); }

/* ---------- Tables ---------- */
.table-wrap {
  margin-top: 14px;
  border: 1px solid var(--neo-border);
  border-radius: 18px;
  background: var(--neo-bg);
  box-shadow: var(--neo-shadow-inset);
  padding: 10px;
}

table {
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 14px;
  background: transparent;
  overflow: hidden;
}
table th {
  background: rgba(255,255,255,.34);
  color: #475467;
  font-size: 11px;
  letter-spacing: .035em;
  text-transform: uppercase;
}
table th,
table td {
  padding: 14px 15px;
  border-bottom: 1px solid rgba(148,163,184,.20);
}
table tbody tr { transition: background .15s ease; }
table tbody tr:hover { background: rgba(255,255,255,.32); }
table tr:last-child td { border-bottom: 0; }

/* ---------- Status / feedback ---------- */
.alert,
.verification-banner,
.empty-design-box,
.quotation-total-note,
.visualizer-disclaimer,
.verification-current-files {
  border: 1px solid var(--neo-border) !important;
  border-radius: 16px !important;
  box-shadow: var(--neo-shadow-inset) !important;
}
.alert.success { background: #e1efe8 !important; color: #165f43; }
.alert.error { background: #f6dfe2 !important; color: #8e1822; }
.empty-design-box { background: var(--neo-bg) !important; color: #667085; text-align: center; padding: 30px; }

.audit-badge,
.client-bid-status,
.profile-bid-status-badge,
.profile-badge,
.bid-status,
.security-chip {
  border: 1px solid rgba(255,255,255,.58);
  box-shadow: 2px 2px 5px rgba(166,174,186,.26), -2px -2px 5px rgba(255,255,255,.70);
}

/* ---------- Profile ---------- */
.profile-photo,
.profile-avatar {
  border: 5px solid var(--neo-bg);
  box-shadow: var(--neo-shadow-raised-sm) !important;
}
.profile-view-item {
  border-radius: 14px !important;
  padding: 14px 16px !important;
}
.profile-view-label { color: #7a8492 !important; }
.profile-view-value { color: #27313f !important; }
.profile-status-line { color: var(--neo-muted); }

/* ---------- Notifications / bid lists ---------- */
.notifications-list,
.bid-status-list { gap: 14px; }
.notification-card,
.bid-status-item {
  border: 1px solid var(--neo-border) !important;
  border-radius: 16px !important;
  background: var(--neo-bg) !important;
  box-shadow: var(--neo-shadow-raised-sm) !important;
}
.notification-card:hover,
.bid-status-item:hover { transform: translateY(-1px); }
.notification-date-separator { color: #667085; }

/* ---------- Supplier inventory ---------- */
.inventory-grid,
.matching-request-grid { gap: 22px; }
.inventory-card {
  border-radius: 20px !important;
  overflow: hidden;
}
.inventory-card > img {
  margin: 10px 0 10px 10px;
  width: calc(100% - 10px);
  min-height: 240px;
  border-radius: 15px;
  box-shadow: var(--neo-shadow-inset);
}
.inventory-card-body { padding: 20px; }
.quotation-detail-form { border-top-color: rgba(148,163,184,.24); }
.quotation-total-note { background: var(--neo-bg) !important; }

/* ---------- WebGL 3D Roof Visualizer ---------- */
.visualizer-layout-3d { gap: 26px; }
.visualizer-control-panel,
.visualizer-preview-panel-3d { min-width: 0; }
.visualizer-control-panel { padding: 24px !important; }
.visualizer-control-panel h2 { color: #27313f; letter-spacing: -.02em; }
.visualizer-helper { color: var(--neo-muted); }

.catalogue-reference-box {
  border: 1px solid var(--neo-border);
  border-radius: 16px;
  background: var(--neo-bg);
  color: var(--neo-muted);
  box-shadow: var(--neo-shadow-inset);
}
.catalogue-reference-box img { border-radius: 14px; }

.visualizer-stage-3d {
  min-height: 620px;
  padding: 12px;
  border: 1px solid var(--neo-border);
  border-radius: 22px;
  background: var(--neo-bg);
  box-shadow: var(--neo-shadow-inset);
}
#roof3dCanvas {
  height: 596px;
  border-radius: 15px;
  background: #dfe5ec;
}
.visualizer-3d-help {
  top: 26px;
  color: #344054;
  background: rgba(233,237,243,.88);
  border: 1px solid rgba(255,255,255,.74);
  box-shadow: var(--neo-shadow-raised-sm);
  backdrop-filter: blur(12px);
}
.visualizer-caption {
  border: 1px solid rgba(255,255,255,.55);
  background: rgba(31,41,55,.78);
  box-shadow: 0 8px 24px rgba(15,23,42,.20);
}
.visualizer-view-presets .admin-btn-neutral { min-height: 42px; }
.color-swatch-grid { gap: 10px; }
.color-swatch {
  border: 3px solid var(--neo-bg) !important;
  box-shadow: var(--neo-shadow-raised-sm) !important;
  transition: transform .16s ease, box-shadow .16s ease;
}
.color-swatch:hover { transform: translateY(-2px); }
.color-swatch.active,
.color-swatch[aria-pressed="true"] { box-shadow: var(--neo-shadow-pressed) !important; outline: 2px solid rgba(180,35,45,.55); outline-offset: 2px; }
.saved-visualizer-card { border-radius: 17px !important; }

/* ---------- Modals ---------- */
.design-modal-overlay { background: rgba(31,41,55,.52); backdrop-filter: blur(5px); }
.design-modal,
.audit-modal-content {
  border: 1px solid var(--neo-border) !important;
  border-radius: 24px !important;
  background: var(--neo-bg) !important;
  box-shadow: 18px 18px 42px rgba(15,23,42,.24), -8px -8px 24px rgba(255,255,255,.34) !important;
}

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .overview-stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1100px) {
  .portal-topbar { padding: 10px 10px 0; }
  .portal-topbar-inner { border-radius: 16px; }
  .portal-nav-panel {
    top: calc(100% + 10px);
    left: 6px;
    right: 6px;
    padding: 14px;
    border: 1px solid var(--neo-border);
    border-radius: 18px;
    background: var(--neo-bg);
    box-shadow: var(--neo-shadow-raised);
  }
  .portal-top-menu-link { border: 1px solid var(--neo-border); box-shadow: var(--neo-shadow-raised-sm); }
  .portal-top-menu-link.active { box-shadow: var(--neo-shadow-pressed); }
  .portal-top-account { border-top-color: rgba(148,163,184,.24); }
}

@media (max-width: 760px) {
  .roof-dashboard-content { padding: 26px 14px 48px; }
  .portal-page-heading { margin-bottom: 24px; }
  .overview-stats-grid { grid-template-columns: 1fr; gap: 14px; }
  .roof-card-grid { grid-template-columns: 1fr; }
  .dashboard-section-card,
  .admin-section-card,
  .client-bids-table-card,
  .request-summary-card,
  .bid-status-list-card { padding: 18px; border-radius: 18px !important; }
  .inventory-card > img { margin: 10px 10px 0; width: calc(100% - 20px); }
  .visualizer-stage-3d { min-height: 450px; padding: 9px; }
  #roof3dCanvas { height: 430px; }
  .visualizer-3d-help { top: 18px; }
}

@media (max-width: 600px) {
  .auth-wrapper { grid-template-columns: 1fr; }
  .auth-left { min-height: auto; padding: 32px 20px; }
  .auth-left::after { inset: 10px; border-radius: 22px; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .feature-card { min-height: 112px; padding: 16px; }
  .auth-right { padding: 28px 14px 40px; }
  .auth-panel { border-radius: 22px; padding: 24px 18px; }
  .signup-grid { grid-template-columns: 1fr !important; }
  .portal-top-brand-copy strong { font-size: 15px; }
  .portal-topbar-inner { padding: 8px 10px; }
  .portal-top-menu { gap: 9px; }
}

@media (max-width: 420px) {
  .feature-grid { grid-template-columns: 1fr; }
  .portal-top-user-copy { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* Final visualizer control refinements */
.visualizer-form input[type="text"],
.visualizer-form select {
  min-height: 46px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--neo-border) !important;
  border-radius: 13px !important;
  background: var(--neo-bg) !important;
  color: var(--neo-text);
  box-shadow: var(--neo-shadow-inset) !important;
}
.visualizer-form label > span,
.color-fieldset legend { color: #475467; }
.visualizer-form input[type="range"] {
  height: 18px;
  accent-color: var(--neo-red);
}
.color-fieldset {
  padding: 15px;
  border: 1px solid var(--neo-border) !important;
  border-radius: 16px !important;
  background: var(--neo-bg);
  box-shadow: var(--neo-shadow-inset);
}
.color-swatch-button {
  padding: 8px;
  border: 1px solid var(--neo-border) !important;
  border-radius: 13px;
  background: var(--neo-bg) !important;
  box-shadow: var(--neo-shadow-raised-sm);
  transition: transform .16s ease, box-shadow .16s ease;
}
.color-swatch-button:hover { transform: translateY(-1px); }
.color-swatch-button.active {
  border-color: rgba(180,35,45,.35) !important;
  box-shadow: var(--neo-shadow-pressed);
}
.color-swatch-button span { border-radius: 9px; }
.selected-color-copy { color: var(--neo-muted); }
.visualizer-disclaimer { margin-top: 12px; background: var(--neo-bg); }

/* Small utility surfaces */
.document-chip-list .admin-file-link,
.document-missing,
.security-chip,
.client-bid-tag {
  border: 1px solid var(--neo-border) !important;
  background: var(--neo-bg) !important;
  box-shadow: var(--neo-shadow-raised-sm);
}

/* =========================================================
   RED / BLACK / WHITE NEOMORPHIC COLORWAY
   Final publish palette override
   ========================================================= */
:root {
  --neo-bg: #f2f2f2;
  --neo-bg-2: #ffffff;
  --neo-surface: #ffffff;
  --neo-surface-strong: #ffffff;
  --neo-text: #111111;
  --neo-muted: #5d5d5d;
  --neo-border: rgba(17,17,17,.09);
  --neo-red: #b51218;
  --neo-red-dark: #850b10;
  --neo-red-soft: #fde9ea;
  --neo-shadow-raised: 10px 10px 24px rgba(0,0,0,.12), -10px -10px 24px rgba(255,255,255,.98);
  --neo-shadow-raised-sm: 5px 5px 12px rgba(0,0,0,.11), -5px -5px 12px rgba(255,255,255,.98);
  --neo-shadow-inset: inset 4px 4px 9px rgba(0,0,0,.10), inset -4px -4px 9px rgba(255,255,255,.96);
  --neo-shadow-pressed: inset 3px 3px 7px rgba(0,0,0,.12), inset -3px -3px 7px rgba(255,255,255,.94);
  --neo-focus: 0 0 0 3px rgba(181,18,24,.20), 0 0 0 1px rgba(181,18,24,.72);
}

body,
.roof-dashboard-body,
.portal-layout,
.auth-page,
.auth-wrapper,
.auth-right {
  background: var(--neo-bg) !important;
  color: var(--neo-text);
}

/* Authentication: black brand panel + white form surface */
.auth-left {
  background:
    linear-gradient(145deg, rgba(8,8,8,.88), rgba(17,17,17,.94)),
    url('background.png') center/cover no-repeat !important;
}
.auth-left::after { border-color: rgba(255,255,255,.10); }
.brand-title { color: #ffffff; }
.tagline { color: rgba(255,255,255,.88); }
.feature-card {
  border-color: rgba(255,255,255,.08) !important;
  background: #151515 !important;
  box-shadow: 8px 8px 20px rgba(0,0,0,.40), -5px -5px 14px rgba(255,255,255,.035) !important;
}
.feature-card h3 { color: #ef343a !important; }
.feature-card p { color: #dedede !important; }
.feature-icon { color: #ef343a; }
.auth-panel {
  background: #ffffff !important;
  border-color: rgba(0,0,0,.07) !important;
}
.auth-panel h2,
.auth-panel h3,
.auth-panel label { color: #111111; }
.auth-panel input,
.auth-panel select,
.auth-panel textarea,
.dashboard-form input,
.dashboard-form textarea,
.dashboard-form select,
.manufacturer-bid-form input,
.manufacturer-bid-form textarea,
.profile-grid-form input,
.profile-grid-form select,
.profile-grid-form textarea,
.design-quantity-form input,
.design-quantity-form select,
.design-quantity-form textarea,
.admin-form-grid input,
.admin-form-grid select,
.admin-form-grid textarea,
.inventory-form input,
.inventory-form select,
.inventory-form textarea,
.quotation-detail-form input,
.quotation-detail-form select,
.quotation-detail-form textarea,
.manufacturer-requirements-box input[type="file"],
.verification-resubmit-card input[type="file"],
.visualizer-form input[type="text"],
.visualizer-form select {
  background: #f5f5f5 !important;
  color: #111111 !important;
  border-color: rgba(0,0,0,.08) !important;
}
input::placeholder,
textarea::placeholder { color: #777777 !important; }
.role-toggle,
.signup-requirements-box,
.manufacturer-requirements-box,
.color-fieldset { background: #f4f4f4 !important; }
.role-toggle-btn { color: #222222; }
.role-toggle-btn.active {
  color: #ffffff !important;
  background: #b51218 !important;
  box-shadow: 4px 4px 10px rgba(90,0,4,.28), -3px -3px 8px rgba(255,255,255,.90) !important;
}
.main-btn {
  color: #ffffff !important;
  background: #b51218 !important;
  border-color: #a10f15 !important;
  box-shadow: 5px 5px 12px rgba(89,0,5,.28), -4px -4px 10px rgba(255,255,255,.90) !important;
}
.main-btn:hover { background: #8f0d12 !important; color: #ffffff !important; }
.toggle-password { color: #111111; }
.signup-section-title { color: #8f0d12 !important; }

/* Client / Supplier top navigation: black shell with red active state */
.portal-topbar { background: #111111 !important; padding-top: 0; }
.portal-topbar-inner {
  max-width: none;
  min-height: 74px;
  border: 0;
  border-radius: 0;
  background: #111111 !important;
  box-shadow: 0 8px 24px rgba(0,0,0,.22) !important;
}
.portal-top-brand-logo {
  background: #ffffff !important;
  border-color: rgba(255,255,255,.22) !important;
  box-shadow: inset 2px 2px 5px rgba(0,0,0,.12), inset -2px -2px 5px rgba(255,255,255,.90) !important;
}
.portal-top-brand-copy strong { color: #ffffff !important; }
.portal-top-brand-copy small { color: #c7c7c7 !important; }
.portal-top-menu-link {
  color: #eeeeee !important;
  border-color: transparent !important;
  background: transparent !important;
}
.portal-top-menu-link:hover {
  color: #ffffff !important;
  background: #1b1b1b !important;
  border-color: rgba(255,255,255,.06) !important;
  box-shadow: 4px 4px 10px rgba(0,0,0,.45), -3px -3px 8px rgba(255,255,255,.035) !important;
}
.portal-top-menu-link.active {
  color: #ffffff !important;
  background: #b51218 !important;
  border-color: #c9292f !important;
  box-shadow: inset 3px 3px 7px rgba(72,0,4,.32), inset -2px -2px 6px rgba(255,255,255,.12) !important;
}
.portal-top-menu-badge {
  color: #b51218 !important;
  background: #ffffff !important;
  box-shadow: none !important;
}
.portal-top-account { border-left-color: rgba(255,255,255,.12) !important; }
.portal-top-user-copy strong { color: #ffffff !important; }
.portal-top-user-copy small { color: #bdbdbd !important; }
.portal-top-avatar {
  color: #ffffff !important;
  background: #b51218 !important;
  border-color: #ffffff !important;
  box-shadow: 3px 3px 8px rgba(0,0,0,.40), -2px -2px 6px rgba(255,255,255,.08) !important;
}
.portal-top-logout,
.portal-nav-toggle {
  color: #ffffff !important;
  background: #1a1a1a !important;
  border-color: rgba(255,255,255,.10) !important;
  box-shadow: 4px 4px 10px rgba(0,0,0,.42), -3px -3px 8px rgba(255,255,255,.035) !important;
}
.portal-top-logout:hover,
.portal-nav-toggle:hover {
  color: #ffffff !important;
  background: #b51218 !important;
}

/* Portal content */
.roof-page-title,
.portal-page-heading .roof-page-title,
.roof-subtitle,
.dashboard-section-card h2,
.dashboard-section-card h3,
.roof-design-body h3,
.profile-view-value,
.visualizer-control-panel h2 { color: #111111 !important; }
.portal-page-heading p,
.roof-design-desc,
.overview-feature-desc,
.visualizer-helper,
.selected-color-copy,
.profile-status-line { color: #606060 !important; }

.card,
.dashboard-section-card,
.admin-section-card,
.client-bids-table-card,
.request-summary-card,
.bid-status-list-card,
.profile-summary-card,
.profile-details-under-card,
.edit-profile-single-card,
.verification-resubmit-card,
.visualizer-control-panel,
.visualizer-preview-panel,
.inventory-editor-card,
.roof-design-card,
.client-overview-stat-card,
.overview-action-card,
.saved-visualizer-card,
.inventory-card,
.notification-card,
.profile-view-item,
.bid-status-item {
  background: #ffffff !important;
  border-color: rgba(0,0,0,.075) !important;
}
.roof-design-card:hover,
.notification-card:hover,
.bid-status-item:hover {
  box-shadow: 8px 8px 18px rgba(0,0,0,.13), -8px -8px 18px rgba(255,255,255,.98) !important;
}
.admin-stat-number { color: #b51218 !important; }

/* Buttons: white secondary, red primary, black destructive/utility */
.roof-select-btn,
.profile-secondary-btn,
.admin-btn-neutral,
.view-post-link,
.client-bids-back-btn,
.manufacturer-bid-back-btn,
.overview-view-link {
  color: #111111 !important;
  background: #ffffff !important;
  border-color: rgba(0,0,0,.09) !important;
}
.roof-select-btn:hover,
.profile-secondary-btn:hover,
.admin-btn-neutral:hover,
.view-post-link:hover,
.client-bids-back-btn:hover,
.manufacturer-bid-back-btn:hover,
.overview-view-link:hover {
  color: #b51218 !important;
  background: #ffffff !important;
}
.roof-post-btn,
.profile-primary-btn,
.admin-btn-red,
.client-approve-btn {
  color: #ffffff !important;
  background: #b51218 !important;
  border-color: #9e0e14 !important;
  box-shadow: 5px 5px 12px rgba(91,0,5,.25), -4px -4px 10px rgba(255,255,255,.88) !important;
}
.roof-post-btn:hover,
.profile-primary-btn:hover,
.admin-btn-red:hover,
.client-approve-btn:hover { background: #8f0d12 !important; color: #ffffff !important; }
.admin-btn-danger,
.roof-remove-btn {
  color: #ffffff !important;
  background: #111111 !important;
  border-color: #000000 !important;
}

/* Forms, search and specification controls */
.portal-search-form,
.spec-check-item,
.catalogue-reference-box,
.quotation-total-note,
.visualizer-disclaimer,
.verification-current-files {
  background: #f5f5f5 !important;
  border-color: rgba(0,0,0,.08) !important;
}
.spec-check-item:has(input:checked) {
  color: #8f0d12 !important;
  outline: 1px solid rgba(181,18,24,.22);
}

/* Tables: black headers, white body */
.table-wrap {
  background: #f3f3f3 !important;
  border-color: rgba(0,0,0,.08) !important;
}
table { background: #ffffff !important; }
table th {
  color: #ffffff !important;
  background: #111111 !important;
}
table th,
table td { border-bottom-color: rgba(0,0,0,.08) !important; }
table tbody tr:hover { background: #f9eeee !important; }

/* Status and feedback stay within the red/black/white family */
.alert.success,
.verification-banner.verified {
  background: #ffffff !important;
  color: #111111 !important;
  border-left: 4px solid #111111 !important;
}
.alert.error,
.verification-banner.pending {
  background: #fde9ea !important;
  color: #850b10 !important;
  border-left: 4px solid #b51218 !important;
}
.empty-design-box { background: #ffffff !important; color: #606060 !important; }
.audit-badge,
.client-bid-status,
.profile-bid-status-badge,
.profile-badge,
.bid-status,
.security-chip,
.client-bid-tag {
  color: #111111 !important;
  background: #ffffff !important;
  border-color: rgba(0,0,0,.10) !important;
}
.status-rejected,
.status-failed,
.audit-failed,
.audit-error { color: #ffffff !important; background: #b51218 !important; }

/* WebGL viewer chrome: neutral black / white so roof colors remain truthful */
.visualizer-stage-3d {
  background: #f0f0f0 !important;
  border-color: rgba(0,0,0,.08) !important;
}
#roof3dCanvas { background: #eeeeee !important; }
.visualizer-3d-help {
  color: #ffffff !important;
  background: rgba(17,17,17,.90) !important;
  border-color: rgba(255,255,255,.10) !important;
  box-shadow: 5px 5px 14px rgba(0,0,0,.26) !important;
}
.visualizer-caption {
  color: #ffffff !important;
  background: rgba(17,17,17,.90) !important;
  border-color: rgba(255,255,255,.10) !important;
}
.color-swatch-button {
  background: #ffffff !important;
  border-color: rgba(0,0,0,.09) !important;
}
.color-swatch-button.active,
.color-swatch.active,
.color-swatch[aria-pressed="true"] {
  outline-color: #b51218 !important;
}

/* Modal surfaces */
.design-modal-overlay { background: rgba(0,0,0,.62) !important; }
.design-modal,
.audit-modal-content {
  background: #ffffff !important;
  border-color: rgba(0,0,0,.08) !important;
  box-shadow: 18px 18px 42px rgba(0,0,0,.28), -8px -8px 24px rgba(255,255,255,.20) !important;
}

@media (max-width: 1100px) {
  .portal-nav-panel {
    background: #111111 !important;
    border-color: rgba(255,255,255,.08) !important;
    box-shadow: 10px 12px 28px rgba(0,0,0,.36) !important;
  }
  .portal-top-menu-link {
    background: #171717 !important;
    border-color: rgba(255,255,255,.06) !important;
    color: #ffffff !important;
    box-shadow: 4px 4px 10px rgba(0,0,0,.42), -2px -2px 6px rgba(255,255,255,.025) !important;
  }
  .portal-top-menu-link.active { background: #b51218 !important; }
  .portal-top-account { border-top-color: rgba(255,255,255,.10) !important; }
}

/* Publish-readiness: logout is a CSRF-protected POST action while retaining navbar styling. */
.portal-logout-form { margin: 0; display: inline-flex; }
.portal-top-logout { font: inherit; cursor: pointer; }

/* =========================================================
   FINAL INTEGRATION POLISH
   Missing component states + responsive details
   ========================================================= */

/* Consistent warning treatment in the requested red/black/white palette. */
.alert.warning {
  color: #111111 !important;
  background: #ffffff !important;
  border: 1px solid rgba(181,18,24,.18) !important;
  border-left: 4px solid #b51218 !important;
  border-radius: 14px !important;
  box-shadow: 5px 5px 12px rgba(0,0,0,.08), -5px -5px 12px rgba(255,255,255,.98) !important;
}
.alert.warning a { color: #b51218 !important; font-weight: 700; }
.alert.warning code {
  color: #111111;
  background: #f3f3f3;
  padding: 2px 6px;
  border-radius: 7px;
}

/* Profile edit surfaces and activity cards. */
.polished-profile-form {
  display: grid;
  gap: 18px;
}
.polished-profile-form .profile-form-actions,
.polished-profile-form .profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.bid-status-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 6px;
  min-width: 120px;
  text-align: right;
}

/* Supplier bidding and request detail cards. */
.manufacturer-bid-card {
  height: 100%;
  display: flex;
  flex-direction: column;
}
.manufacturer-bid-card .roof-design-body { flex: 1; }
.manufacturer-bid-detail-card {
  display: grid;
  grid-template-columns: minmax(220px, .85fr) minmax(0, 1.55fr);
  gap: 24px;
  padding: 24px;
  border: 1px solid rgba(0,0,0,.075);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 10px 10px 24px rgba(0,0,0,.10), -10px -10px 24px rgba(255,255,255,.98);
}
.manufacturer-bid-detail-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid rgba(0,0,0,.08);
}
.manufacturer-bid-detail-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.manufacturer-bid-detail-info h2,
.manufacturer-bid-detail-info h3 { margin: 0; color: #111111; }
.manufacturer-bid-detail-desc {
  margin: 0;
  color: #5e5e5e;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.quotation-revision-panel {
  margin-top: 24px;
  padding: 24px;
  border: 1px solid rgba(0,0,0,.075);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 9px 9px 22px rgba(0,0,0,.09), -9px -9px 22px rgba(255,255,255,.98);
}
.quotation-revision-panel h3 { margin-top: 0; color: #111111; }
.quotation-note-field {
  display: grid;
  gap: 8px;
  grid-column: 1 / -1;
}
.quotation-note-field span { font-weight: 700; color: #111111; }
.quotation-note-field textarea { width: 100%; resize: vertical; min-height: 110px; }

/* Inventory active-state checkbox remains a native accessible control. */
.form-check {
  display: flex !important;
  align-items: center;
  gap: 12px;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid rgba(0,0,0,.075);
  border-radius: 14px;
  background: #f5f5f5;
  box-shadow: inset 3px 3px 7px rgba(0,0,0,.07), inset -3px -3px 7px rgba(255,255,255,.96);
}
.form-check-input {
  width: 20px !important;
  height: 20px !important;
  min-width: 20px;
  accent-color: #b51218;
  cursor: pointer;
}
.form-check-label { color: #111111; font-weight: 650; cursor: pointer; }

/* Client quotation table wrapper / heading. */
.client-bids-table-card {
  overflow: hidden;
  border-radius: 20px;
}
.client-bids-table-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 22px;
  border-bottom: 1px solid rgba(0,0,0,.08);
  background: #ffffff;
}
.client-bids-table-header h2,
.client-bids-table-header h3 { margin: 0; color: #111111; }
.client-bids-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
}

/* Saved-design modal details and primary save action. */
.design-modal-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 12px;
  margin: 16px 0;
}
.design-modal-details > * {
  min-width: 0;
  padding: 12px 14px;
  border-radius: 13px;
  background: #f5f5f5;
  border: 1px solid rgba(0,0,0,.06);
  box-shadow: inset 3px 3px 7px rgba(0,0,0,.06), inset -3px -3px 7px rgba(255,255,255,.97);
}
.modal-save-btn {
  color: #ffffff !important;
  background: #b51218 !important;
  border-color: #9e0e14 !important;
}
.modal-save-btn:hover { background: #8f0d12 !important; }

/* Explicit success/accepted/pending status styles used by older templates. */
.status-accepted,
.status-approved,
.status-verified {
  color: #111111 !important;
  background: #ffffff !important;
  border: 1px solid rgba(17,17,17,.12) !important;
}
.status-pending,
.pending {
  color: #850b10 !important;
  background: #fde9ea !important;
  border-color: rgba(181,18,24,.20) !important;
}

/* Long values must never break cards/tables on narrow devices. */
.profile-view-value,
.ledger-hash,
.fabric-hash-cell,
td,
th { overflow-wrap: anywhere; }

@media (max-width: 760px) {
  .manufacturer-bid-detail-card { grid-template-columns: 1fr; padding: 18px; }
  .design-modal-details { grid-template-columns: 1fr; }
  .client-bids-table-header { flex-direction: column; }
  .bid-status-side { align-items: flex-start; min-width: 0; text-align: left; }
  .quotation-revision-panel { padding: 18px; }
}

/* Keep authentication feature icons inside the final red/black/white palette. */
.feature-icon.blue,
.feature-icon.green,
.feature-icon.orange {
  color: #b51218 !important;
}

/* Final integration polish: saved 3D preview reopening */
.alert.info {
  background: #ffffff;
  color: #111111;
  border: 1px solid rgba(190, 0, 0, 0.22);
  box-shadow: inset 3px 3px 7px rgba(20, 20, 20, 0.06), inset -3px -3px 7px #ffffff;
}
.visualizer-loaded-alert strong { color: #b40000; }
.saved-visualizer-actions { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.saved-visualizer-actions .admin-btn-neutral { width: auto; min-width: 118px; text-align: center; }

/* ================= PHILIPPINE CASCADING ADDRESS ================= */
.signup-field-label {
  display: grid;
  gap: 7px;
  color: #191919;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .02em;
}
.signup-field-label select {
  width: 100%;
  margin: 0;
}
.signup-field-label select:disabled {
  color: #777;
  cursor: not-allowed;
  opacity: .78;
}
.address-preview {
  display: grid;
  gap: 5px;
  padding: 15px 17px;
  border: 1px solid rgba(143, 13, 18, .14);
  border-radius: 16px;
  background: #fff;
  box-shadow: inset 3px 3px 8px rgba(0, 0, 0, .055), inset -3px -3px 8px rgba(255, 255, 255, .9);
}
.address-preview-label {
  color: #8f0d12;
  font-size: .74rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.address-preview strong {
  color: #111;
  font-size: .95rem;
  line-height: 1.45;
}
.address-preview small {
  color: #666;
  font-size: .75rem;
  line-height: 1.45;
}

/* =========================================================
   FINAL UI FIX — LOGOUT + DESTRUCTIVE ACTION ALIGNMENT
   Keeps Client/Supplier top navigation clean and makes all
   action buttons share the same geometry.
   ========================================================= */

/* Client/Supplier top-navbar logout: intentional button, not plain text. */
.portal-logout-form {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  flex: 0 0 auto !important;
}
.portal-top-logout {
  min-height: 42px !important;
  height: 42px !important;
  padding: 0 16px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  border: 1px solid #ffffff !important;
  border-radius: 12px !important;
  background: #ffffff !important;
  color: #b51218 !important;
  font: inherit !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  cursor: pointer !important;
  box-shadow: 4px 4px 10px rgba(0,0,0,.38), -2px -2px 6px rgba(255,255,255,.05) !important;
  transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease, box-shadow .18s ease !important;
}
.portal-top-logout:hover {
  background: #b51218 !important;
  color: #ffffff !important;
  border-color: #b51218 !important;
  transform: translateY(-1px) !important;
}
.portal-top-logout:active {
  transform: none !important;
  box-shadow: inset 3px 3px 7px rgba(68,0,3,.30), inset -2px -2px 5px rgba(255,255,255,.13) !important;
}

/* One button geometry across cards/forms. */
.admin-btn-neutral,
.admin-btn-red,
.admin-btn-danger,
.roof-remove-btn,
.roof-post-btn,
.view-post-link,
.roof-select-btn,
.profile-primary-btn,
.profile-secondary-btn {
  min-height: 44px !important;
  box-sizing: border-box !important;
  padding: 0 18px !important;
  border-radius: 12px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
  font-weight: 800 !important;
  text-align: center !important;
  text-decoration: none !important;
  vertical-align: middle !important;
}

/* Destructive actions use the same strong red treatment everywhere. */
.admin-btn-red,
.admin-btn-danger,
.roof-remove-btn {
  border: 1px solid #9e0e14 !important;
  background: #b51218 !important;
  color: #ffffff !important;
  cursor: pointer !important;
  box-shadow: 5px 5px 12px rgba(91,0,5,.22), -4px -4px 10px rgba(255,255,255,.78) !important;
}
.admin-btn-red:hover,
.admin-btn-danger:hover,
.roof-remove-btn:hover {
  background: #8f0d12 !important;
  color: #ffffff !important;
  transform: translateY(-1px) !important;
}
.admin-btn-red:active,
.admin-btn-danger:active,
.roof-remove-btn:active {
  transform: none !important;
  box-shadow: inset 3px 3px 8px rgba(70,0,4,.32), inset -2px -2px 5px rgba(255,255,255,.12) !important;
}

/* Forms must occupy the exact same box as sibling action links. */
.inline-action-form {
  margin: 0 !important;
  padding: 0 !important;
}
.inline-action-form > button {
  width: 100% !important;
  margin: 0 !important;
}

/* Supplier inventory: Edit and Archive are perfectly equal. */
.inventory-card-actions {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px !important;
  align-items: stretch !important;
}
.inventory-card-actions > a,
.inventory-card-actions > form,
.inventory-card-actions > form > button {
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
}
.inventory-card-actions > form {
  display: flex !important;
}

/* Client draft actions should not inherit odd inline dimensions. */
.roof-bid-actions {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 10px !important;
  align-items: stretch !important;
}
.roof-bid-actions > form,
.roof-bid-actions > form > button {
  width: 100% !important;
  margin: 0 !important;
}

@media (max-width: 1100px) {
  .portal-top-account {
    align-items: stretch !important;
  }
  .portal-logout-form,
  .portal-top-logout {
    width: 100% !important;
  }
}

@media (max-width: 560px) {
  .inventory-card-actions {
    grid-template-columns: 1fr !important;
  }
}

/* Gmail/email OTP recovery helper action */
.link-button {
  appearance: none;
  border: 0;
  background: transparent;
  color: #1026d8;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  padding: 6px 8px;
}
.link-button:hover { text-decoration: underline; }
