/* ============================================
   TrackFlow — Layout Styles (Sidebar, TopBar, Pages)
   ============================================ */

/* ---------- App Shell ---------- */
.app-shell {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

.app-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: var(--space-6) var(--space-8);
}

/* ---------- Login Page ---------- */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--bg-primary);
  position: relative;
  overflow: hidden;
}

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

.login-bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.3;
  animation: backgroundFloat 20s ease-in-out infinite;
}

.login-bg-orb:nth-child(1) {
  width: 400px;
  height: 400px;
  background: var(--accent-primary);
  top: -100px;
  right: -100px;
}

.login-bg-orb:nth-child(2) {
  width: 300px;
  height: 300px;
  background: var(--accent-secondary);
  bottom: -80px;
  left: -80px;
  animation-delay: -7s;
}

.login-bg-orb:nth-child(3) {
  width: 200px;
  height: 200px;
  background: #8b5cf6;
  top: 50%;
  left: 50%;
  animation-delay: -14s;
}

.login-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  padding: var(--space-10);
  background: var(--glass-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-2xl);
  box-shadow: var(--glass-shadow);
  animation: scaleIn var(--transition-slow);
}

.login-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-8);
  justify-content: center;
}

.login-logo-icon {
  width: 44px;
  height: 44px;
  background: var(--accent-gradient);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.login-logo h1 {
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
}

.login-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: var(--text-sm);
  margin-bottom: var(--space-8);
}

/* ---- Login Form ---- */
.login-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.login-input-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.login-label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-secondary);
}

.login-input {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  color: var(--text-primary);
  transition: all var(--transition-fast);
  outline: none;
  font-family: inherit;
}

.login-input::placeholder {
  color: var(--text-tertiary);
}

.login-input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
  background: var(--bg-secondary);
}

.login-input:hover:not(:focus) {
  border-color: var(--border-secondary, var(--text-tertiary));
}

/* Password field wrapper */
.login-password-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.login-password-wrap .login-input {
  padding-right: 44px;
}

.login-password-toggle {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  color: var(--text-tertiary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.login-password-toggle:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

/* Remember me checkbox */
.login-remember {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}

.login-remember input[type="checkbox"] {
  display: none;
}

.login-checkbox-custom {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-primary);
  border-radius: var(--radius-sm);
  position: relative;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.login-remember input[type="checkbox"]:checked + .login-checkbox-custom {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
}

.login-remember input[type="checkbox"]:checked + .login-checkbox-custom::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 6px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Submit button */
.login-submit {
  width: 100%;
  margin-top: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  justify-content: center;
  gap: var(--space-2);
  letter-spacing: 0.01em;
}

.login-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none !important;
}

/* Loading spinner */
.login-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: loginSpin 0.6s linear infinite;
}

@keyframes loginSpin {
  to { transform: rotate(360deg); }
}

/* Error message */
.login-error {
  text-align: center;
  font-size: var(--text-sm);
  color: var(--danger);
  padding: var(--space-2) var(--space-3);
  background: rgba(239, 68, 68, 0.1);
  border-radius: var(--radius-md);
}

/* ---------- Sidebar ---------- */
.sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-primary);
  display: flex;
  flex-direction: column;
  transition: width var(--transition-base);
  flex-shrink: 0;
  overflow: hidden;
  z-index: var(--z-sticky);
}

.sidebar.collapsed {
  width: var(--sidebar-collapsed-width);
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  height: var(--topbar-height);
  border-bottom: 1px solid var(--border-secondary);
  flex-shrink: 0;
}

.sidebar-logo {
  width: 32px;
  height: 32px;
  background: var(--accent-gradient);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 16px;
  font-weight: var(--weight-bold);
  flex-shrink: 0;
}

.sidebar-brand {
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  white-space: nowrap;
  overflow: hidden;
}

.sidebar.collapsed .sidebar-brand,
.sidebar.collapsed .nav-label,
.sidebar.collapsed .nav-section-title,
.sidebar.collapsed .sidebar-mini-timer-details,
.sidebar.collapsed .sidebar-collapse-text {
  display: none;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-3);
}

.nav-section {
  margin-bottom: var(--space-4);
}

.nav-section-title {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: var(--space-2) var(--space-3);
  margin-bottom: var(--space-1);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  transition: all var(--transition-fast);
  cursor: pointer;
  white-space: nowrap;
  margin-bottom: 2px;
  position: relative;
}

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

.nav-item.active {
  background: var(--accent-subtle);
  color: var(--accent-primary);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: -12px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 20px;
  background: var(--accent-primary);
  border-radius: 0 var(--radius-full) var(--radius-full) 0;
}

.nav-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-badge {
  margin-left: auto;
  background: var(--danger);
  color: white;
  font-size: 10px;
  font-weight: var(--weight-bold);
  padding: 1px 6px;
  border-radius: var(--radius-full);
  min-width: 18px;
  text-align: center;
}

/* Sidebar Mini Timer */
.sidebar-mini-timer {
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--border-secondary);
  flex-shrink: 0;
}

.sidebar-mini-timer-inner {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.sidebar-mini-timer-inner:hover {
  background: rgba(34, 197, 94, 0.15);
}

.sidebar-mini-timer-dot {
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
  animation: pulse 1.5s ease-in-out infinite;
  flex-shrink: 0;
}

.sidebar-mini-timer-details {
  flex: 1;
  min-width: 0;
}

.sidebar-mini-timer-time {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  font-family: var(--font-mono);
  color: var(--success);
}

.sidebar-mini-timer-task {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Sidebar collapse button */
.sidebar-footer {
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--border-secondary);
  flex-shrink: 0;
}

.sidebar-collapse-btn {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  color: var(--text-tertiary);
  font-size: var(--text-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

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

/* ---------- TopBar ---------- */
.topbar {
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: 0 var(--space-6);
  border-bottom: 1px solid var(--border-primary);
  background: var(--bg-secondary);
  flex-shrink: 0;
}

.mobile-menu-btn {
  display: none;
}

.topbar-breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--text-tertiary);
}

.topbar-breadcrumb span {
  color: var(--text-primary);
  font-weight: var(--weight-medium);
}

.topbar-spacer {
  flex: 1;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.topbar-search {
  position: relative;
  width: 240px;
}

.topbar-search .input {
  padding-left: 36px;
  background: var(--bg-tertiary);
}

.topbar-search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  pointer-events: none;
}

.topbar-kbd {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 2px 5px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-sm);
  color: var(--text-tertiary);
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

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

.topbar-user-name {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
}

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

/* ---------- Page Header ---------- */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-6);
  flex-wrap: wrap;
  gap: var(--space-4);
}

.page-header h1 {
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
}

.page-header p {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-top: var(--space-1);
}

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

/* ---------- Dashboard ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-3);
  font-size: 20px;
}

.stat-icon.indigo { background: var(--accent-subtle); color: var(--accent-primary); }
.stat-icon.cyan { background: rgba(6, 182, 212, 0.1); color: var(--accent-secondary); }
.stat-icon.green { background: var(--success-bg); color: var(--success); }
.stat-icon.amber { background: var(--warning-bg); color: var(--warning); }
.stat-icon.red { background: var(--danger-bg); color: var(--danger); }
.stat-icon.purple { background: rgba(139, 92, 246, 0.1); color: #8b5cf6; }

.stat-value {
  font-size: var(--text-3xl);
  font-weight: var(--weight-bold);
  line-height: 1;
  margin-bottom: var(--space-1);
  animation: countUp var(--transition-base) both;
}

.stat-label {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.stat-change {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  margin-top: var(--space-2);
  padding: 2px var(--space-2);
  border-radius: var(--radius-full);
}

.stat-change.up {
  color: var(--success);
  background: var(--success-bg);
}

.stat-change.down {
  color: var(--danger);
  background: var(--danger-bg);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--space-6);
}

.dashboard-grid-equal {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
}

.chart-container {
  height: 280px;
  position: relative;
}

.chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
}

.chart-header h3 {
  font-size: var(--text-md);
  font-weight: var(--weight-semibold);
}

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

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  transition: background var(--transition-fast);
}

.activity-item:hover {
  background: var(--bg-hover);
}

.activity-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 6px;
  flex-shrink: 0;
}

.activity-content {
  flex: 1;
  min-width: 0;
}

.activity-text {
  font-size: var(--text-sm);
  color: var(--text-primary);
}

.activity-time {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  margin-top: 2px;
}

/* ---------- Timer Page ---------- */
.timer-page {
  max-width: 800px;
  margin: 0 auto;
}

.timer-display {
  text-align: center;
  padding: var(--space-12) 0;
}

.timer-clock {
  font-family: var(--font-mono);
  font-size: var(--text-5xl);
  font-weight: var(--weight-bold);
  letter-spacing: 2px;
  margin-bottom: var(--space-6);
  color: var(--text-primary);
}

.timer-clock.running {
  color: var(--success);
}

.timer-clock.paused {
  color: var(--warning);
  animation: pulse 1.5s ease-in-out infinite;
}

.timer-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
}

.timer-btn {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  transition: all var(--transition-fast);
  border: 2px solid transparent;
}

.timer-btn-start {
  background: var(--success);
  color: white;
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}
.timer-btn-start:hover {
  box-shadow: 0 6px 20px rgba(34, 197, 94, 0.4);
  transform: scale(1.05);
}

.timer-btn-pause {
  background: var(--warning);
  color: white;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.timer-btn-stop {
  background: var(--danger);
  color: white;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.timer-btn-stop:hover {
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
  transform: scale(1.05);
}

.timer-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  margin-top: var(--space-6);
}

.timer-meta-full {
  grid-column: 1 / -1;
}

/* ---------- Timesheet Grid ---------- */
.timesheet-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
  gap: var(--space-3);
}

.week-navigator {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.week-navigator-label {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  min-width: 180px;
  text-align: center;
}

.timesheet-status {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.timesheet-grid {
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--bg-elevated);
}

.timesheet-grid table {
  table-layout: fixed;
}

.timesheet-grid th {
  padding: var(--space-3) var(--space-2);
  text-align: center;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-primary);
}

.timesheet-grid th.today {
  color: var(--accent-primary);
  background: var(--accent-subtle);
}

.timesheet-grid td {
  padding: 0;
  border-bottom: 1px solid var(--border-secondary);
  border-right: 1px solid var(--border-secondary);
  vertical-align: middle;
}

.timesheet-grid td:last-child {
  border-right: none;
}

.timesheet-grid tr:last-child td {
  border-bottom: none;
}

.timesheet-project-cell {
  padding: var(--space-2) var(--space-3) !important;
  min-width: 200px;
  background: var(--bg-tertiary);
}

.timesheet-project-name {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-primary);
  margin-bottom: 2px;
}

.timesheet-task-name {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
}

.timesheet-cell {
  width: 100%;
  height: 44px;
  border: none;
  background: transparent;
  text-align: center;
  font-size: var(--text-sm);
  font-family: var(--font-mono);
  color: var(--text-primary);
  padding: var(--space-2);
  transition: background var(--transition-fast);
}

.timesheet-cell:hover {
  background: var(--bg-hover);
}

.timesheet-cell:focus {
  background: var(--accent-subtle);
  outline: 2px solid var(--accent-primary);
  outline-offset: -2px;
}

.timesheet-cell.has-value {
  font-weight: var(--weight-semibold);
}

.timesheet-cell.warning {
  background: var(--warning-bg) !important;
  color: var(--warning);
}

.timesheet-cell.error {
  background: var(--danger-bg) !important;
  color: var(--danger);
}

.timesheet-total-cell {
  padding: var(--space-2) var(--space-3) !important;
  text-align: center;
  font-weight: var(--weight-bold);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  background: var(--bg-tertiary);
}

.timesheet-total-row td {
  background: var(--bg-tertiary) !important;
  font-weight: var(--weight-bold);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  text-align: center;
  padding: var(--space-3) var(--space-2) !important;
}

.timesheet-actions-cell {
  width: 50px;
  text-align: center;
  padding: var(--space-2) !important;
}

.timesheet-add-row {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3);
  border-top: 1px dashed var(--border-primary);
  cursor: pointer;
  color: var(--text-tertiary);
  font-size: var(--text-sm);
  transition: all var(--transition-fast);
}

.timesheet-add-row:hover {
  background: var(--bg-hover);
  color: var(--accent-primary);
}

/* ---------- Project Cards ---------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: var(--space-4);
}

.project-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
  transition: all var(--transition-base);
  cursor: pointer;
}

.project-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.project-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: var(--space-4);
}

.project-card-title {
  font-size: var(--text-md);
  font-weight: var(--weight-semibold);
  margin-bottom: var(--space-1);
}

.project-card-client {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
}

.project-card-meta {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-top: var(--space-4);
  font-size: var(--text-xs);
  color: var(--text-secondary);
}

.project-card-meta-item {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.project-capacity {
  margin-top: var(--space-4);
}

.project-capacity-label {
  display: flex;
  justify-content: space-between;
  font-size: var(--text-xs);
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
}



/* ---------- Reports ---------- */
.report-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--bg-elevated);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-xl);
  margin-bottom: var(--space-6);
}

.report-filter-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  min-width: 130px;
  flex: 1;
}

.report-filter-actions {
  display: flex;
  align-items: flex-end;
  gap: var(--space-2);
  margin-left: auto;
  padding-top: var(--space-1);
}

.report-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-12) var(--space-6);
  text-align: center;
  background: var(--bg-elevated);
  border: 1px dashed var(--border-secondary);
  border-radius: var(--radius-xl);
  margin-bottom: var(--space-6);
}

.report-empty-state .report-empty-icon {
  color: var(--text-tertiary);
  margin-bottom: var(--space-4);
  opacity: 0.5;
}

.report-empty-state h3 {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.report-empty-state p {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  max-width: 400px;
  line-height: 1.6;
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.report-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

/* ---------- Settings ---------- */
.settings-section {
  background: var(--bg-elevated);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  margin-bottom: var(--space-4);
}

.settings-section h3 {
  font-size: var(--text-md);
  font-weight: var(--weight-semibold);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--border-secondary);
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) 0;
}

.settings-row + .settings-row {
  border-top: 1px solid var(--border-secondary);
}

.settings-row-label h4 {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  margin-bottom: 2px;
}

.settings-row-label p {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
}

/* Theme Toggle Switch */
.toggle-switch {
  position: relative;
  width: 48px;
  height: 26px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.toggle-switch.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
}

.toggle-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  transition: transform var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.toggle-switch.active::after {
  transform: translateX(22px);
}

/* Keyboard Shortcut Display */
.shortcut-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}

.shortcut-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-2) var(--space-3);
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
}

.shortcut-keys {
  display: flex;
  gap: var(--space-1);
}

.kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 6px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-secondary);
  min-width: 24px;
  box-shadow: 0 1px 0 var(--border-primary);
}

/* ---------- Audit Log ---------- */
.audit-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.audit-icon.create { background: var(--success-bg); color: var(--success); }
.audit-icon.update { background: var(--info-bg); color: var(--info); }
.audit-icon.delete { background: var(--danger-bg); color: var(--danger); }


.audit-icon.login { background: var(--accent-subtle); color: var(--accent-primary); }

/* ---------- Responsive Adjustments ---------- */
@media (max-width: 768px) {
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .dashboard-grid,
  .dashboard-grid-equal {
    grid-template-columns: 1fr;
  }
  
  .timer-clock {
    font-size: var(--text-4xl);
  }
  
  .timesheet-grid {
    overflow-x: auto;
  }
  
  .projects-grid {
    grid-template-columns: 1fr;
  }
  
  .report-summary {
    grid-template-columns: 1fr;
  }
  
  .shortcut-grid {
    grid-template-columns: 1fr;
  }
  
  .sidebar {
    position: fixed;
    left: -260px;
    transition: left var(--transition-base);
    z-index: 200;
  }
  
  .sidebar.mobile-open {
    left: 0;
    box-shadow: 4px 0 24px rgba(0,0,0,0.5);
  }
  
  .mobile-menu-btn {
    display: flex;
  }
  
  .app-content {
    padding: var(--space-4);
  }
  
  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 1200px) {
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ---------- Timesheet List View Redesign ---------- */
.timesheet-quick-add {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  background: var(--bg-surface);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--space-6);
  border: 1px solid var(--border-color);
}

.qa-input {
  flex: 1;
  border: none;
  border-bottom: 1px solid transparent;
  padding: var(--space-2);
  font-size: var(--text-sm);
  outline: none;
  background: transparent;
  color: var(--text-primary);
  transition: border-color 0.2s;
}

.qa-input:focus {
  border-bottom-color: var(--accent-primary);
}

.qa-select, .qa-date, .qa-hours {
  border: 1px solid var(--border-primary);
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  font-size: var(--text-sm);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  outline: none;
  transition: all var(--transition-fast);
  color-scheme: var(--form-color-scheme, dark);
}

.qa-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b6b80' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  padding-right: 32px;
}

.qa-select:focus, .qa-date:focus, .qa-hours:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-subtle);
  background-color: var(--bg-secondary);
}

.qa-icons {
  display: flex;
  gap: var(--space-2);
  color: var(--text-tertiary);
  align-items: center;
}

.qa-btn {
  padding: var(--space-2) var(--space-6);
  font-weight: var(--weight-semibold);
  border-radius: var(--radius-sm);
  background: #0ea5e9; /* Light blue accent */
  border: none;
  color: white;
  cursor: pointer;
  height: 36px;
}

.qa-btn:hover {
  background: #0284c7;
}

.timesheet-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-4);
  padding: 0 var(--space-2);
}

.tl-week-total span {
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  color: var(--text-primary);
  margin-left: var(--space-2);
}

.timesheet-day-group {
  margin-bottom: var(--space-6);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-surface);
  box-shadow: var(--shadow-sm);
}

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

.td-title {
  font-weight: var(--weight-medium);
  color: var(--text-secondary);
  font-size: var(--text-sm);
}

.td-total {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.td-total span {
  font-weight: var(--weight-bold);
  color: var(--text-primary);
  margin-left: var(--space-2);
}

.td-row {
  display: flex;
  align-items: center;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border-color);
}

.td-row:last-child {
  border-bottom: none;
}

.td-desc {
  flex: 1;
  font-size: var(--text-sm);
  color: var(--text-primary);
}

.td-project {
  display: flex;
  align-items: center;
  font-size: var(--text-sm);
  color: #0ea5e9; /* Match screenshot project color */
  width: 250px;
}

.td-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-right: var(--space-2);
}

.td-icons {
  display: flex;
  gap: var(--space-4);
  width: 80px;
  justify-content: center;
  color: var(--text-tertiary);
}

.td-duration {
  font-size: var(--text-md);
  font-weight: var(--weight-bold);
  width: 100px;
  text-align: right;
  padding-right: var(--space-6);
  color: var(--text-primary);
}

.td-actions {
  display: flex;
  gap: var(--space-2);
  opacity: 0;
  transition: opacity 0.2s;
  width: 100px;
}

.td-row:hover .td-actions {
  opacity: 1;
}

.td-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-tertiary);
  padding: var(--space-1);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

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