/* Shared visual language based on the Pcube public site. */
:root {
  --pcube-blue: #1f4eb2;
  --pcube-gold: #f7b733;
  --pcube-ice: #f5f8fd;
  --pcube-ink: #1b2e52;
  --pcube-line: #dce6f4;
  --pcube-shadow: 0 12px 30px rgba(21, 51, 110, .10);
}

/* Keep the page shell visible while individual content regions load. */
.page-loading {
  min-height: 240px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  color: var(--pcube-blue);
  font: 700 15px/1.5 "Microsoft YaHei", "PingFang SC", sans-serif;
  letter-spacing: .08em;
}
.page-loading small { color:#687892; font-weight:500; letter-spacing:0; }
.page-loading .button { margin-top:4px; }

body.pcube-theme {
  color: var(--pcube-ink);
  background: var(--pcube-ice);
}

/* Applied before JavaScript runs, so the legacy diagonal never flashes on login pages. */
body:has(.shell) {
  background: var(--pcube-ice);
}

body:has(.shell) .intro {
  background: linear-gradient(135deg, #15336e 0%, #1f4eb2 100%);
}

.pcube-theme .topbar,
.pcube-theme .top {
  min-height: 68px;
  background: linear-gradient(112deg, #12306a 0%, #1f4eb2 100%);
  box-shadow: 0 3px 14px rgba(11, 37, 86, .22);
}

.pcube-theme .topbar .brand {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  color: #fff;
  font-weight: 700;
  letter-spacing: .02em;
}

.pcube-theme .pcube-logo {
  width: 37px;
  height: 37px;
  flex: 0 0 37px;
  object-fit: contain;
}

.pcube-theme .brand-mark,
.pcube-theme .mark {
  display: none;
}

.pcube-theme .button.primary,
.pcube-theme .button:not(.outline):not(.teal):not(.danger) {
  background: linear-gradient(135deg, var(--pcube-blue), #2967cc);
  border-color: transparent;
  box-shadow: 0 7px 16px rgba(31, 78, 178, .20);
}

.pcube-theme .button.teal {
  color: #fff;
  background: linear-gradient(135deg, #1f4eb2, #15336e);
  border-color: transparent;
}

.pcube-theme .button.outline {
  color: var(--pcube-blue);
  border-color: #adc3e8;
  background: #fff;
}

.pcube-theme .button.danger {
  color: #b63e47;
  background: #fff3f2;
  border-color: #edc5c8;
  box-shadow: none;
}

.pcube-theme .button.danger:hover {
  color: #fff;
  background: #c64750;
  border-color: #c64750;
  box-shadow: 0 7px 16px rgba(182, 62, 71, .18);
}

.pcube-theme .button:hover,
.pcube-theme .role:hover,
.pcube-theme .role:focus-visible {
  transform: translateY(-2px);
}

.pcube-theme .panel,
.pcube-theme .card,
.pcube-theme .event-card,
.pcube-theme .task,
.pcube-theme .submission,
.pcube-theme .role {
  border-color: var(--pcube-line);
  box-shadow: var(--pcube-shadow);
}

.pcube-theme .role {
  --role: var(--pcube-blue) !important;
  border-left-color: var(--pcube-gold);
}

.pcube-theme .role-icon,
.pcube-theme .role .arrow {
  color: var(--pcube-blue);
}

.pcube-theme .event-banner,
.pcube-theme .hero {
  border-color: rgba(31, 78, 178, .13);
}

.pcube-theme .intro {
  position: relative;
  background: linear-gradient(135deg, #15336e 0%, #1f4eb2 100%);
}

.pcube-theme .pcube-lockup {
  position: absolute;
  top: 34px;
  left: clamp(26px, 6vw, 72px);
  display: flex;
  align-items: center;
  gap: 9px;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .08em;
}

.pcube-theme .pcube-lockup .pcube-logo {
  width: 42px;
  height: 42px;
  flex-basis: 42px;
}

.pcube-theme .intro h1 em,
.pcube-theme .eyebrow,
.pcube-theme .intro .eyebrow {
  color: #f7d878 !important;
}

.pcube-theme .input:focus,
.pcube-theme .select:focus,
.pcube-theme textarea:focus {
  outline-color: var(--pcube-blue);
  border-color: var(--pcube-blue);
  box-shadow: 0 0 0 3px rgba(31, 78, 178, .13);
}

.pcube-theme .status,
.pcube-theme .pill,
.pcube-theme .role-pill {
  background-color: #eaf1ff;
  color: var(--pcube-blue);
}

@media (max-width: 600px) {
  .pcube-theme .pcube-lockup { top: 22px; left: 24px; }
  .pcube-theme .topbar,
  .pcube-theme .top { min-height: 60px; }
}
