/* ============ DESIGN SYSTEM ============ */
:root {
  --mountain-brown: #4A3120;
  --mountain-brown-light: #5d3f2d;
  --mountain-brown-dark: #3a2518;
  --sky-blue: #0071e3;
  --sky-blue-light: #2997ff;
  --sky-blue-dark: #004494;
  --summit-sand: #E6D6BF;
  --summit-sand-light: #f0e6d5;
  --clay-ridge: #B68A63;
  --stone-ash: #86868b;
  --white: #ffffff;
  --bg: #f5f5f7;
  --bg-card: rgba(255, 255, 255, 0.7);
  --text-primary: #1d1d1f;
  --text-secondary: #515154;
  --text-muted: #86868b;
  --border: rgba(0, 0, 0, 0.08);
  --border-light: rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.08);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.12);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --sidebar-width: 260px;
  --topbar-height: 64px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-heading: 'SF Pro Display', 'Inter', sans-serif;
  --font-body: 'SF Pro Text', 'Inter', sans-serif;
  --green: #34c759;
  --red: #ff3b30;
  --amber: #ffcc00;
  --purple: #af52de;
}

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

html {
  font-size: 15px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text-primary);
  overflow: hidden;
  height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  color: inherit;
}

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

a {
  text-decoration: none;
  color: inherit;
}

.hidden {
  display: none !important;
}

/* Lucide icon sizing */
.lc-xs {
  width: 14px;
  height: 14px;
}

.lc-sm {
  width: 16px;
  height: 16px;
}

.lc-md {
  width: 20px;
  height: 20px;
}

.lc-lg {
  width: 28px;
  height: 28px;
}

.lc-xl {
  width: 40px;
  height: 40px;
}

/* ============ LOGIN ============ */
.login-screen {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a0f08 0%, #2d1a0f 30%, #3a2518 60%, #1a0f08 100%);
  overflow: hidden;
}

.login-bg {
  position: absolute;
  inset: 0;
}

.login-mountain {
  position: absolute;
  bottom: 0;
  width: 100%;
}

.login-mountain.m1 {
  background: rgba(74, 49, 32, 0.4);
  height: 80%;
  clip-path: polygon(0 100%, 15% 40%, 30% 70%, 50% 20%, 70% 60%, 85% 30%, 100% 55%, 100% 100%);
  animation: mountainFloat 8s ease-in-out infinite;
}

.login-mountain.m2 {
  background: rgba(74, 49, 32, 0.25);
  height: 70%;
  clip-path: polygon(0 100%, 10% 50%, 25% 75%, 45% 30%, 60% 65%, 80% 35%, 100% 60%, 100% 100%);
  animation: mountainFloat 12s ease-in-out infinite reverse;
}

.login-mountain.m3 {
  background: rgba(74, 49, 32, 0.15);
  height: 60%;
  clip-path: polygon(0 100%, 20% 55%, 40% 80%, 55% 40%, 75% 70%, 90% 45%, 100% 65%, 100% 100%);
}

.login-glow {
  position: absolute;
  top: 15%;
  left: 50%;
  transform: translateX(-50%);
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(55, 161, 247, 0.15) 0%, transparent 70%);
  animation: glowPulse 4s ease-in-out infinite;
}

@keyframes mountainFloat {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

@keyframes glowPulse {

  0%,
  100% {
    opacity: 0.5;
    transform: translateX(-50%) scale(1);
  }

  50% {
    opacity: 1;
    transform: translateX(-50%) scale(1.1);
  }
}

.login-card {
  position: relative;
  z-index: 10;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-xl);
  padding: 44px 40px;
  width: 420px;
  max-width: 92vw;
  box-shadow: 0 32px 64px rgba(0, 0, 0, 0.4);
  animation: cardSlideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes cardSlideUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-logo {
  text-align: center;
  margin-bottom: 32px;
}

.login-logo-mark {
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  border-radius: 16px;
  background: rgba(55, 161, 247, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--sky-blue);
}

.login-logo h1 {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 4px;
}

.login-subtitle {
  font-family: var(--font-heading);
  font-size: 13px;
  color: var(--sky-blue);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-top: 2px;
  font-weight: 500;
}

.login-company {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.35);
  margin-top: 8px;
  letter-spacing: 1px;
}

.input-group {
  margin-bottom: 18px;
}

.input-group label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.45);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  width: 16px;
  height: 16px;
  color: rgba(255, 255, 255, 0.3);
  pointer-events: none;
}

.input-wrap input {
  width: 100%;
  padding: 13px 14px 13px 40px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 14px;
  transition: var(--transition);
  outline: none;
}

.input-wrap input::placeholder {
  color: rgba(255, 255, 255, 0.25);
}

.input-wrap input:focus {
  border-color: var(--sky-blue);
  background: rgba(55, 161, 247, 0.08);
  box-shadow: 0 0 0 3px rgba(55, 161, 247, 0.12);
}

.pw-toggle {
  position: absolute;
  right: 12px;
  color: rgba(255, 255, 255, 0.35);
  padding: 4px;
}

.login-error {
  color: #ff6b6b;
  font-size: 12px;
  margin-bottom: 10px;
  min-height: 18px;
}

.login-btn {
  width: 100%;
  padding: 13px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--sky-blue), var(--sky-blue-dark));
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
  box-shadow: 0 4px 16px rgba(55, 161, 247, 0.3);
}

.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(55, 161, 247, 0.4);
}

.login-users {
  margin-top: 24px;
  text-align: center;
}

.login-users p {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.3);
  margin-bottom: 10px;
}

.login-user-chips {
  display: flex;
  gap: 6px;
  justify-content: center;
  flex-wrap: wrap;
}

.login-user-chips button {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px 5px 5px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.65);
  font-size: 11px;
  font-weight: 500;
  transition: var(--transition);
}

.login-user-chips button:hover {
  background: rgba(255, 255, 255, 0.12);
}

.chip-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
}

/* ============ APP SHELL ============ */
.app-shell {
  display: flex;
  height: 100vh;
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0
  }

  to {
    opacity: 1
  }
}

/* ============ SIDEBAR ============ */
.sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 100;
  transition: var(--transition);
  border-right: 1px solid var(--border);
}

.sidebar-header {
  padding: 22px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
}

.sidebar-logo-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--mountain-brown);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(74, 49, 32, 0.2);
}

.sidebar-header h2 {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 1px;
}

.sidebar-sub {
  font-size: 10px;
  color: var(--sky-blue);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  display: block;
  font-weight: 500;
}

.sidebar-nav {
  flex: 1;
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

.nav-item i,
.nav-item svg {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
}

.nav-item:hover {
  background: rgba(0, 0, 0, 0.04);
  color: var(--text-primary);
}

.nav-item.active {
  background: var(--mountain-brown);
  color: #fff;
  font-weight: 600;
}

.nav-item.active::before {
  display: none;
}

.nav-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 14px;
}

.sidebar-brand-selector {
  padding: 14px 14px 10px;
  border-top: 1px solid var(--border);
}

.sidebar-brand-selector label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
  display: block;
}

.brand-select-wrap {
  position: relative;
}

.brand-select-wrap select {
  width: 100%;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 500;
  appearance: none;
  cursor: pointer;
  outline: none;
}

.brand-select-wrap::after {
  content: '▾';
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 11px;
  pointer-events: none;
}

.sidebar-user {
  padding: 14px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--mountain-brown);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.user-avatar.sm {
  width: 28px;
  height: 28px;
  font-size: 11px;
}

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

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

.logout-btn {
  margin-left: auto;
  color: var(--text-secondary);
  padding: 6px;
  border-radius: 6px;
  transition: var(--transition);
}

.logout-btn:hover {
  color: var(--red);
  background: rgba(255, 59, 48, 0.1);
}

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

.topbar {
  height: var(--topbar-height);
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.menu-toggle {
  display: none;
  padding: 8px;
  border-radius: 8px;
}

.menu-toggle:hover {
  background: var(--border-light);
}

.topbar-search {
  flex: 1;
  max-width: 440px;
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  border: 1px solid var(--border);
  transition: var(--transition);
}

.topbar-search:focus-within {
  border-color: var(--sky-blue);
  box-shadow: 0 0 0 3px rgba(55, 161, 247, 0.08);
  background: var(--bg-card);
}

.topbar-search input {
  flex: 1;
  border: none;
  background: none;
  outline: none;
  color: var(--text-primary);
  font-size: 13px;
}

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

.topbar-search kbd {
  font-size: 10px;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 1px 5px;
  border-radius: 4px;
}

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

.topbar-btn {
  position: relative;
  padding: 7px;
  border-radius: 8px;
  color: var(--text-secondary);
  transition: var(--transition);
}

.topbar-btn:hover {
  background: var(--bg);
}

.topbar-btn i,
.topbar-btn svg {
  width: 19px;
  height: 19px;
}

.notif-badge {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 4px;
  border-radius: 100px;
  background: var(--white);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.topbar-user span {
  font-size: 12px;
  font-weight: 500;
}

/* ============ NOTIFICATIONS ============ */
.notif-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  width: 340px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  margin-top: 12px;
  z-index: 200;
  max-height: 480px;
  display: flex;
  flex-direction: column;
}

.notif-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.notif-header h3 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.notif-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}

.notif-item {
  padding: 10px 16px;
  display: flex;
  gap: 12px;
  border-bottom: 1px solid rgba(0,0,0,0.03);
  font-size: 12px;
}
.notif-item:last-child {
  border-bottom: none;
}
.notif-item-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  flex-shrink: 0;
}
.notif-item-content {
  flex: 1;
}
.notif-item-time {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ============ VIEWS ============ */
.view-container {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.view {
  display: none;
  animation: viewFadeIn 0.35s ease;
}

.view.active {
  display: block;
}

@keyframes viewFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px)
  }

  to {
    opacity: 1;
    transform: translateY(0)
  }
}

.view-section {
  padding: 30px;
  max-width: 1400px;
  margin: 0 auto;
}

.view-header {
  margin-bottom: 24px;
}

.view-header h1 {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.view-header p {
  color: var(--text-secondary);
  font-size: 14px;
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.btn i,
.btn svg {
  width: 16px;
  height: 16px;
}

.btn-primary {
  background: var(--mountain-brown);
  color: #fff;
}

.btn-primary:hover {
  background: var(--mountain-brown-dark);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--white);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--bg);
}

.btn-danger {
  background: rgba(255, 59, 48, 0.1);
  color: var(--red);
  box-shadow: none;
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.15);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

.btn-ghost {
  padding: 6px 10px;
  font-size: 12px;
  color: var(--text-muted);
  border-radius: 6px;
}

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

.btn-wa {
  background: #25D366;
  color: #fff;
}

.btn-wa:hover {
  background: #1fb855;
}

/* ============ DASHBOARD ============ */
.dash-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 22px;
  border: 1px solid var(--border);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

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

.stat-card .stat-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.stat-card .stat-icon i,
.stat-card .stat-icon svg {
  width: 20px;
  height: 20px;
}

.metric-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.metric-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(0, 0, 0, 0.12);
}

.metric-value {
  font-family: var(--font-heading);
  font-size: 42px;
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1.1;
  margin-bottom: 6px;
}

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

.stat-card::after {
  content: '';
  position: absolute;
  top: -20px;
  right: -20px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.08;
  pointer-events: none;
}

.stat-card.blue .stat-icon {
  background: rgba(55, 161, 247, 0.1);
  color: var(--sky-blue);
}

.stat-card.blue .stat-value {
  color: var(--sky-blue);
}

.stat-card.blue::after {
  background: var(--sky-blue);
}

.stat-card.green .stat-icon {
  background: rgba(34, 197, 94, 0.1);
  color: var(--green);
}

.stat-card.green .stat-value {
  color: var(--green);
}

.stat-card.green::after {
  background: var(--green);
}

.stat-card.red .stat-icon {
  background: rgba(239, 68, 68, 0.1);
  color: var(--red);
}

.stat-card.red .stat-value {
  color: var(--red);
}

.stat-card.red::after {
  background: var(--red);
}

.stat-card.amber .stat-icon {
  background: rgba(245, 158, 11, 0.1);
  color: var(--amber);
}

.stat-card.amber .stat-value {
  color: var(--amber);
}

.stat-card.amber::after {
  background: var(--amber);
}

.dash-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.chart-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.chart-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  font-weight: 600;
  font-size: 15px;
}
.dash-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 22px;
  border: 1px solid var(--border);
}

.dash-card h3 {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dash-card h3 i,
.dash-card h3 svg {
  width: 18px;
  height: 18px;
  color: var(--sky-blue);
}

.sigma-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.sigma-item {
  text-align: center;
  padding: 14px;
  border-radius: var(--radius-sm);
  background: var(--bg);
}

.sigma-item .sigma-val {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 800;
  color: var(--sky-blue);
}

.sigma-item .sigma-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
}

.phase-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.phase-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: var(--radius-sm);
  background: var(--bg);
}

.phase-item .phase-name {
  flex: 1;
  font-size: 12px;
  font-weight: 500;
}

.phase-item .phase-bar-wrap {
  width: 100px;
  height: 5px;
  border-radius: 3px;
  background: var(--border);
  overflow: hidden;
}

.phase-item .phase-bar {
  height: 100%;
  border-radius: 3px;
  transition: width 1s ease;
}

.phase-item .phase-pct {
  font-size: 12px;
  font-weight: 700;
  min-width: 36px;
  text-align: right;
}

.workload-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.workload-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.workload-item .wl-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 11px;
  flex-shrink: 0;
}

.workload-item .wl-name {
  width: 55px;
  font-size: 12px;
  font-weight: 500;
}

.workload-item .wl-bar-wrap {
  flex: 1;
  height: 7px;
  border-radius: 4px;
  background: var(--border);
  overflow: hidden;
}

.workload-item .wl-bar {
  height: 100%;
  border-radius: 4px;
  transition: width 1s ease;
}

.workload-item .wl-count {
  font-size: 12px;
  font-weight: 700;
  min-width: 38px;
  text-align: right;
}

.ring-container {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 8px 0;
}

.ring-svg {
  width: 110px;
  height: 110px;
}

.ring-bg {
  fill: none;
  stroke: var(--border);
  stroke-width: 8;
}

.ring-fill {
  fill: none;
  stroke: var(--sky-blue);
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dashoffset 1.5s ease;
}

.ring-text {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 800;
  fill: var(--text-primary);
}

.ring-label {
  font-size: 9px;
  fill: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.ring-stats {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ring-stat {
  display: flex;
  align-items: center;
  gap: 7px;
}

.ring-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.ring-stat span {
  font-size: 12px;
  color: var(--text-secondary);
}

.ring-stat strong {
  font-weight: 700;
}

/* ============ TASK BOARD ============ */
.task-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.task-filter {
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  outline: none;
  cursor: pointer;
}

.task-filter:focus {
  border-color: var(--sky-blue);
}

.task-count {
  font-size: 12px;
  color: var(--text-muted);
  margin-left: auto;
}

.phase-group {
  margin-bottom: 20px;
}

.phase-group-header {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  color: #fff;
  cursor: pointer;
  user-select: none;
}

.phase-group-header h3 {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  flex: 1;
}

.phase-group-header .phase-count {
  font-size: 11px;
  background: rgba(255, 255, 255, 0.15);
  padding: 2px 9px;
  border-radius: 100px;
}

.phase-group-header .chevron {
  transition: var(--transition);
  width: 15px;
  height: 15px;
}

.phase-group-header .chevron.collapsed {
  transform: rotate(-90deg);
}

.task-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  overflow: hidden;
}

.task-table th {
  padding: 9px 12px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  background: var(--bg);
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.task-table td {
  padding: 10px 12px;
  font-size: 12px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}

.task-table tr {
  cursor: pointer;
  transition: var(--transition);
}

.task-table tr:hover {
  background: rgba(55, 161, 247, 0.03);
}

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

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 100px;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.status-badge.done {
  background: rgba(55, 161, 247, 0.1);
  color: var(--sky-blue);
}

.status-badge.in-progress {
  background: rgba(34, 197, 94, 0.1);
  color: var(--green);
}

.status-badge.not-started {
  background: rgba(154, 148, 140, 0.1);
  color: var(--stone-ash);
}

.status-badge.waiting {
  background: rgba(245, 158, 11, 0.1);
  color: var(--amber);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.status-dot.done {
  background: var(--sky-blue);
}

.status-dot.in-progress {
  background: var(--green);
}

.status-dot.not-started {
  background: var(--stone-ash);
}

.status-dot.waiting {
  background: var(--amber);
}

.priority-pill {
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.priority-pill.critical {
  background: rgba(239, 68, 68, 0.1);
  color: var(--red);
}

.priority-pill.high {
  background: rgba(245, 158, 11, 0.1);
  color: var(--amber);
}

.priority-pill.medium {
  background: rgba(234, 179, 8, 0.08);
  color: #b8960f;
}

.priority-pill.low {
  background: rgba(34, 197, 94, 0.1);
  color: var(--green);
}

.progress-bar-wrap {
  width: 80px;
  height: 5px;
  border-radius: 3px;
  background: var(--border);
  overflow: hidden;
  display: inline-block;
  vertical-align: middle;
  margin-right: 5px;
}

.progress-bar {
  height: 100%;
  border-radius: 3px;
  transition: width 0.5s ease;
}

.progress-val {
  font-size: 11px;
  font-weight: 600;
}

.time-badge {
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.time-badge.early {
  background: rgba(55, 161, 247, 0.1);
  color: var(--sky-blue);
}

.time-badge.on-time {
  background: rgba(34, 197, 94, 0.1);
  color: var(--green);
}

.time-badge.idle {
  background: rgba(154, 148, 140, 0.08);
  color: var(--stone-ash);
}

.time-badge.late {
  background: rgba(245, 158, 11, 0.1);
  color: var(--amber);
}

.time-badge.very-late {
  background: rgba(239, 68, 68, 0.1);
  color: var(--red);
}

.time-badge.completed {
  background: rgba(55, 161, 247, 0.1);
  color: var(--sky-blue);
}

.owner-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
}

.owner-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
}

/* ============ CALENDAR ============ */
.cal-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.cal-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cal-nav button {
  padding: 7px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: var(--transition);
}

.cal-nav button:hover {
  background: var(--bg);
}

.cal-nav button i {
  width: 15px;
  height: 15px;
}

.cal-month {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 600;
}

.cal-toggle {
  margin-left: auto;
  display: flex;
  gap: 3px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 3px;
}

.cal-toggle button {
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  transition: var(--transition);
}

.cal-toggle button.active {
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.cal-day-header {
  padding: 8px;
  text-align: center;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  background: var(--bg);
}

.cal-day {
  min-height: 100px;
  padding: 6px;
  background: var(--bg-card);
  position: relative;
  transition: var(--transition);
  cursor: pointer;
}

.cal-day:hover {
  background: rgba(55, 161, 247, 0.02);
}

.cal-day.other-month {
  opacity: 0.3;
}

.cal-day.today {
  background: rgba(55, 161, 247, 0.04);
}

.cal-day.today::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--sky-blue);
}

.cal-day-num {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 3px;
}

.cal-day.today .cal-day-num {
  color: var(--sky-blue);
  font-weight: 800;
}

.cal-item {
  padding: 3px 5px;
  border-radius: 3px;
  font-size: 9px;
  font-weight: 500;
  margin-bottom: 2px;
  cursor: pointer;
  transition: var(--transition);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cal-item:hover {
  opacity: 0.8;
}

.cal-item.tiktok {
  background: rgba(0, 0, 0, 0.06);
  border-left: 2px solid #000;
}

.cal-item.instagram {
  background: rgba(225, 48, 108, 0.08);
  border-left: 2px solid #E1306C;
}

.cal-item.youtube {
  background: rgba(255, 0, 0, 0.06);
  border-left: 2px solid #FF0000;
}

.cal-item.website {
  background: rgba(55, 161, 247, 0.08);
  border-left: 2px solid var(--sky-blue);
}

.cal-item.facebook {
  background: rgba(66, 103, 178, 0.08);
  border-left: 2px solid #4267B2;
}

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

.cal-list-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: var(--transition);
  cursor: pointer;
}

.cal-list-item:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.cal-list-date {
  min-width: 60px;
  text-align: center;
}

.cal-list-date .day {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
}

.cal-list-date .month {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.cal-list-info {
  flex: 1;
}

.cal-list-info h4 {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 3px;
}

.cal-list-info .cal-meta {
  font-size: 11px;
  color: var(--text-secondary);
  display: flex;
  gap: 10px;
}

/* ============ INTEGRATIONS ============ */
.integration-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.integration-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

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

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

.integration-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.integration-icon i,
.integration-icon svg {
  width: 24px;
  height: 24px;
}

.integration-header h3 {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 600;
}

.integration-header .int-status {
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.int-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.int-dot.connected {
  background: var(--green);
}

.int-dot.ready {
  background: var(--sky-blue);
}

.integration-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
  flex: 1;
  margin-bottom: 14px;
}

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

.social-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 18px;
}

.social-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  text-align: center;
  transition: var(--transition);
}

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

.social-icon {
  margin-bottom: 8px;
  color: var(--text-secondary);
}

.social-icon i,
.social-icon svg {
  width: 28px;
  height: 28px;
}

.social-card h4 {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 3px;
}

.social-card p {
  font-size: 10px;
  color: var(--text-muted);
}

/* ============ NOTES ============ */
.notes-tabs {
  display: flex;
  gap: 3px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 3px;
  margin-bottom: 20px;
  width: fit-content;
}

.notes-tabs button {
  padding: 8px 18px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}

.notes-tabs button i {
  width: 14px;
  height: 14px;
}

.notes-tabs button.active {
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
  color: var(--text-primary);
  font-weight: 600;
}

.notes-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.note-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: var(--transition);
}

.note-card:hover {
  box-shadow: var(--shadow-sm);
}

.note-card h3 {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.note-card h3 .note-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(55, 161, 247, 0.1);
  color: var(--sky-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.note-card ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.note-card li {
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-secondary);
  padding-left: 18px;
  position: relative;
}

.note-card li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--clay-ridge);
}

.color-swatch {
  display: inline-block;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  vertical-align: middle;
  margin-right: 8px;
  border: 2px solid var(--border);
}

/* ============ SETTINGS ============ */
.settings-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
}

.settings-section h3 {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.settings-section h3 i {
  width: 18px;
  height: 18px;
  color: var(--sky-blue);
}

.member-table {
  width: 100%;
  border-collapse: collapse;
}

.member-table th {
  padding: 8px 12px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.member-table td {
  padding: 10px 12px;
  font-size: 13px;
  border-bottom: 1px solid var(--border-light);
}

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

.role-badge {
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.role-badge.director {
  background: rgba(139, 92, 246, 0.1);
  color: var(--purple);
}

.role-badge.lead {
  background: rgba(55, 161, 247, 0.1);
  color: var(--sky-blue);
}

.role-badge.staff {
  background: rgba(154, 148, 140, 0.1);
  color: var(--stone-ash);
}

/* ============ MODAL ============ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.modal-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  width: 520px;
  max-width: 94vw;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  animation: cardSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.modal-header h3 {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 600;
}

.modal-close {
  padding: 6px;
  border-radius: 6px;
  color: var(--text-muted);
  transition: var(--transition);
}

.modal-close:hover {
  background: var(--bg);
  color: var(--text-primary);
}

.modal-body {
  padding: 22px;
}

.modal-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

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

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

.form-input {
  width: 100%;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-primary);
  transition: var(--transition);
}

.form-input:focus {
  outline: none;
  border-color: var(--mountain-brown);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(74, 49, 32, 0.08);
}

select.form-input {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239A948C' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

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

.form-group textarea.form-input {
  min-height: 70px;
  resize: vertical;
}

/* ============ TOAST ============ */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  background: var(--mountain-brown);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.35s ease;
  min-width: 260px;
}

.toast.success {
  border-left: 3px solid var(--green);
}

.toast.error {
  border-left: 3px solid var(--red);
}

.toast.info {
  border-left: 3px solid var(--sky-blue);
}

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

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(40px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ============ DRIVE FOLDER ============ */
.drive-tree {
  padding: 0;
  margin: 0;
  list-style: none;
}

.drive-tree li {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  transition: var(--transition);
}

.drive-tree li:hover {
  background: var(--bg);
}

.drive-tree li i {
  width: 16px;
  height: 16px;
  color: var(--amber);
}

.drive-tree .sub {
  margin-left: 24px;
}

.drive-tree .sub li i {
  color: var(--sky-blue);
}

/* ============ SCROLLBAR ============ */
::-webkit-scrollbar {
  width: 5px
}

::-webkit-scrollbar-track {
  background: transparent
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px
}

::-webkit-scrollbar-thumb:hover {
  background: var(--stone-ash)
}

/* ============ RESPONSIVE ============ */
@media(max-width:1200px) {
  .dash-grid {
    grid-template-columns: repeat(2, 1fr)
  }

  .social-grid {
    grid-template-columns: repeat(2, 1fr)
  }
}

@media(max-width:900px) {
  .sidebar {
    transform: translateX(-100%)
  }

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

  .main-content {
    margin-left: 0
  }

  .menu-toggle {
    display: block
  }

  .dash-grid {
    grid-template-columns: 1fr
  }

  .dash-row {
    grid-template-columns: 1fr
  }

  .integration-grid {
    grid-template-columns: 1fr
  }
}