/* =========================================================================
 * AWIS E-INVITATION V6 — PLATFORM BRAND SYSTEM (Studio, Brief, Portal)
 * Palette:
 *   Deep Plum Surface : #1B102B / #25173B / #301E4C
 *   Royal Violet      : #5B3E9A / #8E5CEC
 *   Botanical Green   : #4E8B5A / #A9D9A4
 *   Sunset Coral      : #FF9A6D
 *   Warm Cream Ink    : #FFF6EC
 * Typography: Poppins (UI) + Editorial Serif (Invitation Titles)
 * Scope: Strictly Studio Board, 4-Area Workspace, Awis Brief, Awis Portal,
 *        Auth Gates & Modals. Client invitations keep their own palettes.
 * ========================================================================= */
:root {
  --awis-bg: #1A102B;
  --awis-bg-elevated: #26183D;
  --awis-bg-card: #2E1D49;
  --awis-bg-card-hover: #362356;
  --awis-border: rgba(255, 246, 236, 0.12);
  --awis-border-strong: rgba(169, 217, 164, 0.35);
  --awis-green: #4E8B5A;
  --awis-green-light: #A9D9A4;
  --awis-violet: #5B3E9A;
  --awis-violet-bright: #8E5CEC;
  --awis-coral: #FF9A6D;
  --awis-cream: #FFF6EC;
  --awis-muted: rgba(255, 246, 236, 0.66);
  --awis-grad-hero: linear-gradient(135deg, #FF9A6D 0%, #8E5CEC 52%, #5B3E9A 100%);
  --awis-grad-cta: linear-gradient(95deg, #4E8B5A 0%, #6FB57C 100%);
  --awis-grad-surface: radial-gradient(circle at 10% 10%, rgba(142, 92, 236, 0.24) 0%, transparent 45%),
                       radial-gradient(circle at 92% 88%, rgba(255, 154, 109, 0.16) 0%, transparent 46%),
                       #1A102B;
}

.awis-ui,
#studio-board-page,
#customer-intake-page,
#awis-portal-page,
#studio-workspace-shell {
  font-family: 'Poppins', 'Plus Jakarta Sans', system-ui, sans-serif !important;
  color: var(--awis-cream);
}

#studio-board-page,
#customer-intake-page,
#awis-portal-page {
  position: fixed; inset: 0; z-index: 80;
  overflow-y: auto;
  background: var(--awis-grad-surface) !important;
  color: var(--awis-cream) !important;
}
#awis-portal-page.hidden { display: none !important; }

/* Dark Plum Brand Cards */
#studio-board-page .biz-card,
#customer-intake-page .biz-card,
#awis-portal-page .biz-card,
#auth-gate-modal .biz-card,
#new-project-modal .biz-card,
#client-access-modal .biz-card,
#access-notice-overlay .biz-card {
  background: rgba(42, 26, 68, 0.88) !important;
  border: 1px solid var(--awis-border) !important;
  border-radius: 18px !important;
  color: var(--awis-cream) !important;
  box-shadow: 0 18px 42px -18px rgba(8, 3, 18, 0.65) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

#access-notice-overlay {
  background: var(--awis-grad-surface) !important;
  color: var(--awis-cream) !important;
}

/* Form Inputs inside Dark Plum Awis Platform Surfaces */
#studio-board-page input,
#studio-board-page select,
#studio-board-page textarea,
#customer-intake-page input,
#customer-intake-page select,
#customer-intake-page textarea,
#awis-portal-page input,
#awis-portal-page select,
#awis-portal-page textarea,
#studio-workspace-shell input:not([type="range"]):not([type="color"]):not([type="checkbox"]),
#studio-workspace-shell select,
#studio-workspace-shell textarea,
#auth-gate-modal input,
#new-project-modal input,
#new-project-modal select,
#client-access-modal input {
  background-color: rgba(24, 14, 41, 0.78) !important;
  border-color: rgba(255, 246, 236, 0.16) !important;
  color: var(--awis-cream) !important;
  border-radius: 10px;
}
#studio-board-page input::placeholder,
#customer-intake-page input::placeholder,
#customer-intake-page textarea::placeholder,
#awis-portal-page input::placeholder,
#studio-workspace-shell input::placeholder,
#studio-workspace-shell textarea::placeholder,
#auth-gate-modal input::placeholder,
#new-project-modal input::placeholder,
#client-access-modal input::placeholder {
  color: rgba(255, 246, 236, 0.42) !important;
}
#studio-board-page input:focus,
#customer-intake-page input:focus,
#customer-intake-page textarea:focus,
#studio-workspace-shell input:focus,
#studio-workspace-shell select:focus,
#studio-workspace-shell textarea:focus {
  outline: none;
  border-color: var(--awis-violet-bright) !important;
  box-shadow: 0 0 0 2px rgba(142, 92, 236, 0.25);
}

/* Signature Pill Buttons from Brand Kit */
.awis-btn-primary {
  background: var(--awis-grad-cta) !important;
  color: #FFF6EC !important;
  border: 1px solid rgba(169, 217, 164, 0.35) !important;
  border-radius: 999px !important;
  font-weight: 600 !important;
  box-shadow: 0 8px 20px -6px rgba(78, 139, 90, 0.55);
  transition: transform 0.15s ease, filter 0.2s ease;
}
.awis-btn-primary:hover { filter: brightness(1.08); transform: translateY(-1px); }
.awis-btn-primary:active { transform: scale(0.98); }

.awis-btn-violet {
  background: linear-gradient(95deg, #5B3E9A 0%, #8E5CEC 100%) !important;
  color: #FFF6EC !important;
  border: 1px solid rgba(255, 246, 236, 0.18) !important;
  border-radius: 999px !important;
  font-weight: 600 !important;
  transition: transform 0.15s ease, filter 0.2s ease;
}
.awis-btn-violet:hover { filter: brightness(1.1); transform: translateY(-1px); }

.awis-btn-outline {
  background: rgba(255, 246, 236, 0.04) !important;
  color: var(--awis-cream) !important;
  border: 1px solid rgba(169, 217, 164, 0.36) !important;
  border-radius: 999px !important;
  font-weight: 500 !important;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.awis-btn-outline:hover {
  background: rgba(169, 217, 164, 0.12) !important;
  border-color: var(--awis-green-light) !important;
}

.awis-btn-ghost {
  background: rgba(255, 246, 236, 0.06);
  color: var(--awis-cream);
  border: 1px solid rgba(255, 246, 236, 0.12);
  border-radius: 10px;
  transition: background-color 0.18s ease, border-color 0.18s ease;
}
.awis-btn-ghost:hover { background: rgba(255, 246, 236, 0.12); border-color: rgba(255, 246, 236, 0.24); }
.awis-btn-ghost:disabled { opacity: 0.35; pointer-events: none; }

/* Brand Header Bars */
.awis-topbar-glass {
  background: rgba(26, 16, 43, 0.86);
  border-bottom: 1px solid var(--awis-border);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

/* Mode Activation Cards (Refined Dark Plum Brand Kit) */
.awis-mode-card {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  padding: 0.72rem 0.95rem; border-radius: 14px;
  border: 1px solid rgba(255, 246, 236, 0.12);
  background: rgba(26, 16, 43, 0.55);
  text-align: left; cursor: pointer; color: var(--awis-cream);
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}
.awis-mode-card:hover { border-color: rgba(142, 92, 236, 0.5); background: rgba(46, 29, 73, 0.85); }
.awis-mode-card.is-active {
  background: rgba(52, 33, 82, 0.95);
  border-color: rgba(169, 217, 164, 0.52);
  box-shadow: 0 8px 22px -10px rgba(78, 139, 90, 0.45);
}
.awis-mode-icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  background: rgba(255, 246, 236, 0.08); color: rgba(255, 246, 236, 0.65);
  transition: all 0.2s ease;
}
.awis-mode-card.is-active .awis-mode-icon {
  background: linear-gradient(135deg, rgba(78, 139, 90, 0.35), rgba(142, 92, 236, 0.35));
  color: var(--awis-green-light);
}
.awis-switch {
  position: relative; width: 40px; height: 22px; border-radius: 999px; flex-shrink: 0;
  background: rgba(255, 246, 236, 0.2); padding: 2px;
  transition: background-color 0.22s ease;
}
.awis-mode-card.is-active .awis-switch { background: var(--awis-green); }
.awis-switch-knob {
  display: block; width: 18px; height: 18px; border-radius: 999px;
  background: var(--awis-cream); box-shadow: 0 1px 4px rgba(0,0,0,0.3);
  transform: translateX(0px);
  transition: transform 0.22s cubic-bezier(0.34, 1.35, 0.64, 1);
}
.awis-mode-card.is-active .awis-switch-knob { transform: translateX(18px); }

/* Intake Option Cards (Awis Brief Dark Plum Theme) */
#customer-intake-page .intake-option-card {
  background: rgba(26, 16, 43, 0.58) !important;
  border: 1.5px solid rgba(255, 246, 236, 0.12) !important;
  color: var(--awis-cream) !important;
  border-radius: 14px;
}
#customer-intake-page .intake-option-card:hover {
  border-color: rgba(142, 92, 236, 0.55) !important;
}
#customer-intake-page .intake-option-card.is-selected {
  border-color: var(--awis-green-light) !important;
  background: rgba(78, 139, 90, 0.18) !important;
  box-shadow: 0 0 0 2px rgba(169, 217, 164, 0.18) !important;
}

/* ===================================================================== */
/* 4-AREA PROFESSIONAL AWIS STUDIO WORKSPACE (TOP/LEFT/CENTER/RIGHT/BOT) */
/* ===================================================================== */
#studio-workspace-shell {
  background: #160D26 !important;
  color: var(--awis-cream) !important;
}
#studio-workspace-shell .ws-topbar {
  height: 56px;
  background: #211436 !important;
  border-bottom: 1px solid var(--awis-border) !important;
  color: var(--awis-cream) !important;
}
.ws-left {
  width: 288px; min-width: 220px; max-width: 400px;
  background: #221539;
  border-right: 1px solid var(--awis-border);
  display: flex; flex-direction: column; min-height: 0;
  flex-shrink: 0;
  transition: width 0.2s ease;
}
#studio-workspace-shell .ws-right {
  width: 312px; min-width: 240px; max-width: 420px;
  background: #221539 !important;
  border-left: 1px solid var(--awis-border) !important;
  color: var(--awis-cream) !important;
}
#studio-workspace-shell .ws-center {
  background:
    radial-gradient(95% 80% at 14% 18%, rgba(142, 92, 236, 0.28) 0%, transparent 58%),
    radial-gradient(90% 80% at 88% 85%, rgba(255, 154, 109, 0.22) 0%, transparent 56%),
    linear-gradient(160deg, #150C25 0%, #211338 52%, #2B1A48 100%) !important;
}
.ws-center.is-pan-mode { cursor: grab; }
.ws-center.is-panning { cursor: grabbing; }
#studio-workspace-shell .ws-resizer:hover { background: rgba(142, 92, 236, 0.55); }

/* Bottom Scene & Animation Strip */
.ws-bottom-bar {
  height: 68px;
  background: #1E1233;
  border-top: 1px solid var(--awis-border);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 6px 12px;
  flex-shrink: 0;
  z-index: 6;
  transition: height 0.2s ease;
}
.ws-bottom-bar.is-collapsed {
  height: 30px; padding: 2px 12px;
}
.ws-bottom-bar.is-collapsed .ws-bottom-scenes { display: none; }
.ws-bottom-scenes {
  display: flex; align-items: center; gap: 6px;
  overflow-x: auto; flex: 1; min-width: 0;
  scrollbar-width: thin;
}
.ws-scene-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 11px; border-radius: 10px;
  border: 1px solid rgba(255, 246, 236, 0.12);
  background: rgba(255, 246, 236, 0.05);
  color: var(--awis-cream);
  font-size: 11px; white-space: nowrap; cursor: pointer;
  transition: all 0.18s ease;
}
.ws-scene-chip:hover { border-color: rgba(142, 92, 236, 0.55); background: rgba(142, 92, 236, 0.18); }
.ws-scene-chip.is-active {
  border-color: var(--awis-green-light);
  background: rgba(78, 139, 90, 0.26);
  font-weight: 600;
}

/* Workspace Tab Buttons */
.ws-tab-pill {
  padding: 6px 8px; border-radius: 8px;
  font-size: 10.5px; font-weight: 500;
  color: rgba(255, 246, 236, 0.68);
  transition: all 0.18s ease;
}
.ws-tab-pill:hover { background: rgba(255, 246, 236, 0.08); color: var(--awis-cream); }
.ws-tab-pill.is-active {
  background: linear-gradient(95deg, #5B3E9A 0%, #8E5CEC 100%);
  color: #FFF6EC; font-weight: 600;
}

/* Workspace Card Helper */
.ws-card {
  background: rgba(26, 16, 43, 0.58);
  border: 1px solid rgba(255, 246, 236, 0.11);
  border-radius: 12px;
  padding: 10px;
}

/* Publish State Badges (6 Explicit States) */
.awis-state-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 999px;
  font-size: 10px; font-weight: 600; letter-spacing: 0.02em;
  border: 1px solid transparent;
}
.awis-state-draft { background: rgba(255,246,236,0.09); color: #FFF6EC; border-color: rgba(255,246,236,0.16); }
.awis-state-publishing { background: rgba(142,92,236,0.22); color: #DFC8FF; border-color: rgba(142,92,236,0.45); }
.awis-state-published { background: rgba(78,139,90,0.25); color: #A9D9A4; border-color: rgba(169,217,164,0.45); }
.awis-state-unpublished { background: rgba(255,154,109,0.20); color: #FFD1BA; border-color: rgba(255,154,109,0.45); }
.awis-state-archived { background: rgba(148,163,184,0.16); color: #CBD5E1; border-color: rgba(148,163,184,0.32); }
.awis-state-failed { background: rgba(244,63,94,0.22); color: #FDA4AF; border-color: rgba(244,63,94,0.45); }

/* Upload Progress Bar */
.awis-progress-track {
  width: 100%; height: 6px; border-radius: 999px;
  background: rgba(255, 246, 236, 0.12); overflow: hidden;
}
.awis-progress-fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #4E8B5A, #A9D9A4);
  transition: width 0.25s ease;
}

/* Tablet & Mobile Workspace Responsiveness */
@media (max-width: 1080px) {
  .ws-left { width: 245px; min-width: 210px; }
  #studio-workspace-shell .ws-right { width: 265px !important; min-width: 220px !important; }
}
@media (max-width: 820px) {
  .ws-left, #studio-workspace-shell .ws-right {
    position: absolute; top: 0; bottom: 0; z-index: 30;
    width: min(86vw, 330px) !important; max-width: 90vw !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.65);
  }
  .ws-left { left: 0; }
  #studio-workspace-shell .ws-right { right: 0; }
  .ws-resizer { display: none; }
}
