/* ─── Typography ──────────────────────────────────────────────────────────── */

.portal-sidebar,
.portal-header,
.portal-main {
  font-family: var(--portal-font-body);
}

.portal-shell-backdrop {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(circle at top left, rgba(255, 104, 24, 0.05), transparent 28%),
    linear-gradient(180deg, #09090a 0%, var(--portal-shell-bg) 24%, #040405 100%);
}

.portal-main {
  height: 100vh;
  min-height: 100vh;
  position: relative;
  z-index: 1;
  background: transparent;
  color: #f8fafc;
  overflow: hidden;
}

.font-display {
  font-family: var(--portal-font-display);
  letter-spacing: -0.03em;
}

/* ─── Sidebar ─────────────────────────────────────────────────────────────── */

.portal-sidebar {
  /* Keep positioning in Tailwind utilities; overriding it here can push portal-main below the sidebar. */
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012)),
    #0a0a0a;
  border: 1px solid var(--portal-shell-border);
  width: var(--portal-sidebar-width);
  transition: transform 0.3s ease, width 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.34);
}

.portal-sidebar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6.5rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 78%),
    radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, 0.04), transparent 72%);
  pointer-events: none;
  z-index: 0;
}

/* ─── Header ──────────────────────────────────────────────────────────────── */

.portal-header {
  position: sticky;
  top: 0;
  z-index: 30;
  flex-shrink: 0;
  background:
    radial-gradient(circle at top left, rgba(255, 104, 24, 0.05), transparent 28%),
    linear-gradient(180deg, #09090a 0%, var(--portal-shell-bg) 24%, #040405 100%);
  background-attachment: fixed;
  border-bottom: 0;
  min-height: auto;
  padding-top: var(--portal-shell-gap);
  padding-bottom: var(--portal-shell-gap);
}

.portal-header-inner {
  width: 100%;
  max-width: 1600px;
  min-height: 3.35rem;
  margin: 0 auto;
  padding-inline: 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.5rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.014)),
    #0a0a0a;
}

.portal-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  border: 1px solid var(--portal-shell-border);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(226, 232, 240, 0.78);
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.portal-icon-button:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
}

.portal-page-frame {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding-inline: 0.7rem;
}

/* Reserve a stable scrollbar gutter on the main scrolling area so the
   centred page-frame (max-width 1600px, margin: 0 auto) doesn't shift
   inward when a vertical scrollbar appears. Without this, the content
   ends up a few pixels narrower than the header card on each side. */
.portal-main > main {
  scrollbar-gutter: stable;
}

.portal-toolbar-group {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.portal-toolbar-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.125rem;
  height: 2.125rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  color: rgba(226, 232, 240, 0.75);
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.portal-toolbar-button svg {
  width: 1rem;
  height: 1rem;
}

.portal-toolbar-button:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
}

.portal-toolbar-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  height: 2.125rem;
  padding: 0 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  color: rgba(226, 232, 240, 0.85);
  font-size: 0.8125rem;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.portal-toolbar-cta:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.12);
}

.portal-toolbar-cta svg { width: 1rem; height: 1rem; flex-shrink: 0; }

@media (max-width: 720px) {
  .portal-toolbar-cta {
    width: 2.125rem;
    padding: 0;
    justify-content: center;
  }
  .portal-toolbar-cta-label { display: none; }
}

.portal-mobile-trigger {
  display: inline-flex;
}

.portal-toolbar-panel {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.5rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.02)),
    rgba(18, 18, 20, 0.94);
  box-shadow: 0 24px 44px rgba(0, 0, 0, 0.44);
  backdrop-filter: blur(24px) saturate(135%);
  -webkit-backdrop-filter: blur(24px) saturate(135%);
}

.portal-toolbar-menu-item {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 0.7rem 0.85rem;
  border-radius: 0.5rem;
  color: rgba(248, 250, 252, 0.82);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.portal-toolbar-menu-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.portal-header-meta {
  min-width: 0;
  padding: 0.25rem 0.5rem 0.25rem 0.35rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.035);
  font-size: 0.78rem;
  color: rgba(226, 232, 240, 0.72);
}

.portal-mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 60;
  overflow-y: auto;
  overscroll-behavior: contain;
  background:
    radial-gradient(circle at top left, rgba(255, 104, 24, 0.06), transparent 28%),
    linear-gradient(180deg, rgba(8, 8, 9, 0.96), rgba(4, 4, 5, 0.98));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.portal-mobile-menu-panel {
  min-height: 100%;
  padding: 1rem;
  padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.portal-mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.portal-mobile-workspace-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.9rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.portal-mobile-menu-sections {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.portal-mobile-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.62);
}

.portal-mobile-menu-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.portal-mobile-menu-card {
  min-height: 6.6rem;
  padding: 0.95rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.85rem;
  color: #fff;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.portal-mobile-menu-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
}

.portal-mobile-menu-card.is-active {
  border-color: rgba(255, 122, 50, 0.28);
  background: rgba(255, 255, 255, 0.075);
  box-shadow: inset 3px 0 0 rgba(255, 122, 50, 0.9);
}

.portal-mobile-menu-card.is-disabled {
  color: rgba(226, 232, 240, 0.42);
  opacity: 0.55;
  pointer-events: none;
}

.portal-mobile-menu-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: currentColor;
}

.portal-mobile-menu-card-label {
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.2;
}

.portal-mobile-menu-footer {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.portal-mobile-user-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

@media (min-width: 1024px) {
  .portal-mobile-trigger {
    display: none;
  }
}

/* ─── Glass Card ──────────────────────────────────────────────────────────── */

.glass-card {
  /* Unified surface: neutral #0a0a0a base + faint white sheen (matches admin). */
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.028), rgba(255, 255, 255, 0.008)),
    #0a0a0a;
  border: 1px solid var(--portal-card-border);
  border-radius: 0.5rem;
  box-shadow: var(--portal-card-shadow);
}

.portal-surface-deep {
  background-color: #070707;
  border-color: var(--portal-shell-border);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.3);
}

/* ─── Workspace Badge ─────────────────────────────────────────────────────── */

.portal-workspace-badge {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0.6rem 0.7rem 0.1rem;
  padding: 0.72rem 0.8rem;
  border: 1px solid var(--portal-shell-border);
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.035);
}

.portal-workspace-badge-icon {
  width: 1.85rem;
  height: 1.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.portal-workspace-badge-icon--compact {
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 0.55rem;
  flex-shrink: 0;
}

.portal-workspace-badge-icon--artist {
  color: #ff7b2a;
}

.portal-workspace-badge-icon--label {
  color: #c084fc;
}

/* ─── Sidebar Logo Section ────────────────────────────────────────────────── */

.sidebar-logo-section {
  min-height: 4rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.35rem;
}

body.portal-sidebar-collapsed .logo-full {
  display: none;
}

body.portal-sidebar-collapsed .logo-compact {
  display: block;
}

.logo-compact {
  display: none;
  width: 2.35rem;
  height: 2.35rem;
}

.logo-full {
  display: block;
}

.sidebar-expand-button,
.collapse-toggle-expanded,
.collapse-toggle-compact {
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.collapse-toggle-compact {
  display: none;
}

.sidebar-expand-button {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
}

/* ─── Navigation ──────────────────────────────────────────────────────────── */

.portal-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.portal-nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.68rem;
  padding: 0.6rem 0.78rem;
  border-radius: 0.5rem;
  border: 1px solid transparent;
  font-weight: 600;
  color: rgba(226, 232, 240, 0.72);
  background-color: rgba(255, 255, 255, 0);
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.portal-nav-item::before {
  content: "";
  position: absolute;
  inset-block: 22%;
  left: 0;
  width: 2px;
  border-radius: 999px;
  background: var(--portal-nav-rail);
  opacity: 0;
  box-shadow: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  transform: translateX(-8px);
}

.portal-nav-item:hover {
  color: #fff;
  background-color: var(--portal-nav-hover-bg);
  border-color: rgba(255, 255, 255, 0.06);
}

.portal-nav-item:hover::before {
  opacity: 0.4;
}

.portal-nav-item.active {
  color: #fff;
  background-color: var(--portal-nav-active-bg);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.portal-nav-item.active::before {
  opacity: 1;
  transform: none;
}

.portal-nav-item.disabled {
  color: rgba(226, 232, 240, 0.42);
  pointer-events: none;
  cursor: not-allowed;
  border-color: transparent;
  background-color: transparent;
  transform: none;
}

.portal-nav-item.disabled::before {
  display: none;
}

.portal-nav-icon {
  width: 1.125rem;
  height: 1.125rem;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  display: block;
  color: currentColor;
  transition: color 0.2s ease;
}

.portal-nav-icon svg {
  width: 1rem;
  height: 1rem;
  display: block;
}

/* Scrollbar styling */
.portal-sidebar nav::-webkit-scrollbar {
  width: 2px;
}

.portal-sidebar nav::-webkit-scrollbar-track {
  background: transparent;
}

.portal-sidebar nav::-webkit-scrollbar-thumb {
  background-color: var(--portal-scroll-thumb);
  border-radius: 999px;
}

.portal-sidebar nav {
  scrollbar-width: thin;
  scrollbar-color: var(--portal-scroll-thumb) transparent;
}

/* Navigation labels */
.nav-label {
  display: inline-block;
  position: relative;
  z-index: 1;
}

.nav-section-label {
  display: block;
  letter-spacing: 0.16em;
  color: rgba(148, 163, 184, 0.52);
}

/* ─── Logout Button ───────────────────────────────────────────────────────── */

.portal-logout-button {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.58rem 0.9rem;
  border-radius: 0.5rem;
  background-color: rgba(244, 63, 94, 0.1);
  border: 1px solid rgba(244, 63, 94, 0.25);
  color: rgba(251, 113, 133, 0.92);
  font-weight: 600;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.portal-logout-button:hover {
  background-color: rgba(244, 63, 94, 0.2);
  border-color: #f43f5e;
  color: #fff;
}

.portal-logout-icon {
  width: 1rem;
  height: 1rem;
}

/* ─── Toast Notifications ─────────────────────────────────────────────────── */

.portal-toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 60;
}

.portal-toast {
  pointer-events: auto;
  min-width: 240px;
  max-width: 320px;
  padding: 0.85rem 1rem;
  border-radius: 0.5rem;
  background: rgba(0, 0, 0, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f8fafc;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.portal-toast--notice {
  border-color: rgba(34, 197, 94, 0.35);
}

.portal-toast--alert {
  border-color: rgba(248, 113, 113, 0.45);
}

.portal-toast--info {
  border-color: rgba(59, 130, 246, 0.35);
}

.portal-toast-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: capitalize;
  color: rgba(255, 255, 255, 0.85);
}

.portal-toast-close {
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  padding: 0.15rem;
  border-radius: 0.35rem;
  transition: color 0.2s ease, background-color 0.2s ease;
}

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

.portal-toast-body {
  font-size: 0.85rem;
  line-height: 1.35;
  color: rgba(248, 250, 252, 0.9);
}

.portal-toast--hiding {
  opacity: 0;
  transform: translateY(-6px);
}

/* ─── OTP Input Boxes ─────────────────────────────────────────────────────── */

.otp-input {
  width: 2.5rem;
  height: 3rem;
  text-align: center;
  font-size: 1.25rem;
  font-weight: 600;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

@media (min-width: 640px) {
  .otp-input {
    width: 3rem;
    height: 3.5rem;
    font-size: 1.5rem;
  }
}

.otp-input:focus {
  outline: none;
  border-color: var(--portal-accent-color);
  background: rgba(255, 255, 255, 0.08);
}

.otp-input::-webkit-outer-spin-button,
.otp-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.otp-input[type=number] {
  -moz-appearance: textfield;
  appearance: textfield;
}

/* ─── Status Badges ───────────────────────────────────────────────────────── */

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-badge-pending {
  background-color: rgba(234, 179, 8, 0.15);
  border: 1px solid rgba(234, 179, 8, 0.3);
  color: #facc15;
}

.status-badge-approved {
  background-color: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #22c55e;
}

.status-badge-rejected {
  background-color: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

.status-badge-clarification {
  background-color: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.3);
  color: #a855f7;
}

/* ─── Clarification Box ───────────────────────────────────────────────────── */

.clarification-box {
  background: rgba(168, 85, 247, 0.08);
  border: 1px solid rgba(168, 85, 247, 0.25);
  border-radius: 0.5rem;
  padding: 1rem;
}

/* ─── Dashboard Cards ─────────────────────────────────────────────────────── */

.dashboard-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 15rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.028) 0%, rgba(255, 255, 255, 0.008) 100%),
              #0a0a0a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.5rem;
  padding: 1.5rem;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.28);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.dashboard-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.018), transparent 44%);
  pointer-events: none;
}

.dashboard-card > * {
  position: relative;
  z-index: 1;
}

.dashboard-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.32);
}

.dashboard-card-icon {
  position: relative;
  z-index: 1;
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* ─── User Dropdown ───────────────────────────────────────────────────────── */

.user-dropdown {
  position: relative;
}

.user-dropdown-menu {
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 0.5rem;
  min-width: 180px;
  background: rgba(13, 13, 13, 0.9);
  border: 1px solid #333;
  border-radius: 0.5rem;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  padding: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
  z-index: 50;
}

.user-dropdown:hover .user-dropdown-menu,
.user-dropdown:focus-within .user-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  border-radius: 0.5rem;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.875rem;
  font-weight: 500;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.user-dropdown-item:hover {
  background-color: #1a1a1a;
  color: #fff;
}

.user-dropdown-divider {
  height: 1px;
  background: #333;
  margin: 0.5rem 0;
}

/* ─── Avatar Initial Circle ───────────────────────────────────────────────── */

.avatar-initial {
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background: linear-gradient(135deg, #ff6a1a, #ff8c4a);
  color: #fff;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
}

/* ─── Summary Card ────────────────────────────────────────────────────────── */

.summary-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.026), rgba(255, 255, 255, 0.008)), #0a0a0a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.5rem;
  padding: 1.35rem;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.28);
}

.summary-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.summary-item:last-child {
  border-bottom: none;
}

.summary-label {
  color: rgba(226, 232, 240, 0.55);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.summary-value {
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  text-align: right;
}

/* ─── Form Inputs ─────────────────────────────────────────────────────────── */

.portal-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 0.5rem;
  color: #fff;
  font-size: 0.95rem;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.portal-input:focus {
  outline: none;
  border-color: var(--portal-accent-color);
  background: rgba(255, 255, 255, 0.08);
}

.portal-input::placeholder {
  color: rgba(226, 232, 240, 0.4);
}

.portal-textarea {
  min-height: 120px;
  resize: vertical;
}

.portal-form-page {
  max-width: 58rem;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.portal-form-intro {
  padding: 1.5rem;
  border-radius: 0.5rem;
}

.portal-form-intro-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.portal-form-intro-stat {
  border-radius: 0.5rem;
  padding: 0.95rem 1rem;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
}

.portal-form-intro-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(226, 232, 240, 0.62);
}

.portal-form-intro-value {
  display: block;
  margin-top: 0.45rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
}

.portal-form-intro-copy {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.78rem;
  line-height: 1.45;
  color: rgba(226, 232, 240, 0.72);
}

.portal-form-card {
  padding: 1.5rem;
}

.portal-form-section {
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01)), rgba(0, 0, 0, 0.22);
  padding: 1rem;
}

.portal-form-section + .portal-form-section {
  margin-top: 1rem;
}

.portal-form-section-title {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
}

.portal-form-section-copy {
  margin-bottom: 1rem;
  font-size: 0.85rem;
  line-height: 1.55;
  color: rgba(226, 232, 240, 0.72);
}

.portal-form-grid {
  display: grid;
  gap: 1rem;
}

.portal-form-note {
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015)),
    rgba(0, 0, 0, 0.24);
  padding: 1rem;
}

/* The box that says what the artist is about to be CHARGED. Without this it is a
   .portal-form-note — pixel-identical to the codec spec cards sitting above it, so the
   most consequential statement on the page carries the same weight as "Frame rate:
   native, no less than 23.98". Brand orange, and a surface you cannot skim past. */
.portal-form-note--payment {
  border-color: rgba(255, 106, 26, 0.45);
  background:
    linear-gradient(180deg, rgba(255, 106, 26, 0.12), rgba(255, 106, 26, 0.04)),
    rgba(0, 0, 0, 0.24);
}

.portal-form-note--payment .portal-form-note-label {
  color: rgba(255, 176, 132, 0.95);
}

.portal-form-note--payment .portal-form-note-title {
  font-size: 1.35rem;
  letter-spacing: -0.01em;
}

.portal-form-note-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(226, 232, 240, 0.56);
}

.portal-form-note-title {
  display: block;
  margin-top: 0.45rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
}

.portal-form-note-copy {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.8rem;
  line-height: 1.55;
  color: rgba(226, 232, 240, 0.68);
}

.portal-choice-grid {
  display: grid;
  gap: 0.75rem;
}

.portal-choice-card {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.025);
  padding: 1rem;
  transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.portal-choice-card:hover {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  transform: translateY(-1px);
}

.portal-choice-card--active {
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.06);
}

.portal-choice-card--active:hover {
  border-color: rgba(34, 197, 94, 0.45);
  background: rgba(34, 197, 94, 0.08);
}

/* Selection that is an ANSWER, not an approval. --active is green, and green means
   "good, confirmed" — which is a strange thing to say back to someone who just told you
   "Yes, this video is explicit" or "Yes, it is made for kids". It also fights the brand
   orange of the radio dot inside it. Brand orange throughout: this marks the question
   as answered, and takes no view on the answer. */
.portal-choice-card--answered {
  border-color: rgba(255, 106, 26, 0.4);
  background: rgba(255, 106, 26, 0.06);
}

.portal-choice-card--answered:hover {
  border-color: rgba(255, 106, 26, 0.55);
  background: rgba(255, 106, 26, 0.09);
}

.portal-choice-card input {
  margin-top: 0.2rem;
  accent-color: var(--portal-accent-color);
}

.portal-choice-title {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
}

.portal-choice-copy {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.8rem;
  line-height: 1.5;
  color: rgba(226, 232, 240, 0.68);
}

.portal-file-input {
  width: 100%;
  font-size: 0.875rem;
  color: rgba(226, 232, 240, 0.72);
}

.portal-file-input::file-selector-button {
  margin-right: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.5rem;
  padding: 0.7rem 1rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.03));
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.portal-file-input:hover::file-selector-button {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.16);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.05));
}

.portal-upload-panel {
  border: 1px dashed rgba(255, 255, 255, 0.16);
  border-radius: 0.5rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.02);
}

.portal-upload-copy {
  margin-top: 0.45rem;
  font-size: 0.8rem;
  line-height: 1.5;
  color: rgba(226, 232, 240, 0.68);
}

.portal-file-list {
  margin-top: 0.85rem;
  display: grid;
  gap: 0.5rem;
}

.portal-file-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  width: fit-content;
  max-width: 100%;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  padding: 0.45rem 0.8rem;
  font-size: 0.78rem;
  color: #fff;
}

.portal-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.portal-form-footnote {
  font-size: 0.8rem;
  line-height: 1.5;
  color: rgba(226, 232, 240, 0.68);
}

@media (min-width: 768px) {
  .portal-form-intro-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .portal-form-grid--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .portal-form-card {
    padding: 1.75rem 2rem;
  }
}

/* ─── File Upload ─────────────────────────────────────────────────────────── */

.file-upload-zone {
  border: 2px dashed rgba(255, 255, 255, 0.15);
  border-radius: 0.5rem;
  padding: 1.5rem;
  text-align: center;
  transition: border-color 0.2s ease, background-color 0.2s ease;
  cursor: pointer;
}

.file-upload-zone:hover {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.02);
}

.file-upload-zone.dragover {
  border-color: var(--portal-accent-color);
  background: rgba(255, 106, 26, 0.05);
}

/* ─── Buttons ─────────────────────────────────────────────────────────────── */

.portal-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 0.5rem 1.125rem;
  background: linear-gradient(180deg, #ea6a2f 0%, #bf471d 100%);
  border: 1px solid rgba(255, 150, 102, 0.16);
  border-radius: 0.5rem;
  color: #fff;
  font-weight: 600;
  font-size: 0.8125rem;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.portal-btn-primary:hover {
  background: linear-gradient(180deg, #f17538 0%, #c94d21 100%);
  border-color: rgba(255, 170, 122, 0.2);
  transform: translateY(-1px);
}

.portal-btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

/* The pay button. The default primary is 13px and sized for "Save" — too small to be
   the single most consequential control in the portal, sitting at the bottom of a very
   long page. Full width where the page is narrow, and unmistakably the primary action. */
.portal-btn-primary--cta {
  width: 100%;
  padding: 0.8rem 1.5rem;
  font-size: 0.9375rem;
}

@media (min-width: 640px) {
  .portal-btn-primary--cta {
    width: auto;
  }
}

.portal-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 0.5rem 1.125rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.062), rgba(255, 255, 255, 0.024));
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 0.5rem;
  color: #fff;
  font-weight: 600;
  font-size: 0.8125rem;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: none;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.portal-btn-secondary:hover {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.078), rgba(255, 255, 255, 0.032));
  border-color: rgba(255, 255, 255, 0.16);
}

.portal-btn-ghost,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 0.375rem 0.875rem;
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.5rem;
  color: rgba(226, 232, 240, 0.72);
  font-weight: 600;
  font-size: 0.8125rem;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.portal-btn-ghost:hover,
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
}

/* ─── Hero Glow ──────────────────────────────────────────────────────────── */

.portal-hero-glow {
  position: absolute;
  top: -30%;
  right: -10%;
  width: 60%;
  height: 160%;
  background: radial-gradient(ellipse at center, rgba(255, 84, 0, 0.08), transparent 70%);
  filter: blur(40px);
  animation: portal-glow-pulse 8s ease-in-out infinite;
}

.portal-range-filter {
  display: flex;
  gap: 0.35rem;
  padding: 0.35rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: none;
}

.portal-range-pill {
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  border: 1px solid transparent;
  color: var(--portal-muted-color);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.portal-range-pill:hover {
  color: #fff;
  transform: translateY(-1px);
}

.portal-range-pill.is-active {
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 158, 106, 0.16);
  box-shadow: none;
}

@keyframes portal-glow-pulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

@media (prefers-reduced-motion: reduce) {
  .portal-hero-glow {
    animation: none;
  }
}

/* ─── Flash Messages ─────────────────────────────────────────────────────── */

.portal-flash-success {
  padding: 0.75rem 1rem;
  background: var(--portal-flash-success-bg);
  border: 1px solid var(--portal-flash-success-border);
  border-radius: 0.5rem;
  color: var(--portal-flash-success-text);
  font-size: 0.875rem;
  line-height: 1.5;
}

.portal-flash-error {
  padding: 0.75rem 1rem;
  background: var(--portal-flash-error-bg);
  border: 1px solid var(--portal-flash-error-border);
  border-radius: 0.5rem;
  color: var(--portal-flash-error-text);
  font-size: 0.875rem;
  line-height: 1.5;
}

/* ─── Responsive Collapsed Sidebar ───────────────────────────────────────── */

.collapse-toggle-compact-wrapper {
  display: none;
}

body.portal-sidebar-collapsed .collapse-toggle-compact-wrapper {
  display: flex;
  justify-content: center;
  padding-inline: 0;
  padding-top: 0.15rem;
}

@media (min-width: 1024px) {
  .portal-main {
    margin-left: calc(var(--portal-sidebar-width) + (var(--portal-shell-gap) * 2));
    padding-right: var(--portal-shell-gap);
    padding-bottom: var(--portal-shell-gap);
  }

  body.portal-sidebar-collapsed .portal-sidebar {
    width: var(--portal-sidebar-collapsed-width);
  }

  body.portal-sidebar-collapsed .portal-main {
    margin-left: calc(var(--portal-sidebar-collapsed-width) + (var(--portal-shell-gap) * 2));
  }

  body.portal-sidebar-collapsed .nav-label,
  body.portal-sidebar-collapsed .nav-section-label,
  body.portal-sidebar-collapsed .user-text {
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
  }

  body.portal-sidebar-collapsed .portal-nav-item {
    justify-content: center;
    gap: 0;
    padding-inline: 0;
    width: 2.5rem;
    height: 2.5rem;
    margin: 0.25rem auto;
    border-radius: 0.5rem;
  }

  body.portal-sidebar-collapsed .portal-nav-item::before {
    inset-block: 25%;
    left: -6px;
    transform: none;
  }

  body.portal-sidebar-collapsed .portal-nav-item.active {
    background-color: var(--portal-nav-active-bg);
  }

  body.portal-sidebar-collapsed .portal-workspace-badge {
    display: none;
  }

  body.portal-sidebar-collapsed .collapse-toggle-expanded {
    display: none !important;
  }

  body.portal-sidebar-collapsed .collapse-toggle-compact {
    display: flex;
  }

  /* Center the compact logo section and remove spacing in collapsed state */
  body.portal-sidebar-collapsed .sidebar-logo-section > .flex {
    justify-content: center;
  }
}

/* Ensure the right side of the header doesn't affect centering when collapsed */
body.portal-sidebar-collapsed .sidebar-logo-section .flex.items-center.gap-2 { gap: 0; }

body.portal-sidebar-collapsed .portal-workspace-badge-status {
  display: none;
}

/* Make the logout button visible and aligned in collapsed mode */
body.portal-sidebar-collapsed .portal-logout-button {
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  margin: 0.5rem auto 1rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.portal-sidebar-collapsed .portal-logout-button span {
  display: none;
}

/* Center the user initial in compact (collapsed) sidebar */
body.portal-sidebar-collapsed .sidebar-user {
  justify-content: center;
}

body.portal-sidebar-collapsed .sidebar-user .user-initial {
  margin-inline: auto;
}

/* Remove horizontal spacing utility effect in collapsed mode */
body.portal-sidebar-collapsed .sidebar-user > * + * {
  margin-left: 0 !important;
}

/* Hide user info in collapsed mode */
body.portal-sidebar-collapsed .flex-1.min-w-0 {
  display: none;
}

body.portal-sidebar-collapsed .flex.items-center.gap-3.mb-4.px-2 {
  justify-content: center;
  padding: 0;
  margin-bottom: 1rem;
}
