:root {
  /* Light Theme (Default) */
  --bg-color: #e0e5ec;
  --text-color: #4a5568;
  --text-muted: #94a3b8;
  --shadow-light: -9px -9px 16px rgba(255, 255, 255, 0.8);
  --shadow-dark: 9px 9px 16px rgba(163, 177, 198, 0.6);
  --input-inner-shadow: inset 6px 6px 10px 0 rgba(163, 177, 198, 0.7),
    inset -6px -6px 10px 0 rgba(255, 255, 255, 0.8);

  --primary-color: #6366f1;
  /* Indigo */
  --secondary-color: #8b5cf6;
  /* Violet */
  --success-color: #10b981;
  /* Emerald */
  --warning-color: #f59e0b;
  /* Amber */
  --danger-color: #ef4444;
  /* Red */

  --card-bg: #e0e5ec;
  --border-radius: 20px;
  --border-color: rgba(0, 0, 0, 0.1);
  --tertiary-bg: rgba(255, 255, 255, 0.25);
  --hover-bg: rgba(0, 0, 0, 0.05);
}

body.dark-mode {
  --bg-color: #1e293b;
  --text-color: #f1f5f9;
  --text-muted: #cbd5e1;
  --shadow-light: -5px -5px 10px rgba(255, 255, 255, 0.05);
  --shadow-dark: 5px 5px 10px rgba(0, 0, 0, 0.5);
  --input-inner-shadow: inset 5px 5px 10px rgba(0, 0, 0, 0.5),
    inset -5px -5px 10px rgba(255, 255, 255, 0.05);
  --card-bg: #1e293b;
  --border-color: rgba(255, 255, 255, 0.1);
  --tertiary-bg: rgba(255, 255, 255, 0.05);
  --hover-bg: rgba(255, 255, 255, 0.1);
  background: radial-gradient(
    ellipse at top,
    #1e293b 0%,
    hsl(217, 33%, 14%) 100%
  );
}

body.dark-mode::before {
  opacity: 0.02;
}

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");
@import "responsive.css";
@import "gantt_fixes.css";

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Inter", sans-serif;
  transition: background-color 0.3s, color 0.3s, box-shadow 0.3s;
}

body {
  background: radial-gradient(
    ellipse at top,
    var(--bg-color) 0%,
    hsl(215, 16%, 86%) 100%
  );
  color: var(--text-color);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem;
  position: relative;
}

/* Subtle noise texture overlay */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' /%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.4'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: -1;
}

h1,
h2,
h3 {
  margin-bottom: 1rem;
  font-weight: 700;
  font-family: "Inter", sans-serif; /* Changed to Inter for cleaner look */
  letter-spacing: -0.02em;
}

.container {
  width: 95%;
  /* Full width usage */
  max-width: 1800px;
  margin: 0 auto;
}

/* Neomorphism Card */
.glass-card {
  /* Keeping class name for compatibility, but styling is Neomorphic */
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-dark), var(--shadow-light);
  border: none;
  /* Remove glass border */
}

/* Buttons */
.btn {
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  color: var(--primary-color);
  background-color: var(--bg-color);
  box-shadow: var(--shadow-dark), var(--shadow-light);
  transition: all 0.2s ease;
}

.btn:active {
  box-shadow: var(--input-inner-shadow);
  transform: translateY(2px);
}

.btn-primary {
  color: #fff;
  background-color: #10b981;
  /* Green */
}

.btn-danger {
  color: var(--danger-color);
}

/* Project Card Container */
.project-card {
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-dark), var(--shadow-light);
  margin-bottom: 2rem;
  position: relative; /* Create stacking context */
  z-index: 1;
  transition: all 0.3s ease;
}

.project-card:hover {
  z-index: 100 !important; /* Force high z-index on hover */
  transform: translateY(-5px);
}

.project-card-header {
  position: relative;
  z-index: 20; /* Ensure header is above carousel */
}

.phase-carousel {
  position: relative;
  z-index: 10; /* Lower than header */
}

/* Inputs */
.form-group {
  margin-bottom: 1.5rem;
}

.form-row {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.half-width {
  flex: 1;
  margin-bottom: 0;
  /* Override form-group margin inside row */
}

.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background-color: var(--bg-color);
  padding: 1rem;
  border-radius: 12px;
  box-shadow: var(--input-inner-shadow);
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: normal;
  cursor: pointer;
  margin-bottom: 0;
}

.checkbox-label input[type="checkbox"] {
  width: auto;
  margin: 0;
  box-shadow: none;
  /* Reset shadow for checkbox */
}

label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
}

input,
textarea,
select {
  width: 100%;
  padding: 1rem;
  background-color: var(--bg-color);
  border: none;
  border-radius: 12px;
  color: var(--text-color);
  font-size: 1rem;
  box-shadow: var(--input-inner-shadow);
  outline: none;
}

input:focus,
textarea:focus,
select:focus {
  box-shadow: var(--input-inner-shadow), 0 0 5px var(--primary-color);
}

/* Table */
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 1rem;
  /* Space between rows */
  margin-top: 1rem;
}

th {
  padding: 1rem;
  text-align: left;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}

td {
  padding: 1.25rem 1rem;
  /* More vertical breathing room */
  background-color: var(--bg-color);
  box-shadow: var(--shadow-dark), var(--shadow-light);
  vertical-align: middle;
}

tr td:first-child {
  border-top-left-radius: 12px;
  border-bottom-left-radius: 12px;
}

tr td:last-child {
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
}

/* Column Widths */
.col-index {
  width: 40px;
  text-align: center;
}

.col-resource {
  width: 25%;
}

.col-desc {
  width: 20%;
}

.col-responsible {
  width: 15%;
}

.col-duration {
  width: 10%;
}

.col-date {
  width: 15%;
}

.col-status {
  width: 10%;
  text-align: center;
}

.col-action {
  width: 10%;
  text-align: center;
}

/* Inputs inside table */
.table-input {
  width: 100%;
  max-width: 100%;
  padding: 0.5rem;
  border: none;
  background: transparent;
  color: var(--text-color);
  font-size: 0.9rem;
  box-sizing: border-box;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap; /* Prevent wrapping causing height issues */
}

.table-input:focus {
  outline: none;
  background: var(--bg-color);
  box-shadow: var(--input-inner-shadow);
  border-radius: 8px;
  overflow: visible;
  text-overflow: clip;
  white-space: normal; /* Allow wrapping when editing */
  position: relative; /* Ensure it stays on top */
  z-index: 10;
  min-width: 100%; /* Expand if needed */
}

/* Badges */
.status-badge {
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  box-shadow: var(--shadow-dark), var(--shadow-light);
}

.status-pending {
  color: var(--warning-color);
}

.status-done {
  color: var(--success-color);
}

/* Project Type Badges with Shiny Gradients */
.project-type-badge {
  display: inline-block;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15),
    inset 0 1px 2px rgba(255, 255, 255, 0.3);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.project-type-badge::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transform: rotate(45deg);
  animation: shine 3s infinite;
}

@keyframes shine {
  0% {
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
  }
  100% {
    transform: translateX(100%) translateY(100%) rotate(45deg);
  }
}

/* Fire Ember - ESTÁNDAR */
.badge-standard {
  background: linear-gradient(135deg, #ff6b35 0%, #f7931e 50%, #ff4500 100%);
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Golden Hour - ENTERPRISE */
.badge-enterprise {
  background: linear-gradient(135deg, #f9a825 0%, #ffc107 50%, #ffb300 100%);
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Fresh Mint - DEMO */
.badge-demo {
  background: linear-gradient(135deg, #00d4aa 0%, #00e5bf 50%, #00c9a7 100%);
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Header & Nav */
.header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding: 1rem 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-dark), var(--shadow-light);
  background-color: var(--bg-color);
}

/* Logo Optimization */
.logo-container {
  height: 40px;
  display: flex;
  align-items: center;
  overflow: hidden; /* Crop excess whitespace */
}

.logo-container img {
  height: 160%; /* Scale up to hide whitespace */
  width: auto;
  margin-top: -5%; /* Center vertically after scaling */
  object-fit: contain;
}

/* Nav Greeting */
.nav-greeting {
  font-weight: 500;
  color: var(--text-muted);
  margin-right: 0.5rem;
  font-size: 0.9rem;
  cursor: default;
  user-select: none;
  opacity: 0.85;
  min-width: 140px; /* Fixed width to prevent menu shifting */
  text-align: right; /* Align text to the right for consistency */
}

.nav {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  min-width: 650px; /* Fixed minimum width to prevent shifting */
  justify-content: flex-end; /* Align items to the right for consistency */
}

.nav a {
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  font-weight: 600;
  transition: all 0.2s;
}

.nav a:hover {
  color: var(--primary-color);
}

.nav a.active {
  color: var(--primary-color);
  box-shadow: var(--input-inner-shadow);
  /* Pressed look for active */
}

/* Logout Button */
.btn-logout {
  padding: 0; /* Remove padding to fit icon */
  border-radius: 12px;
  border: none;
  background: var(--bg-color);
  box-shadow: var(--shadow-dark), var(--shadow-light);
  color: var(--danger-color);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  width: 40px; /* Fixed width */
  height: 40px; /* Fixed height */
  min-width: 40px; /* Prevent shrinking */
}

.btn-logout:hover {
  color: #ff0000;
  transform: scale(1.05);
}

.btn-logout:active {
  box-shadow: var(--input-inner-shadow);
  transform: scale(0.95);
}

.btn-logout svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

/* Theme Toggle */
.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.5rem;
  color: var(--text-color);
  padding: 0.5rem;
  border-radius: 50%;
  box-shadow: var(--shadow-dark), var(--shadow-light);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
}

/* --- Icon Buttons --- */
.icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--bg-color);
  box-shadow: var(--shadow-light);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--text-muted);
}

.icon-btn:hover {
  color: var(--primary-color);
  transform: translateY(-1px);
}

.icon-btn:active {
  box-shadow: var(--input-inner-shadow);
  transform: translateY(1px);
}

.icon-btn.active {
  background-color: var(--success-color);
  color: white;
  box-shadow: var(--input-inner-shadow);
}

.icon-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.action-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.theme-toggle:active {
  box-shadow: var(--input-inner-shadow);
}

/* Visual Indicators (Traffic Light) */
/* Visual Indicators (Traffic Light) - Full Row Coloring */
.row-delivered td {
  background-color: rgba(16, 185, 129, 0.4) !important;
  /* Increased saturation */
  border-bottom: 1px solid rgba(16, 185, 129, 0.5);
}

.row-warning td {
  background-color: rgba(245, 158, 11, 0.4) !important;
  /* Increased saturation */
  border-bottom: 1px solid rgba(245, 158, 11, 0.5);
}

.row-overdue td {
  background-color: rgba(239, 68, 68, 0.4) !important;
  /* Increased saturation */
  border-bottom: 1px solid rgba(239, 68, 68, 0.5);
}

.action-cell {
  text-align: center;
  vertical-align: middle;
}

.action-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  width: 100%;
  height: 100%;
}

.index-cell {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-muted);
  text-align: center;
  vertical-align: middle;
  width: 50px;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(5px);
}

.modal-content {
  background-color: var(--card-bg);
  margin: 15% auto;
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-dark), var(--shadow-light);
  width: 500px;
  max-width: 90%;
  position: relative;
}

.close {
  color: var(--text-muted);
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.close:hover,
.close:focus {
  color: var(--text-color);
  text-decoration: none;
  cursor: pointer;
}

/* Drag and Drop */
.draggable-row {
  cursor: grab;
}

.draggable-row:active {
  cursor: grabbing;
}

.dragging {
  opacity: 0.5;
  background-color: var(--bg-color);
  box-shadow: var(--input-inner-shadow);
}

.drag-handle {
  cursor: grab;
  color: var(--text-muted);
  font-size: 1.2rem;
  line-height: 1;
  user-select: none;
}

.drag-handle:active {
  cursor: grabbing;
  color: var(--primary-color);
}

.drop-placeholder {
  background-color: #f3f4f6;
  border: 2px dashed #cbd5e1;
  height: 60px;
  /* Approximate row height */
}

/* Drop position indicators */
.drag-over-top td:first-child::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary-color);
  border-radius: 2px;
}

.drag-over-bottom td:first-child::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary-color);
  border-radius: 2px;
}

.drag-over-top td:first-child,
.drag-over-bottom td:first-child {
  position: relative;
}

.draggable-row:hover {
  background-color: var(--hover-bg);
}

/* Glassmorphism Modal Input */
.glass-input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-color);
  padding: 0.8rem;
  border-radius: 8px;
  width: 100%;
  margin-top: 0.5rem;
}
.glass-input:focus {
  outline: none;
  border-color: var(--primary-color);
  background: rgba(255, 255, 255, 0.1);
}
/* Full Page Alert */
.full-page-alert {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(5px);
  justify-content: center;
  align-items: center;
}

.modal-alert-content {
  background-color: var(--card-bg);
  margin: auto;
  padding: 2.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-dark), var(--shadow-light);
  max-width: 400px;
  width: 90%;
  text-align: center;
  animation: fadeIn 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.modal-alert-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

/* Group Box for Form Sections */
.group-box {
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.dark-mode .group-box {
  background: rgba(30, 41, 59, 0.5);
  border-color: rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
}

.group-box-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 1rem;
  opacity: 0.9;
  border-bottom: 2px solid var(--primary-color);
  display: inline-block;
  padding-bottom: 0.25rem;
}

/* New Billing Section Layout (List View) */
.billing-container {
    background-color: var(--card-bg);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--input-inner-shadow); /* Inner shadow for "sunken" look or regular shadow? User said "original look". Let's use inner for container or just flat. Let's use standard card style but maybe inset. */
    /* Actually users usually prefer the "glass-card" look. Let's make it clean. */
    background: rgba(255,255,255,0.4);
    border: 1px solid rgba(255,255,255,0.2);
}

.dark-mode .billing-container {
    background: rgba(30, 41, 59, 0.4);
}

.billing-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(163, 177, 198, 0.2);
    gap: 1rem;
}

.dark-mode .billing-row {
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

.billing-row:last-child {
    border-bottom: none;
}

.billing-label {
    flex: 0 0 40%; /* Fixed width for labels */
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.billing-control {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Left align controls */
    gap: 1rem;
}

/* Custom Radio Styling for "Green" look if requested, or standard */
/* Image 1 shows big outlined circles. Let's keep system default or enhance slightly. */
/* For now, let's use the standard checkboxes/radios but layout them nicely. */

.radio-option {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-color);
}

.radio-option input[type="radio"] {
    width: 1.2rem;
    height: 1.2rem;
    box-shadow: none; /* simpler look */
    accent-color: var(--success-color); /* Green accent to match Image 1's vibe */
}


.modal-alert-message {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.alert-btn {
  width: 100%;
  max-width: 200px;
  margin-top: 0.5rem;
}
/* Alert Banner Styles */
.alert-banner {
  display: flex;
  align-items: stretch;
  background-color: var(--bg-color);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-dark), var(--shadow-light);
  margin-bottom: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.alert-icon-box {
  background-color: var(--warning-color);
  color: white;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  position: relative;
  min-width: 60px;
}

/* Triangle pointer */
.alert-icon-box::after {
  content: "";
  position: absolute;
  right: -8px;
  top: 50%;
  transform: translateY(-50%);
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 8px solid var(--warning-color);
  z-index: 1;
}

.alert-content {
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  color: var(--text-color);
  font-weight: 500;
  font-size: 0.95rem;
}

.alert-title {
  font-weight: 700;
  margin-right: 0.5rem;
  color: var(--text-color);
}

/* Halo Effect for Navigation Cards */
a.glass-card {
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
}

a.glass-card:hover {
  transform: translateY(-5px);
  z-index: 10;
}

/* Sales Card Halo (Primary Color - Indigo) */
.card-sales:hover {
  box-shadow: 0 0 30px rgba(99, 102, 241, 0.4),
    /* Subtle colored glow */ var(--shadow-dark), var(--shadow-light);
}

/* Development Card Halo (Secondary Color - Violet) */
.card-dev:hover {
  box-shadow: 0 0 30px rgba(139, 92, 246, 0.4),
    /* Subtle colored glow */ var(--shadow-dark), var(--shadow-light);
}

/* Calendar Card Halo (Green) */
.card-calendar:hover {
  box-shadow: 0 0 30px rgba(16, 185, 129, 0.4),
    /* Subtle colored glow */ var(--shadow-dark), var(--shadow-light);
}

body.dark-mode .card-sales:hover {
  box-shadow: 0 0 35px rgba(99, 102, 241, 0.5), var(--shadow-dark),
    var(--shadow-light);
}

body.dark-mode .card-dev:hover {
  box-shadow: 0 0 35px rgba(139, 92, 246, 0.5), var(--shadow-dark),
    var(--shadow-light);
}

body.dark-mode .card-calendar:hover {
  box-shadow: 0 0 35px rgba(16, 185, 129, 0.5), var(--shadow-dark),
    var(--shadow-light);
}
/* Role Warning Alert */
.role-warning-container {
  display: flex;
  align-items: stretch;
  background-color: var(--bg-color); /* Matches card bg or slightly darker */
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-light), var(--shadow-dark); /* Neomorphic look */
}

.role-warning-icon {
  background-color: var(--warning-color);
  width: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white; /* or dark depending on contrast */
  font-weight: bold;
  font-size: 1.5rem;
  position: relative;
}

/* Little triangle pointer */
.role-warning-icon::after {
  content: "";
  position: absolute;
  right: -8px;
  top: 50%;
  transform: translateY(-50%);
  border-left: 8px solid var(--warning-color);
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  z-index: 1;
}

.role-warning-text {
  padding: 1rem;
  font-size: 0.9rem;
  color: var(--text-color);
  flex: 1;
  display: flex;
  align-items: center;
  background: var(--bg-color); /* Ensure contrast */
}

.role-warning-text strong {
  margin-right: 0.5rem;
  color: var(--text-color);
}

/* Toggle Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 20px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--text-muted); /* Default grey */
  transition: 0.4s;
  border-radius: 20px;
  opacity: 0.5;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

input:checked + .slider {
  background-color: var(--primary-color);
  opacity: 1;
}

input:checked + .slider:before {
  transform: translateX(20px);
}

/* --- Global Search Styles --- */
.search-container {
  position: relative;
  display: flex;
  align-items: center;
  margin-right: 1rem;
}

.search-input {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 0.5rem 1rem 0.5rem 2.2rem; /* Space for icon */
  font-size: 0.9rem;
  color: var(--text-color);
  width: 220px;
  transition: all 0.3s ease;
  box-shadow: inset 2px 2px 5px rgba(0, 0, 0, 0.05);
}

.search-input:focus {
  width: 300px;
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.search-icon {
  position: absolute;
  left: 10px;
  color: var(--text-muted);
  pointer-events: none;
  width: 16px;
  height: 16px;
}

/* Hide on mobile if needed, or adjust */
@media (max-width: 768px) {
  .search-input {
    width: 150px;
  }
  .search-input:focus {
    width: 200px;
  }
}

/* --- Scope Creep Styles (Violet) --- */
.row-scope-creep {
  background-color: rgba(139, 92, 246, 0.1) !important; /* light violet */
}

/* Violet border for phase circles */
.scope-creep .phase-step-circle {
  border: 3px double #8b5cf6 !important;
  box-shadow: 0 0 5px rgba(139, 92, 246, 0.5);
}

.badge-extra {
  font-size: 0.65rem;
  font-weight: 800;
  color: white;
  background-color: #8b5cf6; /* Violet */
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  user-select: none;
  flex-shrink: 0;
}

/* --- Info Icon (Violet Circle) --- */
.info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: #8b5cf6; /* Violet */
  color: white;
  font-size: 12px;
  font-weight: bold;
  cursor: help;
  margin-left: 0.5rem;
  position: relative;
  flex-shrink: 0;
  box-shadow: 0 2px 4px rgba(139, 92, 246, 0.3);
  z-index: 1; /* Normal z-index */
}

.info-icon:hover {
  transform: scale(1.1);
  background-color: #7c3aed; /* Darker violet on hover */
  z-index: 9999; /* Bring icon and tooltip to absolute front on hover */
}

/* --- Tooltip Styles (Restored) --- */
.tooltip {
  visibility: hidden;
  width: 250px;
  background-color: rgba(
    224,
    229,
    236,
    0.95
  ); /* Glassmorphic Light (match Minificha) */
  backdrop-filter: blur(10px);
  color: var(--text-color); /* Dark text */
  text-align: left;
  border-radius: 12px;
  padding: 1rem;
  position: absolute;
  z-index: 10000; /* Absolute highest priority */
  top: 120%; /* Position below icon */
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
  opacity: 0;
  transition: opacity 0.3s;
  font-weight: 400;
  font-size: 0.85rem;
  font-size: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.6); /* Lighter border for glass effect */
  pointer-events: none; /* Prevent flickering */
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1),
    0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

.info-icon:hover .tooltip {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

/* Arrow for tooltip */
.tooltip::after {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: transparent transparent var(--card-bg) transparent;
}
