/* Home Page - Widget Dashboard */

.home-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-4);
}

/* Home Header */
.home-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: var(--space-4);
}

.home-header h1 {
  font-size: var(--text-xl);
  font-weight: var(--font-semibold);
  margin: 0;
}

.header-date {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

/* Greeting */
.greeting {
  margin-bottom: var(--space-5);
}

.greeting h1 {
  font-size: var(--text-2xl);
  font-weight: var(--font-semibold);
  margin-bottom: var(--space-1);
}

.greeting-sub {
  color: var(--text-muted);
}

/* Widget Grid */
.widget-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-4);
}

.widget-full-width {
  grid-column: 1 / -1;
}

/* Widget Card */
.widget {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  overflow: hidden;
}

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

.widget-header h3 {
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-transform: none;
  letter-spacing: normal;
}

.widget-header .widget-icon {
  font-size: 1.1rem;
}

.widget-actions {
  display: flex;
  gap: var(--space-2);
}

.widget-action {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: var(--space-1);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.widget-action:hover {
  color: var(--text-primary);
  background: var(--border);
}

.widget-body {
  padding: var(--space-4);
}

.widget-empty {
  text-align: center;
  color: var(--text-muted);
  padding: var(--space-4);
}

/* Today Tasks Widget */
.task-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-2);
  background: var(--bg-tertiary);
  transition: all var(--transition-fast);
}

.task-item:hover {
  background: var(--border);
}

.task-item:last-child {
  margin-bottom: 0;
}

.task-checkbox {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 2px;
  transition: all var(--transition-fast);
}

.task-checkbox:hover {
  border-color: var(--success);
  background: var(--success-bg);
}

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

.task-title {
  font-weight: var(--font-medium);
  margin-bottom: var(--space-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.task-meta {
  display: flex;
  gap: var(--space-3);
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.task-estimate {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

/* Legacy task-start-btn removed - using task-action-btn now */

/* Calendar Widget */
.event-item {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-3);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-2);
  background: var(--bg-tertiary);
}

.event-item:last-child {
  margin-bottom: 0;
}

.event-time {
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--accent);
  min-width: 60px;
}

.event-details {
  flex: 1;
}

.event-title {
  font-weight: var(--font-medium);
  margin-bottom: 2px;
}

.event-location {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* Relationships Widget */
.friend-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-2);
  background: var(--bg-tertiary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.friend-item:hover {
  background: var(--border);
}

.friend-item:last-child {
  margin-bottom: 0;
}

.friend-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--font-semibold);
  flex-shrink: 0;
}

.friend-info {
  flex: 1;
  min-width: 0;
}

.friend-name {
  font-weight: var(--font-medium);
  margin-bottom: 2px;
}

.friend-last-contact {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.friend-score {
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
}

.friend-score.low {
  color: var(--danger);
}

.friend-score.medium {
  color: var(--warning);
}

.friend-score.high {
  color: var(--success);
}

/* Expanded relationship cards */
.friend-item-expanded {
  background: var(--bg-card);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 10px;
  border: 1px solid var(--border, #334155);
  transition: border-color 0.2s;
}

.friend-item-expanded:hover {
  border-color: var(--accent, #6366f1);
}

.friend-header {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.friend-suggestion {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border, #334155);
}

.friend-nudge {
  font-size: 0.85rem;
  color: var(--text-secondary, #94a3b8);
  line-height: 1.4;
  margin-bottom: 6px;
}

.friend-draft {
  margin-top: 6px;
}

.friend-draft-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 3px;
}

.friend-draft-text {
  font-size: 0.85rem;
  color: var(--text-primary, #e2e8f0);
  background: var(--bg-tertiary);
  padding: 8px 10px;
  border-radius: 6px;
  line-height: 1.4;
  border: 1px solid transparent;
}

.friend-draft-text[contenteditable="true"] {
  border-color: var(--accent, #6366f1);
}

.friend-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.friend-send-btn {
  background: var(--accent, #6366f1);
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.2s;
}

.friend-send-btn:hover {
  background: var(--accent-hover, #4f46e5);
}

.friend-edit-btn, .friend-log-btn {
  background: var(--bg-tertiary);
  color: var(--text-secondary, #94a3b8);
  border: 1px solid var(--border, #334155);
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}

.friend-edit-btn:hover, .friend-log-btn:hover {
  border-color: var(--accent, #6366f1);
  color: var(--text-primary, #e2e8f0);
}

.friend-wa-btn {
  background: #25d36622;
  color: #25d366;
  border: 1px solid #25d36644;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}

.friend-wa-btn:hover {
  background: #25d36644;
  border-color: #25d366;
}

/* Batch check-in mode */
.batch-checkin-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  align-items: center;
}

.batch-checkin-btn {
  background: var(--bg-tertiary);
  color: var(--text-secondary, #94a3b8);
  border: 1px solid var(--border, #334155);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}

.batch-checkin-btn:hover {
  border-color: var(--accent, #6366f1);
  color: var(--text-primary, #e2e8f0);
}

.batch-send-btn {
  background: var(--success, #22c55e);
  color: white;
  border: none;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.2s;
}

.batch-send-btn:hover {
  background: #16a34a;
}

.batch-checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--accent, #6366f1);
  margin-right: 4px;
  flex-shrink: 0;
}

/* Overdue ratio badge */
.friend-overdue {
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 10px;
  font-weight: 500;
}

.friend-overdue.high { background: #dc262622; color: #ef4444; }
.friend-overdue.medium { background: #f59e0b22; color: #f59e0b; }
.friend-overdue.low { background: #22c55e22; color: #22c55e; }

/* Draft context line */
.friend-draft-context {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 2px;
  font-style: italic;
}

/* Quick Actions Widget */
.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}

.quick-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-4);
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-fast);
  color: var(--text-primary);
}

.quick-action-btn:hover {
  background: var(--accent-bg);
  border-color: var(--accent);
}

.quick-action-btn .action-icon {
  font-size: 1.5rem;
}

.quick-action-btn .action-label {
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
}

/* Stats Widget */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}

.stat-box {
  text-align: center;
  padding: var(--space-3);
  background: var(--bg-tertiary);
  border-radius: var(--radius-lg);
}

.stat-value {
  font-size: var(--text-2xl);
  font-weight: var(--font-semibold);
  color: var(--accent);
}

.stat-label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: var(--space-1);
}

/* Widget config modal */
.widget-config {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.widget-config.hidden {
  display: none;
}

.widget-config-content {
  background: var(--bg-secondary);
  border-radius: var(--radius-2xl);
  padding: var(--space-5);
  width: 90%;
  max-width: 400px;
}

.widget-config h3 {
  margin-bottom: var(--space-4);
}

.widget-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3);
  border-bottom: 1px solid var(--border);
}

.widget-toggle:last-child {
  border-bottom: none;
}

.toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--border);
  border-radius: 24px;
  transition: 0.2s;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: 0.2s;
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--accent);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

/* Active task styling */
.task-item.task-active {
  background: var(--accent-bg);
  border: 1px solid var(--accent);
}

/* Task item with actions */
.task-item.selectable {
  cursor: pointer;
  transition: all var(--transition-fast);
}

.task-item.selectable:hover {
  border-color: var(--accent);
}

.task-item.selected {
  border-color: var(--accent);
  background: var(--accent-bg);
}

.task-item.task-overdue {
  border-left: 3px solid var(--danger);
}

.task-overdue-badge {
  color: var(--danger);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
}

/* Task actions row */
.task-actions {
  display: flex;
  gap: var(--space-1);
  margin-left: auto;
}

.task-action-btn {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  transition: all var(--transition-fast);
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.task-action-btn:hover {
  transform: scale(1.1);
}

.task-action-btn.task-start-btn {
  background: var(--success);
  color: white;
}

.task-action-btn.task-stop-btn {
  background: var(--danger);
  color: white;
}

.task-action-btn.task-resume-btn {
  background: var(--warning);
  color: var(--bg-primary);
}

.task-action-btn.task-complete-btn:hover {
  background: var(--success);
  color: white;
}

.task-action-btn.task-reschedule-btn:hover {
  background: var(--accent-bg);
}

.task-action-btn.task-disabled-btn {
  opacity: 0.4;
  cursor: not-allowed;
}

.task-action-btn.task-disabled-btn:hover {
  transform: none;
}

/* Event items clickable */
.event-item.selectable {
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
}

.event-item.selectable:hover {
  background: var(--border);
}

.event-item.selected {
  border-color: var(--accent);
  background: var(--accent-bg);
}

.event-type-badge {
  font-size: 9px;
  font-weight: var(--font-semibold);
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  background: var(--accent-bg);
  color: var(--accent);
}

.event-type-badge.event-badge-cal {
  background: var(--success-bg);
  color: var(--success);
}

.event-location {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: 2px;
}

/* Friend items clickable */
.friend-item.selectable {
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
}

.friend-quick-action {
  position: absolute;
  right: 50px;
  background: none;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  opacity: 0;
  transition: opacity var(--transition-fast);
  padding: var(--space-1);
}

.friend-item:hover .friend-quick-action {
  opacity: 1;
}

.friend-quick-action:hover {
  transform: scale(1.2);
}

/* ═══════════════════════════════════════════════════════════════
   WEATHER COMPACT WIDGET
   ═══════════════════════════════════════════════════════════════ */

.weather-compact {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

/* Warning bar */
.weather-warning-bar {
  background: var(--warning-bg);
  color: var(--warning);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
}

/* Main row: current + stats */
.weather-main-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

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

.weather-now-icon {
  font-size: 1.75rem;
}

.weather-now-temp {
  font-size: 1.75rem;
  font-weight: 300;
  line-height: 1;
}

.weather-now-desc {
  font-size: var(--text-sm);
  color: var(--text-muted);
  max-width: 100px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.weather-stats {
  display: flex;
  gap: var(--space-3);
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.weather-stats .stat {
  white-space: nowrap;
}

/* Hourly bar */
.weather-hourly-section {
  border-top: 1px solid var(--border);
  padding-top: var(--space-2);
}

.weather-hourly-bar {
  display: flex;
  gap: var(--space-1);
  overflow-x: auto;
}

.hourly-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 44px;
  padding: var(--space-1);
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
}

.hourly-item .hourly-time {
  font-size: 9px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.hourly-item .hourly-icon {
  font-size: 1rem;
}

.hourly-item .hourly-temp {
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
}

/* Compact forecast row */
.weather-forecast-row {
  display: flex;
  gap: var(--space-1);
  border-top: 1px solid var(--border);
  padding-top: var(--space-2);
}

.forecast-day-compact {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-1);
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  min-width: 50px;
}

.forecast-day-compact .fc-period {
  font-size: 9px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.forecast-day-compact .fc-icon {
  font-size: 1rem;
}

.forecast-day-compact .fc-temps {
  display: flex;
  gap: 2px;
  font-size: var(--text-xs);
}

.forecast-day-compact .fc-high {
  font-weight: var(--font-semibold);
}

.forecast-day-compact .fc-low {
  color: var(--text-muted);
}

.forecast-day-compact .fc-pop {
  font-size: 8px;
  color: var(--info);
}

/* Other locations compact */
.weather-other-locs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  border-top: 1px solid var(--border);
  padding-top: var(--space-2);
}

.other-loc {
  font-size: var(--text-xs);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.other-loc:hover {
  color: var(--text-primary);
}

.loc-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 10px;
  opacity: 0;
  padding: 0;
}

.other-loc:hover .loc-remove {
  opacity: 1;
}

/* Footer */
.weather-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border);
  padding-top: var(--space-2);
  margin-top: var(--space-1);
}

.add-loc-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: var(--text-xs);
  cursor: pointer;
  padding: 0;
}

.add-loc-btn:hover {
  color: var(--accent);
}

.weather-src {
  font-size: 9px;
  color: var(--text-muted);
  opacity: 0.6;
}

/* Location picker modal */
.location-picker-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.location-picker-content {
  background: var(--bg-secondary);
  border-radius: var(--radius-2xl);
  width: 90%;
  max-width: 400px;
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.location-picker-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-4);
  border-bottom: 1px solid var(--border);
}

.location-picker-header h3 {
  margin: 0;
  font-size: var(--text-lg);
}

.location-picker-close {
  background: none;
  border: none;
  font-size: 1.25rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: var(--space-1);
}

.location-picker-close:hover {
  color: var(--text-primary);
}

.location-picker-search {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border);
}

.location-picker-search input {
  width: 100%;
  padding: var(--space-2) var(--space-3);
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: var(--text-sm);
}

.location-picker-search input:focus {
  outline: none;
  border-color: var(--accent);
}

.location-picker-list {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-2);
}

.location-picker-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-3);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.location-picker-item:hover {
  background: var(--accent-bg);
}

.location-picker-name {
  font-weight: var(--font-medium);
}

.location-picker-province {
  font-size: var(--text-xs);
  color: var(--text-muted);
  background: var(--bg-tertiary);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}

/* ═══════════════════════════════════════════════════════════════
   CONTACT INSPECTOR - FULL (Home Page)
   ═══════════════════════════════════════════════════════════════ */

.contact-inspector-full {
  padding: var(--space-2);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

/* Header */
.ci-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.ci-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  flex-shrink: 0;
}

.ci-header-info {
  flex: 1;
  min-width: 0;
}

.ci-name {
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ci-badges {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-1);
  flex-wrap: wrap;
}

.ci-badge {
  font-size: var(--text-xs);
  padding: 0.125rem 0.5rem;
  border-radius: 10px;
  background: var(--bg-tertiary);
  text-transform: capitalize;
}

.ci-ring {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  border-radius: 50%;
  font-weight: var(--font-semibold);
  padding: 0;
}

/* Ring colors */
.ci-ring.ring-1 { background: #f9a825; color: #000; }
.ci-ring.ring-2 { background: #fbc02d; color: #000; }
.ci-ring.ring-3 { background: #cddc39; color: #000; }
.ci-ring.ring-4 { background: #8bc34a; color: #fff; }
.ci-ring.ring-5 { background: #4caf50; color: #fff; }
.ci-ring.ring-6 { background: #26a69a; color: #fff; }
.ci-ring.ring-7 { background: #00acc1; color: #fff; }
.ci-ring.ring-8 { background: #1e88e5; color: #fff; }
.ci-ring.ring-9 { background: #5e35b1; color: #fff; }
.ci-ring.ring-10 { background: #7b1fa2; color: #fff; }

/* Ring Selector */
.ci-ring-selector {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-2);
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
}

.ci-ring-label {
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  color: var(--text-muted);
  text-transform: uppercase;
}

.ci-ring-control {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.ci-ring-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  background: linear-gradient(to right, 
    #f9a825 0%, #fbc02d 15%, #cddc39 30%, #8bc34a 45%, #4caf50 55%, 
    #26a69a 65%, #00acc1 75%, #1e88e5 85%, #5e35b1 92%, #7b1fa2 100%);
  border-radius: 3px;
  outline: none;
}

.ci-ring-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  background: var(--bg-secondary);
  border: 2px solid var(--accent);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.ci-ring-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: var(--bg-secondary);
  border: 2px solid var(--accent);
  border-radius: 50%;
  cursor: pointer;
}

.ci-ring-value {
  min-width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
}

/* Ring value colors */
.ci-ring-value.ring-1 { background: #f9a825; color: #000; }
.ci-ring-value.ring-2 { background: #fbc02d; color: #000; }
.ci-ring-value.ring-3 { background: #cddc39; color: #000; }
.ci-ring-value.ring-4 { background: #8bc34a; color: #fff; }
.ci-ring-value.ring-5 { background: #4caf50; color: #fff; }
.ci-ring-value.ring-6 { background: #26a69a; color: #fff; }
.ci-ring-value.ring-7 { background: #00acc1; color: #fff; }
.ci-ring-value.ring-8 { background: #1e88e5; color: #fff; }
.ci-ring-value.ring-9 { background: #5e35b1; color: #fff; }
.ci-ring-value.ring-10 { background: #7b1fa2; color: #fff; }

.ci-ring-hint {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-align: right;
}

/* Scores with Circular Gauges */
.ci-scores {
  display: flex;
  gap: var(--space-3);
  align-items: center;
  padding: var(--space-3);
  background: var(--bg-tertiary);
  border-radius: var(--radius-lg);
}

.ci-gauge {
  position: relative;
}

.ci-gauge-main {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
}

.ci-sub-scores {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-2);
  flex: 1;
}

.ci-mini-gauge {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.gauge-svg, .gauge-svg-mini {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ci-gauge-main .gauge-svg {
  width: 80px;
  height: 80px;
}

.gauge-svg-mini {
  width: 45px;
  height: 45px;
}

.gauge-bg {
  fill: none;
  stroke: var(--border);
  stroke-width: 6;
}

.gauge-fill {
  fill: none;
  stroke: var(--accent);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 264; /* 2 * PI * 42 */
  transition: stroke-dashoffset 0.5s ease-out;
}

/* Gauge colors by score level */
.gauge-fill.gold { stroke: #f9a825; }
.gauge-fill.green { stroke: #22c55e; }
.gauge-fill.lime { stroke: #84cc16; }
.gauge-fill.yellow { stroke: #eab308; }
.gauge-fill.orange { stroke: #f97316; }
.gauge-fill.red { stroke: #ef4444; }

/* Sub-score gauge colors */
.gauge-fill.recency { stroke: #4285f4; }
.gauge-fill.frequency { stroke: #34a853; }
.gauge-fill.quality { stroke: #fbbc04; }
.gauge-fill.consistency { stroke: #ea4335; }

.gauge-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.gauge-value {
  font-size: var(--text-xl);
  font-weight: var(--font-semibold);
  line-height: 1;
}

.gauge-label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: 2px;
}

.gauge-center-mini {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gauge-val-mini {
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
}

.gauge-lbl-mini {
  font-size: 0.6rem;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 2px;
}

/* Score Details */
.ci-score-details {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-3);
  font-size: var(--text-xs);
}

.ci-detail {
  color: var(--text-secondary);
}

.ci-detail-label {
  color: var(--text-muted);
}

/* Sections */
.ci-section {
  border-top: 1px solid var(--border);
  padding-top: var(--space-3);
}

.ci-section-title {
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-2);
}

/* Quick Actions */
.ci-quick-actions {
  display: flex;
  gap: var(--space-2);
}

.ci-action-btn {
  flex: 1;
  padding: var(--space-2);
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 1.1rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.ci-action-btn:hover {
  background: var(--accent-bg);
  border-color: var(--accent);
  transform: scale(1.05);
}

.ci-more-btn {
  flex: 0.5;
  font-weight: var(--font-semibold);
  color: var(--text-muted);
}

/* Contact Info */
.ci-info-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.ci-info-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
}

.ci-info-icon {
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.ci-info-val {
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ci-empty {
  color: var(--text-muted);
  font-size: var(--text-sm);
  font-style: italic;
}

/* Notes */
.ci-notes-input {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.ci-notes-input input {
  flex: 1;
  padding: var(--space-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-size: var(--text-sm);
}

.ci-notes-input input:focus {
  outline: none;
  border-color: var(--accent);
}

.ci-note-add-btn {
  padding: var(--space-2) var(--space-3);
  background: var(--accent);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  cursor: pointer;
}

.ci-note-add-btn:hover {
  opacity: 0.9;
}

.ci-notes-list {
  max-height: 120px;
  overflow-y: auto;
}

.ci-note-item {
  padding: var(--space-2);
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-1);
}

.ci-note-text {
  font-size: var(--text-sm);
  margin-bottom: var(--space-1);
}

.ci-note-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ci-note-date {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.ci-note-delete {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: var(--text-sm);
  padding: 0;
  opacity: 0.5;
}

.ci-note-delete:hover {
  opacity: 1;
  color: var(--danger);
}

/* Interactions */
.ci-interactions-list {
  max-height: 150px;
  overflow-y: auto;
  padding-right: var(--space-2);
}

.ci-interaction-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--border);
}

.ci-interaction-item:last-child {
  border-bottom: none;
}

.ci-int-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  border-radius: 50%;
  flex-shrink: 0;
  font-size: 0.75rem;
}

.ci-int-content {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  min-width: 0;
}

.ci-int-type {
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
}

.ci-int-date {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.ci-int-desc {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: var(--space-1);
}

/* Footer */
.ci-footer {
  display: flex;
  gap: var(--space-2);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border);
}

.ci-btn {
  flex: 1;
  padding: var(--space-2);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.ci-btn-edit {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-primary);
}

.ci-btn-edit:hover {
  background: var(--bg-tertiary);
}

.ci-btn-delete {
  background: transparent;
  border: 1px solid var(--danger);
  color: var(--danger);
}

.ci-btn-delete:hover {
  background: var(--danger);
  color: white;
}

/* Responsive */
@media (max-width: 768px) {
  .weather-banner {
    flex-direction: column;
    text-align: center;
    gap: var(--space-3);
  }
  
  .weather-right {
    text-align: center;
  }
  
  .widget-grid {
    grid-template-columns: 1fr;
  }
  
  .quick-actions-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .weather-current-section {
    flex-direction: column;
    align-items: center;
  }
  
  .weather-metrics {
    width: 100%;
    grid-template-columns: repeat(3, 1fr);
  }
  
  .weather-forecast-grid {
    flex-wrap: wrap;
  }
  
  .forecast-day {
    min-width: 80px;
  }
}

/* Inbox Widget */
.inbox-widget-list { display: flex; flex-direction: column; gap: 2px; }
.inbox-widget-item { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 6px; cursor: pointer; transition: background 0.1s; }
.inbox-widget-item:hover { background: var(--bg-elevated); }
.inbox-widget-item.unread { font-weight: 600; }
.inbox-w-cat { font-size: 10px; flex-shrink: 0; }
.inbox-w-source { font-size: 11px; flex-shrink: 0; }
.inbox-w-content { flex: 1; min-width: 0; }
.inbox-w-from { font-size: 12px; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inbox-w-subject { font-size: 11px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inbox-w-time { font-size: 10px; color: var(--text-secondary); flex-shrink: 0; }
.inbox-widget-more { text-align: center; font-size: 12px; color: var(--text-secondary); padding: 4px; cursor: pointer; }

/* Birthday Widget */
.birthday-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition-fast);
}
.birthday-item:hover { background: var(--bg-secondary); }
.birthday-item.birthday-urgent { background: var(--warning-bg); }
.birthday-icon { font-size: 20px; flex-shrink: 0; }
.birthday-info { flex: 1; min-width: 0; }
.birthday-name { font-size: var(--text-sm); font-weight: var(--font-medium); color: var(--text-primary); }
.birthday-type { font-size: var(--text-xs); color: var(--text-muted); }
.birthday-days { font-size: var(--text-xs); color: var(--text-secondary); flex-shrink: 0; font-weight: var(--font-medium); }
.birthday-days.today { color: var(--warning); font-weight: var(--font-semibold); }

/* Timer Stats Widget */
.timer-stats-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}
.timer-stat-box { text-align: center; }
.timer-stat-val { font-size: var(--text-xl); font-weight: var(--font-semibold); color: var(--accent); }
.timer-stat-label { font-size: var(--text-xs); color: var(--text-muted); }
.timer-bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 60px;
}
.timer-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  height: 100%;
  justify-content: flex-end;
}
.timer-bar {
  width: 100%;
  background: var(--accent);
  border-radius: 2px 2px 0 0;
  min-height: 2px;
  opacity: 0.8;
  transition: opacity var(--transition-fast);
}
.timer-bar-col:hover .timer-bar { opacity: 1; }
.timer-bar-label { font-size: 10px; color: var(--text-muted); }
