/* KPIs Fitness - Unified App Styles */

/* ===== CSS VARIABLES ===== */
:root {
  --brand: #246bfa;
  --bg: #f6f8fb;
  --panel: #ffffff;
  --ink: #0f172a;
  --muted: #6b7280;
  --good: #12b886;
  --warn: #f59f00;
  --bad: #e03131;
  --shadow: 0 6px 20px rgba(15, 23, 42, 0.06);
  --border: #e5e7eb;
  --topbar-height: 56px;
  --kpi-primary: #2d6cdf;
  --kpi-secondary: #6c757d;
}

/* ===== GLOBAL STYLES ===== */
html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', sans-serif;
}

/* ===== LOGIN PAGE STYLES ===== */
/* Background subtle layers similar to app frame */
.bg-wrapper { position: fixed; inset: 0; pointer-events: none; }
.page-overlay { position: fixed; inset: 0; pointer-events: none; }

/* Centered container */
.login-container { width: 100%; max-width: 400px; padding: 20px; margin: 0 auto; z-index: 1; }

/* Card */
.login-card {
  background: var(--panel);
  border-radius: 16px;
  box-shadow: var(--shadow);
  border: 1px solid #eef2f7;
  padding: 28px;
}

/* Header */
.login-header { text-align: center; margin-bottom: 18px; }
.login-logo { font-size: 2rem; color: var(--brand); margin-bottom: 6px; display: block; }
.login-title { font-size: 1.4rem; font-weight: 700; margin: 0; color: var(--ink); }
.login-subtitle { color: var(--muted); margin-top: 6px; font-size: 0.95rem; }

/* Form */
.form-group { margin-bottom: 16px; }
.form-label { display: block; color: var(--ink); font-weight: 600; margin-bottom: 6px; font-size: 0.9rem; }
.form-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #eef2f7;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-size: 1rem;
  transition: box-shadow .2s ease, border-color .2s ease;
  box-sizing: border-box;
}
.form-input::placeholder { color: #9aa4b2; }
.form-input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(36, 107, 250, 0.12);
}

/* Button */
.login-btn {
  width: 100%;
  padding: 12px 14px;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.login-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(36,107,250,0.25); }
.login-btn:active { transform: translateY(0); filter: brightness(0.96); }

/* Alerts */
.alert { padding: 10px 12px; border-radius: 10px; margin-bottom: 14px; font-size: 0.9rem; }
.alert-danger { background: rgba(224, 49, 49, 0.1); border: 1px solid rgba(224, 49, 49, 0.25); color: #b42318; }

/* Theme toggle chip */
.theme-toggle { position: fixed; top: 16px; right: 16px; background: #fff; border: 1px solid var(--border); border-radius: 999px; padding: 8px; cursor: pointer; box-shadow: var(--shadow); z-index: 2; }
.theme-toggle:hover { background: #f8fafc; }
.theme-toggle i { color: var(--ink); font-size: 1.1rem; }

/* ===== DASHBOARD STYLES ===== */
/* Section wrapper */
.section.new-design { padding: 24px; }
.section.new-design .d-flex.gap-3 { gap: 12px !important; }

/* Header area inside section */
.section.new-design h1 { margin: 0; font-size: 26px; font-weight: 700; letter-spacing: 0.2px; }
.section.new-design .search { position: relative; display: flex; align-items: center; }
.section.new-design .search i { position: absolute; left: 10px; color: var(--muted); }
.section.new-design .search input {
  padding: 8px 12px 8px 32px; border-radius: 10px; border: 1px solid #eef2f7; outline: none;
  background: #fff; min-width: 220px;
}
.section.new-design .search input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(36,107,250,0.12); }

/* Cards */
.section.new-design .card { background: var(--panel); border-radius: 16px; box-shadow: var(--shadow); border: none; }
.section.new-design .card .card-header { background: transparent; border-bottom: 1px solid #eef2f7; }
.section.new-design .card .card-title { font-weight: 600; color: var(--muted); }
.section.new-design .card .metric-icon i { font-size: 18px; }
.section.new-design .card .card-text { font-weight: 700; letter-spacing: 0.2px; }

/* Alerts */
.section.new-design .alert { border-radius: 12px; border: 1px solid #eaeef4; box-shadow: 0 4px 14px rgba(15,23,42,0.05); }
.section.new-design .alert-primary { background: #e7f0ff; color: #1d4ed8; border-color: #d7e6ff; }
.section.new-design .alert-info { background: #eef6ff; color: #0b5ed7; border-color: #d9ebff; }

/* Badges for metric tags */
.section.new-design .badge.bg-light.text-dark { background: #f8fafc !important; color: #0f172a !important; border: 1px solid #eef2f7; }

/* Animations */
.section.new-design .fade-in-up { animation: kpi-fade-in-up .4s ease both; }
@keyframes kpi-fade-in-up { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* Charts canvas spacing */
.section.new-design canvas { display: block; }
.section.new-design .card-body { padding: 16px; }

/* Grid spacing refinements */
.section.new-design .row.mb-4 { margin-bottom: 1.25rem !important; }
.section.new-design .col-md-3.mb-3 { margin-bottom: 0.9rem !important; }

/* Text colors for states */
.section.new-design .text-danger { color: var(--bad) !important; }
.section.new-design .text-primary { color: var(--brand) !important; }
.section.new-design .text-success { color: var(--good) !important; }
.section.new-design .text-warning { color: var(--warn) !important; }

/* Topbar and sidebar subtle polish without altering structure */
.topbar { background: var(--brand) !important; color: #fff; border-bottom: none; box-shadow: 0 2px 10px rgba(36,107,250,0.15); }
.topbar .btn.btn-outline-light { border-color: rgba(255,255,255,.6); color: #fff; background: rgba(255,255,255,0.08); }
.topbar .btn.btn-outline-light:hover { background: rgba(255,255,255,.2); }
.sidebar { background: #fff; border-right: 1px solid var(--border); box-shadow: 2px 0 12px rgba(15,23,42,0.08); }
.sidebar .menu .menu-item { border-radius: 12px; }
.sidebar .menu .menu-item:hover { background: rgba(36,107,250,0.12); color: var(--brand); }

/* Bootstrap tweaks inside new design section only */
.section.new-design .badge { font-weight: 600; border-radius: 999px; }
.section.new-design h5 { font-size: 18px; margin: 0; }
.section.new-design h6 { font-size: 13px; text-transform: none; }

/* --- Layout: Sidebar + Main --- */
/* Fixed sidebar and offset main to emulate the newdesign frame */
.sidebar {
  position: fixed;
  top: var(--topbar-height); left: 0;
  height: calc(100vh - var(--topbar-height));
  width: 240px;
  padding: 16px 12px 56px 12px; /* leave room for collapse button */
  overflow-y: auto;
  box-shadow: 0 6px 20px rgba(15,23,42,0.04);
  z-index: 1000;
}
.sidebar .brand { display: flex; align-items: center; gap: 8px; font-weight: 700; letter-spacing: .3px; color: var(--ink); padding: 6px 8px 12px; }
.sidebar .brand i { color: var(--brand); font-size: 20px; }
.sidebar .menu { margin-top: 6px; }
.sidebar .menu .menu-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; text-decoration: none; color: #111827; }
.sidebar .menu .menu-item i { font-size: 18px; }
.sidebar .menu .menu-item span { font-weight: 500; }
.sidebar .menu .menu-item:focus { outline: 2px solid rgba(36,107,250,0.25); outline-offset: 2px; border-radius: 10px; }

/* Collapse behavior */
.collapse-btn { position: absolute; bottom: 10px; right: 10px; border: 1px solid var(--border); border-radius: 10px; background: #fff; padding: 6px 8px; color: #111827; box-shadow: 0 2px 8px rgba(15,23,42,0.06); }
.sidebar.collapsed { width: 72px; }
.sidebar.collapsed .menu .menu-item { justify-content: center; }
.sidebar.collapsed .menu .menu-item span { display: none; }
.sidebar.collapsed .brand span { display: none; }
.sidebar.collapsed .collapse-btn i { transform: rotate(180deg); }

/* Main content offset */
.main { margin-left: 240px; min-height: 100vh; background: var(--bg); padding-top: var(--topbar-height); overflow-y: auto; }

/* --- Topbar --- */
.topbar { height: 56px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; position: fixed; top: 0; left: 0; right: 0; z-index: 1100; width: 100%; }
.topbar .hamburger { display: none; background: transparent; border: 0; color: #fff; font-size: 22px; }
.topbar .topbar-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.topbar .notifications { position: relative; }
.topbar .user { display: flex; align-items: center; gap: 10px; color: #fff; }
.topbar .btn.btn-link { color: #fff; text-decoration: none; }
.topbar .btn.btn-link:hover { color: #fff; opacity: .92; }
.topbar .user img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255,255,255,0.4); }
.topbar .user-name-link { color: #fff; text-decoration: none; }
.topbar .user-name-link:hover { text-decoration: underline; }
.topbar .badge.bg-warning { background: #fde68a !important; color: #7c2d12 !important; }

/* Collapsed sidebar adjusts main */
.sidebar.collapsed + .main { margin-left: 72px; }

/* --- Responsive --- */
@media (max-width: 920px) {
  .sidebar { transform: translateX(-100%); transition: transform .25s ease; box-shadow: 0 20px 60px rgba(15,23,42,0.28); }
  .sidebar.open-mobile { transform: translateX(0); }
  .main { margin-left: 0; }
  .topbar .hamburger { display: inline-flex; align-items: center; justify-content: center; }
}

/* ===== BOARD LAYOUT STYLES ===== */
/* Board New Design Styles - scoped to .board-board-apple */

.board-board-apple {
  --brand: #246bfa;
  --bg: #f6f8fb;
  --panel: #ffffff;
  --ink: #0f172a;
  --muted: #6b7280;
  --border: #eaeef4;
  --border-strong: #eef2f7;
  --shadow: 0 6px 20px rgba(15,23,42,.06);
}

/* Header */
.board-board-apple .board-board-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: nowrap;
  width: 100%;
  padding: 16px 28px 0 28px;
}

.board-board-apple .board-board-header .board-title .name {
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
}

.board-board-apple .board-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.board-board-apple .board-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.board-board-apple .board-search {
  position: relative;
  display: inline-flex;
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 12px 6px 34px; /* left space for icon */
  height: 34px;
  box-sizing: border-box;
  min-width: 260px;
}

.board-board-apple .board-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  color: var(--muted);
  fill: currentColor;
  pointer-events: none;
}

.board-board-apple .board-search input {
  border: 0;
  outline: 0;
  width: 100%;
  font-size: 14px;
  color: var(--ink);
  background: transparent;
  height: 100%;
  padding: 0;
}

.board-board-apple .board-search input::placeholder {
  color: var(--muted);
}

@media (max-width: 768px) {
  .board-board-apple .board-board-header {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .board-board-apple .board-search {
    width: 100%;
    min-width: 0;
  }
}

/* Layout paddings */
.board-board-apple .board-board-main-apple {
  padding: 24px 28px;
}

/* Board container: horizontal scroll with flex layout */
.board-board-apple .board-board-container-apple {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  align-items: stretch;
  width: 100%;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

/* Drag scroll visual feedback */
.board-board-apple .board-board-container-apple.dragging-active {
  cursor: grabbing !important;
  user-select: none;
}

.board-board-apple .board-board-container-apple.dragging-active {
  scrollbar-width: none; /* Hide scrollbar while dragging for cleaner look */
}

.board-board-apple .board-board-container-apple.dragging-active::-webkit-scrollbar {
  display: none; /* Hide scrollbar in webkit browsers while dragging */
}

/* Column */
.board-board-apple .board-column-apple {
  background: var(--column-bg, var(--panel));
  border-radius: 12px;
  padding: 12px;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow);
  /* Ensure columns do not shrink and have a minimum width */
  flex: 0 0 300px; /* do not grow, do not shrink, base width 300px */
  min-width: 300px;
  min-height: 600px;
}

.board-board-apple .board-card-list-apple {
  min-height: 160px;
}

.board-board-apple .board-column-header-apple {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 0 8px 0;
}

.board-board-apple .board-column-title-apple {
  margin: 0;
  font-size: 16px;
  color: var(--ink);
}

.board-board-apple .board-badge-apple {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--column-badge-bg, #e7f0ff);
  color: var(--column-badge-color, #1d4ed8);
}

.board-board-apple .board-column-action-btn-apple {
  background: transparent;
  border: none;
  color: var(--muted);
}

/* Card */
.board-board-apple .board-card-apple {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 10px;
}

.board-board-apple .board-card-apple.board-card-warning {
  background: #fff4e5;
  border-color: #f8b467;
}

.board-board-apple .board-card-apple.board-card-danger {
  background: #ffe5e5;
  border-color: #ff6b6b;
}

.board-board-apple .board-card-title-apple {
  font-weight: 600;
  color: var(--ink);
}

.board-board-apple .board-card-description-apple,
.board-board-apple .board-card-meta-apple {
  color: var(--muted);
  font-size: 13px;
}

.board-board-apple .card-fields {
  color: var(--muted);
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Labels & Tags (color provided inline) */
.board-board-apple .board-label-apple,
.board-board-apple .board-tag-apple {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 8px;
  font-size: 11px;
  margin-right: 6px;
}

/* Add card button */
.board-board-apple .board-add-card-apple {
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* User assign box */
.board-board-apple .board-user-assign-apple {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  background: #fff;
}

.board-board-apple .board-user-assign-details {
  display: flex;
  flex-direction: column;
  font-size: 0.75rem;
  line-height: 1.2;
}

.board-board-apple .board-user-name-row {
  display: flex;
  flex-direction: row;
  gap: 8px;
  margin-bottom: 4px;
}

.board-board-apple .board-user-name-row .board-card-field-entry {
  flex: 1 1 0;
}

.board-board-apple .board-user-assign-name {
  font-weight: 600;
  color: var(--text, #111);
}

.board-board-apple .board-user-assign-phone {
  color: #6c757d;
}

.board-board-apple .card-comment-entry {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-strong);
}

.board-board-apple .card-comment-entry:last-child {
  border-bottom: none;
}

.board-board-apple .comment-author-bubble {
  min-width: 36px;
  min-height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), #3b82f6);
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 6px rgba(36, 107, 250, 0.25);
}

.board-board-apple .comment-body {
  flex: 1;
}

.board-board-apple .comment-meta {
  margin-bottom: 4px;
}

.board-board-apple #cardComments p {
  font-size: 14px;
  color: var(--ink);
}

/* Drag & Drop visuals (moved from inline <style>) */
.board-board-apple .card-item {
  cursor: grab;
  transition: transform 0.2s;
}

.board-board-apple .card-item:active {
  cursor: grabbing;
}

.board-board-apple .card-item.dragging {
  opacity: 0.5;
  transform: rotate(5deg);
}

/* Create Column Modal positioning: ensure it opens below the top bar */
#addColumnModal {
  /* Prefer Bootstrap variable where supported */
  --bs-modal-margin: calc(var(--topbar-height, 56px) + 48px);
}

/* Fallback for environments not honoring --bs-modal-margin properly */
#addColumnModal .modal-dialog {
  margin-top: var(--add-column-modal-top, calc(var(--topbar-height, 56px) + 48px));
}

/* ===== CUSTOM FIELDS STYLES ===== */
.custom-fields-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.custom-fields-grid .custom-field-item {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
}

.custom-fields-grid .custom-field-item .form-label {
    font-size: 0.85rem;
    line-height: 1.1;
}

.custom-fields-grid .custom-field-item .form-text {
    font-size: 0.75rem;
    line-height: 1.1;
}

.custom-fields-grid .custom-field-item .form-control {
    font-size: 0.85rem;
    padding: 0.35rem 0.5rem;
}

/* ===== DASHBOARD STYLES ===== */
.dashboard-columns {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
}

@media (max-width: 1199.98px) {
    .dashboard-columns {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .dashboard-columns {
        grid-template-columns: minmax(0, 1fr);
    }
}

.dashboard-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    min-height: 60px;
    padding: 0.25rem 0;
    border-radius: 0.75rem;
    transition: background-color 0.2s ease;
}

.dashboard-column-cards {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.dashboard-column-cards .dashboard-card {
    height: 100%;
}

.dashboard-column.drop-target {
    background-color: rgba(79, 70, 229, 0.08);
}

.dashboard-card.is-dragging {
    opacity: 0.45;
}

.dashboard-charts-section .card {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: box-shadow 0.15s ease-in-out;
}

.dashboard-charts-section .card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.dashboard-charts-section .card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
}

.comparison-item {
    background-color: #f8f9fa;
    padding: 0.5rem;
    border-radius: 0.375rem;
    border: 1px solid #e9ecef;
    cursor: pointer;
    width: 185px;
}

.comparison-item:hover {
    background-color: #e9ecef;
}

.comparison-item .text-muted {
    font-size: 0.75rem;
}

.comparison-wrapper {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
}

.comparison-percentage {
    font-size: 0.85rem;
}

.comparison-arrow {
    font-size: 0.9rem;
    margin-right: 0.35rem;
}

.comparison-diff {
    font-size: 0.85rem;
    font-weight: 600;
    color: #212529;
}

.evolution-chart {
    border-top: 1px solid #dee2e6;
    padding-top: 1rem;
}

.evolution-chart h6 {
    font-size: 0.875rem;
    font-weight: 500;
}

.evolution-chart canvas {
    max-height: 200px !important;
    width: 100% !important;
}

.average-summary {
    border-top: 1px solid #dee2e6;
    padding-top: 0.75rem;
}

.average-summary .average-value {
    font-size: 1rem;
    font-weight: 600;
    color: #212529;
}

/* ===== MODAL AND CONTEXT MENU STYLES ===== */
.modal-dialog {
    margin-top: 80px; /* Respect top bar */
}

/* Context menu styling required by tests */
.context-menu {
    position: absolute;
    display: none;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    min-width: 160px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    z-index: 2000;
    padding: 6px 0;
}
.context-menu-item {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
    color: #222;
}
.context-menu-item:hover {
    background: #f5f5f5;
}

/* ===== USER NAME LINK STYLES ===== */
.user-name-link {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

.user-name-link:hover {
    color: var(--primary);
}

.user-name-link .user-name {
    font-weight: 500;
}

/* ===== BADGE POSITION FIXES ===== */
.badge {
    position: static !important;
    top: auto !important;
    right: auto !important;
}

/* ===== MODAL TOP MARGIN ===== */
.modal-top-margin {
    margin-top: 80px;
}

/* ===== INTRUSIVE ALERT MODAL STYLES ===== */
#intrusiveAlertModal .modal-content {
    border-radius: 12px;
}

#intrusiveAlertModal .modal-header.bg-warning {
    background-color: #246bfa !important;
    border-bottom: 1px solid #ffeaa7;
}

#intrusiveAlertModal .modal-footer.bg-light {
    background-color: #f8f9fa !important;
    border-top: 1px solid #dee2e6;
}

#intrusiveAlertModal .alert-message {
    font-size: 1.1rem;
    line-height: 1.6;
}

#intrusiveAlertModal .alert-message .alert-link {
    color: #0d6efd;
    text-decoration: none;
    font-weight: 500;
}

#intrusiveAlertModal .alert-message .alert-link:hover {
    color: #0a58ca;
    text-decoration: underline;
}

/* Ensure modal appears above the fixed navigation bar */
#intrusiveAlertModal {
    z-index: 1060 !important;
}

#intrusiveAlertModal .modal-dialog {
    margin-top: 100px !important;
}

/* ===== DASHBOARD CHART AND MODAL STYLES ===== */
.dashboard-chart-container {
    height: 200px;
    position: relative;
}

.large-chart-icon {
    font-size: 3rem;
}

.compare-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1050;
    top: 80px;
}

.compare-modal {
    display: none;
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: var(--bs-body-bg, #fff);
    color: var(--bs-body-color, #000);
    border-radius: 0.5rem;
    width: 360px;
    max-width: 92vw;
    z-index: 1060;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    margin-top: 80px;
}

/* ===== DATA ENTRY ANIMATION DELAYS ===== */
.data-section-delay-1 {
    animation-delay: 0.1s;
}

.data-section-delay-2 {
    animation-delay: 0.2s;
}

.data-section-delay-3 {
    animation-delay: 0.3s;
}

.save-button-delay {
    animation-delay: 0.4s;
}

/* ===== REPORTS COMPARISON CHART ===== */
.comparison-chart-container {
    height: 400px;
    position: relative;
}

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

/* ===== USER MANAGEMENT STYLES ===== */
.user-card {
    margin-bottom: 1rem;
    padding: 1.25rem;
    background: var(--card-bg);
    backdrop-filter: blur(14px);
    border-radius: var(--radius);
    border: var(--border);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.user-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px -5px rgba(0,0,0,0.15);
}

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

.user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1.25rem;
}

.user-details {
    flex: 1;
}

.user-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.user-email {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.user-roles {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.role-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.user-actions {
    display: flex;
    gap: 0.5rem;
}

.gym-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.large-user-icon {
    font-size: 48px;
    color: var(--text-secondary);
}

.large-success-icon {
    font-size: 48px;
}

/* ===== REPORTS PAGE STYLES ===== */

/* Comparison buttons */
.compare-btn {
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.compare-btn i {
    transition: transform 0.2s ease;
}

.compare-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.compare-btn.active {
    background-color: #198754 !important;
    border-color: #198754 !important;
}

.compare-btn.active i {
    transform: scale(1.1);
}

/* Chart section */
#comparison-chart-section {
    transition: all 0.3s ease;
    opacity: 1;
}

#comparison-chart-section.hidden {
    opacity: 0;
    height: 0;
    overflow: hidden;
    margin: 0;
    padding: 0;
    border: none;
}

.legend-color-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 0.5rem;
    transition: opacity 0.2s ease;
    border: 1px solid rgba(0,0,0,0.2);
}

.comparison-legend-item {
    cursor: pointer;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    background-color: #f8f9fa;
    transition: all 0.2s ease;
    font-size: 0.85rem;
    color: #495057;
}

.comparison-legend-item:hover {
    background-color: #e9ecef;
}

.comparison-legend-item.text-muted {
    opacity: 0.7;
}

/* Loading state */
.chart-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    min-height: 200px;
}

.filters-section {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 0.375rem;
}

.summary-section {
    background-color: #e9ecef;
    padding: 1rem;
    border-radius: 0.375rem;
}

.informe-section .card {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: box-shadow 0.15s ease-in-out;
}

.informe-section .card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.informe-section .card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
}

.comparison-item {
    background-color: #f8f9fa;
    padding: 0.5rem;
    border-radius: 0.375rem;
    border: 1px solid #e9ecef;
}

.comparison-item .badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

.comparison-item .text-muted {
    font-size: 0.75rem;
}

.evolution-chart {
    border-top: 1px solid #dee2e6;
    padding-top: 1rem;
}

.evolution-chart h6 {
    font-size: 0.875rem;
    font-weight: 500;
}

.evolution-chart canvas {
    max-height: 200px !important;
    width: 100% !important;
}

.data-section .card {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.data-section .card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.btn-group .btn {
    font-size: 0.875rem;
}

.badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

.text-muted {
    font-size: 0.75rem;
}

/* Custom dropdown styles */
.custom-dropdown { position: relative; }
.custom-dropdown .btn { background-color: #fff; }
.custom-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    display: none;
    width: max-content;
    min-width: 100%;
    padding: 0.5rem 0.75rem;
    margin-top: 0.25rem;
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,.15);
    max-height: 320px;
    overflow: auto;
}
.custom-dropdown-menu.show { display: block; }
.custom-dropdown-content { padding-left: 0.25rem; padding-right: 0.25rem; }
.custom-dropdown-content .dropdown-group { padding-bottom: 0.25rem; border-bottom: 1px dashed #eee; margin-bottom: 0.5rem; }
.custom-dropdown-content .dropdown-group:last-child { border-bottom: none; }
.custom-dropdown-content .dropdown-group-title { font-weight: 600; font-size: 0.85rem; margin: 0.25rem 0 0.35rem 0.25rem; }
.custom-dropdown-content .dropdown-item { display: flex; align-items: center; gap: 0.5rem; padding: 0.25rem 0.25rem; }
.custom-dropdown-menu .form-check-input { position: static; margin-left: 0; margin-right: 0.5rem; appearance: auto; -webkit-appearance: checkbox; -moz-appearance: checkbox; }
.custom-dropdown-menu .form-check { padding-left: 0; margin-bottom: 0.25rem; display: flex; align-items: center; }

/* Compare button spacing inside card headers */
.compare-btn { margin-left: 0.5rem; }

.compare-single-btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

.compare-single-btn.active {
    background-color: #198754 !important;
    border-color: #198754 !important;
    color: white !important;
}

/* Comparison Chart Styles */
#comparison-chart {
    width: 100% !important;
    height: 400px !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #comparison-chart {
        height: 300px !important;
    }
    
    .comparison-legend-item {
        font-size: 0.8rem;
        padding: 0.2rem 0.5rem;
    }
}

/* Empty data icon */
.empty-data-icon {
    font-size: 3rem;
}

.settings-inline-form {
    display: inline;
}

/* Base authenticated styles */
.next-task-icon {
    font-size: 18px;
}

.notifications-relative {
    position: relative;
}

.notifications-icon {
    font-size: 20px;
}

.notifications-badge-hidden {
    display: none;
}

.notifications-dropdown {
    position: fixed;
    width: 320px;
    display: none;
    z-index: 100000;
}

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

/* Small empty icon */
.small-empty-icon {
    font-size: 2rem;
}
