:root {
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --success: #16a34a;
  --success-hover: #15803d;
  --danger: #dc2626;
  --warning: #d97706;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-500: #64748b;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.12);
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: #f8fafc;
  color: var(--gray-800);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.app-layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.app-header {
  background: #ffffff;
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--gray-900);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.brand-icon {
  font-size: 1.5rem;
}

.user-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--gray-100);
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--gray-700);
}

.btn-logout {
  color: var(--gray-500);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.35rem 0.6rem;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

.btn-logout:hover {
  background: var(--gray-100);
  color: var(--danger);
}

/* Main */
.main-content {
  flex: 1;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

/* Toolbar & Tabs */
.board-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.tab-pills {
  display: flex;
  background: var(--gray-200);
  padding: 4px;
  border-radius: var(--radius-md);
  gap: 4px;
}

.tab-link {
  text-decoration: none;
  color: var(--gray-700);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s;
}

.tab-link.active {
  background: #ffffff;
  color: var(--gray-900);
  box-shadow: var(--shadow-sm);
}

.count-tag {
  background: var(--gray-100);
  font-size: 0.75rem;
  padding: 2px 6px;
  border-radius: 9999px;
  color: var(--gray-500);
}

.tab-link.active .count-tag {
  background: var(--primary);
  color: #fff;
}

/* Filter Strip */
.filter-strip {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  overflow-x: auto;
  padding-bottom: 4px;
}

.filter-label {
  font-size: 0.85rem;
  color: var(--gray-500);
  font-weight: 600;
}

.filter-buttons {
  display: flex;
  gap: 0.5rem;
}

.chip {
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gray-700);
  background: #ffffff;
  border: 1px solid var(--gray-300);
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  white-space: nowrap;
  transition: all 0.15s;
}

.chip:hover {
  background: var(--gray-100);
}

.chip.active {
  background: var(--gray-800);
  color: #ffffff;
  border-color: var(--gray-800);
}

/* Grid of Cards */
.tasks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}

/* Task Card - Płynna zmiana koloru od zielonego do czerwonego */
.task-card {
  background: var(--card-bg, #ffffff);
  border: 1.5px solid var(--border-color, var(--gray-200));
  border-left: 6px solid var(--accent-color, var(--primary));
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.4s, background-color 0.4s;
  position: relative;
}

.task-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.badge {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 3px 8px;
  border-radius: 9999px;
}

.badge-safe {
  background: #dcfce7;
  color: #15803d;
}

.badge-notice {
  background: #fef9c3;
  color: #a16207;
}

.badge-warning {
  background: #ffedd5;
  color: #c2410c;
}

.badge-urgent {
  background: #fee2e2;
  color: #b91c1c;
  animation: pulse 2s infinite;
}

.badge-overdue {
  background: #7f1d1d;
  color: #ffffff;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.75; }
}

.visibility-tag {
  font-size: 0.8rem;
  color: var(--gray-500);
  font-weight: 600;
}

.card-body {
  flex: 1;
  margin-bottom: 1rem;
}

.task-text {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--gray-900);
  white-space: pre-wrap;
  word-break: break-word;
}

.card-time-indicator {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(4px);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(0, 0, 0, 0.05);
  margin-bottom: 0.85rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
}

.time-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--gray-700);
}

.time-countdown {
  font-weight: 700;
  color: var(--accent-color, var(--gray-800));
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  padding-top: 0.75rem;
}

.author-meta {
  font-size: 0.8rem;
  color: var(--gray-500);
}

.card-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.form-inline {
  display: inline-block;
  margin: 0;
}

/* Przyciski */
.btn {
  font-family: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-md);
  padding: 0.6rem 1.2rem;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s;
}

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

.btn-success {
  background: var(--success);
  color: #fff;
}
.btn-success:hover {
  background: var(--success-hover);
}

.btn-secondary {
  background: var(--gray-200);
  color: var(--gray-700);
}
.btn-secondary:hover {
  background: var(--gray-300);
}

.btn-sm {
  padding: 0.35rem 0.65rem;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}

.btn-done {
  background: #16a34a;
  color: white;
}
.btn-done:hover {
  background: #15803d;
}

.btn-outline-done {
  background: #ffffff;
  border: 1px solid var(--gray-300);
  color: var(--gray-700);
}
.btn-outline-done:hover {
  background: var(--gray-100);
}

.btn-edit-ghost {
  background: transparent;
  color: var(--gray-500);
}
.btn-edit-ghost:hover {
  background: #eef2ff;
  color: var(--primary);
}

.btn-danger-ghost {
  background: transparent;
  color: var(--gray-500);
}
.btn-danger-ghost:hover {
  background: #fee2e2;
  color: var(--danger);
}

.btn-block {
  width: 100%;
}

/* Modale */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

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

.modal-dialog {
  background: #ffffff;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  box-shadow: var(--shadow-lg);
  padding: 1.5rem;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-dialog.modal-sm {
  max-width: 400px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.modal-header h3, .modal-header h4 {
  font-weight: 700;
  color: var(--gray-900);
}

.btn-close {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: var(--gray-500);
  cursor: pointer;
  line-height: 1;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.modal-task-preview {
  background: var(--gray-100);
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 1rem;
  border-left: 3px solid var(--primary);
}

/* Formularze */
.form-group {
  margin-bottom: 1.15rem;
}

.form-group label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 0.4rem;
}

.form-control {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--gray-900);
  background-color: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.form-help {
  display: block;
  font-size: 0.78rem;
  color: var(--gray-500);
  margin-top: 0.35rem;
}

.visibility-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
}

.custom-profiles {
  background: var(--gray-50);
  border: 1px dashed var(--gray-300);
  padding: 0.75rem;
  border-radius: var(--radius-sm);
}

.select-hint {
  font-size: 0.8rem;
  color: var(--gray-500);
  margin-bottom: 0.4rem;
}

.checkbox-group {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.checkbox-pill {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: #ffffff;
  border: 1px solid var(--gray-300);
  padding: 0.25rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  cursor: pointer;
}

/* Empty State */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 1rem;
  background: #ffffff;
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius-lg);
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.empty-state h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 0.5rem;
}

.empty-state p {
  color: var(--gray-500);
  font-size: 0.95rem;
  max-width: 400px;
  margin: 0 auto;
}

/* Login Page */
.login-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(80vh - 100px);
}

.login-card {
  background: #ffffff;
  width: 100%;
  max-width: 440px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 2.25rem;
  border: 1px solid var(--gray-200);
}

.login-header {
  text-align: center;
  margin-bottom: 1.75rem;
}

.login-logo-badge {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.login-header h2 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--gray-900);
}

.subtitle {
  font-size: 0.9rem;
  color: var(--gray-500);
  margin-top: 0.25rem;
}

.profile-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
  margin-top: 0.35rem;
}

.profile-radio-card input {
  display: none;
}

.profile-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 0.5rem;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s;
}

.profile-badge .avatar {
  font-size: 1.8rem;
  margin-bottom: 0.25rem;
}

.profile-badge .name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gray-700);
}

.profile-radio-card input:checked + .profile-badge {
  border-color: var(--primary);
  background: #eef2ff;
}

.profile-radio-card input:checked + .profile-badge .name {
  color: var(--primary);
}

.alert-danger {
  background: #fee2e2;
  border: 1px solid #f87171;
  color: #b91c1c;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.login-footer {
  text-align: center;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--gray-200);
  font-size: 0.8rem;
  color: var(--gray-500);
}

/* Footer */
.app-footer {
  text-align: center;
  padding: 1.5rem;
  color: var(--gray-500);
  font-size: 0.8rem;
  border-top: 1px solid var(--gray-200);
  background: #ffffff;
}

/* ==================== NOWE FUNKCJE: PUNKTY, AKCEPTACJA, CYKLICZNOŚĆ ==================== */

.user-points-badge {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 9999px;
  margin-left: 0.25rem;
  box-shadow: 0 1px 2px rgba(217, 119, 6, 0.25);
}

/* Scoreboard (Pasek punktacji domowników) */
.scoreboard-bar {
  background: #ffffff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  box-shadow: var(--shadow-sm);
}

.scoreboard-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--gray-700);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.scoreboard-items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.score-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.85rem;
}

.score-pill.current-user {
  background: #fef3c7;
  border-color: #fcd34d;
}

.score-name {
  font-weight: 600;
  color: var(--gray-800);
}

.score-pts {
  font-weight: 800;
  color: #b45309;
  background: #fde68a;
  padding: 1px 7px;
  border-radius: 9999px;
  font-size: 0.78rem;
}

/* Powiadomienie o zadaniach do akceptacji */
.approval-banner {
  background: linear-gradient(90deg, #ede9fe, #f3e8ff);
  border: 1.5px solid #a78bfa;
  border-radius: var(--radius-md);
  padding: 0.85rem 1.15rem;
  margin-bottom: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.approval-banner-text {
  color: #4c1d95;
  font-size: 0.92rem;
}

.btn-approve-banner {
  background: #7c3aed;
  color: #ffffff;
  text-decoration: none;
}
.btn-approve-banner:hover {
  background: #6d28d9;
}

.chip-badge {
  background: #ef4444;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 9999px;
  margin-left: 4px;
}

/* Nagłówek karty i odznaki punktów / statusu */
.header-badges {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.badge-pending {
  background: #ede9fe;
  color: #6d28d9;
  border: 1px solid #c4b5fd;
}

.points-tag {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fcd34d;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 9999px;
}

.points-tag.awarded {
  background: #dcfce7;
  color: #15803d;
  border-color: #86efac;
}

.card-meta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.65rem;
}

.meta-pill {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.pill-recurrence {
  background: #e0f2fe;
  color: #0369a1;
}

.pill-approval {
  background: #f3e8ff;
  color: #6b21a8;
}

/* Boks weryfikacji na karcie (Do akceptacji) */
.pending-approval-box {
  background: rgba(237, 233, 254, 0.85);
  border: 1px dashed #8b5cf6;
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  margin-bottom: 0.85rem;
  font-size: 0.84rem;
  color: #4c1d95;
}

.pending-info {
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.pending-creator-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(139, 92, 246, 0.2);
}

.btn-approve {
  background: #7c3aed;
  color: #ffffff;
}
.btn-approve:hover {
  background: #6d28d9;
}

.btn-reject {
  background: #ffffff;
  border: 1px solid #f87171;
  color: #dc2626;
}
.btn-reject:hover {
  background: #fee2e2;
}

/* Sekcje w formularzach (Weryfikacja, Punkty, Cykliczność) */
.form-section-box {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 0.9rem 1rem;
  margin-bottom: 1rem;
}

.section-box-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 0.65rem;
}

.checkbox-option {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--gray-700);
  cursor: pointer;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.checkbox-option input {
  margin-top: 3px;
}

.points-input-row label {
  display: block;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 0.35rem;
}

.points-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.input-pts {
  width: 90px !important;
  font-weight: 700;
  text-align: center;
}

.quick-pts-btns {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
}

.btn-pts-preset {
  background: #ffffff;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.55rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--gray-700);
  cursor: pointer;
  transition: all 0.15s;
}
.btn-pts-preset:hover {
  background: #fef3c7;
  border-color: #f59e0b;
  color: #b45309;
}

.recurrence-interval-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.rec-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-700);
}

.input-rec-val {
  width: 80px !important;
  text-align: center;
  font-weight: 700;
}

.input-rec-unit {
  width: 110px !important;
}

.approve-performer-info {
  font-size: 0.92rem;
  color: var(--gray-700);
  background: #f5f3ff;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid #ddd6fe;
}

/* ==================== PANEL ADMINISTRATORA ==================== */

.btn-admin-nav {
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.btn-admin-nav:hover, .btn-admin-nav.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.admin-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.admin-header h2 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--gray-900);
}

.alert-success {
  background: #dcfce7;
  border: 1px solid #86efac;
  color: #15803d;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: #ffffff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow-sm);
}

.stat-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.stat-value {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--gray-900);
  margin-top: 0.2rem;
}

.stat-purple { color: #7c3aed; }
.stat-green { color: #16a34a; }

.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 1.5rem;
}

.admin-card {
  background: #ffffff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.admin-card-header {
  border-bottom: 1px solid var(--gray-200);
  padding-bottom: 0.85rem;
  margin-bottom: 1.25rem;
}

.admin-card-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gray-900);
}

.admin-desc {
  font-size: 0.88rem;
  color: var(--gray-500);
  margin-bottom: 1rem;
}

.setting-toggle-item {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 0.85rem;
}

.toggle-label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
}

.toggle-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--primary);
  cursor: pointer;
}

.toggle-text {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.toggle-text strong {
  font-size: 0.95rem;
  color: var(--gray-900);
}

.toggle-text span {
  font-size: 0.82rem;
  color: var(--gray-500);
  line-height: 1.4;
}

.horizon-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.4rem;
}

.admin-card-footer {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--gray-200);
  display: flex;
  justify-content: flex-end;
}

.users-admin-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.user-admin-row {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.user-admin-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-admin-avatar {
  font-size: 1.8rem;
}

.user-admin-name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--gray-900);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.role-badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 9999px;
}

.role-admin {
  background: #e0e7ff;
  color: #4338ca;
}

.role-member {
  background: var(--gray-200);
  color: var(--gray-700);
}

.user-admin-pts {
  font-size: 0.85rem;
  color: var(--gray-700);
  margin-top: 2px;
}

.user-admin-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--gray-300);
}

.pts-manage-form {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.input-pts-sm {
  width: 68px !important;
  padding: 0.3rem 0.4rem !important;
  font-size: 0.82rem !important;
  text-align: center;
  font-weight: 700;
}

.select-role-sm {
  width: auto !important;
  padding: 0.3rem 0.6rem !important;
  font-size: 0.8rem !important;
  font-weight: 600;
}

/* Responsywność */
@media (max-width: 640px) {
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .board-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  
  .tab-pills {
    width: 100%;
  }

  .tab-link {
    flex: 1;
    justify-content: center;
  }

  .toolbar-actions .btn {
    width: 100%;
  }

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