:root {
  --primary-gradient: linear-gradient(135deg, #3F51B5 0%, #1A237E 100%);
  --accent-color: #5C6BC0;
  --bg-color: #F8F9FE;
  --glass-bg: rgba(255, 255, 255, 0.9);
  --glass-border: rgba(255, 255, 255, 0.4);
  --card-shadow: 0 12px 32px rgba(26, 35, 126, 0.08);
  --text-main: #1A237E;
  --text-muted: #5C6BC0;
  --completed: #4CAF50;
  --pending: #FF9800;
  --in-progress: #9C27B0;
  --font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--font-family);
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
}

/* --- Layout Architecture --- */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* --- Premium Sidebar --- */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 280px;
  background: var(--glass-bg);
  backdrop-filter: blur(30px);
  border-right: 1px solid var(--glass-border);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  padding: 40px 0;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 10px 0 30px rgba(0, 0, 0, 0.02);
}

.sidebar-header {
  padding: 0 32px 48px;
}

.brand-id {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 3px;
  color: var(--text-muted);
  opacity: 0.6;
}

.nav-links {
  list-style: none;
  flex: 1;
}

.nav-item {
  padding: 16px 32px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 15px;
  transition: all 0.3s ease;
  position: relative;
}

.nav-item i { width: 22px; transition: transform 0.3s ease; }

.nav-item:hover {
  color: var(--text-main);
  background: rgba(63, 81, 181, 0.04);
}

.nav-item:hover i { transform: translateX(4px); }

.nav-item.active {
  color: var(--text-main);
  background: rgba(63, 81, 181, 0.08);
}

.nav-item.active::after {
  content: '';
  position: absolute;
  left: 0;
  top: 20%;
  height: 60%;
  width: 4px;
  background: var(--text-main);
  border-radius: 0 4px 4px 0;
}

.sidebar-footer {
  padding: 32px;
  border-top: 1px solid var(--glass-border);
}

.logout-link {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #F44336;
  font-weight: 800;
  background: transparent;
  border: none;
  cursor: pointer;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 1px;
}

/* --- Main Content & Sticky Header --- */
.app-content {
  margin-left: 280px;
  flex: 1;
  min-height: 100vh;
  padding-bottom: 80px;
}

header {
  height: 240px;
  background: var(--primary-gradient);
  color: white;
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border-radius: 0 0 40px 40px;
  box-shadow: 0 10px 40px rgba(26, 35, 126, 0.2);
  margin-bottom: 32px;
  animation: slideDownFade 0.8s ease;
}

.header-meta {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 3px;
  opacity: 0.6;
  margin-bottom: 8px;
}

.greeting {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 4px;
  letter-spacing: -0.5px;
}

.breadcrumb {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 4px;
  opacity: 0.8;
}

/* --- Grid & Cards --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

.section-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.section-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.2px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.premium-card {
  background: white;
  padding: 32px;
  border-radius: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: var(--card-shadow);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  animation: cardEntrance 0.6s ease backwards;
}

.premium-card:hover { transform: translateY(-8px); box-shadow: 0 20px 48px rgba(26, 35, 126, 0.12); }

.card-icon-box {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  font-size: 24px;
}

.card-value {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 4px;
}

.card-label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
}

/* --- Upcoming Meeting Card --- */
.meeting-card {
  background: var(--primary-gradient);
  border-radius: 32px;
  padding: 32px;
  color: white;
  position: relative;
  overflow: hidden;
  box-shadow: 0 15px 45px rgba(63, 81, 181, 0.3);
  margin-bottom: 40px;
}

.meeting-tag {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  padding: 6px 14px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.meeting-title {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 8px;
}

.meeting-meta {
  display: flex;
  gap: 24px;
  font-size: 14px;
  opacity: 0.9;
  margin-bottom: 32px;
}

.meeting-meta div { display: flex; align-items: center; gap: 8px; }

.join-btn {
  background: white;
  color: var(--text-main);
  border: none;
  padding: 16px 32px;
  border-radius: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition: all 0.3s ease;
  width: max-content;
}

.join-btn:hover { background: #F0F0F0; transform: scale(1.05); }

/* --- Activity & Task Lists --- */
.activity-list { display: grid; gap: 16px; }

.activity-item {
  background: white;
  padding: 24px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
  transition: transform 0.2s ease;
  animation: slideInLeft 0.5s ease backwards;
}

.activity-item:hover { transform: translateX(8px); }

.activity-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.activity-info h4 { font-size: 16px; font-weight: 800; margin-bottom: 4px; }
.activity-info p { font-size: 13px; color: var(--text-muted); font-weight: 500; }

/* --- Chat Layout (WhatsApp Style) --- */
.chat-window {
  background: white;
  border-radius: 24px;
  height: calc(100vh - 280px);
  min-height: 480px;
  display: flex !important;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  border: 1px solid #EDEDED;
}

.chat-sidebar {
  width: 320px;
  border-right: 1px solid #F0F0F0;
  display: flex;
  flex-direction: column;
  background: #F9FAFF;
}

.chat-sidebar-header {
  padding: 24px;
  border-bottom: 1px solid #F0F0F0;
  font-weight: 800;
  color: var(--text-main);
  background: white;
  font-size: 16px;
}

.chat-member-list {
  flex: 1;
  overflow-y: auto;
}

.chat-member-item {
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  border-bottom: 1px solid #F8F9FF;
}

.chat-member-item:hover { background: #F0F4FF; }

.member-avatar-mini {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--primary-gradient);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  box-shadow: 0 4px 10px rgba(63, 81, 181, 0.2);
}

.chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: white;
}

.chat-messages {
  flex: 1;
  padding: 32px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chat-input-area {
  padding: 24px;
  border-top: 1px solid #F0F0F0;
  display: flex;
  gap: 16px;
  background: white;
  align-items: center;
}

/* --- Profile View --- */
.profile-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 32px;
}

.profile-card-left {
  background: white;
  border-radius: 32px;
  padding: 40px;
  text-align: center;
  box-shadow: var(--card-shadow);
}

.profile-avatar-large {
  width: 120px;
  height: 120px;
  border-radius: 40px;
  background: var(--primary-gradient);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  font-weight: 800;
  margin: 0 auto 24px;
  box-shadow: 0 20px 40px rgba(63, 81, 181, 0.3);
}

.profile-details-card {
  background: white;
  border-radius: 32px;
  padding: 40px;
  box-shadow: var(--card-shadow);
}

.profile-info-row {
  display: flex;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid #F8F9FE;
}

.profile-info-label {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 14px;
}

.profile-info-value {
  color: var(--text-main);
  font-weight: 700;
  font-size: 14px;
}

/* --- Member Details Modal --- */
.member-modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 24px;
}

.stat-pill {
  background: #F8F9FE;
  padding: 12px 20px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
}

.stat-pill-label { font-size: 11px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; }
.stat-pill-value { font-size: 18px; font-weight: 800; color: var(--text-main); }

/* --- FAB (Floating Action Button) --- */
.fab-container {
  position: fixed;
  bottom: 40px;
  right: 40px;
  z-index: 1100;
  display: flex;
  flex-direction: column-reverse;
  gap: 16px;
  align-items: flex-end;
}

.main-fab {
  width: 64px;
  height: 64px;
  background: var(--text-main);
  color: white;
  border-radius: 24px;
  border: none;
  cursor: pointer;
  box-shadow: 0 12px 32px rgba(26, 35, 126, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.main-fab:hover { border-radius: 32px; transform: rotate(90deg) scale(1.1); }

.fab-menu {
  display: none;
  flex-direction: column;
  gap: 12px;
}

.fab-container:hover .fab-menu { display: flex; animation: slideUp 0.3s ease; }

.fab-mini {
  width: 52px;
  height: 52px;
  background: white;
  color: var(--text-main);
  border-radius: 18px;
  border: 1px solid var(--glass-border);
  cursor: pointer;
  box-shadow: 0 8px 16px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.fab-mini:hover { transform: scale(1.1); background: #F8F9FE; }

/* --- Modals & Filters --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 35, 126, 0.4);
  backdrop-filter: blur(12px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-content {
  background: white;
  width: 100%;
  max-width: 540px;
  border-radius: 32px;
  padding: 40px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.2);
  animation: modalIn 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.filter-bar {
  background: white;
  padding: 16px 24px;
  border-radius: 20px;
  box-shadow: var(--card-shadow);
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 32px;
}

.search-input {
  flex: 1;
  border: none;
  padding: 12px;
  font-size: 15px;
  outline: none;
}

/* --- Responsive Adjustments --- */
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); width: 0; padding: 0; pointer-events: none; }
  .app-content { margin-left: 0; padding-bottom: 120px; }
  .bottom-nav { 
    display: flex; 
    position: fixed; bottom: 24px; left: 24px; right: 24px; 
    height: 72px; padding: 0 16px;
    background: var(--glass-bg); backdrop-filter: blur(20px);
    border-radius: 36px; border: 1px solid var(--glass-border);
    justify-content: space-around; align-items: center;
    z-index: 1000; box-shadow: 0 12px 40px rgba(0,0,0,0.1);
  }
}

/* --- Animations --- */
@keyframes cardEntrance { from { opacity: 0; transform: translateY(30px) scale(0.95); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes slideDownFade { from { opacity: 0; transform: translateY(-40px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideInLeft { from { opacity: 0; transform: translateX(-20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes slideUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes modalIn { from { opacity: 0; transform: scale(0.9) translateY(40px); } to { opacity: 1; transform: scale(1) translateY(0); } }
/* --- Deletions & Sub-Nav --- */
.delete-btn {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(244, 67, 54, 0.05);
  color: #F44336;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.delete-btn:hover {
  background: #F44336;
  color: white;
  transform: scale(1.1);
}

.sub-nav {
    display: flex;
  gap: 12px;
  margin: 10px 0 32px 0;
  padding: 8px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  width: max-content;
  border-radius: 20px;
  border: 1px solid rgba(63, 81, 181, 0.1);
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  position: relative;
  z-index: 100;
}

.sub-nav-item {
  padding: 10px 24px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  color: var(--text-muted);
}

.sub-nav-item:hover {
  background: rgba(63, 81, 181, 0.05);
  color: var(--text-main);
}

.sub-nav-item.active {
  background: var(--primary-gradient);
  color: white;
  box-shadow: 0 8px 16px rgba(63, 81, 181, 0.2);
}

.history-card {
  opacity: 0.6;
  filter: grayscale(0.8);
  border-left: 3px solid #DDD !important;
}

.meeting-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}
