/**
 * FitMate - Dashboard Page Styles
 * 现代化 AI Fitness App 首页样式
 */

/* ========================================
   Hero Section
   ======================================== */
.hero-section {
    background: var(--gradient-primary);
    border-radius: var(--radius-xl);
    padding: 32px 32px 28px;
    margin-bottom: var(--spacing-lg);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    animation: fadeInUp 0.5s ease;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
    pointer-events: none;
}

.hero-left {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 20px;
    z-index: 1;
}

.hero-title {
    font-size: 30px;
    font-weight: 700;
    color: #fff;
    margin: 0;
    line-height: 1.25;
    letter-spacing: -0.5px;
}

.hero-title .user-name {
    color: rgba(255, 255, 255, 0.9);
}

.hero-subtitle {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.75);
    margin: 0;
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.hero-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 22px;
    font-weight: 600;
    font-size: 14px;
    border-radius: 12px;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hero-actions .btn-primary {
    background: #fff;
    color: var(--primary);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.hero-actions .btn-primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.hero-actions .btn-outline {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border: 1.5px solid rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(8px);
}

.hero-actions .btn-outline:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-2px);
}

.hero-right {
    display: flex;
    flex-direction: column;
    justify-content: center;
    z-index: 1;
}

.hero-today-list {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    padding: 20px 24px;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.today-label {
    font-size: 11px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.today-tasks {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.today-task {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 0;
}

.today-task .task-checkbox {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.today-task.completed .task-checkbox {
    background: #fff;
    border-color: #fff;
}

.today-task.completed .task-checkbox i {
    color: var(--primary);
    font-size: 11px;
}

.today-task .task-text {
    flex: 1;
    font-size: 14px;
    color: #fff;
}

.today-task.completed .task-text {
    text-decoration: line-through;
    opacity: 0.6;
}

.today-task .task-time {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

.today-task.empty-state-item {
    justify-content: center;
    padding: 12px 0;
}

.task-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.6);
}

.task-empty i {
    font-size: 20px;
    opacity: 0.5;
}

.task-empty span {
    font-size: 13px;
}

/* ========================================
   Goals + AI Row
   ======================================== */
.goals-ai-row {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 20px;
    margin-bottom: var(--spacing-lg);
    align-items: stretch;
}

.goals-ai-left {
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex: 1;
}

.goals-ai-right {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.goals-ai-right .fit-card {
    flex: 1;
}

/* Compact goals row */
.goals-compact-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.goal-card-mini {
    background: var(--surface);
    border-radius: 16px;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border: 1px solid var(--border-light);
    transition: all 0.25s ease;
    animation: fadeInUp 0.5s ease backwards;
}

.goal-card-mini:nth-child(1) { animation-delay: 0.05s; }
.goal-card-mini:nth-child(2) { animation-delay: 0.1s; }
.goal-card-mini:nth-child(3) { animation-delay: 0.15s; }

.goal-card-mini:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    border-color: transparent;
}

.goal-card-mini .goal-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
}

.goal-card-mini.weight-goal .goal-icon {
    background: rgba(59, 130, 246, 0.12);
    color: #3b82f6;
}

.goal-card-mini.calorie-goal .goal-icon {
    background: rgba(249, 115, 22, 0.12);
    color: #f97316;
}

.goal-card-mini.streak-goal .goal-icon {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
}

.goal-card-mini.weight-goal {
    position: relative;
}

.weight-add-btn {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.2s ease;
}

.weight-add-btn:hover {
    background: var(--primary);
    color: #fff;
    transform: scale(1.1);
}

.weight-inline-input {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--surface);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 16px;
    z-index: 10;
}

.weight-inline-input input {
    width: 90px;
    padding: 6px 10px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    background: var(--background);
    color: var(--text-primary);
    outline: none;
}

.weight-inline-input input:focus {
    border-color: var(--primary);
}

.weight-inline-input .btn-save,
.weight-inline-input .btn-cancel {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    transition: all 0.2s ease;
}

.weight-inline-input .btn-save {
    background: #22c55e;
    color: #fff;
}

.weight-inline-input .btn-save:hover {
    background: #16a34a;
}

.weight-inline-input .btn-cancel {
    background: var(--border-light);
    color: var(--text-secondary);
}

.weight-inline-input .btn-cancel:hover {
    background: var(--border);
}

/* ========================================
   Weight Trend Card - Edit Mode
   ======================================== */
.weight-edit-btn {
    padding: 6px 12px;
    background: var(--primary-light);
    color: var(--primary);
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.weight-edit-btn:hover {
    background: var(--primary);
    color: #fff;
}

.weight-trend-card .card-body {
    position: relative;
}

.weight-edit-mode {
    display: none;
    padding: 0;
}

.weight-edit-mode.active {
    display: block;
}

.weight-chart-container {
    display: block;
}

.weight-chart-container.hidden {
    display: none;
}

.weight-edit-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.weight-edit-back {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.weight-edit-back:hover {
    background: var(--border-light);
    color: var(--text-primary);
}

.weight-edit-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.weight-edit-range {
    display: flex;
    align-items: center;
    gap: 8px;
}

.weight-range-select {
    padding: 5px 28px 5px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 12px;
    color: var(--text-primary);
    background: var(--background);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
}

.weight-range-select:focus {
    outline: none;
    border-color: var(--primary);
}

/* ============================================
   Weight Management Mode (New)
   ============================================ */

.weight-mgmt-mode {
    display: none;
    flex-direction: column;
    gap: 12px;
    padding: 4px 0;
    min-height: 300px;
}

.weight-mgmt-mode.active {
    display: flex;
}

.weight-mgmt-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.weight-mgmt-back {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    background: var(--border-light);
    color: var(--text-secondary);
    border: none;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.weight-mgmt-back:hover {
    background: var(--border);
    color: var(--text-primary);
}

.weight-mgmt-title {
    flex: 1;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.weight-mgmt-range select {
    padding: 5px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface);
    color: var(--text-primary);
    font-size: 12px;
    cursor: pointer;
}

/* ============================================
   Weight Record Management - Card Layout
   ============================================ */

.weight-mgmt-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 380px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

/* === Date Group === */
.date-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.date-group-header {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0 2px;
}

.weight-mgmt-loading,
.weight-mgmt-empty {
    text-align: center;
    padding: 24px;
    color: var(--text-muted);
    font-size: 14px;
}

/* === Record Item (Card) === */
.weight-record-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
}

/* Default view state */
.record-item-view {
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.record-item-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.record-item-left {
    display: flex;
    align-items: baseline;
}

.record-item-right {
    display: flex;
    align-items: center;
    gap: 4px;
    padding-top: 2px;
}

.record-item-weight {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
    font-family: 'Inter', var(--font-sans);
    line-height: 1;
}

.record-item-unit {
    font-size: 13px;
    font-weight: 400;
    color: var(--text-muted);
    margin-left: 2px;
}

.record-item-datetime {
    font-size: 12px;
    color: var(--text-muted);
}

.record-item-note {
    font-size: 12px;
    color: var(--text-secondary);
}

/* === Edit State (expanded) === */
.record-item-edit {
    display: none;
    padding: 10px 14px;
    background: var(--background);
    border-top: 1px solid var(--border);
}

.weight-record-item.editing .record-item-edit {
    display: block;
}

.weight-record-item.editing .record-item-view {
    display: none;
}

/* Edit form fields */
.edit-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 10px;
}

.edit-field:last-of-type {
    margin-bottom: 0;
}

.edit-field label {
    font-size: 11px;
    color: var(--text-muted);
}

.edit-field input[type="date"],
.edit-field input[type="time"],
.edit-field input[type="number"],
.edit-field input[type="text"] {
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 13px;
    background: var(--surface);
    color: var(--text-primary);
    outline: none;
    width: 100%;
}

.edit-field input:focus {
    border-color: var(--primary);
}

.edit-field input.error {
    border-color: #ef4444;
}

.edit-field-row {
    display: flex;
    gap: 8px;
}

.edit-field-row input {
    flex: 1;
}

.edit-actions {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
    margin-top: 10px;
}

/* === Buttons === */
.btn-edit,
.btn-delete {
    padding: 2px 8px;
    height: 24px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
}

.btn-edit {
    background: var(--primary-light);
    color: var(--primary);
}

.btn-edit:hover {
    background: var(--primary);
    color: #fff;
}

.btn-delete {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.btn-delete:hover {
    background: #ef4444;
    color: #fff;
}

.btn-delete:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.tag-readonly {
    font-size: 11px;
    color: var(--text-muted);
    padding: 3px 7px;
    background: var(--border-light);
    border-radius: 4px;
}

.tag-new {
    font-size: 10px;
    color: #fff;
    padding: 2px 5px;
    background: var(--primary);
    border-radius: 4px;
}

.btn-save-edit,
.btn-cancel-edit {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-save-edit {
    background: var(--primary);
    color: #fff;
}

.btn-save-edit:hover {
    opacity: 0.9;
}

.btn-save-edit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-cancel-edit {
    background: var(--border-light);
    color: var(--text-secondary);
}

.btn-cancel-edit:hover {
    background: var(--border);
}

.weight-mgmt-add {
    padding-top: 10px;
}

.weight-mgmt-add-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 12px;
    background: var(--border-light);
    color: var(--text-secondary);
    border: 1px dashed var(--border);
    border-radius: 12px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.weight-mgmt-add-btn:hover {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary);
}

.goal-card-mini .goal-value {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'Inter', var(--font-sans);
    letter-spacing: -0.5px;
}

.goal-card-mini .goal-unit {
    font-size: 13px;
    color: var(--text-secondary);
}

.goal-card-mini .goal-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.goal-card-mini .goal-label {
    font-size: 11px;
    color: var(--text-muted);
}

.goal-card-mini .goal-target {
    font-size: 12px;
    color: var(--text-secondary);
}

.goal-card-mini .goal-target strong {
    color: var(--text-primary);
}

/* Weight trend card */
.weight-trend-card {
    animation: fadeInUp 0.5s ease 0.2s backwards;
}

.weight-trend-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.weight-trend-card .header-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.weight-trend-card .header-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(59, 130, 246, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #3b82f6;
}

.weight-trend-card .card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.weight-trend-card .card-subtitle {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 2px 0 0;
}

.weight-trend-summary {
    display: flex;
    align-items: center;
    gap: 8px;
}

.trend-change {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.trend-change.positive {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.trend-change.negative {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.weight-trend-card .chart-container {
    height: 280px;
}

/* ========================================
   Fit Card Base
   ======================================== */
.fit-card {
    background: var(--surface);
    border-radius: 18px;
    padding: 22px 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.fit-card .card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.fit-card .header-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.fit-card .header-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--primary);
}

.fit-card .card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.fit-card .card-subtitle {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 2px 0 0;
}

/* ========================================
   AI Coach Card
   ======================================== */
.ai-coach-card {
    animation: fadeInUp 0.5s ease 0.1s backwards;
}

.ai-coach-card .header-icon {
    background: var(--gradient-primary);
}

.ai-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #fff;
    animation: subtlePulse 3s ease-in-out infinite;
}

.ai-suggestions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 18px;
}

.ai-suggestion-item {
    display: flex;
    gap: 14px;
    padding: 14px 16px;
    background: var(--background);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ai-suggestion-item:hover {
    background: var(--border-light);
    transform: translateX(3px);
}

.suggestion-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: var(--primary);
    flex-shrink: 0;
}

.suggestion-content {
    flex: 1;
}

.suggestion-text {
    font-size: 13px;
    color: var(--text-primary);
    margin: 0 0 3px;
    line-height: 1.5;
}

.suggestion-tag {
    font-size: 11px;
    color: var(--text-muted);
}

.ai-actions {
    display: flex;
    gap: 10px;
}

.ai-actions .btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.ai-actions .btn-ghost {
    background: var(--background);
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
}

.ai-actions .btn-ghost:hover {
    background: var(--border-light);
    color: var(--text-primary);
}

.ai-actions .btn-primary {
    background: var(--gradient-primary);
    color: #fff;
    border: none;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.ai-actions .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

/* ========================================
   Reminders Card
   ======================================== */
.reminders-card {
    animation: fadeInUp 0.5s ease 0.15s backwards;
}

.reminders-card .card-header {
    margin-bottom: 14px;
}

.reminders-card .card-title {
    font-size: 15px;
}

.reminder-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.reminder-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--background);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.reminder-item:hover {
    background: var(--border-light);
}

.reminder-check {
    position: relative;
}

.reminder-check input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.reminder-check label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid var(--border);
    cursor: pointer;
    transition: all 0.2s ease;
}

.reminder-check input:checked + label {
    background: #22c55e;
    border-color: #22c55e;
}

.reminder-check input:checked + label .check-icon {
    opacity: 1;
}

.check-icon {
    opacity: 0;
    color: #fff;
    font-size: 11px;
}

.reminder-info {
    flex: 1;
}

.reminder-title {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

.reminder-detail {
    font-size: 12px;
    color: var(--text-secondary);
}

.reminder-detail strong {
    color: var(--text-primary);
}

.reminder-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}

.reminder-icon.water {
    background: #E0F2FE;
    color: #0284C7;
}

.reminder-icon.steps {
    background: #ECFDF5;
    color: #059669;
}

.reminder-icon.sleep {
    background: #EDE9FE;
    color: #7C3AED;
}

/* ========================================
   Today Training Card
   ======================================== */
.today-training-card {
    animation: fadeInUp 0.5s ease 0.25s backwards;
}

.training-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 500;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 20px;
}

.training-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 18px;
}

.stat-item {
    text-align: center;
    padding: 14px 10px;
    background: var(--background);
    border-radius: 12px;
}

.stat-value {
    display: block;
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'Inter', var(--font-sans);
    letter-spacing: -0.5px;
}

.stat-label {
    font-size: 11px;
    color: var(--text-secondary);
}

.training-progress-section {
    margin-bottom: 18px;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.progress-text {
    color: var(--primary);
    font-weight: 600;
}

.progress-bar {
    height: 8px;
    background: var(--border-light);
    border-radius: 20px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 20px;
    transition: width 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ========================================
   Recent Activity Card
   ======================================== */
.recent-activity-card {
    animation: fadeInUp 0.5s ease 0.3s backwards;
}

.activity-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    background: var(--background);
    color: var(--text-primary);
}

.tab-btn.active {
    background: var(--primary-light);
    color: var(--primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--background);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.activity-item:hover {
    background: var(--border-light);
}

.activity-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 14px;
}

.activity-icon.training {
    background: var(--primary-light);
    color: var(--primary);
}

.activity-icon.diet {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.activity-icon.ai {
    background: rgba(168, 85, 247, 0.1);
    color: #a855f7;
}

.activity-info {
    flex: 1;
    min-width: 0;
}

.activity-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.activity-meta {
    font-size: 12px;
    color: var(--text-secondary);
}

.activity-time {
    font-size: 11px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.empty-activity {
    text-align: center;
    padding: 32px 16px;
    color: var(--text-muted);
}

.empty-activity i {
    font-size: 28px;
    margin-bottom: 8px;
    opacity: 0.4;
}

/* ========================================
   Animations
   ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes subtlePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 1200px) {
    .goals-ai-row {
        grid-template-columns: 1fr;
    }

    .goals-ai-right {
        flex-direction: row;
    }

    .ai-coach-card,
    .reminders-card {
        flex: 1;
    }
}

@media (max-width: 900px) {
    .hero-section {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 24px;
    }

    .hero-today-list {
        display: none;
    }

    .goals-compact-row {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .goals-ai-right {
        flex-direction: column;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .hero-section {
        padding: 20px;
        border-radius: 16px;
    }

    .hero-title {
        font-size: 24px;
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-actions .btn {
        justify-content: center;
    }

    .goals-compact-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .goal-card-mini {
        flex-direction: row;
        align-items: center;
        padding: 14px 16px;
    }

    .goal-card-mini .goal-info {
        flex: 1;
    }

    .goals-ai-row {
        gap: 14px;
    }

    .fit-card {
        padding: 16px 18px;
        border-radius: 14px;
    }

    .training-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .stat-value {
        font-size: 18px;
    }
}
