/* styles.css */
/* Modern Glassmorphic Design System for Outlook & Teams Dashboard */

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

:root {
  /* Colors */
  --bg-dark: #070913;
  --bg-base: #0f132a;
  --bg-card: rgba(22, 28, 54, 0.6);
  --bg-sidebar: rgba(13, 17, 36, 0.85);
  --bg-active: rgba(255, 255, 255, 0.08);
  --bg-hover: rgba(255, 255, 255, 0.04);
  
  --border-glass: rgba(255, 255, 255, 0.07);
  --border-focus: rgba(79, 110, 247, 0.5);

  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-dim: #6b7280;

  /* Accent highlights */
  --outlook-blue: #0078d4;
  --outlook-glow: rgba(0, 120, 212, 0.2);
  --teams-blue: #5b5fc7;
  --teams-glow: rgba(91, 95, 199, 0.2);
  --green-emerald: #10b981;
  --purple-neon: #a855f7;
  --amber-warning: #f59e0b;
  --red-destructive: #ef4444;

  /* Glassmorphism token */
  --glass-effect: backdrop-filter: blur(12px) saturate(160%);
  --box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);

  /* Fonts */
  --font-display: 'Outfit', 'Inter', sans-serif;
  --font-body: 'Inter', sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--font-body);
  scrollbar-width: thin;
  scrollbar-color: var(--border-glass) transparent;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border-glass);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-dim);
}

body {
  background-color: var(--bg-dark);
  background-image: 
    radial-gradient(at 0% 0%, rgba(91, 95, 199, 0.15) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(0, 120, 212, 0.15) 0px, transparent 50%),
    radial-gradient(at 50% 50%, rgba(15, 19, 42, 1) 0px, var(--bg-dark) 100%);
  color: var(--text-main);
  height: 100vh;
  overflow: hidden;
  display: flex;
}

/* Application Layout Container */
#app-container {
  display: flex;
  width: 100vw;
  height: 100vh;
  position: relative;
}

/* Sidebar Styling */
#sidebar {
  width: 260px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-glass);
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1rem;
  backdrop-filter: blur(20px);
  z-index: 100;
  transition: width 0.3s ease;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
  padding-left: 0.5rem;
}

.brand-section i {
  font-size: 1.5rem;
  color: var(--teams-blue);
  background: linear-gradient(135deg, var(--teams-blue), var(--outlook-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-section h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #fff, var(--text-muted));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  color: var(--text-muted);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent;
}

.nav-item:hover {
  background: var(--bg-hover);
  color: var(--text-main);
  transform: translateX(4px);
}

.nav-item.active {
  background: var(--bg-active);
  color: var(--text-main);
  border-color: var(--border-glass);
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.nav-item i {
  font-size: 1.15rem;
  width: 20px;
  text-align: center;
}

.nav-item span {
  font-family: var(--font-display);
  font-size: 0.95rem;
}

.nav-divider {
  height: 1px;
  background: var(--border-glass);
  margin: 1.5rem 0.5rem;
}

.sidebar-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem;
  border-top: 1px solid var(--border-glass);
  padding-top: 1rem;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teams-blue), var(--purple-neon));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.85rem;
  color: #fff;
  border: 2px solid var(--border-glass);
}

.user-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.user-info .user-name {
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.user-info .user-status {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.status-online { background-color: var(--green-emerald); box-shadow: 0 0 8px var(--green-emerald); }
.status-away { background-color: var(--amber-warning); box-shadow: 0 0 8px var(--amber-warning); }
.status-dnd { background-color: var(--red-destructive); box-shadow: 0 0 8px var(--red-destructive); }
.status-offline { background-color: var(--text-dim); }

/* Main Window Area */
#main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: relative;
  overflow: hidden;
}

/* Top Navigation Bar */
header {
  height: 70px;
  border-bottom: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  background: rgba(15, 19, 42, 0.4);
  backdrop-filter: blur(10px);
}

.header-search {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  padding: 0.5rem 1rem;
  width: 400px;
  gap: 0.75rem;
  transition: all 0.2s ease;
}

.header-search:focus-within {
  border-color: var(--border-focus);
  box-shadow: 0 0 12px rgba(79, 110, 247, 0.2);
}

.header-search input {
  background: transparent;
  border: none;
  color: var(--text-main);
  outline: none;
  width: 100%;
  font-size: 0.85rem;
}

.header-search input::placeholder {
  color: var(--text-dim);
}

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

.header-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.header-btn:hover {
  background: var(--bg-active);
  transform: translateY(-2px);
}

.connection-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--green-emerald);
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
}

.connection-pill.mock {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: var(--amber-warning);
}

/* View Container */
.view-panel {
  flex: 1;
  padding: 2rem;
  overflow-y: auto;
  display: none;
}

.view-panel.active {
  display: block;
  animation: fadeIn 0.4s ease forwards;
}

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

/* DASHBOARD OVERVIEW VIEW */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.dashboard-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 140px;
  backdrop-filter: blur(10px);
  transition: all 0.25s ease;
}

.dashboard-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-focus);
  box-shadow: var(--box-shadow);
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.card-top h3 {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.card-val {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  margin-top: 0.5rem;
}

.card-meta {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.dashboard-layout-split {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
}

.panel-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 1.5rem;
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
}

.panel-card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.notif-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.notif-item {
  display: flex;
  gap: 1rem;
  padding: 0.75rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  align-items: center;
  transition: background 0.2s ease;
}

.notif-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.notif-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}

.notif-body {
  flex: 1;
  font-size: 0.85rem;
}

.notif-body p {
  color: var(--text-main);
  line-height: 1.35;
}

.notif-body span {
  font-size: 0.75rem;
  color: var(--text-dim);
  display: block;
  margin-top: 0.2rem;
}

.quick-actions-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border-radius: 10px;
  border: 1px solid var(--border-glass);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
  cursor: pointer;
  width: 100%;
  color: var(--text-main);
  text-align: left;
  transition: all 0.2s ease;
}

.action-btn:hover {
  border-color: var(--border-focus);
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-2px);
}

.action-btn i {
  font-size: 1.2rem;
}

/* OUTLOOK EMAIL VIEW */
.split-view-container {
  display: flex;
  height: calc(100vh - 110px);
  margin: -2rem; /* Negate the view-panel padding */
  overflow: hidden;
}

.outlook-nav {
  width: 200px;
  border-right: 1px solid var(--border-glass);
  padding: 1.5rem 1rem;
  background: rgba(10, 14, 30, 0.3);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.folder-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.85rem;
  border-radius: 6px;
  font-size: 0.85rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.folder-item:hover {
  background: var(--bg-hover);
  color: var(--text-main);
}

.folder-item.active {
  background: var(--bg-active);
  color: var(--text-main);
  font-weight: 500;
}

.folder-count {
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.1);
  padding: 0.1rem 0.4rem;
  border-radius: 10px;
  color: var(--text-muted);
}

.outlook-list {
  width: 350px;
  border-right: 1px solid var(--border-glass);
  display: flex;
  flex-direction: column;
  background: rgba(12, 16, 36, 0.2);
}

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

.list-header h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
}

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

.email-list-item {
  padding: 1.25rem 1rem;
  border-bottom: 1px solid var(--border-glass);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.email-list-item::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--outlook-blue);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.email-list-item.unread::after {
  opacity: 1;
}

.email-list-item:hover {
  background: var(--bg-hover);
}

.email-list-item.active {
  background: var(--bg-active);
}

.item-top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.35rem;
}

.item-sender {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
}

.item-date {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.item-subject {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.25rem;
}

.email-list-item.unread .item-subject {
  font-weight: 700;
}

.item-preview {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-meta {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.4rem;
  font-size: 0.75rem;
  color: var(--text-dim);
}

.item-meta i.fa-flag {
  color: var(--amber-warning);
}

.outlook-reading-pane {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: rgba(8, 10, 24, 0.15);
}

.reading-pane-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  gap: 1rem;
}

.reading-pane-empty i {
  font-size: 3rem;
}

.reading-header {
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--border-glass);
  background: rgba(22, 28, 54, 0.2);
}

.reading-subject-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.reading-subject-line h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
}

.reading-actions {
  display: flex;
  gap: 0.5rem;
}

.reading-sender-details {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.sender-info-block {
  display: flex;
  flex-direction: column;
}

.sender-info-block .sender-name {
  font-size: 0.9rem;
  font-weight: 600;
}

.sender-info-block .sender-email {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.reading-body {
  flex: 1;
  padding: 2rem;
  overflow-y: auto;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.01);
}

.reading-body p {
  margin-bottom: 1rem;
}

.attachments-section {
  padding: 1rem 2rem;
  border-top: 1px solid var(--border-glass);
  background: rgba(10, 14, 30, 0.2);
}

.attachments-header {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.attachments-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.attachment-chip {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.attachment-chip:hover {
  border-color: var(--border-focus);
  background: var(--bg-active);
}

.attachment-chip i {
  font-size: 0.95rem;
}

.attachment-chip .file-name {
  font-weight: 500;
}

.attachment-chip .file-size {
  color: var(--text-dim);
}

/* TEAMS VIEW */
.teams-nav {
  width: 230px;
  border-right: 1px solid var(--border-glass);
  padding: 1.5rem 1rem;
  background: rgba(10, 14, 30, 0.3);
  display: flex;
  flex-direction: column;
}

.teams-toggle {
  display: flex;
  background: var(--bg-card);
  padding: 0.25rem;
  border-radius: 8px;
  border: 1px solid var(--border-glass);
  margin-bottom: 1.5rem;
}

.toggle-btn {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.4rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.toggle-btn.active {
  background: var(--bg-active);
  color: var(--text-main);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.teams-scroll {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.teams-section-title {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.chat-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.85rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.chat-item:hover {
  background: var(--bg-hover);
}

.chat-item.active {
  background: var(--bg-active);
}

.chat-item-info {
  flex: 1;
  overflow: hidden;
}

.chat-item-name {
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-item-last {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 0.15rem;
}

.team-wrapper {
  margin-bottom: 1rem;
}

.team-header {
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.5rem;
  color: var(--text-main);
  cursor: pointer;
}

.team-channels {
  margin-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-top: 0.25rem;
}

.channel-item {
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 0.35rem 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.channel-item:hover {
  background: var(--bg-hover);
  color: var(--text-main);
}

.channel-item.active {
  background: var(--bg-active);
  color: var(--text-main);
  font-weight: 500;
}

.teams-chat-pane {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: rgba(8, 10, 24, 0.15);
}

.chat-pane-header {
  height: 60px;
  border-bottom: 1px solid var(--border-glass);
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(22, 28, 54, 0.2);
}

.chat-pane-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.chat-pane-title h3 {
  font-size: 0.95rem;
  font-weight: 600;
}

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

.message-bubble-wrapper {
  display: flex;
  gap: 0.75rem;
  max-width: 75%;
}

.message-bubble-wrapper.me {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.msg-bubble {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  padding: 0.75rem 1rem;
  border-radius: 0 12px 12px 12px;
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--text-main);
  position: relative;
}

.message-bubble-wrapper.me .msg-bubble {
  background: linear-gradient(135deg, var(--teams-blue), rgba(91, 95, 199, 0.6));
  border-color: rgba(91, 95, 199, 0.3);
  border-radius: 12px 0 12px 12px;
}

.msg-sender-name {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.msg-time {
  font-size: 0.7rem;
  color: var(--text-dim);
  align-self: flex-end;
  margin-top: 0.25rem;
  display: block;
}

.message-bubble-wrapper.me .msg-time {
  text-align: right;
  color: rgba(255, 255, 255, 0.7);
}

.chat-composer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-glass);
  background: rgba(10, 14, 30, 0.2);
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.chat-composer input {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  color: var(--text-main);
  outline: none;
  font-size: 0.85rem;
}

.chat-composer input:focus {
  border-color: var(--border-focus);
}

.btn-icon {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.15s ease;
}

.btn-icon:hover {
  background: var(--bg-hover);
  color: var(--text-main);
}

.btn-icon.send-btn {
  background: var(--teams-blue);
  color: #fff;
}

.btn-icon.send-btn:hover {
  background: #4f52b2;
}

/* CHANNEL THREAD LAYOUT (Similar to Teams Channel format) */
.channel-post-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.post-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.post-author {
  font-size: 0.85rem;
  font-weight: 600;
}

.post-time {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.post-content {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-main);
}

.post-replies {
  margin-left: 2rem;
  padding-left: 1rem;
  border-left: 2px solid var(--border-glass);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.reply-item {
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.01);
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
}

.reply-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

/* CALENDAR VIEW */
.calendar-view-layout {
  display: grid;
  grid-template-columns: 2.5fr 1fr;
  gap: 2rem;
}

.calendar-month-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.calendar-month-header h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
}

.calendar-grid-container {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 1rem;
  backdrop-filter: blur(10px);
}

.calendar-day-label {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
  font-weight: 600;
  padding: 0.5rem 0;
}

.calendar-cell {
  aspect-ratio: 1.2;
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 6px;
  padding: 0.4rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.2s ease;
}

.calendar-cell:hover {
  background: var(--bg-hover);
  border-color: var(--border-glass);
}

.calendar-cell.today {
  border-color: var(--outlook-blue);
  background: rgba(0, 120, 212, 0.05);
}

.calendar-cell.other-month {
  opacity: 0.3;
}

.cell-num {
  font-size: 0.8rem;
  font-weight: 500;
}

.cell-events {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.cell-event-dot {
  height: 4px;
  border-radius: 2px;
  width: 100%;
}

.calendar-schedule-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.schedule-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.schedule-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-left: 4px solid var(--outlook-blue);
  border-radius: 0 8px 8px 0;
  padding: 1rem;
  transition: transform 0.2s ease;
}

.schedule-card:hover {
  transform: translateX(4px);
}

.schedule-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.schedule-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.schedule-location {
  font-size: 0.75rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.btn-sm {
  font-size: 0.7rem;
  padding: 0.35rem 0.7rem;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.5rem;
  transition: all 0.15s ease;
}

.btn-primary {
  background: var(--outlook-blue);
  color: #fff;
}

.btn-primary:hover {
  background: #0060aa;
}

.btn-teams {
  background: var(--teams-blue);
  color: #fff;
}

.btn-teams:hover {
  background: #4f52b2;
}

/* SETTINGS VIEW */
.settings-layout {
  max-width: 750px;
}

.settings-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(10px);
}

.settings-card h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.settings-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.form-group {
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.form-group input {
  background: rgba(10, 14, 30, 0.4);
  border: 1px solid var(--border-glass);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  color: var(--text-main);
  outline: none;
  font-size: 0.85rem;
  transition: border-color 0.2s ease;
}

.form-group input:focus {
  border-color: var(--border-focus);
}

.toggle-switch-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.toggle-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.toggle-info span {
  font-weight: 600;
  font-size: 0.85rem;
}

.toggle-info p {
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* Switch UI */
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
}

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

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--bg-dark);
  transition: .4s;
  border-radius: 34px;
  border: 1px solid var(--border-glass);
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: var(--text-muted);
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--teams-blue);
  border-color: rgba(91, 95, 199, 0.5);
}

input:checked + .slider:before {
  transform: translateX(24px);
  background-color: #fff;
}

.btn-lg {
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.85rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

/* COMPOSE MODALS AND OVERLAYS */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(4, 6, 15, 0.8);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

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

.modal-content {
  background: var(--bg-sidebar);
  border: 1px solid var(--border-glass);
  width: 600px;
  border-radius: 14px;
  box-shadow: var(--box-shadow);
  display: flex;
  flex-direction: column;
  transform: scale(0.9);
  transition: transform 0.3s ease;
  backdrop-filter: blur(25px);
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

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

.modal-header h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
}

.modal-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.modal-footer {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--border-glass);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  background: rgba(10, 14, 30, 0.2);
  border-radius: 0 0 14px 14px;
}

.close-modal-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.15rem;
}

/* Rich Text Area styling for compose body */
.rich-text-editor {
  background: rgba(10, 14, 30, 0.4);
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  min-height: 180px;
  padding: 1rem;
  color: var(--text-main);
  outline: none;
  font-size: 0.85rem;
  line-height: 1.5;
}

.rich-text-editor:focus {
  border-color: var(--border-focus);
}
