@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;600;700&display=swap');

:root {
  --bg-dark: #090d16;
  --card-bg: rgba(22, 31, 48, 0.75);
  --card-border: rgba(255, 255, 255, 0.08);
  --primary: #38bdf8;
  --primary-hover: #0284c7;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --input-bg: rgba(15, 23, 42, 0.6);
  --danger: #ef4444;
}

body.light-theme {
  --bg-dark: #f1f5f9;
  --card-bg: #ffffff;
  --card-border: rgba(0, 0, 0, 0.1);
  --primary: #0284c7;
  --primary-hover: #0369a1;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --input-bg: #e2e8f0;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Vazirmatn', Tahoma, sans-serif;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  direction: rtl;
  padding: 16px;
  transition: background-color 0.3s, color 0.3s;
}

body[dir="ltr"] {
  direction: ltr;
}

.dashboard {
  display: flex;
  flex-direction: row;
  gap: 20px;
  max-width: 1700px;
  margin: 0 auto;
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.side-content {
  width: 320px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.charts-row-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.card {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.user-stats {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
  background: var(--card-bg);
  padding: 16px 20px;
  border-radius: 18px;
  border: 1px solid var(--card-border);
}

.stats-right {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.level-badge {
  background: linear-gradient(135deg, #38bdf8, #818cf8);
  color: #0f172a;
  padding: 6px 14px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.85rem;
}

.sub-badge {
  background: rgba(56, 189, 248, 0.15);
  color: var(--primary);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 6px 12px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
}

.month-selector-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--input-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 10px 16px;
  margin-bottom: 15px;
}

.month-select-dropdown {
  flex: 1;
  background: transparent !important;
  border: none !important;
  color: var(--primary) !important;
  font-size: 1rem !important;
  font-weight: bold;
  cursor: pointer;
  outline: none;
}

.timer-summary-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 15px;
}

.report-card-item {
  background: var(--input-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.report-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.report-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
}

.color-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.report-time-badge {
  background: rgba(56, 189, 248, 0.15);
  color: var(--primary);
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: bold;
}

.bad-slip-badge {
  background: rgba(239, 68, 68, 0.15) !important;
  color: var(--danger) !important;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.bad-habit-stats-grid {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.stat-pill {
  background: rgba(0, 0, 0, 0.2);
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.report-bars {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bar-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.progress-bg {
  width: 100%;
  height: 8px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 6px;
  transition: width 0.4s ease;
}

.xp-bar-container {
  flex: 1;
  min-width: 140px;
  height: 10px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  overflow: hidden;
}

.xp-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #38bdf8, #c084fc);
  transition: width 0.3s ease;
}

.xp-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.habit-input-group {
  display: flex;
  gap: 10px;
  margin: 15px 0 10px 0;
  align-items: center;
  flex-wrap: wrap;
}

.habit-input-group input[type="text"] {
  flex: 2 1 200px;
  min-width: 0;
}

.habit-input-row-sub {
  display: flex;
  gap: 8px;
  align-items: center;
  flex: 1 1 auto;
}

.habit-input-group select#newHabitCategory {
  flex: 1;
  min-width: 110px;
}

.time-picker-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: var(--input-bg);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 4px 8px;
  min-width: 120px;
  height: 42px;
  flex-shrink: 0;
}

.time-picker-group select {
  background: transparent !important;
  border: none !important;
  color: var(--primary) !important;
  font-size: 0.95rem !important;
  font-weight: 700 !important;
  text-align: center;
  cursor: pointer;
  padding: 2px 2px !important;
  outline: none;
  min-width: 42px;
  font-family: monospace, sans-serif;
}

.time-separator {
  color: var(--text-muted);
  font-weight: bold;
  font-size: 1.1rem;
}

input[type="text"],
input[type="tel"],
input[type="email"],
input[type="number"],
input[type="time"],
select,
textarea {
  padding: 10px 14px;
  background: var(--input-bg);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  color: var(--text-main);
  font-size: 0.9rem;
  outline: none;
  max-width: 100%;
}

input[type="color"] {
  width: 42px;
  height: 42px;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
}

button,
.btn-add {
  padding: 10px 18px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

button:hover,
.btn-add:hover {
  background: var(--primary-hover);
}

.btn-secondary {
  background: var(--input-bg);
  color: var(--text-main);
  border: 1px solid var(--card-border);
  margin-top: 10px;
  width: 100%;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

.toolbar-header {
  font-size: 0.85rem;
  color: var(--primary);
  font-weight: bold;
  margin-top: 15px;
  margin-bottom: 6px;
}

.toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 15px;
}

.toolbar button,
.toolbar select {
  padding: 8px 12px;
  font-size: 0.82rem;
  background: var(--input-bg);
  color: var(--text-main);
  border: 1px solid var(--card-border);
  flex: 1 1 auto;
}

.table-wrapper {
  width: 100%;
  overflow-x: auto;
  margin-top: 15px;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  background: var(--input-bg);
  -webkit-overflow-scrolling: touch;
}

.grid-header,
.grid-row {
  display: grid;
  grid-template-columns: 24px 170px 85px repeat(30, 36px) 65px 60px 50px 75px 120px;
  gap: 2px;
  align-items: center;
  padding: 10px 12px;
  min-width: 1900px;
}

.grid-header {
  background: rgba(0, 0, 0, 0.2);
  font-weight: bold;
  font-size: 0.75rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--card-border);
  text-align: center;
}

.grid-row {
  border-bottom: 1px solid var(--card-border);
  font-size: 0.8rem;
  text-align: center;
  transition: background 0.2s;
}

.grid-row:hover {
  background: rgba(255, 255, 255, 0.03);
}

.day-dot {
  width: 26px;
  height: 26px;
  margin: 3px 4px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(15, 23, 42, 0.6);
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.day-dot:hover {
  border-color: var(--habit-color, #38bdf8);
  color: #fff;
  transform: translateY(-2px) scale(1.15);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.day-dot.active {
  background: var(--habit-color, #38bdf8);
  border-color: var(--habit-color, #38bdf8);
  color: #0f172a;
  font-weight: bold;
  font-size: 0.8rem;
  box-shadow: 0 0 12px var(--habit-color, #38bdf8);
}

.bad-habit-dot.has-slips {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #ef4444;
}

.bad-habit-dot.clean-day {
  background: rgba(16, 185, 129, 0.15);
  border-color: #10b981;
  color: #10b981;
}

.rate-badge {
  font-weight: 700;
  color: #34d399;
}

.bad-score {
  color: #ef4444 !important;
}

.drag-handle {
  cursor: grab;
  color: var(--text-muted);
  font-size: 1rem;
}

.habit-title {
  display: flex;
  align-items: center;
  gap: 6px;
  text-align: right;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body[dir="ltr"] .habit-title {
  text-align: left;
}

.habit-time-badge {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 0.72rem;
  font-weight: bold;
  color: var(--primary);
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 2px 6px;
  border-radius: 6px;
  white-space: nowrap;
}

.action-btns {
  display: flex;
  gap: 6px;
  justify-content: center;
  align-items: center;
}

.action-btns button {
  padding: 6px 8px;
  font-size: 0.85rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.action-btns .btn-timer:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38bdf8;
  color: #38bdf8;
  transform: translateY(-1px);
}

.action-btns .btn-edit:hover {
  background: rgba(250, 204, 21, 0.2);
  border-color: #facc15;
  color: #facc15;
  transform: translateY(-1px);
}

.action-btns .btn-del:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #ef4444;
  transform: translateY(-1px);
}

.badges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 15px;
}

.badge-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--input-bg);
  border: 1px solid var(--card-border);
  padding: 12px;
  border-radius: 12px;
}

.badge-item.locked {
  opacity: 0.35;
  filter: grayscale(1);
}

.badge-item.unlocked {
  border-color: rgba(56, 189, 248, 0.4);
  background: rgba(56, 189, 248, 0.08);
  box-shadow: 0 4px 15px rgba(56, 189, 248, 0.1);
}

.badge-icon {
  font-size: 1.6rem;
}

.badge-title {
  font-weight: bold;
  font-size: 0.85rem;
}

.badge-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.mood-selector {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.mood-btn {
  flex: 1;
  background: var(--input-bg);
  border: 1px solid var(--card-border);
  font-size: 1.2rem;
  padding: 8px;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
}

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

.mood-btn.selected {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 10px var(--primary);
}

.quote-card {
  text-align: center;
}

.quote-text {
  font-style: italic;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 10px 0;
  line-height: 1.6;
  transition: opacity 0.3s ease-in-out;
}

.pomodoro-modes {
  display: flex;
  gap: 6px;
  margin-bottom: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

.pomo-mode-btn {
  padding: 6px 10px;
  font-size: 0.75rem;
  background: var(--input-bg);
  color: var(--text-muted);
  border: 1px solid var(--card-border);
  cursor: pointer;
  border-radius: 8px;
}

.pomo-mode-btn.active {
  background: var(--primary);
  color: #0f172a;
  font-weight: bold;
}

.heatmap-grid-container {
  display: grid;
  grid-template-columns: repeat(30, 1fr);
  gap: 6px;
  overflow-x: auto;
  padding: 12px 5px;
  direction: ltr;
}

.heatmap-day-square {
  aspect-ratio: 1;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
}

.heatmap-day-square:hover {
  transform: scale(1.2);
  z-index: 10;
}

.heatmap-day-square.level-0 { background: rgba(255, 255, 255, 0.05); }
.heatmap-day-square.level-1 { background: rgba(56, 189, 248, 0.3); }
.heatmap-day-square.level-2 { background: rgba(56, 189, 248, 0.55); }
.heatmap-day-square.level-3 { background: rgba(56, 189, 248, 0.8); }
.heatmap-day-square.level-4 { background: #10b981; box-shadow: 0 0 8px #10b981; }

.heatmap-legend {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 12px;
}

.legend-box {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.timer-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(9, 13, 22, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100000;
  padding: 16px;
  overflow-y: auto;
}

.timer-modal-overlay.hidden {
  display: none !important;
}

.timer-modal-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 24px 20px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  width: min(440px, 92vw);
  max-height: 88vh;
  overflow-y: auto;
  margin: auto;
  position: relative;
  display: flex;
  flex-direction: column;
}

.timer-display {
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--primary);
  margin: 15px 0;
  font-family: monospace;
  letter-spacing: 2px;
}

.timer-controls {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 15px;
  flex-wrap: wrap;
}

.btn-start { background: #10b981 !important; }
.btn-pause { background: #f59e0b !important; }
.btn-close { background: var(--danger) !important; }

.edit-form-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: right;
  margin: 15px 0;
}

body[dir="ltr"] .edit-form-group {
  text-align: left;
}

.edit-form-group label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

.edit-color-picker {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 10px;
}

.week-select {
  padding: 6px 10px;
  font-size: 0.8rem;
  border-radius: 8px;
}

.chart-box {
  position: relative;
  height: 220px;
  width: 100%;
}

.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

textarea#notesBox {
  width: 100%;
  height: 120px;
  resize: none;
  margin-bottom: 10px;
}

.hidden {
  display: none !important;
}

.section-editor-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 10px;
  margin: 6px 0;
  border-radius: 8px;
  background: rgba(56, 189, 248, 0.12);
}

.section-editor-row .btn-del {
  padding: 5px 9px;
  font-size: 0.8rem;
}

.section-progress-list {
  display: grid;
  gap: 10px;
  margin: 18px 0;
  text-align: right;
}

body[dir="ltr"] .section-progress-list {
  text-align: left;
}

.section-check {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 9px;
  background: var(--input-bg);
  cursor: pointer;
}

.section-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.profile-setup-card {
  max-width: 410px;
  text-align: center;
  padding: 24px;
  background: linear-gradient(145deg, var(--card-bg), #172554);
}

.profile-setup-card input {
  width: 100%;
  padding: 12px;
  margin: 6px 0;
  border-radius: 8px;
  border: 1px solid var(--card-border);
  background: var(--input-bg);
  color: var(--text-main);
}

.profile-setup-card button {
  width: 100%;
  margin-top: 12px;
}

.profile-setup-icon {
  font-size: 42px;
}

.section-counter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--input-bg);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  gap: 10px;
}

.section-counter-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-counter {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--text-main);
  font-weight: bold;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.btn-counter:hover {
  background: var(--primary);
  color: #0f172a;
}

.counter-badge {
  font-size: 0.85rem;
  font-weight: bold;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(56, 189, 248, 0.15);
  color: var(--primary);
}

.counter-badge.done {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
}

/* ================= استایل نوار بالا و منوی همبرگری ================= */
.app-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 12px 20px;
  border-radius: 16px;
  margin-bottom: 20px;
  backdrop-filter: blur(10px);
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hamburger-btn {
  background: var(--input-bg);
  border: 1px solid var(--card-border);
  color: var(--text-main);
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.hamburger-btn:hover {
  background: var(--primary);
  color: #0f172a;
}

.app-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
}

.sidebar-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 280px;
  height: 100vh;
  background: var(--bg-dark);
  border-left: 1px solid var(--card-border);
  z-index: 200000;
  padding: 20px;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s ease;
  overflow-y: auto;
}

body[dir="ltr"] .sidebar-drawer {
  right: auto;
  left: 0;
  border-left: none;
  border-right: 1px solid var(--card-border);
}

.sidebar-drawer.hidden {
  transform: translateX(100%);
}

body[dir="ltr"] .sidebar-drawer.hidden {
  transform: translateX(-100%);
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--card-border);
  padding-bottom: 12px;
  margin-bottom: 15px;
}

.close-drawer-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
}

.drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.drawer-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  color: var(--text-main);
  text-decoration: none;
  border-radius: 10px;
  background: var(--input-bg);
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.drawer-link:hover {
  background: var(--primary);
  color: #0f172a;
  font-weight: bold;
}

.drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  z-index: 199999;
}

/* ================= استایل جدید روزهای فعال هفته (Pill/Chip UI) ================= */
.weekdays-selector {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--input-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 12px 14px;
  margin-top: 8px;
}

.weekdays-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.weekdays-checkboxes {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.weekday-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--card-border);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
}

.weekday-chip input[type="checkbox"] {
  display: none;
}

.weekday-chip:hover {
  background: rgba(56, 189, 248, 0.15);
  color: var(--text-main);
  border-color: rgba(56, 189, 248, 0.3);
}

.weekday-chip.active {
  background: var(--primary);
  color: #0f172a;
  border-color: var(--primary);
  font-weight: 700;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.3);
}

/* ================= واکنش‌گرایی موبایل (Media Queries) ================= */
@media (max-width: 900px) {
  .dashboard {
    flex-direction: column;
  }
  
  .side-content {
    width: 100%;
  }
  
  .charts-row-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  body {
    padding: 10px;
  }
  
  .card {
    padding: 15px;
    border-radius: 14px;
  }
  
  .user-stats {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  
  .stats-right {
    justify-content: space-between;
  }
  
  .xp-bar-container {
    width: 100%;
  }
  
  .habit-input-group {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  
  .habit-input-group input[type="text"] {
    width: 100%;
    flex: none;
  }

  .habit-input-row-sub {
    display: flex;
    gap: 8px;
    width: 100%;
    align-items: center;
  }

  .habit-input-group select#newHabitCategory {
    flex: 1;
    min-width: 0;
  }

  .time-picker-group {
    flex: 0 0 auto;
    min-width: 110px;
  }

  .habit-input-group .btn-add {
    width: 100%;
    flex: none;
  }

  .timer-modal-card {
    padding: 20px 16px;
    border-radius: 16px;
    width: 92vw;
  }

  .timer-display {
    font-size: 2.2rem;
  }
  
  .timer-controls button {
    flex: 1;
  }
  
  .badges-grid {
    grid-template-columns: 1fr;
  }

  .weekdays-checkboxes {
    justify-content: space-between;
  }

  .weekday-chip {
    flex: 1;
    min-width: 0;
    padding: 0 4px;
  }
}