:root {
  --aplucid-red: #d94a38;
  --aplucid-ink: #151515;
  --aplucid-soft: #fff5f2;
}

/* Portal navigation and calls to action */
.aplucid-brand {
  align-items: center;
  color: var(--aplucid-ink) !important;
  display: inline-flex;
  font-weight: 700;
  gap: .55rem;
  letter-spacing: -.02em;
}

.aplucid-brand img {
  height: 30px;
  object-fit: contain;
  width: 30px;
}

.btn-primary,
.btn-primary:focus,
.btn-primary:hover {
  background: var(--aplucid-red);
  border-color: var(--aplucid-red);
}

.btn-outline-primary {
  border-color: var(--aplucid-red);
  color: var(--aplucid-red);
}

.btn-outline-primary:hover {
  background: var(--aplucid-red);
  border-color: var(--aplucid-red);
}

/* Logged-in Desk accents */
.desk-sidebar .standard-sidebar-item.selected,
.desk-sidebar .standard-sidebar-item:hover {
  background-color: var(--aplucid-soft);
  color: var(--aplucid-red);
}

.indicator-pill.blue,
.indicator-pill.green {
  background-color: var(--aplucid-soft);
  color: var(--aplucid-red);
}

/* The portal dashboard is the client navigation. Remove ERPNext's inherited
   website sidebar from every customer-facing page and reclaim its grid space.
   Desk uses .desk-sidebar, so the administrator workspace is unaffected. */
.sidebar-column {
  display: none !important;
}

.main-column[class*="col-sm-"] {
  flex: 0 0 100%;
  max-width: 100%;
  width: 100%;
}

/* Individual client project page: keep Status and Progress, but do not expose
   internal tracked hours. */
#page-projects .page_content > .web-list-item:first-child .row > .col-sm-4:nth-child(1),
#page-projects .page_content > .web-list-item:first-child .row > .col-sm-4:nth-child(2) {
  flex: 0 0 50%;
  max-width: 50%;
}

#page-projects .page_content > .web-list-item:first-child .row > .col-sm-4:nth-child(3) {
  display: none !important;
}

@media (max-width: 575.98px) {
  #page-projects .page_content > .web-list-item:first-child .row > .col-sm-4:nth-child(1),
  #page-projects .page_content > .web-list-item:first-child .row > .col-sm-4:nth-child(2) {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

/* Client portal homepage */
.aplucid-portal {
  margin: 0 auto;
  max-width: 1240px;
  padding: 4.5rem 1.5rem 5rem;
}

.aplucid-portal__eyebrow {
  color: var(--aplucid-red);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .1em;
  margin: 0 0 .7rem;
  text-transform: uppercase;
}

.aplucid-portal__title {
  color: var(--aplucid-ink);
  font-size: clamp(2rem, 4vw, 3.25rem);
  letter-spacing: -.045em;
  line-height: 1.05;
  margin: 0;
}

.aplucid-portal__intro {
  color: #666;
  font-size: 1.05rem;
  margin: 1rem 0 2.5rem;
}

.aplucid-card-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.aplucid-card {
  align-items: center;
  background: #fff;
  border: 1px solid #eee8e5;
  border-radius: 16px;
  color: inherit !important;
  display: flex;
  gap: 1rem;
  min-height: 156px;
  padding: 1.35rem;
  text-decoration: none !important;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.aplucid-card:hover {
  border-color: #efb8af;
  box-shadow: 0 12px 30px rgba(45, 20, 16, .08);
  transform: translateY(-2px);
}

.aplucid-card__icon {
  align-items: center;
  background: var(--aplucid-soft);
  border-radius: 14px;
  color: var(--aplucid-red);
  display: flex;
  flex: 0 0 48px;
  font-size: 1.3rem;
  height: 48px;
  justify-content: center;
}

.aplucid-card__body { flex: 1; }
.aplucid-card__title { color: var(--aplucid-ink); font-size: 1rem; font-weight: 700; }
.aplucid-card__description { color: #6a6663; font-size: .875rem; line-height: 1.45; margin-top: .3rem; }
.aplucid-card__arrow { color: var(--aplucid-red); font-size: 1.7rem; font-weight: 300; }

.aplucid-activity {
  background: #fff;
  border: 1px solid #eee8e5;
  border-radius: 16px;
  margin-top: 2rem;
  padding: 1.5rem;
}

.aplucid-activity h2 { color: var(--aplucid-ink); font-size: 1.1rem; margin: 0 0 1rem; }
.aplucid-activity p { color: #777; margin: 0; }

@media (max-width: 900px) {
  .aplucid-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .aplucid-portal { padding-top: 2.5rem; }
  .aplucid-card-grid { grid-template-columns: 1fr; }
}
