:root {
  --navy: #12315c;
  --red: #d31317;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --paper: #ffffff;
  --yellow-bg: #fff7cc;
  --yellow-ink: #854d0e;
  --green-bg: #dcfce7;
  --green-ink: #166534;
  --red-bg: #fee2e2;
  --red-ink: #b91c1c;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 420px at 8% -10%, rgb(211 19 23 / 0.08), transparent 55%),
    radial-gradient(900px 380px at 100% 0%, rgb(18 49 92 / 0.1), transparent 50%),
    #f4f7fb;
  line-height: 1.45;
}

body.bangla-page {
  font-family: "Noto Sans Bengali", Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

.accent-bar {
  height: 2px;
  background: linear-gradient(90deg, var(--red) 0 28%, var(--navy) 28% 100%);
}

.site-header {
  background: rgb(255 255 255 / 0.92);
  border-bottom: 1px solid rgb(15 23 42 / 0.06);
  box-shadow: none;
  backdrop-filter: saturate(1.1) blur(12px);
  position: sticky;
  top: 0;
  z-index: 40;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  width: min(72rem, calc(100% - 2rem));
  margin: 0 auto;
  padding: 0.7rem 0;
}

.header-brand-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.2rem;
}

.header-brand-title {
  display: inline-block;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--navy);
  letter-spacing: -0.03em;
  line-height: 1.1;
  text-decoration: none !important;
  transition: opacity 0.15s ease;
}

.header-brand-title:hover {
  color: var(--navy);
  opacity: 0.7;
  text-decoration: none !important;
}

.header-brand-logo,
.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none !important;
  transition: opacity 0.15s ease;
}

.header-brand-logo:hover,
.brand:hover {
  opacity: 0.82;
  transform: none;
}

.header-brand-logo img,
.brand img {
  display: block;
  width: auto;
  height: 2.65rem;
  max-width: 100%;
  filter: none;
}

.header-auth-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
}

.button-auth {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.5rem 1.35rem;
  border-radius: 999px;
  background: var(--navy);
  color: #fff !important;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none !important;
  border: 1px solid var(--navy);
  box-shadow: 0 2px 6px rgba(13, 43, 92, 0.16);
  transition: all 0.15s ease;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
}

.button-auth:hover,
.button-auth:focus {
  background: #081d3f;
  border-color: #081d3f;
  color: #fff !important;
  text-decoration: none !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(13, 43, 92, 0.22);
}

.button-auth:active {
  transform: translateY(0);
  box-shadow: 0 1px 3px rgba(13, 43, 92, 0.18);
}

.header-user-session {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  font-size: 0.84rem;
  line-height: 1.3;
}

.header-user-name {
  color: var(--navy);
  font-weight: 600;
  text-decoration: none !important;
  transition: opacity 0.15s ease;
  max-width: 16rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-user-name:hover,
.header-user-name:focus {
  color: var(--navy);
  opacity: 0.7;
  text-decoration: none !important;
}

.header-logout-wrap {
  color: var(--muted);
  font-weight: 500;
  white-space: nowrap;
}

.header-logout-link {
  color: var(--muted);
  font-weight: 500;
  text-decoration: none !important;
  transition: color 0.15s ease;
}

.header-logout-link:hover,
.header-logout-link:focus {
  color: var(--navy);
  text-decoration: none !important;
}

.site-footer {
  margin-top: auto;
  background: #fff;
  border-top: 1px solid var(--line);
  padding: 1.85rem 0 2.25rem;
  color: var(--muted);
}

.footer-inner {
  width: min(72rem, calc(100% - 2rem));
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
}

.footer-contact {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 0.85rem;
  font-size: 0.82rem;
  line-height: 1.5;
}

.footer-email {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--navy);
  font-weight: 700;
  text-decoration: none;
  transition: color 0.15s ease;
}

.footer-email:hover {
  color: var(--red);
}

.footer-icon {
  color: var(--red);
  flex-shrink: 0;
}

.footer-sep {
  color: var(--line-strong);
  user-select: none;
}

.footer-address {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.footer-address .footer-icon {
  color: var(--muted-light);
}

.footer-credit {
  padding-top: 0.65rem;
  border-top: 1px solid var(--line);
  width: min(34rem, 100%);
}

.footer-credit p {
  margin: 0;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.5;
}

.footer-credit strong {
  color: var(--navy);
  font-weight: 600;
}

.wrap {
  width: min(72rem, calc(100% - 1.5rem));
  margin: 0 auto;
  padding: 1.15rem 0 2.5rem;
  flex: 1 0 auto;
}

.page-head {
  margin: 0 0 0.9rem;
}

.eyebrow {
  margin: 0 0 0.15rem;
  color: var(--red);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: 1.45rem;
  letter-spacing: -0.04em;
}

.tender-list {
  display: grid;
  gap: 0.9rem;
}

.tender {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 1.05rem;
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.04), 0 18px 40px rgb(18 49 92 / 0.06);
}

.notice-preview {
  flex: 0 0 auto;
  width: 100%;
  height: 11rem;
  min-width: 0;
  min-height: 11rem;
  max-height: 11rem;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.notice-preview>button {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: #f8fafc;
  cursor: zoom-in;
}

.notice-frame {
  position: absolute;
  inset: 0;
  display: block;
  overflow: hidden;
}

.notice-frame img,
.notice-frame canvas {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  object-position: top center;
  background: #fff;
  pointer-events: none;
}

.notice-label {
  position: absolute;
  right: 0.65rem;
  bottom: 0.65rem;
  z-index: 1;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  background: rgb(15 23 42 / 0.78);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
}

.tender-main {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
}

@media (min-width: 880px) {
  .tender.has-notice {
    flex-direction: row;
    align-items: flex-start;
  }

  .tender.has-notice .notice-preview {
    width: 17.5rem;
    max-width: 17.5rem;
    flex: 0 0 17.5rem;
    height: 16rem;
    min-height: 16rem;
    max-height: 16rem;
    border-bottom: 0;
    border-right: 1px solid var(--line);
  }

  .tender.has-notice .tender-main {
    width: auto;
    min-width: 16rem;
  }
}

.bid-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0;
  padding: 0.55rem 0.9rem;
  font-weight: 700;
}

.bid-countdown {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
  text-align: right;
}

.bid-lead {
  font-size: 0.78rem;
}

.clock {
  display: flex;
  gap: 0.35rem;
  font-variant-numeric: tabular-nums;
}

.clock span {
  display: grid;
  justify-items: center;
  min-width: 2.15rem;
  padding: 0.18rem 0.28rem 0.12rem;
  border-radius: 0.45rem;
  background: rgb(255 255 255 / 0.55);
}

.clock b {
  font-size: 0.92rem;
  line-height: 1;
}

.clock small {
  color: inherit;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.7;
}

.bid-status.is-upcoming {
  background: var(--yellow-bg);
  color: var(--yellow-ink);
}

.bid-status.is-live {
  background: var(--green-bg);
  color: var(--green-ink);
}

.bid-status.is-ended {
  background: var(--red-bg);
  color: var(--red-ink);
}

.tender-body {
  padding: 0.75rem 0.95rem 0.55rem;
}

.tender-body h2 {
  margin: 0;
  font-size: 1.02rem;
  letter-spacing: -0.03em;
}

.when {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  gap: 0.25rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
}

.excerpt {
  display: -webkit-box;
  margin: 0.4rem 0 0;
  overflow: hidden;
  color: #475569;
  font-size: 0.9rem;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.excerpt.is-expanded {
  display: block;
  -webkit-line-clamp: unset;
  line-clamp: unset;
}

.description-toggle {
  margin-top: 0.2rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--navy);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.description-toggle:hover {
  color: var(--red);
  text-decoration: underline;
}

.item-list {
  margin-top: 0.65rem;
}

.item-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.5rem 0;
  border-top: 1px solid var(--line);
}

.item-thumb {
  width: 2.6rem;
  height: 2.6rem;
  object-fit: cover;
  border-radius: 0.5rem;
  background: #f1f5f9;
  flex-shrink: 0;
}

.item-line {
  flex: 1;
  min-width: 0;
  margin: 0;
}

.item-line strong,
.item-line span {
  display: block;
}

.item-line strong {
  font-size: 0.86rem;
}

.item-line span {
  color: var(--muted);
  font-size: 0.74rem;
}

.item-actions {
  display: flex;
  gap: 0.4rem;
  flex-shrink: 0;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none !important;
  height: 1.9rem;
  padding: 0 0.75rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, transform 0.12s;
}

.button:hover,
.button:focus {
  text-decoration: none !important;
}

.button:active {
  transform: translateY(1px);
}

.button.is-loading {
  cursor: wait;
  opacity: 0.75;
  pointer-events: none;
}

.button-spinner {
  display: inline-block;
  width: 0.9em;
  height: 0.9em;
  margin-right: 0.4em;
  flex-shrink: 0;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: button-spin 0.7s linear infinite;
}

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

.button-details {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--navy);
}

.button-details:hover {
  background: #e8eef7;
}

.button-bid {
  border: 0;
  background: var(--navy);
  color: #fff;
}

.button-bid:hover {
  background: #0c2446;
}

.button-bid:disabled {
  background: #e2e8f0;
  color: #94a3b8;
  cursor: not-allowed;
  transform: none;
}

.button-winner {
  border: 0;
  background: #059669;
  color: #fff;
}

.button-winner:hover {
  background: #047857;
}

.button-winner:disabled {
  background: #d1d5db;
  color: #6b7280;
  cursor: not-allowed;
  transform: none;
}

.button:focus-visible,
.notice-preview>button:focus-visible,
.icon-close:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 2px;
}

.empty,
.alert {
  margin: 0;
  color: var(--muted);
}

.alert {
  padding: 0.75rem 0.85rem;
  border: 1px solid #fecdd3;
  border-radius: 0.7rem;
  background: #fff1f2;
  color: #be123c;
}

dialog {
  width: min(40rem, calc(100% - 2rem));
  max-height: calc(100% - 2rem);
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: 1.1rem;
  box-shadow: 0 30px 80px rgb(15 23 42 / 0.28);
}

dialog[open] {
  animation: rise 0.16s ease;
}

dialog::backdrop {
  background: rgb(15 23 42 / 0.5);
  backdrop-filter: blur(4px);
}

@keyframes rise {
  from {
    transform: translateY(8px);
    opacity: 0;
  }

  to {
    transform: none;
    opacity: 1;
  }
}

.modal-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line);
}

.modal-bar h2 {
  flex: 1;
  margin: 0;
  font-size: 0.98rem;
  letter-spacing: -0.02em;
}

.modal-bar>div:first-child {
  min-width: 0;
  flex: 1;
}

.modal-bar a {
  flex-shrink: 0;
  color: var(--navy);
  font-size: 0.8rem;
  font-weight: 700;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--line);
  background: #f8fafc;
}

.icon-close {
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
  border: 0;
  border-radius: 999px;
  background: #f1f5f9;
  color: var(--ink);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.winner-modal {
  width: min(28rem, calc(100% - 2rem));
}

.winner-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  background: #fff;
  border-bottom: 1px solid var(--line);
  color: var(--navy);
}

.winner-modal-kicker {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.winner-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  padding: 1.75rem 1.25rem 1.9rem;
  background: linear-gradient(135deg, #ecfdf5, #fff);
}

.winner-card-photo-wrap {
  width: 5.5rem;
  height: 5.5rem;
  flex: 0 0 5.5rem;
}

.winner-card-photo,
.winner-card-initial {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  border: 3px solid #a7f3d0;
  border-radius: 50%;
  object-fit: cover;
  background: #d1fae5;
  color: #047857;
  font-size: 2rem;
  font-weight: 800;
}

.winner-card-photo[hidden],
.winner-card-initial[hidden] {
  display: none;
}

.winner-card-copy {
  min-width: 0;
  text-align: center;
}

.winner-card-label {
  color: #059669;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
}

.winner-card-copy h2 {
  margin: 0.15rem 0 0.25rem;
  color: var(--navy);
  font-size: 1.25rem;
  overflow-wrap: anywhere;
}

.winner-card-message {
  margin: 0;
  color: #64748b;
  font-size: 0.82rem;
}

.gallery {
  padding: 1rem 1rem 0;
}

.gallery>img {
  display: block;
  width: 100%;
  max-height: 22rem;
  object-fit: contain;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
}

.thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.65rem;
}

.thumbs button {
  width: 4.2rem;
  height: 4.2rem;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 0.55rem;
  overflow: hidden;
  background: #fff;
  cursor: pointer;
}

.thumbs button.is-selected {
  border-color: var(--navy);
}

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

#details-facts {
  margin: 0;
  padding: 0.4rem 1rem 1rem;
}

#details-facts div {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 0.75rem;
  padding: 0.55rem 0;
  border-top: 1px solid var(--line);
}

#details-facts dt {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

#details-facts dd {
  margin: 0;
  font-weight: 600;
}

.bid-line {
  margin: 0;
  padding: 1rem 1rem 0.25rem;
  font-weight: 700;
}

.bid-note {
  margin: 0;
  padding: 0.35rem 1rem 1.1rem;
  color: var(--muted);
}

#viewer-modal[open] {
  display: flex;
  flex-direction: column;
  width: min(52rem, calc(100% - 2rem));
  height: min(82vh, 48rem);
  overflow: hidden;
}

#viewer-pages,
#viewer-image {
  flex: 1;
  width: calc(100% - 2rem);
  margin: 1rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: #f8fafc;
}

#viewer-pages {
  overflow: auto;
  padding: 0.75rem;
}

#viewer-pages canvas {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: 0.75rem;
  background: #fff;
}

#viewer-pages canvas:last-child {
  margin-bottom: 0;
}

#viewer-image {
  object-fit: contain;
  max-height: none;
}

@media (max-width: 768px) {
  .site-header {
    position: static;
    box-shadow: none;
    backdrop-filter: none;
    background: #fff;
  }

  .header-inner {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    width: 100%;
  }

  .header-brand-wrap {
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.25rem;
  }

  .header-brand-title {
    font-size: 1.15rem;
    text-align: center;
  }

  .header-brand-logo,
  .brand {
    justify-content: center;
  }

  .header-brand-logo:hover,
  .brand:hover {
    transform: none;
  }

  .header-brand-logo img,
  .brand img {
    height: 2.35rem;
    max-width: 85vw;
  }

  .header-auth-wrap {
    width: 100%;
    justify-content: center;
    align-items: center;
    text-align: center;
  }

  .button-auth {
    margin: 0 auto;
    font-size: 0.82rem;
    padding: 0.45rem 1.25rem;
  }

  .header-user-session {
    justify-content: center;
    text-align: center;
    font-size: 0.88rem;
    flex-wrap: wrap;
  }

  .header-user-name {
    max-width: 18rem;
    text-align: center;
  }

  .site-footer {
    margin-top: auto;
    padding: 1.5rem 1rem 2rem;
  }

  .footer-contact {
    flex-direction: column;
    gap: 0.35rem;
  }

  .footer-sep {
    display: none;
  }

  .footer-address {
    text-align: center;
    max-width: 22rem;
    font-size: 0.75rem;
  }

  .footer-address .footer-icon {
    display: none;
  }

  .footer-credit {
    padding-top: 0.5rem;
  }
}

@media (max-width: 640px) {
  .auth-wrap {
    padding: 1rem 0.75rem 2rem;
  }

  .auth-card {
    padding: 1.25rem;
    border-radius: 1rem;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .item-row {
    flex-wrap: wrap;
  }

  .item-actions {
    width: 100%;
  }

  .item-actions .button {
    flex: 1;
  }

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

  #details-facts div {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }
}

/* ==========================================================================
   User Navigation & Header Actions
   ========================================================================== */

.header-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.header-user-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.user-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.75rem 0.3rem 0.35rem;
  border-radius: 999px;
  background: #f1f5f9;
  border: 1px solid var(--line);
  color: var(--navy);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  transition: all 0.15s ease;
}

.user-pill:hover {
  background: #e2e8f0;
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

.user-avatar {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  object-fit: cover;
  background: #cbd5e1;
}

.user-avatar-initials {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
}

.user-pill-name {
  max-width: 9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-logout-link {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s ease;
}

.header-logout-link:hover {
  color: var(--navy);
}

/* ==========================================================================
   Schedule Modal
   ========================================================================== */

.schedule-modal[open] {
  display: flex;
  flex-direction: column;
  width: min(54rem, calc(100% - 2rem));
  height: min(84vh, 50rem);
  overflow: hidden;
}

.modal-item-subtitle {
  margin: 0.15rem 0 0;
  font-size: 0.76rem;
  color: var(--muted);
  font-weight: 500;
}

.schedule-modal-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  margin: 0.75rem 1rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: #f8fafc;
  overflow: auto;
  min-height: 14rem;
}

.schedule-empty-note {
  margin: auto;
  padding: 2.5rem 1.5rem;
  text-align: center;
}

.schedule-empty-note p {
  margin: 0 0 0.35rem;
  font-weight: 600;
}

.schedule-empty-note .muted {
  font-weight: 400;
  color: var(--muted);
}

#schedule-modal-pages {
  overflow: auto;
  padding: 0.75rem;
}

#schedule-modal-pages canvas {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: 0.75rem;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  border-radius: 4px;
}

#schedule-modal-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  margin: auto;
  display: block;
  padding: 0.5rem;
}

.schedule-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
}

.button-lg {
  height: 2.35rem;
  padding: 0 1.25rem;
  font-size: 0.85rem;
}

/* ==========================================================================
   Auth Layout & Components (login.php)
   ========================================================================== */

.auth-layout {
  background:
    radial-gradient(1200px 420px at 8% -10%, rgb(211 19 23 / 0.08), transparent 55%),
    radial-gradient(900px 380px at 100% 0%, rgb(18 49 92 / 0.1), transparent 50%),
    #f4f7fb;
}

.auth-wrap {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 2rem 0 3rem;
}

.auth-card {
  width: min(34rem, 100%);
  min-width: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  padding: 2rem;
  box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.05), 0 20px 40px -4px rgba(18, 49, 92, 0.08);
}

.auth-head {
  text-align: center;
  margin-bottom: 1.5rem;
}

.auth-eyebrow {
  display: inline-block;
  color: var(--red);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.auth-title {
  font-size: 1.55rem;
  letter-spacing: -0.03em;
  color: var(--navy);
  margin: 0 0 0.35rem;
}

.auth-subtitle {
  color: var(--muted);
  font-size: 0.82rem;
  margin: 0;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #f1f5f9;
  border-radius: 999px;
  padding: 0.25rem;
  margin-bottom: 1.5rem;
}

.tab-button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tab-button.is-active {
  background: #fff;
  color: var(--navy);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}

.tab-panel {
  display: none;
}

.tab-panel.is-active {
  display: block;
  animation: rise 0.2s ease;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}

.form-field[hidden] {
  display: none;
}

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

.form-field label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink);
}

.form-field .req {
  color: var(--red);
}

.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="tel"],
.form-field input[type="date"],
.form-field input[type="password"],
.form-field input[type="number"] {
  height: 2.45rem;
  padding: 0 0.85rem;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  font-size: 0.88rem;
  color: var(--ink);
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-field input:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(18, 49, 92, 0.12);
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 0.85rem;
  color: var(--muted);
  pointer-events: none;
  display: flex;
  align-items: center;
}

.input-with-icon input {
  padding-left: 2.35rem !important;
  width: 100%;
}

.field-help {
  font-size: 0.72rem;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.file-drop {
  position: relative;
  border: 1px dashed #cbd5e1;
  border-radius: 0.65rem;
  padding: 0.65rem 0.85rem;
  background: #f8fafc;
  cursor: pointer;
  transition: all 0.15s ease;
  overflow: hidden;
}

.file-drop:hover {
  border-color: var(--navy);
  background: #f1f5f9;
}

.file-drop input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.file-label {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.form-file-input {
  display: block;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  padding: 0.42rem 0.65rem;
  font-size: 0.82rem;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  box-sizing: border-box;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-file-input:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(18, 49, 92, 0.12);
}

.form-file-input::file-selector-button {
  border: 0;
  background: var(--navy);
  color: #fff;
  padding: 0.35rem 0.75rem;
  border-radius: 0.45rem;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  margin-right: 0.75rem;
  transition: background 0.15s ease;
}

.form-file-input::file-selector-button:hover {
  background: #0d2547;
}

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

.button-auth {
  height: 2.6rem;
  border: 0;
  border-radius: 0.65rem;
  background: linear-gradient(135deg, var(--navy) 0%, #1e4274 100%);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 4px 12px rgba(18, 49, 92, 0.2);
  margin-top: 0.5rem;
}

.button-auth:hover {
  background: linear-gradient(135deg, #0d2444 0%, #17355f 100%);
  box-shadow: 0 6px 16px rgba(18, 49, 92, 0.28);
}

.header-auth-wrap .button-auth {
  height: auto;
  margin-top: 0;
  padding: 0.4rem 0.85rem;
  border-radius: 0.4rem;
  background: transparent;
  color: var(--navy) !important;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.2;
  border: 1px solid #d7dee8;
  box-shadow: none;
  transform: none;
}

.header-auth-wrap .button-auth:hover,
.header-auth-wrap .button-auth:focus {
  background: #f4f7fb;
  border-color: #c3cedb;
  color: var(--navy) !important;
  text-decoration: none !important;
  transform: none;
  box-shadow: none;
}

.header-auth-wrap .button-auth:active {
  background: #eef2f7;
  transform: none;
  box-shadow: none;
}

.auth-switch {
  text-align: center;
  margin-top: 1.25rem;
  font-size: 0.8rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.link-button {
  border: 0;
  background: transparent;
  color: var(--navy);
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.link-button:hover {
  color: var(--red);
}

.alert-error {
  border: 1px solid #fecdd3;
  background: #fff1f2;
  color: #be123c;
  padding: 0.75rem 0.9rem;
  border-radius: 0.65rem;
  font-size: 0.82rem;
  margin-bottom: 1rem;
}

.alert-info {
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1e40af;
  padding: 0.75rem 0.9rem;
  border-radius: 0.65rem;
  font-size: 0.82rem;
  margin-bottom: 1rem;
}

.alert-success {
  border: 1px solid #bbf7d0;
  background: #f0fdf4;
  color: #15803d;
  padding: 0.75rem 0.9rem;
  border-radius: 0.65rem;
  font-size: 0.82rem;
  margin-bottom: 1rem;
}

.alert-warning {
  border: 1px solid #fde68a;
  background: #fffbeb;
  color: #92400e;
  padding: 0.85rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.84rem;
}

.alert-warning strong {
  display: block;
  margin-bottom: 0.25rem;
}

.alert-warning p {
  margin: 0;
}

/* ==========================================================================
   Item Bidding Page (item.php)
   ========================================================================== */

.item-detail-page {
  background: #f4f7fb;
}

.item-detail-page .accent-bar,
.item-detail-page .breadcrumb,
.item-detail-page .item-status-bar,
.item-detail-page .item-display-col,
.item-detail-page .site-footer {
  display: none;
}

.item-detail-page main.wrap {
  display: flex;
  justify-content: center;
  padding-top: 2rem;
  padding-bottom: 3rem;
}

.item-detail-page .item-layout-grid {
  display: block;
  width: 100%;
}

.item-detail-page .item-bid-col {
  width: min(34rem, 100%);
  margin: 0 auto;
}

.item-detail-page .bid-form-card {
  position: static;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.85rem;
}

.breadcrumb a {
  color: var(--navy);
  text-decoration: none;
  font-weight: 600;
}

.breadcrumb a:hover {
  color: var(--red);
}

.breadcrumb-sep {
  color: #cbd5e1;
}

.breadcrumb-current {
  color: var(--ink);
  font-weight: 600;
}

.item-status-bar {
  margin-bottom: 1rem;
  border-radius: 0.85rem;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

.item-layout-grid {
  display: grid;
  grid-template-columns: 1fr 22.5rem;
  gap: 1.25rem;
  align-items: flex-start;
}

@media (max-width: 960px) {
  .item-layout-grid {
    grid-template-columns: 1fr;
  }
}

.item-display-col {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Carousel */
.carousel-container {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 1.15rem;
  padding: 0.85rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.carousel-viewport {
  position: relative;
  width: 100%;
  height: 24rem;
  background: #0f172a;
  border-radius: 0.85rem;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-track {
  width: 100%;
  height: 100%;
  position: relative;
}

.carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.25s ease-in-out;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-slide.is-active {
  opacity: 1;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.carousel-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 1rem;
  color: var(--muted);
  gap: 0.5rem;
}

.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 999px;
  border: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
  z-index: 2;
}

.carousel-nav:hover {
  background: rgba(15, 23, 42, 0.9);
  transform: translateY(-50%) scale(1.05);
}

.carousel-prev {
  left: 0.75rem;
}

.carousel-next {
  right: 0.75rem;
}

.carousel-counter {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  background: rgba(15, 23, 42, 0.75);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  z-index: 2;
}

.carousel-thumbs {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.65rem;
  overflow-x: auto;
  padding: 0.25rem 0;
}

.thumb-item {
  flex: 0 0 4.2rem;
  height: 3.5rem;
  border: 2px solid transparent;
  border-radius: 0.55rem;
  overflow: hidden;
  padding: 0;
  background: #f1f5f9;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
}

.thumb-item.is-active {
  border-color: var(--navy);
  transform: scale(1.02);
}

.thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Specs card */
.item-specs-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 1.15rem;
  padding: 1.4rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.item-plate-badge {
  display: inline-block;
  background: #eff6ff;
  color: var(--navy);
  border: 1px solid #bfdbfe;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 0.45rem;
  margin-bottom: 0.35rem;
}

.item-main-title {
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  margin: 0 0 0.25rem;
  color: var(--navy);
}

.item-tender-ref {
  margin: 0 0 1.25rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.item-tender-ref strong {
  color: var(--ink);
}

.specs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
  gap: 0.75rem;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.spec-cell {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.spec-label {
  font-size: 0.74rem;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.spec-value {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
}

.tender-desc-box {
  margin-top: 1.25rem;
  padding: 1rem;
  background: #f8fafc;
  border-radius: 0.75rem;
  border: 1px solid var(--line);
}

.tender-desc-box h3 {
  margin: 0 0 0.35rem;
  font-size: 0.88rem;
  color: var(--navy);
}

.tender-desc-box p {
  margin: 0;
  font-size: 0.82rem;
  color: #334155;
  line-height: 1.55;
}

.tender-doc-link-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.tender-doc-link-box a {
  color: var(--navy);
  font-weight: 700;
  text-decoration: underline;
}

/* Bidding Form Card */
.bid-form-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 1.15rem;
  padding: 1.4rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04), 0 16px 36px rgba(18, 49, 92, 0.06);
  position: sticky;
  top: 4.8rem;
}

.bid-form-header {
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.85rem;
}

.bid-form-header h2 {
  margin: 0 0 0.2rem;
  font-size: 1.15rem;
  color: var(--navy);
}

.bid-form-header p {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.bid-form {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.currency-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.currency-prefix {
  position: absolute;
  left: 0.85rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy);
  pointer-events: none;
}

.currency-input-wrap input {
  padding-left: 2.15rem !important;
  font-size: 1.1rem !important;
  font-weight: 700 !important;
  color: var(--navy) !important;
  height: 2.85rem !important;
  width: 100%;
}

/* Requirement 5: 5% Earnest Money Box */
.earnest-box {
  display: flex;
  gap: 0.75rem;
  padding: 0.95rem;
  border-radius: 0.85rem;
  background: #fefce8;
  border: 1px solid #fef08a;
  animation: rise 0.2s ease;
}

.earnest-box[hidden] {
  display: none;
}

.earnest-icon {
  color: #ca8a04;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.earnest-content {
  flex: 1;
}

.earnest-message {
  margin: 0 0 0.5rem;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #713f12;
}

.earnest-highlight {
  color: #854d0e;
  font-size: 0.92rem;
  font-weight: 800;
}

.earnest-calc-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.76rem;
  color: #854d0e;
  padding-top: 0.4rem;
  border-top: 1px dashed #fde047;
}

.calc-sep {
  color: #ca8a04;
}

/* File Upload Box */
.file-upload-box {
  position: relative;
  border: 2px dashed #cbd5e1;
  border-radius: 0.85rem;
  background: #f8fafc;
  padding: 1.25rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.file-upload-box:hover {
  border-color: var(--navy);
  background: #f1f5f9;
}

.file-upload-box input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.upload-box-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  color: var(--muted);
  pointer-events: none;
}

.upload-box-content svg {
  color: var(--navy);
}

.upload-title {
  margin: 0;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--ink);
}

.upload-hint {
  margin: 0;
  font-size: 0.72rem;
  color: var(--muted);
}

.file-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.4rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background: #dcfce7;
  border: 1px solid #86efac;
  color: #166534;
  font-size: 0.75rem;
  font-weight: 600;
}

.file-badge[hidden] {
  display: none;
}

.file-badge-icon {
  font-weight: 800;
}

.bid-submit-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.button-confirm-trigger {
  width: 100%;
  height: 2.85rem;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  background: linear-gradient(135deg, var(--navy) 0%, #1e4274 100%);
  border: 0;
  color: #fff;
  border-radius: 0.65rem;
  box-shadow: 0 4px 12px rgba(18, 49, 92, 0.2);
}

.button-confirm-trigger:hover:not(:disabled) {
  background: linear-gradient(135deg, #0d2444 0%, #17355f 100%);
  box-shadow: 0 6px 16px rgba(18, 49, 92, 0.28);
}

.bid-terms-note {
  margin: 0;
  font-size: 0.7rem;
  color: var(--muted);
  text-align: center;
  line-height: 1.4;
}

/* Confirm Dialog */
.confirm-dialog[open] {
  width: min(32rem, calc(100% - 2rem));
  border-radius: 1.15rem;
  overflow: hidden;
}

.confirm-body {
  padding: 1.25rem 1.25rem 0.5rem;
}

.confirm-prompt {
  margin: 0 0 1rem;
  font-size: 0.88rem;
  color: var(--ink);
  font-weight: 600;
}

.confirm-summary {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: #f8fafc;
  padding: 0.95rem;
  border-radius: 0.75rem;
  border: 1px solid var(--line);
}

.confirm-summary div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px dashed var(--line);
}

.confirm-summary div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.confirm-summary dt {
  color: var(--muted);
}

.confirm-summary dd {
  margin: 0;
  font-weight: 600;
}

.highlight-text {
  color: var(--navy);
  font-weight: 700;
}

.confirm-warning {
  color: var(--red);
  font-weight: 700;
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
}

.confirm-note {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  line-height: 1.5;
}

.confirm-subnote {
  margin: 0;
  font-size: 0.75rem;
  color: var(--muted);
}

/* ==========================================================================
   Profile Page (profile.php)
   ========================================================================== */

.profile-layout-page {
  background: #f4f7fb;
}

.profile-header-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.page-title {
  margin: 0;
  font-size: 1.5rem;
  letter-spacing: -0.03em;
  color: var(--navy);
}

.logout-form {
  margin: 0;
}

.button-logout {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-size: 0.78rem;
  height: 2.1rem;
  padding: 0 0.85rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.button-logout:hover {
  color: var(--red);
  border-color: #fecdd3;
  background: #fff1f2;
}

.profile-page-grid {
  display: grid;
  grid-template-columns: 20rem 1fr;
  gap: 1.25rem;
  align-items: flex-start;
}

@media (max-width: 880px) {
  .profile-page-grid {
    grid-template-columns: 1fr;
  }
}

/* Profile Info Card */
.profile-info-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 1.15rem;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.profile-avatar-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 1rem;
}

.profile-large-avatar {
  width: 5.5rem;
  height: 5.5rem;
  border-radius: 999px;
  object-fit: cover;
  border: 3px solid #fff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
  margin-bottom: 0.75rem;
  background: #f1f5f9;
}

.profile-avatar-placeholder {
  width: 5.5rem;
  height: 5.5rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--navy) 0%, #1e4274 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(18, 49, 92, 0.2);
  margin-bottom: 0.75rem;
}

.profile-user-name {
  margin: 0 0 0.25rem;
  font-size: 1.15rem;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.profile-role-tag {
  display: inline-block;
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.profile-details-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.profile-detail-row {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.profile-detail-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.profile-detail-value {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink);
}

.phone-highlight {
  font-family: inherit;
  letter-spacing: 0.02em;
}

.button-sm {
  height: 1.8rem;
  padding: 0 0.7rem;
  font-size: 0.72rem;
}

.button-full {
  width: 100%;
}

.profile-card-footer {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

/* Submitted Bids Section */
.profile-bids-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 1.15rem;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.bids-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.85rem;
}

.bids-card-header h2 {
  margin: 0 0 0.15rem;
  font-size: 1.15rem;
  color: var(--navy);
}

.bids-card-header p {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.bids-count-badge {
  background: #eff6ff;
  color: var(--navy);
  border: 1px solid #bfdbfe;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
}

.bids-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 3.5rem 1rem;
  color: var(--muted);
}

.empty-icon-wrap {
  width: 4rem;
  height: 4rem;
  border-radius: 999px;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--navy);
  margin-bottom: 1rem;
}

.bids-empty-state h3 {
  margin: 0 0 0.35rem;
  color: var(--ink);
  font-size: 1.05rem;
}

.bids-empty-state p {
  margin: 0 0 1.25rem;
  font-size: 0.84rem;
  max-width: 24rem;
}

.bids-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.bid-card {
  border: 1px solid var(--line);
  border-radius: 0.95rem;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  transition: box-shadow 0.15s, border-color 0.15s;
  overflow: hidden;
}

.bid-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

.bid-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.95rem 1.15rem;
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
}

.bid-plate-tag {
  display: inline-block;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--navy);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.12rem 0.5rem;
  border-radius: 0.35rem;
  margin-bottom: 0.25rem;
}

.bid-tender-title {
  margin: 0 0 0.15rem;
  font-size: 0.96rem;
  letter-spacing: -0.02em;
}

.bid-tender-title a {
  color: var(--navy);
  text-decoration: none;
}

.bid-tender-title a:hover {
  color: var(--red);
  text-decoration: underline;
}

.bid-item-subtitle {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 500;
}

.status-pill {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.status-submitted {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}

.bid-card-body {
  padding: 1rem 1.15rem;
}

.bid-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: 0.85rem;
}

.bid-metric {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.metric-label {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.metric-value {
  font-size: 0.86rem;
  color: var(--ink);
  font-weight: 600;
}

.amount-strong {
  font-size: 1.05rem;
  color: var(--navy);
  font-weight: 800;
}

.datetime-value {
  font-size: 0.8rem;
  color: #475569;
}

.button-proof-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 0;
  background: transparent;
  color: var(--navy);
  font-weight: 700;
  font-size: 0.78rem;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.button-proof-link:hover {
  color: var(--red);
}

.bid-card-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.65rem 1.15rem;
  border-top: 1px solid var(--line);
  background: #fafafa;
}

.button-delete {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid #fecdd3;
  background: #fff;
  color: #be123c;
  cursor: pointer;
  transition: all 0.15s ease;
}

.button-delete:hover {
  background: #fff1f2;
  border-color: #fda4af;
}

.button-danger {
  border: 0;
  background: #dc2626;
  color: #fff;
}

.button-danger:hover {
  background: #b91c1c;
}

/* Document Preview Dialog */
.doc-dialog[open] {
  width: min(54rem, calc(100% - 2rem));
  height: min(84vh, 50rem);
  display: flex;
  flex-direction: column;
}

.doc-preview-body {
  flex: 1;
  margin: 0.75rem 1rem 1rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: #f8fafc;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.doc-preview-body img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  padding: 0.5rem;
}

.doc-preview-body iframe {
  width: 100%;
  height: 100%;
  border: 0;
}