/* ==========================================================================
   CLYMETA — Pure White Minimalist Executive Design System
   Matches CLYMETA Client Manager Design Tokens & Aesthetic
   Aesthetic: Seamless White Canvas, Borderless Cards, Zero Lines / Strokes
   Typography: Google Sans, Plus Jakarta Sans, JetBrains Mono
   Fully Responsive for Mobile, Tablet, Laptop, and 4K Displays
   ========================================================================== */

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

:root {
  /* Pure White Canvas & Soft Tone Surfaces */
  --bg-pure-white: #FFFFFF;
  --surface-card: #F8F9FB;
  --surface-card-hover: #F1F3F7;
  --surface-input: #F3F4F7;
  --surface-muted: #F8F9FB;

  /* Typography Colors */
  --text-primary: #111827;
  --text-secondary: #4B5563;
  --text-muted: #6B7280;
  --text-faint: #9CA3AF;

  /* Brand Primary (Royal Blue) */
  --brand-primary: #0043FE;
  --brand-primary-hover: #0036D6;
  --brand-primary-light: #EEF2FF;
  --brand-primary-focus: rgba(0, 67, 254, 0.15);

  /* Status Colors */
  --status-in-progress-bg: #EEF4FF;
  --status-in-progress-text: #1D4ED8;

  --status-completed-bg: #ECFDF5;
  --status-completed-text: #047857;

  --status-pending-bg: #FFFBEB;
  --status-pending-text: #B45309;

  --status-on-hold-bg: #F3F4F6;
  --status-on-hold-text: #4B5563;

  /* Typography */
  --font-sans: 'Google Sans', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Radii */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  /* Soft Ambient Depth */
  --shadow-soft: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
  --shadow-modal: 0 20px 40px -10px rgba(0, 0, 0, 0.12), 0 8px 16px -6px rgba(0, 0, 0, 0.06);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: #FFFFFF;
  color: var(--text-primary);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ==========================================================================
   Navigation Bar (Seamless Pure White, Identical to Client Manager)
   ========================================================================== */
.navbar {
  background: #FFFFFF;
  border: none;
  border-bottom: 1px solid #F3F4F6;
  position: sticky;
  top: 0;
  z-index: 40;
}

.navbar-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 1rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-logo {
  height: 38px;
  width: auto;
  object-fit: contain;
  display: block;
}

.brand-text-container {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  white-space: nowrap;
}

/* Central View Switcher Pills */
.nav-view-switcher {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: #F3F4F6;
  padding: 0.25rem 0.35rem;
  border-radius: 9999px;
  flex-shrink: 0;
}

.nav-view-btn {
  border: none;
  background: transparent;
  padding: 0.4rem 1rem;
  border-radius: 9999px;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #4B5563;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.nav-view-btn:hover {
  color: var(--text-primary);
}

.nav-view-btn.active {
  background: #FFFFFF;
  color: var(--brand-primary);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.nav-user-pill {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  background: #F3F4F6;
  border-radius: 50px;
  padding: 0.3rem 0.85rem 0.3rem 0.35rem;
}

.nav-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--brand-primary);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.nav-user-name {
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
}

.nav-ext-link {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--brand-primary);
  text-decoration: none;
  background: #EFF6FF;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: background 0.15s;
  white-space: nowrap;
}

.nav-ext-link:hover {
  background: #DBEAFE;
}

.btn-signout {
  padding: 0.45rem 0.9rem;
  background: transparent;
  color: #6B7280;
  border: 1.5px solid #E5E7EB;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.btn-signout:hover {
  background: #FEF2F2;
  color: #B91C1C;
  border-color: #FECACA;
}

/* ==========================================================================
   Main Container
   ========================================================================== */
.container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 1.75rem 1.75rem 4.5rem;
  width: 100%;
}

/* ==========================================================================
   Dashboard Header Hero (Seamless White Surface)
   ========================================================================== */
.dashboard-header {
  background: var(--surface-card);
  border: none;
  border-radius: var(--radius-lg);
  padding: 2.25rem 2.5rem;
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .dashboard-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.header-content {
  max-width: 760px;
}

.dashboard-title {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
  line-height: 1.2;
}

.dashboard-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

/* ==========================================================================
   Buttons (Line-Free, Solid & Tactile)
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-md);
  border: none;
  outline: none;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  text-decoration: none;
  min-height: 38px;
}

.btn-primary {
  background-color: var(--brand-primary);
  color: #FFFFFF;
}

.btn-primary:hover {
  background-color: var(--brand-primary-hover);
}

.btn-secondary {
  background-color: var(--surface-input);
  color: var(--text-primary);
  border: none;
}

.btn-secondary:hover {
  background-color: var(--surface-card-hover);
  color: #000000;
}

.btn-sm {
  font-size: 0.8125rem;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  min-height: 32px;
}

/* Quick preset pills */
.btn-preset {
  padding: 0.25rem 0.65rem;
  font-size: 0.75rem;
  background: var(--surface-input);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.15s ease;
  min-height: 28px;
}

.btn-preset:hover {
  background: #E5E7EB;
  color: var(--text-primary);
}

.btn-preset.active {
  background: #EFF6FF;
  color: var(--brand-primary);
  font-weight: 700;
}

/* ==========================================================================
   KPI Metrics Grid
   ========================================================================== */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.metric-card {
  background: var(--surface-card);
  border: none;
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.65rem;
  display: flex;
  flex-direction: column;
  transition: background-color 0.15s ease;
}

.metric-card:hover {
  background: var(--surface-card-hover);
}

.metric-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.65rem;
}

.metric-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.metric-value {
  font-size: 1.95rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.metric-footer {
  margin-top: 0.65rem;
  font-size: 0.775rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
}

/* ==========================================================================
   Section Toolbar & Controls
   ========================================================================== */
.section-toolbar {
  padding: 1.25rem 0;
  background: #FFFFFF;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 768px) {
  .section-toolbar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.toolbar-title-group h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.015em;
}

.toolbar-title-group p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.search-input {
  min-width: 280px;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  padding: 0.65rem 1rem;
  border: none;
  border-radius: var(--radius-md);
  background: var(--surface-input);
  color: var(--text-primary);
  outline: none;
  transition: all 0.15s ease;
  min-height: 40px;
}

.search-input:focus {
  background: #FFFFFF;
  box-shadow: 0 0 0 2px var(--brand-primary);
}

.filter-select {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  padding: 0.65rem 1.5rem 0.65rem 1rem;
  border: none;
  border-radius: var(--radius-md);
  background: var(--surface-input);
  color: var(--text-primary);
  outline: none;
  cursor: pointer;
  min-height: 40px;
}

/* Table Navigation Tabs */
.table-nav-tabs {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  border-bottom: 2px solid #E5E7EB;
  margin-bottom: 1.25rem;
  overflow-x: auto;
  padding-bottom: 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.table-nav-tabs::-webkit-scrollbar {
  display: none;
}

.table-tab-btn {
  font-family: var(--font-sans);
  border: none;
  background: transparent;
  padding: 0.7rem 1.1rem;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.table-tab-btn:hover {
  color: var(--text-primary);
  background: #F9FAFB;
}

.table-tab-btn.active {
  color: var(--brand-primary);
  font-weight: 600;
  border-bottom-color: var(--brand-primary);
  background: #EFF6FF;
}

.tab-badge {
  background: #E5E7EB;
  color: #4B5563;
  font-size: 0.725rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  line-height: 1;
}

.table-tab-btn.active .tab-badge {
  background: var(--brand-primary);
  color: #FFFFFF;
}

/* ==========================================================================
   Data Table (Structured Grid Row & Column Cell Style)
   ========================================================================== */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: var(--radius-lg);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  margin-bottom: 2rem;
  -webkit-overflow-scrolling: touch;
}

.data-table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.85rem;
}

.data-table thead {
  background: #F9FAFB;
}

.data-table th {
  background: #F9FAFB;
  padding: 0.75rem 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #4B5563;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1.5px solid #E5E7EB;
  white-space: nowrap;
}

.data-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #E5E7EB;
  color: var(--text-primary);
  vertical-align: middle;
}

.data-table tbody tr {
  background-color: #FFFFFF;
  transition: background-color 0.12s ease;
  cursor: pointer;
}

.data-table tbody tr:nth-child(even) {
  background-color: #FAFAFC;
}

.data-table tbody tr:hover {
  background-color: #EFF6FF !important;
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

/* Inline Table Status Selector */
.table-status-select {
  font-family: var(--font-sans);
  font-size: 0.775rem;
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--surface-input);
  color: var(--text-primary);
  cursor: pointer;
  outline: none;
  transition: all 0.15s ease;
  min-height: 32px;
}

.table-status-select:focus {
  background: #FFFFFF;
  box-shadow: 0 0 0 2px var(--brand-primary);
}

/* Identification Badges */
.id-badge {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  background: var(--surface-input);
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.id-badge.prj {
  background: #F5F3FF;
  color: #5B21B6;
}

.id-badge.cin {
  background: #EFF6FF;
  color: #1E40AF;
}

.id-badge.inv {
  background: #ECFDF5;
  color: #065F46;
}

/* Status Pills */
.status-pill {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  border: none;
  white-space: nowrap;
}

.status-pill.in-progress {
  background: var(--status-in-progress-bg);
  color: var(--status-in-progress-text);
}

.status-pill.completed {
  background: var(--status-completed-bg);
  color: var(--status-completed-text);
}

.status-pill.delivered {
  background: #ECFDF5;
  color: #047857;
  font-weight: 700;
}

.status-pill.not-started {
  background: #F3F4F6;
  color: #4B5563;
}

.status-pill.pending, .status-pill.planning {
  background: var(--status-pending-bg);
  color: var(--status-pending-text);
}

.status-pill.on-hold {
  background: var(--status-on-hold-bg);
  color: var(--status-on-hold-text);
}

.status-pill.at-risk {
  background: #FFFBEB;
  color: #B45309;
}

.status-pill.critical {
  background: #FEF2F2;
  color: #DC2626;
}

/* ==========================================================================
   Cards Grid View
   ========================================================================== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.project-card {
  background: var(--surface-card);
  border: none;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.15s ease;
}

.project-card:hover {
  background: var(--surface-card-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

.card-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
  line-height: 1.3;
}

.card-client-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.85rem;
}

.card-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.progress-track {
  width: 100%;
  height: 6px;
  background: #E5E7EB;
  border-radius: 9999px;
  overflow: hidden;
  margin-top: 0.4rem;
}

.progress-fill {
  height: 100%;
  background: var(--brand-primary);
  border-radius: 9999px;
  transition: width 0.3s ease;
}

.card-bottom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #E5E7EB;
  padding-top: 0.85rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Modals & Workspace Drawer
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.4);
  backdrop-filter: blur(4px);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.modal-workspace-dialog {
  background: #FFFFFF;
  border-radius: var(--radius-xl);
  border: none;
  box-shadow: var(--shadow-modal);
  width: 95vw;
  max-width: 1200px;
  height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.workspace-header {
  padding: 1.5rem 2rem 0;
  background: #FFFFFF;
  border-bottom: 1px solid #E5E7EB;
  flex-shrink: 0;
}

.workspace-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.workspace-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.workspace-title-row h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.workspace-tabs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.workspace-tabs::-webkit-scrollbar {
  display: none;
}

.ws-tab {
  font-family: var(--font-sans);
  border: none;
  background: transparent;
  padding: 0.75rem 1.1rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.ws-tab:hover {
  color: var(--text-primary);
}

.ws-tab.active {
  color: var(--brand-primary);
  font-weight: 600;
  border-bottom-color: var(--brand-primary);
}

.workspace-body {
  padding: 2rem;
  flex-grow: 1;
  overflow-y: auto;
  background: #FFFFFF;
}

.ws-tab-panel {
  display: none;
}

.ws-tab-panel.active {
  display: block;
}

.overview-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
}

.content-block {
  background: var(--surface-card);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.content-block h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.side-card {
  background: var(--surface-card);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.side-card h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
  border-bottom: 1px solid #E5E7EB;
  padding-bottom: 0.5rem;
}

.detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  margin-bottom: 0.65rem;
  gap: 0.5rem;
}

.detail-row .label {
  color: var(--text-secondary);
  white-space: nowrap;
}

.detail-row .value {
  color: var(--text-primary);
  font-weight: 600;
  text-align: right;
  word-break: break-word;
}

/* Modal Simple Card */
.modal-card {
  background: #FFFFFF;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-modal);
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
}

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

.modal-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.btn-close-modal {
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

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

.form-group input,
.form-group select,
.form-group textarea {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  padding: 0.7rem 0.95rem;
  border: none;
  border-radius: var(--radius-md);
  background: var(--surface-input);
  color: var(--text-primary);
  outline: none;
  transition: all 0.15s ease;
  min-height: 40px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  background: #FFFFFF;
  box-shadow: 0 0 0 2px var(--brand-primary);
}

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

.modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  z-index: 9999;
  background: #111827;
  color: #FFFFFF;
  padding: 0.85rem 1.35rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  animation: slideInToast 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Login Overlay */
.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  padding: 1.5rem;
}

.login-card {
  width: 100%;
  max-width: 420px;
  padding: 2rem;
}

.alert-error {
  background: #FEF2F2;
  color: #B91C1C;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  margin-bottom: 1.25rem;
}

.quick-profiles-grid {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: 150px;
  overflow-y: auto;
  margin-top: 0.5rem;
}

.quick-profile-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.85rem;
  background: #F9FAFB;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  font-size: 0.825rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.quick-profile-pill:hover {
  background: #EFF6FF;
  border-color: #BFDBFE;
  color: var(--brand-primary);
}

.quick-profile-pill .qp-role {
  font-size: 0.7rem;
  font-weight: 600;
  background: #E5E7EB;
  padding: 1px 6px;
  border-radius: 9999px;
  color: #4B5563;
}

/* ==========================================================================
   COMPREHENSIVE RESPONSIVE SYSTEM
   Mobile First & Desktop Perfect
   ========================================================================== */

/* Large Tablets & Small Laptops (max-width: 1024px) */
@media (max-width: 1024px) {
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .overview-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* Tablets (max-width: 860px) */
@media (max-width: 860px) {
  .navbar-inner {
    padding: 0.85rem 1.25rem;
  }
  .container {
    padding: 1.25rem 1.25rem 3.5rem;
  }
  .dashboard-header {
    padding: 1.75rem 1.5rem;
  }

  /* Full Screen Workspace Modal Sheet on Tablets & Mobile */
  .modal-overlay {
    padding: 0;
  }
  .modal-workspace-dialog {
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    border-radius: 0;
    max-height: 100vh;
  }
  .workspace-header {
    padding: 1.25rem 1.25rem 0;
  }
  .workspace-body {
    padding: 1.25rem;
  }
}

/* Mobile Phones (max-width: 768px) */
@media (max-width: 768px) {
  .navbar-inner {
    flex-wrap: wrap;
    gap: 0.75rem;
  }
  .nav-view-switcher {
    order: 3;
    width: 100%;
    justify-content: center;
  }
  .nav-view-btn {
    flex: 1;
    justify-content: center;
  }
  .brand-name {
    font-size: 1.1rem;
  }
  .nav-ext-link span {
    display: none;
  }
  .nav-ext-link {
    padding: 0.45rem 0.55rem;
  }

  .dashboard-header {
    padding: 1.5rem 1.25rem;
    gap: 1rem;
  }
  .dashboard-title {
    font-size: 1.4rem;
  }
  .dashboard-desc {
    font-size: 0.875rem;
  }
  .header-actions {
    width: 100%;
  }
  .header-actions .btn {
    width: 100%;
  }

  .section-toolbar {
    gap: 0.85rem;
  }
  .toolbar-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }
  .search-input {
    min-width: 100%;
    width: 100%;
  }
  .filter-select {
    width: 100%;
  }

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

  .workspace-title-row {
    flex-direction: column;
    align-items: stretch;
  }
  .workspace-title-row div {
    display: flex;
    flex-wrap: wrap;
  }
  .workspace-title-row .btn {
    flex: 1;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .toast {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    text-align: center;
    justify-content: center;
  }
}

/* Small Mobile Phones (max-width: 500px) */
@media (max-width: 500px) {
  .metrics-grid {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }
  .metric-card {
    padding: 1.15rem 1.25rem;
  }
  .metric-value {
    font-size: 1.6rem;
  }
  .container {
    padding: 1rem 0.85rem 3rem;
  }
  .nav-user-name {
    display: none;
  }
  .nav-user-pill {
    padding: 0.25rem;
  }
  .login-card {
    padding: 1.25rem;
  }
  .modal-card {
    padding: 1.25rem;
    max-height: 94vh;
  }
}
