/* TechPanda Jira-Style Sales & Marketing Task Management System */
/* Design Tokens & Theme Variables */

:root {
  --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  
  /* Light Theme */
  --bg-body: #f4f5f7;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #fafbfc;
  --bg-subtle: #ebecf0;
  --bg-sidebar: #0747a6;
  --bg-sidebar-hover: #0052cc;
  --bg-sidebar-active: #091e42;
  --sidebar-text: #deebff;
  --sidebar-text-muted: #b3d4ff;
  --sidebar-active-text: #ffffff;
  
  --border-color: #dfe1e6;
  --border-subtle: #ebecf0;
  --border-focus: #4c9aff;
  
  --text-primary: #172b4d;
  --text-secondary: #42526e;
  --text-muted: #6b778c;
  --text-inverse: #ffffff;
  
  /* Brand Colors */
  --brand-primary: #0052cc;
  --brand-primary-hover: #0747a6;
  --brand-primary-subtle: #deebff;
  --brand-accent: #ff5630;
  
  /* Status Colors */
  --status-assigned-bg: #dfe1e6;
  --status-assigned-text: #42526e;
  --status-assigned-border: #c1c7d0;
  
  --status-progress-bg: #deebff;
  --status-progress-text: #0747a6;
  --status-progress-border: #4c9aff;
  
  --status-paused-bg: #fffae6;
  --status-paused-text: #ff8b00;
  --status-paused-border: #ffe380;
  
  --status-completed-bg: #e3fcef;
  --status-completed-text: #006644;
  --status-completed-border: #57d9a3;
  
  --status-cancelled-bg: #ffebe6;
  --status-cancelled-text: #bf2600;
  --status-cancelled-border: #ff8f73;

  /* Priority Colors */
  --prio-low-bg: #e3fcef;
  --prio-low-text: #006644;
  --prio-medium-bg: #deebff;
  --prio-medium-text: #0747a6;
  --prio-high-bg: #fffae6;
  --prio-high-text: #ff8b00;
  --prio-urgent-bg: #ffebe6;
  --prio-urgent-text: #bf2600;

  --shadow-sm: 0 1px 2px rgba(9, 30, 66, 0.08);
  --shadow-md: 0 4px 8px -2px rgba(9, 30, 66, 0.12), 0 0 1px rgba(9, 30, 66, 0.2);
  --shadow-lg: 0 12px 24px -4px rgba(9, 30, 66, 0.15), 0 0 1px rgba(9, 30, 66, 0.3);
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 10px;
  --radius-full: 9999px;
  
  --header-height: 60px;
  --sidebar-width: 250px;
}

[data-theme="dark"] {
  --bg-body: #0d1117;
  --bg-surface: #161b22;
  --bg-card: #161b22;
  --bg-card-hover: #1f242c;
  --bg-subtle: #21262d;
  --bg-sidebar: #090d16;
  --bg-sidebar-hover: #1f293d;
  --bg-sidebar-active: #2b3952;
  --sidebar-text: #c9d1d9;
  --sidebar-text-muted: #8b949e;
  --sidebar-active-text: #58a6ff;
  
  --border-color: #30363d;
  --border-subtle: #21262d;
  --border-focus: #58a6ff;
  
  --text-primary: #f0f6fc;
  --text-secondary: #c9d1d9;
  --text-muted: #8b949e;
  --text-inverse: #0d1117;
  
  --brand-primary: #388bfd;
  --brand-primary-hover: #58a6ff;
  --brand-primary-subtle: #1f293d;
  
  --status-assigned-bg: #21262d;
  --status-assigned-text: #8b949e;
  --status-assigned-border: #30363d;
  
  --status-progress-bg: #11274c;
  --status-progress-text: #58a6ff;
  --status-progress-border: #1f4277;
  
  --status-paused-bg: #342700;
  --status-paused-text: #e3b341;
  --status-paused-border: #5b4300;
  
  --status-completed-bg: #0d311e;
  --status-completed-text: #3fb950;
  --status-completed-border: #1a5c37;
  
  --status-cancelled-bg: #3d1418;
  --status-cancelled-text: #f85149;
  --status-cancelled-border: #671f26;

  --prio-low-bg: #0d311e;
  --prio-low-text: #3fb950;
  --prio-medium-bg: #11274c;
  --prio-medium-text: #58a6ff;
  --prio-high-bg: #342700;
  --prio-high-text: #e3b341;
  --prio-urgent-bg: #3d1418;
  --prio-urgent-text: #f85149;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.6);
}

/* Reset & Global */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.5;
  font-size: 14px;
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden;
  transition: background-color 0.2s ease, color 0.2s ease;
}

a {
  color: var(--brand-primary);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* Layout Framework */
.app-container {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background-color: var(--bg-sidebar);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 100;
  transition: transform 0.25s ease;
}

.sidebar-header {
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #ffffff;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.3px;
}

.brand-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #0052cc, #2684ff);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.sidebar-role-badge {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-weight: 600;
}

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

.nav-section-title {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--sidebar-text-muted);
  font-weight: 700;
  letter-spacing: 0.8px;
  padding: 12px 10px 4px 10px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  color: var(--sidebar-text);
  border-radius: var(--radius-md);
  font-weight: 500;
  font-size: 13.5px;
  text-decoration: none;
  transition: all 0.15s ease;
}

.nav-link:hover {
  background-color: var(--bg-sidebar-hover);
  color: #ffffff;
  text-decoration: none;
}

.nav-link.active {
  background-color: var(--bg-sidebar-active);
  color: var(--sidebar-active-text);
  font-weight: 600;
}

.nav-badge {
  margin-left: auto;
  font-size: 11px;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 1px 7px;
  border-radius: var(--radius-full);
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  font-size: 14px;
}

.user-info {
  flex-grow: 1;
  overflow: hidden;
}

.user-name {
  font-weight: 600;
  color: #fff;
  font-size: 13px;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

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

/* Main Content Area */
.main-wrapper {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: calc(100% - var(--sidebar-width));
}

/* Header */
.top-header {
  height: var(--header-height);
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 90;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 20px;
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
}

.header-title-block h1 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Header Action Controls */
.theme-toggle-btn {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}
.theme-toggle-btn:hover {
  background: var(--border-color);
}

.header-notifications {
  position: relative;
}

.notif-bell-btn {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: all 0.15s ease;
}
.notif-bell-btn:hover {
  background: var(--border-color);
}

.notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--brand-accent);
  color: white;
  font-size: 10px;
  font-weight: bold;
  padding: 1px 5px;
  border-radius: var(--radius-full);
  min-width: 16px;
  text-align: center;
}

/* Notifications Dropdown */
.notif-dropdown {
  position: absolute;
  top: 45px;
  right: 0;
  width: 340px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  display: none;
  overflow: hidden;
}

.notif-dropdown.show {
  display: block;
}

.notif-header {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-subtle);
}

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

.notif-mark-read-btn {
  font-size: 12px;
  color: var(--brand-primary);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.notif-mark-read-btn:hover {
  text-decoration: underline;
}

.notif-list {
  max-height: 360px;
  overflow-y: auto;
}

.notif-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: background-color 0.15s ease;
  text-decoration: none;
  color: var(--text-primary);
}
.notif-item:hover {
  background-color: var(--bg-subtle);
  text-decoration: none;
}
.notif-item.unread {
  background-color: rgba(0, 82, 204, 0.05);
  border-left: 3px solid var(--brand-primary);
}

.notif-item-title {
  font-weight: 600;
  font-size: 13px;
}
.notif-item-msg {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}
.notif-item-time {
  font-size: 11px;
  color: var(--text-muted);
}

.notif-footer {
  padding: 10px 16px;
  text-align: center;
  background: var(--bg-subtle);
  border-top: 1px solid var(--border-color);
}
.notif-footer a {
  font-size: 12px;
  font-weight: 600;
}

/* Page Content */
.content-body {
  padding: 24px;
  flex-grow: 1;
  width: 100%;
}

/* Alerts and Messages */
.messages-container {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.alert {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid transparent;
}
.alert-success {
  background-color: var(--status-completed-bg);
  color: var(--status-completed-text);
  border-color: var(--status-completed-border);
}
.alert-error, .alert-danger {
  background-color: var(--status-cancelled-bg);
  color: var(--status-cancelled-text);
  border-color: var(--status-cancelled-border);
}
.alert-warning {
  background-color: var(--status-paused-bg);
  color: var(--status-paused-text);
  border-color: var(--status-paused-border);
}
.alert-info {
  background-color: var(--status-progress-bg);
  color: var(--status-progress-text);
  border-color: var(--status-progress-border);
}

.alert-close {
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  color: inherit;
  opacity: 0.7;
}
.alert-close:hover {
  opacity: 1;
}

/* Dashboard Cards Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.stat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.stat-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.1;
}

.stat-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
}

/* Jira Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  letter-spacing: 0.4px;
  white-space: nowrap;
}

.badge-assigned {
  background: var(--status-assigned-bg);
  color: var(--status-assigned-text);
  border: 1px solid var(--status-assigned-border);
}
.badge-in_progress {
  background: var(--status-progress-bg);
  color: var(--status-progress-text);
  border: 1px solid var(--status-progress-border);
}
.badge-paused {
  background: var(--status-paused-bg);
  color: var(--status-paused-text);
  border: 1px solid var(--status-paused-border);
}
.badge-completed {
  background: var(--status-completed-bg);
  color: var(--status-completed-text);
  border: 1px solid var(--status-completed-border);
}
.badge-cancelled {
  background: var(--status-cancelled-bg);
  color: var(--status-cancelled-text);
  border: 1px solid var(--status-cancelled-border);
}

/* Priority Badges */
.badge-prio-low {
  background: var(--prio-low-bg);
  color: var(--prio-low-text);
}
.badge-prio-medium {
  background: var(--prio-medium-bg);
  color: var(--prio-medium-text);
}
.badge-prio-high {
  background: var(--prio-high-bg);
  color: var(--prio-high-text);
}
.badge-prio-urgent {
  background: var(--prio-urgent-bg);
  color: var(--prio-urgent-text);
}

/* Jira Style Ticket Key */
.ticket-key {
  font-family: monospace;
  font-weight: 700;
  font-size: 12px;
  color: var(--brand-primary);
  background: var(--brand-primary-subtle);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  display: inline-block;
}

/* Card Component */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
  overflow: hidden;
}

.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface);
}

.card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-body {
  padding: 20px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 13.5px;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
  line-height: 1;
}
.btn:hover {
  text-decoration: none;
}
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background-color: var(--brand-primary);
  color: #ffffff;
}
.btn-primary:hover {
  background-color: var(--brand-primary-hover);
}

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

.btn-success {
  background-color: #00875a;
  color: #ffffff;
}
.btn-success:hover {
  background-color: #006644;
}

.btn-warning {
  background-color: #ffab00;
  color: #172b4d;
}
.btn-warning:hover {
  background-color: #ff8b00;
}

.btn-danger {
  background-color: #de350b;
  color: #ffffff;
}
.btn-danger:hover {
  background-color: #bf2600;
}

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

.btn-lg {
  padding: 12px 20px;
  font-size: 15px;
}

/* Tables */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.table th {
  padding: 10px 14px;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border-color);
  background: var(--bg-subtle);
  letter-spacing: 0.4px;
}

.table td {
  padding: 12px 14px;
  font-size: 13px;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
  color: var(--text-primary);
}

.table tbody tr:hover {
  background-color: var(--bg-card-hover);
}

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

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

.form-label.required::after {
  content: " *";
  color: var(--brand-accent);
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 9px 12px;
  font-size: 13.5px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background-color: var(--bg-surface);
  color: var(--text-primary);
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 2px rgba(76, 154, 255, 0.25);
}

.form-textarea {
  resize: vertical;
}

.form-help {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Filters Toolbar */
.filter-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 20px;
  background: var(--bg-card);
  padding: 14px 18px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
}

.search-box {
  position: relative;
  flex-grow: 1;
  min-width: 220px;
}

.search-box input {
  padding-left: 32px;
}

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

/* Active Working Timer Component */
.active-timer-banner {
  background: linear-gradient(135deg, #0052cc, #0747a6);
  color: white;
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  box-shadow: var(--shadow-md);
}

.timer-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.timer-ticket-title {
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.timer-clock-display {
  font-family: 'SF Mono', Consolas, Monaco, monospace;
  font-size: 36px;
  font-weight: 700;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.timer-status-pulse {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #36b37e;
  box-shadow: 0 0 0 0 rgba(54, 179, 126, 0.7);
  animation: pulse-green 1.5s infinite;
}

.timer-status-pulse.paused {
  background: #ffab00;
  box-shadow: 0 0 0 0 rgba(255, 171, 0, 0.7);
  animation: pulse-yellow 1.5s infinite;
}

@keyframes pulse-green {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(54, 179, 126, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(54, 179, 126, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(54, 179, 126, 0); }
}

@keyframes pulse-yellow {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 171, 0, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(255, 171, 0, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 171, 0, 0); }
}

.timer-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Modals */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(9, 30, 66, 0.54);
  backdrop-filter: blur(2px);
  z-index: 1050;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-backdrop.show {
  display: flex;
}

.modal-dialog {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 500px;
  overflow: hidden;
  animation: modal-enter 0.2s ease-out;
}

@keyframes modal-enter {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

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

.modal-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.modal-close {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--text-muted);
  cursor: pointer;
}
.modal-close:hover {
  color: var(--text-primary);
}

.modal-body {
  padding: 20px;
}

.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  background: var(--bg-subtle);
}

/* Activity Timeline */
.timeline {
  position: relative;
  padding-left: 28px;
  margin-top: 10px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 0;
  bottom: 0;
  width: 2px;
  background-color: var(--border-color);
}

.timeline-item {
  position: relative;
  margin-bottom: 20px;
}

.timeline-dot {
  position: absolute;
  left: -28px;
  top: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 2px solid var(--brand-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.timeline-content {
  background: var(--bg-card);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.timeline-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.timeline-user {
  font-weight: 600;
  font-size: 13px;
  color: var(--text-primary);
}

.timeline-time {
  font-size: 11.5px;
  color: var(--text-muted);
}

.timeline-message {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 48px 24px;
}

.empty-state-icon {
  font-size: 48px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.empty-state-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.empty-state-desc {
  font-size: 13.5px;
  color: var(--text-muted);
  max-width: 400px;
  margin: 0 auto 16px auto;
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0 0 0;
}

.pagination-links {
  display: flex;
  gap: 6px;
}

/* Responsive Breakpoints */
@media (max-width: 992px) {
  .sidebar {
    position: fixed;
    transform: translateX(-100%);
    box-shadow: var(--shadow-lg);
  }
  .sidebar.show {
    transform: translateX(0);
  }
  .main-wrapper {
    width: 100%;
  }
  .mobile-menu-btn {
    display: inline-block;
  }
}

@media (max-width: 768px) {
  .content-body {
    padding: 16px;
  }
  .top-header {
    padding: 0 16px;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .active-timer-banner {
    flex-direction: column;
    align-items: flex-start;
  }
  .timer-actions {
    width: 100%;
    justify-content: space-between;
  }
  .timer-actions .btn {
    flex-grow: 1;
  }
  .filter-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   8. TechPanda Modern SaaS Enhancements: PrimeIcons, Credits, Drawer, Filters
   ========================================================================== */

/* Header Monthly Credit Pill */
.header-credit-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 171, 0, 0.12);
  color: #ffab00;
  border: 1px solid rgba(255, 171, 0, 0.3);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

[data-theme="dark"] .header-credit-pill {
  background: rgba(255, 171, 0, 0.15);
  border-color: rgba(255, 171, 0, 0.4);
  color: #f7b731;
}

.header-credit-pill:hover {
  background: rgba(255, 171, 0, 0.2);
  transform: translateY(-1px);
}

.header-credit-pill .credit-count {
  font-size: 14px;
}

.header-credit-pill .credit-label {
  font-size: 11.5px;
  opacity: 0.9;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.text-amber {
  color: #ffab00 !important;
}

/* User Avatar triggers & images */
.profile-drawer-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  border-radius: 50%;
  transition: transform 0.15s ease;
}

.profile-drawer-btn:hover {
  transform: scale(1.05);
}

.user-avatar-top-img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--brand-primary);
}

.user-avatar-sm-img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.user-avatar-initial {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--brand-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
}

/* Right-Side Slide-Over Profile Drawer */
.profile-drawer-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(9, 30, 66, 0.54);
  backdrop-filter: blur(2px);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.profile-drawer-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.profile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 360px;
  max-width: 90vw;
  background: var(--bg-surface);
  border-left: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.profile-drawer.open {
  transform: translateX(0);
}

.profile-drawer-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.profile-drawer-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.drawer-close-btn {
  background: none;
  border: none;
  font-size: 16px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: background 0.15s ease;
}

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

.profile-drawer-body {
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.drawer-user-card {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.drawer-avatar-wrapper {
  position: relative;
  width: 72px;
  height: 72px;
  margin-bottom: 12px;
}

.drawer-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--brand-primary);
}

.drawer-avatar-fallback {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--brand-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
}

.drawer-avatar-edit-badge {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--brand-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  cursor: pointer;
  border: 2px solid var(--bg-surface);
  transition: background 0.15s ease;
}

.drawer-avatar-edit-badge:hover {
  background: var(--brand-primary-hover);
}

.drawer-user-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.drawer-user-email {
  font-size: 12.5px;
  color: var(--text-muted);
  margin: 4px 0 10px 0;
}

.drawer-role-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}

.drawer-credits-card {
  background: linear-gradient(135deg, rgba(255, 171, 0, 0.08), rgba(255, 171, 0, 0.16));
  border: 1px solid rgba(255, 171, 0, 0.3);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
}

[data-theme="dark"] .drawer-credits-card {
  background: linear-gradient(135deg, rgba(255, 171, 0, 0.12), rgba(255, 171, 0, 0.22));
}

.drawer-credits-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.drawer-credits-value {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  margin: 4px 0;
}

.drawer-credits-num {
  font-size: 32px;
  font-weight: 800;
  color: #ffab00;
  line-height: 1;
}

.drawer-credits-unit {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.drawer-credits-desc {
  font-size: 11.5px;
  color: var(--text-muted);
  margin: 6px 0 0 0;
}

.drawer-menu {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.drawer-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  color: var(--text-primary);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  background: var(--bg-subtle);
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
}

.drawer-menu-item:hover {
  background: var(--brand-primary-subtle);
  color: var(--brand-primary);
}

.drawer-menu-arrow {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-muted);
}

.drawer-divider {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 8px 0;
}

.drawer-menu-logout {
  color: #de350b;
}

.drawer-menu-logout:hover {
  background: rgba(222, 53, 11, 0.1);
  color: #de350b;
}

/* Date Filter Toolbar */
.date-filter-container {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.date-filter-presets {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.date-filter-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-right: 6px;
}

.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-subtle);
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-pill:hover {
  background: var(--border-color);
  color: var(--text-primary);
}

.filter-pill.active {
  background: var(--brand-primary);
  color: #fff;
  border-color: var(--brand-primary);
}

.custom-date-form {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-muted);
}

.custom-date-form.hidden {
  display: none;
}

.form-input-sm {
  padding: 4px 8px;
  font-size: 12px;
  border-radius: var(--radius-sm);
}

/* Monthly Credit Leaderboard Widget */
.leaderboard-card {
  margin-bottom: 0;
}

.leaderboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-color);
}

.leaderboard-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

/* Month Selector Pill Bar */
.month-selector-container {
  padding: 10px 16px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-subtle);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.month-selector-container::-webkit-scrollbar {
  height: 4px;
}

.month-selector-container::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

.month-selector-pills {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.month-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 20px;
  text-decoration: none;
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-secondary);
  transition: all 0.15s ease;
  user-select: none;
}

.month-pill:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--border-focus);
}

.month-pill.active {
  background: #0284c7;
  color: #ffffff !important;
  border-color: #0284c7;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(2, 132, 199, 0.28);
}

[data-theme="dark"] .month-pill.active {
  background: #0284c7;
  color: #ffffff !important;
  border-color: #38bdf8;
  box-shadow: 0 1px 4px rgba(2, 132, 199, 0.4);
}

/* Clean Monthly Credit Leaderboard Table */
.leaderboard-table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.leaderboard-clean-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}

.leaderboard-clean-table thead tr {
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border-color);
}

.leaderboard-clean-table th {
  padding: 10px 16px;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  white-space: nowrap;
}

.leaderboard-clean-table th.th-rank {
  width: 64px;
  text-align: center;
}

.leaderboard-clean-table th.th-tasks {
  width: 80px;
  text-align: center;
}

.leaderboard-clean-table th.th-credits {
  width: 110px;
  text-align: right;
}

.leaderboard-clean-table tbody tr {
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color 0.12s ease;
  background: var(--bg-card);
}

.leaderboard-clean-table tbody tr:last-child {
  border-bottom: none;
}

.leaderboard-clean-table tbody tr:hover {
  background: var(--bg-card-hover);
}

.leaderboard-clean-table td {
  padding: 11px 16px;
  vertical-align: middle;
}

.leaderboard-clean-table td.td-rank {
  text-align: center;
}

.leaderboard-clean-table td.td-tasks {
  text-align: center;
}

.leaderboard-clean-table td.td-credits {
  text-align: right;
}

/* Current user subtle highlight row */
.leaderboard-tr-current-user {
  background: rgba(2, 132, 199, 0.04) !important;
  border-left: 3px solid #0284c7;
}

[data-theme="dark"] .leaderboard-tr-current-user {
  background: rgba(56, 189, 248, 0.06) !important;
  border-left: 3px solid #38bdf8;
}

/* Rank Badges */
.rank-badge-clean {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 28px;
  height: 24px;
  padding: 0 8px;
  border-radius: 12px;
  font-size: 11.5px;
  font-weight: 700;
}

.rank-badge-clean.rank-1 {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

[data-theme="dark"] .rank-badge-clean.rank-1 {
  background: rgba(251, 191, 36, 0.16);
  color: #fcd34d;
  border: 1px solid rgba(251, 191, 36, 0.32);
}

.rank-badge-clean.rank-2 {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}

[data-theme="dark"] .rank-badge-clean.rank-2 {
  background: rgba(148, 163, 184, 0.16);
  color: #e2e8f0;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.rank-badge-clean.rank-3 {
  background: #ffedd5;
  color: #9a3412;
  border: 1px solid #fed7aa;
}

[data-theme="dark"] .rank-badge-clean.rank-3 {
  background: rgba(249, 115, 22, 0.16);
  color: #fdba74;
  border: 1px solid rgba(249, 115, 22, 0.32);
}

.rank-badge-clean.rank-default {
  background: transparent;
  color: var(--text-muted);
  font-weight: 600;
}

/* Employee Profile Cell */
.emp-profile-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.emp-avatar-img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border-color);
}

.emp-avatar-fallback {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #0284c7;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11.5px;
  font-weight: 700;
  flex-shrink: 0;
}

.emp-name-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.emp-name-bold {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 13.5px;
  white-space: nowrap;
}

.emp-role-tag {
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 500;
}

.tasks-count-badge {
  display: inline-block;
  font-weight: 700;
  font-family: monospace;
  font-size: 13px;
  color: var(--text-primary);
}

.credits-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  background: #e0f2fe;
  color: #0284c7;
  border: 1px solid #bae6fd;
  white-space: nowrap;
}

[data-theme="dark"] .credits-pill {
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

/* Backward compatibility classes */
.leaderboard-item {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border-subtle);
  gap: 12px;
}

.badge-credit-pts {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #e0f2fe;
  color: #0284c7;
  border: 1px solid #bae6fd;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 12px;
}

[data-theme="dark"] .badge-credit-pts {
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.badge-overdue {
  background: rgba(222, 53, 11, 0.12);
  color: #de350b;
  border: 1px solid rgba(222, 53, 11, 0.3);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Dashboard Layout Helpers */
.dashboard-header-row, .page-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.page-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.page-subtitle {
  color: var(--text-muted);
  font-size: 13px;
  margin: 4px 0 0 0;
}

.header-action-btns {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.dashboard-dual-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}

@media (max-width: 900px) {
  .dashboard-dual-grid {
    grid-template-columns: 1fr;
  }
}

/* Stat Card Icon variations */
.stat-icon-primary { background: var(--brand-primary-subtle); color: var(--brand-primary); }
.stat-icon-blue { background: #deebff; color: #0052cc; }
.stat-icon-orange { background: #fffae6; color: #ff8b00; }
.stat-icon-purple { background: #eae6ff; color: #5243aa; }
.stat-icon-green { background: #e3fcef; color: #00875a; }
.stat-icon-red { background: #ffebe6; color: #de350b; }
.stat-icon-teal { background: #e6fcff; color: #008da6; }
.stat-icon-indigo { background: #deebff; color: #0747a6; }
.stat-icon-amber { background: rgba(255, 171, 0, 0.15); color: #ffab00; }

/* Task Cell Helpers */
.task-cell-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.task-cell-title {
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
}

.task-cell-title:hover {
  color: var(--brand-primary);
  text-decoration: underline;
}

.task-cell-author {
  font-size: 11px;
  color: var(--text-muted);
}

.assignee-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.assignee-name {
  font-weight: 500;
}

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

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

.table-actions {
  display: inline-flex;
  gap: 6px;
}

/* Task Queue List */
.task-queue-list {
  display: flex;
  flex-direction: column;
}

.task-queue-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-subtle);
  gap: 16px;
}

.task-queue-item:last-child {
  border-bottom: none;
}

.task-queue-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.task-queue-title {
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
}

.task-queue-title:hover {
  color: var(--brand-primary);
}

/* Active Timer Hero Banner Additions */
.timer-credit-meta {
  font-size: 12px;
  opacity: 0.95;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.timer-pause-details {
  background: rgba(0, 0, 0, 0.2);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  margin-top: 6px;
  font-size: 12.5px;
}

.timer-badge-header {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  opacity: 0.9;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}

.timer-controls-area {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.timer-section-label {
  font-size: 11px;
  text-transform: uppercase;
  opacity: 0.85;
  font-weight: 600;
  margin-bottom: 2px;
}

/* Form Grid Helpers */
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 600px) {
  .form-grid-2 {
    grid-template-columns: 1fr;
  }
}

.form-actions-row {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.form-error-msg {
  color: var(--brand-accent);
  font-size: 12px;
  margin-top: 4px;
}

.pagination-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.pagination-info {
  font-size: 13px;
  color: var(--text-muted);
}

/* ==========================================================================
   9. Task Status Breakdown: Animated Circular Donut Chart & Legend
   ========================================================================== */
.status-breakdown-card {
  margin-bottom: 0;
}

.status-chart-period-badge {
  font-size: 11px;
  font-weight: 600;
}

.status-chart-card-body {
  padding: 18px 20px;
}

.status-chart-layout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.donut-chart-wrapper {
  position: relative;
  width: 170px;
  height: 170px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.donut-chart-wrapper canvas {
  width: 100% !important;
  height: 100% !important;
  z-index: 1;
}

.donut-center-info {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
  z-index: 2;
  user-select: none;
}

.donut-center-score {
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.5px;
}

.donut-center-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  margin-top: 4px;
}

.status-legend-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 170px;
}

.status-legend-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  transition: all 0.15s ease;
  user-select: none;
}

.status-legend-item:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-focus);
  transform: translateX(2px);
}

.status-legend-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}

.status-legend-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 12.5px;
}

.status-legend-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-legend-count {
  font-weight: 700;
  font-family: monospace;
  font-size: 13px;
  color: var(--text-primary);
}

.status-legend-pct {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  padding: 1px 6px;
  border-radius: 4px;
  min-width: 34px;
  text-align: center;
}

.status-empty-notice {
  margin-top: 12px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-size: 12px;
  text-align: center;
}

@media (max-width: 600px) {
  .status-chart-layout {
    flex-direction: column;
    align-items: center;
  }
  .status-legend-grid {
    width: 100%;
  }
}

/* Reports & Analytics Chart Grid */
.reports-chart-grid {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 20px;
  align-items: start;
  margin-bottom: 24px;
}

@media (max-width: 1024px) {
  .reports-chart-grid {
    grid-template-columns: 1fr;
  }
}
