/* ==========================================================
   AITANA SUITE PORTAL CSS
   Core Design System, Devoteam Corporate Light Theme
   ========================================================== */

:root {
  /* Devoteam Corporate Color Palette (Light Theme) */
  --color-bg: #f8f9fa; /* Crisp light canvas */
  --color-bg-secondary: #f1f3f5;
  --color-bg-card: #ffffff; /* Crisp white surface */
  --color-bg-card-hover: #ffffff;
  --color-border: #e2e8f0; /* Crisp soft border */
  --color-border-hover: rgba(248, 72, 94, 0.4); /* Devoteam Coral focus */
  
  --color-text-primary: #1e293b; /* Devoteam Slate Softened */
  --color-text-secondary: #475569; /* Devoteam Slate Secondary */
  --color-text-muted: #64748b; /* Subtle text */
  
  /* Devoteam Brand Colors */
  --color-devoteam-coral: #f8485e; /* Official Devoteam Carnation / Coral-Red */
  --color-devoteam-coral-hover: #e0364c;
  --color-devoteam-coral-light: #fff1f3; /* Soft tint for badges and highlights */
  --color-devoteam-charcoal: #1e2026;
  --color-devoteam-grey: #56555a;
  
  /* Glowing Brand Gradients */
  --grad-primary: linear-gradient(135deg, #f8485e 0%, #e0364c 100%); /* Devoteam Coral */
  --grad-coral: linear-gradient(135deg, #f8485e 0%, #ff6b7d 100%);
  --grad-gold: linear-gradient(135deg, #f8485e 0%, #e0364c 100%); /* Unified with Devoteam Coral */
  --grad-emerald: linear-gradient(135deg, #10b981 0%, #059669 100%); /* Emerald Mint */
  --grad-violet: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%); /* Violet Purple */
  --grad-rose: linear-gradient(135deg, #f8485e 0%, #e11d48 100%); /* Rose Crimson */
  --grad-cyan: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%); /* Cyber Sky Cyan */
  
  /* Fonts & Shadows */
  --font-title: 'Outfit', 'Inter', sans-serif;
  --font-body: 'Inter', sans-serif;
  --shadow-premium: 0 4px 20px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.03);
  --shadow-hover: 0 16px 32px -4px rgba(248, 72, 94, 0.14), 0 4px 12px -2px rgba(0, 0, 0, 0.04);
  --shadow-glow-indigo: 0 4px 20px rgba(248, 72, 94, 0.2);
  --shadow-glow-gold: 0 4px 20px rgba(248, 72, 94, 0.25);
  --shadow-glow-devoteam: 0 4px 20px rgba(248, 72, 94, 0.25);
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --transition-smooth: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base resets */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text-primary);
  font-family: var(--font-body);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* SUBTLE AMBIENT ACCENTS */
.bg-ambient-glow {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background: radial-gradient(circle at 12% 10%, rgba(248, 72, 94, 0.04) 0%, transparent 45%),
              radial-gradient(circle at 88% 85%, rgba(248, 72, 94, 0.03) 0%, transparent 45%),
              radial-gradient(circle at 50% 50%, rgba(241, 243, 245, 0.6) 0%, transparent 100%);
}

.glow-orb {
  display: none;
}

/* PORTAL WRAPPER */
.portal-container {
  max-width: 1300px;
  width: 100%;
  margin: 0 auto;
  padding: 2.5rem 2rem;
  z-index: 2;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

/* PREMIUM HEADER */
.portal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  margin-bottom: 1.75rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--color-border);
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  cursor: default;
  flex-shrink: 0;
  margin-right: 0.5rem;
}

.logo-float-wrapper {
  animation: floatLogo 4s infinite ease-in-out alternate;
}

.logo-container {
  background: var(--grad-primary);
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(248, 72, 94, 0.3);
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease;
}

.brand-wrapper:hover .logo-container {
  transform: scale(1.08) rotate(-4deg);
  box-shadow: 0 6px 22px rgba(248, 72, 94, 0.45);
}

.logo-icon {
  width: 26px;
  height: 26px;
  color: #ffffff;
  transition: transform 0.4s ease;
}

.brand-wrapper:hover .logo-icon {
  transform: scale(1.1) rotate(5deg);
}

.brand-title {
  font-family: var(--font-title);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.brand-title h1 {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--color-devoteam-grey);
  text-align: center;
}

.text-gold-gradient,
.text-coral-gradient {
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: var(--color-devoteam-coral);
  font-size: inherit !important;
  font-weight: inherit !important;
}

.text-devoteam-grey,
.brand-tana {
  color: var(--color-devoteam-grey) !important;
}

.brand-by-pill {
  font-family: var(--font-title);
  font-size: 0.72rem;
  font-weight: 600;
  font-style: italic;
  color: var(--color-devoteam-coral);
  background: var(--color-devoteam-coral-light);
  border: 1px solid rgba(248, 72, 94, 0.22);
  border-radius: 20px;
  padding: 0.12rem 0.55rem;
  line-height: 1.2;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  user-select: none;
}

.brand-title > span {
  font-size: 0.72rem;
  color: var(--color-devoteam-grey);
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-align: center;
  line-height: 1;
  margin-top: 2px;
}

/* DATE & USER STATS */
.header-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: nowrap;
}

.meta-item {
  background: #ffffff;
  border: 1px solid var(--color-border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  height: 36px;
  box-sizing: border-box;
  padding: 0 0.9rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--color-text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.meta-item i,
.meta-item svg {
  width: 15px;
  height: 15px;
  color: var(--color-devoteam-coral);
  flex-shrink: 0;
}

.meta-item span {
  white-space: nowrap;
}

/* GLOBAL HUB CONNECTION INDICATORS */
.hub-status-cluster {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}

.hub-status-indicator {
  background: #ffffff;
  border: 1px solid var(--color-border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  width: 36px;
  height: 36px;
  min-width: 36px;
  box-sizing: border-box;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: var(--transition-smooth);
  cursor: help;
  flex-shrink: 0;
}

.hub-status-indicator i,
.hub-status-indicator svg {
  width: 14px;
  height: 14px;
  color: var(--color-text-secondary);
  transition: var(--transition-smooth);
}

.hub-status-indicator svg.jira-logo-svg {
  fill: currentColor;
}

.hub-status-indicator svg:not(.jira-logo-svg) {
  fill: none !important;
  stroke: currentColor;
  stroke-width: 1.5px;
}

.hub-status-indicator:hover {
  background: var(--color-devoteam-coral-light);
  border-color: rgba(248, 72, 94, 0.3);
}

.hub-status-indicator:hover i,
.hub-status-indicator:hover svg {
  color: var(--color-devoteam-coral);
}

.hub-status-indicator .status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  position: absolute;
  top: 2px;
  right: 2px;
  border: 1.5px solid #ffffff;
  transition: var(--transition-smooth);
}

/* Connected: Green/Emerald */
.hub-status-indicator.connected .status-dot {
  background: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

.hub-status-indicator.connected {
  border-color: rgba(16, 185, 129, 0.3);
  background: #ffffff;
}

.hub-status-indicator.connected i,
.hub-status-indicator.connected svg {
  color: #059669;
}

/* Disconnected/Not Configured: Amber/Yellow */
.hub-status-indicator.disconnected .status-dot {
  background: #f59e0b;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.5);
}

.hub-status-indicator.disconnected {
  border-color: rgba(245, 158, 11, 0.3);
  background: #ffffff;
}

.hub-status-indicator.disconnected i,
.hub-status-indicator.disconnected svg {
  color: #d97706;
}

/* ACTIVE UNIT BADGE */
.badge-unit-active {
  height: 36px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0 0.85rem;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #059669;
  font-family: var(--font-title);
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: var(--transition-smooth);
}

.badge-unit-active i,
.badge-unit-active svg {
  width: 14px;
  height: 14px;
  color: #059669;
  flex-shrink: 0;
}

.badge-unit-active span {
  white-space: nowrap;
}

.badge-unit-active select {
  background: transparent;
  border: none;
  font-size: 13px;
  font-weight: 600;
  color: #059669;
  font-family: var(--font-title);
  cursor: pointer;
  outline: none;
  padding: 0;
  margin: 0;
}

.badge-unit-active select option {
  background: #ffffff;
  color: #0f172a;
  font-weight: 500;
}

/* USER PROFILE BADGE */
#header-user-badge {
  height: 36px;
  box-sizing: border-box;
  padding: 0 0.75rem;
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-primary);
  font-family: var(--font-title);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  display: none;
  align-items: center;
  gap: 0.6rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.user-badge {
  background: var(--color-devoteam-coral-light);
  border: 1px solid rgba(248, 72, 94, 0.25);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.82rem;
  color: var(--color-devoteam-coral);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}

.user-badge::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 8px #10b981;
}

/* WELCOME BANNER */
.welcome-hero {
  text-align: center;
  margin-bottom: 1.75rem;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  animation: fadeInDown 0.8s ease-out;
}

.welcome-hero h2 {
  font-family: var(--font-title);
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 0.85rem;
  color: var(--color-text-primary);
  background: none;
  -webkit-text-fill-color: initial;
}

.welcome-hero p {
  color: var(--color-text-secondary);
  font-size: 1.15rem;
  line-height: 1.6;
  font-weight: 400;
}

/* DAILY MOTIVATIONAL QUOTE BANNER (GEMINI AI) */
#portal-daily-quote {
  flex-direction: column !important;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  margin: 0.85rem auto 0 auto;
  max-width: 760px;
  padding: 0.65rem 1.4rem;
  border-radius: 30px;
  background: rgba(248, 72, 94, 0.04);
  border: 1px solid rgba(248, 72, 94, 0.15);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
  text-align: center;
}

#portal-daily-quote .quote-content {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

#portal-daily-quote #portal-daily-quote-author {
  display: block;
  width: 100%;
  font-size: 0.82rem;
  font-weight: 600;
  color: #64748b;
  margin-top: 0.15rem;
  text-align: center;
}

/* MAIN APPLICATIONS GRID */
.suite-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-bottom: 4rem;
  animation: fadeInUp 1s ease-out;
}

/* APP GLASS CARD */
.app-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-premium);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 290px;
  transition: var(--transition-smooth);
}

/* Card Accent Bar on Hover */
.app-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--grad-primary);
  opacity: 0;
  transition: var(--transition-smooth);
}

.app-card:hover {
  transform: translateY(-6px);
  border-color: rgba(248, 72, 94, 0.35);
  box-shadow: var(--shadow-hover);
}

.app-card:hover::before {
  opacity: 1;
}

/* Active Project Budget Card specific hover */
.app-card.card-active:hover {
  border-color: rgba(248, 72, 94, 0.4);
  box-shadow: var(--shadow-hover);
}

/* App Card Layout */
.card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  z-index: 2;
}

.app-icon-box {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

/* Gradient Icon Boxes */
.card-active .app-icon-box {
  background: var(--grad-primary);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(248, 72, 94, 0.28);
}

.card-presales .app-icon-box {
  background: rgba(139, 92, 246, 0.08);
  color: #7c3aed;
  border: 1px solid rgba(139, 92, 246, 0.2);
}

.card-capacity .app-icon-box {
  background: rgba(14, 165, 233, 0.08);
  color: #0284c7;
  border: 1px solid rgba(14, 165, 233, 0.2);
}

.card-kpis .app-icon-box {
  background: rgba(248, 72, 94, 0.08);
  color: #f8485e;
  border: 1px solid rgba(248, 72, 94, 0.2);
}

.card-budget-creator .app-icon-box {
  background: var(--grad-primary);
  color: #ffffff !important;
  box-shadow: 0 4px 16px rgba(248, 72, 94, 0.28);
  border: none;
}

.card-portfolio-kanban .app-icon-box {
  background: var(--grad-primary);
  color: #ffffff !important;
  box-shadow: 0 4px 16px rgba(248, 72, 94, 0.28);
  border: none;
}

.card-finance-control .app-icon-box {
  background: var(--grad-primary);
  color: #ffffff !important;
  box-shadow: 0 4px 16px rgba(248, 72, 94, 0.28);
  border: none;
}

.app-icon-box i {
  width: 28px;
  height: 28px;
  transition: var(--transition-smooth);
}

/* Hover micro-animations */
.app-card:hover .app-icon-box i {
  transform: scale(1.1) rotate(5deg);
}

.card-active:hover .app-icon-box {
  transform: scale(1.08) rotate(-4deg);
  box-shadow: 0 6px 20px rgba(248, 72, 94, 0.38);
}

/* Badges */
.app-status-badge {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.35rem 0.85rem;
  border-radius: 12px;
}

.badge-active {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.25);
  box-shadow: 0 1px 3px rgba(16, 185, 129, 0.08);
}

.badge-beta {
  background: rgba(245, 158, 11, 0.12) !important;
  color: #d97706 !important;
  border: 1px solid rgba(245, 158, 11, 0.35) !important;
  box-shadow: 0 1px 3px rgba(245, 158, 11, 0.08) !important;
}

.badge-beta-header {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0.25rem 0.65rem !important;
  background: rgba(245, 158, 11, 0.12) !important;
  border: 1px solid rgba(245, 158, 11, 0.35) !important;
  border-radius: 6px !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
  color: #d97706 !important;
  text-transform: uppercase !important;
  font-family: 'Outfit', 'Inter', -apple-system, sans-serif !important;
  line-height: 1 !important;
  box-shadow: 0 1px 3px rgba(245, 158, 11, 0.08) !important;
}

.badge-locked {
  background: #f1f3f5;
  color: var(--color-text-secondary);
  border: 1px solid #e2e8f0;
}

/* Card Content */
.card-content {
  margin-bottom: 2rem;
  z-index: 2;
}

.card-content h3 {
  font-family: var(--font-title);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
  color: var(--color-devoteam-grey);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-content p {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Inactive cards styling */
.app-card.card-inactive {
  opacity: 0.85;
}

.app-card.card-inactive:hover {
  opacity: 1;
  border-color: rgba(0, 0, 0, 0.12);
  box-shadow: var(--shadow-premium), 0 4px 15px rgba(0, 0, 0, 0.04);
}

.app-card.card-inactive h3 {
  color: var(--color-devoteam-grey);
}

.app-card.card-inactive p {
  color: var(--color-text-secondary);
}

/* Buttons */
.card-action-row {
  z-index: 2;
}

.btn-portal-action {
  width: 100%;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-md);
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition-smooth);
}

/* Active Access Button */
.btn-active-access {
  background: var(--grad-primary);
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 14px rgba(248, 72, 94, 0.28);
}

.btn-active-access:hover {
  background: linear-gradient(135deg, #ff5c70 0%, #e0364c 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(248, 72, 94, 0.4);
}

.btn-active-access i {
  width: 18px;
  height: 18px;
}

/* Inactive Locked Button */
.btn-locked {
  background: #f1f3f5;
  color: var(--color-text-secondary);
  border: 1px solid #e2e8f0;
  cursor: not-allowed;
}

.btn-locked i {
  width: 16px;
  height: 16px;
  color: var(--color-text-muted);
}

/* PORTAL FOOTER */
.portal-footer {
  text-align: center;
  padding: 2.5rem 2rem;
  border-top: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  z-index: 2;
}

/* Footer About Icon Button */
.btn-footer-about-icon {
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 2px;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, opacity 0.2s, transform 0.2s;
  opacity: 0.6;
}

.btn-footer-about-icon:hover {
  color: var(--color-devoteam-coral);
  opacity: 1;
  transform: scale(1.1);
}

.btn-footer-about-icon i {
  width: 14px;
  height: 14px;
}

/* RESPONSIVE DESIGN */
@media (max-width: 900px) {
  .suite-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .welcome-hero h2 {
    font-size: 2.25rem;
  }
  
  .welcome-hero p {
    font-size: 1rem;
  }
}

@media (max-width: 600px) {
  .portal-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
  }
  
  .header-meta {
    width: 100%;
    flex-wrap: wrap;
    gap: 0.75rem;
  }
  
  .meta-item, .user-badge {
    width: 100%;
    justify-content: center;
  }
}

/* ANIMATIONS DEFINITIONS */
@keyframes floatLogo {
  0% { transform: translateY(0); }
  100% { transform: translateY(-5px); }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================
   PORTAL CONFIGURATION MODAL & TOASTS
   ========================================================== */

/* Header Config Button - Icon only */
.btn-suite-config {
  background: #ffffff;
  border: 1px solid var(--color-border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  width: 36px;
  height: 36px;
  min-width: 36px;
  box-sizing: border-box;
  padding: 0;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: var(--transition-smooth);
}

.btn-suite-config i,
.btn-suite-config svg {
  width: 17px;
  height: 17px;
  color: var(--color-text-secondary);
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.2s ease;
}

.btn-suite-config:hover {
  background: var(--color-devoteam-coral-light);
  border-color: rgba(248, 72, 94, 0.35);
  box-shadow: 0 2px 8px rgba(248, 72, 94, 0.18);
}

.btn-suite-config:hover i,
.btn-suite-config:hover svg {
  color: var(--color-devoteam-coral);
  transform: rotate(60deg);
}

/* Modal Scroll Lock */
html.aitana-modal-open,
body.aitana-modal-open {
  overflow: hidden !important;
  overscroll-behavior: contain !important;
}

/* Modal Overlay */
.portal-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(17, 24, 39, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  animation: fadeIn 0.3s forwards cubic-bezier(0.16, 1, 0.3, 1);
}

.portal-modal-overlay.active {
  opacity: 1 !important;
  pointer-events: auto !important;
}

.portal-modal-overlay.active .portal-modal-container {
  transform: scale(1) !important;
  opacity: 1 !important;
}

/* Modal Container */
.portal-modal-container {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 580px;
  padding: 2rem;
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.12), 0 0 1px rgba(0, 0, 0, 0.1);
  transform: scale(0.92);
  animation: scaleUp 0.35s forwards cubic-bezier(0.34, 1.56, 0.64, 1);
}

.portal-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 1.25rem;
  margin-bottom: 1.5rem;
}

.modal-logo-container {
  background: var(--color-devoteam-coral-light);
  border: 1px solid rgba(248, 72, 94, 0.2);
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-logo-container i {
  width: 22px;
  height: 22px;
  color: var(--color-devoteam-coral);
}

.modal-title-group {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
}

.portal-modal-header .modal-title-group,
.modal-title-group.modal-title-column {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
}

.modal-title {
  font-family: var(--font-title);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-text-primary);
}

.modal-subtitle {
  font-size: 0.8rem;
  color: var(--color-text-secondary);
}

.btn-modal-close {
  background: transparent;
  border: none;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-secondary);
  transition: var(--transition-smooth);
}

.btn-modal-close:hover {
  background: #f1f3f5;
  color: var(--color-text-primary);
  transform: rotate(90deg);
}

/* Modal Body & Forms */
.portal-input-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.portal-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-title);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-text-primary);
}

.label-badge {
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border-radius: 8px;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-required {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.input-wrapper {
  position: relative;
  width: 100%;
}

.input-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--color-text-muted);
  pointer-events: none;
  transition: var(--transition-smooth);
}

.portal-input {
  width: 100%;
  background: #f9fafb;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem 0.85rem 2.75rem;
  color: var(--color-text-primary);
  font-family: monospace;
  font-size: 0.85rem;
  outline: none;
  transition: var(--transition-smooth);
}

.portal-input:focus {
  border-color: var(--color-devoteam-coral);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(248, 72, 94, 0.12);
}

.portal-input:focus + .input-icon {
  color: var(--color-devoteam-coral);
}

.input-help-text {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  line-height: 1.4;
  margin-top: 0.25rem;
}

/* Connection Status Panel */
.connection-status-panel {
  background: #f8f9fa;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 1.5rem;
  transition: var(--transition-smooth);
}

.status-content {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.status-icon-box {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition-smooth);
}

.status-icon-box i {
  width: 20px;
  height: 20px;
}

.status-text-group {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.status-title {
  font-family: var(--font-title);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-text-primary);
}

.status-desc {
  font-size: 0.78rem;
  color: var(--color-text-secondary);
}

/* Status variants */
.status-testing {
  border-color: rgba(248, 72, 94, 0.3);
  background: var(--color-devoteam-coral-light);
}
.status-testing .status-icon-box {
  background: rgba(248, 72, 94, 0.15);
  color: var(--color-devoteam-coral);
  animation: pulseIcon 1.5s infinite ease-in-out;
}

.status-success {
  border-color: rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.05);
}
.status-success .status-icon-box {
  background: rgba(16, 185, 129, 0.15);
  color: #059669;
}

.status-error {
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.05);
}
.status-error .status-icon-box {
  background: rgba(239, 68, 68, 0.15);
  color: #dc2626;
}

/* Modal Footer & Buttons */
.portal-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  border-top: 1px solid var(--color-border);
  padding-top: 1.25rem;
}

.btn-portal-secondary {
  background: #f1f3f5;
  border: 1px solid var(--color-border);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  color: var(--color-text-primary);
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-portal-secondary:hover {
  background: #e5e7eb;
  border-color: #cbd5e1;
}

.btn-portal-primary {
  background: var(--grad-primary);
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  color: #ffffff;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(248, 72, 94, 0.28);
  transition: var(--transition-smooth);
}

.btn-portal-primary:hover {
  background: linear-gradient(135deg, #ff5c70 0%, #e0364c 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(248, 72, 94, 0.4);
}

.btn-portal-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  color: #fff;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.2);
  transition: var(--transition-smooth);
}

.btn-portal-danger:hover {
  background: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
  transform: scale(1.02);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.35);
}

/* Dynamic Toasts */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 2000;
}

.portal-toast {
  background: #ffffff;
  border: 1px solid var(--color-border);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 320px;
  max-width: 450px;
  transform: translateX(120%);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.portal-toast.show {
  transform: translateX(0);
  opacity: 1;
}

.portal-toast i {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.toast-message {
  font-size: 0.88rem;
  color: var(--color-text-primary);
  line-height: 1.4;
}

/* Toast types */
.toast-success {
  border-left: 4px solid #10b981;
}
.toast-success i {
  color: #059669;
}

.toast-error {
  border-left: 4px solid #ef4444;
}
.toast-error i {
  color: #dc2626;
}

.toast-info {
  border-left: 4px solid var(--color-devoteam-coral);
}
.toast-info i {
  color: var(--color-devoteam-coral);
}

.toast-warning {
  border-left: 4px solid #f59e0b;
}
.toast-warning i {
  color: #d97706;
}

/* Animations Keyframes */
@keyframes fadeIn {
  to { opacity: 1; }
}

@keyframes scaleUp {
  to { transform: scale(1); }
}

@keyframes pulseIcon {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.1); opacity: 0.7; }
  100% { transform: scale(1); opacity: 1; }
}

.animate-spin {
  animation: spin 1s linear infinite;
  display: inline-block;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}


/* ==========================================================
   PORTAL CENTRALIZED SUITE CONFIG TABS & EXTENSIONS
   ========================================================== */

/* Large Modal Container for mapping tables and more complex fields */
.portal-modal-container.large {
  max-width: 1380px;
  width: 95%;
  display: flex;
  flex-direction: column;
  max-height: 90vh;
}

/* Modal Tabs Navigation */
.modal-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 1.5rem;
  padding-bottom: 0.25rem;
}

.modal-tab-btn {
  background: transparent;
  border: 1px solid transparent;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  color: var(--color-text-secondary);
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition-smooth);
}

.modal-tab-btn i {
  width: 16px;
  height: 16px;
  color: var(--color-text-muted);
  transition: var(--transition-smooth);
}

.modal-tab-btn:hover {
  color: var(--color-text-primary);
  background: #f8f9fa;
}

.modal-tab-btn.active {
  color: var(--color-devoteam-coral);
  background: var(--color-devoteam-coral-light);
  border-color: rgba(248, 72, 94, 0.25) rgba(248, 72, 94, 0.25) transparent rgba(248, 72, 94, 0.25);
  border-bottom: 2px solid var(--color-devoteam-coral);
  box-shadow: none;
}

.modal-tab-btn.active i {
  color: var(--color-devoteam-coral);
}

/* Tab Content Visibility */
.modal-tab-content {
  display: none;
  animation: fadeInTab 0.35s ease forwards;
  flex-grow: 1;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.modal-tab-content.active {
  display: block;
}

@keyframes fadeInTab {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Global Scrollbar customization (design matches webapp) */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f3f5;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Firefox scrollbar compatibility */
html {
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 #f1f3f5;
}

/* Magnifier row adjustments */
.input-with-button {
  display: flex;
  gap: 0.5rem;
}

.input-with-button .portal-input {
  flex-grow: 1;
}

.btn-input-action {
  background: var(--color-devoteam-coral-light);
  border: 1px solid rgba(248, 72, 94, 0.25);
  color: var(--color-devoteam-coral);
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: var(--transition-smooth);
}

.btn-input-action:hover {
  background: rgba(248, 72, 94, 0.15);
  border-color: rgba(248, 72, 94, 0.4);
  box-shadow: 0 2px 8px rgba(248, 72, 94, 0.2);
  transform: translateY(-1px);
}

.btn-input-action i {
  width: 18px;
  height: 18px;
}

/* Minimalist inside action button for inputs */
.btn-input-inside {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  transition: var(--transition-smooth);
}

.btn-input-inside:hover {
  color: var(--color-devoteam-coral) !important;
  background: var(--color-devoteam-coral-light) !important;
}

.btn-input-inside:hover i, .btn-input-inside:hover svg {
  color: var(--color-devoteam-coral) !important;
}

.btn-input-inside i, .btn-input-inside svg {
  width: 16px;
  height: 16px;
}

/* Prevent play (test filter) buttons from lighting up on hover */
#btn-test-jql-presales:hover, #btn-test-jql-projects:hover {
  color: var(--color-text-muted) !important;
  background: transparent !important;
}

#btn-test-jql-presales:hover i, #btn-test-jql-presales:hover svg,
#btn-test-jql-projects:hover i, #btn-test-jql-projects:hover svg {
  color: var(--color-text-muted) !important;
}

/* Search results container for fields in Jira */
.subunit-field-search-results {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-top: 0.75rem;
  max-height: 220px;
  overflow-y: auto;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.search-field-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid var(--color-border);
  background: var(--color-bg-secondary);
  transition: var(--transition-smooth);
  margin-bottom: 0.35rem;
}

.search-field-row:hover {
  background: var(--color-devoteam-coral-light);
  border-color: rgba(248, 72, 94, 0.35);
}

.search-field-badge {
  background: rgba(248, 72, 94, 0.12);
  color: var(--color-devoteam-coral);
  border: 1px solid rgba(248, 72, 94, 0.25);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  text-transform: uppercase;
}

.search-field-row:hover .search-field-badge {
  background: var(--grad-primary);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(248, 72, 94, 0.3);
}

/* Premium mapping table styles */
.mapping-table-container {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: #ffffff;
  overflow: hidden;
  margin-top: 1rem;
}

.mapping-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
}

.mapping-table th {
  background: #f8f9fa;
  padding: 0.85rem 1rem;
  font-family: var(--font-title);
  font-weight: 700;
  color: var(--color-text-secondary);
  border-bottom: 1px solid var(--color-border);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.mapping-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
  color: var(--color-text-primary);
}

.mapping-table tr:last-child td {
  border-bottom: none;
}

.mapping-table tr {
  transition: var(--transition-smooth);
}

.mapping-table tr:hover {
  background: #f9fafb;
}

.mapping-group-input {
  width: 100%;
  background: #f9fafb;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  color: var(--color-text-primary);
  font-size: 0.82rem;
  font-family: monospace;
  outline: none;
  transition: var(--transition-smooth);
}

.mapping-group-input:focus {
  border-color: var(--color-devoteam-coral);
  background: #ffffff;
  box-shadow: 0 0 0 2px rgba(248, 72, 94, 0.15);
}

.action-row-buttons {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.info-alert-banner {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius-md);
  padding: 1rem;
  color: #92400e;
  font-size: 0.82rem;
  line-height: 1.4;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.info-alert-banner i {
  color: #d97706;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
}

/* LIGHT THEME AND DEVOTEAM STYLING FOR PORTAL SELECTS */
.portal-select {
  background: #ffffff !important;
  border: 1px solid var(--color-border) !important;
  border-radius: 6px !important;
  color: var(--color-text-primary) !important;
  cursor: pointer !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2356555A' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 0.75rem center !important;
  background-size: 0.85rem !important;
  padding-right: 2.2rem !important;
  transition: border-color 0.2s, box-shadow 0.2s !important;
}

.portal-select:focus {
  border-color: var(--color-devoteam-coral) !important;
  box-shadow: 0 0 0 3px rgba(248, 72, 94, 0.12) !important;
  outline: none !important;
}

.portal-select option {
  background-color: #ffffff !important;
  color: #1e293b !important;
}

/* --- DB ONBOARDING WIZARD & SETTINGS STYLES --- */
.db-select-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid var(--color-border);
}
.db-select-card:hover {
  transform: translateY(-2px);
  background: #f8f9fa !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}
.db-select-card.active {
  background: var(--color-devoteam-coral-light) !important;
  border-color: var(--color-devoteam-coral) !important;
}

.db-segment-btn {
  transition: all 0.2s ease;
}
.db-segment-btn:not(.active):hover {
  color: var(--color-text-primary) !important;
  background: #f1f3f5 !important;
}

.step-dot {
  position: relative;
}
.step-dot.active .dot-circle {
  box-shadow: 0 0 10px rgba(248, 72, 94, 0.35);
}
.step-dot.completed .dot-circle {
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.25);
}


