/* ============================================
   ANTIMAT - Dashboard Styles
   ============================================ */

/* ============================================
   Auth Modal
   ============================================ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px;
  width: 100%;
  max-width: 420px;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.modal-close:hover {
  background: var(--accent);
  color: white;
}

.modal-header {
  text-align: center;
  margin-bottom: 32px;
}

.modal-logo {
  width: 60px;
  height: 60px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-logo img,
.modal-logo .logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 2rem;
  letter-spacing: 0.05em;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-group input,
.form-group textarea {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: 1rem;
  color: var(--text-primary);
  transition: border-color var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.form-error {
  color: var(--error);
  font-size: 0.875rem;
  min-height: 20px;
}

.btn-block {
  width: 100%;
}

.auth-switch {
  text-align: center;
  margin-top: 24px;
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

.link-btn {
  color: var(--accent);
  font-weight: 500;
  margin-left: 4px;
}

.link-btn:hover {
  text-decoration: underline;
}

/* ============================================
   Dashboard Layout
   ============================================ */

.dashboard {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}

/* Mobile header */
.dash-header {
  display: none;
  position: sticky;
  top: 0;
  z-index: 110;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  padding: 12px 16px;
  align-items: center;
  justify-content: space-between;
}

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

.dash-burger {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-tertiary);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px;
}

.dash-burger span {
  width: 20px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
}

.dash-header-actions .theme-toggle {
  border: 1px solid var(--border);
  background: var(--bg-tertiary);
}

/* Sidebar */
.sidebar {
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 280px;
  z-index: 100;
}

.sidebar-header {
  padding: 24px;
  border-bottom: 1px solid var(--border);
}

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

.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-weight: 500;
  transition: all var(--transition-fast);
  width: 100%;
  text-align: left;
}

.nav-item svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

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

.nav-item.active {
  background: rgba(230, 57, 70, 0.1);
  color: var(--accent);
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  position: sticky;
  bottom: 0;
  background: var(--bg-secondary);
}

.user-info {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 44px;
  height: 44px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1.125rem;
  color: white;
}

.user-name {
  font-weight: 600;
  font-size: 0.9375rem;
}

.user-debt {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.user-debt span {
  color: var(--accent);
  font-weight: 600;
}

.logout-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.logout-btn:hover {
  background: var(--bg-tertiary);
  color: var(--error);
}

.logout-btn svg {
  width: 20px;
  height: 20px;
}

/* Main Content */
.main-content {
  margin-left: 280px;
  padding: 32px;
  min-height: 100vh;
  max-width: 1400px;
  margin-right: auto;
}

.page {
  display: none;
  max-width: 100%;
}

.page.active {
  display: block;
}

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

.page-title {
  font-family: var(--font-display);
  font-size: 2.5rem;
  letter-spacing: 0.05em;
}

.page-actions {
  display: flex;
  gap: 12px;
}

/* ============================================
   Stats Page
   ============================================ */

.select-period {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 16px;
  color: var(--text-primary);
  font-size: 0.9375rem;
  cursor: pointer;
}

.stats-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 32px;
  max-width: 100%;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.stat-card.highlight {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  border-color: transparent;
}

.stat-card.highlight .stat-card-label {
  color: rgba(255, 255, 255, 0.8);
}

.stat-card-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-card-icon svg {
  width: 28px;
  height: 28px;
}

.stat-card-icon.red {
  background: rgba(230, 57, 70, 0.1);
  color: var(--accent);
}

.stat-card-icon.yellow {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning);
}

.stat-card-icon.green {
  background: rgba(34, 197, 94, 0.1);
  color: var(--success);
}

.stat-card.highlight .stat-card-icon {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

.stat-card-value {
  font-family: var(--font-display);
  font-size: 2rem;
  line-height: 1;
}

.stat-card-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

.stats-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  margin-bottom: 32px;
  max-width: 100%;
}

.chart-card,
.top-words-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  max-width: 100%;
}

.card-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.chart-container {
  height: 250px;
}

.top-words-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.top-word-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px;
  background: var(--bg-tertiary);
  border-radius: var(--radius);
}

.top-word-rank {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--accent);
  width: 32px;
}

.top-word-text {
  flex: 1;
  font-weight: 500;
}

.top-word-count {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.history-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  max-width: 100%;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 400px;
  overflow-y: auto;
}

.history-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--bg-tertiary);
  border-radius: var(--radius);
}

.history-icon {
  width: 44px;
  height: 44px;
  background: rgba(230, 57, 70, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.history-icon svg {
  width: 20px;
  height: 20px;
}

.history-content {
  flex: 1;
}

.history-word {
  font-weight: 600;
  margin-bottom: 2px;
}

.history-time {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.history-amount {
  font-weight: 600;
  color: var(--accent);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

.empty-state svg {
  width: 64px;
  height: 64px;
  margin-bottom: 16px;
  opacity: 0.3;
}

.empty-state p {
  margin-bottom: 8px;
}

.empty-state .hint {
  font-size: 0.875rem;
}

/* ============================================
   Groups Page
   ============================================ */

.groups-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  max-width: 100%;
}

.group-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  cursor: pointer;
  transition: all var(--transition);
}

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

.group-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.group-avatar {
  width: 56px;
  height: 56px;
  background: var(--accent);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: white;
}

.group-card-info {
  flex: 1;
}

.group-card-name {
  font-weight: 600;
  font-size: 1.125rem;
  margin-bottom: 4px;
}

.group-card-members {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.group-card-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.group-stat {
  text-align: center;
}

.group-stat-value {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--accent);
}

.group-stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Group Detail */
.group-detail-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.back-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-weight: 500;
  padding: 8px 16px;
  border-radius: var(--radius);
  transition: all var(--transition-fast);
}

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

.back-btn svg {
  width: 20px;
  height: 20px;
}

.group-name {
  font-family: var(--font-display);
  font-size: 2rem;
  flex: 1;
}

.group-code {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-tertiary);
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.group-code span {
  font-family: var(--font-display);
  font-size: 1.125rem;
  color: var(--accent);
  letter-spacing: 0.1em;
}

.copy-btn {
  padding: 4px;
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

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

.copy-btn svg {
  width: 18px;
  height: 18px;
}

/* Tabs */
.group-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  background: var(--bg-tertiary);
  padding: 4px;
  border-radius: var(--radius);
}

.tab-btn {
  flex: 1;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.tab-btn:hover {
  color: var(--text-primary);
}

.tab-btn.active {
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: var(--shadow);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Chat */
.chat-messages {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  height: 500px;
  max-height: 70vh;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 16px;
}

.chat-message {
  display: flex;
  gap: 12px;
  max-width: 80%;
}

.chat-message.own {
  margin-left: auto;
  flex-direction: row-reverse;
}

.chat-message.system {
  max-width: 100%;
  justify-content: center;
}

.message-avatar {
  width: 36px;
  height: 36px;
  background: var(--bg-tertiary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.message-content {
  background: var(--bg-tertiary);
  padding: 12px 16px;
  border-radius: var(--radius-lg);
}

.chat-message.own .message-content {
  background: var(--accent);
  color: white;
}

.chat-message.system .message-content {
  background: transparent;
  color: var(--text-muted);
  font-size: 0.875rem;
  text-align: center;
}

.chat-message.penalty .message-content {
  background: rgba(230, 57, 70, 0.1);
  border: 1px solid var(--accent);
  color: var(--text-primary);
}

.message-sender {
  font-weight: 600;
  font-size: 0.8125rem;
  margin-bottom: 4px;
  color: var(--accent);
}

.chat-message.own .message-sender {
  color: rgba(255, 255, 255, 0.8);
}

.message-text {
  line-height: 1.5;
}

.message-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.chat-message.own .message-time {
  color: rgba(255, 255, 255, 0.6);
}

.chat-input {
  display: flex;
  gap: 12px;
  max-width: 100%;
}

.chat-input input {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: 1rem;
  color: var(--text-primary);
}

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

.send-btn {
  width: 52px;
  height: 52px;
  background: var(--accent);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  transition: all var(--transition-fast);
}

.send-btn:hover:not(:disabled) {
  background: var(--accent-light);
}

.send-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.send-btn svg {
  width: 22px;
  height: 22px;
}

/* Members */
.members-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

.member-avatar {
  width: 48px;
  height: 48px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: white;
}

.member-info {
  flex: 1;
}

.member-name {
  font-weight: 600;
  margin-bottom: 2px;
}

.member-role {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.member-debt {
  font-weight: 600;
  color: var(--accent);
}

/* Group Stats */
.group-stats-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

.stats-rank {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--accent);
  width: 40px;
  text-align: center;
}

.stats-user-info {
  flex: 1;
}

.stats-user-name {
  font-weight: 600;
}

.stats-user-count {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.stats-user-amount {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--accent);
}

/* ============================================
   Words Page
   ============================================ */

.word-limit {
  background: var(--bg-tertiary);
  padding: 8px 16px;
  border-radius: var(--radius);
  font-weight: 500;
}

.word-limit span:first-child {
  color: var(--accent);
}

.add-word-form {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  max-width: 100%;
}

.add-word-form input {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: 1rem;
  color: var(--text-primary);
}

.add-word-form input:focus {
  outline: none;
  border-color: var(--accent);
}

.words-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 100%;
}

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

.word-text {
  font-weight: 500;
}

.word-date {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.delete-word-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.delete-word-btn:hover {
  background: rgba(239, 68, 68, 0.1);
  color: var(--error);
}

.delete-word-btn svg {
  width: 18px;
  height: 18px;
}

/* ============================================
   Settings Page
   ============================================ */

.settings-sections {
  display: flex;
  flex-direction: column;
  gap: 32px;
  max-width: 900px;
}

.settings-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.settings-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.setting-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.setting-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.setting-item:first-of-type {
  padding-top: 0;
}

.setting-label {
  font-weight: 500;
  margin-bottom: 4px;
}

.setting-hint {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.setting-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.setting-control input[type="number"] {
  width: 120px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  font-size: 1rem;
  color: var(--text-primary);
  text-align: right;
}

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

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

.btn-sm {
  padding: 10px 20px;
  font-size: 0.875rem;
}

.btn-danger {
  color: var(--error);
  border-color: var(--error);
}

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

/* Theme Switcher */
.theme-switcher {
  display: flex;
  gap: 8px;
}

.theme-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-weight: 500;
  transition: all var(--transition-fast);
}

.theme-btn svg {
  width: 18px;
  height: 18px;
}

.theme-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.theme-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

/* Toggle Switch */
.toggle {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 28px;
}

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

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 28px;
  transition: all var(--transition);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background: var(--text-secondary);
  border-radius: 50%;
  transition: all var(--transition);
}

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

.toggle input:checked + .toggle-slider::before {
  background: white;
  transform: translateX(24px);
}

/* Premium Banner */
.premium-banner {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%) !important;
  border-color: transparent !important;
  color: white;
}

.premium-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.premium-badge {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 2px;
  width: fit-content;
}

.premium-banner .settings-title {
  color: white;
  margin: 0;
}

.premium-features {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 20px;
}

.premium-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  color: white;
  font-size: 0.9375rem;
}

.premium-feature svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Offline Overlay */
.offline-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  padding: 20px;
}

.offline-content {
  text-align: center;
  max-width: 400px;
}

.offline-icon {
  width: 80px;
  height: 80px;
  color: var(--error);
  margin: 0 auto 24px;
}

.offline-content h2 {
  font-family: var(--font-display);
  font-size: 2rem;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.offline-content p {
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.6;
}

/* ============================================
   Responsive
   ============================================ */

/* Desktop - Large screens */
@media (min-width: 1400px) {
  .main-content {
    max-width: 1400px;
    margin-left: 280px;
    margin-right: auto;
  }
}

@media (max-width: 1200px) {
  .main-content {
    max-width: 100%;
  }
  
  .stats-cards {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .groups-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}

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

@media (max-width: 768px) {
  .dash-header {
    display: flex;
  }

  .dashboard {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    left: -300px;
    top: 0;
    bottom: 0;
    width: 260px;
    z-index: 120;
    transition: left var(--transition-fast);
  }

  .sidebar.open {
    left: 0;
  }

  .main-content {
    margin-left: 0;
    padding-top: 12px;
  }

  .stats-cards {
    grid-template-columns: 1fr;
  }
  
  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .page-actions {
    width: 100%;
  }
  
  .page-actions .btn {
    flex: 1;
  }
  
  .groups-grid {
    grid-template-columns: 1fr;
  }
  
.group-detail {
  padding: 0;
  max-width: 100%;
}
  
  .group-detail-header {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
  }
  
  .group-code {
    width: 100%;
    justify-content: center;
  }
  
.group-content {
  padding: 0;
  max-width: 100%;
}
  
  .chat-messages {
    height: 400px;
    min-height: 400px;
    max-height: none;
    padding: 16px;
  }
  
  .chat-message {
    max-width: 85%;
  }
  
  .chat-input {
    padding: 12px;
  }
  
  .setting-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .theme-switcher {
    width: 100%;
  }
  
  .theme-btn {
    flex: 1;
    justify-content: center;
  }
  
  .stat-card {
    padding: 20px;
  }
  
  .members-list,
  .group-stats-list {
    padding: 16px;
  }
  
  .modal {
    padding: 28px;
    max-width: 90%;
  }
  
  .page-title {
    font-size: 2rem;
  }
}

