﻿/* ============================================================
   FinTrust Advisory — Premium Enterprise SaaS Design System
   Bootstrap 5.3 + Custom Theme
   ============================================================ */

:root {
  /* Brand */
  --gc-primary: #2563EB;
  --gc-primary-hover: #1D4ED8;
  --gc-primary-soft: rgba(37, 99, 235, 0.08);
  --gc-secondary: #7C3AED;
  --gc-secondary-soft: rgba(124, 58, 237, 0.08);
  --gc-success: #22C55E;
  --gc-success-soft: rgba(34, 197, 94, 0.1);
  --gc-warning: #F59E0B;
  --gc-warning-soft: rgba(245, 158, 11, 0.1);
  --gc-danger: #EF4444;
  --gc-danger-soft: rgba(239, 68, 68, 0.1);
  --gc-info: #0EA5E9;
  --gc-info-soft: rgba(14, 165, 233, 0.1);

  /* Surfaces */
  --gc-bg: #F8FAFC;
  --gc-sidebar: #0F172A;
  --gc-sidebar-hover: rgba(255, 255, 255, 0.06);
  --gc-sidebar-active: rgba(37, 99, 235, 0.2);
  --gc-card: #FFFFFF;
  --gc-border: #E2E8F0;
  --gc-border-light: #F1F5F9;
  --gc-muted: #64748B;
  --gc-text: #0F172A;
  --gc-text-secondary: #475569;
  --gc-topbar: rgba(255, 255, 255, 0.85);

  /* Layout */
  --gc-sidebar-width: 260px;
  --gc-sidebar-collapsed: 72px;
  --gc-topbar-height: 64px;
  --gc-radius: 12px;
  --gc-radius-sm: 8px;
  --gc-radius-lg: 16px;
  --gc-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --gc-shadow-md: 0 4px 16px rgba(15, 23, 42, 0.08);
  --gc-shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.12);
  --gc-glass: rgba(255, 255, 255, 0.7);
  --gc-glass-border: rgba(255, 255, 255, 0.4);

  /* Motion */
  --gc-ease: cubic-bezier(0.4, 0, 0.2, 1);
  --gc-transition: 0.2s var(--gc-ease);
}

[data-theme="dark"] {
  --gc-bg: #0B1220;
  --gc-card: #111827;
  --gc-border: #1F2937;
  --gc-border-light: #1F2937;
  --gc-muted: #94A3B8;
  --gc-text: #F1F5F9;
  --gc-text-secondary: #CBD5E1;
  --gc-topbar: rgba(17, 24, 39, 0.9);
  --gc-glass: rgba(17, 24, 39, 0.75);
  --gc-glass-border: rgba(255, 255, 255, 0.06);
  --gc-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  --gc-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --gc-primary-soft: rgba(37, 99, 235, 0.15);
  --gc-secondary-soft: rgba(124, 58, 237, 0.15);
}

/* ------------------------------------------------------------
   Base
   ------------------------------------------------------------ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-weight: 400;
  background: var(--gc-bg);
  color: var(--gc-text);
  margin: 0;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  transition: background var(--gc-transition), color var(--gc-transition);
}

h1, h2, h3, h4, h5, h6,
.fw-heading {
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--gc-text);
}

a {
  color: var(--gc-primary);
  text-decoration: none;
  transition: color var(--gc-transition);
}

a:hover {
  color: var(--gc-primary-hover);
}

.text-muted-gc {
  color: var(--gc-muted) !important;
}

.text-secondary-gc {
  color: var(--gc-text-secondary) !important;
}

/* ------------------------------------------------------------
   App Shell
   ------------------------------------------------------------ */
.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--gc-sidebar-width);
  background: var(--gc-sidebar);
  color: #E2E8F0;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 1040;
  display: flex;
  flex-direction: column;
  transition: width var(--gc-transition), transform var(--gc-transition);
  overflow: hidden;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  height: var(--gc-topbar-height);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.sidebar-brand .brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--gc-primary), var(--gc-secondary));
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.sidebar-brand .brand-text {
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
  white-space: nowrap;
  letter-spacing: -0.02em;
}

.sidebar-brand .brand-sub {
  font-size: 0.65rem;
  color: #94A3B8;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 10px 20px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.15) transparent;
}

.nav-section-label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748B;
  padding: 14px 14px 6px;
}

.sidebar .nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  margin: 2px 0;
  border-radius: var(--gc-radius-sm);
  color: #94A3B8;
  font-weight: 500;
  font-size: 0.875rem;
  transition: all var(--gc-transition);
  white-space: nowrap;
}

.sidebar .nav-link i {
  font-size: 1.15rem;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}

.sidebar .nav-link:hover {
  background: var(--gc-sidebar-hover);
  color: #F1F5F9;
}

.sidebar .nav-link.active {
  background: var(--gc-sidebar-active);
  color: #fff;
  box-shadow: inset 3px 0 0 var(--gc-primary);
}

.sidebar .nav-link .badge {
  margin-left: auto;
  font-size: 0.65rem;
  font-weight: 600;
}

.sidebar-footer {
  padding: 12px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.main-content {
  margin-left: var(--gc-sidebar-width);
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left var(--gc-transition);
}

/* Topbar */
.topbar {
  height: var(--gc-topbar-height);
  background: var(--gc-topbar);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--gc-border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 1020;
}

.topbar-search {
  position: relative;
  flex: 1;
  max-width: 420px;
}

.topbar-search i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gc-muted);
  font-size: 0.95rem;
}

.topbar-search input {
  width: 100%;
  padding: 9px 14px 9px 40px;
  border: 1px solid var(--gc-border);
  border-radius: 10px;
  background: var(--gc-bg);
  color: var(--gc-text);
  font-size: 0.875rem;
  transition: all var(--gc-transition);
}

.topbar-search input:focus {
  outline: none;
  border-color: var(--gc-primary);
  box-shadow: 0 0 0 3px var(--gc-primary-soft);
  background: var(--gc-card);
}

.topbar-search .cmd-hint {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.7rem;
  color: var(--gc-muted);
  background: var(--gc-border-light);
  border: 1px solid var(--gc-border);
  padding: 2px 7px;
  border-radius: 5px;
  font-weight: 500;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: var(--gc-text-secondary);
  display: grid;
  place-items: center;
  position: relative;
  cursor: pointer;
  transition: all var(--gc-transition);
  font-size: 1.15rem;
}

.icon-btn:hover {
  background: var(--gc-primary-soft);
  color: var(--gc-primary);
}

.icon-btn .notif-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  background: var(--gc-danger);
  border-radius: 50%;
  border: 2px solid var(--gc-card);
}

.profile-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px 4px 4px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  transition: all var(--gc-transition);
  color: var(--gc-text);
}

.profile-btn:hover {
  background: var(--gc-bg);
  border-color: var(--gc-border);
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: cover;
  background: linear-gradient(135deg, var(--gc-primary), var(--gc-secondary));
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 600;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.avatar-sm { width: 28px; height: 28px; font-size: 0.7rem; border-radius: 8px; }
.avatar-lg { width: 72px; height: 72px; font-size: 1.4rem; border-radius: 16px; }
.avatar-xl { width: 96px; height: 96px; font-size: 1.8rem; border-radius: 20px; }

.profile-btn .profile-meta {
  text-align: left;
  line-height: 1.2;
}

.profile-btn .profile-name {
  font-size: 0.8rem;
  font-weight: 600;
  display: block;
}

.profile-btn .profile-role {
  font-size: 0.7rem;
  color: var(--gc-muted);
}

/* Page body */
.page-body {
  padding: 24px;
  flex: 1;
}

.page-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--gc-border);
  color: var(--gc-muted);
  font-size: 0.8rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

/* ------------------------------------------------------------
   Breadcrumb & Page Header
   ------------------------------------------------------------ */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.page-header h1 {
  font-size: 1.5rem;
  margin: 0 0 4px;
}

.page-header .subtitle {
  color: var(--gc-muted);
  font-size: 0.875rem;
  margin: 0;
}

.breadcrumb-gc {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--gc-muted);
  margin-bottom: 6px;
  list-style: none;
  padding: 0;
}

.breadcrumb-gc a {
  color: var(--gc-muted);
}

.breadcrumb-gc a:hover {
  color: var(--gc-primary);
}

.breadcrumb-gc .separator {
  opacity: 0.5;
}

.breadcrumb-gc .current {
  color: var(--gc-text-secondary);
  font-weight: 500;
}

.page-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ------------------------------------------------------------
   Cards
   ------------------------------------------------------------ */
.gc-card {
  background: var(--gc-card);
  border: 1px solid var(--gc-border);
  border-radius: var(--gc-radius);
  box-shadow: var(--gc-shadow);
  transition: box-shadow var(--gc-transition), transform var(--gc-transition), border-color var(--gc-transition);
}

.gc-card:hover {
  box-shadow: var(--gc-shadow-md);
}

.gc-card-body {
  padding: 20px;
}

.gc-card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--gc-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.gc-card-header h5,
.gc-card-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0;
}

.gc-card-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--gc-border);
  background: var(--gc-bg);
  border-radius: 0 0 var(--gc-radius) var(--gc-radius);
}

.glass-card {
  background: var(--gc-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--gc-glass-border);
  border-radius: var(--gc-radius-lg);
  box-shadow: var(--gc-shadow-md);
}

/* KPI Cards */
.kpi-card {
  position: relative;
  overflow: hidden;
  padding: 20px;
  height: 100%;
}

.kpi-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  border-radius: 4px 0 0 4px;
}

.kpi-card.kpi-primary::before { background: var(--gc-primary); }
.kpi-card.kpi-secondary::before { background: var(--gc-secondary); }
.kpi-card.kpi-success::before { background: var(--gc-success); }
.kpi-card.kpi-warning::before { background: var(--gc-warning); }
.kpi-card.kpi-danger::before { background: var(--gc-danger); }
.kpi-card.kpi-info::before { background: var(--gc-info); }

.kpi-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.kpi-icon.primary { background: var(--gc-primary-soft); color: var(--gc-primary); }
.kpi-icon.secondary { background: var(--gc-secondary-soft); color: var(--gc-secondary); }
.kpi-icon.success { background: var(--gc-success-soft); color: var(--gc-success); }
.kpi-icon.warning { background: var(--gc-warning-soft); color: var(--gc-warning); }
.kpi-icon.danger { background: var(--gc-danger-soft); color: var(--gc-danger); }
.kpi-icon.info { background: var(--gc-info-soft); color: var(--gc-info); }

.kpi-value {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin: 8px 0 2px;
}

.kpi-label {
  font-size: 0.8rem;
  color: var(--gc-muted);
  font-weight: 500;
}

.kpi-trend {
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px 8px;
  border-radius: 20px;
}

.kpi-trend.up {
  background: var(--gc-success-soft);
  color: var(--gc-success);
}

.kpi-trend.down {
  background: var(--gc-danger-soft);
  color: var(--gc-danger);
}

/* ------------------------------------------------------------
   Buttons
   ------------------------------------------------------------ */
.btn {
  font-family: inherit;
  font-weight: 600;
  border-radius: 10px;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  transition: all var(--gc-transition);
}

.btn-primary {
  background: var(--gc-primary);
  border-color: var(--gc-primary);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover,
.btn-primary:focus {
  background: var(--gc-primary-hover);
  border-color: var(--gc-primary-hover);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--gc-secondary);
  border-color: var(--gc-secondary);
}

.btn-secondary:hover {
  background: #6D28D9;
  border-color: #6D28D9;
  transform: translateY(-1px);
}

.btn-outline-primary {
  color: var(--gc-primary);
  border-color: var(--gc-border);
  background: var(--gc-card);
}

.btn-outline-primary:hover {
  background: var(--gc-primary-soft);
  border-color: var(--gc-primary);
  color: var(--gc-primary);
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--gc-border);
  color: var(--gc-text-secondary);
}

.btn-ghost:hover {
  background: var(--gc-bg);
  color: var(--gc-text);
  border-color: var(--gc-border);
}

.btn-soft-primary {
  background: var(--gc-primary-soft);
  color: var(--gc-primary);
  border: none;
}

.btn-soft-primary:hover {
  background: rgba(37, 99, 235, 0.15);
  color: var(--gc-primary);
}

.btn-soft-success {
  background: var(--gc-success-soft);
  color: #15803D;
  border: none;
}

.btn-soft-danger {
  background: var(--gc-danger-soft);
  color: #B91C1C;
  border: none;
}

.btn-soft-warning {
  background: var(--gc-warning-soft);
  color: #B45309;
  border: none;
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-grid;
  place-items: center;
}

/* ------------------------------------------------------------
   Badges & Status
   ------------------------------------------------------------ */
.badge-gc {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.badge-gc::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.badge-active,
.badge-completed,
.badge-success { background: var(--gc-success-soft); color: #15803D; }
.badge-pending,
.badge-warning { background: var(--gc-warning-soft); color: #B45309; }
.badge-scheduled,
.badge-info { background: var(--gc-info-soft); color: #0369A1; }
.badge-cancelled,
.badge-inactive,
.badge-danger { background: var(--gc-danger-soft); color: #B91C1C; }
.badge-in-progress,
.badge-primary { background: var(--gc-primary-soft); color: var(--gc-primary); }
.badge-secondary { background: var(--gc-secondary-soft); color: var(--gc-secondary); }

[data-theme="dark"] .badge-active,
[data-theme="dark"] .badge-completed,
[data-theme="dark"] .badge-success { color: #4ADE80; }
[data-theme="dark"] .badge-pending,
[data-theme="dark"] .badge-warning { color: #FBBF24; }
[data-theme="dark"] .badge-cancelled,
[data-theme="dark"] .badge-inactive,
[data-theme="dark"] .badge-danger { color: #F87171; }
[data-theme="dark"] .badge-scheduled,
[data-theme="dark"] .badge-info { color: #38BDF8; }

/* ------------------------------------------------------------
   Tables
   ------------------------------------------------------------ */
.table-gc {
  width: 100%;
  margin: 0;
  font-size: 0.875rem;
}

.table-gc thead th {
  background: var(--gc-bg);
  color: var(--gc-muted);
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--gc-border);
  padding: 12px 16px;
  white-space: nowrap;
}

.table-gc tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--gc-border-light);
  vertical-align: middle;
  color: var(--gc-text);
}

.table-gc tbody tr {
  transition: background var(--gc-transition);
}

.table-gc tbody tr:hover {
  background: var(--gc-primary-soft);
}

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

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--gc-border);
}

.table-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-select,
.search-input {
  padding: 8px 12px;
  border: 1px solid var(--gc-border);
  border-radius: 8px;
  background: var(--gc-bg);
  color: var(--gc-text);
  font-size: 0.825rem;
  transition: all var(--gc-transition);
}

.filter-select:focus,
.search-input:focus {
  outline: none;
  border-color: var(--gc-primary);
  box-shadow: 0 0 0 3px var(--gc-primary-soft);
}

.search-wrap {
  position: relative;
}

.search-wrap i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gc-muted);
  font-size: 0.9rem;
}

.search-wrap .search-input {
  padding-left: 36px;
  min-width: 220px;
}

/* ------------------------------------------------------------
   Forms
   ------------------------------------------------------------ */
.form-label {
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--gc-text-secondary);
  margin-bottom: 6px;
}

.form-control,
.form-select {
  border: 1px solid var(--gc-border);
  border-radius: 10px;
  padding: 0.625rem 0.875rem;
  font-size: 0.875rem;
  background: var(--gc-card);
  color: var(--gc-text);
  transition: all var(--gc-transition);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--gc-primary);
  box-shadow: 0 0 0 3px var(--gc-primary-soft);
  background: var(--gc-card);
  color: var(--gc-text);
}

.form-control::placeholder {
  color: var(--gc-muted);
}

.form-check-input:checked {
  background-color: var(--gc-primary);
  border-color: var(--gc-primary);
}

.input-group-gc {
  position: relative;
}

.input-group-gc .input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gc-muted);
  z-index: 5;
}

.input-group-gc .form-control {
  padding-left: 42px;
}

/* ------------------------------------------------------------
   Modals
   ------------------------------------------------------------ */
.modal-content {
  border: 1px solid var(--gc-border);
  border-radius: var(--gc-radius-lg);
  box-shadow: var(--gc-shadow-lg);
  background: var(--gc-card);
  color: var(--gc-text);
}

.modal-header {
  border-bottom: 1px solid var(--gc-border);
  padding: 18px 24px;
}

.modal-title {
  font-weight: 700;
  font-size: 1.1rem;
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  border-top: 1px solid var(--gc-border);
  padding: 16px 24px;
  background: var(--gc-bg);
  border-radius: 0 0 var(--gc-radius-lg) var(--gc-radius-lg);
}

.btn-close {
  filter: none;
}

[data-theme="dark"] .btn-close {
  filter: invert(1) grayscale(100%);
}

/* ------------------------------------------------------------
   Timeline
   ------------------------------------------------------------ */
.timeline {
  position: relative;
  padding-left: 28px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: var(--gc-border);
}

.timeline-item {
  position: relative;
  padding-bottom: 20px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -24px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gc-primary);
  border: 2px solid var(--gc-card);
  box-shadow: 0 0 0 2px var(--gc-primary-soft);
}

.timeline-dot.success { background: var(--gc-success); box-shadow: 0 0 0 2px var(--gc-success-soft); }
.timeline-dot.warning { background: var(--gc-warning); box-shadow: 0 0 0 2px var(--gc-warning-soft); }
.timeline-dot.danger { background: var(--gc-danger); box-shadow: 0 0 0 2px var(--gc-danger-soft); }
.timeline-dot.secondary { background: var(--gc-secondary); box-shadow: 0 0 0 2px var(--gc-secondary-soft); }

.timeline-content h6 {
  font-size: 0.85rem;
  font-weight: 600;
  margin: 0 0 2px;
}

.timeline-content p {
  font-size: 0.8rem;
  color: var(--gc-muted);
  margin: 0;
}

.timeline-time {
  font-size: 0.7rem;
  color: var(--gc-muted);
  margin-top: 4px;
}

/* ------------------------------------------------------------
   Alerts
   ------------------------------------------------------------ */
.alert-gc {
  border: none;
  border-radius: var(--gc-radius-sm);
  padding: 12px 16px;
  font-size: 0.875rem;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.alert-gc.alert-info {
  background: var(--gc-info-soft);
  color: #0369A1;
}

.alert-gc.alert-success {
  background: var(--gc-success-soft);
  color: #15803D;
}

.alert-gc.alert-warning {
  background: var(--gc-warning-soft);
  color: #B45309;
}

.alert-gc.alert-danger {
  background: var(--gc-danger-soft);
  color: #B91C1C;
}

/* ------------------------------------------------------------
   Skeleton Loaders
   ------------------------------------------------------------ */
.skeleton {
  background: linear-gradient(90deg, var(--gc-border-light) 25%, var(--gc-border) 50%, var(--gc-border-light) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease infinite;
  border-radius: 8px;
}

.skeleton-text {
  height: 12px;
  margin-bottom: 8px;
}

.skeleton-title {
  height: 20px;
  width: 60%;
  margin-bottom: 12px;
}

.skeleton-avatar {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.skeleton-card {
  height: 120px;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ------------------------------------------------------------
   Progress
   ------------------------------------------------------------ */
.progress-gc {
  height: 8px;
  border-radius: 10px;
  background: var(--gc-border);
  overflow: hidden;
}

.progress-gc .progress-bar {
  border-radius: 10px;
  background: linear-gradient(90deg, var(--gc-primary), var(--gc-secondary));
}

/* ------------------------------------------------------------
   Dropdowns
   ------------------------------------------------------------ */
.dropdown-menu {
  border: 1px solid var(--gc-border);
  border-radius: 12px;
  box-shadow: var(--gc-shadow-lg);
  padding: 8px;
  background: var(--gc-card);
  min-width: 220px;
}

.dropdown-item {
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.85rem;
  color: var(--gc-text);
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all var(--gc-transition);
}

.dropdown-item:hover,
.dropdown-item:focus {
  background: var(--gc-primary-soft);
  color: var(--gc-primary);
}

.dropdown-item i {
  font-size: 1rem;
  width: 18px;
  color: var(--gc-muted);
}

.dropdown-item:hover i {
  color: var(--gc-primary);
}

.dropdown-header {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gc-muted);
  padding: 8px 12px 4px;
}

.dropdown-divider {
  border-color: var(--gc-border);
  margin: 6px 0;
}

.notif-dropdown {
  width: 340px;
  max-height: 420px;
  overflow-y: auto;
}

.notif-item {
  padding: 12px;
  border-radius: 10px;
  display: flex;
  gap: 12px;
  transition: background var(--gc-transition);
  cursor: pointer;
}

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

.notif-item.unread {
  background: var(--gc-primary-soft);
}

.notif-item .notif-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 1rem;
}

/* ------------------------------------------------------------
   Login Page
   ------------------------------------------------------------ */
.login-page {
  min-height: 100vh;
  display: flex;
  background: linear-gradient(135deg, #0F172A 0%, #1E3A8A 45%, #7C3AED 100%);
  position: relative;
  overflow: hidden;
}

.login-page::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(37, 99, 235, 0.35) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(124, 58, 237, 0.3) 0%, transparent 45%),
    radial-gradient(ellipse at 60% 80%, rgba(14, 165, 233, 0.2) 0%, transparent 40%);
  pointer-events: none;
}

.login-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 56px;
  position: relative;
  z-index: 1;
  color: #fff;
}

.login-left .login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 48px;
}

.login-left h1 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  color: #fff;
  margin-bottom: 16px;
  line-height: 1.2;
}

.login-left p {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.75);
  max-width: 440px;
  line-height: 1.6;
}

.login-illustration {
  margin-top: 40px;
  max-width: 480px;
  width: 100%;
}

.login-features {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 40px;
}

.login-feature {
  display: flex;
  align-items: center;
  gap: 14px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9rem;
  font-weight: 500;
}

.login-feature .feat-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  font-size: 1.1rem;
}

.login-right {
  width: 480px;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px;
  position: relative;
  z-index: 1;
}

.login-card {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 20px;
  padding: 40px 36px;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.25);
}

[data-theme="dark"] .login-card {
  background: rgba(17, 24, 39, 0.92);
  border-color: rgba(255, 255, 255, 0.08);
}

.login-card h2 {
  font-size: 1.5rem;
  margin-bottom: 6px;
}

.login-card .login-sub {
  color: var(--gc-muted);
  font-size: 0.875rem;
  margin-bottom: 28px;
}

.login-footer {
  text-align: center;
  margin-top: 24px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.75rem;
  position: relative;
  z-index: 1;
}

/* ------------------------------------------------------------
   Meeting / Training Cards
   ------------------------------------------------------------ */
.entity-card {
  padding: 20px;
  height: 100%;
  transition: all var(--gc-transition);
  cursor: pointer;
}

.entity-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--gc-shadow-md);
  border-color: var(--gc-primary);
}

.entity-card .entity-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--gc-muted);
  margin-top: 12px;
}

.entity-card .entity-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ------------------------------------------------------------
   Calendar legend
   ------------------------------------------------------------ */
.cal-legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--gc-muted);
}

.cal-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cal-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

.cal-dot.meeting { background: var(--gc-primary); }
.cal-dot.training { background: var(--gc-secondary); }
.cal-dot.task { background: var(--gc-warning); }

/* FullCalendar overrides */
.fc {
  --fc-border-color: var(--gc-border);
  --fc-button-bg-color: var(--gc-primary);
  --fc-button-border-color: var(--gc-primary);
  --fc-button-hover-bg-color: var(--gc-primary-hover);
  --fc-button-hover-border-color: var(--gc-primary-hover);
  --fc-button-active-bg-color: var(--gc-primary-hover);
  --fc-today-bg-color: var(--gc-primary-soft);
  --fc-page-bg-color: transparent;
  --fc-neutral-bg-color: var(--gc-bg);
  font-family: inherit;
}

.fc .fc-toolbar-title {
  font-size: 1.15rem !important;
  font-weight: 700;
  color: var(--gc-text);
}

.fc .fc-col-header-cell-cushion,
.fc .fc-daygrid-day-number {
  color: var(--gc-text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.8rem;
}

.fc-theme-standard td,
.fc-theme-standard th {
  border-color: var(--gc-border);
}

.fc .fc-button {
  border-radius: 8px !important;
  font-weight: 600;
  font-size: 0.8rem !important;
  text-transform: capitalize;
  box-shadow: none !important;
}

.fc .fc-button-primary:not(:disabled).fc-button-active,
.fc .fc-button-primary:not(:disabled):active {
  background: var(--gc-secondary);
  border-color: var(--gc-secondary);
}

/* DataTables overrides */
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
  border: 1px solid var(--gc-border);
  border-radius: 8px;
  padding: 6px 10px;
  background: var(--gc-bg);
  color: var(--gc-text);
  font-size: 0.825rem;
}

.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
  font-size: 0.8rem;
  color: var(--gc-muted);
  padding-top: 12px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
  border-radius: 8px !important;
  border: 1px solid var(--gc-border) !important;
  background: var(--gc-card) !important;
  color: var(--gc-text) !important;
  margin: 0 2px;
  padding: 4px 10px !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
  background: var(--gc-primary) !important;
  border-color: var(--gc-primary) !important;
  color: #fff !important;
}

/* ------------------------------------------------------------
   Command Bar
   ------------------------------------------------------------ */
.command-bar {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  align-items: flex-start;
  justify-content: center;
  padding-top: 15vh;
}

.command-bar.open {
  display: flex;
}

.command-panel {
  width: 560px;
  max-width: 92vw;
  background: var(--gc-card);
  border-radius: 16px;
  box-shadow: var(--gc-shadow-lg);
  border: 1px solid var(--gc-border);
  overflow: hidden;
  animation: cmdIn 0.2s var(--gc-ease);
}

@keyframes cmdIn {
  from { opacity: 0; transform: translateY(-12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.command-panel input {
  width: 100%;
  padding: 18px 20px;
  border: none;
  border-bottom: 1px solid var(--gc-border);
  font-size: 1rem;
  background: transparent;
  color: var(--gc-text);
  outline: none;
}

.command-results {
  max-height: 320px;
  overflow-y: auto;
  padding: 8px;
}

.command-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--gc-text);
}

.command-item:hover,
.command-item.active {
  background: var(--gc-primary-soft);
  color: var(--gc-primary);
}

/* ------------------------------------------------------------
   Quick Actions
   ------------------------------------------------------------ */
.quick-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 12px;
  border-radius: var(--gc-radius);
  border: 1px solid var(--gc-border);
  background: var(--gc-card);
  text-align: center;
  transition: all var(--gc-transition);
  cursor: pointer;
  color: var(--gc-text);
  text-decoration: none;
}

.quick-action:hover {
  border-color: var(--gc-primary);
  background: var(--gc-primary-soft);
  color: var(--gc-primary);
  transform: translateY(-2px);
}

.quick-action i {
  font-size: 1.4rem;
}

.quick-action span {
  font-size: 0.75rem;
  font-weight: 600;
}

/* ------------------------------------------------------------
   Photo Upload
   ------------------------------------------------------------ */
.photo-upload {
  position: relative;
  display: inline-block;
}

.photo-upload .upload-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  border-radius: inherit;
  display: grid;
  place-items: center;
  color: #fff;
  opacity: 0;
  transition: opacity var(--gc-transition);
  cursor: pointer;
}

.photo-upload:hover .upload-overlay {
  opacity: 1;
}

/* ------------------------------------------------------------
   Empty State
   ------------------------------------------------------------ */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--gc-muted);
}

.empty-state i {
  font-size: 2.5rem;
  margin-bottom: 12px;
  opacity: 0.4;
}

/* ------------------------------------------------------------
   Sidebar Overlay (mobile)
   ------------------------------------------------------------ */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  z-index: 1035;
  backdrop-filter: blur(2px);
}

.sidebar-overlay.show {
  display: block;
}

.sidebar-toggle {
  display: none;
}

/* ------------------------------------------------------------
   Responsive
   ------------------------------------------------------------ */
@media (max-width: 991.98px) {
  .sidebar {
    transform: translateX(-100%);
  }

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

  .main-content {
    margin-left: 0;
  }

  .sidebar-toggle {
    display: grid;
  }

  .login-left {
    display: none;
  }

  .login-right {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
  }

  .login-page {
    padding: 24px;
    align-items: center;
  }

  .profile-btn .profile-meta {
    display: none;
  }

  .topbar-search .cmd-hint {
    display: none;
  }
}

@media (max-width: 575.98px) {
  .page-body {
    padding: 16px;
  }

  .topbar {
    padding: 0 12px;
  }

  .login-card {
    padding: 28px 20px;
  }

  .kpi-value {
    font-size: 1.4rem;
  }
}

/* ------------------------------------------------------------
   Utilities
   ------------------------------------------------------------ */
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-20 { gap: 20px; }

.hover-lift {
  transition: transform var(--gc-transition), box-shadow var(--gc-transition);
}

.hover-lift:hover {
  transform: translateY(-2px);
  box-shadow: var(--gc-shadow-md);
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.divider-v {
  width: 1px;
  height: 24px;
  background: var(--gc-border);
}

.section-gap {
  margin-bottom: 24px;
}

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

.chart-wrap-sm {
  height: 200px;
}

/* Chart.js canvas parent */
.gc-card canvas {
  max-width: 100%;
}

/* List group polish */
.list-group-item {
  background: transparent;
  border-color: var(--gc-border-light);
  color: var(--gc-text);
  padding: 14px 0;
}

.list-group-item:first-child {
  padding-top: 0;
}

.list-group-flush > .list-group-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

/* Attachment chips */
.attachment-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--gc-bg);
  border: 1px solid var(--gc-border);
  border-radius: 8px;
  font-size: 0.8rem;
  color: var(--gc-text);
  transition: all var(--gc-transition);
}

.attachment-chip:hover {
  border-color: var(--gc-primary);
  background: var(--gc-primary-soft);
}

.attachment-chip i {
  color: var(--gc-primary);
  font-size: 1.1rem;
}

/* Participant stack */
.avatar-stack {
  display: flex;
}

.avatar-stack .avatar {
  margin-left: -8px;
  border: 2px solid var(--gc-card);
}

.avatar-stack .avatar:first-child {
  margin-left: 0;
}

/* Action item checklist */
.action-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--gc-border-light);
}

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

/* Welcome banner */
.welcome-banner {
  background: linear-gradient(135deg, var(--gc-primary) 0%, var(--gc-secondary) 100%);
  border-radius: var(--gc-radius-lg);
  padding: 28px 32px;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.welcome-banner::after {
  content: "";
  position: absolute;
  right: -40px;
  top: -40px;
  width: 200px;
  height: 200px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}

.welcome-banner h2 {
  color: #fff;
  font-size: 1.4rem;
  margin-bottom: 6px;
}

.welcome-banner p {
  color: rgba(255, 255, 255, 0.8);
  margin: 0;
  font-size: 0.9rem;
  max-width: 480px;
}

/* Nav tabs polish */
.nav-tabs-gc {
  border-bottom: 1px solid var(--gc-border);
  gap: 4px;
}

.nav-tabs-gc .nav-link {
  border: none;
  color: var(--gc-muted);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 10px 16px;
  border-radius: 8px 8px 0 0;
  background: transparent;
}

.nav-tabs-gc .nav-link:hover {
  color: var(--gc-primary);
}

.nav-tabs-gc .nav-link.active {
  color: var(--gc-primary);
  background: transparent;
  border-bottom: 2px solid var(--gc-primary);
}

/* Print hide */
@media print {
  .sidebar, .topbar, .page-actions { display: none !important; }
  .main-content { margin-left: 0 !important; }
}
