/* İş Takip Sistemi — Production Build */

:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #eef2ff;
  --sidebar-bg: #0f172a;
  --sidebar-hover: #1e293b;
  --sidebar-active: #312e81;
  --bg: #f1f5f9;
  --card-bg: #ffffff;
  --text: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --danger: #ef4444;
  --success: #10b981;
  --warning: #f59e0b;
  --info: #3b82f6;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.06), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.08), 0 4px 8px rgba(0,0,0,0.04);
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 20px;
}
.login-card {
  background: var(--card-bg);
  border-radius: 16px;
  box-shadow: 0 25px 50px rgba(0,0,0,0.25);
  width: 100%;
  max-width: 440px;
  overflow: hidden;
  animation: slideUp 0.5s ease;
}
.login-header {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  padding: 32px;
  text-align: center;
  color: white;
}
.login-header .logo-icon {
  width: 56px;
  height: 56px;
  background: rgba(255,255,255,0.2);
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 12px;
}
.login-header h1 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
}
.login-header p {
  font-size: 13px;
  opacity: 0.85;
}
.login-body {
  padding: 32px;
}
.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.form-group input,
.form-group select {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  transition: var(--transition);
  background: #f8fafc;
  color: var(--text);
  font-family: inherit;
}
.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
  background: white;
}
.form-group select {
  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 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
.btn-login {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 8px;
  font-family: inherit;
}
.btn-login:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(79,70,229,0.4);
}
.btn-login:active { transform: translateY(0); }
.login-error {
  background: #fef2f2;
  color: #dc2626;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
  display: none;
  border: 1px solid #fecaca;
}
.login-demo {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.login-demo h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.demo-accounts {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.demo-account {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: #f8fafc;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
  font-size: 13px;
}
.demo-account:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}
.demo-account .role-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 600;
}
.role-badge.admin { background: #ede9fe; color: #7c3aed; }
.role-badge.dev { background: #dbeafe; color: #2563eb; }
.role-badge.smm { background: #fce7f3; color: #db2777; }
.role-badge.client { background: #d1fae5; color: #059669; }
.dashboard-layout {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  width: 260px;
  background: var(--sidebar-bg);
  color: #e2e8f0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 100;
  box-shadow: 4px 0 24px rgba(0,0,0,0.15);
  transition: transform 0.3s ease, width 0.3s ease;
}
.sidebar-brand {
  padding: 20px 20px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.brand-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: white;
  box-shadow: 0 4px 12px rgba(99,102,241,0.3);
}
.sidebar-brand .brand-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.sidebar-brand .brand-text h3 {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
}
.sidebar-brand .brand-text span {
  font-size: 11px;
  opacity: 0.6;
}
.sidebar-nav {
  flex: 1;
  padding: 12px 12px;
  overflow-y: auto;
}
.sidebar-nav .nav-section {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.3);
  padding: 16px 12px 8px;
  font-weight: 700;
}
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
  margin-bottom: 2px;
}
.sidebar-nav a:hover {
  background: var(--sidebar-hover);
  color: white;
}
.sidebar-nav a.active {
  background: var(--primary);
  color: white;
}
.sidebar-nav a i {
  width: 20px;
  text-align: center;
  font-size: 15px;
}
.sidebar-footer {
  padding: 16px 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.user-info-mini {
  display: flex;
  align-items: center;
  gap: 10px;
}
.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: white;
}
.user-avatar.admin-avatar { background: #7c3aed; }
.user-avatar.dev-avatar { background: #2563eb; }
.user-avatar.smm-avatar { background: #db2777; }
.user-avatar.client-avatar { background: #059669; }
.user-meta h4 {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
}
.user-meta span {
  font-size: 11px;
  opacity: 0.5;
}
.btn-logout {
  margin-left: auto;
  background: rgba(255,255,255,0.1);
  border: none;
  color: rgba(255,255,255,0.6);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
  font-size: 14px;
}
.btn-logout:hover {
  background: rgba(239,68,68,0.3);
  color: #fca5a5;
}
.topbar {
  height: 64px;
  background: white;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}
.btn-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text);
  padding: 4px;
}
.breadcrumb {
  font-size: 14px;
  color: var(--text-muted);
}
.breadcrumb span {
  color: var(--text);
  font-weight: 600;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}
.btn-notif {
  background: #f1f5f9;
  border: none;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  cursor: pointer;
  position: relative;
  font-size: 16px;
  color: var(--text-muted);
  transition: var(--transition);
}
.btn-notif:hover { background: #e2e8f0; }
.notif-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  background: var(--danger);
  border-radius: 50%;
  border: 2px solid white;
}
.topbar-right { position: relative; }
.notif-dropdown {
  position: absolute;
  top: 46px;
  right: 0;
  width: 380px;
  max-height: 480px;
  background: white;
  border-radius: 14px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
  z-index: 1000;
  display: none;
  overflow: hidden;
  animation: slideUp 0.2s ease;
}
.notif-dropdown.show { display: block; }
.notif-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.notif-dropdown-header h4 {
  font-size: 15px;
  font-weight: 700;
}
.notif-dropdown-body {
  max-height: 400px;
  overflow-y: auto;
}
.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
  position: relative;
}
.notif-item:hover { background: #f8fafc; }
.notif-item.unread { background: #eef2ff; }
.notif-item.unread:hover { background: #e0e7ff; }
.notif-item-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}
.notif-item-body strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 2px;
}
.notif-item-body span {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 2px;
  line-height: 1.4;
}
.notif-item-body small {
  font-size: 11px;
  color: #94a3b8;
}
.notif-unread-dot {
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
  margin-top: 6px;
  flex-shrink: 0;
}
.notif-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-muted);
}
.notif-empty i { font-size: 32px; margin-bottom: 8px; opacity: 0.4; }
.notif-empty p { font-size: 13px; }
.comment-list {
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 4px;
}
.comment-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.comment-item:last-child { border-bottom: none; }
.comment-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}
.comment-body { flex: 1; min-width: 0; }
.comment-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.comment-header strong { font-size: 13px; }
.comment-type {
  font-size: 10px;
  color: white;
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 600;
}
.comment-time {
  font-size: 11px;
  color: #94a3b8;
  margin-left: auto;
}
.comment-text {
  font-size: 13px;
  color: var(--text);
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}
.main-content {
  flex: 1;
  margin-left: 260px;
  min-height: 100vh;
  transition: margin 0.3s ease;
}
.content-area {
  padding: 28px 32px;
}
.page-header {
  margin-bottom: 28px;
}
.page-header h2 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
}
.page-header p {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 4px;
}
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow: hidden;
}
.card-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-header h3 {
  font-size: 15px;
  font-weight: 700;
}
.card-body { padding: 24px; }
.crm-tabs { display: flex; gap: 4px; background: #f1f5f9; padding: 4px; border-radius: var(--radius-sm); }
.crm-tab {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 6px;
}
.crm-tab:hover { color: var(--text); background: rgba(255,255,255,0.6); }
.crm-tab.active { background: white; color: var(--primary); box-shadow: var(--shadow-sm); }
.page-header {
  margin-bottom: 28px;
}
.page-header h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
}
.page-header p {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 4px;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid var(--border);
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: #cbd5e1;
}
.stat-card .stat-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  font-size: 18px;
}
.stat-icon.blue { background: #eff6ff; color: #3b82f6; }
.stat-icon.green { background: #ecfdf5; color: #10b981; }
.stat-icon.purple { background: #f5f3ff; color: #8b5cf6; }
.stat-icon.orange { background: #fff7ed; color: #f97316; }
.stat-icon.pink { background: #fdf2f8; color: #ec4899; }
.stat-icon.teal { background: #f0fdfa; color: #14b8a6; }
.stat-icon.warning { background: #fffbeb; color: #f59e0b; }
.stat-card .stat-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
  margin-bottom: 4px;
}
.stat-card .stat-label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}
.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.stat-card .stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 16px;
}
.stat-icon.blue { background: #dbeafe; color: #2563eb; }
.stat-icon.green { background: #d1fae5; color: #059669; }
.stat-icon.purple { background: #ede9fe; color: #7c3aed; }
.stat-icon.orange { background: #fff7ed; color: #ea580c; }
.stat-icon.pink { background: #fce7f3; color: #db2777; }
.stat-icon.teal { background: #ccfbf1; color: #0d9488; }
.stat-card .stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
}
.stat-card .stat-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}
.card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  margin-bottom: 24px;
  overflow: hidden;
}
.card-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-header h3 {
  font-size: 16px;
  font-weight: 600;
}
.card-body {
  padding: 24px;
}
.welcome-banner {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
  border-radius: var(--radius);
  padding: 32px 36px;
  color: white;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 8px 24px rgba(99,102,241,0.25);
  position: relative;
  overflow: hidden;
}
.welcome-banner::after {
  content: '';
  position: absolute;
  right: -40px;
  top: -40px;
  width: 200px;
  height: 200px;
  background: rgba(255,255,255,0.06);
  border-radius: 50%;
}
.welcome-banner h2 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 6px;
  position: relative;
  z-index: 1;
}
.welcome-banner p {
  opacity: 0.85;
  font-size: 14px;
  position: relative;
  z-index: 1;
}
.welcome-banner .welcome-emoji {
  font-size: 56px;
  position: relative;
  z-index: 1;
}
.customer-showcase {
  margin-bottom: 28px;
}
.customer-showcase h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text);
}
.customer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
}
.customer-card {
  background: white;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid transparent;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
}
.customer-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
  border-color: var(--accent-color, var(--primary));
}
.customer-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--accent-color, var(--primary));
}
.customer-card-logo {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: contain;
  background: #f8fafc;
  padding: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.customer-card-logo.fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  color: white;
}
.customer-card-logo-wrap-dash {
  position: relative;
  width: 48px;
  height: 48px;
  margin: 0 auto;
}
.customer-card-favicon-dash {
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: white;
  padding: 2px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  object-fit: contain;
}
.customer-card-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.customer-card-service {
  font-size: 10px;
  color: var(--text-muted);
  background: #f1f5f9;
  padding: 2px 8px;
  border-radius: 6px;
  white-space: nowrap;
}
.customer-logo-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}
.customer-logo-cell img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: contain;
  background: #f8fafc;
  padding: 2px;
  flex-shrink: 0;
}
.customer-logo-cell .logo-placeholder {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.customer-link {
  color: var(--primary);
  text-decoration: none;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
}
.customer-link:hover { text-decoration: underline; }
img.logo-img { opacity: 0; transition: opacity 0.3s; }
img.logo-img.loaded { opacity: 1; }
.project-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.project-visual-card {
  background: white;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.2s ease;
  cursor: pointer;
}
.project-visual-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.project-visual-card-header {
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.project-visual-card-logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: contain;
  background: #f8fafc;
  padding: 4px;
  flex-shrink: 0;
}
.project-visual-card-logo.fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
  color: white;
}
.project-visual-card-info { flex: 1; min-width: 0; }
.project-visual-card-info strong { display: block; font-size: 15px; margin-bottom: 2px; }
.project-visual-card-info span { font-size: 12px; color: var(--text-muted); }
.project-visual-card-body {
  padding: 0 20px 16px;
}
.project-visual-card-bar {
  height: 6px;
  background: #e2e8f0;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 8px;
}
.project-visual-card-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.5s ease;
}
.project-visual-card-footer {
  padding: 12px 20px;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}
.project-visual-card-footer .badge { font-size: 10px; }
.customer-crm-card {
  background: white;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
}
.customer-crm-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--accent-color, var(--primary));
}
.customer-crm-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.customer-crm-card-header {
  padding: 20px 20px 4px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.customer-crm-card-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: contain;
  background: #f8fafc;
  padding: 3px;
}
.customer-crm-card-logo.fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 800;
  color: white;
}
.customer-page-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}
.customer-page-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.25s ease;
  cursor: pointer;
  position: relative;
  padding: 24px;
}
.customer-page-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.12);
}
.customer-card-accent {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--accent, var(--primary));
}
.customer-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}
.customer-card-logo-wrap {
  position: relative;
  width: 56px;
  height: 56px;
}
.customer-card-logo-bg {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  color: white;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}
.customer-card-favicon {
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: white;
  padding: 3px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  object-fit: contain;
}
.customer-card-badges {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.cust-service-badge {
  font-size: 10px;
  font-weight: 700;
  color: white;
  padding: 3px 10px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.cust-status-badge {
  font-size: 10px;
}
.customer-card-company {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
  line-height: 1.3;
}
.customer-card-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}
.customer-card-meta span {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.customer-card-meta span i {
  width: 16px;
  text-align: center;
  font-size: 11px;
  opacity: 0.7;
}
.customer-card-stats {
  display: flex;
  gap: 0;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}
.cust-stat {
  flex: 1;
  text-align: center;
}
.cust-stat strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}
.cust-stat span {
  font-size: 11px;
  color: var(--text-muted);
}
.table-wrap {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
}
table th {
  text-align: left;
  padding: 12px 16px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  font-weight: 700;
  border-bottom: 2px solid var(--border);
  background: #f8fafc;
}
table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  vertical-align: middle;
}
table tbody tr {
  transition: background 0.15s;
}
table tbody tr:hover {
  background: #f8fafc;
}
table td {
  padding: 14px 16px;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
}
table tbody tr:hover { background: #f8fafc; }
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}
.badge-success { background: #d1fae5; color: #059669; }
.badge-warning { background: #fef3c7; color: #d97706; }
.badge-info { background: #dbeafe; color: #2563eb; }
.badge-danger { background: #fce4ec; color: #c62828; }
.badge-purple { background: #ede9fe; color: #7c3aed; }
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}
.empty-state i {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.3;
}
.empty-state h4 {
  font-size: 16px;
  margin-bottom: 6px;
  color: var(--text);
}
.empty-state p {
  font-size: 13px;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.fade-in { animation: fadeIn 0.3s ease; }
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main-content {
    margin-left: 0;
  }
  .btn-menu-toggle {
    display: block;
  }
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .welcome-banner {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }
}
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 99;
}
.sidebar-overlay.show { display: block; }
.ispanosu-card {
  background: white;
  border-radius: 10px;
  padding: 14px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  cursor: grab;
  transition: var(--transition);
}
.ispanosu-card:active { cursor: grabbing; }
.ispanosu-card.dragging { opacity: 0.4; transform: scale(0.95); }
.ispanosu-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
  border-color: var(--primary);
}
.ispanosu-card-title {
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 4px;
}
.progress-bar-wrap {
  width: 100%;
  height: 20px;
  background: #f1f5f9;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #4f46e5, #7c3aed);
  border-radius: 10px;
  transition: width 0.4s ease;
  min-width: 0;
}
.progress-bar-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 11px;
  font-weight: 700;
  color: #1e293b;
}
.sm-cal-filter {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.sm-filter-select {
  padding: 10px 14px;
  border: 2px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  background: white;
  cursor: pointer;
  min-width: 220px;
  font-family: inherit;
  transition: var(--transition);
}
.sm-filter-select:focus {
  outline: none;
  border-color: var(--primary);
}
.sm-cal-day {
  cursor: pointer;
  position: relative;
  transition: background 0.15s ease;
}
.sm-cal-day:hover {
  background: #eef2ff !important;
}
.sm-cal-day.selected {
  box-shadow: inset 0 0 0 2px var(--primary);
  background: #eef2ff !important;
}
.sm-day-dots {
  display: flex;
  gap: 3px;
  margin-top: 2px;
  flex-wrap: wrap;
}
.sm-day-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.sm-day-more {
  font-size: 8px;
  color: var(--text-muted);
  font-weight: 700;
}
.sm-day-popover {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  border-radius: 14px;
  box-shadow: 0 25px 60px rgba(0,0,0,0.3);
  z-index: 1001;
  width: 100%;
  max-width: 480px;
  max-height: 70vh;
  overflow-y: auto;
  animation: slideUp 0.2s ease;
}
.sm-popover-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: white;
  border-radius: 14px 14px 0 0;
  z-index: 1;
}
.sm-popover-header h4 {
  font-size: 16px;
  font-weight: 700;
  text-transform: capitalize;
}
.sm-popover-body {
  padding: 4px 0;
}
.sm-popover-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
}
.sm-popover-item:hover {
  background: #f8fafc;
}
.sm-popover-item:last-child {
  border-bottom: none;
}
.sm-popover-platforms {
  font-size: 18px;
  display: flex;
  gap: 2px;
  flex-shrink: 0;
}
.sm-popover-thumb {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}
.sm-popover-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  position: sticky;
  bottom: 0;
  background: white;
  border-radius: 0 0 14px 14px;
}
.platform-check-grid {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.platform-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 2px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: var(--transition);
  font-size: 13px;
  font-weight: 500;
  background: white;
  user-select: none;
}
.platform-checkbox:hover {
  border-color: #cbd5e1;
}
.platform-checkbox.checked {
  border-color: var(--primary);
  background: var(--primary-light);
}
.platform-checkbox input[type="checkbox"] {
  display: none;
}
.platform-checkbox i {
  font-size: 16px;
}
.sm-cal-post {
  font-size: 10px;
  padding: 2px 5px;
  border-radius: 4px;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  font-weight: 600;
  color: white;
  display: flex;
  align-items: center;
  gap: 3px;
}
.sm-cal-post.warning { background: linear-gradient(135deg, #f59e0b, #fbbf24); color: #78350f; }
.sm-cal-post.danger { background: linear-gradient(135deg, #ef4444, #f87171); }
.sm-cal-post.info { background: linear-gradient(135deg, #3b82f6, #60a5fa); }
.sm-cal-post.success { background: linear-gradient(135deg, #22c55e, #4ade80); }
.sm-cal-more {
  font-size: 10px;
  color: var(--primary);
  cursor: pointer;
  font-weight: 700;
  text-align: center;
}
.detail-section img {
  max-width: 100%;
  border-radius: 8px;
  border: 1px solid var(--border);
}
.approval-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 16px;
}
.approval-card {
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: var(--transition);
}
.approval-card:hover {
  box-shadow: var(--shadow-md);
}
.approval-card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.approval-card-title {
  font-size: 15px;
  font-weight: 700;
}
.approval-card-body {
  padding: 16px 20px;
  font-size: 13px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.approval-card-body p {
  margin: 0;
}
.approval-history {
  padding: 12px 20px;
  background: #fafbfc;
  border-bottom: 1px solid var(--border);
}
.approval-step {
  display: flex;
  gap: 10px;
  padding: 6px 0;
  font-size: 13px;
}
.approval-step + .approval-step {
  border-top: 1px solid #f1f5f9;
}
.approval-step-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 4px;
  flex-shrink: 0;
}
.approval-step-dot.blue { background: #3b82f6; }
.approval-step-dot.green { background: #22c55e; }
.approval-step-dot.red { background: #ef4444; }
.approval-card-actions {
  padding: 14px 20px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.ik-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}
.ik-badge-pending {
  background: var(--danger);
  color: white;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 10px;
  margin-left: 4px;
  font-weight: 700;
}
.ik-dept-filter {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.ik-dept-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 2px solid var(--border);
  border-radius: 10px;
  background: white;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  color: var(--text);
}
.ik-dept-btn:hover {
  border-color: var(--primary);
}
.ik-dept-btn.active {
  font-weight: 600;
}
.ik-dept-count {
  background: #f1f5f9;
  padding: 1px 7px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
}
.ik-member-photo-wrap {
  position: relative;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}
.ik-member-photo {
  position: absolute;
  inset: 0;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
  z-index: 1;
}
.ik-member-photo-wrap .ik-member-avatar {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 16px;
}
.ik-member-salary-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.ik-salary-tag {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 5px;
  background: #f1f5f9;
  color: var(--text-muted);
  white-space: nowrap;
}
.ik-salary-tag.sgk { background: #ede9fe; color: #7c3aed; }
.ik-salary-tag.meal { background: #fff7ed; color: #ea580c; }
.ik-salary-tag.total { background: #d1fae5; color: #059669; }
.ik-member-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}
.ik-member-card {
  background: white;
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid var(--border);
  display: flex;
  gap: 16px;
  transition: var(--transition);
  cursor: default;
}
.ik-member-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
  border-color: #cbd5e1;
}
.ik-member-avatar {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
}
.ik-member-info {
  flex: 1;
  min-width: 0;
}
.ik-member-name {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 2px;
}
.ik-member-position {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.ik-member-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.ik-dept-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.ik-member-date {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 3px;
}
.ik-member-skills {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.ik-member-status {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}
.ik-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.ik-status-dot.active {
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(34,197,94,0.2);
}
.ik-status-dot.inactive {
  background: #94a3b8;
}
.ik-leave-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.ik-filter-btn {
  padding: 6px 14px;
  border: 2px solid var(--border);
  border-radius: 20px;
  background: white;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 6px;
}
.ik-filter-btn:hover {
  border-color: var(--primary);
}
.ik-filter-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}
.ik-filter-count {
  background: rgba(0,0,0,0.1);
  padding: 1px 7px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
}
.ik-calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.ik-cal-nav {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ik-cal-nav h3 {
  font-size: 18px;
  font-weight: 700;
  min-width: 160px;
  text-align: center;
}
.ik-legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding: 12px 16px;
  background: white;
  border-radius: 10px;
  border: 1px solid var(--border);
}
.ik-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}
.ik-legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}
.ik-legend-dot.blue { background: #3b82f6; }
.ik-legend-dot.danger { background: #ef4444; }
.ik-legend-dot.warning { background: #f59e0b; }
.ik-legend-dot.purple { background: #7c3aed; }
.ik-legend-dot.gray { background: #94a3b8; }
.ik-calendar {
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
}
.ik-cal-dow {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
}
.ik-cal-dow-item {
  padding: 12px 8px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}
.ik-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}
.ik-cal-day {
  min-height: 100px;
  padding: 6px;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  position: relative;
}
.ik-cal-day:nth-child(7n) {
  border-right: none;
}
.ik-cal-day.weekend {
  background: #fafbfc;
}
.ik-cal-day.today-cell {
  background: #eef2ff;
}
.ik-cal-day.empty {
  background: #fafbfc;
}
.ik-cal-day-num {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 4px;
  display: block;
}
.ik-cal-day-num.today {
  background: var(--primary);
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}
.ik-cal-leave {
  font-size: 10px;
  padding: 2px 5px;
  border-radius: 3px;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: white;
  font-weight: 600;
  cursor: default;
}
.ik-cal-leave.blue {
  background: linear-gradient(135deg, #3b82f6, #60a5fa);
}
.ik-cal-leave.danger {
  background: linear-gradient(135deg, #ef4444, #f87171);
}
.ik-cal-leave.warning {
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  color: #78350f;
}
.ik-cal-leave.purple {
  background: linear-gradient(135deg, #7c3aed, #a78bfa);
}
.ik-cal-leave.start {
  border-radius: 3px 0 0 3px;
}
.ik-cal-leave.end {
  border-radius: 0 3px 3px 0;
}
@media (max-width: 768px) {
  .ik-member-grid {
    grid-template-columns: 1fr;
  }
  .ik-cal-grid {
    font-size: 11px;
  }
  .ik-cal-day {
    min-height: 60px;
  }
  .ik-cal-leave {
    font-size: 8px;
  }
}
.crm-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}
.crm-tabs {
  display: flex;
  gap: 4px;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 10px;
}
.crm-tab {
  padding: 8px 18px;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-muted);
  font-family: inherit;
  white-space: nowrap;
}
.crm-tab.active {
  background: white;
  color: var(--primary);
  box-shadow: var(--shadow-sm);
  font-weight: 600;
}
.crm-tab:hover:not(.active) {
  color: var(--text);
  background: rgba(255,255,255,0.5);
}
.crm-actions {
  display: flex;
  gap: 8px;
}
.pipeline-wrapper {
  margin-bottom: 0;
}
.pipeline-scroll {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 12px;
}
.pipeline-column {
  min-width: 280px;
  max-width: 320px;
  flex-shrink: 0;
  background: #f8fafc;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}
.pipeline-col-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.pipeline-col-badge {
  font-size: 13px !important;
  padding: 5px 12px !important;
  border-radius: 6px;
  font-weight: 600;
}
.pipeline-col-count {
  background: #e2e8f0;
  color: var(--text-muted);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}
.pipeline-col-value {
  font-size: 11px;
  color: var(--success);
  font-weight: 700;
  padding: 4px 10px;
  background: #ecfdf5;
  border-radius: 10px;
  margin-top: 4px;
  text-align: center;
}
.pipeline-col-body {
  padding: 10px;
  flex: 1;
  min-height: 100px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: background 0.2s;
  border-radius: 0 0 8px 8px;
}
.pipeline-col-body.drag-over {
  background: var(--primary-light);
  outline: 2px dashed var(--primary);
  outline-offset: -2px;
}
.pipeline-empty {
  text-align: center;
  color: #94a3b8;
  font-size: 12px;
  padding: 24px 8px;
  font-style: italic;
}
.lead-card {
  background: white;
  border-radius: 10px;
  padding: 14px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  cursor: grab;
  transition: var(--transition);
}
.lead-card:active { cursor: grabbing; }
.lead-card.dragging { opacity: 0.4; transform: scale(0.95); }
.lead-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
  border-color: var(--primary);
}
.lead-card-company {
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 6px;
}
.lead-card-contact {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.lead-card-value {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 6px;
}
.lead-card-followup {
  font-size: 11px;
  color: var(--warning);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.lead-card-source {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.badge-sm {
  padding: 2px 7px !important;
  font-size: 10px !important;
  background: #f1f5f9;
  color: var(--text-muted);
}
.badge-xs {
  padding: 1px 5px !important;
  font-size: 9px !important;
}
.modal-overlay {
  display: flex;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}
.modal-overlay.show { display: flex; }
.modal-box {
  background: white;
  border-radius: 14px;
  width: 100%;
  max-width: 620px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 25px 60px rgba(0,0,0,0.3);
  animation: slideUp 0.25s ease;
}
.modal-box.modal-lg {
  max-width: 720px;
}
.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: white;
  z-index: 1;
  border-radius: 14px 14px 0 0;
}
.modal-header.crm-customer-header {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  color: white;
  border-bottom: none;
}
.modal-header.crm-customer-header .modal-close {
  color: white;
}
.modal-header h3 {
  font-size: 17px;
  font-weight: 700;
}
.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px 8px;
  border-radius: 6px;
  transition: var(--transition);
  line-height: 1;
}
.modal-close:hover {
  background: #f1f5f9;
  color: var(--text);
}
.modal-body {
  padding: 24px;
}
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  position: sticky;
  bottom: 0;
  background: white;
  border-radius: 0 0 14px 14px;
}
.btn {
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
  background: #f1f5f9;
  color: var(--text);
  font-family: inherit;
  white-space: nowrap;
}
.btn:hover { background: #e2e8f0; }
.btn-sm {
  padding: 7px 14px;
  font-size: 13px;
}
.btn-primary {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}
.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}
.btn-purple {
  background: #7c3aed;
  color: white;
  border-color: #7c3aed;
}
.btn-purple:hover { background: #6d28d9; border-color: #6d28d9; }
.btn-outline {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}
.btn-success {
  background: var(--success);
  color: white;
  border-color: var(--success);
}
.btn-success:hover { background: #16a34a; }
.btn-danger {
  background: var(--danger);
  color: white;
  border-color: var(--danger);
}
.btn-danger:hover { background: #dc2626; }
.btn-icon {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 6px;
  color: var(--text-muted);
  transition: var(--transition);
  font-size: 14px;
}
.btn-icon:hover { background: #f1f5f9; color: var(--text); }
.btn-icon-sm { padding: 4px 6px; font-size: 13px; }
.modal-body .form-group {
  margin-bottom: 16px;
  flex: 1;
  min-width: 200px;
}
.modal-body .form-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.modal-body .form-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 5px;
}
.modal-body .form-group input,
.modal-body .form-group select,
.modal-body .form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  transition: var(--transition);
  background: #f8fafc;
  font-family: inherit;
}
.modal-body .form-group textarea {
  resize: vertical;
  min-height: 70px;
}
.modal-body .form-group input:focus,
.modal-body .form-group select:focus,
.modal-body .form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
  background: white;
}
.form-control-sm {
  padding: 7px 10px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  background: #f8fafc;
  font-family: inherit;
}
.checkbox-group {
  display: flex;
  gap: 16px;
  padding-top: 6px;
}
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.detail-item {
  margin-bottom: 4px;
}
.detail-item label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 4px;
  font-weight: 600;
}
.detail-item span,
.detail-item p {
  font-size: 14px;
  color: var(--text);
}
.detail-item a {
  color: var(--primary);
  text-decoration: none;
}
.detail-item a:hover { text-decoration: underline; }
.detail-section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.detail-section h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text);
}
.project-mini-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.project-mini-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #f8fafc;
  border-radius: 8px;
  font-size: 14px;
  border: 1px solid var(--border);
}
.todo-progress-wrap {
  width: 100%;
  height: 32px;
  background: #f1f5f9;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
}
.todo-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #4f46e5, #7c3aed);
  border-radius: 16px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 12px;
  min-width: 0;
}
.todo-progress-fill.complete {
  background: linear-gradient(90deg, #22c55e, #4ade80);
}
.todo-progress-text {
  color: white;
  font-size: 13px;
  font-weight: 700;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.todo-progress-fill[style*="width: 1"] .todo-progress-text,
.todo-progress-fill[style*="width: 2"] .todo-progress-text,
.todo-progress-fill[style*="width: 3"] .todo-progress-text,
.todo-progress-fill[style*="width: 4"] .todo-progress-text,
.todo-progress-fill[style*="width: 5"] .todo-progress-text { opacity: 1; }
.todo-progress-fill.complete .todo-progress-text { opacity: 1; }
.todo-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}
.todo-filters {
  display: flex;
  gap: 4px;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 10px;
}
.todo-list {
  display: flex;
  flex-direction: column;
}
.todo-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}
.todo-item:last-child {
  border-bottom: none;
}
.todo-item:hover {
  background: #f8fafc;
}
.todo-item.done {
  background: #fafbfc;
}
.todo-item.done .todo-title {
  text-decoration: line-through;
  color: #94a3b8;
}
.todo-item.overdue {
  border-left: 3px solid var(--danger);
}
.todo-item.just-done {
  animation: todoFlash 0.5s ease;
}
@keyframes todoFlash {
  0% { background: #d1fae5; }
  100% { background: #fafbfc; }
}
.todo-check {
  width: 28px;
  height: 28px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 22px;
  color: #cbd5e1;
  transition: var(--transition);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}
.todo-check:hover {
  color: var(--primary);
  background: var(--primary-light);
}
.todo-check.checked {
  color: var(--success);
}
.todo-check.checked:hover {
  color: #16a34a;
}
.todo-content {
  flex: 1;
  min-width: 0;
}
.todo-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}
.todo-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-muted);
}
.todo-category {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
}
.todo-assignee {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.todo-date {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.todo-date.overdue-text {
  color: var(--danger);
  font-weight: 600;
}
.overdue-badge {
  background: #fce4ec;
  color: #c62828;
  padding: 1px 6px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 700;
  margin-left: 4px;
}
.todo-delete {
  background: none;
  border: none;
  cursor: pointer;
  color: #cbd5e1;
  padding: 6px;
  border-radius: 6px;
  transition: var(--transition);
  font-size: 13px;
  flex-shrink: 0;
}
.todo-delete:hover {
  color: var(--danger);
  background: #fef2f2;
}
.inventory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}
.inv-card {
  background: white;
  border-radius: var(--radius);
  padding: 18px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
}
.inv-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
  border-color: #cbd5e1;
}
.inv-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.inv-cat-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
}
.inv-card-name {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
}
.inv-card-serial {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-family: monospace;
}
.inv-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  padding-top: 10px;
}
@media (max-width: 768px) {
  .inventory-grid { grid-template-columns: 1fr; }
}
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
.gantt-wrap { min-width: 800px; }
.gantt-header, .gantt-row { display: flex; }
.gantt-task-col { width: 220px; padding: 14px 16px; flex-shrink: 0; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.gantt-timeline-col { flex: 1; overflow: hidden; }
.gantt-months { display: flex; }
.gantt-month { padding: 10px 0; text-align: center; font-size: 11px; font-weight: 600; color: var(--text-muted); background: #f8fafc; border-right: 1px solid var(--border); border-bottom: 2px solid var(--border); }
.gantt-body { position: relative; }
.gantt-row { border-bottom: 1px solid var(--border); }
.gantt-row:hover { background: #f8fafc; }
.gantt-row .gantt-task-col { border-bottom: none; }
.gantt-bar-wrap { position: relative; height: 40px; }
.gantt-bar { position: absolute; top: 8px; height: 24px; border-radius: 6px; cursor: pointer; transition: opacity 0.15s; display: flex; align-items: center; min-width: 4px; overflow: hidden; }
.gantt-bar:hover { opacity: 0.85; }
.gantt-bar-fill { position: absolute; top: 0; left: 0; height: 100%; border-radius: 6px; }
.gantt-bar-label { position: relative; z-index: 1; font-size: 10px; color: white; font-weight: 700; padding: 0 6px; white-space: nowrap; }
.task-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.task-cal-weekday { text-align: center; font-size: 11px; font-weight: 700; color: var(--text-muted); padding: 8px 0; text-transform: uppercase; }
.task-cal-cell { min-height: 70px; border-radius: 8px; padding: 6px; border: 1px solid transparent; position: relative; }
.task-cal-cell.empty { background: transparent; }
.task-cal-cell:hover { background: #f8fafc; border-color: var(--border); }
.task-cal-cell.today { background: #eef2ff; border-color: var(--primary); }
.task-cal-day { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.task-cal-dots { display: flex; flex-wrap: wrap; gap: 2px; }
.task-cal-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.task-cal-more { font-size: 9px; color: var(--text-muted); }
.task-cal-cell:hover .task-cal-tooltip { display: block; }
.task-cal-tooltip { display: none; position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); background: #1e293b; color: white; border-radius: 8px; padding: 8px 12px; font-size: 11px; z-index: 10; white-space: nowrap; box-shadow: 0 4px 12px rgba(0,0,0,0.2); }
.milestone-list { display: flex; flex-direction: column; gap: 2px; }
.milestone-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; cursor: pointer; transition: background 0.15s; }
.milestone-item:hover { background: #f8fafc; }
.milestone-item.completed { opacity: 0.6; }
.milestone-item.completed .milestone-title { text-decoration: line-through; }
.milestone-dot { width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all 0.3s; }
.milestone-info { flex: 1; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px; }
.milestone-title { font-size: 13px; font-weight: 600; }
.milestone-date { font-size: 11px; color: var(--text-muted); }
.doc-link-list { display: flex; flex-direction: column; gap: 4px; }
.doc-link-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 8px; background: #f8fafc; border: 1px solid var(--border); text-decoration: none; color: var(--text); font-size: 13px; transition: all 0.15s; }
.doc-link-item:hover { background: #eef2ff; border-color: var(--primary); }
.doc-link-item i:first-child { font-size: 16px; color: var(--primary); }
.time-log-list { margin-top: 8px; }
.time-log-item { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 12px; border-bottom: 1px solid var(--border); }
.time-log-item i { color: var(--text-muted); font-size: 11px; }
.time-log-item strong { color: var(--primary); }
.time-log-item small { color: var(--text-muted); margin-left: auto; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
.search-wrapper { position: relative; display: flex; align-items: center; }
.search-input {
  width: 280px; padding: 9px 14px 9px 38px;
  border: 2px solid var(--border); border-radius: 10px;
  font-size: 13px; background: #f8fafc; transition: all 0.2s;
  font-family: inherit;
}
.search-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); background: white; width: 360px; }
.search-input::placeholder { color: #94a3b8; }
.search-icon { position: absolute; left: 13px; color: #94a3b8; font-size: 13px; pointer-events: none; z-index: 1; }
.search-shortcut {
  position: absolute; right: 10px; font-size: 10px; color: #94a3b8;
  background: #f1f5f9; padding: 2px 6px; border-radius: 4px;
  border: 1px solid var(--border); font-weight: 600; pointer-events: none;
}
.search-input:focus ~ .search-shortcut { display: none; }
.search-results {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  background: white; border-radius: 12px; box-shadow: 0 15px 40px rgba(0,0,0,0.15);
  border: 1px solid var(--border); max-height: 380px; overflow-y: auto;
  z-index: 100; display: none;
}
.search-results.show { display: block; }
.search-result-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px;
  cursor: pointer; border-bottom: 1px solid #f1f5f9; transition: background 0.15s;
}
.search-result-item:hover { background: var(--primary-light); }
.search-result-item:last-child { border-bottom: none; }
.search-result-icon {
  width: 36px; height: 36px; border-radius: 8px; display: flex;
  align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0;
}
.search-result-info { flex: 1; min-width: 0; }
.search-result-title { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-result-sub { font-size: 11px; color: var(--text-muted); }
.search-result-badge {
  font-size: 10px; padding: 2px 8px; border-radius: 20px; font-weight: 600;
  flex-shrink: 0;
}
.search-no-results { padding: 24px; text-align: center; color: var(--text-muted); font-size: 13px; }
.search-no-results i { font-size: 28px; display: block; margin-bottom: 8px; opacity: 0.4; }
