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

/* --- CSS Variables & Design Tokens --- */
:root {
  --bg-main: #0b0f17;
  --bg-sidebar: #0f1420;
  --bg-card: rgba(21, 28, 44, 0.7);
  --bg-card-hover: rgba(30, 41, 62, 0.85);
  --bg-detail: #121927;
  --border-color: rgba(38, 55, 87, 0.5);
  --border-hover: rgba(212, 175, 55, 0.5);
  
  /* Accent Colors */
  --accent-gold: #d4af37;
  --accent-gold-glow: rgba(212, 175, 55, 0.25);
  --accent-gold-text: #e5c158;
  
  --secondchoice-blue: #2a82e6;
  --secondchoice-blue-glow: rgba(42, 130, 230, 0.2);
  --forgeos-teal: #00bfa5;
  --forgeos-teal-glow: rgba(0, 191, 165, 0.2);
  
  --text-main: #e2e8f0;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --text-error: #ff4a76;
  
  /* Fonts */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', Courier, monospace;
  
  /* Transition Speeds */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --transition-slow: 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-main);
  height: 100vh;
  overflow: hidden;
  display: flex;
  background-image: 
    radial-gradient(at 0% 0%, rgba(42, 130, 230, 0.05) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(0, 191, 165, 0.05) 0px, transparent 50%);
}

button, input, select, textarea {
  font-family: inherit;
  color: inherit;
}

/* --- Custom Scrollbar --- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: rgba(11, 15, 23, 0.5);
}

::-webkit-scrollbar-thumb {
  background: rgba(38, 55, 87, 0.8);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-gold);
}

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

/* --- Sidebar --- */
aside.sidebar {
  width: 280px;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  padding: 24px;
  justify-content: space-between;
  flex-shrink: 0;
  z-index: 10;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}

.logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--secondchoice-blue), var(--forgeos-teal));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px rgba(42, 130, 230, 0.3);
}

.logo-icon svg {
  fill: #fff;
  width: 20px;
  height: 20px;
}

.logo-text {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 1px;
  text-transform: uppercase;
  background: linear-gradient(to right, #fff, var(--text-muted));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-grow: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 8px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition-fast);
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.nav-item:hover, .nav-item.active {
  color: var(--text-main);
  background-color: var(--bg-card);
  border-color: var(--border-color);
}

.nav-item.active {
  border-left: 3px solid var(--accent-gold);
  background: linear-gradient(to right, rgba(212, 175, 55, 0.05), transparent);
}

.nav-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  transition: var(--transition-fast);
}

.nav-item:hover svg, .nav-item.active svg {
  color: var(--accent-gold-text);
  filter: drop-shadow(0 0 4px var(--accent-gold-glow));
}

/* Sidebar Accounts Panel */
.accounts-widget {
  margin-top: auto;
  border-top: 1px solid var(--border-color);
  padding-top: 24px;
}

.widget-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-dim);
  margin-bottom: 12px;
}

.account-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(11, 15, 23, 0.4);
  margin-bottom: 8px;
  font-size: 12px;
  border: 1px solid transparent;
  transition: var(--transition-fast);
}

.account-toggle:hover {
  border-color: var(--border-color);
}

.account-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.indicator.secondchoice {
  background-color: var(--secondchoice-blue);
  box-shadow: 0 0 8px var(--secondchoice-blue);
}

.indicator.forgeos {
  background-color: var(--forgeos-teal);
  box-shadow: 0 0 8px var(--forgeos-teal);
}

.switch {
  position: relative;
  display: inline-block;
  width: 32px;
  height: 18px;
}

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

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(38, 55, 87, 0.5);
  transition: .3s;
  border-radius: 18px;
}

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

input:checked + .slider {
  background-color: var(--accent-gold);
}

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

.sync-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-dim);
  padding: 8px 12px;
}

.sync-spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(212, 175, 55, 0.2);
  border-radius: 50%;
  border-top-color: var(--accent-gold);
  animation: spin 1s linear infinite;
}

/* --- Main Dashboard Container --- */
main.main-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: relative;
  overflow: hidden;
}

/* --- Executive Header --- */
header.dashboard-header {
  padding: 24px 32px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: rgba(15, 20, 32, 0.4);
  backdrop-filter: blur(8px);
  z-index: 5;
}

.greeting-section h1 {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.greeting-section h1 span.boss {
  color: var(--accent-gold-text);
  text-shadow: 0 0 10px rgba(229, 193, 88, 0.2);
}

.greeting-section p {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}

.search-box {
  position: relative;
  width: 280px;
}

.search-box input {
  width: 100%;
  padding: 10px 16px 10px 38px;
  background-color: rgba(22, 31, 48, 0.6);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-main);
  transition: var(--transition-fast);
}

.search-box input:focus {
  outline: none;
  border-color: var(--accent-gold);
  box-shadow: 0 0 10px var(--accent-gold-glow);
  background-color: rgba(22, 31, 48, 0.9);
}

.search-box svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-dim);
  pointer-events: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-gold), #b89124);
  color: #0b0f17;
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.2);
  transition: var(--transition-fast);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(212, 175, 55, 0.3);
}

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

/* --- Dual Column Feed (SecondChoice & Forgeos) --- */
.dual-feed-container {
  display: flex;
  flex-grow: 1;
  overflow: hidden;
  height: calc(100vh - 85px);
  background: rgba(11, 15, 23, 0.2);
}

.feed-column {
  width: 50%;
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.feed-column:last-child {
  border-right: none;
}

/* Column Header */
.feed-header {
  padding: 16px 24px;
  background: rgba(22, 31, 48, 0.3);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.feed-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.feed-title svg {
  width: 16px;
  height: 16px;
}

.feed-column.secondchoice .feed-title {
  color: var(--secondchoice-blue);
}

.feed-column.forgeos .feed-title {
  color: var(--forgeos-teal);
}

.feed-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.feed-column.secondchoice .feed-badge {
  background: rgba(42, 130, 230, 0.1);
  color: #a4cdff;
  border-color: rgba(42, 130, 230, 0.2);
}

.feed-column.forgeos .feed-badge {
  background: rgba(0, 191, 165, 0.1);
  color: #a3f7eb;
  border-color: rgba(0, 191, 165, 0.2);
}

.feed-actions {
  display: flex;
  gap: 8px;
}

.feed-btn {
  background: none;
  border: none;
  padding: 6px;
  color: var(--text-dim);
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.feed-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.feed-btn svg {
  width: 14px;
  height: 14px;
}

/* Email Card List */
.email-list {
  flex-grow: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Email Card */
.email-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px;
  cursor: pointer;
  position: relative;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
  flex-shrink: 0;
}

.email-card:hover {
  transform: translateY(-2px);
  background-color: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.email-card.active {
  border-color: var(--accent-gold);
  box-shadow: 0 0 12px var(--accent-gold-glow);
  background-color: rgba(26, 35, 50, 0.9);
}

/* Left Indicator Strip */
.email-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
}

.feed-column.secondchoice .email-card::before {
  background-color: var(--secondchoice-blue);
}

.feed-column.forgeos .email-card::before {
  background-color: var(--forgeos-teal);
}

/* Card unread dot */
.email-card.unread .card-unread-dot {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.feed-column.secondchoice .email-card.unread .card-unread-dot {
  background-color: var(--secondchoice-blue);
  box-shadow: 0 0 8px var(--secondchoice-blue);
}

.feed-column.forgeos .email-card.unread .card-unread-dot {
  background-color: var(--forgeos-teal);
  box-shadow: 0 0 8px var(--forgeos-teal);
}

/* Styling for Unread Cards (glowing/stands out) */
.email-card.unread {
  background-color: rgba(255, 255, 255, 0.04) !important;
  border-color: rgba(212, 175, 55, 0.2) !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.email-card.unread .card-sender {
  font-weight: 800 !important;
  color: #fff !important;
}

.email-card.unread .card-subject {
  font-weight: 700 !important;
  color: var(--text-main) !important;
}

/* Styling for Read Cards (dimmed/subtle) */
.email-card:not(.unread) {
  opacity: 0.75;
  background-color: rgba(10, 14, 23, 0.4);
  border-color: rgba(255, 255, 255, 0.05);
}

.email-card:not(.unread):hover {
  opacity: 1;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
  padding-right: 12px;
}

.card-sender {
  font-weight: 600;
  font-size: 13px;
  color: #fff;
}

.card-date {
  font-size: 11px;
  color: var(--text-dim);
}

.card-subject {
  font-weight: 500;
  font-size: 13px;
  color: var(--text-main);
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* AI Summary Section */
.card-ai-preview {
  background: rgba(212, 175, 55, 0.04);
  border-left: 2px solid var(--accent-gold);
  padding: 6px 10px;
  border-radius: 0 4px 4px 0;
  margin-top: 6px;
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
  position: relative;
}

.card-ai-tag {
  font-size: 8px;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--accent-gold-text);
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 3px;
  margin-bottom: 4px;
}

.card-ai-tag svg {
  width: 8px;
  height: 8px;
  fill: currentColor;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  font-size: 11px;
}

.card-tags {
  display: flex;
  gap: 6px;
}

.card-tag {
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
}

.card-tag.financial {
  color: #e5c158;
  background: rgba(229, 193, 88, 0.08);
}

.card-tag.high-priority {
  color: #ff4a76;
  background: rgba(255, 74, 118, 0.08);
}

.card-actions-quick {
  display: flex;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.email-card:hover .card-actions-quick {
  opacity: 1;
}

.quick-action-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 2px;
  border-radius: 4px;
  transition: var(--transition-fast);
}

.quick-action-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.08);
}

.quick-action-btn svg {
  width: 12px;
  height: 12px;
}

/* Empty feed state */
.empty-feed {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 200px;
  color: var(--text-dim);
  text-align: center;
  padding: 24px;
  font-size: 13px;
}

.empty-feed svg {
  width: 32px;
  height: 32px;
  margin-bottom: 12px;
  color: var(--border-color);
}

/* --- Sliding Executive Detail Drawer --- */
.detail-drawer {
  position: absolute;
  top: 0;
  right: -85%;
  width: 80%;
  height: 100%;
  background-color: var(--bg-detail);
  border-left: 1px solid var(--border-color);
  z-index: 8;
  display: flex;
  flex-direction: column;
  transition: right var(--transition-slow);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
}

.detail-drawer.open {
  right: 0;
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-color);
  background: rgba(15, 20, 32, 0.4);
  flex-shrink: 0;
}

.drawer-header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.btn-back {
  background: none;
  border: 1px solid var(--border-color);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-back:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--text-muted);
}

.btn-back svg {
  width: 14px;
  height: 14px;
  color: currentColor;
}

.drawer-content {
  display: flex;
  flex-direction: row;
  flex-grow: 1;
  height: calc(100% - 65px);
  overflow: hidden;
}

/* Close Area Back Overlay */
.drawer-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 7;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.drawer-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

/* Left Half of Drawer: Email Reader */
.email-reader {
  width: 55%;
  height: 100%;
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.reader-header {
  padding: 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: rgba(15, 20, 32, 0.2);
}

.reader-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.reader-back-btn {
  background: none;
  border: 1px solid var(--border-color);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.reader-back-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--text-muted);
}

.reader-control-buttons {
  display: flex;
  gap: 8px;
}

.reader-btn {
  background: none;
  border: 1px solid var(--border-color);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.reader-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--accent-gold);
  color: var(--accent-gold-text);
}

.reader-btn.danger:hover {
  border-color: var(--text-error);
  color: var(--text-error);
}

.reader-btn svg {
  width: 14px;
  height: 14px;
}

.reader-metadata {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.reader-subject {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}

.sender-profile-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sender-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sender-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  color: #fff;
}

.sender-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sender-name {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}

.sender-email {
  font-size: 11px;
  color: var(--text-dim);
}

.reader-date {
  font-size: 11px;
  color: var(--text-dim);
}

/* Email Body Area */
.reader-body-container {
  flex-grow: 1;
  overflow-y: auto;
  padding: 24px;
  line-height: 1.6;
  font-size: 13px;
  color: var(--text-main);
  background: #0d121c;
}

.email-orig-content {
  white-space: pre-wrap;
}

/* Cipher Text overlay styling */
.encrypted-body-overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 250px;
  color: var(--accent-gold-text);
  border: 1px dashed var(--accent-gold);
  border-radius: 8px;
  background: rgba(212, 175, 55, 0.03);
  padding: 24px;
  text-align: center;
  gap: 12px;
  font-family: var(--font-mono);
}

.encrypted-body-overlay svg {
  width: 40px;
  height: 40px;
  color: var(--accent-gold);
}

.cipher-scrambler {
  word-break: break-all;
  font-size: 12px;
  color: var(--text-dim);
  max-width: 80%;
  user-select: none;
}

/* Attachments container */
.attachments-section {
  margin-top: 32px;
  border-top: 1px solid var(--border-color);
  padding-top: 16px;
}

.attachments-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.attachment-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.03);
  font-size: 12px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.attachment-chip:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent-gold);
}

.attachment-chip svg {
  width: 14px;
  height: 14px;
  color: var(--accent-gold);
}

/* Right Half of Drawer: AI Business Coach Chat */
.ai-coach-panel {
  width: 45%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background-color: #101622;
  overflow: hidden;
}

.coach-header {
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
  background: rgba(212, 175, 55, 0.04);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.coach-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-gold-text);
  letter-spacing: 0.5px;
}

.coach-title svg {
  width: 18px;
  height: 18px;
  color: var(--accent-gold);
}

.coach-badge {
  font-size: 9px;
  text-transform: uppercase;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-gold), #b89124);
  color: #0b0f17;
  padding: 2px 6px;
  border-radius: 4px;
}

/* AI Coaching Metrics (Risk, Implication, Stance) */
.coach-metrics {
  padding: 16px 20px;
  background: rgba(11, 15, 23, 0.3);
  border-bottom: 1px solid var(--border-color);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.metric-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 8px 12px;
}

.metric-label {
  font-size: 10px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 4px;
  font-weight: 500;
}

.metric-value {
  font-size: 12px;
  font-weight: 600;
}

.metric-value.high-risk {
  color: var(--text-error);
}

.metric-value.med-risk {
  color: #ff9800;
}

.metric-value.low-risk {
  color: var(--forgeos-teal);
}

.metric-card.full-width {
  grid-column: span 2;
}

/* Coach Chat Box */
.coach-chat-container {
  flex-grow: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chat-bubble {
  max-width: 85%;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 12.5px;
  line-height: 1.5;
  position: relative;
}

.chat-bubble.coach {
  background-color: rgba(38, 55, 87, 0.3);
  border: 1px solid var(--border-color);
  align-self: flex-start;
  border-top-left-radius: 2px;
  color: var(--text-main);
}

.chat-bubble.user {
  background-color: var(--accent-gold);
  color: #0b0f17;
  align-self: flex-end;
  border-top-right-radius: 2px;
  font-weight: 500;
}

.chat-bubble-time {
  font-size: 9px;
  color: var(--text-dim);
  margin-top: 4px;
  text-align: right;
  display: block;
}

.chat-bubble.user .chat-bubble-time {
  color: rgba(11, 15, 23, 0.6);
}

/* Suggestion Chips */
.coach-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding: 12px 20px 4px;
}

.suggestion-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 11px;
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
}

.suggestion-chip:hover {
  background: var(--accent-gold-glow);
  border-color: var(--accent-gold);
  color: var(--accent-gold-text);
}

/* Chat Input bar */
.coach-input-bar {
  padding: 16px 20px;
  border-top: 1px solid var(--border-color);
  background: rgba(11, 15, 23, 0.5);
  display: flex;
  gap: 10px;
}

.coach-input-bar input {
  flex-grow: 1;
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-main);
  transition: var(--transition-fast);
}

.coach-input-bar input:focus {
  outline: none;
  border-color: var(--accent-gold);
  background-color: rgba(255, 255, 255, 0.06);
}

.coach-send-btn {
  background-color: var(--accent-gold);
  color: #0b0f17;
  border: none;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
}

.coach-send-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 10px var(--accent-gold-glow);
}

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

/* Typing Indicator */
.typing-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 12px 14px;
  background-color: rgba(38, 55, 87, 0.3);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  border-top-left-radius: 2px;
  align-self: flex-start;
  max-width: 80px;
}

.typing-dot {
  width: 6px;
  height: 6px;
  background-color: var(--text-muted);
  border-radius: 50%;
  animation: bounce 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1.0); }
}

/* --- Native Dialog Modals --- */
dialog {
  margin: auto;
  background: var(--bg-detail);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-main);
  padding: 24px;
  width: 90%;
  max-width: 560px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
  z-index: 20;
  transition: opacity 0.3s allow-discrete, transform 0.3s allow-discrete, overlay 0.3s allow-discrete;
  transform: scale(0.95);
  opacity: 0;
}

dialog[open] {
  transform: scale(1);
  opacity: 1;
}

/* Starting style for entry transition */
@starting-style {
  dialog[open] {
    transform: scale(0.95);
    opacity: 0;
  }
}

dialog::backdrop {
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  transition: background-color 0.3s allow-discrete, overlay 0.3s allow-discrete;
}

dialog[open]::backdrop {
  background-color: rgba(0, 0, 0, 0.7);
}

@starting-style {
  dialog[open]::backdrop {
    background-color: rgba(0, 0, 0, 0);
  }
}

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

.modal-header h2 {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-close-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  transition: var(--transition-fast);
}

.modal-close-btn:hover {
  color: #fff;
}

.modal-close-btn svg {
  width: 18px;
  height: 18px;
}

/* Form Styles inside Modals */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-group select, .form-group input, .form-group textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--text-main);
  transition: var(--transition-fast);
}

.form-group select:focus, .form-group input:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--accent-gold);
}

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

.modal-footer {
  margin-top: 24px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  border-top: 1px solid var(--border-color);
  padding-top: 16px;
}

.btn-secondary {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-secondary:hover {
  border-color: var(--text-main);
  color: var(--text-main);
}

/* --- Secure Full Screen Vault Lock Overlay --- */
#vault-login-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #07090f;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  background-image: 
    linear-gradient(rgba(18, 25, 39, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(18, 25, 39, 0.05) 1px, transparent 1px);
  background-size: 20px 20px;
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.4s ease;
}

.login-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  max-width: 360px;
  width: 90%;
  padding: 35px 30px;
  border: 1px solid var(--accent-gold);
  border-radius: 16px;
  background-color: rgba(10, 14, 23, 0.95);
  backdrop-filter: blur(15px);
  box-shadow: 0 10px 45px rgba(0, 0, 0, 0.8), 0 0 20px rgba(212, 175, 55, 0.1);
  text-align: center;
  position: relative;
}

.login-panel::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 16px 16px 0 0;
  background: linear-gradient(to right, transparent, var(--accent-gold), transparent);
}

.lock-shield {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-gold);
  border: 2px solid var(--accent-gold);
  border-radius: 50%;
  animation: pulse-glow 2s infinite ease-in-out;
}

.lock-shield svg {
  width: 32px;
  height: 32px;
  fill: currentColor;
}

.lock-container h2 {
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.lock-container p {
  font-size: 11px;
  color: var(--text-dim);
}

.passcode-input-container {
  width: 100%;
  position: relative;
  margin-top: 10px;
}

.passcode-input-container input {
  width: 100%;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--accent-gold);
  border-radius: 6px;
  padding: 12px;
  color: var(--accent-gold-text);
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 3px;
  text-align: center;
}

.passcode-input-container input:focus {
  outline: none;
  box-shadow: 0 0 10px var(--accent-gold-glow);
}

.lock-message {
  font-size: 11px;
  height: 14px;
  color: var(--text-error);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 100;
  pointer-events: none;
}

.toast {
  background: var(--bg-detail);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--accent-gold);
  border-radius: 6px;
  padding: 12px 18px;
  color: var(--text-main);
  font-size: 12.5px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 280px;
  pointer-events: auto;
  animation: slide-in-toast 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  transition: opacity 0.3s, transform 0.3s;
}

.toast.secondchoice {
  border-left-color: var(--secondchoice-blue);
}

.toast.forgeos {
  border-left-color: var(--forgeos-teal);
}

.toast svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

@keyframes slide-in-toast {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Animations */
@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 5px var(--accent-gold-glow);
    border-color: rgba(212, 175, 55, 0.5);
  }
  50% {
    box-shadow: 0 0 20px var(--accent-gold-glow);
    border-color: var(--accent-gold);
  }
}

/* Responsive Grid / Analytics View in Main Content */
.analytics-view {
  padding: 32px;
  overflow-y: auto;
  height: calc(100vh - 85px);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.analytics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.stat-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.stat-card:nth-child(1) .stat-icon svg { color: var(--accent-gold); }
.stat-card:nth-child(2) .stat-icon svg { color: var(--secondchoice-blue); }
.stat-card:nth-child(3) .stat-icon svg { color: var(--forgeos-teal); }
.stat-card:nth-child(4) .stat-icon svg { color: var(--text-error); }

.stat-value {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  font-family: var(--font-mono);
}

.stat-footer {
  font-size: 11px;
  color: var(--text-dim);
}

.analytics-chart-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 24px;
  flex-grow: 1;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chart-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.chart-svg-wrapper {
  width: 100%;
  height: 220px;
  position: relative;
  margin-top: 10px;
}

/* Reduced Motion Settings */
@media (prefers-reduced-motion: reduce) {
  dialog,
  .detail-drawer,
  .toast,
  #vault-lock-screen {
    transition: none !important;
    animation: none !important;
  }
  
  .detail-drawer {
    right: -100%;
  }
  
  .detail-drawer.open {
    right: 0;
  }
  
  .typing-dot {
    animation: none !important;
  }
  
  .sync-spinner {
    animation: none !important;
  }
}

/* --- Upgraded Features Styles (Gears, Folders, Agenda, Scheduler) --- */

.sidebar-footer {
  padding: 16px 0 0 0;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-gold-glow);
  border: 1px solid var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: bold;
  color: var(--accent-gold-text);
}

.btn-icon {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 6px;
  border-radius: 4px;
  transition: all var(--transition-fast);
}

.btn-icon:hover {
  color: var(--accent-gold-text);
  background: rgba(255, 255, 255, 0.05);
}

/* Agenda Briefing Section */
.agenda-briefing-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 0 0 20px 0;
  padding: 0;
  width: 100%;
}

.briefing-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 140px;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  transition: border-color var(--transition-fast);
}

.briefing-card:hover {
  border-color: rgba(255, 255, 255, 0.1);
}

.brief-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 8px;
}

.brief-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.brief-title svg {
  width: 14px;
  height: 14px;
  color: var(--accent-gold);
}

.brief-subtitle {
  font-size: 10px;
  color: var(--text-dim);
}

.btn-primary-mini {
  background: var(--accent-gold-glow);
  border: 1px solid var(--accent-gold);
  color: var(--accent-gold-text);
  font-size: 9px;
  padding: 3px 6px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  text-transform: uppercase;
  transition: all var(--transition-fast);
}

.btn-primary-mini:hover {
  background: var(--accent-gold);
  color: var(--bg-main);
}

/* Reminders & Meetings Lists */
.reminders-list, .meetings-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 120px;
  overflow-y: auto;
  padding-right: 4px;
}

.reminder-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.02);
  padding: 6px 10px;
  border-radius: 4px;
  border-left: 2px solid var(--text-error);
}

.reminder-item.checked {
  opacity: 0.5;
  text-decoration: line-through;
  border-left-color: var(--text-dim);
}

.reminder-item input[type="checkbox"] {
  width: auto;
  margin: 0;
  cursor: pointer;
}

.meeting-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  background: rgba(255, 255, 255, 0.02);
  padding: 6px 10px;
  border-radius: 4px;
  border-left: 2px solid var(--forgeos-teal);
}

.meeting-time {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent-gold-text);
  min-width: 60px;
}

.meeting-info {
  flex-grow: 1;
  margin-left: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-main);
}

.meeting-join-btn {
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 500;
  display: inline-block;
  margin-left: 8px;
  transition: all var(--transition-fast);
}

.meeting-join-btn.zoom {
  background: rgba(42, 130, 230, 0.15);
  border: 1px solid var(--secondchoice-blue);
  color: #5bb3ff;
}

.meeting-join-btn.zoom:hover {
  background: var(--secondchoice-blue);
  color: #fff;
}

.meeting-join-btn.teams {
  background: rgba(0, 191, 165, 0.15);
  border: 1px solid var(--forgeos-teal);
  color: #3fe2c9;
}

.meeting-join-btn.teams:hover {
  background: var(--forgeos-teal);
  color: var(--bg-main);
}

.meeting-join-btn.phone {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--text-muted);
  color: var(--text-main);
}

.meeting-join-btn.phone:hover {
  background: var(--text-muted);
  color: var(--bg-main);
}

/* Smart Sort Toolbar */
.smart-sorting-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  background: rgba(15, 20, 32, 0.6);
  border: 1px solid var(--border-color);
  padding: 8px 16px;
  border-radius: 6px;
  width: 100%;
}

.sort-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-gold-text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sort-tabs {
  display: flex;
  gap: 6px;
}

.sort-tab {
  background: none;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.sort-tab:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.03);
}

.sort-tab.active {
  background: var(--accent-gold-glow);
  border-color: var(--accent-gold);
  color: var(--accent-gold-text);
}

/* Modal Tabs */
.modal-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 16px;
  gap: 4px;
}

.modal-tab-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-size: 12px;
  padding: 8px 16px;
  cursor: pointer;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.modal-tab-btn:hover {
  color: var(--text-main);
}

.modal-tab-btn.active {
  color: var(--accent-gold-text);
  border-bottom-color: var(--accent-gold);
}

/* Email Card Auto-growth / word-wrap spacing fixes */
.email-card {
  min-height: auto !important;
  height: auto !important;
  display: flex !important;
  flex-direction: column !important;
  flex-shrink: 0 !important;
  gap: 8px !important;
  padding: 14px 16px !important;
  overflow: visible !important;
}

.meeting-info.linkable {
  cursor: pointer;
  transition: color 0.15s ease;
}
.meeting-info.linkable:hover {
  color: var(--accent-gold);
  text-decoration: underline;
}

.card-subject {
  white-space: normal !important;
  word-break: break-word !important;
  line-height: 1.3 !important;
}

.card-sender {
  white-space: normal !important;
  word-break: break-word !important;
}

.card-ai-preview {
  margin-top: 4px !important;
  line-height: 1.4 !important;
  font-size: 11px !important;
}

/* Empty State Styling */
.empty-brief-state {
  font-size: 10px;
  color: var(--text-dim);
  text-align: center;
  padding: 16px;
  border: 1px dashed var(--border-color);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.01);
}

/* --- Passcode Entry Grid & Lock Panel Styles --- */
.lock-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  max-width: 340px;
  width: 90%;
  padding: 35px 30px;
  border: 1px solid var(--accent-gold);
  border-radius: 16px;
  background-color: rgba(10, 14, 23, 0.95);
  backdrop-filter: blur(15px);
  box-shadow: 0 10px 45px rgba(0, 0, 0, 0.8), 0 0 20px rgba(212, 175, 55, 0.1);
  text-align: center;
  position: relative;
}

.lock-panel::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 16px 16px 0 0;
  background: linear-gradient(to right, transparent, var(--accent-gold), transparent);
}

.passcode-circles {
  display: flex;
  gap: 16px;
  margin: 10px 0 24px 0;
}

.passcode-circles .circle {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--accent-gold);
  background: transparent;
  transition: all 0.2s ease;
}

.passcode-circles .circle.filled {
  background: var(--accent-gold);
  box-shadow: 0 0 10px var(--accent-gold);
}

.keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  width: 100%;
  max-width: 240px;
  margin: 0 auto;
}

.key-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-main);
  font-size: 20px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  transition: all 0.15s ease;
  outline: none;
}

.key-btn:hover {
  background: var(--accent-gold-glow);
  border-color: var(--accent-gold);
  color: var(--accent-gold-text);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.2);
}

.key-btn:active {
  transform: scale(0.92);
}

.key-btn.action-key {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-color: rgba(255, 255, 255, 0.05);
  color: var(--text-dim);
  border-radius: 30px;
}

.key-btn.action-key:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

/* --- Responsive Rules for Tablets, iPads, and Mobile Devices (max-width: 1024px) --- */
@media (max-width: 1024px) {
  #app-container {
    flex-direction: column !important;
    height: auto !important;
    min-height: 100vh;
  }

  .sidebar {
    width: 100% !important;
    height: auto !important;
    padding: 12px 16px !important;
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    border-right: none !important;
    border-bottom: 1px solid var(--border-color) !important;
    position: sticky !important;
    top: 0;
    z-index: 40;
    background: #07090f;
  }

  .sidebar-logo {
    margin-bottom: 0 !important;
  }

  .sidebar-logo .logo-text {
    display: none !important; /* Hide logo text to save horizontal header space */
  }

  .sidebar-nav {
    display: flex !important;
    flex-direction: row !important;
    gap: 6px !important;
    margin-bottom: 0 !important;
  }

  .nav-btn {
    padding: 6px 10px !important;
    font-size: 11px !important;
  }

  .sidebar-footer {
    margin-top: 0 !important;
    display: flex !important;
    align-items: center !important;
  }

  main {
    padding: 16px !important;
    height: auto !important;
  }

  /* Agenda and Stats widget wrap */
  .agenda-briefing-panel {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  /* Inbox Feed Columns on Mobile */
  .feed-columns-container {
    flex-direction: column !important;
    gap: 20px !important;
  }

  .feed-column {
    width: 100% !important;
  }
  
  .email-list {
    max-height: 450px !important; /* Cap vertical height on mobile feeds for ease of scrolling */
  }

  /* Sliding Detail Drawer on Mobile */
  .detail-drawer {
    width: 100% !important;
    right: -100% !important;
    height: 100% !important;
    z-index: 100 !important;
  }
  
  .detail-drawer.open {
    right: 0 !important;
  }

  .drawer-content {
    flex-direction: column !important;
    overflow-y: auto !important;
    height: calc(100% - 60px) !important;
  }

  .email-reader {
    width: 100% !important;
    height: auto !important;
    border-right: none !important;
    border-bottom: 1px solid var(--border-color) !important;
    padding: 16px !important;
    overflow-y: visible !important;
  }

  .ai-coach-panel {
    width: 100% !important;
    height: auto !important;
    min-height: 450px !important;
    overflow-y: visible !important;
  }
  
  .coach-chat-container {
    max-height: 300px !important;
  }

  .briefing-card {
    padding: 12px !important;
  }
}
