@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Space+Mono:wght@400;700&display=swap');

:root {
  /* Industrial / Construction Site Palette (Softened for Light Mode) */
  --bg-main: #f1f5f9; /* Softer Slate 100 */
  --bg-panel: #ffffff; /* Clean White */
  --bg-dark: #1e293b; /* Softer Dark Steel */
  --bg-asphalt: #334155;
  
  --primary-orange: #f97316; /* Softer Safety Orange */
  --primary-orange-hover: #ea580c;
  --orange-light: #fff7ed;
  
  --border-color: #e2e8f0; /* Softer borders */
  --border-heavy: #475569;
  
  --text-main: #334155; /* Slate 700 instead of 900 for less contrast glare */
  --text-muted: #64748b; /* Slate 500 */
  --text-light: #ffffff;
  
  --font-main: 'Outfit', sans-serif;
  --font-mono: 'Space Mono', monospace;
  
  /* Button and surface palettes */
  --btn-bg: #ffffff;
  --btn-color: var(--primary-orange);
  --btn-hover-bg: var(--primary-orange);
  --btn-hover-color: #ffffff;
  --control-bg: #ffffff;
  --control-border: var(--border-color);
  --control-text: var(--text-main);
  --surface-bg: #ffffff;
  --surface-border: var(--border-color);
  --surface-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  --bg-overlay: rgba(0, 0, 0, 0.6);
  
  /* Task Priorities */
  --priority-high: #dc2626; /* Warning Red */
  --priority-medium: #ff6b00; /* Safety Orange */
  --priority-low: #2563eb; /* Steel Blue */
}

body.dark-mode {
  --bg-main: #080b16;
  --bg-panel: #111827;
  --bg-dark: #0f172a;
  --bg-asphalt: #020617;
  --primary-orange: #ff9e42;
  --primary-orange-hover: #d97706;
  --orange-light: #1f2937;
  --border-color: #334155;
  --border-heavy: #475569;
  --text-main: #e2e8f0;
  --text-muted: #94a3b8;
  --text-light: #f8fafc;
  --btn-bg: #111827;
  --btn-color: var(--primary-orange);
  --btn-hover-bg: var(--primary-orange);
  --btn-hover-color: #ffffff;
  --control-bg: #0f172a;
  --control-border: #334155;
  --control-text: #e2e8f0;
  --surface-bg: #111827;
  --surface-border: #334155;
  --surface-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --bg-overlay: rgba(0, 0, 0, 0.85);
}

body.dark-mode .btn-cyber {
  background: var(--btn-bg);
  color: var(--btn-color);
  border-color: var(--primary-orange);
}

body.dark-mode .btn-cyber:hover {
  background: var(--btn-hover-bg);
  color: var(--btn-hover-color);
}

body.dark-mode .btn-cyber.btn-cyber-purple {
  color: var(--text-main);
  border-color: var(--text-main);
}

body.dark-mode .btn-cyber.btn-cyber-purple:hover {
  background: var(--btn-hover-bg);
  color: var(--btn-hover-color);
}

body.dark-mode .btn-cyber:disabled {
  background: #334155;
  border-color: #475569;
  color: #64748b;
}

body.dark-mode .form-control-cyber,
body.dark-mode .form-select-cyber {
  background: var(--control-bg);
  border-color: var(--control-border);
  color: var(--control-text);
}

body.dark-mode .form-select-cyber option {
  background-color: var(--control-bg);
  color: var(--control-text);
}

body.dark-mode .task-card,
body.dark-mode .idea-card,
body.dark-mode .modal-content-cyber {
  background: var(--surface-bg) !important;
  border-color: var(--surface-border) !important;
  box-shadow: var(--surface-shadow) !important;
}

body.dark-mode .idea-card::before {
  background: var(--primary-orange);
}

body.dark-mode .task-card,
body.dark-mode .idea-card {
  color: var(--text-main);
}

body.dark-mode .task-card p,
body.dark-mode .idea-card p,
body.dark-mode .task-card .text-muted,
body.dark-mode .idea-card .text-muted {
  color: var(--text-muted) !important;
}

body.dark-mode .task-card:hover {
  border-color: var(--primary-orange);
  box-shadow: 0 4px 12px rgba(255, 159, 66, 0.18);
}

body.dark-mode .priority-high {
  background: rgba(220, 38, 38, 0.12);
  color: #fecaca;
  border-color: rgba(248, 113, 113, 0.35);
}

body.dark-mode .priority-medium {
  background: rgba(255, 107, 0, 0.12);
  color: #ffddb0;
  border-color: rgba(251, 146, 60, 0.35);
}

body.dark-mode .priority-low {
  background: rgba(37, 99, 235, 0.12);
  color: #bfdbfe;
  border-color: rgba(191, 219, 254, 0.35);
}

body.dark-mode .voting-bar-container {
  background: #1f2937;
}

body.dark-mode .vote-btn {
  background: #111827;
  border-color: #334155;
  color: var(--text-main);
}

body.dark-mode .vote-btn:hover {
  background: #1e293b;
}

body.dark-mode .vote-btn.active-no {
  background: #0f172a;
  color: #cbd5e1;
  border-color: #475569;
}

body.dark-mode .alert-danger {
  background-color: #3b131b;
  color: #fecaca;
  border-color: #991b1b;
}

body.dark-mode .table-dark {
  --bs-table-bg: #111827 !important;
  --bs-table-color: var(--text-main) !important;
  --bs-table-hover-bg: #0f172a !important;
  --bs-table-hover-color: var(--text-main) !important;
  border-color: #334155 !important;
}

.text-accent {
  color: #ff9e42;
}

body.dark-mode .table-dark th {
  background-color: #111827 !important;
  color: var(--primary-orange) !important;
}

body.dark-mode .table-dark td {
  background-color: #0b1220 !important;
  color: var(--text-main) !important;
}

body.dark-mode .table-dark .member-role-select {
  background-color: #0b1220 !important;
  color: var(--text-main) !important;
  border: 2px solid #334155 !important;
}

body.dark-mode #loading-overlay {
  background-color: var(--bg-overlay) !important;
}

body.dark-mode #loading-overlay h4,
body.dark-mode #loading-overlay .spinner-border {
  color: var(--primary-orange) !important;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: var(--primary-orange);
  border: 2px solid #f1f5f9;
  border-radius: 6px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary-orange-hover);
}

@media (max-width: 768px) {
  ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
  }
}

@media (max-width: 576px) {
  ::-webkit-scrollbar {
    width: 6px;
    height: 6px;
  }
}

body {
  background-color: var(--bg-main);
  /* Blueprint Grid Pattern */
  background-image: 
    linear-gradient(rgba(255, 107, 0, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 107, 0, 0.05) 1px, transparent 1px);
  background-size: 24px 24px;
  background-attachment: fixed;
  color: var(--text-main);
  font-family: var(--font-main);
  min-height: 100vh;
  overflow-x: hidden;
}

@media (max-width: 768px) {
  body {
    background-size: 20px 20px;
  }
}

@media (max-width: 576px) {
  body {
    background-size: 16px 16px;
    font-size: 14px;
  }
}

/* Typography Overrides */
h1, h2, h3, h4, h5, h6 {
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--text-main);
}

@media (max-width: 768px) {
  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  h3 {
    font-size: 1.25rem;
  }

  h4 {
    font-size: 1.1rem;
  }

  h5 {
    font-size: 1rem;
  }

  h6 {
    font-size: 0.95rem;
  }
}

@media (max-width: 576px) {
  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.25rem;
  }

  h3 {
    font-size: 1.1rem;
  }

  h4 {
    font-size: 1rem;
  }

  h5 {
    font-size: 0.9rem;
  }

  h6 {
    font-size: 0.85rem;
  }
}

.font-monospace {
  font-family: var(--font-mono) !important;
}

/* Override bootstrap text-muted to ensure visibility */
.text-muted {
  color: var(--text-muted) !important;
}

.text-info {
  color: var(--primary-orange) !important;
}

/* Alert styling overrides */
.alert {
  border-radius: 8px;
  font-family: var(--font-mono);
  border: 2px solid currentColor;
}
.alert-danger {
  background-color: #fef2f2;
  color: #991b1b;
}

/* Glassmorphism to Industrial Panel conversion */
.glass-panel {
  background: var(--bg-panel);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  overflow: hidden;
}

/* Caution Tape Header Accent */
.glass-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: repeating-linear-gradient(
    -45deg,
    var(--primary-orange),
    var(--primary-orange) 10px,
    var(--bg-dark) 10px,
    var(--bg-dark) 20px
  );
  z-index: 10;
}

.glass-panel:hover {
  border-color: var(--primary-orange);
  box-shadow: 0 8px 24px rgba(255, 107, 0, 0.1);
}

@media (max-width: 768px) {
  .glass-panel {
    border-radius: 10px;
    padding: 1rem !important;
  }
}

@media (max-width: 576px) {
  .glass-panel {
    border-radius: 8px;
    padding: 0.75rem !important;
  }
}

/* Overriding Bootstrap light text inside panels for readability */
.glass-panel .text-light,
.glass-panel .text-white,
.task-card .text-light,
.task-card .text-white,
.idea-card .text-light,
.idea-card .text-white,
.modal-body .text-white,
.modal-body label {
  color: var(--text-main) !important;
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary-orange) 0%, var(--bg-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
  text-shadow: none;
}

/* Industrial Buttons */
.btn-cyber {
  background: #ffffff;
  border: 2px solid var(--primary-orange);
  color: var(--primary-orange);
  font-family: var(--font-mono);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 0.5rem 1.25rem;
  border-radius: 6px;
  position: relative;
  overflow: hidden;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(255, 107, 0, 0.05);
}

.btn-cyber:hover {
  background: var(--primary-orange);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(255, 107, 0, 0.2);
  transform: translateY(-1px);
}

@media (max-width: 768px) {
  .btn-cyber {
    padding: 0.45rem 1rem;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
  }
}

@media (max-width: 576px) {
  .btn-cyber {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    letter-spacing: 0px;
    width: 100%;
    text-align: center;
  }
}

.btn-cyber-purple {
  border-color: var(--bg-dark);
  color: var(--bg-dark);
}

.btn-cyber-purple:hover {
  background: var(--bg-dark);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
}

.btn-cyber-success {
  border-color: #16a34a;
  color: #16a34a;
}
.btn-cyber-success:hover {
  background: #16a34a;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.2);
}

.btn-cyber-danger {
  border-color: #dc2626;
  color: #dc2626;
}
.btn-cyber-danger:hover {
  background: #dc2626;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
}

.btn-cyber:disabled {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #94a3b8;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

/* Industrial Form Controls */
.form-control-cyber {
  background: #ffffff;
  border: 2px solid var(--border-color);
  color: var(--text-main) !important;
  border-radius: 6px;
  padding: 0.75rem 1rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.form-control-cyber:focus {
  background: #ffffff;
  border-color: var(--primary-orange);
  box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.15);
  outline: none;
}

.form-control-cyber::placeholder {
  color: #94a3b8;
}

.form-select-cyber {
  background-color: #ffffff;
  border: 2px solid var(--border-color);
  color: var(--text-main);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  font-weight: 500;
  transition: all 0.2s ease;
}
.form-select-cyber:focus {
  border-color: var(--primary-orange);
  box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.15);
}
.form-select-cyber option {
  background-color: #ffffff;
  color: var(--text-main);
}

@media (max-width: 768px) {
  .form-control-cyber,
  .form-select-cyber {
    padding: 0.65rem 0.9rem;
    font-size: 0.95rem;
  }
}

@media (max-width: 576px) {
  .form-control-cyber,
  .form-select-cyber {
    padding: 0.6rem 0.8rem;
    font-size: 0.9rem;
    width: 100%;
  }
}

/* Auth Page layout */
.auth-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1.25rem;
}

.auth-card {
  width: 100%;
  max-width: 450px;
  padding: 2.5rem;
  background: var(--bg-panel);
  border: 3px solid var(--primary-orange);
  border-radius: 12px;
  box-shadow: 0 10px 25px -5px rgba(255, 107, 0, 0.1);
}

@media (max-width: 576px) {
  .auth-container {
    padding: 1rem;
  }

  .auth-card {
    padding: 1.5rem;
    border: 2px solid var(--primary-orange);
  }
}

/* Kanban Board Layout */
.kanban-board-wrapper {
  overflow-x: auto;
  padding-bottom: 1.5rem;
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  min-height: calc(100vh - 200px);
}

.kanban-column {
  width: 320px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 220px);
  padding: 1.25rem;
  border-radius: 12px;
  background: var(--bg-panel);
  border: 2px solid var(--border-color);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

@media (max-width: 1200px) {
  .kanban-board-wrapper {
    gap: 1rem;
    min-height: auto;
  }

  .kanban-column {
    width: 280px;
    max-height: calc(100vh - 240px);
    padding: 1rem;
  }
}

@media (max-width: 992px) {
  .kanban-board-wrapper {
    gap: 1rem;
    padding: 1rem 0;
  }

  .kanban-column {
    width: 280px;
    max-height: calc(100vh - 260px);
    padding: 1rem;
  }
}

@media (max-width: 768px) {
  .kanban-board-wrapper {
    flex-direction: column;
    gap: 1.5rem;
    min-height: auto;
    padding-bottom: 1rem;
    overflow-x: visible;
  }

  .kanban-column {
    width: 100%;
    flex-shrink: 1;
    max-height: 400px;
    padding: 1rem;
  }
}

@media (max-width: 576px) {
  .kanban-board-wrapper {
    flex-direction: column;
    gap: 1rem;
    padding-bottom: 0.5rem;
  }

  .kanban-column {
    width: 100%;
    max-height: 350px;
    padding: 0.75rem;
  }
}

.column-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid #f1f5f9;
}

.column-title {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-main);
  text-transform: uppercase;
}

@media (max-width: 768px) {
  .column-header {
    margin-bottom: 1rem;
    padding-bottom: 0.4rem;
  }

  .column-title {
    font-size: 1rem;
  }
}

@media (max-width: 576px) {
  .column-header {
    margin-bottom: 0.75rem;
  }

  .column-title {
    font-size: 0.9rem;
  }
}

.task-list {
  flex-grow: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 150px;
  padding: 0.25rem;
}

/* Task Cards (Construction Vibe) */
.task-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-left: 5px solid #94a3b8; /* neutral default edge */
  border-radius: 8px;
  padding: 1.1rem;
  cursor: grab;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.task-card:active {
  cursor: grabbing;
}

.task-card:hover {
  border-color: var(--primary-orange);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 107, 0, 0.08);
}

.task-card p {
  color: var(--text-muted) !important;
  font-size: 0.9rem;
  line-height: 1.4;
}

@media (max-width: 768px) {
  .task-card {
    padding: 0.9rem;
  }

  .task-card p {
    font-size: 0.85rem;
  }
}

@media (max-width: 576px) {
  .task-card {
    padding: 0.75rem;
  }

  .task-card p {
    font-size: 0.8rem;
  }
}

.task-priority {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.7px;
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 0.75rem;
}

@media (max-width: 768px) {
  .task-priority {
    font-size: 0.65rem;
    padding: 0.2rem 0.5rem;
  }
}

@media (max-width: 576px) {
  .task-priority {
    font-size: 0.6rem;
    padding: 0.15rem 0.4rem;
  }
}

/* Priorities Styling */
.task-card:has(.priority-high) {
  border-left-color: var(--priority-high);
}
.task-card:has(.priority-medium) {
  border-left-color: var(--priority-medium);
}
.task-card:has(.priority-low) {
  border-left-color: var(--priority-low);
}

.priority-high {
  background: #fef2f2;
  color: var(--priority-high);
  border: 1px solid #fecaca;
}

.priority-medium {
  background: #fff7ed;
  color: var(--priority-medium);
  border: 1px solid #fed7aa;
}

.priority-low {
  background: #eff6ff;
  color: var(--priority-low);
  border: 1px solid #bfdbfe;
}

.task-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  margin-top: 0.75rem;
}

@media (max-width: 576px) {
  .task-actions {
    flex-direction: column;
    gap: 0.4rem;
  }

  .task-actions button {
    width: 100%;
  }
}

/* Task state visuals */
.task-card.done {
  border-left-color: #16a34a;
  background: #f0fdf4;
}
.task-card.failed {
  border-left-color: #dc2626;
  background: #fff1f2;
}

/* Small action buttons on cards */
.task-actions .btn-sm.btn-cyber-success,
.task-actions .btn-sm.btn-cyber-danger {
  padding: 0.25rem 0.4rem;
  font-size: 0.75rem;
  line-height: 1;
}

/* Drag and Drop Styling */
.task-card.dragging {
  opacity: 0.4;
  border: 2px dashed var(--primary-orange);
}

/* Ideas Panel */
.ideas-container {
  max-height: calc(100vh - 180px);
  overflow-y: auto;
  padding-right: 0.5rem;
}

.idea-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.idea-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 5px;
  height: 100%;
  background: var(--primary-orange);
}

.idea-card.approved::before {
  background: #16a34a;
}

.idea-card:hover {
  border-color: var(--primary-orange);
  transform: scale(1.01);
  box-shadow: 0 4px 12px rgba(255, 107, 0, 0.08);
}

.idea-card p {
  color: var(--text-muted) !important;
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .ideas-container {
    max-height: 500px;
    padding-right: 0.25rem;
  }

  .idea-card {
    padding: 1rem;
    margin-bottom: 1rem;
  }

  .idea-card p {
    font-size: 0.85rem;
  }
}

@media (max-width: 576px) {
  .ideas-container {
    max-height: 400px;
  }

  .idea-card {
    padding: 0.85rem;
    margin-bottom: 0.75rem;
  }

  .idea-card p {
    font-size: 0.8rem;
  }
}

.voting-bar-container {
  height: 8px;
  background: #f1f5f9;
  border-radius: 4px;
  overflow: hidden;
  margin: 1.1rem 0;
  display: flex;
}

.vote-bar-yes {
  background: var(--primary-orange);
  height: 100%;
  transition: width 0.4s ease;
}

.vote-bar-no {
  background: #64748b;
  height: 100%;
  transition: width 0.4s ease;
}

.vote-btn {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: var(--text-main);
  font-family: var(--font-mono);
  font-weight: 600;
  border-radius: 6px;
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.vote-btn:hover {
  color: var(--text-main);
  background: #e2e8f0;
}

.vote-btn.active-yes {
  background: var(--orange-light);
  color: var(--primary-orange);
  border-color: var(--primary-orange);
  box-shadow: 0 0 0 2px rgba(255, 107, 0, 0.2);
}

.vote-btn.active-no {
  background: #f1f5f9;
  color: #334155;
  border-color: #64748b;
}

@media (max-width: 768px) {
  .voting-bar-container {
    height: 6px;
    margin: 0.9rem 0;
  }

  .vote-btn {
    padding: 0.35rem 0.6rem;
    font-size: 0.8rem;
  }
}

@media (max-width: 576px) {
  .voting-bar-container {
    height: 5px;
    margin: 0.75rem 0;
  }

  .vote-btn {
    padding: 0.3rem 0.5rem;
    font-size: 0.75rem;
    width: 100%;
    justify-content: center;
  }
}

/* User Roles & Badges */
.role-badge {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  font-weight: 700;
}

@media (max-width: 768px) {
  .role-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
  }
}

@media (max-width: 576px) {
  .role-badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
  }
}

.role-admin {
  background: var(--orange-light);
  color: var(--primary-orange);
  border: 1px solid var(--primary-orange);
}

.role-integrante {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.role-visualizador {
  background: #f8fafc;
  color: #475569;
  border: 1px solid #cbd5e1;
}

.role-rh {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.badge.role-admin {
  background-color: var(--orange-light) !important;
  color: var(--primary-orange) !important;
  border: 1px solid var(--primary-orange) !important;
}

.badge.role-integrante {
  background-color: #eff6ff !important;
  color: #1d4ed8 !important;
  border: 1px solid #bfdbfe !important;
}

.badge.role-visualizador {
  background-color: #f1f5f9 !important;
  color: #475569 !important;
  border: 1px solid #cbd5e1 !important;
}

.badge.role-rh {
  background-color: #fef2f2 !important;
  color: #dc2626 !important;
  border: 1px solid #fecaca !important;
}

.rh-dashboard-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
}

.rh-note-textarea {
  min-height: 220px;
  resize: vertical;
}

.rh-empty-state {
  border: 1px dashed rgba(255,255,255,0.16);
  border-radius: 14px;
  padding: 2rem;
  text-align: center;
  color: var(--muted-text);
}

/* User Avatar */
.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--primary-orange), var(--bg-dark));
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.95rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.user-avatar:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(255, 107, 0, 0.25);
}

.user-avatar:focus-visible {
  outline: 2px solid var(--primary-orange);
  outline-offset: 2px;
}

@media (max-width: 576px) {
  .user-avatar {
    width: 34px;
    height: 34px;
    font-size: 0.85rem;
  }
}

/* Modals Industrial Design */
.modal-content-cyber {
  background: #ffffff !important;
  border: 3px solid var(--primary-orange) !important;
  border-radius: 12px !important;
  box-shadow: 0 20px 25px -5px rgba(255, 107, 0, 0.15) !important;
  color: var(--text-main);
  position: relative;
  overflow: hidden;
}

.modal-content-cyber::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: repeating-linear-gradient(
    -45deg,
    var(--primary-orange),
    var(--primary-orange) 10px,
    var(--bg-dark) 10px,
    var(--bg-dark) 20px
  );
  z-index: 10;
}

.modal-header-cyber {
  border-bottom: 2px solid #f1f5f9 !important;
  padding-top: 1.5rem !important;
}

.modal-footer-cyber {
  border-top: 2px solid #f1f5f9 !important;
}

@media (max-width: 768px) {
  .modal-content-cyber {
    border: 2px solid var(--primary-orange) !important;
    border-radius: 8px !important;
  }

  .modal-header-cyber {
    padding: 1rem !important;
  }

  .modal-body {
    padding: 1rem !important;
  }

  .modal-footer-cyber {
    padding: 1rem !important;
  }
}

@media (max-width: 576px) {
  .modal-content-cyber {
    margin: 0.5rem;
    border: 2px solid var(--primary-orange) !important;
  }

  .modal-header-cyber,
  .modal-body,
  .modal-footer-cyber {
    padding: 0.75rem !important;
  }
}

/* Custom overlay style overrides for light theme compatibility */
#loading-overlay {
  background-color: var(--bg-main) !important;
}
#loading-overlay h4 {
  color: var(--primary-orange) !important;
  text-shadow: none !important;
}
#loading-overlay .spinner-border {
  color: var(--primary-orange) !important;
}

#user-profile-panel {
  margin-top: 0.5rem;
}

#profile-message-input {
  min-height: 140px;
}

/* Admin Table Design */
.table {
  color: var(--text-main) !important;
}

.table th {
  font-family: var(--font-mono);
  font-weight: 700 !important;
  color: var(--primary-orange) !important;
  border-bottom: 2px solid var(--border-color) !important;
  text-transform: uppercase;
}

.table td {
  border-bottom: 1px solid #f1f5f9 !important;
}

@media (max-width: 768px) {
  .table th,
  .table td {
    padding: 0.6rem 0.4rem !important;
    font-size: 0.85rem;
  }

  .table th {
    font-size: 0.75rem;
  }
}

@media (max-width: 576px) {
  .table {
    font-size: 0.8rem;
  }

  .table th,
  .table td {
    padding: 0.5rem 0.3rem !important;
  }

  .table th {
    font-size: 0.7rem;
  }

  .table-responsive {
    border: none;
  }
}

/* Force light style override for table-dark in admin.html */
.table-dark {
  --bs-table-bg: #ffffff !important;
  --bs-table-color: var(--text-main) !important;
  --bs-table-hover-bg: #f8fafc !important;
  --bs-table-hover-color: var(--text-main) !important;
  border-color: var(--border-color) !important;
}

.table-dark th {
  color: var(--primary-orange) !important;
  background-color: #ffffff !important;
}

.table-dark td {
  background-color: #ffffff !important;
  color: var(--text-main) !important;
}

.table-dark .member-role-select {
  background-color: #ffffff !important;
  color: var(--text-main) !important;
  border: 2px solid var(--border-color) !important;
}

body.dark-mode .table,
body.dark-mode .table-responsive,
body.dark-mode .table th,
body.dark-mode .table td,
body.dark-mode .table thead th {
  background-color: #111827 !important;
  color: var(--text-main) !important;
  border-color: #334155 !important;
}

body.dark-mode .table th {
  background-color: #0f172a !important;
  color: var(--primary-orange) !important;
}

body.dark-mode .table td {
  background-color: #111827 !important;
  color: var(--text-main) !important;
}

body.dark-mode .table tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.04) !important;
}

body.dark-mode .table-responsive {
  border: 1px solid #334155;
}

body.dashboard-page {
  background-color: var(--bg-main);
  background-image: 
    linear-gradient(rgba(255, 107, 0, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 107, 0, 0.05) 1px, transparent 1px);
  background-size: 24px 24px;
  background-attachment: fixed;
}

body.dashboard-page .glass-panel {
  background: var(--surface-bg);
  border-color: var(--surface-border);
}

body.dashboard-page h4,
body.dashboard-page h5,
body.dashboard-page h6,
body.dashboard-page p,
body.dashboard-page li,
body.dashboard-page th,
body.dashboard-page td,
body.dashboard-page .table,
body.dashboard-page .badge,
body.dashboard-page .btn {
  color: var(--text-main) !important;
}

body.dark-mode.dashboard-page,
body.dashboard-page.dark-mode {
  background-color: var(--bg-main);
}

body.dark-mode.dashboard-page .glass-panel,
body.dashboard-page.dark-mode .glass-panel {
  background: var(--surface-bg);
  border-color: var(--surface-border);
}

body.dashboard-page .table-dark {
  --bs-table-bg: var(--surface-bg) !important;
  --bs-table-color: var(--text-main) !important;
  --bs-table-hover-bg: rgba(255,255,255,0.05) !important;
  --bs-table-hover-color: var(--text-main) !important;
  border-color: var(--surface-border) !important;
}

body.dark-mode.dashboard-page .table-dark,
body.dashboard-page.dark-mode .table-dark {
  --bs-table-bg: #111827 !important;
  --bs-table-color: var(--text-main) !important;
  --bs-table-hover-bg: rgba(255,255,255,0.08) !important;
  --bs-table-hover-color: var(--text-main) !important;
  border-color: #334155 !important;
}

body.dark-mode.dashboard-page h4,
body.dark-mode.dashboard-page h5,
body.dark-mode.dashboard-page h6,
body.dark-mode.dashboard-page p,
body.dark-mode.dashboard-page li,
body.dark-mode.dashboard-page th,
body.dark-mode.dashboard-page td,
body.dark-mode.dashboard-page .badge,
body.dark-mode.dashboard-page .btn,
body.dashboard-page.dark-mode h4,
body.dashboard-page.dark-mode h5,
body.dashboard-page.dark-mode h6,
body.dashboard-page.dark-mode p,
body.dashboard-page.dark-mode li,
body.dashboard-page.dark-mode th,
body.dashboard-page.dark-mode td,
body.dashboard-page.dark-mode .badge,
body.dashboard-page.dark-mode .btn {
  color: var(--text-main) !important;
}

/* Navigation layout fixes */
header.glass-panel {
  border: 2px solid var(--border-color);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

#btn-admin-portal {
  background: var(--orange-light);
  color: var(--primary-orange);
  border-color: var(--primary-orange);
}
#btn-admin-portal:hover {
  background: var(--primary-orange);
  color: #ffffff;
}

/* Remove orange "caution tape" striped accents from panels and modals */
.glass-panel::before,
.modal-content-cyber::before {
  display: none !important;
  background: none !important;
  height: 0 !important;
}

/* Animated brand logo: CHYBOR TECH */
.brand-logo {
  font-size: 1.6rem;
  letter-spacing: 0.06em;
  display: inline-block;
  line-height: 1;
  background: linear-gradient(90deg, #00f0ff 0%, #9b5cff 40%, #00ff9d 75%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  position: relative;
  padding: 2px 6px;
  border-radius: 6px;
  text-transform: uppercase;
  font-weight: 700;
  transition: transform 220ms ease;
  will-change: transform;
  animation: brand-shimmer 3.5s linear infinite;
}

.brand-logo::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 6px;
  pointer-events: none;
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.08), 0 2px 6px rgba(0,0,0,0.2);
}

.brand-letter {
  display: inline-block;
  opacity: 0;
  transform: translateY(8px) rotate(-2deg) scale(0.98);
  animation: letter-in 700ms cubic-bezier(.2,.8,.2,1) forwards;
  will-change: transform, opacity;
}

.brand-logo:hover { transform: translateY(-2px); }
.brand-logo:hover .brand-letter { transform: translateY(-12px) rotate(0deg) scale(1.02); }

@media (max-width: 768px) {
  .brand-logo {
    font-size: 1.3rem;
    padding: 1px 4px;
  }
}

@media (max-width: 576px) {
  .brand-logo {
    font-size: 1.1rem;
    padding: 1px 3px;
  }
}

@keyframes letter-in {
  from { opacity: 0; transform: translateY(8px) rotate(-2deg) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) rotate(0deg) scale(1); }
}

@keyframes brand-shimmer {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Subtle neon flicker for dark-mode */
body.dark-mode .brand-logo {
  filter: drop-shadow(0 0 8px rgba(155,92,255,0.25)) drop-shadow(0 0 6px rgba(0,255,200,0.08));
}

/* ============================================ */
/* RESPONSIVE DESIGN - GENERAL BOOTSTRAP FIX   */
/* ============================================ */

/* Tablet devices (768px and below) */
@media (max-width: 768px) {
  .container,
  .container-sm,
  .container-md {
    padding: 0 1rem;
  }

  .row {
    margin: -0.5rem;
  }

  .col {
    padding: 0.5rem;
  }

  .mx-md-auto {
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .p-md-3 {
    padding: 1rem !important;
  }

  .mb-md-3,
  .mb-md-4 {
    margin-bottom: 1rem !important;
  }

  .mt-md-3,
  .mt-md-4 {
    margin-top: 1rem !important;
  }
}

/* Mobile devices (576px and below) */
@media (max-width: 576px) {
  .container,
  .container-sm,
  .container-md {
    padding: 0 0.75rem;
  }

  .row {
    margin: -0.4rem;
  }

  .col {
    padding: 0.4rem;
  }

  .p-sm-2 {
    padding: 0.5rem !important;
  }

  .p-sm-3 {
    padding: 0.75rem !important;
  }

  .mb-sm-2,
  .mb-sm-3 {
    margin-bottom: 0.75rem !important;
  }

  .mt-sm-2,
  .mt-sm-3 {
    margin-top: 0.75rem !important;
  }

  .gap-sm-2 {
    gap: 0.5rem !important;
  }

  .gap-sm-3 {
    gap: 0.75rem !important;
  }

  /* Make all input fields full width on mobile */
  input,
  select,
  textarea {
    width: 100%;
    max-width: 100%;
  }

  /* Stack buttons vertically on mobile */
  .btn-group-mobile {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }

  .btn-group-mobile .btn {
    width: 100%;
  }

  /* Improve readability of small text on mobile */
  small,
  .small {
    font-size: 0.8rem;
  }

  /* Fix overflow on pre/code blocks */
  pre,
  code {
    max-width: 100%;
    overflow-x: auto;
  }

  /* Make images responsive by default */
  img {
    max-width: 100%;
    height: auto;
    display: block;
  }
}

/* Extra small devices (under 480px) */
@media (max-width: 480px) {
  .container,
  .container-sm {
    padding: 0 0.5rem;
  }

  h1 {
    font-size: 1.3rem;
  }

  h2 {
    font-size: 1.1rem;
  }

  h3 {
    font-size: 0.95rem;
  }

  .btn-cyber {
    font-size: 0.75rem;
    padding: 0.35rem 0.6rem;
  }

  .glass-panel,
  .modal-content-cyber {
    border-radius: 6px;
  }
}

/* Landscape orientation on phones */
@media (max-height: 600px) and (orientation: landscape) {
  .kanban-column {
    max-height: 60vh;
  }

  .auth-container {
    min-height: auto;
    padding: 1rem 0;
  }

  header.glass-panel {
    margin-bottom: 0.5rem;
  }
}

/* Ensure proper text readability on all devices */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Print styles for better printing */
@media print {
  body {
    background: white;
    color: black;
  }

  .glass-panel,
  .btn-cyber,
  .modal-content-cyber {
    border: 1px solid black;
    box-shadow: none;
  }

  .btn-cyber {
    background: white;
    color: black;
  }

  header,
  footer,
  nav,
  .btn-cyber:hover {
    display: none;
  }
}

/* ============================================ */
/* MOBILE MENU (HAMBURGER & DRAWER)           */
/* ============================================ */

.hamburger-btn {
  display: none;
  background: transparent;
  border: 2px solid var(--primary-orange);
  color: var(--primary-orange);
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 1.25rem;
  line-height: 1;
}

.hamburger-btn:hover {
  background: var(--primary-orange);
  color: #ffffff;
}

.hamburger-btn:focus {
  outline: 2px solid var(--primary-orange);
  outline-offset: 2px;
}

/* Mobile drawer menu */
.mobile-drawer {
  position: fixed;
  top: 0;
  left: -100%;
  width: 80%;
  max-width: 320px;
  height: 100vh;
  background: var(--bg-panel);
  border-right: 3px solid var(--primary-orange);
  box-shadow: 2px 0 15px rgba(0, 0, 0, 0.3);
  z-index: 9998;
  transition: left 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  overflow-y: auto;
  padding: 1rem 0;
}

.mobile-drawer.active {
  left: 0;
}

.drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9997;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.drawer-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-bottom: 2px solid var(--border-color);
  margin-bottom: 1rem;
}

.drawer-close-btn {
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  transition: all 0.2s ease;
}

.drawer-close-btn:hover {
  color: var(--primary-orange);
}

.drawer-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
}

.drawer-section {
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.drawer-section:last-child {
  border-bottom: none;
}

/* Estado padrão das seções - ocultas até a gaveta abrir */
.mobile-drawer .drawer-section {
  opacity: 0;
}

.mobile-drawer.active .drawer-section {
  opacity: 1;
}

.drawer-section-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  margin-bottom: 0.75rem;
  display: block;
  position: relative;
  overflow: hidden;
  opacity: 0;
}

.mobile-drawer.active .drawer-section-title {
  animation: slideInLine 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.drawer-section:nth-child(1) .drawer-section-title {
  animation-delay: 0.15s !important;
}

.drawer-section:nth-child(2) .drawer-section-title {
  animation-delay: 0.25s !important;
}

.drawer-section:nth-child(3) .drawer-section-title {
  animation-delay: 0.35s !important;
}

.drawer-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem 1rem;
  background: transparent;
  border: 2px solid var(--border-color);
  color: var(--text-main);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: left;
  transition: all 0.2s ease;
  margin-bottom: 0.5rem;
  position: relative;
  overflow: hidden;
}

.drawer-btn:hover {
  background: var(--primary-orange);
  border-color: var(--primary-orange);
  color: #ffffff;
}

.drawer-btn:last-child {
  margin-bottom: 0;
}

.drawer-btn i {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.drawer-user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
}

.drawer-user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-orange), var(--bg-dark));
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

.drawer-user-details {
  flex-grow: 1;
  min-width: 0;
}

.drawer-user-name {
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.9rem;
}

.drawer-user-role {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Desktop header - hide drawer button */
@media (min-width: 769px) {
  .hamburger-btn {
    display: none !important;
  }

  .mobile-drawer {
    display: none !important;
  }

  .drawer-overlay {
    display: none !important;
  }

  header.glass-panel {
    flex-wrap: wrap;
  }
}

/* Tablet and below - show drawer button and adjust header */
@media (max-width: 768px) {
  .hamburger-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    order: 2;
  }

  header.glass-panel {
    flex-wrap: nowrap;
    padding: 0.75rem !important;
  }

  header.glass-panel > div:first-child {
    flex-shrink: 0;
  }

  header.glass-panel > div:last-child {
    display: none !important;
  }

  /* Keep only essential buttons in header on mobile */
  #btn-theme-toggle {
    display: inline-flex !important;
  }

  #header-user-avatar {
    display: inline-flex !important;
  }

  #btn-logout {
    display: inline-flex !important;
  }

  /* Hide navigation items from header on mobile */
  #btn-admin-portal,
  #btn-dashboard,
  #btn-ideas-panel,
  #btn-theme-toggle,
  #btn-logout {
    display: none !important;
  }

  .mobile-drawer #btn-theme-toggle,
  .mobile-drawer #header-user-avatar,
  .mobile-drawer #btn-logout {
    display: flex !important;
  }
}

/* Mobile - very small screens */
@media (max-width: 576px) {
  .hamburger-btn {
    padding: 0.4rem 0.6rem;
    font-size: 1.1rem;
  }

  .mobile-drawer {
    width: 85%;
    max-width: 280px;
  }

  header.glass-panel {
    gap: 0.5rem !important;
  }

  .drawer-btn {
    padding: 0.65rem 0.85rem;
    font-size: 0.9rem;
  }

  .drawer-section {
    padding: 0.85rem;
  }
}

/* Dark mode adjustments for drawer */
body.dark-mode .mobile-drawer {
  background: var(--bg-panel);
}

body.dark-mode .drawer-header,
body.dark-mode .drawer-section {
  border-color: var(--border-color);
}

body.dark-mode .drawer-btn {
  border-color: var(--control-border);
  color: var(--control-text);
}

body.dark-mode .drawer-btn:hover {
  background: var(--primary-orange);
  border-color: var(--primary-orange);
  color: #ffffff;
}

body.dark-mode .drawer-close-btn {
  color: var(--text-main);
}

body.dark-mode .drawer-close-btn:hover {
  color: var(--primary-orange);
}

/* ============================================ */
/* DRAWER BUTTON ANIMATIONS                    */
/* ============================================ */

/* Animação de entrada em cascata dos botões */
@keyframes slideInDrawer {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInDrawerScale {
  from {
    opacity: 0;
    transform: translateX(-30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

/* Animação de seção */
@keyframes slideInSection {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mobile-drawer.active .drawer-section {
  animation: slideInSection 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.mobile-drawer.active .drawer-section:nth-child(1) {
  animation-delay: 0.1s;
}

.mobile-drawer.active .drawer-section:nth-child(2) {
  animation-delay: 0.2s;
}

.mobile-drawer.active .drawer-section:nth-child(3) {
  animation-delay: 0.3s;
}

.mobile-drawer.active .drawer-section:nth-child(4) {
  animation-delay: 0.4s;
}

.mobile-drawer.active .drawer-section:nth-child(n+5) {
  animation-delay: 0.5s;
}

/* Estado padrão dos botões - ocultos */
.drawer-btn {
  opacity: 0;
  visibility: hidden;
}

/* Animação individual dos botões dentro de cada seção */
.mobile-drawer.active .drawer-btn {
  animation: slideInDrawerScale 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  opacity: 0;
  visibility: visible;
}

.drawer-section:nth-child(1) .drawer-btn:nth-child(2) {
  animation-delay: 0.15s !important;
}

.drawer-section:nth-child(1) .drawer-btn:nth-child(3) {
  animation-delay: 0.25s !important;
}

.drawer-section:nth-child(1) .drawer-btn:nth-child(4) {
  animation-delay: 0.35s !important;
}

.drawer-section:nth-child(2) .drawer-btn:nth-child(2) {
  animation-delay: 0.25s !important;
}

.drawer-section:nth-child(2) .drawer-btn:nth-child(3) {
  animation-delay: 0.35s !important;
}

.drawer-section:nth-child(2) .drawer-btn:nth-child(4) {
  animation-delay: 0.45s !important;
}

.drawer-section:nth-child(3) .drawer-btn:nth-child(2) {
  animation-delay: 0.35s !important;
}

.drawer-section:nth-child(3) .drawer-btn:nth-child(3) {
  animation-delay: 0.45s !important;
}

.drawer-section:nth-child(3) .drawer-btn:nth-child(4) {
  animation-delay: 0.55s !important;
}

.mobile-drawer.active .drawer-btn {
  animation-fill-mode: forwards;
}

.drawer-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 107, 0, 0.3);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.drawer-btn:active::before {
  animation: ripple 0.6s ease-out;
}

@keyframes ripple {
  to {
    width: 300px;
    height: 300px;
    opacity: 0;
  }
}

/* Animação do header da gaveta */
.mobile-drawer.active .drawer-header {
  animation: slideInSection 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.drawer-header {
  opacity: 0;
  animation-fill-mode: forwards;
}

.mobile-drawer.active .drawer-header {
  opacity: 1;
}

/* Efeito de pulso ao passar o mouse */

/* ==========================================
   CHAT SYSTEM STYLES
   ========================================== */
.chat-container {
  display: flex;
  flex-direction: column;
  background: var(--bg-panel);
}

body.dark-mode .chat-container {
  background: var(--surface-bg);
}

.chat-messages {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.chat-message {
  display: flex;
  flex-direction: column;
  max-width: 80%;
  animation: messageFadeIn 0.3s ease-out;
}

@keyframes messageFadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.chat-message.message-mine {
  align-self: flex-end;
}

.chat-message.message-other {
  align-self: flex-start;
}

.chat-message .message-info {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
  font-family: var(--font-mono);
}

.chat-message.message-mine .message-info {
  text-align: right;
}

.chat-message .message-bubble {
  padding: 0.6rem 0.9rem;
  font-size: 0.9rem;
  line-height: 1.4;
  word-break: break-word;
}

.chat-message.message-mine .message-bubble {
  background: var(--primary-orange);
  color: #ffffff;
  border-radius: 12px 12px 0px 12px;
  box-shadow: 0 2px 8px rgba(255, 107, 0, 0.2);
}

.chat-message.message-other .message-bubble {
  background: #f1f5f9;
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: 12px 12px 12px 0px;
}

body.dark-mode .chat-message.message-other .message-bubble {
  background: #1e293b;
  color: var(--text-light);
  border-color: #334155;
}

/* ==========================================
   TABS AND ATTACHMENTS SYSTEM
   ========================================== */
.nav-tabs-cyber {
  border-bottom: 2px solid var(--border-color);
}

body.dark-mode .nav-tabs-cyber {
  border-bottom-color: #334155;
}

.nav-tabs-cyber .nav-link {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-weight: 700;
  text-transform: uppercase;
  border: none;
  background: none;
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  transition: all 0.2s ease;
}

.nav-tabs-cyber .nav-link:hover {
  color: var(--primary-orange);
}

.nav-tabs-cyber .nav-link.active {
  color: var(--primary-orange);
  border-bottom: 3px solid var(--primary-orange);
  background: none;
}

.attachments-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.attachment-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem;
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 0.85rem;
  transition: all 0.2s ease;
}

body.dark-mode .attachment-item {
  background: #0f172a;
  border-color: #334155;
}

.attachment-item:hover {
  border-color: var(--primary-orange);
}

.attachment-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  flex-grow: 1;
}

.attachment-icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: rgba(255, 107, 0, 0.1);
  color: var(--primary-orange);
  border-radius: 4px;
  flex-shrink: 0;
}

.attachment-thumb {
  width: 36px;
  height: 36px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
  border: 1px solid var(--border-color);
}

.attachment-name-box {
  min-width: 0;
}

.attachment-name {
  font-weight: 600;
  color: var(--text-main);
  text-decoration: none;
}

.attachment-name:hover {
  color: var(--primary-orange);
  text-decoration: underline;
}

.attachment-info-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.btn-cyber-secondary {
  border: 2px solid var(--border-color);
  color: var(--text-muted);
  background: transparent;
  font-family: var(--font-mono);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

body.dark-mode .btn-cyber-secondary {
  border-color: #334155;
  color: var(--text-muted);
}

.btn-cyber-secondary:hover {
  border-color: var(--primary-orange);
  color: var(--primary-orange);
  background: rgba(255, 107, 0, 0.05);
}

.task-description-box::-webkit-scrollbar,
.attachments-list::-webkit-scrollbar,
.chat-messages::-webkit-scrollbar {
  width: 6px;
}
.task-description-box::-webkit-scrollbar-thumb,
.attachments-list::-webkit-scrollbar-thumb,
.chat-messages::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}
body.dark-mode .task-description-box::-webkit-scrollbar-thumb,
body.dark-mode .attachments-list::-webkit-scrollbar-thumb,
body.dark-mode .chat-messages::-webkit-scrollbar-thumb {
  background: #334155;
}

/* ============================================ */
/* PORTAL V2 - NAVEGAÇÃO E MÓDULOS              */
/* ============================================ */

.portal-version-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  background: var(--primary-orange);
  color: #ffffff;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  vertical-align: middle;
  letter-spacing: 1px;
}

.portal-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.75rem;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  text-decoration: none;
  border: 2px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.portal-nav-link:hover {
  color: var(--primary-orange);
  background: rgba(249, 115, 22, 0.08);
}

.portal-nav-link.active {
  color: var(--primary-orange);
  border-color: var(--primary-orange);
  background: var(--orange-light);
}

body.dark-mode .portal-nav-link.active {
  background: rgba(255, 158, 66, 0.12);
}

@media (max-width: 992px) {
  .portal-nav-link span {
    display: none;
  }
  .portal-nav-link {
    padding: 0.45rem 0.55rem;
  }
}

@media (max-width: 768px) {
  .portal-nav,
  .portal-header-actions {
    display: none !important;
  }
}

/* Cards de estatística (resumo dos módulos) */
.stat-card {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1.1rem 1.25rem;
}

.stat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  flex-shrink: 0;
}

.stat-icon svg {
  width: 22px;
  height: 22px;
}

.stat-icon-info { background: rgba(249, 115, 22, 0.12); color: var(--primary-orange); }
.stat-icon-success { background: rgba(22, 163, 74, 0.12); color: #16a34a; }
.stat-icon-danger { background: rgba(220, 38, 38, 0.12); color: #dc2626; }
.stat-icon-warning { background: rgba(245, 158, 11, 0.12); color: #d97706; }
.stat-icon-purple { background: rgba(147, 51, 234, 0.12); color: #9333ea; }

.stat-value {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-main);
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

@media (max-width: 576px) {
  .stat-card {
    padding: 0.85rem;
    gap: 0.6rem;
  }
  .stat-icon {
    width: 36px;
    height: 36px;
  }
  .stat-value {
    font-size: 1rem;
  }
  .stat-label {
    font-size: 0.65rem;
  }
}

/* Badges de status dos módulos */
.badge-neutral,
.badge-success,
.badge-warning,
.badge-danger,
.badge-info,
.badge-income,
.badge-expense {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.25rem 0.55rem;
  border-radius: 4px;
}

.badge-neutral { background: #f1f5f9; color: #475569; border: 1px solid #cbd5e1; }
.badge-success { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }
.badge-warning { background: #fffbeb; color: #d97706; border: 1px solid #fde68a; }
.badge-danger { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.badge-info { background: var(--orange-light); color: var(--primary-orange); border: 1px solid var(--primary-orange); }
.badge-income { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }
.badge-expense { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }

body.dark-mode .badge-neutral { background: rgba(148, 163, 184, 0.12); color: #cbd5e1; border-color: #475569; }
body.dark-mode .badge-success,
body.dark-mode .badge-income { background: rgba(22, 163, 74, 0.15); color: #86efac; border-color: rgba(134, 239, 172, 0.35); }
body.dark-mode .badge-warning { background: rgba(245, 158, 11, 0.15); color: #fcd34d; border-color: rgba(252, 211, 77, 0.35); }
body.dark-mode .badge-danger,
body.dark-mode .badge-expense { background: rgba(220, 38, 38, 0.15); color: #fca5a5; border-color: rgba(252, 165, 165, 0.35); }
body.dark-mode .badge-info { background: rgba(255, 158, 66, 0.12); color: var(--primary-orange); }

/* Cards de item dos módulos (campanhas, bugs, posts, links) */
.module-item-card {
  background: var(--surface-bg);
  border: 1px solid var(--border-color);
  border-left: 5px solid var(--primary-orange);
  border-radius: 8px;
  padding: 1rem 1.1rem;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.module-item-card:hover {
  border-color: var(--primary-orange);
  box-shadow: 0 4px 12px rgba(255, 107, 0, 0.08);
}

.module-item-compact {
  padding: 0.7rem 0.9rem;
  border-left-width: 3px;
}

body.dark-mode .module-item-card {
  background: var(--surface-bg);
  border-color: var(--surface-border);
  border-left-color: var(--primary-orange);
}

.min-width-0 {
  min-width: 0;
}

/* Severidade de bugs */
.bug-card.severity-critical { border-left-color: #9333ea; }
.bug-card.severity-high { border-left-color: #dc2626; }
.bug-card.severity-medium { border-left-color: #ff6b00; }
.bug-card.severity-low { border-left-color: #2563eb; }

.severity-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.25rem 0.55rem;
  border-radius: 4px;
}

.severity-tag.severity-critical { background: #faf5ff; color: #9333ea; border: 1px solid #e9d5ff; }
.severity-tag.severity-high { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.severity-tag.severity-medium { background: #fff7ed; color: #ff6b00; border: 1px solid #fed7aa; }
.severity-tag.severity-low { background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe; }

body.dark-mode .severity-tag.severity-critical { background: rgba(147, 51, 234, 0.15); color: #d8b4fe; border-color: rgba(216, 180, 254, 0.35); }
body.dark-mode .severity-tag.severity-high { background: rgba(220, 38, 38, 0.15); color: #fca5a5; border-color: rgba(252, 165, 165, 0.35); }
body.dark-mode .severity-tag.severity-medium { background: rgba(255, 107, 0, 0.15); color: #ffddb0; border-color: rgba(251, 146, 60, 0.35); }
body.dark-mode .severity-tag.severity-low { background: rgba(37, 99, 235, 0.15); color: #bfdbfe; border-color: rgba(191, 219, 254, 0.35); }

/* Timeline de releases */
.release-timeline {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: 400px;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.release-item {
  display: flex;
  gap: 0.85rem;
  padding-left: 0.25rem;
  position: relative;
}

.release-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary-orange);
  flex-shrink: 0;
  margin-top: 0.35rem;
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.2);
}

/* Caixa de data do calendário de conteúdo */
.post-date-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  background: var(--orange-light);
  border: 1px solid var(--primary-orange);
  border-radius: 8px;
  flex-shrink: 0;
}

body.dark-mode .post-date-box {
  background: rgba(255, 158, 66, 0.1);
}

.post-date-day {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1;
  color: var(--primary-orange);
}

.post-date-month {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

/* Cards de acesso rápido aos módulos (home) */
.module-quick-card {
  transition: all 0.2s ease;
}

.module-quick-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary-orange);
}

.module-quick-card h6 {
  color: var(--text-main);
}

.link-title {
  color: var(--text-main);
  text-decoration: none;
}

.link-title:hover {
  color: var(--primary-orange);
  text-decoration: underline;
}
/* ============================================
   Portal Header Themes (por página)
   ============================================ */
.portal-header {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem 1rem;
  border-left: 4px solid var(--portal-header-accent, var(--primary-orange));
}

.portal-header::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 120px;
  pointer-events: none;
  background: linear-gradient(90deg, color-mix(in srgb, var(--portal-header-accent) 18%, transparent), transparent);
}

.portal-header-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  z-index: 1;
}

.portal-header-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 10px;
  flex-shrink: 0;
  color: var(--portal-header-accent);
  background: color-mix(in srgb, var(--portal-header-accent) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--portal-header-accent) 40%, transparent);
}

.portal-header-icon i,
.portal-header-icon svg {
  width: 22px;
  height: 22px;
}

.portal-header-titles {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.portal-header-title {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.5px;
  color: var(--portal-header-accent);
  line-height: 1.2;
}

.portal-header-subtitle {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.portal-header .portal-nav {
  z-index: 1;
}

.portal-header .portal-nav-link.active {
  color: var(--portal-header-accent);
  border-color: var(--portal-header-accent);
  background: color-mix(in srgb, var(--portal-header-accent) 12%, transparent);
}

.portal-header .portal-nav-link:hover {
  color: var(--portal-header-accent);
  background: color-mix(in srgb, var(--portal-header-accent) 10%, transparent);
}

button.portal-nav-btn {
  background: transparent;
  cursor: pointer;
  font: inherit;
}

.portal-header-user-meta {
  z-index: 1;
}

.portal-header-user-meta .fw-bold {
  color: var(--text-main);
}

/* Variações sutis por módulo */
.portal-header--projects { border-radius: 12px 4px 12px 4px; }
.portal-header--development { border-radius: 4px 12px 4px 12px; }
.portal-header--finance { border-radius: 16px; }
.portal-header--marketing { border-radius: 8px; border-left-width: 6px; }
.portal-header--dashboard { border-radius: 2px; border-left-width: 5px; }
.portal-header--ideas { border-radius: 20px 8px 20px 8px; }
.portal-header--rh { border-radius: 10px; border-style: solid; border-width: 1px 1px 1px 5px; }
.portal-header--admin { border-radius: 6px; box-shadow: 0 0 0 1px color-mix(in srgb, var(--portal-header-accent) 25%, transparent); }
.portal-header--profile { border-radius: 999px 12px 12px 999px; padding-left: 1.25rem !important; }

@media (max-width: 991px) {
  .portal-header .portal-nav {
    display: none !important;
  }

  .portal-header--profile {
    border-radius: 12px;
  }
}
