html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

::placeholder {
  opacity: 0.4 !important;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
  background-color: #ffffff;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: #212529;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* Theme styles */
.portal-header {
  background-color: #000000;
  color: #ffffff;
}

.header-brand {
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.summary-card {
  border: 1px solid #e9ecef;
  border-radius: 8px;
  height: 100%;
  transition: transform 0.2s, box-shadow 0.2s;
  background-color: #fff;
}

.summary-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  border-color: #dee2e6;
}

.icon-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  color: #0d6efd;
}

.acceptance-box {
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 12px;
  padding: 2rem;
  margin-top: 2rem;
}

.docs-sidebar {
  position: sticky;
  top: 2rem;
}

.doc-link-group .list-group-item {
  border-left: 3px solid transparent;
  transition: all 0.2s;
}

.doc-link-group .list-group-item:hover {
  background-color: #f8f9fa;
  border-left-color: #0d6efd;
  padding-left: 1.25rem;
}

.portal-hero {
  background: linear-gradient(90deg, rgba(13,110,253,0.08), rgba(13,110,253,0));
  border: 1px solid #e9ecef;
  border-radius: 12px;
  position: relative;
  overflow: hidden;
}

/* Bold watermark showing the registered URL behind hero content */
.hero-watermark {
  position: absolute;
  bottom: 1rem;
  right: 1.5rem;
  font-size: 3.5rem;
  font-weight: 900;
  color: rgba(0, 0, 0, 0.14);
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  z-index: 0;
  letter-spacing: 0.05em;
  text-transform: lowercase;
}

@media (max-width: 991.98px) {
  .hero-watermark {
    font-size: 2.5rem;
  }
}

@media (max-width: 575.98px) {
  .hero-watermark {
    font-size: 1.75rem;
    right: 1rem;
    bottom: 0.75rem;
  }
}

/* Masonry-style card layout (portal home): short cards float up instead of stretching to
   match a taller neighbor. CSS multi-column — 2 columns on desktop, 1 below lg (mirrors the
   old col-lg-6). Note: multicol fills column-by-column, so order is top-of-col-1 then col-2. */
.portal-card-masonry {
  column-count: 2;
  column-gap: 1.5rem;
}

.portal-card-masonry > .masonry-item {
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  width: 100%;
  margin-bottom: 1.5rem;
}

@media (max-width: 991.98px) {
  .portal-card-masonry {
    column-count: 1;
  }
}

/* Portal definition list */
.portal-dl {
  margin: 0;
}

.portal-dl-row {
  display: flex;
  padding: 0.45rem 0;
  border-bottom: 1px solid #f1f3f5;
}

.portal-dl-row:last-child {
  border-bottom: none;
}

.portal-dl-row dt {
  flex: 0 0 40%;
  font-weight: 500;
  color: #6c757d;
}

.portal-dl-row dd {
  flex: 1;
  margin: 0;
  word-break: break-word;
}

/* Single-line links (auction site URLs): ellipsize instead of wrapping. min-width:0 lets the
   flex dd shrink below its content width, which is what allows text-overflow to take effect. */
.portal-dl-row dd.portal-dl-nowrap {
  min-width: 0;
  word-break: normal;
}

.portal-dl-nowrap a {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Expired support plan overlay — greys out card content and disables interaction */
.card-expired {
  position: relative;
  opacity: 0.45;
  pointer-events: none;
  user-select: none;
}

.card-expired .btn {
  pointer-events: none;
  cursor: default;
}

/* Admin dashboard quick-link tints: very light blue for the "Incoming" order feeds,
   very light orange for the customer-request queues. Set Bootstrap's button CSS vars
   so hover/active states follow automatically. */
.btn-incoming {
  --bs-btn-bg: #e7f1ff;
  --bs-btn-border-color: #cfe2ff;
  --bs-btn-color: #0a58ca;
  --bs-btn-hover-bg: #d3e3fd;
  --bs-btn-hover-border-color: #9ec5fe;
  --bs-btn-hover-color: #0a4bb3;
  --bs-btn-active-bg: #cfe0fc;
  --bs-btn-active-border-color: #9ec5fe;
  --bs-btn-active-color: #0a4bb3;
}
.btn-request {
  --bs-btn-bg: #fff3e6;
  --bs-btn-border-color: #ffe0b3;
  --bs-btn-color: #b35900;
  --bs-btn-hover-bg: #ffe8cc;
  --bs-btn-hover-border-color: #ffd08a;
  --bs-btn-hover-color: #99490a;
  --bs-btn-active-bg: #ffe0b8;
  --bs-btn-active-border-color: #ffd08a;
  --bs-btn-active-color: #99490a;
}

.admin-container {
    padding-top: 1.5rem;
}

/* ─── Task Guide Side Panel ─── */
.task-guide-panel {
    position: fixed;
    top: 5rem;
    right: 0;
    width: 350px;
    max-height: calc(100vh - 7rem);
    background: #2b3245;
    color: #c8cdd8;
    border-radius: 12px 0 0 12px;
    box-shadow: -4px 4px 24px rgba(0,0,0,0.35);
    z-index: 1045;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.task-guide-panel.open {
    transform: translateX(0);
}

.task-guide-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.25rem 0.75rem;
    background: linear-gradient(135deg, #2b5876, #4e4376);
    border-radius: 12px 0 0 0;
}

.task-guide-panel-progress {
    background: linear-gradient(135deg, #2b5876, #4e4376);
}

.task-guide-panel-progress {
    flex-shrink: 0;
}

.task-guide-panel-body {
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    padding-bottom: 0.5rem;
}

.task-guide-close {
    background: none;
    border: none;
    color: #8b93a7;
    font-size: 1rem;
    cursor: pointer;
    padding: 0.25rem;
    transition: color 0.2s;
}

.task-guide-close:hover {
    color: #fff;
}

.task-guide-header {
    color: #fff;
    font-weight: 700;
    font-size: 1.15rem;
}

.task-guide-progress {
    display: flex;
    gap: 4px;
    height: 5px;
}

.task-guide-progress-segment {
    flex: 1;
    background: #3d4559;
    border-radius: 3px;
    transition: background 0.4s ease;
}

.task-guide-progress-segment.done {
    background: #54be9c;
}

.task-guide-item {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 1rem 1.25rem;
    border-top: 1px solid #3d4559;
}

.task-guide-number {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
}

.task-guide-number.pending {
    background: #54be9c;
    color: #fff;
}

.task-guide-number.done {
    background: transparent;
    color: #54be9c;
    border: 2px solid #54be9c;
}

.task-guide-content {
    flex: 1;
    min-width: 0;
}

.task-guide-title {
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.15rem;
}

.task-guide-title.done {
    color: #c8cdd8;
    font-weight: 500;
}

.task-guide-sub {
    font-size: 0.85rem;
    color: #8b93a7;
    margin: 0.25rem 0 0;
    padding-left: 0.25rem;
}

.task-guide-cta {
    display: inline-block;
    background: #0d6efd;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.55rem 1.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    margin-top: 0.75rem;
    text-decoration: none;
    transition: background 0.2s;
}

.task-guide-cta:hover {
    background: #0b5ed7;
    color: #fff;
}

.task-guide-cta i {
    margin-right: 0.4rem;
}

.task-guide-cta.cta-green {
    background: #54be9c;
}

.task-guide-cta.cta-green:hover {
    background: #3fa987;
}

.task-guide-panel-footer {
    border-top: 1px solid #3d4559;
    padding: 0.6rem 1.25rem 0.85rem;
    text-align: right;
    flex-shrink: 0;
}

.task-guide-hide {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #c8cdd8;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.4rem 1rem;
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    line-height: 1;
}

.task-guide-hide:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* Floating tab on the right edge to reopen the panel */
.task-guide-tab {
    position: fixed;
    right: 0;
    top: 5rem;
    z-index: 1044;
    background: #2b3245;
    color: #54be9c;
    border: none;
    border-radius: 8px 0 0 8px;
    padding: 1.1rem 0.55rem;
    font-size: 1.3rem;
    cursor: pointer;
    box-shadow: -2px 2px 10px rgba(0,0,0,0.3);
    transition: background 0.2s, color 0.2s, opacity 0.3s;
}

.task-guide-tab:hover {
    background: #353d52;
    color: #fff;
}

.task-guide-tab.hidden {
    opacity: 0;
    pointer-events: none;
}

@media (max-width: 575.98px) {
    .task-guide-panel {
        width: min(350px, 85vw);
        border-radius: 12px 0 0 12px;
    }
}