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

/* Core variables */
:root {
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Theme variables - Default Light Mode */
  --bg-primary: #f8fafc;
  --bg-secondary: #f1f5f9;
  --surface: #ffffff;
  --surface-hover: #f1f5f9;
  --border-color: #e2e8f0;
  
  --primary: #701a60; /* Plum Berry */
  --primary-hover: #57134a;
  --primary-light: #fbeefe;
  
  --secondary: #c09d6d; /* Warm Gold */
  --secondary-hover: #ae8a5a;
  --secondary-light: #fbf5eb;
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(112, 26, 96, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-gold: 0 10px 15px -3px rgba(192, 157, 109, 0.15);
  
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --sidebar-width: 260px;
  --header-height: 70px;
  
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Theme Variables */
[data-theme="dark"] {
  --bg-primary: #0a0609;
  --bg-secondary: #120b10;
  --surface: #1a1118;
  --surface-hover: #261a23;
  --border-color: #2e1e2b;
  
  --primary-light: #2c0e27;
  
  --secondary-light: #2c2114;
  
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;
  
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 4px 12px -2px rgba(0, 0, 0, 0.4);
}

/* Global Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  transition: background-color 0.3s, color 0.3s;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  outline: none;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--secondary);
}

/* Typography Helpers */
.title-gradient {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Premium Layout & Flex Containers */
#app-root {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.main-layout {
  display: flex;
  flex: 1;
  margin-top: var(--header-height);
}

.content-area {
  flex: 1;
  padding: 2rem;
  overflow-y: auto;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.content-area.has-sidebar {
  margin-left: var(--sidebar-width);
  width: calc(100% - var(--sidebar-width));
}

/* Header/Navbar Navigation styling */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(var(--surface), 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  z-index: 100;
  transition: var(--transition);
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--primary);
}

.logo-mark {
  height: 36px;
  width: 36px;
  background-color: var(--primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  border-bottom: 3px solid var(--secondary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-item {
  color: var(--text-secondary);
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.nav-item:hover, .nav-item.active {
  color: var(--primary);
  background: var(--primary-light);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Custom Interactive Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: white;
  box-shadow: var(--shadow-md);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 12px rgba(112, 26, 96, 0.2);
}

.btn-secondary {
  background: linear-gradient(135deg, var(--secondary), var(--secondary-hover));
  color: white;
  box-shadow: var(--shadow-md);
}
.btn-secondary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-gold);
}

.btn-success {
  background: linear-gradient(135deg, var(--success), #059669);
  color: white;
  box-shadow: var(--shadow-md);
}
.btn-success:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 12px rgba(16, 185, 129, 0.2);
}

.btn-danger {
  background: linear-gradient(135deg, var(--danger), #dc2626);
  color: white;
  box-shadow: var(--shadow-md);
}
.btn-danger:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 12px rgba(239, 68, 68, 0.2);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}
.btn-outline:hover {
  background: var(--bg-secondary);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}
.btn-ghost:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

/* Sidebar styling */
aside.sidebar {
  position: fixed;
  top: var(--header-height);
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background: var(--surface);
  border-right: 1px solid var(--border-color);
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  overflow-y: auto;
  z-index: 90;
}

.sidebar-heading {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  padding: 0.75rem;
  margin-top: 1rem;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.sidebar-item:hover, .sidebar-item.active {
  background: var(--primary-light);
  color: var(--primary);
}

/* Glass Cards & Grids */
.glass-card {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.glass-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(450px, 1fr));
  gap: 1.5rem;
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 6, 9, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}

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

.modal-container {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  padding: 2rem;
  position: relative;
  transform: translateY(20px);
  transition: var(--transition);
}

.modal-overlay.active .modal-container {
  transform: translateY(0);
}

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

.modal-close {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
}

/* Forms styling */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: var(--transition);
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(112, 26, 96, 0.1);
  background: var(--surface);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* Dynamic Tab Bar */
.tab-bar {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
  margin-bottom: 2rem;
  overflow-x: auto;
}

.tab-btn {
  background: transparent;
  border: none;
  padding: 0.75rem 1.25rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}

.tab-btn:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.tab-btn.active {
  background: var(--primary-light);
  color: var(--primary);
}

/* timeline styles */
.timeline-post {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.post-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.user-avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 2px solid var(--secondary);
}

.post-media {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-top: 1rem;
}

.post-actions {
  display: flex;
  gap: 1.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.post-comments {
  margin-top: 1rem;
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  padding: 1rem;
}

.comment-item {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
}

/* Trello-like Kanban Board style */
.kanban-board {
  display: flex;
  gap: 1.25rem;
  align-items: start;
  overflow-x: auto;
  padding: 1.5rem;
  background: linear-gradient(135deg, #0079bf 0%, #5067b5 100%);
  border-radius: var(--radius-lg);
  min-height: 620px;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
}

[data-theme="dark"] .kanban-board {
  background: linear-gradient(135deg, #101622 0%, #1f1b2c 100%);
}

.kanban-column {
  background: rgba(241, 245, 249, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  width: 280px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  max-height: 550px;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .kanban-column {
  background: rgba(26, 17, 24, 0.95);
  border-color: rgba(255, 255, 255, 0.05);
}

.kanban-column-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  margin-bottom: 0.75rem;
  padding: 0.25rem 0.5rem;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.kanban-cards-container {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  overflow-y: auto;
  padding-bottom: 0.5rem;
}

.kanban-cards-container::-webkit-scrollbar {
  width: 4px;
}
.kanban-cards-container::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: var(--radius-full);
}

.kanban-card {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  cursor: grab;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.kanban-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.12);
  border-color: var(--secondary);
}

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

/* Card layout components */
.kanban-card-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
  line-height: 1.3;
}

.kanban-card-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin: 0;
}

.kanban-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.kanban-tag {
  display: inline-block;
  font-size: 0.7rem;
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
  font-weight: 600;
  color: white;
  text-shadow: 0 1px 1px rgba(0,0,0,0.1);
  margin-top: 0 !important;
}

/* Tag Color Variations */
.tag-red { background: #ea4335; }
.tag-orange { background: #ff9f1a; }
.tag-yellow { background: #f1c40f; color: #333; text-shadow: none; }
.tag-green { background: #2ecc71; }
.tag-blue { background: #2980b9; }
.tag-purple { background: #9b59b6; }
.tag-default { background: var(--secondary); }

.kanban-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.25rem;
  border-top: 1px solid var(--border-color);
  padding-top: 0.5rem;
}

.kanban-card-badges {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-muted);
  font-size: 0.75rem;
}

.kanban-badge {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.kanban-badge.badge-overdue {
  color: #ea4335;
  background: rgba(234, 67, 53, 0.1);
  padding: 0.1rem 0.3rem;
  border-radius: 3px;
  font-weight: 600;
}

.kanban-badge.badge-soon {
  color: #ff9f1a;
  background: rgba(255, 159, 26, 0.1);
  padding: 0.1rem 0.3rem;
  border-radius: 3px;
  font-weight: 600;
}

.kanban-card-avatars {
  display: flex;
  align-items: center;
  flex-row-reverse: row-reverse;
}

.kanban-card-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid var(--surface);
  object-fit: cover;
  margin-left: -6px;
  transition: transform 0.15s ease;
}

.kanban-card-avatar:hover {
  transform: translateY(-2px);
  z-index: 10;
}

.kanban-column-footer {
  margin-top: 0.5rem;
  padding-top: 0.25rem;
}

.btn-add-card {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.85rem;
  padding: 0.4rem 0.5rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition: background 0.2s ease, color 0.2s ease;
}

.btn-add-card:hover {
  background: rgba(9, 30, 66, 0.08);
  color: var(--text-primary);
}

[data-theme="dark"] .btn-add-card:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* Add column card stylings */
.kanban-column.add-column-list {
  background: rgba(255, 255, 255, 0.15);
  border: 1px dashed rgba(255, 255, 255, 0.3);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  transition: background 0.25s ease;
  min-height: 75px;
}

.kanban-column.add-column-list:hover {
  background: rgba(255, 255, 255, 0.25);
}

.kanban-column.add-column-list span {
  color: white;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Trello Modal Details Layout */
.trello-modal-layout {
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 1.5rem;
}

.trello-modal-main {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.trello-modal-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.trello-sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.trello-sidebar-section-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.trello-sidebar-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.5rem 0.75rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.trello-sidebar-btn:hover {
  background: var(--surface-hover);
  border-color: var(--secondary);
}

/* Trello Comments Section */
.trello-comments-section {
  border-top: 1px solid var(--border-color);
  padding-top: 1.5rem;
  margin-top: 1rem;
}

.trello-comment-composer {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.trello-comment-composer textarea {
  flex: 1;
  resize: vertical;
  min-height: 60px;
}

.trello-comments-feed {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.trello-comment-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  background: var(--bg-secondary);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.trello-comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.25rem;
}

.trello-comment-author {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-primary);
}

.trello-comment-date {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.trello-comment-body {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.4;
  white-space: pre-line;
}

@media (max-width: 600px) {
  .trello-modal-layout {
    grid-template-columns: 1fr;
  }
}

/* Chat Layout */
.chat-wrapper {
  display: grid;
  grid-template-columns: 280px 1fr;
  height: calc(100vh - var(--header-height) - 150px);
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.chat-users-list {
  border-right: 1px solid var(--border-color);
  overflow-y: auto;
}

.chat-user-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  cursor: pointer;
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}

.chat-user-item:hover, .chat-user-item.active {
  background: var(--primary-light);
}

.chat-main {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.chat-messages {
  flex: 1;
  padding: 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.chat-bubble {
  max-width: 70%;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-lg);
  font-size: 0.95rem;
  line-height: 1.4;
}

.chat-bubble.sent {
  align-self: flex-end;
  background: var(--primary);
  color: white;
  border-bottom-right-radius: 4px;
}

.chat-bubble.received {
  align-self: flex-start;
  background: var(--bg-secondary);
  color: var(--text-primary);
  border-bottom-left-radius: 4px;
}

.chat-input-area {
  padding: 1rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 0.75rem;
}

/* Calendar Month Grid */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  background: var(--border-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.calendar-day-header {
  background: var(--bg-secondary);
  padding: 0.75rem;
  text-align: center;
  font-weight: 600;
  font-size: 0.9rem;
}

.calendar-cell {
  background: var(--surface);
  min-height: 100px;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.calendar-cell.inactive {
  background: var(--bg-primary);
  color: var(--text-muted);
}

.calendar-day-number {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.calendar-event-tag {
  font-size: 0.75rem;
  padding: 0.2rem 0.4rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  background: var(--primary-light);
  color: var(--primary);
  border-left: 3px solid var(--secondary);
}

/* Dynamic button labels mapping classes */
.btn-membros, .btn-grupos, .btn-participar, .btn-checkin {
  /* classes customizaveis injetadas no JS */
}

/* User Badge in Header */
.user-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  cursor: pointer;
}

.user-badge img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

.blocked-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(10, 6, 9, 0.9);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
  z-index: 999;
  text-align: center;
  padding: 2rem;
}

/* Theme Toggle & Language selector */
.theme-toggle, .lang-select {
  background: none;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.5rem;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.theme-toggle:hover, .lang-select:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

/* Home / Hero Section */
.hero-section {
  text-align: center;
  padding: 5rem 2rem;
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--bg-primary) 100%);
  border-radius: var(--radius-lg);
  margin-bottom: 3rem;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto 2.5rem auto;
}

/* Pricing Cards */
.pricing-card {
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: var(--transition);
}

.pricing-card.premium {
  border-color: var(--secondary);
  position: relative;
}

.pricing-card.premium::after {
  content: 'Mais popular';
  position: absolute;
  top: -15px;
  background: var(--secondary);
  color: white;
  padding: 0.25rem 1rem;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  text-transform: uppercase;
}

.pricing-price {
  font-size: 2.5rem;
  font-weight: 800;
  margin: 1.5rem 0;
  color: var(--primary);
}

.pricing-features {
  list-style: none;
  margin: 2rem 0;
  width: 100%;
}

.pricing-features li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
}

/* Gamification Rank List */
.rank-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.rank-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), 
              border-color 0.25s cubic-bezier(0.4, 0, 0.2, 1), 
              box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.rank-item:hover {
  transform: translateY(-2px);
  border-color: var(--secondary);
  box-shadow: var(--shadow-md);
}

.rank-number {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 800;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
}

/* Podium styling for top 3 rankings */
.rank-list .rank-item:nth-child(1) {
  border-color: rgba(212, 175, 55, 0.4);
  background: linear-gradient(90deg, var(--surface) 0%, rgba(212, 175, 55, 0.05) 100%);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.1);
}
.rank-list .rank-item:nth-child(1) .rank-number {
  color: #d4af37; /* Gold */
  background: rgba(212, 175, 55, 0.1);
}

.rank-list .rank-item:nth-child(2) {
  border-color: rgba(192, 192, 192, 0.4);
  background: linear-gradient(90deg, var(--surface) 0%, rgba(192, 192, 192, 0.05) 100%);
  box-shadow: 0 4px 12px rgba(192, 192, 192, 0.1);
}
.rank-list .rank-item:nth-child(2) .rank-number {
  color: #a0a0a0; /* Silver */
  background: rgba(192, 192, 192, 0.12);
}

.rank-list .rank-item:nth-child(3) {
  border-color: rgba(205, 127, 50, 0.4);
  background: linear-gradient(90deg, var(--surface) 0%, rgba(205, 127, 50, 0.05) 100%);
  box-shadow: 0 4px 12px rgba(205, 127, 50, 0.1);
}
.rank-list .rank-item:nth-child(3) .rank-number {
  color: #cd7f32; /* Bronze */
  background: rgba(205, 127, 50, 0.1);
}

/* Style for rank 4 and below */
.rank-list .rank-item:nth-child(n+4) .rank-number {
  color: var(--text-muted);
  background: var(--bg-secondary);
}

/* Logs console style */
.logs-console {
  background: #0f172a;
  color: #38bdf8;
  font-family: monospace;
  padding: 1.5rem;
  border-radius: var(--radius-md);
  max-height: 400px;
  overflow-y: auto;
  font-size: 0.85rem;
  border: 1px solid #334155;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.log-line {
  line-height: 1.4;
  border-bottom: 1px solid #1e293b;
  padding-bottom: 0.25rem;
}

.log-line span.timestamp {
  color: #64748b;
  margin-right: 0.75rem;
}

.log-line span.user {
  color: #f472b6;
  margin-right: 0.5rem;
}

/* Responsive CSS */
@media (max-width: 768px) {
  aside.sidebar {
    width: 60px;
  }
  aside.sidebar span {
    display: none;
  }
  .content-area.has-sidebar {
    margin-left: 60px;
    width: calc(100% - 60px);
  }
  .kanban-board {
    flex-direction: column;
    align-items: stretch;
  }
  .chat-wrapper {
    grid-template-columns: 1fr;
  }
  .chat-users-list {
    display: none;
  }
}

/* Layout wrapper updates */
.content-wrapper {
  display: flex;
  flex-direction: column;
  flex: 1;
  height: calc(100vh - var(--header-height));
  overflow-y: auto;
  transition: var(--transition);
}

/* Sidebar sibling spacing */
.sidebar:not([style*="display: none"]) ~ .content-wrapper {
  margin-left: var(--sidebar-width);
  width: calc(100% - var(--sidebar-width));
}

/* Reset individual has-sidebar spacings since wrapper handles it */
.content-area.has-sidebar {
  margin-left: 0 !important;
  width: 100% !important;
}

/* Hide footer inside community portals (which have sidebar) */
.content-area.has-sidebar + .app-footer {
  display: none;
}

/* Remove overflow scroll from content area since wrapper scrolls */
.content-area {
  overflow-y: visible;
}

/* Footer styling */
.app-footer {
  background: var(--surface);
  border-top: 1px solid var(--border-color);
  padding: 3rem 2rem 1.5rem;
  margin-top: auto;
  position: relative;
  z-index: 80;
}

.footer-container {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 2rem;
}

.footer-brand .logo-container {
  margin-bottom: 1rem;
}

.footer-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
  max-width: 320px;
}

.footer-nav h4, .footer-legal h4 {
  color: var(--text-primary);
  font-size: 1rem;
  margin-bottom: 1.25rem;
  font-weight: 600;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: var(--transition);
  width: fit-content;
}

.footer-links a:hover, .footer-links a.active {
  color: var(--primary);
  transform: translateX(2px);
}

.footer-bottom {
  max-width: 1400px;
  margin: 0 auto;
  border-top: 1px solid var(--border-color);
  padding-top: 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

@media (max-width: 768px) {
  .sidebar:not([style*="display: none"]) ~ .content-wrapper {
    margin-left: 60px;
    width: calc(100% - 60px);
  }
  .content-area.has-sidebar {
    margin-left: 0 !important;
    width: 100% !important;
  }
  .footer-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* Attendance List inside Meetings */
.attendance-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 400px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.attendance-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

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

.attendance-user-photo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-color);
}

.attendance-status-area {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.badge-present {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--success);
  background: rgba(16, 185, 129, 0.1);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
}

.badge-absent {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--danger);
  background: rgba(239, 68, 68, 0.1);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
}

/* Chat Groups Layout */
.chat-group-layout {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 1.5rem;
  height: calc(100vh - var(--header-height) - 160px);
  min-height: 520px;
}

@media (max-width: 900px) {
  .chat-group-layout {
    grid-template-columns: 1fr;
    height: auto;
  }
}

.chat-group-main-chat {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100%;
}

.chat-group-messages-container {
  flex: 1;
  padding: 1.25rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: var(--bg-primary);
}

.chat-group-msg-row {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  max-width: 80%;
}

.chat-group-msg-row.sent {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.chat-group-msg-row.received {
  align-self: flex-start;
}

.chat-group-msg-bubble {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  line-height: 1.4;
  box-shadow: var(--shadow-sm);
}

.chat-group-msg-row.sent .chat-group-msg-bubble {
  background: var(--primary);
  color: white;
  border-top-right-radius: 2px;
}

.chat-group-msg-row.received .chat-group-msg-bubble {
  background: var(--surface);
  color: var(--text-primary);
  border-top-left-radius: 2px;
  border: 1px solid var(--border-color);
}

.chat-group-msg-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  padding: 0 0.25rem;
}

.chat-group-msg-row.sent .chat-group-msg-meta {
  flex-direction: row-reverse;
}

.chat-group-side-tools {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  height: 100%;
}

.chat-group-side-card {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.group-meetings-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-right: 0.25rem;
}

.group-meeting-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: border-color 0.2s ease;
}

.group-meeting-item:hover {
  border-color: var(--secondary);
}

