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

:root {
  /* ── COLORS: Gold ─────────────────────────────────────── */
  --gold-primary:       #C9A84C;
  --gold-bright:        #E8C96B;
  --gold-muted:         #9A7A34;
  --gold-highlight:     #F5E0A0;
  --gold-deep:          #6B5020;
  --gold-glass-bg:      rgba(201, 168, 76, 0.06);
  --gold-glass-border:  rgba(201, 168, 76, 0.25);
  --gold-glow:          rgba(201, 168, 76, 0.15);

  /* ── COLORS: Background ───────────────────────────────── */
  --bg-deep:            #0A0A0C;
  --bg-base:            #111114;
  --bg-surface:         #18181D;
  --bg-elevated:        #1F1F26;
  --bg-border:          #2A2A35;
  --bg-hover:           rgba(255, 255, 255, 0.04);
  --bg-active:          rgba(201, 168, 76, 0.08);

  /* ── COLORS: Text ─────────────────────────────────────── */
  --text-primary:       #F8F8FA;
  --text-secondary:     #B8B8C8;
  --text-muted:         #6B6B80;
  --text-disabled:      #3A3A48;
  --text-gold:          #C9A84C;
  --text-inverse:       #111114;

  /* ── COLORS: Glass / Alpha ────────────────────────────── */
  --glass-bg:           rgba(255, 255, 255, 0.04);
  --glass-border:       rgba(255, 255, 255, 0.08);
  --glass-highlight:    rgba(255, 255, 255, 0.06);
  --overlay:            rgba(0, 0, 0, 0.72);

  /* ── COLORS: Status ───────────────────────────────────── */
  --color-success:      #2DD4A0;
  --color-success-bg:   rgba(45, 212, 160, 0.10);
  --color-success-border: rgba(45, 212, 160, 0.25);
  --color-error:        #E05252;
  --color-error-bg:     rgba(224, 82, 82, 0.10);
  --color-error-border: rgba(224, 82, 82, 0.25);
  --color-warning:      #F5A623;
  --color-warning-bg:   rgba(245, 166, 35, 0.10);
  --color-warning-border: rgba(245, 166, 35, 0.25);
  --color-info:         #4A9EEB;
  --color-info-bg:      rgba(74, 158, 235, 0.10);
  --color-info-border:  rgba(74, 158, 235, 0.25);

  /* ── TYPOGRAPHY ───────────────────────────────────────── */
  --font-sans:    'Inter', 'Noto Sans Lao Looped', 'Noto Sans Thai', sans-serif;
  --font-display: 'Manrope', 'Inter', sans-serif;
  --font-mono:    'JetBrains Mono', 'Fira Code', monospace;

  --text-2xs:  10px;
  --text-xs:   11px;
  --text-sm:   13px;
  --text-base: 14px;
  --text-md:   15px;
  --text-lg:   16px;
  --text-xl:   18px;
  --text-2xl:  22px;
  --text-3xl:  28px;
  --text-4xl:  36px;

  /* ── SPACING ──────────────────────────────────────────── */
  --space-1:   4px;
  --space-2:   8px;
  --space-3:   12px;
  --space-4:   16px;
  --space-5:   20px;
  --space-6:   24px;
  --space-8:   32px;
  --space-10:  40px;

  /* ── BORDER RADIUS ────────────────────────────────────── */
  --radius-xs:   4px;
  --radius-sm:   8px;
  --radius-md:   12px;
  --radius-lg:   16px;
  --radius-xl:   24px;
  --radius-2xl:  32px;
  --radius-full: 9999px;

  /* ── SHADOWS ──────────────────────────────────────────── */
  --shadow-xs:         0 1px 4px rgba(0,0,0,0.25);
  --shadow-sm:         0 2px 12px rgba(0,0,0,0.35);
  --shadow-md:         0 4px 24px rgba(0,0,0,0.45);
  --shadow-lg:         0 8px 40px rgba(0,0,0,0.55);
  --shadow-gold:       0 0 24px rgba(201, 168, 76, 0.18);
  --shadow-gold-btn:   0 2px 16px rgba(201, 168, 76, 0.30);
  --shadow-inset-top:  0 1px 0 rgba(255,255,255,0.06) inset;

  /* ── BLUR ─────────────────────────────────────────────── */
  --blur-sm:  blur(4px);
  --blur-md:  blur(12px);
  --blur-lg:  blur(24px);

  /* ── GRADIENTS ────────────────────────────────────────── */
  --gradient-app-bg:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(201,168,76,0.14) 0%, transparent 68%),
    #111114;
  --gradient-gold-btn:
    linear-gradient(135deg, #E8C96B 0%, #C9A84C 45%, #A8872E 100%);
  --gradient-gold-metallic:
    linear-gradient(145deg, #F5E0A0 0%, #E8C96B 18%, #C9A84C 42%, #8A6A20 72%, #3A2A08 100%);
  --gradient-glass-card:
    linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(201,168,76,0.025) 100%);
  --gradient-dark-panel:
    linear-gradient(180deg, #1F1F26 0%, #111114 100%);

  /* ── MOTION ───────────────────────────────────────────── */
  --ease-out-expo:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out:    cubic-bezier(0.40, 0, 0.2, 1);
  --ease-out:       cubic-bezier(0.00, 0, 0.2, 1);
  --duration-fast:  150ms;
  --duration-base:  200ms;
  --duration-slow:  300ms;
}

/* ── RESET & BASE STYLE ─────────────────────────────────── */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--gradient-app-bg);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-deep);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-border);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--gold-muted);
}

/* Noto Sans Lao Line Heights adjustment */
:lang(lo), body {
  line-height: 1.6;
}

/* ── NAVIGATION & APP LAYOUT ────────────────────────────── */
.app-header {
  height: 72px;
  border-bottom: 1px solid var(--glass-border);
  background: rgba(17, 17, 20, 0.75);
  backdrop-filter: var(--blur-md);
  -webkit-backdrop-filter: var(--blur-md);
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-8);
}

.brand-section {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.brand-logo {
  background: var(--gradient-gold-btn);
  color: var(--text-inverse);
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-2xl);
  box-shadow: var(--shadow-gold);
}

.brand-name-group {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-primary);
}

.brand-subtitle {
  font-size: var(--text-2xs);
  color: var(--text-secondary);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.view-nav {
  display: flex;
  gap: var(--space-2);
}

.nav-link {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  transition: all var(--duration-fast);
}

.nav-link:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.nav-link.active {
  background: var(--gold-glass-bg);
  border-color: var(--gold-glass-border);
  color: var(--gold-bright);
}

.user-profile-widget {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--glass-border);
  padding: 6px 14px;
  border-radius: var(--radius-full);
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--gold-primary), var(--bg-border));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--text-primary);
  font-size: var(--text-xs);
  border: 1.5px solid var(--gold-primary);
}

.user-meta {
  display: flex;
  flex-direction: column;
}

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

.user-role {
  font-size: var(--text-2xs);
  color: var(--text-secondary);
}

/* ── LAYOUT SHELL ────────────────────────────────────────── */
.app-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: var(--space-6) var(--space-8);
  animation: fadeIn var(--duration-slow) var(--ease-out-expo);
}

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

.view-section {
  display: none;
}

.view-section.active {
  display: block;
}

/* ── PREMIUM CARDS & PANELS ──────────────────────────────── */
.glass-card {
  background: var(--gradient-glass-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  backdrop-filter: var(--blur-md);
  -webkit-backdrop-filter: var(--blur-md);
  box-shadow: var(--shadow-lg), var(--shadow-inset-top);
  padding: var(--space-6);
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0; left: 10%; right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08) 50%, transparent);
  pointer-events: none;
}

.glass-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-5);
  border-left: 3px solid var(--gold-primary);
  padding-left: var(--space-3);
}

.glass-card-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-primary);
}

.gold-card {
  background: var(--gold-glass-bg);
  border: 1px solid var(--gold-glass-border);
  border-radius: var(--radius-xl);
  backdrop-filter: var(--blur-md);
  -webkit-backdrop-filter: var(--blur-md);
  box-shadow: var(--shadow-lg), 0 0 32px rgba(201,168,76,0.04);
  padding: var(--space-6);
  position: relative;
  overflow: hidden;
}

.gold-card::before {
  content: '';
  position: absolute;
  top: 0; left: 5%; right: 5%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201,168,76,0.5) 50%, transparent);
}

/* ── EXECUTIVE DASHBOARD (PM VIEW) ───────────────────────── */
.dashboard-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: var(--space-6);
  margin-bottom: var(--space-6);
}

.completion-widget {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-5) 0;
  border-bottom: 1px solid var(--bg-border);
  margin-bottom: var(--space-5);
}

.progress-ring-container {
  position: relative;
  width: 140px;
  height: 140px;
  margin-bottom: var(--space-4);
}

.progress-ring-circle {
  transition: stroke-dashoffset 0.35s;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
}

.progress-ring-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: var(--text-3xl);
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--gold-bright);
}

.sprint-label {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  font-weight: 500;
  margin-top: 4px;
}

.sprint-stats {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: 4px;
}

/* Project Progress mini circular indices (RESPONSIVE GRID) */
.by-project-section {
  width: 100%;
}

.by-project-title {
  font-size: var(--text-2xs);
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  margin-bottom: var(--space-4);
}

.project-mini-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: var(--space-2);
  margin-bottom: var(--space-5);
  width: 100%;
}

.project-mini-card {
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: var(--space-3) 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 0;
  width: 100%;
  transition: border-color var(--duration-fast);
}

.project-mini-card:hover {
  border-color: rgba(201, 168, 76, 0.2);
}

.project-mini-circle {
  width: 48px;
  height: 48px;
  position: relative;
  margin-bottom: 8px;
}

.project-mini-value {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--text-primary);
}

.project-mini-name {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  margin-top: 4px;
}

.project-mini-details {
  font-size: 8px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Team Workload gauges styling */
.workload-gauge-item {
  margin-bottom: var(--space-4);
}

.workload-gauge-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-xs);
  font-weight: 500;
  margin-bottom: var(--space-2);
  color: var(--text-secondary);
}

.workload-gauge-team {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.workload-gauge-team span {
  color: var(--text-muted);
  font-size: var(--text-2xs);
}

.workload-gauge-percent {
  font-weight: 700;
}

.workload-gauge-bar-bg {
  height: 8px;
  background: var(--bg-elevated);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

.workload-gauge-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.4s var(--ease-out-expo);
}

/* Active Projects Portfolio Timeline Gantt */
.portfolio-timeline-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.portfolio-timeline-item {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  transition: all var(--duration-base);
}

.portfolio-timeline-item:hover {
  border-color: rgba(201, 168, 76, 0.15);
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.portfolio-item-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.portfolio-item-title-group {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.portfolio-item-title {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--text-primary);
}

.portfolio-item-desc {
  font-size: var(--text-xs);
  color: var(--text-secondary);
}

.portfolio-timeline-gantt {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gantt-progress-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.gantt-progress-bar-bg {
  height: 6px;
  background: var(--bg-elevated);
  border-radius: var(--radius-full);
  flex-grow: 1;
  margin: 0 var(--space-4);
  overflow: hidden;
}

.gantt-progress-bar-fill {
  height: 100%;
  background: var(--gradient-gold-btn);
  border-radius: var(--radius-full);
  transition: width 0.4s var(--ease-out-expo);
}

.gantt-months-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
}

.gantt-month-cell {
  background: var(--bg-elevated);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xs);
  padding: 6px 0;
  text-align: center;
  font-size: 9px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
}

.gantt-month-cell.active-sprint {
  background: rgba(45, 212, 160, 0.08);
  border-color: rgba(45, 212, 160, 0.25);
  color: var(--color-success);
}

.gantt-month-cell.active-warn {
  background: rgba(245, 166, 35, 0.08);
  border-color: rgba(245, 166, 35, 0.25);
  color: var(--color-warning);
}

.gantt-month-cell.active-next {
  background: rgba(74, 158, 235, 0.08);
  border-color: rgba(74, 158, 235, 0.25);
  color: var(--color-info);
}

.timeline-dates {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-muted);
}

/* ── TASK LIST & RESOURCE TABLE ───────────────────────────── */
.table-filter-bar {
  display: flex;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
  align-items: center;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.filter-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.filter-select, .form-control {
  background: var(--bg-surface);
  border: 1px solid var(--bg-border);
  color: var(--text-primary);
  height: 38px;
  padding: 0 var(--space-3);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  outline: none;
  min-width: 150px;
  transition: all var(--duration-fast);
}

.filter-select:focus, .form-control:focus {
  border-color: var(--gold-primary);
  box-shadow: 0 0 8px rgba(201, 168, 76, 0.15);
}

.table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  background: rgba(24, 24, 29, 0.4);
}

.task-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: var(--text-sm);
}

.task-table th {
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  font-size: var(--text-2xs);
  letter-spacing: 0.08em;
  padding: 14px var(--space-4);
  border-bottom: 1px solid var(--bg-border);
}

.task-table td {
  padding: 16px var(--space-4);
  border-bottom: 1px solid var(--bg-border);
  vertical-align: middle;
}

.task-table tbody tr {
  transition: background var(--duration-fast);
}

.task-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.015);
}

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

.task-name-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.task-title {
  color: var(--text-primary);
  font-weight: 500;
}

.task-desc {
  font-size: var(--text-2xs);
  color: var(--text-muted);
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* UI Badges and Tags */
.badge-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge-tag-gold {
  background: rgba(201, 168, 76, 0.12);
  border: 1px solid var(--gold-glass-border);
  color: var(--gold-bright);
}

.badge-tag-status {
  padding: 4px 10px;
  border-radius: var(--radius-md);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-align: center;
}

.status-done {
  background: var(--color-success-bg);
  border: 1px solid var(--color-success-border);
  color: var(--color-success);
}

.status-in-progress {
  background: var(--color-warning-bg);
  border: 1px solid var(--color-warning-border);
  color: var(--color-warning);
}

.status-testing {
  background: var(--color-info-bg);
  border: 1px solid var(--color-info-border);
  color: var(--color-info);
}

.status-backlog {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
}

.staff-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  background: var(--color-success-bg);
  color: var(--color-success);
  border: 1px solid var(--color-success-border);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 600;
}

.staff-pill.staff-missing {
  background: var(--color-error-bg);
  color: var(--color-error);
  border: 1px solid var(--color-error-border);
}

.timeline-delay {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 600;
}

.timeline-delay.delayed {
  color: var(--color-error);
}

.timeline-delay.on-track {
  color: var(--color-success);
}

/* ── TEAM MEMBER KANBAN WORKSPACE ───────────────────────── */
.workspace-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--space-6);
  align-items: start;
}

.workspace-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.team-list-widget {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.team-list-btn {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  color: var(--text-secondary);
  cursor: pointer;
  text-align: left;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  transition: all var(--duration-fast);
}

.team-list-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: rgba(251, 251, 251, 0.15);
}

.team-list-btn.active {
  background: var(--gold-glass-bg);
  border-color: var(--gold-primary);
  color: var(--gold-bright);
  box-shadow: 0 0 16px rgba(201, 168, 76, 0.1);
}

.team-btn-avatar {
  width: 28px;
  height: 28px;
  background: var(--bg-elevated);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  border: 1px solid var(--text-muted);
}

.team-list-btn.active .team-btn-avatar {
  border-color: var(--gold-bright);
  background: var(--gold-deep);
  color: var(--text-primary);
}

.team-btn-name-grp {
  display: flex;
  flex-direction: column;
}

.team-btn-name {
  font-size: var(--text-sm);
  font-weight: 600;
}

.team-btn-role {
  font-size: 10px;
  color: var(--text-muted);
}

/* Kanban Board Columns */
.kanban-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
  min-height: 520px;
  align-items: start;
}

.kanban-column {
  background: rgba(24, 24, 29, 0.5);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  min-height: 480px;
  transition: background var(--duration-fast);
}

.kanban-column.drag-over {
  background: rgba(201, 168, 76, 0.04);
  border-color: rgba(201, 168, 76, 0.3);
}

.kanban-column-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: var(--space-2);
  border-bottom: 1.5px solid var(--bg-border);
}

.kanban-column-title {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
}

.kanban-column-count {
  font-size: var(--text-2xs);
  background: var(--bg-elevated);
  border: 1px solid var(--glass-border);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  color: var(--text-muted);
  font-weight: 700;
}

.kanban-cards-container {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  min-height: 400px;
}

.kanban-card {
  background: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  cursor: grab;
  position: relative;
  transition: all var(--duration-base);
}

.kanban-card:hover {
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.kanban-card:active {
  cursor: grabbing;
}

.kanban-card.dragging {
  opacity: 0.4;
  border-style: dashed;
}

.kanban-card-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.kanban-card-desc {
  font-size: var(--text-2xs);
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: var(--space-3);
}

.kanban-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-2);
  border-top: 1px solid rgba(255,255,255,0.03);
}

.kanban-card-dates {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.kanban-card-date-lbl {
  font-size: 8px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.kanban-card-date-val {
  font-size: 9px;
  font-weight: 600;
  color: var(--text-secondary);
}

/* ── DATA SYNC CENTER ────────────────────────────────────── */
.sync-section-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
}

.sync-instruction-box {
  background: rgba(201, 168, 76, 0.02);
  border: 1px solid rgba(201, 168, 76, 0.1);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  margin-bottom: var(--space-5);
}

.sync-list-instructions {
  margin-left: var(--space-4);
  margin-top: var(--space-2);
  font-size: var(--text-xs);
  color: var(--text-secondary);
}

.sync-list-instructions li {
  margin-bottom: 8px;
}

.sync-paste-area {
  width: 100%;
  height: 200px;
  background: var(--bg-deep);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  outline: none;
  resize: none;
}

.sync-paste-area:focus {
  border-color: var(--gold-primary);
}

.sync-history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-xs);
}

.sync-history-table th {
  text-align: left;
  color: var(--text-muted);
  padding: 8px;
  border-bottom: 1.5px solid var(--bg-border);
  font-weight: 600;
}

.sync-history-table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--bg-border);
}

/* ── PERFORMANCE & KPI scorecard STYLING ─────────────────── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: var(--space-6);
  margin-bottom: var(--space-6);
}

.kpi-card {
  background: var(--gradient-glass-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  backdrop-filter: var(--blur-md);
  -webkit-backdrop-filter: var(--blur-md);
  box-shadow: var(--shadow-lg), var(--shadow-inset-top);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  position: relative;
  overflow: hidden;
  transition: all var(--duration-base);
}

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0; left: 10%; right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08) 50%, transparent);
  pointer-events: none;
}

.kpi-card:hover {
  border-color: rgba(201, 168, 76, 0.25);
  box-shadow: var(--shadow-md), var(--shadow-gold);
  transform: translateY(-2px);
}

.kpi-card.outstanding {
  background: var(--gold-glass-bg);
  border-color: var(--gold-glass-border);
}

.kpi-card.outstanding::before {
  background: linear-gradient(90deg, transparent, rgba(201, 168, 76, 0.5) 50%, transparent);
}

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

.kpi-user-grp {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.kpi-score-badge {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 800;
  color: var(--gold-bright);
  background: rgba(201, 168, 76, 0.15);
  border: 1px solid var(--gold-glass-border);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  text-align: center;
}

.kpi-score-lbl {
  font-size: 8px;
  text-transform: uppercase;
  color: var(--text-muted);
  display: block;
}

.kpi-details-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.kpi-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-xs);
}

.kpi-detail-lbl {
  color: var(--text-secondary);
}

.kpi-detail-val {
  color: var(--text-primary);
  font-weight: 600;
}

.skills-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.skill-badge {
  background: var(--bg-elevated);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  font-size: 9px;
  font-weight: 600;
}

.kpi-card.outstanding .skill-badge {
  border-color: rgba(201, 168, 76, 0.15);
  color: var(--gold-bright);
}

.bonus-tier-pill {
  font-size: 10px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.bonus-tier-excellent {
  background: rgba(45, 212, 160, 0.10);
  border: 1px solid rgba(45, 212, 160, 0.25);
  color: var(--color-success);
}

.bonus-tier-good {
  background: rgba(74, 158, 235, 0.10);
  border: 1px solid rgba(74, 158, 235, 0.25);
  color: var(--color-info);
}

.bonus-tier-medium {
  background: rgba(245, 166, 35, 0.10);
  border: 1px solid rgba(245, 166, 35, 0.25);
  color: var(--color-warning);
}

.bonus-tier-none {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
}

/* ── BTN STYLE ───────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 var(--space-4);
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
}

.btn-primary {
  background: var(--gradient-gold-btn);
  color: var(--text-inverse);
  box-shadow: var(--shadow-gold-btn), 0 1px 0 rgba(255,255,255,0.22) inset;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #F5E0A0 0%, #E8C96B 40%, #C9A84C 100%);
  box-shadow: 0 4px 16px rgba(201,168,76,0.35);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--gold-glass-bg);
  color: var(--gold-bright);
  border-color: var(--gold-glass-border);
}

.btn-secondary:hover {
  background: rgba(201,168,76,0.1);
  border-color: rgba(201,168,76,0.45);
}

.btn-danger {
  background: var(--color-error-bg);
  color: var(--color-error);
  border-color: var(--color-error-border);
}

.btn-danger:hover {
  background: rgba(224, 82, 82, 0.15);
}

/* ── MODALS & ALERTS ──────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--overlay);
  backdrop-filter: var(--blur-sm);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.modal-overlay.active {
  display: flex;
  opacity: 1;
}

.modal-card {
  background: var(--bg-elevated);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 500px;
  overflow: hidden;
  transform: translateY(20px);
  transition: transform 0.25s var(--ease-out-expo);
}

.modal-overlay.active .modal-card {
  transform: translateY(0);
}

.modal-header {
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--bg-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-primary);
}

.modal-body {
  padding: var(--space-6);
}

.modal-footer {
  padding: var(--space-4) var(--space-6);
  background: var(--bg-surface);
  border-top: 1px solid var(--bg-border);
  display: flex;
  justify-content: flex-end;
  gap: var(--space-3);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.form-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Float Alert Messages */
.toast-container {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  z-index: 2000;
}

.toast {
  background: var(--bg-elevated);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-5);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-xs);
  transform: translateX(100%);
  animation: slideIn 0.3s forwards var(--ease-out-expo);
  color: var(--text-primary);
}

@keyframes slideIn {
  to { transform: translateX(0); }
}

.toast.success {
  border-left: 4px solid var(--color-success);
}
.toast.error {
  border-left: 4px solid var(--color-error);
}
.toast.info {
  border-left: 4px solid var(--color-info);
}

/* ── PROJECT PRIORITY PILLS & GLOWS ──────────────────────── */
.priority-pill-emergency {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #ef4444;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.15);
  animation: pulse-border 2s infinite alternate;
}

.priority-pill-urgent {
  background: rgba(249, 115, 22, 0.12);
  border: 1px solid rgba(249, 115, 22, 0.35);
  color: #f97316;
}

.priority-pill-high {
  background: rgba(234, 179, 8, 0.12);
  border: 1px solid rgba(234, 179, 8, 0.35);
  color: var(--gold-bright);
}

.priority-pill-normal {
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.35);
  color: #3b82f6;
}

.priority-pill-low {
  background: rgba(156, 163, 175, 0.08);
  border: 1px solid rgba(156, 163, 175, 0.25);
  color: var(--text-muted);
}

@keyframes pulse-border {
  from { border-color: rgba(239, 68, 68, 0.35); box-shadow: 0 0 6px rgba(239, 68, 68, 0.15); }
  to { border-color: rgba(239, 68, 68, 0.7); box-shadow: 0 0 12px rgba(239, 68, 68, 0.35); }
}

/* ── PROJECT MANAGER GRID & ELEMENTS ──────────────────────── */
.project-mgr-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: var(--space-6);
  align-items: start;
}

.proj-mgr-details-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.proj-mgr-detail-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: rgba(0, 0, 0, 0.15);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.02);
}

.proj-mgr-detail-lbl {
  font-size: 9px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.proj-mgr-detail-val {
  font-size: var(--text-sm);
  color: var(--text-primary);
  font-weight: 600;
}

.table-action-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: var(--text-sm);
  padding: 4px 8px;
  border-radius: var(--radius-xs);
  transition: background var(--duration-fast);
  color: var(--text-secondary);
}

.table-action-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.table-action-btn.btn-delete-task:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

/* ── RESPONSIVENESS ────────────────────────────────────────── */
@media (max-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .workspace-shell {
    grid-template-columns: 1fr;
  }
  .project-mgr-layout {
    grid-template-columns: 1fr;
  }
  .kanban-board {
    grid-template-columns: repeat(2, 1fr);
  }
  .sync-section-grid {
    grid-template-columns: 1fr;
  }
  .kpi-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .app-header {
    flex-direction: column;
    height: auto;
    padding: var(--space-4);
    gap: var(--space-4);
  }
  .app-container {
    padding: var(--space-4);
  }
  .kanban-board {
    grid-template-columns: 1fr;
  }
}
