/* FitBuddy WordPress Plugin Styles */
#fitbuddy-app * { box-sizing: border-box; margin: 0; padding: 0; }
#fitbuddy-app {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    max-width: 480px;
    margin: 0 auto;
    background: #F9FAFB;
    min-height: 100vh;
    position: relative;
}

/* ── Login ── */
#fb-login {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    padding: 32px 24px;
}
#fb-login h1 { font-size: 28px; font-weight: 800; color: #111; margin-bottom: 6px; }
#fb-login .subtitle { color: #6B7280; font-size: 14px; margin-bottom: 32px; }
.fb-user-btns { display: flex; gap: 12px; width: 100%; margin-bottom: 24px; }
.fb-user-btn {
    flex: 1; padding: 18px 12px; border-radius: 14px; border: 2px solid #E5E7EB;
    background: white; font-size: 15px; font-weight: 600; cursor: pointer;
    transition: all 0.15s; color: #374151;
}
.fb-user-btn.active-jj  { border-color: #3B82F6; background: #EFF6FF; color: #1D4ED8; }
.fb-user-btn.active-and { border-color: #10B981; background: #ECFDF5; color: #059669; }
.fb-pin-row { display: flex; gap: 10px; margin-bottom: 16px; width: 100%; justify-content: center; }
.fb-pin-dot {
    width: 52px; height: 52px; border-radius: 12px; border: 2px solid #E5E7EB;
    background: white; font-size: 22px; font-weight: 700; text-align: center;
    color: #111; outline: none; transition: border-color 0.15s;
}
.fb-pin-dot:focus { border-color: #3B82F6; }
.fb-numpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: 100%; max-width: 280px; }
.fb-num-btn {
    padding: 16px; border-radius: 12px; border: none; background: white;
    font-size: 18px; font-weight: 600; cursor: pointer; color: #111;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08); transition: background 0.1s;
}
.fb-num-btn:active { background: #F3F4F6; }
.fb-num-btn.del { font-size: 16px; color: #6B7280; }
.fb-login-btn {
    width: 100%; max-width: 280px; padding: 15px; border-radius: 12px; border: none;
    font-size: 16px; font-weight: 700; cursor: pointer; color: white; margin-top: 12px;
    background: #3B82F6;
}
.fb-error { color: #EF4444; font-size: 13px; margin-top: 8px; min-height: 20px; }

/* ── Header ── */
#fb-header {
    padding: 18px 18px 14px;
    color: white;
}
#fb-header .top-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
#fb-header .app-label { font-size: 11px; opacity: 0.8; text-transform: uppercase; letter-spacing: 1px; }
#fb-header .user-name { font-size: 22px; font-weight: 800; }
#fb-logout-btn {
    background: rgba(255,255,255,0.2); border: none; color: white; border-radius: 8px;
    padding: 6px 12px; font-size: 12px; cursor: pointer; font-weight: 600;
}
.fb-stats-row { display: flex; gap: 10px; }
.fb-stat {
    flex: 1; background: rgba(255,255,255,0.2); border-radius: 10px;
    padding: 8px 10px; text-align: center;
}
.fb-stat-val { font-size: 17px; font-weight: 700; }
.fb-stat-lbl { font-size: 10px; opacity: 0.85; }

/* ── Tab nav ── */
#fb-tabs {
    display: flex; background: white; border-bottom: 1px solid #E5E7EB;
}
.fb-tab {
    flex: 1; padding: 12px 0; border: none; background: transparent;
    font-size: 13px; cursor: pointer; color: #6B7280; font-weight: 400;
    border-bottom: 3px solid transparent; transition: all 0.15s;
}

/* ── Content ── */
#fb-content { padding: 16px; }

/* ── Cards ── */
.fb-card {
    background: white; border-radius: 14px; padding: 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.07); margin-bottom: 12px;
}
.fb-card-title { font-weight: 700; font-size: 15px; margin-bottom: 12px; }

/* ── Progress ring ── */
.fb-progress-row { display: flex; align-items: center; gap: 16px; }
.fb-sparkline-wrap { flex: 1; }
.fb-sparkline-lbl { font-size: 13px; color: #6B7280; margin-bottom: 6px; }
.fb-trend-badge { font-size: 12px; font-weight: 600; margin-top: 6px; }

/* ── Action buttons ── */
.fb-action-row { display: flex; gap: 10px; margin-bottom: 12px; }
.fb-btn-primary {
    flex: 1; border: none; border-radius: 12px; padding: 14px 0;
    font-weight: 700; font-size: 14px; cursor: pointer; color: white;
}
.fb-btn-outline {
    flex: 1; border-radius: 12px; padding: 14px 0;
    font-weight: 700; font-size: 14px; cursor: pointer; background: white;
}

/* ── Workout list ── */
.fb-workout-item {
    background: white; border-radius: 12px; padding: 12px 14px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06); display: flex;
    align-items: center; gap: 12px; margin-bottom: 8px;
}
.fb-workout-emoji { font-size: 26px; }
.fb-workout-info { flex: 1; }
.fb-workout-type { font-weight: 600; font-size: 14px; }
.fb-workout-meta { font-size: 12px; color: #6B7280; margin-top: 2px; }
.fb-workout-note { font-size: 12px; color: #9CA3AF; margin-top: 2px; }

/* ── Feed ── */
.fb-feed-item {
    background: white; border-radius: 12px; padding: 12px 14px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06); display: flex;
    gap: 10px; align-items: flex-start; margin-bottom: 8px;
}
.fb-avatar {
    width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    color: white; font-weight: 700; font-size: 14px;
}
.fb-feed-text { flex: 1; font-size: 14px; color: #374151; }
.fb-feed-text strong { font-weight: 700; }
.fb-feed-date { font-size: 11px; color: #9CA3AF; margin-top: 2px; }
.fb-feed-icon { font-size: 18px; }

/* ── Setup banner ── */
.fb-setup-banner {
    background: #FEF3C7; border-radius: 12px; padding: 16px;
    border: 1px solid #FCD34D; margin-bottom: 12px;
}
.fb-setup-title { font-weight: 600; margin-bottom: 4px; }
.fb-setup-sub { font-size: 13px; color: #92400E; margin-bottom: 10px; }
.fb-setup-go {
    background: #F59E0B; color: white; border: none; border-radius: 8px;
    padding: 8px 16px; font-weight: 600; cursor: pointer; font-size: 13px;
}

/* ── Empty state ── */
.fb-empty { text-align: center; padding: 40px 20px; color: #9CA3AF; }
.fb-empty-icon { font-size: 40px; margin-bottom: 10px; }
.fb-empty-title { font-weight: 600; }
.fb-empty-sub { font-size: 13px; }

/* ── Section header ── */
.fb-section-header {
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px;
}
.fb-section-title { font-weight: 700; font-size: 16px; }
.fb-add-btn {
    border: none; border-radius: 8px; padding: 7px 14px;
    font-weight: 600; font-size: 13px; cursor: pointer; color: white;
}

/* ── Modal ── */
#fb-modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.5);
    display: flex; align-items: flex-end; justify-content: center;
    z-index: 9999;
}
#fb-modal {
    background: white; border-radius: 20px 20px 0 0;
    padding: 24px 20px 48px; width: 100%; max-width: 480px;
}
.fb-modal-title { font-weight: 700; font-size: 18px; margin-bottom: 16px; }
.fb-field-label { display: block; margin-bottom: 4px; font-size: 13px; color: #6B7280; }
.fb-input {
    width: 100%; border: 1.5px solid #E5E7EB; border-radius: 10px;
    padding: 12px 14px; font-size: 15px; margin-bottom: 12px; outline: none;
    font-family: inherit;
}
.fb-input:focus { border-color: #3B82F6; }
.fb-workout-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.fb-workout-type-btn {
    padding: 10px 8px; border-radius: 10px; border: 2px solid #E5E7EB;
    background: white; font-size: 13px; cursor: pointer; transition: all 0.1s;
}
.fb-modal-save {
    width: 100%; border: none; border-radius: 12px; padding: 15px;
    font-weight: 700; font-size: 16px; cursor: pointer; color: white; margin-top: 6px;
}
.fb-settings-link {
    text-align: center; margin-top: 12px;
}
.fb-settings-link button {
    background: none; border: none; color: #6B7280; font-size: 13px;
    text-decoration: underline; cursor: pointer;
}

/* ── Partner section ── */
.fb-partner-opacity { opacity: 0.75; }
.fb-partner-label { font-size: 12px; color: #9CA3AF; margin-bottom: 4px; }
