/**
 * SRM Dashboard – Stripe/Ahrefs-inspired theme (Light only)
 * Clean, high-contrast, modern SaaS design
 */

/* --------------------------------------------------
   DESIGN TOKENS
-------------------------------------------------- */
:root {
  /* Layout */
  --sidebar-width: 248px;
  --sidebar-collapsed-width: 64px;
  --header-height: 64px;
  --control-bar-height: 52px;

  /* Brand */
  --primary-color: #4f46e5;
  --primary-color-soft: rgba(79, 70, 229, 0.08);
  --primary-hover: #4338ca;

  /* Semantic */
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  --info-color: #0ea5e9;

  /* Neutrals */
  --text-primary: #0f172a;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --border-color: #e5e7eb;
  --border-subtle: #e5e7f5;

  /* Surfaces */
  --bg-page: #f3f4f6;
  --bg-elevated: #ffffff;
  --bg-elevated-soft: #f9fafb;
  --bg-subtle: #f3f4f6;
  --bg-pill: #eef2ff;

  /* Shadows */
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.06);
  --shadow-hover: 0 22px 50px rgba(15, 23, 42, 0.09);

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

  /* Typography */
  --font-sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  --text-xs: 11px;
  --text-sm: 13px;
  --text-md: 14px;
  --text-lg: 16px;
  --text-xl: 20px;
}

/* --------------------------------------------------
   GLOBAL / HOST
-------------------------------------------------- */

.srm-dashboard-v2 {
  font-family: var(--font-sans);
  color: var(--text-primary);
  background: radial-gradient(
    circle at top left,
    #e5e7ff 0,
    #f3f4f6 42%,
    #f9fafb 100%
  );
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

body.admin-bar .srm-dashboard-v2 {
  padding-top: 32px;
}

@media (max-width: 782px) {
  body.admin-bar .srm-dashboard-v2 {
    padding-top: 46px;
  }
}

body.srm-dashboard-fullscreen {
  background: var(--bg-page);
  overflow-x: hidden;
}

.srm-dashboard-host {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  max-width: none !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* --------------------------------------------------
   LAYOUT
-------------------------------------------------- */

.dashboard-container {
  display: flex;
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
}

/* --------------------------------------------------
   SIDEBAR
-------------------------------------------------- */

.dashboard-sidebar {
  width: var(--sidebar-width);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  border-right: 1px solid rgba(226, 232, 240, 0.9);
  display: flex;
  flex-direction: column;
  transition: width 0.24s ease, transform 0.24s ease;
  position: relative;
  z-index: 40;
}

.dashboard-sidebar.collapsed {
  width: var(--sidebar-collapsed-width);
}

.sidebar-header {
  padding: 18px 18px 14px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: radial-gradient(
    circle at 30% 0,
    #a5b4fc 0,
    #4f46e5 40%,
    #1d4ed8 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
  color: #eef2ff;
  font-weight: 600;
  font-size: 16px;
}

.logo-text {
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  white-space: nowrap;
}

.dashboard-sidebar.collapsed .logo-text {
  display: none;
}

.sidebar-toggle {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: #f9fafb;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
  font-size: 16px;
  color: var(--text-secondary);
}

.sidebar-toggle:hover {
  background: #eef2ff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

/* Sidebar Navigation */

.sidebar-nav {
  flex: 1;
  padding: 12px 10px 12px;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  margin-bottom: 4px;
  border-radius: 999px;
  color: var(--text-secondary);
  font-size: var(--text-sm);
  text-decoration: none;
  position: relative;
  transition: background 0.16s ease, color 0.16s ease, transform 0.12s ease;
}

.nav-item:hover {
  background: rgba(79, 70, 229, 0.06);
  color: var(--text-primary);
}

.nav-item.active {
  background: rgba(79, 70, 229, 0.12);
  color: var(--primary-color);
  font-weight: 600;
}

.nav-item.active::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 18px;
  border-radius: 999px;
  background: var(--primary-color);
}

.nav-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: inherit;
}

.dashboard-sidebar.collapsed .nav-text {
  display: none;
}

.nav-text {
  white-space: nowrap;
}

.nav-badge {
  margin-left: auto;
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger-color);
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
}

.nav-divider {
  height: 1px;
  background: rgba(226, 232, 240, 0.9);
  margin: 10px 4px;
}

.nav-tooltip {
  display: none;
  position: absolute;
  left: calc(100% + 8px);
  top: 50%;
  transform: translateY(-50%);
  background: #111827;
  color: #f9fafb;
  padding: 4px 8px;
  border-radius: 7px;
  font-size: 11px;
  white-space: nowrap;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.4);
}

.dashboard-sidebar.collapsed .nav-item:hover .nav-tooltip {
  display: block;
}

/* Sidebar Footer / User */

.sidebar-footer {
  padding: 12px 16px 16px;
  border-top: 1px solid rgba(226, 232, 240, 0.9);
  background: rgba(249, 250, 251, 0.9);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: radial-gradient(
    circle at 20% 0,
    #a5b4fc 0,
    #4f46e5 40%,
    #7c3aed 100%
  );
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 13px;
}

.dashboard-sidebar.collapsed .user-details {
  display: none;
}

.user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.user-role {
  font-size: 11px;
  color: var(--text-muted);
}

/* --------------------------------------------------
   MAIN CONTENT & HEADER
-------------------------------------------------- */

.dashboard-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: transparent;
}

.dashboard-header {
  height: 130px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(22px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 30;
}

.header-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.page-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.03em;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
}

.project-type-badge {
  background: var(--bg-pill);
  color: #4338ca;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 999px;
}

.header-meta {
  display: flex;
  gap: 16px;
  font-size: 11px;
  color: var(--text-muted);
}

.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Global Search */

.global-search {
  position: relative;
  width: 340px;
  max-width: 100%;
}

.search-input {
  width: 100%;
  padding: 8px 12px 8px 34px;
  border-radius: 999px;
  border: 1px solid rgba(209, 213, 219, 0.9);
  background: #f9fafb;
  font-size: var(--text-sm);
  transition: border 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

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

.search-input:focus {
  outline: none;
  border-color: var(--primary-color);
  background: #ffffff;
  box-shadow: 0 0 0 1px rgba(79, 70, 229, 0.16),
    0 18px 40px rgba(15, 23, 42, 0.18);
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  color: var(--text-muted);
}

/* Header Actions */

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

.btn-icon {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.12s ease;
}

.btn-icon:hover {
  background: #f3f4ff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
  transform: translateY(-1px);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 16px 35px rgba(79, 70, 229, 0.35);
  transition: transform 0.12s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.btn-primary:hover {
  filter: brightness(1.03);
  transform: translateY(-1px);
  box-shadow: 0 20px 45px rgba(79, 70, 229, 0.45);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.35);
}

/* --------------------------------------------------
   CONTROL BAR
-------------------------------------------------- */

.control-bar {
  height: var(--control-bar-height);
  background: rgba(249, 250, 251, 0.96);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 24px;
  font-size: 12px;
}

.control-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.control-label {
  font-weight: 500;
  color: var(--text-secondary);
}

.control-select {
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid rgba(209, 213, 219, 0.9);
  background: #ffffff;
  font-size: 12px;
  color: var(--text-primary);
  cursor: pointer;
  min-width: 120px;
  transition: border 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.control-select:hover {
  border-color: var(--primary-color);
  background: #f9faff;
}

/* --------------------------------------------------
   DASHBOARD CONTENT
-------------------------------------------------- */

.dashboard-content {
  flex: 1;
  overflow-y: auto;
  padding: 22px 24px 24px;
}

/* Shared surface style */
.metric-card,
.chart-container,
.announcement-card,
.trending-list,
.project-card,
.alert-item,
.empty-state,
.modal-content {
  background: var(--bg-elevated);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-soft);
}

/* --------------------------------------------------
   METRIC CARDS
-------------------------------------------------- */

.metric-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.metric-card {
  padding: 16px 16px 14px;
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.18s ease, transform 0.12s ease, border 0.16s ease;
}

.metric-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at top right,
    rgba(79, 70, 229, 0.07),
    transparent 60%
  );
  pointer-events: none;
}

.metric-card:hover {
  transform: translateY(-2px);
  border-color: rgba(79, 70, 229, 0.18);
  box-shadow: var(--shadow-hover);
}

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

.metric-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-muted);
}

.metric-icon {
  width: 20px;
  height: 20px;
  color: var(--text-muted);
}

.metric-value {
  font-size: 26px;
  line-height: 1.1;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.metric-change {
  font-size: 12px;
  font-weight: 500;
}

.metric-change.positive {
  color: var(--success-color);
}

.metric-change.negative,
.metric-change.critical {
  color: var(--danger-color);
}

/* --------------------------------------------------
   CHARTS
-------------------------------------------------- */

.chart-container {
  padding: 18px 18px 16px;
}

.chart-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 18px;
}

.chart-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.chart-subtitle {
  font-size: 12px;
  color: var(--text-secondary);
}

.chart-wrapper {
  position: relative;
  height: 280px;
}

.main-chart .chart-wrapper {
  height: 340px;
}

/* --------------------------------------------------
   GEO / TABLES
-------------------------------------------------- */

.geo-list {
  margin-top: 18px;
}

.geo-item {
  display: grid;
  grid-template-columns: 34px 120px 1fr 60px;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px dashed rgba(226, 232, 240, 0.8);
}

.geo-item:last-child {
  border-bottom: none;
}

.geo-flag {
  font-size: 22px;
}

.geo-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}

.geo-bar {
  height: 7px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
}

.geo-bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #4f46e5, #22c55e);
}

.geo-count {
  text-align: right;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

/* Sources table */

.sources-table {
  width: 100%;
  margin-top: 16px;
  border-collapse: collapse;
}

.sources-table thead th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.sources-table tbody tr {
  border-bottom: 1px dashed rgba(226, 232, 240, 0.8);
}

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

.sources-table tbody td {
  padding: 10px 0;
  font-size: 13px;
  color: var(--text-primary);
}

.source-tone.positive {
  color: var(--success-color);
}

.source-tone.negative {
  color: var(--danger-color);
}

/* --------------------------------------------------
   ANNOUNCEMENTS & TRENDING
-------------------------------------------------- */

.announcements-section {
  margin-bottom: 26px;
}

.section-title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.announcement-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.announcement-card {
  padding: 16px 16px 14px;
  border-left-width: 4px;
  border-left-style: solid;
}

.announcement-card.announcement-Regulatory {
  border-left-color: var(--danger-color);
}

.announcement-card.announcement-Strategy {
  border-left-color: var(--primary-color);
}

.announcement-card.announcement-Deals {
  border-left-color: var(--success-color);
}

.announcement-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.announcement-category {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.announcement-impact {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
}

.announcement-impact.impact-Crisis {
  background: #fee2e2;
  color: var(--danger-color);
}

.announcement-impact.impact-AI {
  background: #ede9fe;
  color: #7c3aed;
}

.announcement-impact.impact-Climate {
  background: #d1fae5;
  color: #059669;
}

.announcement-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  line-height: 1.4;
}

.announcement-description {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.announcement-metrics {
  display: flex;
  gap: 14px;
  font-size: 11px;
  color: var(--text-secondary);
}

/* Trending */

.trending-list {
  overflow: hidden;
}

.trending-item {
  display: flex;
  align-items: center;
  padding: 13px 16px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.7);
  transition: background 0.14s ease;
}

.trending-item:last-child {
  border-bottom: none;
}

.trending-item:hover {
  background: #f9faff;
}

.trending-content {
  flex: 1;
}

.trending-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 3px;
}

.trending-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 11px;
  color: var(--text-muted);
}

.trending-sentiment {
  width: 60px;
  text-align: right;
  font-weight: 600;
  font-size: 13px;
}

.trending-task-btn {
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid rgba(209, 213, 219, 0.9);
  background: #ffffff;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.14s ease, border-color 0.14s ease,
    transform 0.1s ease;
}

.trending-task-btn:hover {
  background: #eef2ff;
  border-color: var(--primary-color);
  transform: translateY(-1px);
}

/* --------------------------------------------------
   ALERT QUEUE (RIGHT DRAWER)
-------------------------------------------------- */

.alert-queue {
  position: fixed;
  right: -340px;
  top: 0;
  width: 340px;
  height: 100vh;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(22px);
  border-left: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: -16px 0 40px rgba(15, 23, 42, 0.18);
  transition: right 0.26s ease;
  z-index: 60;
}

.alert-queue.open {
  right: 0;
}

.alert-queue-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 18px 14px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.alert-queue-content {
  padding: 16px 18px 18px;
  overflow-y: auto;
  height: calc(100vh - 64px);
}

.alert-item {
  padding: 12px 12px 10px;
  border-radius: 12px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  margin-bottom: 10px;
}

.alert-item.alert-critical {
  border-color: var(--danger-color);
  background: #fef2f2;
}

.alert-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 999px;
  background: #f3f4f6;
  margin-bottom: 5px;
  color: var(--text-secondary);
}

.alert-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
}

.alert-description {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.alert-actions {
  display: flex;
  gap: 6px;
}

.btn-text {
  background: none;
  border: none;
  padding: 4px 6px;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
}

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

.btn-primary-small {
  padding: 5px 11px;
  border-radius: 999px;
  border: none;
  background: var(--primary-color);
  color: #ffffff;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}

/* --------------------------------------------------
   PROJECT SELECTOR
-------------------------------------------------- */

.srm-project-selector {
  min-height: 100vh;
  background: radial-gradient(
    circle at top left,
    #e0e7ff 0,
    #f3f4f6 42%,
    #f9fafb 100%
  );
  padding: 28px 32px 32px;
}

.selector-container {
  max-width: 1320px;
  margin: 0 auto;
}

.selector-header {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  align-items: center;
  margin-bottom: 26px;
}

.selector-title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.selector-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
}

.selector-search {
  position: relative;
  max-width: 420px;
  width: 100%;
  margin-bottom: 18px;
}

/* Tabs */

.selector-tabs {
  display: flex;
  gap: 18px;
  margin-bottom: 24px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.tab-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 4px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.16s ease, border 0.16s ease;
}

.tab-button.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}

.tab-count {
  background: #f3f4ff;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 11px;
}

/* Project grid */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 20px;
}

.project-card {
  padding: 18px 18px 16px;
  cursor: pointer;
  transition: box-shadow 0.18s ease, transform 0.12s ease, border 0.16s ease;
}

.project-card:hover {
  transform: translateY(-2px);
  border-color: rgba(79, 70, 229, 0.25);
  box-shadow: var(--shadow-hover);
}

.project-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.project-logo {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  overflow: hidden;
  background: #eef2ff;
}

.project-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-initial {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
}

.project-info {
  flex: 1;
}

.project-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.project-type {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Stats */

.project-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.stat-item {
  text-align: center;
}

.stat-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

.stat-label {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* Mini chart */

.project-chart {
  height: 90px;
  margin-bottom: 12px;
}

.project-activity {
  padding-top: 12px;
  border-top: 1px solid rgba(226, 232, 240, 0.85);
  font-size: 11px;
  color: var(--text-secondary);
}

.project-alerts {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  background: #fffbeb;
  color: #92400e;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  margin-top: 10px;
}

.project-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.action-button {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(209, 213, 219, 0.9);
  background: #ffffff;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.16s ease, border 0.16s ease, transform 0.1s ease;
}

.action-button:hover {
  background: #f3f4ff;
  border-color: var(--primary-color);
  transform: translateY(-1px);
}

.action-button.primary {
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  border-color: transparent;
  color: #ffffff;
}

/* --------------------------------------------------
   EMPTY STATE
-------------------------------------------------- */

.empty-state {
  text-align: center;
  padding: 60px 16px;
}

.empty-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 18px;
  color: var(--text-muted);
}

.empty-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 6px;
}

.empty-text {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 18px;
}

/* --------------------------------------------------
   MODALS
-------------------------------------------------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.38);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 70;
}

.modal-content {
  width: 90%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.modal-title {
  font-size: 17px;
  font-weight: 600;
}

.modal-close {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: none;
  background: #f3f4f6;
  cursor: pointer;
}

.modal-body {
  padding: 18px 20px 16px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px 18px;
  border-top: 1px solid rgba(226, 232, 240, 0.9);
}

/* --------------------------------------------------
   FORMS
-------------------------------------------------- */

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 6px;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 7px 10px;
  border-radius: 10px;
  border: 1px solid rgba(209, 213, 219, 0.95);
  font-size: 13px;
  background: #f9fafb;
  transition: border 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.form-textarea {
  min-height: 80px;
  resize: vertical;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  background: #ffffff;
  box-shadow: 0 0 0 1px rgba(79, 70, 229, 0.16),
    0 12px 30px rgba(15, 23, 42, 0.15);
}

.btn-secondary {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(209, 213, 219, 0.9);
  background: #ffffff;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

/* --------------------------------------------------
   NOTIFICATIONS (TOASTS)
-------------------------------------------------- */

.srm-notification {
  position: fixed;
  right: 20px;
  bottom: 20px;
  min-width: 260px;
  max-width: 320px;
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.25);
  z-index: 10000 !important;
  animation: srm-toast-in 0.18s ease-out;
}

.notification-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
}

.notification-message {
  font-size: 13px;
  color: var(--text-primary);
}

.notification-close {
  border: none;
  background: none;
  cursor: pointer;
  font-size: 16px;
  color: var(--text-muted);
}

.notification-success {
  border-left: 3px solid var(--success-color);
}

.notification-error {
  border-left: 3px solid var(--danger-color);
}

.notification-info {
  border-left: 3px solid var(--info-color);
}

@keyframes srm-toast-in {
  from {
    opacity: 0;
    transform: translate3d(0, 14px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

/* --------------------------------------------------
   UTILITIES (keep these for template compatibility)
-------------------------------------------------- */

.w-4 {
  width: 1rem !important;
}
.h-4 {
  height: 1rem !important;
}
.w-5 {
  width: 1.25rem !important;
}
.h-5 {
  height: 1.25rem !important;
}
.w-8 {
  width: 2rem !important;
}
.h-8 {
  height: 2rem !important;
}
.mr-2 {
  margin-right: 0.5rem !important;
}
.inline {
  display: inline !important;
}

.text-center {
  text-align: center;
}

.grid {
  display: grid;
}
.grid-cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid-cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.gap-6 {
  gap: 24px;
}

/* Simple sentiment / trend helpers */
.sentiment-positive {
  color: var(--success-color) !important;
}
.sentiment-negative {
  color: var(--danger-color) !important;
}
.sentiment-neutral {
  color: var(--text-secondary) !important;
}
.trend-up {
  color: var(--success-color) !important;
}
.trend-down {
  color: var(--danger-color) !important;
}
.trend-flat {
  color: var(--text-secondary) !important;
}

/* --------------------------------------------------
   RESPONSIVE
-------------------------------------------------- */

@media (max-width: 1280px) {
  .metric-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .announcement-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1024px) {
  .dashboard-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    transform: translateX(-100%);
    box-shadow: 18px 0 42px rgba(15, 23, 42, 0.35);
  }

  .dashboard-sidebar.mobile-open {
    transform: translateX(0);
  }
}

@media (max-width: 768px) {
  .metric-cards,
  .announcement-cards,
  .projects-grid,
  .grid-cols-2,
  .grid-cols-3 {
    grid-template-columns: minmax(0, 1fr);
  }

  .dashboard-header {
    flex-wrap: wrap;
    gap: 10px;
    height: auto;
    padding: 10px 14px;
  }

  .control-bar {
    padding: 6px 14px;
    flex-wrap: wrap;
    gap: 10px;
    height: auto;
  }

  .dashboard-content {
    padding: 16px 14px 18px;
  }

  .selector-header {
    flex-direction: column;
    align-items: flex-start;
  }

.project-actions {
    flex-direction: column;
  }
}

.srm-dashboard-v2 {
  background: #f4f6fb;
  color: #0f172a;
}

.srm-dashboard-v2 .dashboard-sidebar {
  background: #0f172a;
  color: #f8fafc;
  border-right: 1px solid #1e293b;
}

.srm-dashboard-v2 .nav-item {
  color: #cbd5f5;
}

.srm-dashboard-v2 .nav-item.active,
.srm-dashboard-v2 .nav-item:hover {
  background: rgba(14, 165, 233, 0.15);
  color: #f8fafc;
}

.srm-dashboard-v2 .btn-primary {
  background: #0ea5e9;
  border-color: #0ea5e9;
  color: #fff;
}

.srm-dashboard-v2 .btn-primary:hover {
  background: #0284c7;
  border-color: #0284c7;
}

.srm-dashboard-v2 .metric-card,
.srm-dashboard-v2 .chart-container,
.srm-dashboard-v2 .announcement-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 20px 25px -5px rgb(15 23 42 / 0.05);
}

.srm-dashboard-v2 .page-title {
  color: #0f172a;
}

.srm-dashboard-v2 .meta-item svg {
  color: #0ea5e9;
}

.news-list { display: flex; flex-direction: column; gap: 1rem; }
.news-row { border: 1px solid #e5e7eb; border-radius: 0.75rem; padding: 1rem; background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / 0.05); }
.news-row-title { font-weight: 600; color: #111827; text-decoration: none; }
.news-row-title:hover { color: #4f46e5; }
.news-row-header { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.news-sentiment { font-weight: 600; }
.news-sentiment.positive { color: #16a34a; }
.news-sentiment.negative { color: #dc2626; }
.news-row-meta { display: flex; gap: 1.5rem; font-size: 0.875rem; color: #6b7280; margin-top: 0.5rem; }
.news-row-excerpt { margin-top: 0.75rem; color: #4b5563; }

.narrative-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.narrative-card { border: 1px solid #e5e7eb; border-radius: 1rem; padding: 1rem; background: #fff; }
.narrative-card-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 0.5rem; }
.narrative-progress { background: #f3f4f6; border-radius: 9999px; height: 6px; overflow: hidden; }
.narrative-progress .narrative-fill { height: 100%; border-radius: 9999px; }

.alert-list { display: flex; flex-direction: column; gap: 1rem; }
.alert-card { border: 1px solid #e5e7eb; border-left-width: 4px; border-radius: 0.75rem; padding: 1rem; background: #fff; }
.alert-card-header { display: flex; justify-content: space-between; font-size: 0.875rem; margin-bottom: 0.5rem; color: #6b7280; }
.alert-badge { text-transform: uppercase; font-weight: 600; }

.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag { background: #eef2ff; color: #4338ca; padding: 0.25rem 0.75rem; border-radius: 9999px; font-size: 0.875rem; }

.table-responsive { overflow-x: auto; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
