:root { --primary: #3B82F6; --primary-dark: #2563EB; --sidebar-bg: #1E293B; }
* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: #F8FAFC; }
.sidebar { width: 240px; background: var(--sidebar-bg); height: 100vh; position: fixed; left: 0; top: 0; overflow-y: auto; z-index: 50; }
.main-content { margin-left: 240px; min-height: 100vh; }
.nav-link { display: flex; align-items: center; gap: 10px; padding: 10px 20px; color: #94A3B8; text-decoration: none; border-radius: 6px; margin: 2px 8px; font-size: 14px; transition: all 0.2s; cursor: pointer; }
.nav-link:hover { background: rgba(255,255,255,0.1); color: white; }
.nav-link.active { background: #3B82F6; color: white; }
.nav-section { font-size: 11px; color: #64748B; text-transform: uppercase; letter-spacing: 0.1em; padding: 12px 20px 4px; font-weight: 600; }
.card { background: white; border-radius: 10px; border: 1px solid #E2E8F0; padding: 20px; }
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 6px; border: none; cursor: pointer; font-size: 14px; font-weight: 500; transition: all 0.2s; }
.btn-primary { background: #3B82F6; color: white; } .btn-primary:hover { background: #2563EB; }
.btn-secondary { background: white; color: #374151; border: 1px solid #D1D5DB; } .btn-secondary:hover { background: #F9FAFB; }
.btn-danger { background: #EF4444; color: white; } .btn-danger:hover { background: #DC2626; }
.btn-success { background: #10B981; color: white; }
.btn-sm { padding: 5px 10px; font-size: 13px; }
.input { width: 100%; padding: 8px 12px; border: 1px solid #D1D5DB; border-radius: 6px; font-size: 14px; outline: none; transition: border-color 0.2s; }
.input:focus { border-color: #3B82F6; box-shadow: 0 0 0 3px rgba(59,130,246,0.1); }
.select { appearance: none; background: white 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='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E") no-repeat right 10px center; padding-right: 30px; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; padding: 10px 12px; font-size: 12px; font-weight: 600; color: #64748B; text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 1px solid #E2E8F0; }
.table td { padding: 12px; border-bottom: 1px solid #F1F5F9; font-size: 14px; }
.table tr:hover td { background: #F8FAFC; }
.topbar { background: white; border-bottom: 1px solid #E2E8F0; padding: 12px 24px; display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 40; }
.topbar-actions { flex-shrink: 0; }
.stat-card { background: white; border-radius: 10px; border: 1px solid #E2E8F0; padding: 20px; }
.stat-value { font-size: 28px; font-weight: 700; color: #1E293B; }
.stat-label { font-size: 13px; color: #64748B; margin-top: 4px; }
.running-indicator { width: 8px; height: 8px; border-radius: 50%; background: #10B981; animation: pulse 1.5s infinite; flex-shrink: 0; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }
.project-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.progress-bar { height: 6px; background: #E2E8F0; border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 3px; transition: width 0.3s; }
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 1000; display: flex; align-items: center; justify-content: center; }
.modal { background: white; border-radius: 12px; padding: 24px; width: 90%; max-width: 500px; max-height: 90vh; overflow-y: auto; }
.dropdown { position: relative; }
.dropdown-menu { position: absolute; right: 0; top: 100%; background: white; border: 1px solid #E2E8F0; border-radius: 8px; box-shadow: 0 4px 20px rgba(0,0,0,0.1); z-index: 100; min-width: 160px; padding: 4px; }
.dropdown-item { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 4px; cursor: pointer; font-size: 13px; color: #374151; }
.dropdown-item:hover { background: #F1F5F9; }
.time-entry-row { border-bottom: 1px solid #F1F5F9; padding: 12px 16px; display: flex; align-items: center; gap: 12px; transition: background 0.15s; }
.time-entry-row:hover { background: #F8FAFC; }
.sidebar-logo { padding: 20px; border-bottom: 1px solid rgba(255,255,255,0.1); display: flex; align-items: center; gap: 10px; }
.logo-icon { width: 32px; height: 32px; background: #3B82F6; border-radius: 8px; display: flex; align-items: center; justify-content: center; }
@keyframes slideIn { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .sidebar { display: none; }
  .main-content { margin-left: 0 !important; }

  /* Topbar responsive */
  .topbar { padding: 10px 12px; flex-wrap: wrap; gap: 8px; }
  .topbar h1 { font-size: 15px !important; }
  .topbar-actions { width: 100%; }
  .topbar-actions > div { width: 100%; flex-wrap: wrap !important; }
  .topbar-actions input[type="date"] { width: 100% !important; min-width: 0 !important; flex: 1; }
  .topbar-timer span { font-size: 13px !important; }

  /* Cards & padding */
  .card { padding: 14px; border-radius: 8px; }
  .stat-card { padding: 14px; }
  .stat-value { font-size: 22px !important; }
  .stat-label { font-size: 12px; }

  /* Tables responsive */
  .table-responsive-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -14px; padding: 0 14px; }
  .table th, .table td { padding: 8px 6px; font-size: 12px; white-space: nowrap; }

  /* Grid layouts */
  .responsive-grid-2 { grid-template-columns: 1fr !important; }
  .responsive-grid-7 { grid-template-columns: repeat(4, 1fr) !important; }

  /* Time entry row */
  .time-entry-row { padding: 10px 8px; gap: 8px; flex-wrap: wrap; }

  /* Modal */
  .modal { padding: 16px; width: 95%; }

  /* Buttons */
  .btn { padding: 6px 12px; font-size: 13px; }
  .btn-sm { padding: 4px 8px; font-size: 12px; }
}

@media (max-width: 480px) {
  .topbar h1 { font-size: 14px !important; }
  .stat-value { font-size: 18px !important; }
  .table th, .table td { padding: 6px 4px; font-size: 11px; }
  .responsive-grid-7 { grid-template-columns: repeat(3, 1fr) !important; }
}