/* ===== ROOT ===== */
:root {
  --bg-primary: #f1f5f9;
  --bg-card: #ffffff;
  --bg-sidebar: #0f172a;
  --text-primary: #0f172a;
  --text-secondary: #64748b;
  --text-white: #f8fafc;
  --border-color: #e2e8f0;
  --shadow: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-hover: 0 10px 40px rgba(0,0,0,0.08);
  --gradient-start: #1a73e8;
  --gradient-end: #0d47a1;
  --radius: 12px;
  --sidebar-width: 250px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.dark-mode {
  --bg-primary: #0f172a;
  --bg-card: #1e293b;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --border-color: #334155;
  --shadow: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-hover: 0 10px 40px rgba(0,0,0,0.5);
  --gradient-start: #3b82f6;
  --gradient-end: #1d4ed8;
}

/* ===== RESET ===== */
* { margin:0; padding:0; box-sizing:border-box; }
body {
  font-family: 'Inter', 'Segoe UI', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  display: flex;
  min-height: 100vh;
  transition: var(--transition);
}

/* ===== SIDEBAR ===== */
/* ===== SIDEBAR ===== */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  color: var(--text-white);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: var(--transition);
  overflow-y: auto;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 24px;
}

.brand-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex-shrink: 0;
}

.sidebar-brand span {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}
}
.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  position: relative;
}
.nav-item:hover { background: rgba(255,255,255,0.06); color: white; }
.nav-item.active {
  background: rgba(255,255,255,0.1);
  color: white;
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 8px; bottom: 8px;
  width: 3px;
  background: var(--gradient-start);
  border-radius: 0 4px 4px 0;
}
.nav-icon { font-size: 1.1rem; width: 24px; text-align: center; }
.sidebar-footer {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 16px;
  margin-top: auto;
}
.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
}
.user-avatar { font-size: 1.5rem; }
.user-name { font-weight: 600; font-size: 0.9rem; }
.user-role { font-size: 0.75rem; color: rgba(255,255,255,0.5); }

/* ===== MAIN ===== */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  padding: 24px 32px 40px;
  min-height: 100vh;
}

/* ===== TOP HEADER ===== */
.top-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}
.header-left h1 { font-size: 1.8rem; font-weight: 700; letter-spacing: -0.5px; }
.header-left p { color: var(--text-secondary); font-size: 0.95rem; margin-top: 2px; }
.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}
.dark-toggle {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  width: 40px; height: 40px;
  font-size: 1.2rem;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow);
}
.dark-toggle:hover { transform: scale(1.05); }

/* ===== STATISTIK ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.stat-icon {
  font-size: 2rem;
  width: 48px; height: 48px;
  background: rgba(26, 115, 232, 0.1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.stat-number { font-size: 1.6rem; font-weight: 700; line-height: 1.2; }
.stat-label { font-size: 0.8rem; color: var(--text-secondary); }

/* ===== FILTER BAR ===== */
.filter-bar {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 16px 20px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow);
  margin-bottom: 28px;
}
.filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.filter-actions input,
.filter-actions select {
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-family: inherit;
  outline: none;
  transition: var(--transition);
  flex: 1;
  min-width: 150px;
}
.filter-actions input:focus,
.filter-actions select:focus {
  border-color: var(--gradient-start);
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.15);
}

/* ===== PROJECT SECTION ===== */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.section-header h2 { font-size: 1.2rem; font-weight: 600; }
.section-header span { color: var(--text-secondary); font-size: 0.85rem; }
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

/* ===== PROJECT CARD ===== */
.project-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow);
  transition: var(--transition);
  animation: fadeInUp 0.5s ease forwards;
  opacity: 0;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.project-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }

/* ===== SLIDER ===== */
.slider-container {
  position: relative;
  width: 100%;
  height: 240px;
  overflow: hidden;
  background: var(--bg-primary);
}
.slider-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
}
.slide {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.slide.active { opacity: 1; }
.slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--bg-primary);
  padding: 4px;
}
.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.5);
  color: white;
  border: none;
  padding: 8px 12px;
  cursor: pointer;
  border-radius: 50%;
  font-size: 1rem;
  transition: var(--transition);
  z-index: 10;
}
.slider-btn:hover { background: rgba(0,0,0,0.8); }
.slider-btn.prev { left: 6px; }
.slider-btn.next { right: 6px; }
.slider-dots {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 10;
}
.dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: var(--transition);
}
.dot.active { background: white; }

/* ===== CARD CONTENT ===== */
.card-content { padding: 18px 20px 20px; }
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.category {
  background: rgba(26, 115, 232, 0.1);
  color: var(--gradient-start);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 12px;
  border-radius: 20px;
}
.dark-mode .category {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
}
.status {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 20px;
}
.status-live { background: #d4edda; color: #155724; }
.status-dev { background: #fff3cd; color: #856404; }
.dark-mode .status-live { background: #1a3a2a; color: #7ee8a5; }
.dark-mode .status-dev { background: #3a351a; color: #f5d98a; }
.card-content h2 { font-size: 1.05rem; font-weight: 600; margin-bottom: 6px; }
.card-content p {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.5;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 10px;
}
.tech-tags span {
  background: var(--bg-primary);
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 0.65rem;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}
.project-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
}
.card-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.btn-demo {
  flex: 1;
  background: var(--gradient-start);
  color: white;
  padding: 8px 14px;
  border: none;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  text-align: center;
  font-size: 0.8rem;
  transition: var(--transition);
  cursor: pointer;
}
.btn-demo:hover { background: var(--gradient-end); transform: scale(1.02); }
.btn-detail, .btn-share {
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.8rem;
}
.btn-detail:hover, .btn-share:hover { background: var(--border-color); }

/* ===== PAGINATION ===== */
.pagination-container {
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.page-btn {
  padding: 6px 14px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--bg-card);
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition);
  font-weight: 500;
  font-size: 0.85rem;
}
.page-btn:hover:not(:disabled) { background: var(--gradient-start); color: white; }
.page-btn.active { background: var(--gradient-start); color: white; border-color: var(--gradient-start); }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ===== MODAL ===== */
.modal {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  padding: 20px;
}
.modal-content {
  background: var(--bg-card);
  border-radius: var(--radius);
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 28px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  animation: fadeIn 0.3s ease;
}
@keyframes fadeIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
.modal-close {
  float: right;
  font-size: 1.8rem;
  cursor: pointer;
  color: var(--text-secondary);
  transition: var(--transition);
  line-height: 1;
}
.modal-close:hover { color: var(--text-primary); transform: rotate(90deg); }
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}
.modal-header h2 { font-size: 1.4rem; }
.modal-section { margin-bottom: 16px; }
.modal-section h3 { font-size: 0.95rem; margin-bottom: 4px; color: var(--text-secondary); }
.modal-section p { line-height: 1.6; }
.feature-list {
  list-style: none;
  padding: 0;
}
.feature-list li {
  padding: 4px 0;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9rem;
}
.modal-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.btn-share-modal, .btn-close-modal {
  padding: 8px 18px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--bg-primary);
  color: var(--text-primary);
  cursor: pointer;
  font-weight: 500;
  transition: var(--transition);
  font-size: 0.85rem;
}
.btn-share-modal:hover, .btn-close-modal:hover { background: var(--border-color); }

/* ===== EMPTY STATE ===== */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 20px;
}
.empty-icon { font-size: 3rem; margin-bottom: 8px; }
.empty-state h2 { font-size: 1.3rem; margin-bottom: 4px; }
.empty-state p { color: var(--text-secondary); margin-bottom: 12px; }
.btn-reset {
  padding: 10px 28px;
  background: var(--gradient-start);
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.btn-reset:hover { background: var(--gradient-end); }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .project-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
}
@media (max-width: 768px) {
  .sidebar { width: 70px; padding: 16px 8px; }
  .sidebar-brand span, .nav-item span:not(.nav-icon), .user-info > div, .sidebar-footer .user-info { display: none; }
  .sidebar-brand { justify-content: center; padding: 0 0 16px; }
  .nav-item { justify-content: center; padding: 10px; }
  .main-content { margin-left: 70px; padding: 16px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .filter-actions { flex-direction: column; }
  .project-grid { grid-template-columns: 1fr; }
  .slider-container { height: 200px; }
  .top-header { flex-direction: column; gap: 12px; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-card { padding: 14px 16px; }
  .stat-number { font-size: 1.2rem; }
  .header-left h1 { font-size: 1.4rem; }
}
